diff --git a/README.md b/README.md index 854cae7e40..c50d026338 100644 --- a/README.md +++ b/README.md @@ -256,7 +256,7 @@ When it graduates draft mode, we may remove it from DefinitelyTyped and deprecat #### I want to update a package to a new major version -Before making your change, please create a new subfolder with the current version e.g. `v2`, and copy existing files to it. You will need to: +If you intend to continue updating the older version of the package, you may create a new subfolder with the current version e.g. `v2`, and copy existing files to it. If so, you will need to: 1. Update the relative paths in `tsconfig.json` as well as `tslint.json`. 2. Add path mapping rules to ensure that tests are running against the intended version. @@ -279,7 +279,8 @@ For example [history v2 `tsconfig.json`](https://github.com/DefinitelyTyped/Defi } ``` -Please note that unless upgrading something backwards-compatible like `node`, all packages depending of the updated package need a path mapping to it, as well as packages depending on *those*. +If there are other packages on DefinitelyTyped that are incompatible with the new version, you will need to add path mappings to the old version. You will also need to do this for packages depending on packages depending on the old version. + For example, `react-router` depends on `history@2`, so [react-router `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/tsconfig.json) has a path mapping to `"history": [ "history/v2" ]`; transitively `react-router-bootstrap` (which depends on `react-router`) also adds a path mapping in its [tsconfig.json](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router-bootstrap/tsconfig.json). diff --git a/notNeededPackages.json b/notNeededPackages.json index fd7868f2ae..7683c07522 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -1590,6 +1590,12 @@ "sourceRepoURL": "https://github.com/sourcelair/xterm.js/", "asOfVersion": "3.0.0" }, + { + "libraryName": "yFiles for HTML", + "typingsPackageName": "yfiles", + "sourceRepoURL": "none", + "asOfVersion": "2.1.0" + }, { "libraryName": "zetapush-js", "typingsPackageName": "zetapush-js", diff --git a/scripts/generate-tsconfigs.ts b/scripts/generate-tsconfigs.ts index 0115067e34..e1e1998950 100644 --- a/scripts/generate-tsconfigs.ts +++ b/scripts/generate-tsconfigs.ts @@ -5,7 +5,7 @@ import * as fs from 'fs'; import * as path from 'path'; -const home = path.join(__dirname, '..'); +const home = path.join(__dirname, "..", "types"); for (const dirName of fs.readdirSync(home)) { if (dirName.startsWith(".") || dirName === "node_modules" || dirName === "scripts") { diff --git a/types/abbrev/tsconfig.json b/types/abbrev/tsconfig.json index 0755c19fe1..b33fbb06bc 100644 --- a/types/abbrev/tsconfig.json +++ b/types/abbrev/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/abs/tsconfig.json b/types/abs/tsconfig.json index 2bcb3f7094..be1e00e9b9 100644 --- a/types/abs/tsconfig.json +++ b/types/abs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/absolute/tsconfig.json b/types/absolute/tsconfig.json index ba18df791e..9932020aa3 100644 --- a/types/absolute/tsconfig.json +++ b/types/absolute/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/acc-wizard/tsconfig.json b/types/acc-wizard/tsconfig.json index a20aeba97b..f63878ba9b 100644 --- a/types/acc-wizard/tsconfig.json +++ b/types/acc-wizard/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/accept-language-parser/tsconfig.json b/types/accept-language-parser/tsconfig.json index 11532082db..86f839c4be 100644 --- a/types/accept-language-parser/tsconfig.json +++ b/types/accept-language-parser/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/accepts/tsconfig.json b/types/accepts/tsconfig.json index 35b618292d..9d62081738 100644 --- a/types/accepts/tsconfig.json +++ b/types/accepts/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/accounting/tsconfig.json b/types/accounting/tsconfig.json index f815c5b01e..7ec0b3a159 100644 --- a/types/accounting/tsconfig.json +++ b/types/accounting/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ace/tsconfig.json b/types/ace/tsconfig.json index eb52fff185..97c51e2bf9 100644 --- a/types/ace/tsconfig.json +++ b/types/ace/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/acl/tsconfig.json b/types/acl/tsconfig.json index 9f5c6a01ef..ada20a1b2c 100644 --- a/types/acl/tsconfig.json +++ b/types/acl/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/acorn/tsconfig.json b/types/acorn/tsconfig.json index 0b4760b0fc..9a9bbdd763 100644 --- a/types/acorn/tsconfig.json +++ b/types/acorn/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/actioncable/tsconfig.json b/types/actioncable/tsconfig.json index cb137a8982..544fc4d502 100644 --- a/types/actioncable/tsconfig.json +++ b/types/actioncable/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/actions-on-google/actions-on-google-tests.ts b/types/actions-on-google/actions-on-google-tests.ts index e57e1e8d98..d24c3093b4 100644 --- a/types/actions-on-google/actions-on-google-tests.ts +++ b/types/actions-on-google/actions-on-google-tests.ts @@ -1,6 +1,6 @@ import { ActionsSdkApp, ActionsSdkAppOptions, DialogflowApp, DialogflowAppOptions, AssistantApp, Responses, Transactions } from 'actions-on-google'; -import * as express from 'express'; +import express = require('express'); function testActionsSdk(request: express.Request, response: express.Response) { const app = new ActionsSdkApp({request, response}); diff --git a/types/actions-on-google/tsconfig.json b/types/actions-on-google/tsconfig.json index 6682b5c194..82fc80a44f 100644 --- a/types/actions-on-google/tsconfig.json +++ b/types/actions-on-google/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -25,4 +26,4 @@ "transactions.d.ts", "actions-on-google-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/activex-access/tsconfig.json b/types/activex-access/tsconfig.json index a376fcb722..d1fac56caa 100644 --- a/types/activex-access/tsconfig.json +++ b/types/activex-access/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-adodb/tsconfig.json b/types/activex-adodb/tsconfig.json index 5cb32f94c9..7a5b6e8f13 100644 --- a/types/activex-adodb/tsconfig.json +++ b/types/activex-adodb/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-dao/tsconfig.json b/types/activex-dao/tsconfig.json index 2ddea247b9..da7ac77da9 100644 --- a/types/activex-dao/tsconfig.json +++ b/types/activex-dao/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-diskquota/activex-diskquota-tests.ts b/types/activex-diskquota/activex-diskquota-tests.ts new file mode 100644 index 0000000000..2672b590ca --- /dev/null +++ b/types/activex-diskquota/activex-diskquota-tests.ts @@ -0,0 +1,44 @@ +const collectionToArray = (col: any) => { // tslint:disable-line no-unnecessary-generics + const results: T[] = []; + const enumerator = new Enumerator(col); + enumerator.moveFirst(); + while (!enumerator.atEnd()) { + results.push(enumerator.item()); + enumerator.moveNext(); + } + return results; +}; + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787925(v=vs.85).aspx +(() => { + const enumUsers = (label: string) => { + const volume = new ActiveXObject('Microsoft.DiskQuota'); + volume.Initialize(label, true); + collectionToArray(volume).forEach(x => { + // Use the QuotaUser object to retrieve or set one or more of the user's disk quota properties + }); + }; +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787916(v=vs.85).aspx +(() => { + const volume = new ActiveXObject('Microsoft.DiskQuota'); + volume.Initialize('MYDISK', true); + ActiveXObject.on(volume, 'OnUserNameChanged', ['pUser'], p => { + // Code to handle the event. + }); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787904(v=vs.85).aspx +(() => { + const dqc = new ActiveXObject('Microsoft.DiskQuota'); + dqc.Initialize('MYDISK', true); + const findName = (name: string) => { + try { + return dqc.FindUser(name); + } catch { } + try { + return dqc.FindUser(dqc.TranslateLogonNameToSID(name)); + } catch { } + }; +})(); diff --git a/types/activex-diskquota/index.d.ts b/types/activex-diskquota/index.d.ts new file mode 100644 index 0000000000..d27863de3c --- /dev/null +++ b/types/activex-diskquota/index.d.ts @@ -0,0 +1,152 @@ +// Type definitions for DiskQuotaTypeLibrary 1.0 +// Project: https://msdn.microsoft.com/en-us/library/windows/desktop/bb773938(v=vs.85).aspx +// Definitions by: Zev Spitz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.5 + +declare namespace DiskQuotaTypeLibrary { + // tslint:disable-next-line no-const-enum + const enum AccountStatusConstants { + dqAcctDeleted = 2, + dqAcctInvalid = 3, + dqAcctResolved = 0, + dqAcctUnavailable = 1, + dqAcctUnknown = 4, + dqAcctUnresolved = 5, + } + + // tslint:disable-next-line no-const-enum + const enum QuotaStateConstants { + dqStateDisable = 0, + dqStateEnforce = 2, + dqStateTrack = 1, + } + + // tslint:disable-next-line no-const-enum + const enum UserNameResolutionConstants { + dqResolveAsync = 2, + dqResolveNone = 0, + dqResolveSync = 1, + } + + /** Automation interface for DiskQuotaUser */ + class DIDiskQuotaUser { + private 'DiskQuotaTypeLibrary.DIDiskQuotaUser_typekey': DIDiskQuotaUser; + private constructor(); + + /** Name of user's account container */ + readonly AccountContainerName: string; + + /** Status of user's account */ + readonly AccountStatus: AccountStatusConstants; + + /** User's display name */ + readonly DisplayName: string; + + /** Unique ID number */ + readonly ID: number; + + /** Invalidate data cached in user object */ + Invalidate(): void; + + /** User's logon account name */ + readonly LogonName: string; + + /** User's quota limit (bytes) */ + QuotaLimit: number; + + /** User's quota limit (text) */ + readonly QuotaLimitText: string; + + /** User's quota warning threshold (bytes) */ + QuotaThreshold: number; + + /** User's quota warning threshold (text) */ + readonly QuotaThresholdText: string; + + /** Quota charged to user (bytes) */ + readonly QuotaUsed: number; + + /** Quota charged to user (text) */ + readonly QuotaUsedText: string; + } + + /** Microsoft Disk Quota */ + class DiskQuotaControl { + private 'DiskQuotaTypeLibrary.DiskQuotaControl_typekey': DiskQuotaControl; + private constructor(); + + /** Add a user quota entry by Name */ + AddUser(LogonName: string): DIDiskQuotaUser; + + /** Default quota limit applied to new volume users (byte value) */ + DefaultQuotaLimit: number; + + /** Default quota limit applied to new volume users (text string) */ + readonly DefaultQuotaLimitText: string; + + /** Default warning threshold applied to new volume users (byte value) */ + DefaultQuotaThreshold: number; + + /** Default warning threshold applied to new volume users (text string) */ + readonly DefaultQuotaThresholdText: string; + + /** Delete a user quota entry */ + DeleteUser(pUser: DIDiskQuotaUser): void; + + /** Find a user quota entry by Name */ + FindUser(LogonName: string): DIDiskQuotaUser; + + /** Promote a user quota entry to the head of the name resolution queue */ + GiveUserNameResolutionPriority(pUser: DIDiskQuotaUser): void; + + /** Initialize the quota control object for a specified volume */ + Initialize(path: string, bReadWrite: boolean): void; + + /** Invalidate the cache of user name information */ + InvalidateSidNameCache(): void; + + /** Write event log entry when user exceeds quota limit */ + LogQuotaLimit: boolean; + + /** Write event log entry when user exceeds quota warning threshold */ + LogQuotaThreshold: boolean; + + /** Indicates if quota information is out of date */ + readonly QuotaFileIncomplete: boolean; + + /** Indicates if quota information is being rebuilt */ + readonly QuotaFileRebuilding: boolean; + + /** State of the volume's disk quota system */ + QuotaState: QuotaStateConstants; + + /** Terminate the user name resolution thread */ + ShutdownNameResolution(): void; + + /** Translates a user logon name to a security ID */ + TranslateLogonNameToSID(LogonName: string): string; + + /** Control the resolution of user Security IDs to user Names */ + UserNameResolution: UserNameResolutionConstants; + } +} + +interface ActiveXObject { + on( + obj: DiskQuotaTypeLibrary.DiskQuotaControl, event: 'OnUserNameChanged', argNames: ['pUser'], handler: ( + this: DiskQuotaTypeLibrary.DiskQuotaControl, parameter: {readonly pUser: DiskQuotaTypeLibrary.DIDiskQuotaUser}) => void): void; + new(progid: K): ActiveXObjectNameMap[K]; +} + +interface ActiveXObjectNameMap { + 'Microsoft.DiskQuota': DiskQuotaTypeLibrary.DiskQuotaControl; +} + +interface EnumeratorConstructor { + new(col: DiskQuotaTypeLibrary.DiskQuotaControl): Enumerator; +} + +interface SafeArray { + _brand: SafeArray; +} diff --git a/types/activex-diskquota/package.json b/types/activex-diskquota/package.json new file mode 100644 index 0000000000..d9b1031263 --- /dev/null +++ b/types/activex-diskquota/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "activex-helpers": "*" + } +} \ No newline at end of file diff --git a/types/activex-diskquota/tsconfig.json b/types/activex-diskquota/tsconfig.json new file mode 100644 index 0000000000..61686bd769 --- /dev/null +++ b/types/activex-diskquota/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es5", + "scripthost" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "activex-diskquota-tests.ts" + ] +} \ No newline at end of file diff --git a/types/activex-diskquota/tslint.json b/types/activex-diskquota/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/activex-diskquota/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/activex-excel/tsconfig.json b/types/activex-excel/tsconfig.json index 244ab1d0ef..a9599850ef 100644 --- a/types/activex-excel/tsconfig.json +++ b/types/activex-excel/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-faxcomexlib/activex-faxcomexlib-tests.ts b/types/activex-faxcomexlib/activex-faxcomexlib-tests.ts new file mode 100644 index 0000000000..9ae8c7641d --- /dev/null +++ b/types/activex-faxcomexlib/activex-faxcomexlib-tests.ts @@ -0,0 +1,730 @@ +/// + +const collectionToArray = (col: { Item(index: any): T } | SafeArray) => { + const results: T[] = []; + const enumerator = new Enumerator(col); + enumerator.moveFirst(); + while (!enumerator.atEnd()) { + results.push(enumerator.item()); + enumerator.moveNext(); + } + return results; +}; + +const toSafeArray = (...items: T[]): SafeArray => { + const dict = new ActiveXObject('Scripting.Dictionary'); + items.forEach((x, index) => dict.Add(index, x)); + return dict.Items() as SafeArray; +}; + +const VB = { + InputBox: (prompt: string): string => '' +}; + +const getServer = () => { + const server = new ActiveXObject('FaxComEx.FaxServer'); + server.Connect(''); + return server; +}; + +(() => { + // https://msdn.microsoft.com/en-us/library/windows/desktop/ms693376(v=vs.85).aspx + const server = new ActiveXObject('FaxComEx.FaxServer'); + const document = new ActiveXObject('FaxComEx.FaxDocument'); + + // https://msdn.microsoft.com/en-us/library/windows/desktop/ms692919(v=vs.85).aspx + server.Connect(''); + server.Connect('computername'); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693502(v=vs.85).aspx +(() => { + const getInitializedDevice = () => { + const ret = getServer().GetDevices().ItemById(1); + ret.ReceiveMode = FAXCOMEXLib.FAX_DEVICE_RECEIVE_MODE_ENUM.fdrmAUTO_ANSWER; + ret.RingsBeforeAnswer = 5; + ret.SendEnabled = true; + return ret; + }; + + // saving configuration + let device = getInitializedDevice(); + device.Save(); + + // abandoning changes to configuration, using the Refresh method + device = getInitializedDevice(); + device.Refresh(); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693502(v=vs.85).aspx +(() => { + const incomingJob = getServer().Folders.IncomingQueue.GetJobs().Item(1); + incomingJob.Refresh(); + const currentPage = incomingJob.CurrentPage; +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms692922(v=vs.85).aspx +(() => { + const server = getServer(); + + WScript.Echo(`Server information: +API Version: ${server.APIVersion} +Debug: ${server.Debug} +Build and version: ${server.MajorBuild}.${server.MinorBuild}.${server.MajorVersion}.${server.MinorVersion} +Server name: ${server.ServerName}`); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693455(v=vs.85).aspx +(() => { + const activity = getServer().Activity; + activity.Refresh(); + + WScript.Echo(` +${activity.IncomingMessages} incoming messages +${activity.OutgoingMessages} outgoing messages +${activity.RoutingMessages} routing messages +${activity.QueuedMessages} queued messages`); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693400(v=vs.85).aspx +(() => { + const device = getServer().GetDevices().Item(1); + device.CSID = 'Accounts payable'; + device.Description = 'Primary fax device'; + device.ReceiveMode = FAXCOMEXLib.FAX_DEVICE_RECEIVE_MODE_ENUM.fdrmAUTO_ANSWER; + device.RingsBeforeAnswer = 5; + device.SendEnabled = true; + device.TSID = 'Accounts payable'; + device.Save(); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms692985(v=vs.85).aspx +(() => { + const devices = getServer().GetDevices(); + WScript.Echo(`This server has ${devices.Count} fax devices`); + for (let i = 1; i <= devices.Count; i++) { + WScript.Echo(`Device ID for device number ${i} is ${devices.Item(i).Id}`); + } + + collectionToArray(devices).forEach(device => { + device.Refresh(); + WScript.Echo(` +Device name: ${device.DeviceName} +Provider unique name: ${device.ProviderUniqueName} +Powered off: ${device.PoweredOff} +Receiving now: ${device.ReceivingNow} +Ringing now: ${device.RingingNow} +Sending now: ${device.SendingNow}`); + + const routingMethods = new VBArray(device.UsedRoutingMethods).toArray(); + routingMethods.forEach((guid, index) => { + WScript.Echo(`Method number ${index} = ${guid}`); + }); + + device.UseRoutingMethod(routingMethods[0], false); + device.Save(); + }); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693486(v=vs.85).aspx +(() => { + const outputRuleInfo = (rule: FAXCOMEXLib.FaxOutboundRoutingRule, index?: number) => { + WScript.Echo(` +Outbound routing rule number: ${index || 'unknown'} +Area code: ${rule.AreaCode} +Country/region code: ${rule.CountryCode} +Device ID: ${rule.DeviceId} +Group name: ${rule.GroupName} +Status: ${rule.Status} +Is device used: ${rule.UseDevice}` + .trim()); + }; + + const server = getServer(); + const device = server.GetDevices().Item(1); + const id = device.Id; + const rules = server.OutboundRouting.GetRules(); + const outboundRoutingRules = server.OutboundRouting.GetRules(); + WScript.Echo(`There are ${outboundRoutingRules.Count} outbound routing rules on this server.`); + + collectionToArray(outboundRoutingRules).forEach((rule, index) => { + rule.Refresh(); + outputRuleInfo(rule, index); + + if (!rule.UseDevice) { return; } + if (VB.InputBox('Do you want to change the device for this rule (Y/N)?') === 'Y') { + const newDeviceID = parseInt(VB.InputBox('Enter new device ID'), 10); + rule.DeviceId = newDeviceID; + rule.Save(); + } + }); + + const msg = ` +Do you want to: +1) display an item based on its country/region and area code, +2) remove an item based on its country/region and area code, +3) remove an item based on its item number, or +4) add a rule? +Input 1, 2, 3, 4, or 0 to exit +`.trim(); + const result = parseInt(VB.InputBox(msg), 10); + let countryCode: number; + let areaCode: number; + let itemNumber: number; + let rule: FAXCOMEXLib.FaxOutboundRoutingRule; + switch (result) { + case 1: + countryCode = parseInt(VB.InputBox('Enter the country/region code'), 10); + areaCode = parseInt(VB.InputBox('Enter the area code'), 10); + rule = outboundRoutingRules.ItemByCountryAndArea(countryCode, areaCode); + outputRuleInfo(rule); + break; + case 2: + countryCode = parseInt(VB.InputBox('Enter the country/region code'), 10); + areaCode = parseInt(VB.InputBox('Enter the area code'), 10); + outboundRoutingRules.RemoveByCountryAndArea(countryCode, areaCode); + break; + case 3: + itemNumber = parseInt(VB.InputBox('Enter the item number'), 10); + outboundRoutingRules.Remove(itemNumber); + break; + case 4: + countryCode = parseInt(VB.InputBox('Enter the country/region code'), 10); + areaCode = parseInt(VB.InputBox('Enter the area code'), 10); + rule = outboundRoutingRules.Add(countryCode, areaCode, true, '', id); + break; + default: + return; + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693408(v=vs.85).aspx +(() => { + const server = getServer(); + const outboundRouting = server.OutboundRouting; + const outboundRoutingGroups = outboundRouting.GetGroups(); + const groupName = VB.InputBox('Provide a name for the outbound routing group'); + const outboundRoutingGroup = outboundRoutingGroups.Add(groupName); + const devices = collectionToArray(server.GetDevices()); + + // add the devices to the routing group + devices.forEach(device => outboundRoutingGroup.DeviceIds.Add(device.Id)); + // move the last device to the top of the order + outboundRoutingGroup.DeviceIds.SetOrder(devices[devices.length - 1].Id, 1); + + // display the number of devices, and the device ID of the first device,to confirm its location in the order + const msg = ` +Number of devices: ${outboundRoutingGroup.DeviceIds.Count} +ID of first device: ${outboundRoutingGroup.DeviceIds.Item(1)} +`.trim(); + WScript.Echo(msg); + + // remove the first device + outboundRoutingGroup.DeviceIds.Remove(1); + + WScript.Echo(`There are now ${outboundRoutingGroups.Count} routing groups on the server`); + + collectionToArray(outboundRoutingGroups).forEach((routingGroup, index) => { + const msg = ` +Routing group number: ${index} +Outbound routing group name: ${routingGroup.Name} +Device status: ${routingGroup.Status} +`.trim(); + }); + + // allow user to remove a routing group + if (VB.InputBox('Do you want to remove a routing group (Y/N)?') === 'N') { return; } + const itemNumber = VB.InputBox('Enter the item number for the group you want to remove'); + outboundRoutingGroups.Remove(itemNumber); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/aa964960(v=vs.85).aspx +(() => { + const accountSet = getServer().FaxAccountSet; + const accounts = collectionToArray(accountSet.GetAccounts()); + WScript.Echo(`Number of accounts: ${accounts.length}`); + accounts.forEach(account => WScript.Echo(account.AccountName)); + + const accountName = VB.InputBox('Enter an account name'); + accountSet.AddAccount(accountName); + accountSet.RemoveAccount(accountName); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms692952(v=vs.85).aspx +(() => { + const incomingJobs = collectionToArray(getServer().Folders.IncomingQueue.GetJobs()); + WScript.Echo(`There are ${incomingJobs.length} jobs in the incoming queue.`); + const n = parseInt(VB.InputBox('Input the number of a job for which you want information'), 10); + const job = incomingJobs[n - 1]; + WScript.Echo(` +Available operations: ${job.AvailableOperations} +Caller ID: ${job.CallerId} +CSID: ${job.CSID} +Current page: ${job.CurrentPage} +Device ID: ${job.DeviceId} +Extended status: ${job.ExtendedStatus} +Extended status code: ${job.ExtendedStatusCode} +Job ID: ${job.Id} +Job type: ${job.JobType} +Retries: ${job.Retries} +Routing information: ${job.RoutingInformation} +Size: ${job.Size} +Status: ${job.Status} +Transmission start: ${new Date(job.TransmissionStart)} +Transmission end: ${new Date(job.TransmissionEnd)} +TSID: ${job.TSID} +`.trim()); + + if (VB.InputBox('Cancel this fax (Y/N)?') === 'Y') { + job.Cancel(); + } + + if (VB.InputBox('Open this fax (Y/N)?') === 'Y') { + const fileName = VB.InputBox('Enter path to save'); + job.CopyTiff(fileName); + new ActiveXObject('WScript.Shell').Run(fileName); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms692914(v=vs.85).aspx +(() => { + const server = new ActiveXObject('FaxComEx.FaxServer'); + server.Connect(''); + const outgoingQueue = server.Folders.OutgoingQueue; + outgoingQueue.AgeLimit = 2; + outgoingQueue.AllowPersonalCoverPages = true; + outgoingQueue.Blocked = false; + outgoingQueue.Paused = false; + outgoingQueue.Branding = true; + outgoingQueue.DiscountRateStart = new Date(0, 0, 0, 0).getVarDate(); + outgoingQueue.DiscountRateStart = new Date(0, 0, 0, 1).getVarDate(); + outgoingQueue.UseDeviceTSID = true; + outgoingQueue.Save(); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693393(v=vs.85).aspx +(() => { + const outgoingQueue = getServer().Folders.OutgoingQueue; + outgoingQueue.Refresh(); + WScript.Echo(`There are ${outgoingQueue.GetJobs().Count} faxes in the outgoing queue`); + const inputResult = VB.InputBox('Which fax should be displayed (item number or job name)?'); + const itemNumber = parseInt(inputResult, 10); + const job = + isNaN(itemNumber) ? + outgoingQueue.GetJob(inputResult) : + outgoingQueue.GetJobs().Item(itemNumber); + + WScript.Echo(` +Available operations: ${job.AvailableOperations} +Broadcast receipts grouped? ${job.GroupBroadcastReceipts} +CSID: ${job.CSID} +Current page: ${job.CurrentPage} +Device ID: ${job.DeviceId} +Document name: ${job.DocumentName} +Extended status: ${job.ExtendedStatus} +Extended status code: ${job.ExtendedStatusCode} +Job ID: ${job.Id} +Original scheduled time: ${new Date(job.OriginalScheduledTime)} +Pages: ${job.Pages} +Priority: ${job.Priority} +Receipt type: ${job.ReceiptType} +`.trim()); + + const fileName = VB.InputBox('Enter path to save'); + job.CopyTiff(fileName); + new ActiveXObject('WScript.Shell').Run(fileName); + + const answer = VB.InputBox(` +Do you want to: +(C) cancel +(P) pause +(R) restart +(E) resume +the job? +`.trim()); + + switch (answer) { + case 'C': + job.Cancel(); + break; + case 'P': + job.Pause(); + break; + case 'R': + job.Restart(); + break; + case 'E': + job.Resume(); + break; + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms692936(v=vs.85).aspx +(() => { + const document = new ActiveXObject('FaxComEx.FaxDocument'); + document.Body = 'C:\\docs\\body.txt'; + document.DocumentName = 'My First Fax'; + document.Priority = FAXCOMEXLib.FAX_PRIORITY_TYPE_ENUM.fptHIGH; + document.Recipients.Add('12225550100', 'Bud'); + document.AttachFaxToReceipt = true; + document.CoverPageType = FAXCOMEXLib.FAX_COVERPAGE_TYPE_ENUM.fcptSERVER; + document.Note = 'Here is the info you requested'; + document.ReceiptAddress = 'someone@example.com'; + document.ReceiptType = FAXCOMEXLib.FAX_RECEIPT_TYPE_ENUM.frtMAIL; + document.ScheduleType = FAXCOMEXLib.FAX_SCHEDULE_TYPE_ENUM.fstSPECIFIC_TIME; + document.ScheduleTime = new Date(0, 0, 0, 16, 35, 47).getVarDate(); + document.Subject = 'Today\'s fax'; + + // set sender properties + const sender = document.Sender; + sender.Title = 'Mr.'; + sender.Name = 'Bob'; + sender.City = 'Cleveland Heights'; + sender.State = 'Ohio'; + sender.Company = 'Microsoft'; + sender.Country = 'USA'; + sender.Email = 'someone@microsoft.com'; + sender.FaxNumber = '12165555554'; + sender.HomePhone = '12165555555'; + sender.OfficeLocation = 'Downtown'; + sender.OfficePhone = '12165555553'; + sender.StreetAddress = '123 Main Street'; + sender.TSID = 'Office fax machine'; + sender.ZipCode = '44118'; + sender.BillingCode = '23A54'; + sender.Department = 'Accts Payable'; + sender.SaveDefaultSender(); + + const server = getServer(); + + const jobID = document.ConnectedSubmit(server); + WScript.Echo(`The job ID is ${jobID}`); + + server.Disconnect(); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693479(v=vs.85).aspx +(() => { + const document = new ActiveXObject('FaxComEx.FaxDocument'); + document.Body = 'C:\\docs\\body.txt'; + document.DocumentName = 'My First Fax'; + + const recipients = document.Recipients; + recipients.Add('12225550105', 'H'); + recipients.Add('12225550104', 'N'); + recipients.Add('12225550103', 'G'); + + WScript.Echo(`Number of recipients: ${recipients.Count}`); + collectionToArray(recipients).forEach((recipient, index) => + WScript.Echo(`Recipient number ${index}: ${recipient.Name}, ${recipient.FaxNumber}`) + ); + + document.Sender.LoadDefaultSender(); + document.GroupBroadcastReceipts = true; + + const jobIDs = document.Submit(''); + collectionToArray(jobIDs).forEach(jobID => WScript.Echo(`The job ID is ${jobID}`)); + + while (recipients.Count > 0) { + recipients.Remove(1); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/aa964962(v=vs.85).aspx +(() => { + const server = getServer(); + const prefetchCount = parseInt(VB.InputBox('How many messages should be prefetched?'), 10); + server.CurrentAccount.Folders.IncomingArchive.Refresh(); + const messageIterator = server.Folders.IncomingArchive.GetMessages(prefetchCount); + messageIterator.MoveFirst(); + for (let i = 1; i <= prefetchCount; i++) { + if (i > 1 && VB.InputBox('View next message? (Y/N)') !== 'Y') { break; } + const message = messageIterator.Message as FAXCOMEXLib.FaxIncomingMessage; + if (messageIterator.AtEOF) { + WScript.Echo(`End of file reached`); + return; + } + if (!message.WasReAssigned) { + if (VB.InputBox('Message not reassigned. Reassign (Y/N)?') === 'Y') { + message.Subject = 'Reassigning message'; + message.SenderName = 'Test user'; + message.Recipients = VB.InputBox('Enter username, e.g. Domain\\UserName'); + message.SenderFaxNumber = '1234'; + message.ReAssign(); + } + } + messageIterator.MoveNext(); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693402(v=vs.85).aspx +(() => { + const server = getServer(); + const prefetchCount = parseInt(VB.InputBox('How many messages should be prefetched?'), 10); + server.Folders.OutgoingArchive.Refresh(); + const messageIterator = server.Folders.OutgoingArchive.GetMessages(prefetchCount); + messageIterator.MoveFirst(); + for (let i = 1; i <= prefetchCount; i++) { + if (i > 1 && VB.InputBox('View next message? (Y/N)') !== 'Y') { break; } + if (messageIterator.AtEOF) { + WScript.Echo(`End of file reached`); + return; + } + const message = messageIterator.Message as FAXCOMEXLib.FaxOutgoingMessage; + + const fileName = VB.InputBox('Enter path to save'); + message.CopyTiff(fileName); + new ActiveXObject('WScript.Shell').Run(fileName); + + WScript.Echo(`Message information: +CSID: ${message.CSID} +Device name: ${message.DeviceName} +Document name: ${message.DocumentName} +Message ID: ${message.Id} +Original scheduled time: ${new Date(message.OriginalScheduledTime)} +Pages: ${message.Pages} +Recipient fax number: ${message.Recipient.FaxNumber} +Retries: ${message.Retries} +Sender name: ${message.Sender.Name} +Size: ${message.Size} +Subject: ${message.Subject} +Submission ID: ${message.SubmissionId} +Submission time: ${new Date(message.SubmissionTime)} +Transmission end time: ${new Date(message.TransmissionEnd)} +Transmission start time: ${new Date(message.TransmissionStart)} +TSID: ${message.TSID}`); + + if (VB.InputBox('Delete this fax from the archive (Y/N)?') === 'Y') { + message.Delete(); + } + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693472(v=vs.85).aspx +(() => { + const server = getServer(); + const outgoingArchive = server.Folders.OutgoingArchive; + WScript.Echo(` +Age limit: ${outgoingArchive.AgeLimit} +Archive folder: ${outgoingArchive.ArchiveFolder} +High quota mark: ${outgoingArchive.HighQuotaWaterMark} +Low quota water mark: ${outgoingArchive.LowQuotaWaterMark} +Size high: ${outgoingArchive.SizeHigh} +Size low: ${outgoingArchive.SizeLow} +Size quota warning: ${outgoingArchive.SizeQuotaWarning} +Is archive used? ${outgoingArchive.UseArchive}`.trim() + ); + + const newLimit = VB.InputBox('Set new age limit (enter empty value or Cancel to leave unchanged'); + if (newLimit) { + outgoingArchive.AgeLimit = parseInt(newLimit, 10); + } + + const messageID = VB.InputBox('Retrieve a message by ID (enter an empty value or press Cancel to exit'); + if (messageID) { + const fileName = VB.InputBox('Enter path to save'); + outgoingArchive.GetMessage(messageID).CopyTiff(fileName); + new ActiveXObject('WScript.Shell').Run(fileName); + } +})(); + +(() => { + const server = getServer(); + const messageIterator = server.Folders.OutgoingArchive.GetMessages(); + if (messageIterator.AtEOF) { return; } + messageIterator.MoveFirst(); + while (!messageIterator.AtEOF) { + const message = messageIterator.Message; + WScript.Echo(` +Document name: ${message.DocumentName} +ID: ${message.Id} +Transmission end: ${new Date(message.TransmissionEnd)} +Transmission start: ${new Date(message.TransmissionStart)} +`.trim()); + messageIterator.MoveNext(); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms692976(v=vs.85).aspx +(() => { + const server = getServer(); + const prefetchCount = parseInt(VB.InputBox('How many messages should be prefetched?'), 10); + server.Folders.IncomingArchive.Refresh(); + const messageIterator = server.Folders.IncomingArchive.GetMessages(prefetchCount); + messageIterator.MoveFirst(); + for (let i = 1; i <= prefetchCount; i++) { + if (i > 1 && VB.InputBox('View next message? (Y/N)') !== 'Y') { break; } + const message = messageIterator.Message as FAXCOMEXLib.FaxIncomingMessage; + if (messageIterator.AtEOF) { + WScript.Echo(`End of file reached`); + return; + } + const fileName = VB.InputBox('Enter path to save TIFF file'); + message.CopyTiff(fileName); + new ActiveXObject('WScript.Shell').Run(fileName); + + messageIterator.MoveNext(); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693406(v=vs.85).aspx +(() => { + const server = getServer(); + const incomingArchive = server.Folders.IncomingArchive; + incomingArchive.Refresh(); + WScript.Echo(` +High quota water mark: ${incomingArchive.HighQuotaWaterMark} +Low quota water mark: ${incomingArchive.LowQuotaWaterMark} +Archive folder: ${incomingArchive.ArchiveFolder} +Age limit: ${incomingArchive.AgeLimit} +Size high: ${incomingArchive.SizeHigh} +Size low: ${incomingArchive.SizeLow} +Is size quota warning on? ${incomingArchive.SizeQuotaWarning} +Is archive used? ${incomingArchive.UseArchive} +`.trim()); + + incomingArchive.AgeLimit = 4; + incomingArchive.Save(); + + const messageID = VB.InputBox('Message ID to retrieve information? (Leave empty, or Cancel, to exit)'); + if (messageID === '') { return; } + const message = incomingArchive.GetMessage(messageID); + WScript.Echo(` +Caller ID: ${message.CallerId} +CSID: ${message.CSID} +Device name: ${message.DeviceName} +Message ID: ${message.Id} +Number of pages: ${message.Pages} +Retries: ${message.Retries} +Routing information: ${message.RoutingInformation} +Size: ${message.Size} +Transmission start: ${new Date(message.TransmissionStart)} +Transmission end: ${new Date(message.TransmissionEnd)} +TSID: ${message.TSID} +`.trim()); + + if (VB.InputBox('Delete this message from the archive (Y/N)?') === 'Y') { + message.Delete(); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693401(v=vs.85).aspx +(() => { + const server = getServer(); + const loggingOptions = server.LoggingOptions; + const activityLogging = loggingOptions.ActivityLogging; + const eventLogging = loggingOptions.EventLogging; + + activityLogging.Refresh(); + activityLogging.LogIncoming = true; + activityLogging.LogOutgoing = true; + activityLogging.Save(); + + eventLogging.Refresh(); + eventLogging.GeneralEventsLevel = FAXCOMEXLib.FAX_LOG_LEVEL_ENUM.fllMED; + eventLogging.InboundEventsLevel = FAXCOMEXLib.FAX_LOG_LEVEL_ENUM.fllMAX; + eventLogging.InitEventsLevel = FAXCOMEXLib.FAX_LOG_LEVEL_ENUM.fllMAX; + eventLogging.OutboundEventsLevel = FAXCOMEXLib.FAX_LOG_LEVEL_ENUM.fllNONE; + eventLogging.Save(); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693387(v=vs.85).aspx +(() => { + const server = getServer(); + const receiptOptions = server.ReceiptOptions; + receiptOptions.Refresh(); + WScript.Echo(` +Allowed receipt types: ${receiptOptions.AllowedReceipts} +Authentication types: ${receiptOptions.AuthenticationType} +SMTP port: ${receiptOptions.SMTPPort} +SMTP sender: ${receiptOptions.SMTPSender} +SMTP server: ${receiptOptions.SMTPSender} +Use for inbound routing? ${receiptOptions.UseForInboundRouting} +`.trim()); + + receiptOptions.AllowedReceipts = FAXCOMEXLib.FAX_RECEIPT_TYPE_ENUM.frtMAIL; + receiptOptions.AuthenticationType = FAXCOMEXLib.FAX_SMTP_AUTHENTICATION_TYPE_ENUM.fsatBASIC; + receiptOptions.SMTPPort = 25; + receiptOptions.SMTPSender = 'someone@example.com'; + receiptOptions.SMTPServer = 'My SMTP Server'; + receiptOptions.UseForInboundRouting = true; + receiptOptions.Save(); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693462(v=vs.85).aspx +(() => { + const server = getServer(); + collectionToArray(server.GetDeviceProviders()).forEach((provider, index) => { + WScript.Echo(` +Debug: ${provider.Debug} +Name: ${provider.FriendlyName} +Image name: ${provider.ImageName} +Init error code: ${provider.InitErrorCode} +Build and version: ${provider.MajorBuild}.${provider.MajorVersion}.${provider.MinorBuild}.${provider.MinorVersion} +Status: ${provider.Status} +TAPI provider: ${provider.TapiProviderName} +Unique name: ${provider.UniqueName} +`.trim()); + + new VBArray(provider.DeviceIds).toArray().forEach(id => WScript.Echo(id)); + }); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693437(v=vs.85).aspx -- for a fax device +(() => { + const server = getServer(); + const device = server.GetDevices().Item(1); + const deviceProperty = toSafeArray(1, 2, 3); + const propertyName = '{B1F944B9-9A16-45d1-933A-4060A4871AB0}'; + device.SetExtensionProperty(propertyName, deviceProperty); + new VBArray(device.GetExtensionProperty(propertyName)).toArray().forEach(x => WScript.Echo(x)); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693437(v=vs.85).aspx -- for a fax device +(() => { + const server = getServer(); + const serverProperty = toSafeArray(4, 2, 3); + const propertyName = `{AC7D0DEE-B6E5-4a44-AF45-835C58CB44D2}`; + server.SetExtensionProperty(propertyName, serverProperty); + new VBArray(server.GetExtensionProperty(propertyName)).toArray().forEach(x => WScript.Echo(x)); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms693013(v=vs.85).aspx +(() => { + const server = getServer(); + + ActiveXObject.on(server, 'OnOutgoingJobAdded', ['pFaxServer', 'bstrJobId'], prm => WScript.Echo('New job added to queue')); + + ActiveXObject.on(server, 'OnOutgoingJobChanged', ['pFaxServer', 'bstrJobId', 'pJobStatus'], prm => { + const status = prm.pJobStatus; + WScript.Echo(` +Available operations: ${status.AvailableOperations} +Caller ID: ${status.CallerId} +CSID: ${status.CSID} +Current page: ${status.CurrentPage} +Device ID: ${status.DeviceId} +Extended status: ${status.ExtendedStatus} +Extended status code: ${status.ExtendedStatusCode} +Job type: ${status.JobType} +Pages: ${status.Pages} +Retries: ${status.Retries} +Routing information: ${status.RoutingInformation} +Scheduled time: ${new Date(status.ScheduledTime)} +Size: ${status.Size} +Status: ${status.Status} +Transmission start: ${new Date(status.TransmissionStart)} +TSID: ${status.TSID} +`.trim()); + + try { + WScript.Echo(`Transmission end: ${new Date(status.TransmissionEnd)}`); + } catch {} + }); + + ActiveXObject.on(server, 'OnServerShutDown', ['pFaxServer'], prm => WScript.Echo('The local fax server has been shut down')); + + server.ListenToServerEvents( + FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetFXSSVC_ENDED + + FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetOUT_QUEUE + ); +})(); diff --git a/types/activex-faxcomexlib/index.d.ts b/types/activex-faxcomexlib/index.d.ts new file mode 100644 index 0000000000..237c841fda --- /dev/null +++ b/types/activex-faxcomexlib/index.d.ts @@ -0,0 +1,2053 @@ +// Type definitions for Microsoft Fax Service Extended COM Type Library - FAXCOMEXLib 1.0 +// Project: https://msdn.microsoft.com/en-us/library/windows/desktop/ms684513(v=vs.85).aspx +// Definitions by: Zev Spitz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/// + +declare namespace FAXCOMEXLib { + // tslint:disable-next-line no-const-enum + const enum FAX_ACCESS_RIGHTS_ENUM { + farMANAGE_CONFIG = 64, + farMANAGE_IN_ARCHIVE = 256, + farMANAGE_JOBS = 16, + farMANAGE_OUT_ARCHIVE = 1024, + farQUERY_CONFIG = 32, + farQUERY_IN_ARCHIVE = 128, + farQUERY_JOBS = 8, + farQUERY_OUT_ARCHIVE = 512, + farSUBMIT_HIGH = 4, + farSUBMIT_LOW = 1, + farSUBMIT_NORMAL = 2, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_ACCESS_RIGHTS_ENUM_2 { + far2MANAGE_ARCHIVES = 256, + far2MANAGE_CONFIG = 64, + far2MANAGE_OUT_JOBS = 16, + far2MANAGE_RECEIVE_FOLDER = 512, + far2QUERY_ARCHIVES = 128, + far2QUERY_CONFIG = 32, + far2QUERY_OUT_JOBS = 8, + far2SUBMIT_HIGH = 4, + far2SUBMIT_LOW = 1, + far2SUBMIT_NORMAL = 2, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_ACCOUNT_EVENTS_TYPE_ENUM { + faetFXSSVC_ENDED = 16, + faetIN_ARCHIVE = 4, + faetIN_QUEUE = 1, + faetNONE = 0, + faetOUT_ARCHIVE = 8, + faetOUT_QUEUE = 2, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_COVERPAGE_TYPE_ENUM { + fcptLOCAL = 1, + fcptNONE = 0, + fcptSERVER = 2, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_DEVICE_RECEIVE_MODE_ENUM { + fdrmAUTO_ANSWER = 1, + fdrmMANUAL_ANSWER = 2, + fdrmNO_ANSWER = 0, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_GROUP_STATUS_ENUM { + fgsALL_DEV_NOT_VALID = 2, + fgsALL_DEV_VALID = 0, + fgsEMPTY = 1, + fgsSOME_DEV_NOT_VALID = 3, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_JOB_EXTENDED_STATUS_ENUM { + fjesANSWERED = 5, + fjesBAD_ADDRESS = 10, + fjesBUSY = 8, + fjesCALL_ABORTED = 19, + fjesCALL_BLACKLISTED = 14, + fjesCALL_COMPLETED = 18, + fjesCALL_DELAYED = 13, + fjesDIALING = 3, + fjesDISCONNECTED = 1, + fjesFATAL_ERROR = 12, + fjesHANDLED = 17, + fjesINITIALIZING = 2, + fjesLINE_UNAVAILABLE = 7, + fjesNO_ANSWER = 9, + fjesNO_DIAL_TONE = 11, + fjesNONE = 0, + fjesNOT_FAX_CALL = 15, + fjesPARTIALLY_RECEIVED = 16, + fjesPROPRIETARY = 16777216, + fjesRECEIVING = 6, + fjesTRANSMITTING = 4, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_JOB_OPERATIONS_ENUM { + fjoDELETE = 16, + fjoPAUSE = 2, + fjoRECIPIENT_INFO = 32, + fjoRESTART = 8, + fjoRESUME = 4, + fjoSENDER_INFO = 64, + fjoVIEW = 1, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_JOB_STATUS_ENUM { + fjsCANCELED = 512, + fjsCANCELING = 1024, + fjsCOMPLETED = 256, + fjsFAILED = 8, + fjsINPROGRESS = 2, + fjsNOLINE = 32, + fjsPAUSED = 16, + fjsPENDING = 1, + fjsRETRIES_EXCEEDED = 128, + fjsRETRYING = 64, + fjsROUTING = 2048, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_JOB_TYPE_ENUM { + fjtRECEIVE = 1, + fjtROUTING = 2, + fjtSEND = 0, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_LOG_LEVEL_ENUM { + fllMAX = 3, + fllMED = 2, + fllMIN = 1, + fllNONE = 0, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_PRIORITY_TYPE_ENUM { + fptHIGH = 2, + fptLOW = 0, + fptNORMAL = 1, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_PROVIDER_STATUS_ENUM { + fpsBAD_GUID = 2, + fpsBAD_VERSION = 3, + fpsCANT_INIT = 6, + fpsCANT_LINK = 5, + fpsCANT_LOAD = 4, + fpsSERVER_ERROR = 1, + fpsSUCCESS = 0, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_RECEIPT_TYPE_ENUM { + frtMAIL = 1, + frtMSGBOX = 4, + frtNONE = 0, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_ROUTING_RULE_CODE_ENUM { + frrcANY_CODE = 0, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_RULE_STATUS_ENUM { + frsALL_GROUP_DEV_NOT_VALID = 2, + frsBAD_DEVICE = 4, + frsEMPTY_GROUP = 1, + frsSOME_GROUP_DEV_NOT_VALID = 3, + frsVALID = 0, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_SCHEDULE_TYPE_ENUM { + fstDISCOUNT_PERIOD = 2, + fstNOW = 0, + fstSPECIFIC_TIME = 1, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_SERVER_APIVERSION_ENUM { + fsAPI_VERSION_0 = 0, + fsAPI_VERSION_1 = 65536, + fsAPI_VERSION_2 = 131072, + fsAPI_VERSION_3 = 196608, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_SERVER_EVENTS_TYPE_ENUM { + fsetACTIVITY = 8, + fsetCONFIG = 4, + fsetDEVICE_STATUS = 256, + fsetFXSSVC_ENDED = 128, + fsetIN_ARCHIVE = 32, + fsetIN_QUEUE = 1, + fsetINCOMING_CALL = 512, + fsetNONE = 0, + fsetOUT_ARCHIVE = 64, + fsetOUT_QUEUE = 2, + fsetQUEUE_STATE = 16, + } + + // tslint:disable-next-line no-const-enum + const enum FAX_SMTP_AUTHENTICATION_TYPE_ENUM { + fsatANONYMOUS = 0, + fsatBASIC = 1, + fsatNTLM = 2, + } + + // tslint:disable-next-line no-const-enum + const enum FaxConstants { + bstrGROUPNAME_ALLDEVICES = '', + lDEFAULT_PREFETCH_SIZE = 100, + wcharREASSIGN_RECIPIENTS_DELIMITER = 59, + } + + /** FaxAccount Class */ + class FaxAccount { + private 'FAXCOMEXLib.FaxAccount_typekey': FaxAccount; + private constructor(); + + /** Name of the fax account */ + readonly AccountName: string; + + /** Folders belonging to the account */ + readonly Folders: FaxAccountFolders; + + /** Set bit-wise combination of events the fax account listens to */ + ListenToAccountEvents(EventTypes: FAX_ACCOUNT_EVENTS_TYPE_ENUM): void; + + /** Events the fax account is listening to */ + readonly RegisteredEvents: FAX_ACCOUNT_EVENTS_TYPE_ENUM; + } + + /** FaxAccountFolders Class */ + class FaxAccountFolders { + private 'FAXCOMEXLib.FaxAccountFolders_typekey': FaxAccountFolders; + private constructor(); + + /** Incoming archive */ + readonly IncomingArchive: FaxAccountIncomingArchive; + + /** Incoming queue */ + readonly IncomingQueue: FaxAccountIncomingQueue; + + /** Outgoing archive */ + readonly OutgoingArchive: FaxAccountOutgoingArchive; + + /** Outgoing queue */ + readonly OutgoingQueue: FaxAccountOutgoingQueue; + } + + /** FaxAccountIncomingArchive Class */ + class FaxAccountIncomingArchive { + private 'FAXCOMEXLib.FaxAccountIncomingArchive_typekey': FaxAccountIncomingArchive; + private constructor(); + + /** Get an archived message by its ID */ + GetMessage(bstrMessageId: string): IFaxIncomingMessage; + + /** + * Iterator on the archived messages + * @param number [lPrefetchSize=100] + */ + GetMessages(lPrefetchSize?: number): FaxIncomingMessageIterator; + + /** Refresh the object */ + Refresh(): void; + + /** The high 32-bit value of the archive size */ + readonly SizeHigh: number; + + /** The low 32-bit value of the archive size */ + readonly SizeLow: number; + } + + /** FaxAccountIncomingQueue Class */ + class FaxAccountIncomingQueue { + private 'FAXCOMEXLib.FaxAccountIncomingQueue_typekey': FaxAccountIncomingQueue; + private constructor(); + + /** Get incoming job by ID */ + GetJob(bstrJobId: string): FaxIncomingJob; + + /** Collection of incoming jobs */ + GetJobs(): FaxIncomingJobs; + } + + /** FaxAccountOutgoingArchive Class */ + class FaxAccountOutgoingArchive { + private 'FAXCOMEXLib.FaxAccountOutgoingArchive_typekey': FaxAccountOutgoingArchive; + private constructor(); + + /** Get an archived message by its ID */ + GetMessage(bstrMessageId: string): IFaxOutgoingMessage; + + /** + * Iterator on the archived messages + * @param number [lPrefetchSize=100] + */ + GetMessages(lPrefetchSize?: number): FaxOutgoingMessageIterator; + + /** Refresh the object */ + Refresh(): void; + + /** The high 32-bit value of the archive size */ + readonly SizeHigh: number; + + /** The low 32-bit value of the archive size */ + readonly SizeLow: number; + } + + /** FaxAccountOutgoingQueue Class */ + class FaxAccountOutgoingQueue { + private 'FAXCOMEXLib.FaxAccountOutgoingQueue_typekey': FaxAccountOutgoingQueue; + private constructor(); + + /** Get outgoing job by ID */ + GetJob(bstrJobId: string): IFaxOutgoingJob; + + /** Collection of outgoing jobs */ + GetJobs(): FaxOutgoingJobs; + } + + /** FaxAccounts Class */ + class FaxAccounts { + private 'FAXCOMEXLib.FaxAccounts_typekey': FaxAccounts; + private constructor(); + readonly Count: number; + Item(vIndex: any): FaxAccount; + } + + /** FaxAccountSet Class */ + class FaxAccountSet { + private 'FAXCOMEXLib.FaxAccountSet_typekey': FaxAccountSet; + private constructor(); + + /** Adds a fax account */ + AddAccount(bstrAccountName: string): FaxAccount; + + /** Get fax account by name */ + GetAccount(bstrAccountName: string): FaxAccount; + + /** Collection of fax accounts */ + GetAccounts(): FaxAccounts; + + /** Removes a fax account by name */ + RemoveAccount(bstrAccountName: string): void; + } + + /** FaxActivity Class */ + class FaxActivity { + private 'FAXCOMEXLib.FaxActivity_typekey': FaxActivity; + private constructor(); + + /** Number of incoming messages */ + readonly IncomingMessages: number; + + /** Number of outgoing messages */ + readonly OutgoingMessages: number; + + /** Number of queued messages */ + readonly QueuedMessages: number; + + /** Refresh the object */ + Refresh(): void; + + /** Number of routed incoming messages */ + readonly RoutingMessages: number; + } + + /** FaxActivityLogging Class */ + class FaxActivityLogging { + private 'FAXCOMEXLib.FaxActivityLogging_typekey': FaxActivityLogging; + private constructor(); + + /** Activity log database files path */ + DatabasePath: string; + + /** Does the server log incoming fax activity */ + LogIncoming: boolean; + + /** Does the server log outgoing fax activity */ + LogOutgoing: boolean; + + /** Refresh the object */ + Refresh(): void; + + /** Save the object */ + Save(): void; + } + + /** FaxConfiguration Class */ + class FaxConfiguration { + private 'FAXCOMEXLib.FaxConfiguration_typekey': FaxConfiguration; + private constructor(); + + /** Are personal cover pages allowed */ + AllowPersonalCoverPages: boolean; + + /** Indicates how long the fax message is kept on the server */ + ArchiveAgeLimit: number; + + /** Location of the archive on the server */ + ArchiveLocation: string; + + /** The high 32-bit value of the archive size */ + readonly ArchiveSizeHigh: number; + + /** The low 32-bit value of the archive size */ + readonly ArchiveSizeLow: number; + + /** Does the server auto-create fax account on connect */ + AutoCreateAccountOnConnect: boolean; + + /** Does the server generate a brand */ + Branding: boolean; + + /** End of the discount rate period */ + DiscountRateEnd: VarDate; + + /** Start of the discount rate period */ + DiscountRateStart: VarDate; + + /** High quota water mark */ + HighQuotaWaterMark: number; + + /** Are incoming faxes viewable by everyone */ + IncomingFaxesArePublic: boolean; + + /** Is queue blocked for incoming faxes */ + IncomingQueueBlocked: boolean; + + /** Low quota water mark */ + LowQuotaWaterMark: number; + + /** How long the failed fax job is kept on the server */ + OutgoingQueueAgeLimit: number; + + /** Is queue blocked for outgoing faxes */ + OutgoingQueueBlocked: boolean; + + /** Is queue paused for outgoing faxes */ + OutgoingQueuePaused: boolean; + + /** Refresh the object */ + Refresh(): void; + + /** Number of retries */ + Retries: number; + + /** Retry delay */ + RetryDelay: number; + + /** Save the object */ + Save(): void; + + /** Is size quota warning on */ + SizeQuotaWarning: boolean; + + /** Whether faxes should be archived */ + UseArchive: boolean; + + /** Is device Transmitting Station ID used */ + UseDeviceTSID: boolean; + } + + /** FaxDevice Class */ + class FaxDevice { + private 'FAXCOMEXLib.FaxDevice_typekey': FaxDevice; + private constructor(); + + /** Answer the call */ + AnswerCall(): void; + + /** Device's Called Station ID */ + CSID: string; + + /** Description of the device */ + Description: string; + + /** Device name */ + readonly DeviceName: string; + + /** Get the device level extention property */ + GetExtensionProperty(bstrGUID: string): SafeArray; + + /** Unique device ID */ + readonly Id: number; + + /** Is the device is turned off */ + readonly PoweredOff: boolean; + + /** Device provider */ + readonly ProviderUniqueName: string; + + /** The receive mode of the device */ + ReceiveMode: FAX_DEVICE_RECEIVE_MODE_ENUM; + + /** Is the device receiving now */ + readonly ReceivingNow: boolean; + + /** Refresh the object */ + Refresh(): void; + + /** Is the device ringing now */ + readonly RingingNow: boolean; + + /** Number of rings before the device answers */ + RingsBeforeAnswer: number; + + /** Save the object */ + Save(): void; + + /** Is the device is enabled to send */ + SendEnabled: boolean; + + /** Is the device sending now */ + readonly SendingNow: boolean; + + /** Set the device level extention property */ + SetExtensionProperty(bstrGUID: string, vProperty: SafeArray): void; + + /** Device's Transmitting Station ID */ + TSID: string; + + /** Array of routing methods GUIDs */ + readonly UsedRoutingMethods: SafeArray; + + /** Adds or removes routing method */ + UseRoutingMethod(bstrMethodGUID: string, bUse: boolean): void; + } + + /** FaxDeviceIds Class */ + class FaxDeviceIds { + private 'FAXCOMEXLib.FaxDeviceIds_typekey': FaxDeviceIds; + private constructor(); + + /** Add a device */ + Add(lDeviceId: number): void; + readonly Count: number; + Item(lIndex: number): number; + + /** Remove a device */ + Remove(lIndex: number): void; + + /** Set order of the device */ + SetOrder(lDeviceId: number, lNewOrder: number): void; + } + + /** FaxDeviceProvider Class */ + class FaxDeviceProvider { + private 'FAXCOMEXLib.FaxDeviceProvider_typekey': FaxDeviceProvider; + private constructor(); + + /** Is device provider built in debug environment */ + readonly Debug: boolean; + + /** Array of device IDs exposed by the provider */ + readonly DeviceIds: SafeArray; + + /** Provider's friendly name */ + readonly FriendlyName: string; + + /** Full path and file name of the provider DLL */ + readonly ImageName: string; + + /** Last error code at load or initialization */ + readonly InitErrorCode: number; + + /** The major part of the device provider's build number */ + readonly MajorBuild: number; + + /** The major part of the device provider's version number */ + readonly MajorVersion: number; + + /** The minor part of the device provider's build number */ + readonly MinorBuild: number; + + /** The minor part of the device provider's version number */ + readonly MinorVersion: number; + + /** Status of the device provider */ + readonly Status: FAX_PROVIDER_STATUS_ENUM; + + /** TSP name used by the provider */ + readonly TapiProviderName: string; + + /** Unique name of the provider */ + readonly UniqueName: string; + } + + /** FaxDeviceProviders Class */ + class FaxDeviceProviders { + private 'FAXCOMEXLib.FaxDeviceProviders_typekey': FaxDeviceProviders; + private constructor(); + readonly Count: number; + Item(vIndex: any): FaxDeviceProvider; + } + + /** FaxDevices Class */ + class FaxDevices { + private 'FAXCOMEXLib.FaxDevices_typekey': FaxDevices; + private constructor(); + readonly Count: number; + Item(vIndex: any): FaxDevice; + + /** Get device by its ID */ + ItemById(lId: number): FaxDevice; + } + + /** FaxDocument Class */ + class FaxDocument { + private 'FAXCOMEXLib.FaxDocument_typekey': FaxDocument; + private constructor(); + + /** Whether to attach a fax to the receipt */ + AttachFaxToReceipt: boolean; + + /** Full paths to the fax document body files */ + Bodies: any; + + /** Full path to the fax document body file */ + Body: string; + + /** Call handle */ + CallHandle: number; + + /** Submit the fax document on the already connected server */ + ConnectedSubmit(pFaxServer: IFaxServer): any; + + /** Submit the fax document on the already connected server */ + ConnectedSubmit2(pFaxServer: IFaxServer, pvFaxOutgoingJobIDs: any): number; + + /** Cover page file path */ + CoverPage: string; + + /** Is server, local, or no cover page used */ + CoverPageType: FAX_COVERPAGE_TYPE_ENUM; + + /** The document name */ + DocumentName: string; + + /** Whether to group the broadcast receipts */ + GroupBroadcastReceipts: boolean; + + /** Contents of cover page note field */ + Note: string; + + /** Priority of the fax */ + Priority: FAX_PRIORITY_TYPE_ENUM; + + /** Address of the receipt */ + ReceiptAddress: string; + + /** Type of the receipt */ + ReceiptType: FAX_RECEIPT_TYPE_ENUM; + + /** Collection of recipients */ + readonly Recipients: FaxRecipients; + + /** Time to send the fax */ + ScheduleTime: VarDate; + + /** When to send the fax */ + ScheduleType: FAX_SCHEDULE_TYPE_ENUM; + + /** Sender information object */ + readonly Sender: FaxSender; + + /** Contents of cover page subject field */ + Subject: string; + + /** Submission Id for the Fax document */ + readonly SubmissionId: string; + + /** Connect to server, submit the fax document, disconnect */ + Submit(bstrFaxServerName: string): SafeArray; + + /** Connect to server, submit the fax document, disconnect */ + Submit2(bstrFaxServerName: string, pvFaxOutgoingJobIDs: any): number; + + /** Tapi connection */ + TapiConnection: any; + } + + /** FaxEventLogging Class */ + class FaxEventLogging { + private 'FAXCOMEXLib.FaxEventLogging_typekey': FaxEventLogging; + private constructor(); + + /** Detail level of event logs for general (other) events */ + GeneralEventsLevel: FAX_LOG_LEVEL_ENUM; + + /** Detail level of event logs for inbound fax events */ + InboundEventsLevel: FAX_LOG_LEVEL_ENUM; + + /** Detail level of event logs for initialization events */ + InitEventsLevel: FAX_LOG_LEVEL_ENUM; + + /** Detail level of event logs for outbound fax events */ + OutboundEventsLevel: FAX_LOG_LEVEL_ENUM; + + /** Refresh the object */ + Refresh(): void; + + /** Save the object */ + Save(): void; + } + + /** FaxFolders Class */ + class FaxFolders { + private 'FAXCOMEXLib.FaxFolders_typekey': FaxFolders; + private constructor(); + + /** Incoming archive */ + readonly IncomingArchive: FaxIncomingArchive; + + /** Incoming queue */ + readonly IncomingQueue: FaxIncomingQueue; + + /** Outgoing archive */ + readonly OutgoingArchive: FaxOutgoingArchive; + + /** Outgoing queue */ + readonly OutgoingQueue: FaxOutgoingQueue; + } + + /** FaxInboundRouting Class */ + class FaxInboundRouting { + private 'FAXCOMEXLib.FaxInboundRouting_typekey': FaxInboundRouting; + private constructor(); + + /** Registered inbound routing extensions collection */ + GetExtensions(): FaxInboundRoutingExtensions; + + /** Ordered collection of all the registered methods */ + GetMethods(): FaxInboundRoutingMethods; + } + + /** FaxInboundRoutingExtension Class */ + class FaxInboundRoutingExtension { + private 'FAXCOMEXLib.FaxInboundRoutingExtension_typekey': FaxInboundRoutingExtension; + private constructor(); + + /** Is extension built in debug environment */ + readonly Debug: boolean; + + /** Extension's friendly name */ + readonly FriendlyName: string; + + /** Full path and file name of the extension DLL */ + readonly ImageName: string; + + /** Last error code at load or initialization */ + readonly InitErrorCode: number; + + /** The major part of extension's build number */ + readonly MajorBuild: number; + + /** The major part of extension's version number */ + readonly MajorVersion: number; + + /** Array of methods exposed by extension */ + readonly Methods: any; + + /** The minor part of extension's build number */ + readonly MinorBuild: number; + + /** The minor part of extension's version number */ + readonly MinorVersion: number; + + /** Load and initialization status of the extension */ + readonly Status: FAX_PROVIDER_STATUS_ENUM; + + /** Extension's unique name */ + readonly UniqueName: string; + } + + /** FaxInboundRoutingExtensions Class */ + class FaxInboundRoutingExtensions { + private 'FAXCOMEXLib.FaxInboundRoutingExtensions_typekey': FaxInboundRoutingExtensions; + private constructor(); + readonly Count: number; + Item(vIndex: any): FaxInboundRoutingExtension; + } + + /** FaxInboundRoutingMethod Class */ + class FaxInboundRoutingMethod { + private 'FAXCOMEXLib.FaxInboundRoutingMethod_typekey': FaxInboundRoutingMethod; + private constructor(); + + /** Friendly name of the extension exposing this method */ + readonly ExtensionFriendlyName: string; + + /** Image name of the extension exposing this method */ + readonly ExtensionImageName: string; + + /** Internal function name */ + readonly FunctionName: string; + + /** GUID of the method */ + readonly GUID: string; + + /** The name of the method */ + readonly Name: string; + + /** Priority of the method */ + Priority: number; + + /** Refresh the object */ + Refresh(): void; + + /** Save the object */ + Save(): void; + } + + /** FaxInboundRoutingMethods Class */ + class FaxInboundRoutingMethods { + private 'FAXCOMEXLib.FaxInboundRoutingMethods_typekey': FaxInboundRoutingMethods; + private constructor(); + readonly Count: number; + Item(vIndex: any): FaxInboundRoutingMethod; + } + + /** FaxIncomingArchive Class */ + class FaxIncomingArchive { + private 'FAXCOMEXLib.FaxIncomingArchive_typekey': FaxIncomingArchive; + private constructor(); + + /** How long the fax message is kept on the Server */ + AgeLimit: number; + + /** Location of the archive folder on the server */ + ArchiveFolder: string; + + /** Get archived message by its ID */ + GetMessage(bstrMessageId: string): IFaxIncomingMessage; + + /** + * Iterator on the archived messages + * @param number [lPrefetchSize=100] + */ + GetMessages(lPrefetchSize?: number): FaxIncomingMessageIterator; + + /** High quota water mark */ + HighQuotaWaterMark: number; + + /** Low quota water mark */ + LowQuotaWaterMark: number; + + /** Refresh the object */ + Refresh(): void; + + /** Save the object */ + Save(): void; + + /** The high 32-bit value of the archive size */ + readonly SizeHigh: number; + + /** The low 32-bit value of the archive size */ + readonly SizeLow: number; + + /** Is size quota warning on */ + SizeQuotaWarning: boolean; + + /** Whether received faxes should be archived */ + UseArchive: boolean; + } + + /** FaxIncomingJob Class */ + class FaxIncomingJob { + private 'FAXCOMEXLib.FaxIncomingJob_typekey': FaxIncomingJob; + private constructor(); + + /** Available operations, a bit-wise combination of FAX_JOB_OPERATIONS values */ + readonly AvailableOperations: FAX_JOB_OPERATIONS_ENUM; + + /** Caller ID */ + readonly CallerId: string; + + /** Cancel the incoming job */ + Cancel(): void; + + /** Copy TIFF image to the local file */ + CopyTiff(bstrTiffPath: string): void; + + /** Called Station ID */ + readonly CSID: string; + + /** Page currently in transmision */ + readonly CurrentPage: number; + + /** Device ID that transmits the job */ + readonly DeviceId: number; + + /** Extended status description */ + readonly ExtendedStatus: string; + + /** Code of the job's extended status */ + readonly ExtendedStatusCode: FAX_JOB_EXTENDED_STATUS_ENUM; + + /** Unique message ID */ + readonly Id: string; + + /** Job type */ + readonly JobType: FAX_JOB_TYPE_ENUM; + + /** Refresh the object */ + Refresh(): void; + + /** Number of failed transmission retries */ + readonly Retries: number; + + /** Routing information */ + readonly RoutingInformation: string; + + /** Size in bytes of the message's TIFF file */ + readonly Size: number; + + /** Current queue status of the job, a bit-wise combination of FAX_JOB_STATUS values */ + readonly Status: FAX_JOB_STATUS_ENUM; + + /** Transmission end time */ + readonly TransmissionEnd: VarDate; + + /** Transmission start time */ + readonly TransmissionStart: VarDate; + + /** Transmitting Station ID */ + readonly TSID: string; + } + + /** FaxIncomingJobs Class */ + class FaxIncomingJobs { + private 'FAXCOMEXLib.FaxIncomingJobs_typekey': FaxIncomingJobs; + private constructor(); + readonly Count: number; + Item(vIndex: any): FaxIncomingJob; + } + + /** FaxIncomingMessage Class */ + class FaxIncomingMessage extends IFaxIncomingMessage { + private 'FAXCOMEXLib.FaxIncomingMessage_typekey': FaxIncomingMessage; + private constructor(); + + /** Has Cover page */ + HasCoverPage: boolean; + + /** Read flag on the message */ + Read: boolean; + + /** Reassigns the message */ + ReAssign(): void; + + /** Set of recipient names */ + Recipients: string; + + /** Refresh the object */ + Refresh(): void; + + /** Save the object */ + Save(): void; + + /** Sender's fax number */ + SenderFaxNumber: string; + + /** Sender's name */ + SenderName: string; + + /** Contents of cover page subject field */ + Subject: string; + + /** Is message reassigned? */ + readonly WasReAssigned: boolean; + } + + /** FaxIncomingMessageIterator Class */ + class FaxIncomingMessageIterator { + private 'FAXCOMEXLib.FaxIncomingMessageIterator_typekey': FaxIncomingMessageIterator; + private constructor(); + + /** End of archive marker */ + readonly AtEOF: boolean; + + /** The current message */ + readonly Message: IFaxIncomingMessage; + + /** Move to the first message in the archive */ + MoveFirst(): void; + + /** Move to the next message in the archive */ + MoveNext(): void; + + /** Size of the prefetch buffer */ + PrefetchSize: number; + } + + /** FaxIncomingQueue Class */ + class FaxIncomingQueue { + private 'FAXCOMEXLib.FaxIncomingQueue_typekey': FaxIncomingQueue; + private constructor(); + + /** Is queue blocked */ + Blocked: boolean; + + /** Get incoming job by ID */ + GetJob(bstrJobId: string): FaxIncomingJob; + + /** Collection of incoming jobs */ + GetJobs(): FaxIncomingJobs; + + /** Refresh the object */ + Refresh(): void; + + /** Save the object */ + Save(): void; + } + + /** FaxJobStatus Class */ + class FaxJobStatus { + private 'FAXCOMEXLib.FaxJobStatus_typekey': FaxJobStatus; + private constructor(); + + /** Available operations, a bit-wise combination of FAX_JOB_OPERATIONS values */ + readonly AvailableOperations: FAX_JOB_OPERATIONS_ENUM; + + /** Caller ID */ + readonly CallerId: string; + + /** Called Station ID */ + readonly CSID: string; + + /** Page currently in transmision */ + readonly CurrentPage: number; + + /** Device ID of device that transmits the job */ + readonly DeviceId: number; + + /** Extended status description */ + readonly ExtendedStatus: string; + + /** Code of the job's extended status */ + readonly ExtendedStatusCode: FAX_JOB_EXTENDED_STATUS_ENUM; + + /** Job type */ + readonly JobType: FAX_JOB_TYPE_ENUM; + + /** Total number of pages */ + readonly Pages: number; + + /** Number of failed transmission retries */ + readonly Retries: number; + + /** Routing information */ + readonly RoutingInformation: string; + + /** The time the fax job is scheduled to be transmitted */ + readonly ScheduledTime: VarDate; + + /** Size in bytes of TIFF file */ + readonly Size: number; + + /** Current queue status of the job, a bit-wise combination of FAX_JOB_STATUS values */ + readonly Status: FAX_JOB_STATUS_ENUM; + + /** The time the fax job finished its transmission */ + readonly TransmissionEnd: VarDate; + + /** The time the fax job started its transmission */ + readonly TransmissionStart: VarDate; + + /** Transmitting Station ID */ + readonly TSID: string; + } + + /** FaxLoggingOptions Class */ + class FaxLoggingOptions { + private 'FAXCOMEXLib.FaxLoggingOptions_typekey': FaxLoggingOptions; + private constructor(); + + /** Activity logging configuration object */ + readonly ActivityLogging: FaxActivityLogging; + + /** Event logging configuration object */ + readonly EventLogging: FaxEventLogging; + } + + /** FaxOutboundRouting Class */ + class FaxOutboundRouting { + private 'FAXCOMEXLib.FaxOutboundRouting_typekey': FaxOutboundRouting; + private constructor(); + + /** Configuration of the outbound routing groups */ + GetGroups(): FaxOutboundRoutingGroups; + + /** Configuration of the outbound routing rules */ + GetRules(): FaxOutboundRoutingRules; + } + + /** FaxOutboundRoutingGroup Class */ + class FaxOutboundRoutingGroup { + private 'FAXCOMEXLib.FaxOutboundRoutingGroup_typekey': FaxOutboundRoutingGroup; + private constructor(); + + /** Ordered collection of device IDs */ + readonly DeviceIds: FaxDeviceIds; + + /** Name of the group */ + readonly Name: string; + + /** Status of the group */ + readonly Status: FAX_GROUP_STATUS_ENUM; + } + + /** FaxOutboundRoutingGroups Class */ + class FaxOutboundRoutingGroups { + private 'FAXCOMEXLib.FaxOutboundRoutingGroups_typekey': FaxOutboundRoutingGroups; + private constructor(); + + /** Add a group */ + Add(bstrName: string): FaxOutboundRoutingGroup; + readonly Count: number; + Item(vIndex: number | string): FaxOutboundRoutingGroup; + + /** Remove a group */ + Remove(vIndex: number | string): void; + } + + /** FaxOutboundRoutingRule Class */ + class FaxOutboundRoutingRule { + private 'FAXCOMEXLib.FaxOutboundRoutingRule_typekey': FaxOutboundRoutingRule; + private constructor(); + + /** Area code */ + readonly AreaCode: number; + + /** Country code */ + readonly CountryCode: number; + + /** Destination device */ + DeviceId: number; + + /** Group name */ + GroupName: string; + + /** Refresh the object */ + Refresh(): void; + + /** Save the object */ + Save(): void; + + /** Status */ + readonly Status: FAX_RULE_STATUS_ENUM; + + /** Uses single device or group */ + UseDevice: boolean; + } + + /** FaxOutboundRoutingRules Class */ + class FaxOutboundRoutingRules { + private 'FAXCOMEXLib.FaxOutboundRoutingRules_typekey': FaxOutboundRoutingRules; + private constructor(); + + /** Add a rule */ + Add(lCountryCode: number, lAreaCode: number, bUseDevice: boolean, bstrGroupName: string, lDeviceId: number): FaxOutboundRoutingRule; + readonly Count: number; + Item(lIndex: number): FaxOutboundRoutingRule; + + /** Get a rule by criteria */ + ItemByCountryAndArea(lCountryCode: number, lAreaCode: number): FaxOutboundRoutingRule; + + /** Remove a rule */ + Remove(lIndex: number): void; + + /** Remove a rule by criteria */ + RemoveByCountryAndArea(lCountryCode: number, lAreaCode: number): void; + } + + /** FaxOutgoingArchive Class */ + class FaxOutgoingArchive { + private 'FAXCOMEXLib.FaxOutgoingArchive_typekey': FaxOutgoingArchive; + private constructor(); + + /** Indicates how long the fax message is kept on the server */ + AgeLimit: number; + + /** Location of the outgoing archive on the server */ + ArchiveFolder: string; + + /** Get an archived message by its ID */ + GetMessage(bstrMessageId: string): IFaxOutgoingMessage; + + /** + * Iterator on the archived messages + * @param number [lPrefetchSize=100] + */ + GetMessages(lPrefetchSize?: number): FaxOutgoingMessageIterator; + + /** High quota water mark */ + HighQuotaWaterMark: number; + + /** Low quota water mark */ + LowQuotaWaterMark: number; + + /** Refresh the object */ + Refresh(): void; + + /** Save the object */ + Save(): void; + + /** The high 32-bit value of the archive size */ + readonly SizeHigh: number; + + /** The low 32-bit value of the archive size */ + readonly SizeLow: number; + + /** Is the size quota warning on or off */ + SizeQuotaWarning: boolean; + + /** Whether sent faxes should be archived */ + UseArchive: boolean; + } + + /** FaxOutgoingJob Class */ + class FaxOutgoingJob { + private 'FAXCOMEXLib.FaxOutgoingJob_typekey': FaxOutgoingJob; + private constructor(); + + /** Available operations, a bit-wise combination of FAX_JOB_OPERATIONS values */ + readonly AvailableOperations: FAX_JOB_OPERATIONS_ENUM; + + /** Cancel the outbound job */ + Cancel(): void; + + /** Copy the job's TIFF image */ + CopyTiff(bstrTiffPath: string): void; + + /** Called Station ID */ + readonly CSID: string; + + /** Page currently in transmision */ + readonly CurrentPage: number; + + /** Device ID that transmits the job */ + readonly DeviceId: number; + + /** Document's friendly name */ + readonly DocumentName: string; + + /** Extended status description */ + readonly ExtendedStatus: string; + + /** Code of the job's extended status */ + readonly ExtendedStatusCode: FAX_JOB_EXTENDED_STATUS_ENUM; + + /** Whether to group broadcast receipts */ + readonly GroupBroadcastReceipts: boolean; + + /** Has Cover page */ + readonly HasCoverPage: boolean; + + /** Unique job ID */ + readonly Id: string; + + /** Time the job was originally scheduled to be transmitted */ + readonly OriginalScheduledTime: VarDate; + + /** Total number of pages */ + readonly Pages: number; + + /** Pause the outbound job */ + Pause(): void; + + /** Priority of the fax */ + readonly Priority: FAX_PRIORITY_TYPE_ENUM; + + /** Address of the receipt */ + readonly ReceiptAddress: string; + + /** Type of receipt */ + readonly ReceiptType: FAX_RECEIPT_TYPE_ENUM; + + /** Recipient information object */ + readonly Recipient: FaxRecipient; + + /** Refresh the object */ + Refresh(): void; + + /** Restart the outbound job */ + Restart(): void; + + /** Resume the outbound job */ + Resume(): void; + + /** Number of failed transmission retries */ + readonly Retries: number; + + /** The time the fax job is scheduled to be transmitted */ + readonly ScheduledTime: VarDate; + + /** When to send the fax */ + readonly ScheduleType: FAX_SCHEDULE_TYPE_ENUM; + + /** Sender information object */ + readonly Sender: FaxSender; + + /** Size in bytes of TIFF file */ + readonly Size: number; + + /** Current queue status of the job */ + readonly Status: FAX_JOB_STATUS_ENUM; + + /** Cover page's subject field */ + readonly Subject: string; + + /** Unique ID the submission process created for the Job */ + readonly SubmissionId: string; + + /** Time the job was submitted */ + readonly SubmissionTime: VarDate; + + /** The time the fax job finished its transmission */ + readonly TransmissionEnd: VarDate; + + /** The time the fax job started its transmission */ + readonly TransmissionStart: VarDate; + + /** Transmitting Station ID */ + readonly TSID: string; + } + + /** FaxOutgoingJobs Class */ + class FaxOutgoingJobs { + private 'FAXCOMEXLib.FaxOutgoingJobs_typekey': FaxOutgoingJobs; + private constructor(); + readonly Count: number; + Item(vIndex: any): IFaxOutgoingJob; + } + + /** FaxOutgoingMessage Class */ + class FaxOutgoingMessage extends IFaxOutgoingMessage { + private 'FAXCOMEXLib.FaxOutgoingMessage_typekey': FaxOutgoingMessage; + private constructor(); + + /** Copy Tiff image to the local file */ + CopyTiff(bstrTiffPath: string): void; + + /** Has Cover page */ + readonly HasCoverPage: boolean; + + /** Read flag on the message */ + Read: boolean; + + /** Address of the receipt */ + readonly ReceiptAddress: string; + + /** Type of the receipt */ + readonly ReceiptType: FAX_RECEIPT_TYPE_ENUM; + + /** Refresh the object */ + Refresh(): void; + + /** Save the object */ + Save(): void; + } + + /** FaxOutgoingMessageIterator Class */ + class FaxOutgoingMessageIterator { + private 'FAXCOMEXLib.FaxOutgoingMessageIterator_typekey': FaxOutgoingMessageIterator; + private constructor(); + + /** End of archive marker */ + readonly AtEOF: boolean; + + /** Current message */ + readonly Message: IFaxOutgoingMessage; + + /** Move to the first message */ + MoveFirst(): void; + + /** Move to the next message */ + MoveNext(): void; + + /** Size of prefetch buffer */ + PrefetchSize: number; + } + + /** FaxOutgoingQueue Class */ + class FaxOutgoingQueue { + private 'FAXCOMEXLib.FaxOutgoingQueue_typekey': FaxOutgoingQueue; + private constructor(); + + /** How long the failed fax message is kept on the server */ + AgeLimit: number; + + /** Are personal cover pages allowed */ + AllowPersonalCoverPages: boolean; + + /** Is the queue blocked */ + Blocked: boolean; + + /** Does the server generate a brand */ + Branding: boolean; + + /** End of the discount rate period */ + DiscountRateEnd: VarDate; + + /** Start of the discount rate period */ + DiscountRateStart: VarDate; + + /** Outgoing job by ID */ + GetJob(bstrJobId: string): IFaxOutgoingJob; + + /** Collection of outgoing jobs */ + GetJobs(): FaxOutgoingJobs; + + /** Is the queue paused */ + Paused: boolean; + + /** Refresh the object */ + Refresh(): void; + + /** Number of retries */ + Retries: number; + + /** Retry delay */ + RetryDelay: number; + + /** Save the object */ + Save(): void; + + /** Is device Transmitting Station ID used */ + UseDeviceTSID: boolean; + } + + /** FaxReceiptOptions Class */ + class FaxReceiptOptions { + private 'FAXCOMEXLib.FaxReceiptOptions_typekey': FaxReceiptOptions; + private constructor(); + + /** Allowed receipt types, a bit-wise combination of FAX_RECEIPT_TYPE values */ + AllowedReceipts: FAX_RECEIPT_TYPE_ENUM; + + /** Authentication type used by server */ + AuthenticationType: FAX_SMTP_AUTHENTICATION_TYPE_ENUM; + + /** Refresh the object */ + Refresh(): void; + + /** Save the object */ + Save(): void; + + /** SMTP password */ + SMTPPassword: string; + + /** SMTP port number */ + SMTPPort: number; + + /** SMTP sender e-mail address */ + SMTPSender: string; + + /** Name of the SMTP server */ + SMTPServer: string; + + /** SMTP user name */ + SMTPUser: string; + + /** Whether to use the IFaxReceiptOptions settings for MS routing extension */ + UseForInboundRouting: boolean; + } + + /** FaxRecipient Class */ + class FaxRecipient { + private 'FAXCOMEXLib.FaxRecipient_typekey': FaxRecipient; + private constructor(); + + /** Recipient's fax number */ + FaxNumber: string; + + /** Recipient's name */ + Name: string; + } + + /** FaxRecipients Class */ + class FaxRecipients { + private 'FAXCOMEXLib.FaxRecipients_typekey': FaxRecipients; + private constructor(); + + /** + * Add a recipient + * @param string [bstrRecipientName=''] + */ + Add(bstrFaxNumber: string, bstrRecipientName?: string): FaxRecipient; + readonly Count: number; + Item(lIndex: number): FaxRecipient; + + /** Remove a recipient */ + Remove(lIndex: number): void; + } + + /** FaxSecurity Class */ + class FaxSecurity { + private 'FAXCOMEXLib.FaxSecurity_typekey': FaxSecurity; + private constructor(); + + /** Security descriptor */ + Descriptor: any; + + /** Granted rights, a bit-wise combination of FAX_ACCESS_RIGHTS values */ + readonly GrantedRights: FAX_ACCESS_RIGHTS_ENUM; + + /** Security Information Type */ + InformationType: number; + + /** Refresh the object */ + Refresh(): void; + + /** Save the object */ + Save(): void; + } + + /** FaxSecurity2 Class */ + class FaxSecurity2 { + private 'FAXCOMEXLib.FaxSecurity2_typekey': FaxSecurity2; + private constructor(); + + /** Security descriptor */ + Descriptor: any; + + /** Granted rights, a bit-wise combination */ + readonly GrantedRights: FAX_ACCESS_RIGHTS_ENUM_2; + + /** Security Information Type */ + InformationType: number; + + /** Refresh the object */ + Refresh(): void; + + /** Save the object */ + Save(): void; + } + + /** FaxSender Class */ + class FaxSender { + private 'FAXCOMEXLib.FaxSender_typekey': FaxSender; + private constructor(); + + /** Sender's billing code */ + BillingCode: string; + + /** City */ + City: string; + + /** Sender's company */ + Company: string; + + /** Sender's country or region */ + Country: string; + + /** Sender's department */ + Department: string; + + /** Sender's e-mail address */ + Email: string; + + /** Sender's fax number */ + FaxNumber: string; + + /** Sender's home phone */ + HomePhone: string; + + /** Load default sender */ + LoadDefaultSender(): void; + + /** Sender's name */ + Name: string; + + /** Sender's office location */ + OfficeLocation: string; + + /** Sender's office phone */ + OfficePhone: string; + + /** Save default sender */ + SaveDefaultSender(): void; + + /** Sender's state */ + State: string; + + /** Sender's street address */ + StreetAddress: string; + + /** Sender's title */ + Title: string; + + /** Transmitting Station ID */ + TSID: string; + + /** Sender's zip code */ + ZipCode: string; + } + + /** FaxServer Class */ + class FaxServer extends IFaxServer { + private 'FAXCOMEXLib.FaxServer_typekey': FaxServer; + private constructor(); + + /** Fax server configuration */ + readonly Configuration: FaxConfiguration; + + /** FaxAccount for the current connection */ + readonly CurrentAccount: FaxAccount; + + /** The FaxAccountSet configuration object */ + readonly FaxAccountSet: FaxAccountSet; + + /** The security configuration object */ + readonly Security2: FaxSecurity2; + } + + /** IFaxIncomingMessage interface */ + class IFaxIncomingMessage { + /** Caller ID */ + readonly CallerId: string; + + /** Copy Tiff image to the local file */ + CopyTiff(bstrTiffPath: string): void; + + /** Called Station ID */ + readonly CSID: string; + + /** Delete the message from the archive */ + Delete(): void; + + /** Name of the device that received the message */ + readonly DeviceName: string; + + /** Unique message ID */ + readonly Id: string; + + /** Total number of pages */ + readonly Pages: number; + + /** Number of failed routing retries */ + readonly Retries: number; + + /** Routing information */ + readonly RoutingInformation: string; + + /** Size in bytes of the message's TIFF file */ + readonly Size: number; + + /** Transmission end time */ + readonly TransmissionEnd: VarDate; + + /** Transmission start time */ + readonly TransmissionStart: VarDate; + + /** Transmitting Station ID */ + readonly TSID: string; + } + + /** IFaxOutgoingJob interface */ + class IFaxOutgoingJob { + private 'FAXCOMEXLib.IFaxOutgoingJob_typekey': IFaxOutgoingJob; + private constructor(); + + /** Available operations, a bit-wise combination of FAX_JOB_OPERATIONS values */ + readonly AvailableOperations: FAX_JOB_OPERATIONS_ENUM; + + /** Cancel the outbound job */ + Cancel(): void; + + /** Copy the job's TIFF image */ + CopyTiff(bstrTiffPath: string): void; + + /** Called Station ID */ + readonly CSID: string; + + /** Page currently in transmision */ + readonly CurrentPage: number; + + /** Device ID that transmits the job */ + readonly DeviceId: number; + + /** Document's friendly name */ + readonly DocumentName: string; + + /** Extended status description */ + readonly ExtendedStatus: string; + + /** Code of the job's extended status */ + readonly ExtendedStatusCode: FAX_JOB_EXTENDED_STATUS_ENUM; + + /** Whether to group broadcast receipts */ + readonly GroupBroadcastReceipts: boolean; + + /** Unique job ID */ + readonly Id: string; + + /** Time the job was originally scheduled to be transmitted */ + readonly OriginalScheduledTime: VarDate; + + /** Total number of pages */ + readonly Pages: number; + + /** Pause the outbound job */ + Pause(): void; + + /** Priority of the fax */ + readonly Priority: FAX_PRIORITY_TYPE_ENUM; + + /** Type of receipt */ + readonly ReceiptType: FAX_RECEIPT_TYPE_ENUM; + + /** Recipient information object */ + readonly Recipient: FaxRecipient; + + /** Refresh the object */ + Refresh(): void; + + /** Restart the outbound job */ + Restart(): void; + + /** Resume the outbound job */ + Resume(): void; + + /** Number of failed transmission retries */ + readonly Retries: number; + + /** The time the fax job is scheduled to be transmitted */ + readonly ScheduledTime: VarDate; + + /** Sender information object */ + readonly Sender: FaxSender; + + /** Size in bytes of TIFF file */ + readonly Size: number; + + /** Current queue status of the job */ + readonly Status: FAX_JOB_STATUS_ENUM; + + /** Cover page's subject field */ + readonly Subject: string; + + /** Unique ID the submission process created for the Job */ + readonly SubmissionId: string; + + /** Time the job was submitted */ + readonly SubmissionTime: VarDate; + + /** The time the fax job finished its transmission */ + readonly TransmissionEnd: VarDate; + + /** The time the fax job started its transmission */ + readonly TransmissionStart: VarDate; + + /** Transmitting Station ID */ + readonly TSID: string; + } + + /** IFaxOutgoingMessage interface */ + class IFaxOutgoingMessage { + /** Copy Tiff image to the local file */ + CopyTiff(bstrTiffPath: string): void; + + /** Called Station ID */ + readonly CSID: string; + + /** Delete the message from the archive */ + Delete(): void; + + /** Name of the device transmitting the message */ + readonly DeviceName: string; + + /** Document's friendly name */ + readonly DocumentName: string; + + /** Unique message ID */ + readonly Id: string; + + /** Time the job was originally scheduled to be transmitted */ + readonly OriginalScheduledTime: VarDate; + + /** Total number of pages */ + readonly Pages: number; + + /** Priority of the fax */ + readonly Priority: FAX_PRIORITY_TYPE_ENUM; + + /** Recipient information object */ + readonly Recipient: FaxRecipient; + + /** Number of failed routing retries */ + readonly Retries: number; + + /** Sender information object */ + readonly Sender: FaxSender; + + /** Size in bytes of TIFF file */ + readonly Size: number; + + /** Cover page's subject field */ + readonly Subject: string; + + /** Unique ID the submission process created for the job */ + readonly SubmissionId: string; + + /** Time the job was submitted */ + readonly SubmissionTime: VarDate; + + /** Transmission end time */ + readonly TransmissionEnd: VarDate; + + /** Transmission start time */ + readonly TransmissionStart: VarDate; + + /** Transmitting Station ID */ + readonly TSID: string; + } + + /** IFaxServer interface */ + class IFaxServer { + /** The fax server activity status object */ + readonly Activity: FaxActivity; + + /** Version of the fax server API */ + readonly APIVersion: FAX_SERVER_APIVERSION_ENUM; + + /** Connect to the fax server */ + Connect(bstrServerName: string): void; + + /** Is fax server built in debug environment */ + readonly Debug: boolean; + + /** Disconnect from the fax server */ + Disconnect(): void; + + /** The fax folders object */ + readonly Folders: FaxFolders; + + /** The collection of device providers */ + GetDeviceProviders(): FaxDeviceProviders; + + /** The collection of all available devices */ + GetDevices(): FaxDevices; + + /** Return server level extention property */ + GetExtensionProperty(bstrGUID: string): any; + + /** The inbound routing configuration object */ + readonly InboundRouting: FaxInboundRouting; + + /** Set bit-wise combination of events the fax server listens to */ + ListenToServerEvents(EventTypes: FAX_SERVER_EVENTS_TYPE_ENUM): void; + + /** The logging options configuration object */ + readonly LoggingOptions: FaxLoggingOptions; + + /** The major part of the fax server's build number */ + readonly MajorBuild: number; + + /** The major part of the fax server's version number */ + readonly MajorVersion: number; + + /** The minor part of the fax server's build number */ + readonly MinorBuild: number; + + /** The minor part of the fax server's version number */ + readonly MinorVersion: number; + + /** The outbound routing configuration object */ + readonly OutboundRouting: FaxOutboundRouting; + + /** The receipt options configuration object */ + readonly ReceiptOptions: FaxReceiptOptions; + + /** Register device provider */ + RegisterDeviceProvider(bstrGUID: string, bstrFriendlyName: string, bstrImageName: string, TspName: string, lFSPIVersion: number): void; + + /** Events the fax Server is listening to */ + readonly RegisteredEvents: FAX_SERVER_EVENTS_TYPE_ENUM; + + /** Register inbound routing extension */ + RegisterInboundRoutingExtension(bstrExtensionName: string, bstrFriendlyName: string, bstrImageName: string, vMethods: any): void; + + /** The security configuration object */ + readonly Security: FaxSecurity; + + /** The name of the fax server */ + readonly ServerName: string; + + /** Set server level extention property */ + SetExtensionProperty(bstrGUID: string, vProperty: SafeArray): void; + + /** Unregister device provider */ + UnregisterDeviceProvider(bstrUniqueName: string): void; + + /** Unregister inbound routing extension */ + UnregisterInboundRoutingExtension(bstrExtensionUniqueName: string): void; + } + + namespace EventHelperTypes { + type FaxAccount_Invoke_ArgNames = ['dispidMember', 'riid', 'lcid', 'wFlags', 'pdispparams', 'pvarResult', 'pexcepinfo', 'puArgErr']; + + type FaxServer_Invoke_ArgNames = ['dispidMember', 'riid', 'lcid', 'wFlags', 'pdispparams', 'pvarResult', 'pexcepinfo', 'puArgErr']; + + type FaxServer_OnDeviceStatusChange_ArgNames = ['pFaxServer', 'lDeviceId', 'bPoweredOff', 'bSending', 'bReceiving', 'bRinging']; + + interface FaxAccount_Invoke_Parameter { + readonly dispidMember: number; + readonly lcid: number; + readonly pdispparams: stdole.DISPPARAMS; + pexcepinfo: stdole.EXCEPINFO; + puArgErr: number; + pvarResult: any; + readonly riid: stdole.GUID; + readonly wFlags: number; + } + + interface FaxServer_Invoke_Parameter { + readonly dispidMember: number; + readonly lcid: number; + readonly pdispparams: stdole.DISPPARAMS; + pexcepinfo: stdole.EXCEPINFO; + puArgErr: number; + pvarResult: any; + readonly riid: stdole.GUID; + readonly wFlags: number; + } + + interface FaxServer_OnDeviceStatusChange_Parameter { + readonly bPoweredOff: boolean; + readonly bReceiving: boolean; + readonly bRinging: boolean; + readonly bSending: boolean; + readonly lDeviceId: number; + readonly pFaxServer: FaxServer; + } + } +} + +interface ActiveXObject { + on( + obj: FAXCOMEXLib.FaxAccount, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( + this: FAXCOMEXLib.FaxAccount, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; + on( + obj: FAXCOMEXLib.FaxAccount, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( + this: FAXCOMEXLib.FaxAccount, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; + on(obj: FAXCOMEXLib.FaxAccount, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: FAXCOMEXLib.FaxAccount, parameter: {pctinfo: number}) => void): void; + on( + obj: FAXCOMEXLib.FaxAccount, event: 'Invoke', argNames: FAXCOMEXLib.EventHelperTypes.FaxAccount_Invoke_ArgNames, handler: ( + this: FAXCOMEXLib.FaxAccount, parameter: FAXCOMEXLib.EventHelperTypes.FaxAccount_Invoke_Parameter) => void): void; + on( + obj: FAXCOMEXLib.FaxAccount, event: 'OnIncomingJobAdded' | 'OnIncomingJobRemoved' | 'OnOutgoingJobAdded' | 'OnOutgoingJobRemoved', + argNames: ['pFaxAccount', 'bstrJobId'], handler: (this: FAXCOMEXLib.FaxAccount, parameter: {readonly pFaxAccount: FAXCOMEXLib.FaxAccount, readonly bstrJobId: string}) => void): void; + on( + obj: FAXCOMEXLib.FaxAccount, event: 'OnIncomingJobChanged' | 'OnOutgoingJobChanged', argNames: ['pFaxAccount', 'bstrJobId', 'pJobStatus'], + handler: (this: FAXCOMEXLib.FaxAccount, parameter: {readonly pFaxAccount: FAXCOMEXLib.FaxAccount, readonly bstrJobId: string, readonly pJobStatus: FAXCOMEXLib.FaxJobStatus}) => void): void; + on( + obj: FAXCOMEXLib.FaxAccount, event: 'OnIncomingMessageAdded', argNames: ['pFaxAccount', 'bstrMessageId', 'fAddedToReceiveFolder'], + handler: (this: FAXCOMEXLib.FaxAccount, parameter: {readonly pFaxAccount: FAXCOMEXLib.FaxAccount, readonly bstrMessageId: string, readonly fAddedToReceiveFolder: boolean}) => void): void; + on( + obj: FAXCOMEXLib.FaxAccount, event: 'OnIncomingMessageRemoved', argNames: ['pFaxAccount', 'bstrMessageId', 'fRemovedFromReceiveFolder'], + handler: (this: FAXCOMEXLib.FaxAccount, parameter: {readonly pFaxAccount: FAXCOMEXLib.FaxAccount, readonly bstrMessageId: string, readonly fRemovedFromReceiveFolder: boolean}) => void): void; + on( + obj: FAXCOMEXLib.FaxAccount, event: 'OnOutgoingMessageAdded' | 'OnOutgoingMessageRemoved', argNames: ['pFaxAccount', 'bstrMessageId'], + handler: (this: FAXCOMEXLib.FaxAccount, parameter: {readonly pFaxAccount: FAXCOMEXLib.FaxAccount, readonly bstrMessageId: string}) => void): void; + on( + obj: FAXCOMEXLib.FaxAccount, event: 'OnServerShutDown', argNames: ['pFaxServer'], handler: ( + this: FAXCOMEXLib.FaxAccount, parameter: {readonly pFaxServer: FAXCOMEXLib.FaxServer}) => void): void; + on( + obj: FAXCOMEXLib.FaxAccount, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: ( + this: FAXCOMEXLib.FaxAccount, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; + on( + obj: FAXCOMEXLib.FaxServer, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( + this: FAXCOMEXLib.FaxServer, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; + on( + obj: FAXCOMEXLib.FaxServer, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( + this: FAXCOMEXLib.FaxServer, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; + on(obj: FAXCOMEXLib.FaxServer, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: FAXCOMEXLib.FaxServer, parameter: {pctinfo: number}) => void): void; + on( + obj: FAXCOMEXLib.FaxServer, event: 'Invoke', argNames: FAXCOMEXLib.EventHelperTypes.FaxServer_Invoke_ArgNames, handler: ( + this: FAXCOMEXLib.FaxServer, parameter: FAXCOMEXLib.EventHelperTypes.FaxServer_Invoke_Parameter) => void): void; + on( + obj: FAXCOMEXLib.FaxServer, event: 'OnActivityLoggingConfigChange' | 'OnDevicesConfigChange' | 'OnEventLoggingConfigChange' | 'OnGeneralServerConfigChanged' | + 'OnIncomingArchiveConfigChange' | 'OnOutboundRoutingGroupsConfigChange' | 'OnOutboundRoutingRulesConfigChange' | 'OnOutgoingArchiveConfigChange' | + 'OnOutgoingQueueConfigChange' | 'OnReceiptOptionsChange' | 'OnSecurityConfigChange' | 'OnServerShutDown', + argNames: ['pFaxServer'], + handler: (this: FAXCOMEXLib.FaxServer, parameter: {readonly pFaxServer: FAXCOMEXLib.FaxServer}) => void): void; + on( + obj: FAXCOMEXLib.FaxServer, event: 'OnDeviceStatusChange', argNames: FAXCOMEXLib.EventHelperTypes.FaxServer_OnDeviceStatusChange_ArgNames, + handler: (this: FAXCOMEXLib.FaxServer, parameter: FAXCOMEXLib.EventHelperTypes.FaxServer_OnDeviceStatusChange_Parameter) => void): void; + on( + obj: FAXCOMEXLib.FaxServer, event: 'OnIncomingJobAdded' | 'OnIncomingJobRemoved' | 'OnOutgoingJobAdded' | 'OnOutgoingJobRemoved', + argNames: ['pFaxServer', 'bstrJobId'], handler: (this: FAXCOMEXLib.FaxServer, parameter: {readonly pFaxServer: FAXCOMEXLib.FaxServer, readonly bstrJobId: string}) => void): void; + on( + obj: FAXCOMEXLib.FaxServer, event: 'OnIncomingJobChanged' | 'OnOutgoingJobChanged', argNames: ['pFaxServer', 'bstrJobId', 'pJobStatus'], + handler: (this: FAXCOMEXLib.FaxServer, parameter: {readonly pFaxServer: FAXCOMEXLib.FaxServer, readonly bstrJobId: string, readonly pJobStatus: FAXCOMEXLib.FaxJobStatus}) => void): void; + on( + obj: FAXCOMEXLib.FaxServer, event: 'OnIncomingMessageAdded' | 'OnIncomingMessageRemoved' | 'OnOutgoingMessageAdded' | 'OnOutgoingMessageRemoved', + argNames: ['pFaxServer', 'bstrMessageId'], handler: (this: FAXCOMEXLib.FaxServer, parameter: {readonly pFaxServer: FAXCOMEXLib.FaxServer, readonly bstrMessageId: string}) => void): void; + on( + obj: FAXCOMEXLib.FaxServer, event: 'OnNewCall', argNames: ['pFaxServer', 'lCallId', 'lDeviceId', 'bstrCallerId'], handler: ( + this: FAXCOMEXLib.FaxServer, parameter: {readonly pFaxServer: FAXCOMEXLib.FaxServer, readonly lCallId: number, readonly lDeviceId: number, readonly bstrCallerId: string}) => void): void; + on( + obj: FAXCOMEXLib.FaxServer, event: 'OnQueuesStatusChange', argNames: ['pFaxServer', 'bOutgoingQueueBlocked', 'bOutgoingQueuePaused', 'bIncomingQueueBlocked'], + handler: ( + this: FAXCOMEXLib.FaxServer, + parameter: { + readonly pFaxServer: FAXCOMEXLib.FaxServer, readonly bOutgoingQueueBlocked: boolean, readonly bOutgoingQueuePaused: boolean, readonly bIncomingQueueBlocked: boolean}) => void): void; + on( + obj: FAXCOMEXLib.FaxServer, event: 'OnServerActivityChange', + argNames: ['pFaxServer', 'lIncomingMessages', 'lRoutingMessages', 'lOutgoingMessages', 'lQueuedMessages'], handler: ( + this: FAXCOMEXLib.FaxServer, + parameter: { + readonly pFaxServer: FAXCOMEXLib.FaxServer, readonly lIncomingMessages: number, readonly lRoutingMessages: number, readonly lOutgoingMessages: number, readonly lQueuedMessages: number + }) => void + ): void; + on( + obj: FAXCOMEXLib.FaxServer, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: ( + this: FAXCOMEXLib.FaxServer, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; + on(obj: FAXCOMEXLib.FaxAccount, event: 'AddRef' | 'Release', handler: (this: FAXCOMEXLib.FaxAccount, parameter: {}) => void): void; + on(obj: FAXCOMEXLib.FaxServer, event: 'AddRef' | 'Release', handler: (this: FAXCOMEXLib.FaxServer, parameter: {}) => void): void; + new(progid: K): ActiveXObjectNameMap[K]; +} + +interface ActiveXObjectNameMap { + 'FaxComEx.FaxDocument': FAXCOMEXLib.FaxDocument; + 'FaxComEx.FaxServer': FAXCOMEXLib.FaxServer; +} + +interface EnumeratorConstructor { + new(col: FAXCOMEXLib.FaxAccounts): Enumerator; + new(col: FAXCOMEXLib.FaxDeviceIds): Enumerator; + new(col: FAXCOMEXLib.FaxDeviceProviders): Enumerator; + new(col: FAXCOMEXLib.FaxDevices): Enumerator; + new(col: FAXCOMEXLib.FaxInboundRoutingExtensions): Enumerator; + new(col: FAXCOMEXLib.FaxInboundRoutingMethods): Enumerator; + new(col: FAXCOMEXLib.FaxIncomingJobs): Enumerator; + new(col: FAXCOMEXLib.FaxOutboundRoutingGroups): Enumerator; + new(col: FAXCOMEXLib.FaxOutboundRoutingRules): Enumerator; + new(col: FAXCOMEXLib.FaxOutgoingJobs): Enumerator; + new(col: FAXCOMEXLib.FaxRecipients): Enumerator; +} + +interface SafeArray { + _brand: SafeArray; +} diff --git a/types/activex-faxcomexlib/package.json b/types/activex-faxcomexlib/package.json new file mode 100644 index 0000000000..d9b1031263 --- /dev/null +++ b/types/activex-faxcomexlib/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "activex-helpers": "*" + } +} \ No newline at end of file diff --git a/types/activex-faxcomexlib/tsconfig.json b/types/activex-faxcomexlib/tsconfig.json new file mode 100644 index 0000000000..673e3f49ea --- /dev/null +++ b/types/activex-faxcomexlib/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es5", + "scripthost" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "activex-faxcomexlib-tests.ts" + ] +} \ No newline at end of file diff --git a/types/activex-faxcomexlib/tslint.json b/types/activex-faxcomexlib/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/activex-faxcomexlib/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/activex-infopath/tsconfig.json b/types/activex-infopath/tsconfig.json index 6feef8496c..e6479e5c7c 100644 --- a/types/activex-infopath/tsconfig.json +++ b/types/activex-infopath/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-iwshruntimelibrary/activex-iwshruntimelibrary-tests.ts b/types/activex-iwshruntimelibrary/activex-iwshruntimelibrary-tests.ts new file mode 100644 index 0000000000..f39627cc1a --- /dev/null +++ b/types/activex-iwshruntimelibrary/activex-iwshruntimelibrary-tests.ts @@ -0,0 +1,49 @@ +const wshn = new ActiveXObject('WScript.Network'); + +// https://msdn.microsoft.com/en-us/library/s6wt333f(v=vs.84).aspx +// https://msdn.microsoft.com/en-us/library/wck0hkd7(v=vs.84).aspx +// https://msdn.microsoft.com/en-us/library/tte130y1(v=vs.84).aspx +// https://msdn.microsoft.com/en-us/library/3fxhka75(v=vs.84).aspx +(() => { + WScript.Echo('Domain = ' + wshn.UserDomain); + WScript.Echo('Computer Name = ' + wshn.ComputerName); + WScript.Echo('User Name = ' + wshn.UserName); +})(); + +// https://msdn.microsoft.com/en-us/library/zsdh7hkb(v=vs.84).aspx +wshn.AddWindowsPrinterConnection('\\\\printserv\\DefaultPrinter'); + +// https://msdn.microsoft.com/en-us/library/kxsdca3c(v=vs.84).aspx +wshn.AddPrinterConnection("LPT1", "\\\\Server\\Print1"); + +// https://msdn.microsoft.com/en-us/library/t9zt39at(v=vs.84).aspx +// https://msdn.microsoft.com/en-us/library/zhds6k80(v=vs.84).aspx +(() => { + const drives = wshn.EnumNetworkDrives(); + const printers = wshn.EnumPrinterConnections(); + WScript.Echo("Network drive mappings:"); + for (let i = 0; i < drives.length; i += 2) { + WScript.Echo(`Drive ${drives.Item(i)} = ${drives.Item(i + 1)}`); + } + WScript.Echo(''); + WScript.Echo("Network printer mappings:"); + for (let i = 0; i < printers.length; i += 2) { + WScript.Echo(`Port ${printers.Item(i)} = ${printers.Item(i + 1)}`); + } +})(); + +// https://msdn.microsoft.com/en-us/library/8kst88h6(v=vs.84).aspx +wshn.MapNetworkDrive('E:', '\\\\Server\\Public'); + +// https://msdn.microsoft.com/en-us/library/d16d7wbf(v=vs.84).aspx +wshn.RemoveNetworkDrive('E:'); + +// https://msdn.microsoft.com/en-us/library/tsbh2yy7(v=vs.84).aspx +wshn.RemovePrinterConnection('\\\\PRN-CORP1\\B41-4523-A', true, true); + +// https://msdn.microsoft.com/en-us/library/2ccwwdct(v=vs.84).aspx +(() => { + const printerPath = "\\\\research\\library1"; + wshn.AddWindowsPrinterConnection(printerPath); + wshn.SetDefaultPrinter(printerPath); +})(); diff --git a/types/activex-iwshruntimelibrary/index.d.ts b/types/activex-iwshruntimelibrary/index.d.ts new file mode 100644 index 0000000000..c50c9670a2 --- /dev/null +++ b/types/activex-iwshruntimelibrary/index.d.ts @@ -0,0 +1,247 @@ +// Type definitions for Windows Script Host Object Model - IWshRuntimeLibrary 1.0 +// Project: https://msdn.microsoft.com/en-us/library/9bbdkx3k(v=vs.84).aspx +// Definitions by: Zev Spitz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +declare namespace IWshRuntimeLibrary { + // tslint:disable-next-line no-const-enum + const enum ButtonType { + OK, + OKCancel, + AbortRetryIgnore, + YesNoCancel, + YesNo, + RetryCancel, + CancelTryagainContinue + } + + // tslint:disable-next-line no-const-enum + const enum IconType { + Stop = 16, + QuestionMark = 32, + ExclamationMakr = 48, + InformationMark = 64, + } + + // tslint:disable-next-line no-const-enum + const enum PopupType { + SecondButtonDefault = 256, + ThirdButtonDefault = 512, + Modal = 4096, + RightJustified = 524288, + RTL = 1048576, + } + + // tslint:disable-next-line no-const-enum + const enum PopupSelection { + NoButton = -1, + OK = 1, + Cancel = 2, + Abort = 3, + Retry = 4, + Ignore = 5, + Yes = 6, + No = 7, + TryAgain = 10, + Continue = 11, + } + + // tslint:disable-next-line no-const-enum + const enum WshExecStatus { + WshFailed = 2, + WshFinished = 1, + WshRunning = 0, + } + + // tslint:disable-next-line no-const-enum + const enum WshWindowStyle { + WshHide = 0, + WshMaximizedFocus = 3, + WshMinimizedFocus = 2, + WshMinimizedNoFocus = 6, + WshNormalFocus = 1, + WshNormalNoFocus = 4, + } + + class TextStream { + private 'IWshRuntimeLibrary.TextStream_typekey': TextStream; + private constructor(); + readonly AtEndOfLine: boolean; + readonly AtEndOfStream: boolean; + Close(): void; + readonly Column: number; + readonly Line: number; + Read(Characters: number): string; + ReadAll(): string; + ReadLine(): string; + Skip(Characters: number): void; + SkipLine(): void; + Write(Text: string): void; + WriteBlankLines(Lines: number): void; + + /** @param string [Text=''] */ + WriteLine(Text?: string): void; + } + + /** Generic Collection Object */ + class WshCollection { + private 'IWshRuntimeLibrary.WshCollection_typekey': WshCollection; + private constructor(); + Count(): number; + Item(Index: any): any; + readonly length: number; + } + + /** Environment Variables Collection Object */ + class WshEnvironment { + private 'IWshRuntimeLibrary.WshEnvironment_typekey': WshEnvironment; + private constructor(); + Count(): number; + Item(Name: string): string; + readonly length: number; + Remove(Name: string): void; + } + + /** WSHExec object */ + class WshExec { + private 'IWshRuntimeLibrary.WshExec_typekey': WshExec; + private constructor(); + readonly ExitCode: number; + readonly ProcessID: number; + readonly Status: WshExecStatus; + readonly StdErr: TextStream; + readonly StdIn: TextStream; + readonly StdOut: TextStream; + Terminate(): void; + } + + /** Network Object */ + class WshNetwork { + private 'IWshRuntimeLibrary.WshNetwork_typekey': WshNetwork; + private constructor(); + + /** + * Adds a remote MS-DOS-based printer connection to your computer system. + * @param LocalName Local name to assign to the connected printer. + * @param RemoteName Name of the remote printer. + * @param UpdateProfile [false] Whether the printer mapping is stored in the current user's profile. + * + * If you are mapping a remote printer using the profile of someone other than current user, you can specify _UserName_ and _Password_. + */ + AddPrinterConnection(LocalName: string, RemoteName: string, UpdateProfile?: boolean, UserName?: string, Password?: string): void; + + /** + * @param string Path to printer connection + * @param string [DriverName=''] + * @param string [Port='LPT1'] + * + * Unlike the **AddPrinterConnection** method, this method allows you to create a printer connection without directing it to a specific port, such as LPT1. + */ + AddWindowsPrinterConnection(PrinterName: string, DriverName?: string, Port?: string): void; + readonly ComputerName: string; + EnumNetworkDrives(): WshCollection; + EnumPrinterConnections(): WshCollection; + + /** + * Adds a remote MS-DOS-based printer connection to your computer system. + * @param LocalName Name by which the mapped drive will be known locally + * @param RemoteName Share's UNC name (\\xxx\yyy) + * @param UpdateProfile [false] Whether the printer mapping is stored in the current user's profile. + * + * If you are mapping a network drive using the profile of someone other than current user, you can specify _UserName_ and _Password_. + */ + MapNetworkDrive(LocalName: string, RemoteName: string, UpdateProfile?: boolean, UserName?: string, Password?: string): void; + readonly Organization: string; + + /** + * Removes a shared network drive from your computer system + * @param Name Name of the mapped drive you want to remove. This will be the drive letter if the drive has a mapping between a local name (drive letter) and a remote name (UNC name); + * it will be the UNC path if there is no such mapping + * @param Force [false] Remove the connections even if the resource is in use + * @param UpdateProfile [false] Remove the mapping from the user's profile + */ + RemoveNetworkDrive(Name: string, Force?: any, UpdateProfile?: any): void; + + /** + * Removes a shared network printer connection from your computer system + * @param Name Name that identifies the printer. Can be a UNC name (in the form `\\xxx\yyy`) or a local name (such as `LPT1`) + * @param Force [false] Remove printer connection even if a user is still connected + * @param UpdateProfile [false] Remove the printer connection from the user's profile + * + * The **RemovePrinterConnection** method removes both Windows and MS-DOS based printer connections. If the printer was connected using the method **AddPrinterConnection**, + * _Name_ must be the printer's local name. If the printer was connected using the **AddWindowsPrinterConnection** method or was added manually (using the Add Printer wizard), + * then _Name_ must be the printer's UNC name. + */ + RemovePrinterConnection(Name: string, Force?: any, UpdateProfile?: any): void; + SetDefaultPrinter(Name: string): void; + readonly Site: string; + readonly UserDomain: string; + readonly UserName: string; + readonly UserProfile: string; + } + + /** Shell Object */ + class WshShell { + private 'IWshRuntimeLibrary.WshShell_typekey': WshShell; + private constructor(); + AppActivate(App: any, Wait?: any): boolean; + CreateShortcut(PathLink: string): any; + CurrentDirectory: string; + Environment(Type?: any): WshEnvironment; + Exec(Command: string): WshExec; + ExpandEnvironmentStrings(Src: string): string; + + /** @param string [Target=''] */ + LogEvent(Type: any, Message: string, Target?: string): boolean; + Popup(Text: any, SecondsToWait?: number, Title?: string, Type?: ButtonType | IconType | PopupType): PopupSelection; + RegDelete(Name: string): void; + RegRead(Name: string): any; + RegWrite(Name: string, Value: any, Type?: any): void; + Run(Command: string, WindowStyle?: any, WaitOnReturn?: any): number; + SendKeys(Keys: string, Wait?: any): void; + readonly SpecialFolders: WshCollection; + } + + /** Shortcut Object */ + class WshShortcut { + private 'IWshRuntimeLibrary.WshShortcut_typekey': WshShortcut; + private constructor(); + Arguments: string; + Description: string; + readonly FullName: string; + Hotkey: string; + IconLocation: string; + Load(PathLink: string): void; + readonly RelativePath: string; + Save(): void; + TargetPath: string; + WindowStyle: number; + WorkingDirectory: string; + } + + /** URLShortcut Object */ + class WshURLShortcut { + private 'IWshRuntimeLibrary.WshURLShortcut_typekey': WshURLShortcut; + private constructor(); + readonly FullName: string; + Load(PathLink: string): void; + Save(): void; + TargetPath: string; + } +} + +interface ActiveXObject { + set(obj: IWshRuntimeLibrary.WshEnvironment, propertyName: 'Item', parameterTypes: [string], newValue: string): void; + new (progid: K): ActiveXObjectNameMap[K]; +} + +interface ActiveXObjectNameMap { + 'WScript.Network': IWshRuntimeLibrary.WshNetwork; + 'WScript.Shell': IWshRuntimeLibrary.WshShell; +} + +interface EnumeratorConstructor { + new(col: IWshRuntimeLibrary.WshCollection): Enumerator; + new(col: IWshRuntimeLibrary.WshEnvironment): Enumerator; +} diff --git a/types/activex-iwshruntimelibrary/package.json b/types/activex-iwshruntimelibrary/package.json new file mode 100644 index 0000000000..d9b1031263 --- /dev/null +++ b/types/activex-iwshruntimelibrary/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "activex-helpers": "*" + } +} \ No newline at end of file diff --git a/types/activex-iwshruntimelibrary/tsconfig.json b/types/activex-iwshruntimelibrary/tsconfig.json new file mode 100644 index 0000000000..0c79715db6 --- /dev/null +++ b/types/activex-iwshruntimelibrary/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es5", + "scripthost" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "activex-iwshruntimelibrary-tests.ts" + ] +} \ No newline at end of file diff --git a/types/activex-iwshruntimelibrary/tslint.json b/types/activex-iwshruntimelibrary/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/activex-iwshruntimelibrary/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/activex-libreoffice/tsconfig.json b/types/activex-libreoffice/tsconfig.json index 712ea46ca1..c72038c18a 100644 --- a/types/activex-libreoffice/tsconfig.json +++ b/types/activex-libreoffice/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-msforms/tsconfig.json b/types/activex-msforms/tsconfig.json index 38f907552d..ee18e776a1 100644 --- a/types/activex-msforms/tsconfig.json +++ b/types/activex-msforms/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-mshtml/tsconfig.json b/types/activex-mshtml/tsconfig.json index deba2b6ba3..9f0594a26d 100644 --- a/types/activex-mshtml/tsconfig.json +++ b/types/activex-mshtml/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-msxml2/tsconfig.json b/types/activex-msxml2/tsconfig.json index 49c53f71ca..5d1cee05aa 100644 --- a/types/activex-msxml2/tsconfig.json +++ b/types/activex-msxml2/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-office/tsconfig.json b/types/activex-office/tsconfig.json index 729657e813..4c8b5ce9e5 100644 --- a/types/activex-office/tsconfig.json +++ b/types/activex-office/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-outlook/tsconfig.json b/types/activex-outlook/tsconfig.json index 1a9fddc714..5d2f6c157b 100644 --- a/types/activex-outlook/tsconfig.json +++ b/types/activex-outlook/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-powerpoint/tsconfig.json b/types/activex-powerpoint/tsconfig.json index 8a0392da3f..4ecc0048fb 100644 --- a/types/activex-powerpoint/tsconfig.json +++ b/types/activex-powerpoint/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-scripting/tsconfig.json b/types/activex-scripting/tsconfig.json index e2008551fd..1d660ed39c 100644 --- a/types/activex-scripting/tsconfig.json +++ b/types/activex-scripting/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-shdocvw/activex-shdocvw-tests.ts b/types/activex-shdocvw/activex-shdocvw-tests.ts new file mode 100644 index 0000000000..713578fb06 --- /dev/null +++ b/types/activex-shdocvw/activex-shdocvw-tests.ts @@ -0,0 +1,12 @@ +// https://msdn.microsoft.com/en-us/library/aa752044(v=vs.85).aspx +(() => { + const ie = new ActiveXObject('InternetExplorer.Application'); + ie.Navigate('http://contoso.com'); + ie.Visible = true; +})(); + +let obj1 = new ActiveXObject('ShellNameSpace.ShellNameSpace'); + +let obj2 = new ActiveXObject('Shell.UIHelper'); + +let obj3 = new ActiveXObject('Shell.Explorer'); diff --git a/types/activex-shdocvw/index.d.ts b/types/activex-shdocvw/index.d.ts new file mode 100644 index 0000000000..86568f6c5d --- /dev/null +++ b/types/activex-shdocvw/index.d.ts @@ -0,0 +1,1577 @@ +// Type definitions for Microsoft Internet Controls - SHDocVw 1.1 +// Project: https://msdn.microsoft.com/en-us/library/aa752040(v=vs.85).aspx +// Definitions by: Zev Spitz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +declare namespace SHDocVw { + // tslint:disable-next-line no-const-enum + const enum BrowserBarConstants { + AddressBar = 0x0009, + Tools = 0x000A, + Links = 0x000B, + Search = '{30D02401-6A81-11D0-8274-00C04FD5AE38}', + Favorites = '{EFA24E61-B078-11D0-89E4-00C04FC9E26E}', + History = '{EFA24E62-B078-11D0-89E4-00C04FC9E26E}', + Channels = '{EFA24E63-B078-11D0-89E4-00C04FC9E26E}' + } + + // tslint:disable-next-line no-const-enum + const enum BrowserNavConstants { + /** Open the resource or file in a new window. */ + OpenInNewWindow = 1, + + /** Do not add the resource or file to the history list. The new page replaces the current page in the list. */ + NoHistory = 2, + + /** If the navigation fails, the autosearch functionality attempts to navigate common root domains (.com, .edu, and so on). If this also fails, the URL is passed to a search engine. */ + AllowAutosearch = 16, + + /** Causes the current Explorer Bar to navigate to the given item, if possible. */ + BrowserBar = 32, + + /** + * Internet Explorer 6 for Windows XP SP2 and later. If the navigation fails when a hyperlink is being followed, this constant specifies that the resource should then be bound to the + * moniker using the [**BINDF_HYPERLINK**](https://msdn.microsoft.com/en-us/library/ms775130(v=vs.85).aspx) flag. + */ + Hyperlink = 64, + + /** Internet Explorer 6 for Windows XP SP2 and later. Force the URL into the restricted zone. */ + EnforceRestricted = 128, + + /** Internet Explorer 6 for Windows XP SP2 and later. Use the default Popup Manager to block pop-up windows. */ + NewWindowsManaged = 256, + + /** Internet Explorer 6 for Windows XP SP2 and later. Block files that normally trigger a file download dialog box. */ + UntrustedForDownload = 512, + + /** Internet Explorer 6 for Windows XP SP2 and later. Prompt for the installation of ActiveX controls. */ + TrustedForActiveX = 1024, + + /** Internet Explorer 7. Open the resource or file in a new tab. Allow the destination window to come to the foreground, if necessary. */ + OpenInNewTab = 2048, + + /** Internet Explorer 7. Open the resource or file in a new background tab; the currently active window and/or tab remains open on top. */ + OpenInBackgroundTab = 4096, + + /** + * Internet Explorer 7. Maintain state for dynamic navigation based on the filter string entered in the search band text box (wordwheel). Restore the wordwheel text when the navigation + * completes. + */ + KeepWordWheelText = 8192, + + /** + * Internet Explorer 8. Open the resource as a replacement for the current or target tab. The existing tab is closed while the new tab takes its place in the tab bar and replaces it in the + * tab group, if any. Browser history is copied forward to the new tab. On Windows Vista, this flag is implied if the navigation would cross integrity levels and **navOpenInNewTab**, + * **navOpenInBackgroundTab**, or **navOpenInNewWindow**> is not specified. + */ + VirtualTab = 16384, + + /** + * Internet Explorer 8. Block cross-domain redirect requests. The navigation triggers the + * [**DWebBrowserEvents2::RedirectXDomainBlocked**](https://msdn.microsoft.com/en-us/library/dd565686(v=vs.85).aspx) event if blocked. + */ + BlockRedirectsXDomain = 32768, + + /** Internet Explorer 8 and later. Open the resource in a new tab that becomes the foreground tab. */ + OpenNewForegroundTab = 65536 + } + + /** Constants for WebBrowser CommandStateChange */ + // tslint:disable-next-line no-const-enum + const enum CommandStateChangeConstants { + CSC_NAVIGATEBACK = 2, + CSC_NAVIGATEFORWARD = 1, + CSC_UPDATECOMMANDS = -1, + } + + /** Constants for WebBrowser NewProcess notification */ + // tslint:disable-next-line no-const-enum + const enum NewProcessCauseConstants { + ProtectedModeRedirect = 1, + } + + // tslint:disable-next-line no-const-enum + const enum OLECMDEXECOPT { + OLECMDEXECOPT_DODEFAULT = 0, + OLECMDEXECOPT_DONTPROMPTUSER = 2, + OLECMDEXECOPT_PROMPTUSER = 1, + OLECMDEXECOPT_SHOWHELP = 3, + } + + // tslint:disable-next-line no-const-enum + const enum OLECMDF { + OLECMDF_DEFHIDEONCTXTMENU = 32, + OLECMDF_ENABLED = 2, + OLECMDF_INVISIBLE = 16, + OLECMDF_LATCHED = 4, + OLECMDF_NINCHED = 8, + OLECMDF_SUPPORTED = 1, + } + + // tslint:disable-next-line no-const-enum + const enum OLECMDID { + OLECMDID_ACTIVEXINSTALLSCOPE = 66, + OLECMDID_ADDTRAVELENTRY = 60, + OLECMDID_ALLOWUILESSSAVEAS = 46, + OLECMDID_CLEARSELECTION = 18, + OLECMDID_CLOSE = 45, + OLECMDID_COPY = 12, + OLECMDID_CUT = 11, + OLECMDID_DELETE = 33, + OLECMDID_DONTDOWNLOADCSS = 47, + OLECMDID_ENABLE_INTERACTION = 36, + OLECMDID_ENABLE_VISIBILITY = 77, + OLECMDID_EXITFULLSCREEN = 81, + OLECMDID_FIND = 32, + OLECMDID_FOCUSVIEWCONTROLS = 57, + OLECMDID_FOCUSVIEWCONTROLSQUERY = 58, + OLECMDID_GETPRINTTEMPLATE = 52, + OLECMDID_GETUSERSCALABLE = 75, + OLECMDID_GETZOOMRANGE = 20, + OLECMDID_HIDETOOLBARS = 24, + OLECMDID_HTTPEQUIV = 34, + OLECMDID_HTTPEQUIV_DONE = 35, + OLECMDID_LAYOUT_VIEWPORT_WIDTH = 71, + OLECMDID_MEDIA_PLAYBACK = 78, + OLECMDID_NEW = 2, + OLECMDID_ONBEFOREUNLOAD = 83, + OLECMDID_ONTOOLBARACTIVATED = 31, + OLECMDID_ONUNLOAD = 37, + OLECMDID_OPEN = 1, + OLECMDID_OPTICAL_GETZOOMRANGE = 64, + OLECMDID_OPTICAL_ZOOM = 63, + OLECMDID_PAGEACTIONBLOCKED = 55, + OLECMDID_PAGEACTIONUIQUERY = 56, + OLECMDID_PAGEAVAILABLE = 74, + OLECMDID_PAGESETUP = 8, + OLECMDID_PASTE = 13, + OLECMDID_PASTESPECIAL = 14, + OLECMDID_POPSTATEEVENT = 69, + OLECMDID_PREREFRESH = 39, + OLECMDID_PRINT = 6, + OLECMDID_PRINT2 = 49, + OLECMDID_PRINTPREVIEW = 7, + OLECMDID_PRINTPREVIEW2 = 50, + OLECMDID_PROPERTIES = 10, + OLECMDID_PROPERTYBAG2 = 38, + OLECMDID_REDO = 16, + OLECMDID_REFRESH = 22, + OLECMDID_SAVE = 3, + OLECMDID_SAVEAS = 4, + OLECMDID_SAVECOPYAS = 5, + OLECMDID_SCROLLCOMPLETE = 82, + OLECMDID_SELECTALL = 17, + OLECMDID_SET_HOST_FULLSCREENMODE = 80, + OLECMDID_SETDOWNLOADSTATE = 29, + OLECMDID_SETFAVICON = 79, + OLECMDID_SETPRINTTEMPLATE = 51, + OLECMDID_SETPROGRESSMAX = 25, + OLECMDID_SETPROGRESSPOS = 26, + OLECMDID_SETPROGRESSTEXT = 27, + OLECMDID_SETTITLE = 28, + OLECMDID_SHOWFIND = 42, + OLECMDID_SHOWMESSAGE = 41, + OLECMDID_SHOWMESSAGE_BLOCKABLE = 84, + OLECMDID_SHOWPAGEACTIONMENU = 59, + OLECMDID_SHOWPAGESETUP = 43, + OLECMDID_SHOWPRINT = 44, + OLECMDID_SHOWSCRIPTERROR = 40, + OLECMDID_SHOWTASKDLG = 68, + OLECMDID_SHOWTASKDLG_BLOCKABLE = 85, + OLECMDID_SPELL = 9, + OLECMDID_STOP = 23, + OLECMDID_STOPDOWNLOAD = 30, + OLECMDID_UNDO = 15, + OLECMDID_UPDATE_CARET = 76, + OLECMDID_UPDATEBACKFORWARDSTATE = 62, + OLECMDID_UPDATECOMMANDS = 21, + OLECMDID_UPDATEPAGESTATUS = 48, + OLECMDID_UPDATETRAVELENTRY = 61, + OLECMDID_UPDATETRAVELENTRY_DATARECOVERY = 67, + OLECMDID_USER_OPTICAL_ZOOM = 73, + OLECMDID_VIEWPORT_MODE = 70, + OLECMDID_VISUAL_VIEWPORT_EXCLUDE_BOTTOM = 72, + OLECMDID_WINDOWSTATECHANGED = 65, + OLECMDID_ZOOM = 19, + } + + // tslint:disable-next-line no-const-enum + const enum RefreshConstants { + Normal = 0, + IfExpired = 1, + Completely = 3 + } + + /** Constants for WebBrowser security icon notification */ + // tslint:disable-next-line no-const-enum + const enum SecureLockIconConstants { + secureLockIconMixed = 1, + secureLockIconSecure128Bit = 6, + secureLockIconSecure40Bit = 3, + secureLockIconSecure56Bit = 4, + secureLockIconSecureFortezza = 5, + secureLockIconSecureUnknownBits = 2, + secureLockIconUnsecure = 0, + } + + /** Options for ShellWindows FindWindow */ + // tslint:disable-next-line no-const-enum + const enum ShellWindowFindWindowOptions { + SWFO_COOKIEPASSED = 4, + SWFO_INCLUDEPENDING = 2, + SWFO_NEEDDISPATCH = 1, + } + + /** Constants for ShellWindows registration */ + // tslint:disable-next-line no-const-enum + const enum ShellWindowTypeConstants { + SWC_3RDPARTY = 2, + SWC_BROWSER = 1, + SWC_CALLBACK = 4, + SWC_DESKTOP = 8, + SWC_EXPLORER = 0, + } + + // tslint:disable-next-line no-const-enum + const enum tagREADYSTATE { + READYSTATE_COMPLETE = 4, + READYSTATE_INTERACTIVE = 3, + READYSTATE_LOADED = 2, + READYSTATE_LOADING = 1, + READYSTATE_UNINITIALIZED = 0, + } + + type TargetFrameValues = '_blank' | '_parent' | '_self' | '_top' ; + + class CScriptErrorList { + private 'SHDocVw.CScriptErrorList_typekey': CScriptErrorList; + private constructor(); + advanceError(): void; + canAdvanceError(): number; + canRetreatError(): number; + getAlwaysShowLockState(): number; + getDetailsPaneOpen(): number; + getErrorChar(): number; + getErrorCode(): number; + getErrorLine(): number; + getErrorMsg(): string; + getErrorUrl(): string; + getPerErrorDisplay(): number; + retreatError(): void; + setDetailsPaneOpen(fDetailsPaneOpen: number): void; + setPerErrorDisplay(fPerErrorDisplay: number): void; + } + + /** Internet Explorer Application. */ + class InternetExplorer { + private 'SHDocVw.InternetExplorer_typekey': InternetExplorer; + private constructor(); + + /** Controls whether address bar is shown */ + AddressBar: boolean; + + /** Returns the application automation object if accessible, this automation object otherwise.. */ + readonly Application: any; + + /** Query to see if something is still in progress. */ + readonly Busy: boolean; + + /** Converts client sizes into window sizes. */ + ClientToWindow(pcx: number, pcy: number): void; + + /** Returns the container/parent automation object, if any. */ + readonly Container: any; + + /** Returns the active Document automation object, if any. */ + readonly Document: any; + + /** IOleCommandTarget::Exec */ + ExecWB(cmdID: OLECMDID, cmdexecopt: OLECMDEXECOPT, pvaIn?: any, pvaOut?: any): void; + + /** Returns file specification of the application, including path. */ + readonly FullName: string; + + /** Maximizes window and turns off statusbar, toolbar, menubar, and titlebar. */ + FullScreen: boolean; + + /** Retrieve the Associated value for the property vtValue in the context of the object. */ + GetProperty(Property: string): any; + + /** Navigates to the previous item in the history list. */ + GoBack(): void; + + /** Navigates to the next item in the history list. */ + GoForward(): void; + + /** Go home/start page. */ + GoHome(): void; + + /** Go Search Page. */ + GoSearch(): void; + + /** The vertical dimension (pixels) of the frame window/object. */ + Height: number; + + /** Returns the HWND of the current IE window. */ + readonly HWND: number; + + /** The horizontal position (pixels) of the frame window relative to the screen/container. */ + Left: number; + + /** Gets the short (UI-friendly) name of the URL/file currently viewed. */ + readonly LocationName: string; + + /** Gets the full URL/path currently viewed. */ + readonly LocationURL: string; + + /** Controls whether menubar is shown. */ + MenuBar: boolean; + + /** Returns name of the application. */ + readonly Name: string; + + /** Navigates to a URL or file. */ + Navigate(URL: string, Flags?: BrowserNavConstants, TargetFrameName?: TargetFrameValues | string, PostData?: any, Headers?: string): void; + + /** Navigates to a URL or file or pidl. */ + Navigate2(URL: any, Flags?: BrowserNavConstants, TargetFrameName?: TargetFrameValues | string, PostData?: any, Headers?: string): void; + + /** Controls if the frame is offline (read from cache) */ + Offline: boolean; + + /** Returns the automation object of the container/parent if one exists or this automation object. */ + readonly Parent: any; + + /** Returns the path to the application. */ + readonly Path: string; + + /** Associates vtValue with the name szProperty in the context of the object. */ + PutProperty(Property: string, vtValue: any): void; + + /** IOleCommandTarget::QueryStatus */ + QueryStatusWB(cmdID: OLECMDID): OLECMDF; + + /** Exits application and closes the open document. */ + Quit(): void; + readonly ReadyState: tagREADYSTATE; + + /** Refresh the currently viewed page. */ + Refresh(): void; + + /** Refresh the currently viewed page. */ + Refresh2(Level?: RefreshConstants): void; + + /** Registers OC as a top-level browser (for target name resolution) */ + RegisterAsBrowser: boolean; + + /** Registers OC as a drop target for navigation */ + RegisterAsDropTarget: boolean; + + /** Controls whether the window is resizable */ + Resizable: boolean; + + /** Set BrowserBar to Clsid */ + ShowBrowserBar(pvaClsid: string | BrowserBarConstants, pvarShow?: boolean): void; + + /** Controls if any dialog boxes can be shown */ + Silent: boolean; + + /** Turn on or off the statusbar. */ + StatusBar: boolean; + + /** Text of Status window. */ + StatusText: string; + + /** Stops opening a file. */ + Stop(): void; + + /** Controls if the browser is in theater mode */ + TheaterMode: boolean; + + /** Controls which toolbar is shown. */ + ToolBar: number; + + /** The vertical position (pixels) of the frame window relative to the screen/container. */ + Top: number; + + /** Returns True if this is the top level object. */ + readonly TopLevelContainer: boolean; + + /** Returns the type of the contained document object. */ + readonly Type: string; + + /** Determines whether the application is visible or hidden. */ + Visible: boolean; + + /** The horizontal dimension (pixels) of the frame window/object. */ + Width: number; + } + + /** Internet Explorer Application with default integrity of Medium */ + class InternetExplorerMedium { + private 'SHDocVw.InternetExplorerMedium_typekey': InternetExplorerMedium; + private constructor(); + + /** Controls whether address bar is shown */ + AddressBar: boolean; + + /** Returns the application automation object if accessible, this automation object otherwise.. */ + readonly Application: any; + + /** Query to see if something is still in progress. */ + readonly Busy: boolean; + + /** Converts client sizes into window sizes. */ + ClientToWindow(pcx: number, pcy: number): void; + + /** Returns the container/parent automation object, if any. */ + readonly Container: any; + + /** Returns the active Document automation object, if any. */ + readonly Document: any; + + /** IOleCommandTarget::Exec */ + ExecWB(cmdID: OLECMDID, cmdexecopt: OLECMDEXECOPT, pvaIn?: any, pvaOut?: any): void; + + /** Returns file specification of the application, including path. */ + readonly FullName: string; + + /** Maximizes window and turns off statusbar, toolbar, menubar, and titlebar. */ + FullScreen: boolean; + + /** Retrieve the Associated value for the property vtValue in the context of the object. */ + GetProperty(Property: string): any; + + /** Navigates to the previous item in the history list. */ + GoBack(): void; + + /** Navigates to the next item in the history list. */ + GoForward(): void; + + /** Go home/start page. */ + GoHome(): void; + + /** Go Search Page. */ + GoSearch(): void; + + /** The vertical dimension (pixels) of the frame window/object. */ + Height: number; + + /** Returns the HWND of the current IE window. */ + readonly HWND: number; + + /** The horizontal position (pixels) of the frame window relative to the screen/container. */ + Left: number; + + /** Gets the short (UI-friendly) name of the URL/file currently viewed. */ + readonly LocationName: string; + + /** Gets the full URL/path currently viewed. */ + readonly LocationURL: string; + + /** Controls whether menubar is shown. */ + MenuBar: boolean; + + /** Returns name of the application. */ + readonly Name: string; + + /** Navigates to a URL or file. */ + Navigate(URL: string, Flags?: BrowserNavConstants, TargetFrameName?: TargetFrameValues | string, PostData?: any, Headers?: string): void; + + /** Navigates to a URL or file or pidl. */ + Navigate2(URL: any, Flags?: BrowserNavConstants, TargetFrameName?: TargetFrameValues | string, PostData?: any, Headers?: string): void; + + /** Controls if the frame is offline (read from cache) */ + Offline: boolean; + + /** Returns the automation object of the container/parent if one exists or this automation object. */ + readonly Parent: any; + + /** Returns the path to the application. */ + readonly Path: string; + + /** Associates vtValue with the name szProperty in the context of the object. */ + PutProperty(Property: string, vtValue: any): void; + + /** IOleCommandTarget::QueryStatus */ + QueryStatusWB(cmdID: OLECMDID): OLECMDF; + + /** Exits application and closes the open document. */ + Quit(): void; + readonly ReadyState: tagREADYSTATE; + + /** Refresh the currently viewed page. */ + Refresh(): void; + + /** Refresh the currently viewed page. */ + Refresh2(Level?: RefreshConstants): void; + + /** Registers OC as a top-level browser (for target name resolution) */ + RegisterAsBrowser: boolean; + + /** Registers OC as a drop target for navigation */ + RegisterAsDropTarget: boolean; + + /** Controls whether the window is resizable */ + Resizable: boolean; + + /** Set BrowserBar to Clsid */ + ShowBrowserBar(pvaClsid: string | BrowserBarConstants, pvarShow?: boolean): void; + + /** Controls if any dialog boxes can be shown */ + Silent: boolean; + + /** Turn on or off the statusbar. */ + StatusBar: boolean; + + /** Text of Status window. */ + StatusText: string; + + /** Stops opening a file. */ + Stop(): void; + + /** Controls if the browser is in theater mode */ + TheaterMode: boolean; + + /** Controls which toolbar is shown. */ + ToolBar: number; + + /** The vertical position (pixels) of the frame window relative to the screen/container. */ + Top: number; + + /** Returns True if this is the top level object. */ + readonly TopLevelContainer: boolean; + + /** Returns the type of the contained document object. */ + readonly Type: string; + + /** Determines whether the application is visible or hidden. */ + Visible: boolean; + + /** The horizontal dimension (pixels) of the frame window/object. */ + Width: number; + } + + /** Shell Browser Window. */ + class ShellBrowserWindow { + private 'SHDocVw.ShellBrowserWindow_typekey': ShellBrowserWindow; + private constructor(); + + /** Controls whether address bar is shown */ + AddressBar: boolean; + + /** Returns the application automation object if accessible, this automation object otherwise.. */ + readonly Application: any; + + /** Query to see if something is still in progress. */ + readonly Busy: boolean; + + /** Converts client sizes into window sizes. */ + ClientToWindow(pcx: number, pcy: number): void; + + /** Returns the container/parent automation object, if any. */ + readonly Container: any; + + /** Returns the active Document automation object, if any. */ + readonly Document: any; + + /** IOleCommandTarget::Exec */ + ExecWB(cmdID: OLECMDID, cmdexecopt: OLECMDEXECOPT, pvaIn?: any, pvaOut?: any): void; + + /** Returns file specification of the application, including path. */ + readonly FullName: string; + + /** Maximizes window and turns off statusbar, toolbar, menubar, and titlebar. */ + FullScreen: boolean; + + /** Retrieve the Associated value for the property vtValue in the context of the object. */ + GetProperty(Property: string): any; + + /** Navigates to the previous item in the history list. */ + GoBack(): void; + + /** Navigates to the next item in the history list. */ + GoForward(): void; + + /** Go home/start page. */ + GoHome(): void; + + /** Go Search Page. */ + GoSearch(): void; + + /** The vertical dimension (pixels) of the frame window/object. */ + Height: number; + + /** Returns the HWND of the current IE window. */ + readonly HWND: number; + + /** The horizontal position (pixels) of the frame window relative to the screen/container. */ + Left: number; + + /** Gets the short (UI-friendly) name of the URL/file currently viewed. */ + readonly LocationName: string; + + /** Gets the full URL/path currently viewed. */ + readonly LocationURL: string; + + /** Controls whether menubar is shown. */ + MenuBar: boolean; + + /** Returns name of the application. */ + readonly Name: string; + + /** Navigates to a URL or file. */ + Navigate(URL: string, Flags?: BrowserNavConstants, TargetFrameName?: TargetFrameValues | string, PostData?: any, Headers?: string): void; + + /** Navigates to a URL or file or pidl. */ + Navigate2(URL: any, Flags?: BrowserNavConstants, TargetFrameName?: TargetFrameValues | string, PostData?: any, Headers?: string): void; + + /** Controls if the frame is offline (read from cache) */ + Offline: boolean; + + /** Returns the automation object of the container/parent if one exists or this automation object. */ + readonly Parent: any; + + /** Returns the path to the application. */ + readonly Path: string; + + /** Associates vtValue with the name szProperty in the context of the object. */ + PutProperty(Property: string, vtValue: any): void; + + /** IOleCommandTarget::QueryStatus */ + QueryStatusWB(cmdID: OLECMDID): OLECMDF; + + /** Exits application and closes the open document. */ + Quit(): void; + readonly ReadyState: tagREADYSTATE; + + /** Refresh the currently viewed page. */ + Refresh(): void; + + /** Refresh the currently viewed page. */ + Refresh2(Level?: RefreshConstants): void; + + /** Registers OC as a top-level browser (for target name resolution) */ + RegisterAsBrowser: boolean; + + /** Registers OC as a drop target for navigation */ + RegisterAsDropTarget: boolean; + + /** Controls whether the window is resizable */ + Resizable: boolean; + + /** Set BrowserBar to Clsid */ + ShowBrowserBar(pvaClsid: string | BrowserBarConstants, pvarShow?: boolean): void; + + /** Controls if any dialog boxes can be shown */ + Silent: boolean; + + /** Turn on or off the statusbar. */ + StatusBar: boolean; + + /** Text of Status window. */ + StatusText: string; + + /** Stops opening a file. */ + Stop(): void; + + /** Controls if the browser is in theater mode */ + TheaterMode: boolean; + + /** Controls which toolbar is shown. */ + ToolBar: number; + + /** The vertical position (pixels) of the frame window relative to the screen/container. */ + Top: number; + + /** Returns True if this is the top level object. */ + readonly TopLevelContainer: boolean; + + /** Returns the type of the contained document object. */ + readonly Type: string; + + /** Determines whether the application is visible or hidden. */ + Visible: boolean; + + /** The horizontal dimension (pixels) of the frame window/object. */ + Width: number; + } + + class ShellNameSpace { + private 'SHDocVw.ShellNameSpace_typekey': ShellNameSpace; + private constructor(); + Columns: string; + + /** number of view types */ + readonly CountViewTypes: number; + + /** method CreateSubscriptionForSelection */ + CreateSubscriptionForSelection(): boolean; + + /** method DeleteSubscriptionForSelection */ + DeleteSubscriptionForSelection(): boolean; + Depth: number; + + /** options */ + EnumOptions: number; + + /** expands item specified depth */ + Expand(var_0: any, iDepth: number): void; + + /** method Export */ + Export(): void; + Flags: number; + + /** method Import */ + Import(): void; + + /** method InvokeContextMenuCommand */ + InvokeContextMenuCommand(strCommand: string): void; + Mode: number; + + /** method MoveSelectionDown */ + MoveSelectionDown(): void; + + /** method MoveSelectionTo */ + MoveSelectionTo(): void; + + /** method MoveSelectionUp */ + MoveSelectionUp(): void; + + /** method NewFolder */ + NewFolder(): void; + + /** method ResetSort */ + ResetSort(): void; + + /** get the root item */ + Root: any; + + /** get the selected item */ + SelectedItem: any; + + /** collection of selected items */ + SelectedItems(): any; + + /** old, use put_Root() instead */ + SetRoot(bstrFullPath: string): void; + + /** set view type */ + SetViewType(iType: number): void; + + /** Query to see if subscriptions are enabled */ + readonly SubscriptionsEnabled: boolean; + + /** method Synchronize */ + Synchronize(): void; + TVFlags: number; + + /** unselects all items */ + UnselectAll(): void; + } + + class ShellUIHelper { + private 'SHDocVw.ShellUIHelper_typekey': ShellUIHelper; + private constructor(); + AddChannel(URL: string): void; + AddDesktopComponent(URL: string, Type: string, Left?: any, Top?: any, Width?: any, Height?: any): void; + AddFavorite(URL: string, Title?: any): void; + AddSearchProvider(URL: string): void; + AddService(URL: string): void; + AddToFavoritesBar(URL: string, Title: string, Type?: any): void; + AutoCompleteAttach(Reserved?: any): void; + AutoCompleteSaveForm(Form?: any): void; + AutoScan(strSearch: string, strFailureUrl: string, pvarTargetFrame?: any): void; + BrandImageUri(): string; + BuildNewTabPage(): void; + ContentDiscoveryReset(): void; + CustomizeClearType(fSet: boolean): void; + CustomizeSettings(fSQM: boolean, fPhishing: boolean, bstrLocale: string): void; + DefaultSearchProvider(): string; + DiagnoseConnection(): void; + EnableSuggestedSites(fEnable: boolean): void; + GetCVListData(): string; + GetCVListLocalData(): string; + GetEMIEListData(): string; + GetEMIEListLocalData(): string; + GetExperimentalFlag(bstrFlagString: string): boolean; + GetExperimentalValue(bstrValueString: string): number; + GetNeedIEAutoLaunchFlag(bstrUrl: string): boolean; + HasNeedIEAutoLaunchFlag(bstrUrl: string): boolean; + ImportExportFavorites(fImport: boolean, strImpExpPath: string): void; + InPrivateFilteringEnabled(): boolean; + IsSearchMigrated(): boolean; + IsSearchProviderInstalled(URL: string): number; + IsServiceInstalled(URL: string, Verb: string): number; + IsSubscribed(URL: string): boolean; + IsSuggestedSitesEnabled(): boolean; + LaunchIE(bstrUrl: string, automated: boolean): void; + LaunchInHVSI(bstrUrl: string): void; + msActiveXFilteringEnabled(): boolean; + msAddSiteMode(): void; + msAddTrackingProtectionList(URL: string, bstrFilterName: string): void; + msChangeDefaultBrowser(fChange: boolean): void; + msClearTile(): void; + msDiagnoseConnectionUILess(): void; + msEnableTileNotificationQueue(fChange: boolean): void; + msEnableTileNotificationQueueForSquare150x150(fChange: boolean): void; + msEnableTileNotificationQueueForSquare310x310(fChange: boolean): void; + msEnableTileNotificationQueueForWide310x150(fChange: boolean): void; + msIsSiteMode(): boolean; + msIsSiteModeFirstRun(fPreserveState: boolean): any; + msLaunchInternetOptions(): void; + msLaunchNetworkClientHelp(): void; + msPinnedSiteState(): any; + msProvisionNetworks(bstrProvisioningXml: string): any; + msRemoveScheduledTileNotification(bstrNotificationId: string): void; + msReportSafeUrl(): void; + msScheduledTileNotification(bstrNotificationXml: string, bstrNotificationId: string, bstrNotificationTag: string, startTime?: any, expirationTime?: any): void; + msSiteModeActivate(): void; + msSiteModeAddButtonStyle(uiButtonID: any, bstrIconURL: string, bstrTooltip: string): any; + msSiteModeAddJumpListItem(bstrName: string, bstrActionUri: string, bstrIconUri: string, pvarWindowType?: any): void; + msSiteModeAddThumbBarButton(bstrIconURL: string, bstrTooltip: string): any; + msSiteModeClearBadge(): void; + msSiteModeClearIconOverlay(): void; + msSiteModeClearJumpList(): void; + msSiteModeCreateJumpList(bstrHeader: string): void; + msSiteModeRefreshBadge(): void; + msSiteModeSetIconOverlay(IconUrl: string, pvarDescription?: any): void; + msSiteModeShowButtonStyle(uiButtonID: any, uiStyleID: any): void; + msSiteModeShowJumpList(): void; + msSiteModeShowThumbBar(): void; + msSiteModeUpdateThumbBarButton(ButtonID: any, fEnabled: boolean, fVisible: boolean): void; + msStartPeriodicBadgeUpdate(pollingUri: string, startTime?: any, uiUpdateRecurrence?: any): void; + msStartPeriodicTileUpdate(pollingUris: any, startTime?: any, uiUpdateRecurrence?: any): void; + msStartPeriodicTileUpdateBatch(pollingUris: any, startTime?: any, uiUpdateRecurrence?: any): void; + msStopPeriodicBadgeUpdate(): void; + msStopPeriodicTileUpdate(): void; + msTrackingProtectionEnabled(): boolean; + NavigateAndFind(URL: string, strQuery: string, varTargetFrame: any): void; + NavigateToSuggestedSites(bstrRelativeUrl: string): void; + OpenFavoritesPane(): void; + OpenFavoritesSettings(): void; + PhishingEnabled(): boolean; + RefreshOfflineDesktop(): void; + ResetAllExperimentalFlagsAndValues(): void; + ResetFirstBootMode(): void; + ResetSafeMode(): void; + RunOnceHasShown(): boolean; + RunOnceRequiredSettingsComplete(fComplete: boolean): void; + RunOnceShown(): void; + SearchGuideUrl(): string; + SetActivitiesVisible(fVisible: boolean): void; + SetExperimentalFlag(bstrFlagString: string, vfFlag: boolean): void; + SetExperimentalValue(bstrValueString: string, dwValue: number): void; + SetNeedIEAutoLaunchFlag(bstrUrl: string, flag: boolean): void; + SetRecentlyClosedVisible(fVisible: boolean): void; + ShowBrowserUI(bstrName: string, pvarIn: any): any; + ShowInPrivateHelp(): void; + ShowTabsHelp(): void; + SkipRunOnce(): void; + SkipTabsWelcome(): void; + SqmEnabled(): boolean; + } + + /** ShellDispatch Load in Shell Context */ + class ShellWindows { + private 'SHDocVw.ShellWindows_typekey': ShellWindows; + private constructor(); + + /** Get count of open Shell windows */ + readonly Count: number; + + /** Find the window based on the location */ + FindWindowSW(pvarloc: any, pvarlocRoot: any, swClass: number, pHWND: number, swfwOptions: number): any; + + /** Return the shell window for the given index */ + Item(index?: any): any; + + /** Notifies the activation */ + OnActivated(lCookie: number, fActive: boolean): void; + + /** Notifies on creation and frame name set */ + OnCreated(lCookie: number, punk: any): void; + + /** Notifies the new location */ + OnNavigate(lCookie: number, pvarloc: any): void; + + /** Used by IExplore to register different processes */ + ProcessAttachDetach(fAttach: boolean): void; + + /** Register a window with the list */ + Register(pid: any, HWND: number, swClass: number, plCookie: number): void; + + /** Register a pending open with the list */ + RegisterPending(lThreadId: number, pvarloc: any, pvarlocRoot: any, swClass: number, plCookie: number): void; + + /** Remove a window from the list */ + Revoke(lCookie: number): void; + } + + /** WebBrowser Control */ + class WebBrowser { + private 'SHDocVw.WebBrowser_typekey': WebBrowser; + private constructor(); + + /** Controls whether address bar is shown (ignored by WebBrowser) */ + AddressBar: boolean; + + /** Returns the application automation object if accessible, this automation object otherwise.. */ + readonly Application: any; + + /** Query to see if something is still in progress. */ + readonly Busy: boolean; + + /** Converts client sizes into window sizes. */ + ClientToWindow(pcx: number, pcy: number): void; + + /** Returns the container/parent automation object, if any. */ + readonly Container: any; + + /** Returns the active Document automation object, if any. */ + readonly Document: any; + + /** IOleCommandTarget::Exec */ + ExecWB(cmdID: OLECMDID, cmdexecopt: OLECMDEXECOPT, pvaIn?: any, pvaOut?: any): void; + + /** Returns file specification of the application, including path. */ + readonly FullName: string; + + /** Maximizes window and turns off statusbar, toolbar, menubar, and titlebar. */ + FullScreen: boolean; + + /** Retrieve the Associated value for the property vtValue in the context of the object. */ + GetProperty(Property: string): any; + + /** Navigates to the previous item in the history list. */ + GoBack(): void; + + /** Navigates to the next item in the history list. */ + GoForward(): void; + + /** Go home/start page. */ + GoHome(): void; + + /** Go Search Page. */ + GoSearch(): void; + + /** The vertical dimension (pixels) of the frame window/object. */ + Height: number; + + /** Returns the HWND of the current IE window. */ + readonly HWND: number; + + /** The horizontal position (pixels) of the frame window relative to the screen/container. */ + Left: number; + + /** Gets the short (UI-friendly) name of the URL/file currently viewed. */ + readonly LocationName: string; + + /** Gets the full URL/path currently viewed. */ + readonly LocationURL: string; + + /** Controls whether menubar is shown. */ + MenuBar: boolean; + + /** Returns name of the application. */ + readonly Name: string; + + /** Navigates to a URL or file. */ + Navigate(URL: string, Flags?: BrowserNavConstants, TargetFrameName?: TargetFrameValues | string, PostData?: any, Headers?: string): void; + + /** Navigates to a URL or file or pidl. */ + Navigate2(URL: any, Flags?: BrowserNavConstants, TargetFrameName?: TargetFrameValues | string, PostData?: any, Headers?: string): void; + + /** Controls if the frame is offline (read from cache) */ + Offline: boolean; + + /** Returns the automation object of the container/parent if one exists or this automation object. */ + readonly Parent: any; + + /** Returns the path to the application. */ + readonly Path: string; + + /** Associates vtValue with the name szProperty in the context of the object. */ + PutProperty(Property: string, vtValue: any): void; + + /** IOleCommandTarget::QueryStatus */ + QueryStatusWB(cmdID: OLECMDID): OLECMDF; + + /** Exits application and closes the open document. */ + Quit(): void; + readonly ReadyState: tagREADYSTATE; + + /** Refresh the currently viewed page. */ + Refresh(): void; + + /** Refresh the currently viewed page. */ + Refresh2(Level?: RefreshConstants): void; + + /** Registers OC as a top-level browser (for target name resolution) */ + RegisterAsBrowser: boolean; + + /** Registers OC as a drop target for navigation */ + RegisterAsDropTarget: boolean; + + /** Controls whether the window is resizable */ + Resizable: boolean; + + /** Set BrowserBar to Clsid */ + ShowBrowserBar(pvaClsid: string | BrowserBarConstants, pvarShow?: boolean): void; + + /** Controls if any dialog boxes can be shown */ + Silent: boolean; + + /** Turn on or off the statusbar. */ + StatusBar: boolean; + + /** Text of Status window. */ + StatusText: string; + + /** Stops opening a file. */ + Stop(): void; + + /** Controls if the browser is in theater mode */ + TheaterMode: boolean; + + /** Controls which toolbar is shown. */ + ToolBar: number; + + /** The vertical position (pixels) of the frame window relative to the screen/container. */ + Top: number; + + /** Returns True if this is the top level object. */ + readonly TopLevelContainer: boolean; + + /** Returns the type of the contained document object. */ + readonly Type: string; + + /** Determines whether the application is visible or hidden. */ + Visible: boolean; + + /** The horizontal dimension (pixels) of the frame window/object. */ + Width: number; + } + + /** WebBrowser Control */ + class WebBrowser_V1 { + private 'SHDocVw.WebBrowser_V1_typekey': WebBrowser_V1; + private constructor(); + + /** Returns the application automation object if accessible, this automation object otherwise.. */ + readonly Application: any; + + /** Query to see if something is still in progress. */ + readonly Busy: boolean; + + /** Returns the container/parent automation object, if any. */ + readonly Container: any; + + /** Returns the active Document automation object, if any. */ + readonly Document: any; + + /** Navigates to the previous item in the history list. */ + GoBack(): void; + + /** Navigates to the next item in the history list. */ + GoForward(): void; + + /** Go home/start page. */ + GoHome(): void; + + /** Go Search Page. */ + GoSearch(): void; + + /** The vertical dimension (pixels) of the frame window/object. */ + Height: number; + + /** The horizontal position (pixels) of the frame window relative to the screen/container. */ + Left: number; + + /** Gets the short (UI-friendly) name of the URL/file currently viewed. */ + readonly LocationName: string; + + /** Gets the full URL/path currently viewed. */ + readonly LocationURL: string; + + /** Navigates to a URL or file. */ + Navigate(URL: string, Flags?: BrowserNavConstants, TargetFrameName?: TargetFrameValues | string, PostData?: any, Headers?: string): void; + + /** Returns the automation object of the container/parent if one exists or this automation object. */ + readonly Parent: any; + + /** Refresh the currently viewed page. */ + Refresh(): void; + + /** Refresh the currently viewed page. */ + Refresh2(Level?: RefreshConstants): void; + + /** Stops opening a file. */ + Stop(): void; + + /** The vertical position (pixels) of the frame window relative to the screen/container. */ + Top: number; + + /** Returns True if this is the top level object. */ + readonly TopLevelContainer: boolean; + + /** Returns the type of the contained document object. */ + readonly Type: string; + + /** The horizontal dimension (pixels) of the frame window/object. */ + Width: number; + } + + namespace EventHelperTypes { + type InternetExplorer_BeforeNavigate2_ArgNames = ['pDisp', 'URL', 'Flags', 'TargetFrameName', 'PostData', 'Headers', 'Cancel']; + + type InternetExplorerMedium_BeforeNavigate2_ArgNames = ['pDisp', 'URL', 'Flags', 'TargetFrameName', 'PostData', 'Headers', 'Cancel']; + + type ShellBrowserWindow_BeforeNavigate2_ArgNames = ['pDisp', 'URL', 'Flags', 'TargetFrameName', 'PostData', 'Headers', 'Cancel']; + + type ShellNameSpace_FavoritesSelectionChange_ArgNames = ['cItems', 'hItem', 'strName', 'strUrl', 'cVisits', 'strDate', 'fAvailableOffline']; + + type WebBrowser_BeforeNavigate2_ArgNames = ['pDisp', 'URL', 'Flags', 'TargetFrameName', 'PostData', 'Headers', 'Cancel']; + + type WebBrowser_V1_BeforeNavigate_ArgNames = ['URL', 'Flags', 'TargetFrameName', 'PostData', 'Headers', 'Cancel']; + + type WebBrowser_V1_FrameBeforeNavigate_ArgNames = ['URL', 'Flags', 'TargetFrameName', 'PostData', 'Headers', 'Cancel']; + + type WebBrowser_V1_FrameNewWindow_ArgNames = ['URL', 'Flags', 'TargetFrameName', 'PostData', 'Headers', 'Processed']; + + type WebBrowser_V1_NewWindow_ArgNames = ['URL', 'Flags', 'TargetFrameName', 'PostData', 'Headers', 'Processed']; + + interface InternetExplorer_BeforeNavigate2_Parameter { + Cancel: boolean; + readonly Flags: any; + readonly Headers: any; + readonly pDisp: any; + readonly PostData: any; + readonly TargetFrameName: any; + readonly URL: any; + } + + interface InternetExplorerMedium_BeforeNavigate2_Parameter { + Cancel: boolean; + readonly Flags: any; + readonly Headers: any; + readonly pDisp: any; + readonly PostData: any; + readonly TargetFrameName: any; + readonly URL: any; + } + + interface ShellBrowserWindow_BeforeNavigate2_Parameter { + Cancel: boolean; + readonly Flags: any; + readonly Headers: any; + readonly pDisp: any; + readonly PostData: any; + readonly TargetFrameName: any; + readonly URL: any; + } + + interface ShellNameSpace_FavoritesSelectionChange_Parameter { + readonly cItems: number; + readonly cVisits: number; + readonly fAvailableOffline: number; + readonly hItem: number; + readonly strDate: string; + readonly strName: string; + readonly strUrl: string; + } + + interface WebBrowser_BeforeNavigate2_Parameter { + Cancel: boolean; + readonly Flags: any; + readonly Headers: any; + readonly pDisp: any; + readonly PostData: any; + readonly TargetFrameName: any; + readonly URL: any; + } + + interface WebBrowser_V1_BeforeNavigate_Parameter { + Cancel: boolean; + readonly Flags: number; + readonly Headers: string; + readonly PostData: any; + readonly TargetFrameName: string; + readonly URL: string; + } + + interface WebBrowser_V1_FrameBeforeNavigate_Parameter { + Cancel: boolean; + readonly Flags: number; + readonly Headers: string; + readonly PostData: any; + readonly TargetFrameName: string; + readonly URL: string; + } + + interface WebBrowser_V1_FrameNewWindow_Parameter { + readonly Flags: number; + readonly Headers: string; + readonly PostData: any; + Processed: boolean; + readonly TargetFrameName: string; + readonly URL: string; + } + + interface WebBrowser_V1_NewWindow_Parameter { + readonly Flags: number; + readonly Headers: string; + readonly PostData: any; + Processed: boolean; + readonly TargetFrameName: string; + readonly URL: string; + } + } +} + +interface ActiveXObject { + on( + obj: SHDocVw.InternetExplorer, event: 'BeforeNavigate2', argNames: SHDocVw.EventHelperTypes.InternetExplorer_BeforeNavigate2_ArgNames, + handler: (this: SHDocVw.InternetExplorer, parameter: SHDocVw.EventHelperTypes.InternetExplorer_BeforeNavigate2_Parameter) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'BeforeScriptExecute', argNames: ['pDispWindow'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly pDispWindow: any }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'ClientToHostWindow', argNames: ['CX', 'CY'], handler: (this: SHDocVw.InternetExplorer, parameter: { CX: number, CY: number }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'CommandStateChange', argNames: ['Command', 'Enable'], handler: ( + this: SHDocVw.InternetExplorer, parameter: { readonly Command: number, readonly Enable: boolean }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'DocumentComplete' | 'NavigateComplete2', argNames: ['pDisp', 'URL'], handler: ( + this: SHDocVw.InternetExplorer, parameter: { readonly pDisp: any, readonly URL: any }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'FileDownload', argNames: ['ActiveDocument', 'Cancel'], handler: ( + this: SHDocVw.InternetExplorer, parameter: { readonly ActiveDocument: boolean, Cancel: boolean }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'NavigateError', argNames: ['pDisp', 'URL', 'Frame', 'StatusCode', 'Cancel'], handler: ( + this: SHDocVw.InternetExplorer, parameter: { readonly pDisp: any, readonly URL: any, readonly Frame: any, readonly StatusCode: any, Cancel: boolean }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'NewProcess', argNames: ['lCauseFlag', 'pWB2', 'Cancel'], handler: ( + this: SHDocVw.InternetExplorer, parameter: { readonly lCauseFlag: number, readonly pWB2: any, Cancel: boolean }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'NewWindow2', argNames: ['ppDisp', 'Cancel'], handler: (this: SHDocVw.InternetExplorer, parameter: { ppDisp: any, Cancel: boolean }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'NewWindow3', argNames: ['ppDisp', 'Cancel', 'dwFlags', 'bstrUrlContext', 'bstrUrl'], + handler: (this: SHDocVw.InternetExplorer, parameter: { ppDisp: any, Cancel: boolean, readonly dwFlags: number, readonly bstrUrlContext: string, readonly bstrUrl: string }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'OnFullScreen', argNames: ['FullScreen'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly FullScreen: boolean }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'OnMenuBar', argNames: ['MenuBar'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly MenuBar: boolean }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'OnStatusBar', argNames: ['StatusBar'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly StatusBar: boolean }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'OnTheaterMode', argNames: ['TheaterMode'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly TheaterMode: boolean }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'OnToolBar', argNames: ['ToolBar'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly ToolBar: boolean }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'OnVisible', argNames: ['Visible'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly Visible: boolean }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'PrintTemplateInstantiation' | 'PrintTemplateTeardown', argNames: ['pDisp'], handler: ( + this: SHDocVw.InternetExplorer, parameter: { readonly pDisp: any }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'PrivacyImpactedStateChange', argNames: ['bImpacted'], handler: (this: SHDocVw.InternetExplorer, + parameter: { readonly bImpacted: boolean }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'ProgressChange', argNames: ['Progress', 'ProgressMax'], handler: ( + this: SHDocVw.InternetExplorer, parameter: { readonly Progress: number, readonly ProgressMax: number }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'PropertyChange', argNames: ['szProperty'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly szProperty: string }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'RedirectXDomainBlocked', argNames: ['pDisp', 'StartURL', 'RedirectURL', 'Frame', 'StatusCode'], + handler: (this: SHDocVw.InternetExplorer, parameter: { readonly pDisp: any, readonly StartURL: any, readonly RedirectURL: any, readonly Frame: any, readonly StatusCode: any }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'SetPhishingFilterStatus', argNames: ['PhishingFilterStatus'], handler: ( + this: SHDocVw.InternetExplorer, parameter: { readonly PhishingFilterStatus: number }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'SetSecureLockIcon', argNames: ['SecureLockIcon'], handler: (this: SHDocVw.InternetExplorer, + parameter: { readonly SecureLockIcon: number }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'StatusTextChange' | 'TitleChange', argNames: ['Text'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly Text: string }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'ThirdPartyUrlBlocked', argNames: ['URL', 'dwCount'], handler: ( + this: SHDocVw.InternetExplorer, parameter: { readonly URL: any, readonly dwCount: number }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'UpdatePageStatus', argNames: ['pDisp', 'nPage', 'fDone'], handler: ( + this: SHDocVw.InternetExplorer, parameter: { readonly pDisp: any, readonly nPage: any, readonly fDone: any }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'WebWorkerFinsihed', argNames: ['dwUniqueID'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly dwUniqueID: number }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'WebWorkerStarted', argNames: ['dwUniqueID', 'bstrWorkerLabel'], handler: ( + this: SHDocVw.InternetExplorer, parameter: { readonly dwUniqueID: number, readonly bstrWorkerLabel: string }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'WindowClosing', argNames: ['IsChildWindow', 'Cancel'], handler: ( + this: SHDocVw.InternetExplorer, parameter: { readonly IsChildWindow: boolean, Cancel: boolean }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'WindowSetHeight', argNames: ['Height'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly Height: number }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'WindowSetLeft', argNames: ['Left'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly Left: number }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'WindowSetResizable', argNames: ['Resizable'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly Resizable: boolean }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'WindowSetTop', argNames: ['Top'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly Top: number }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'WindowSetWidth', argNames: ['Width'], handler: (this: SHDocVw.InternetExplorer, parameter: { readonly Width: number }) => void): void; + on( + obj: SHDocVw.InternetExplorer, event: 'WindowStateChanged', argNames: ['dwWindowStateFlags', 'dwValidFlagsMask'], handler: ( + this: SHDocVw.InternetExplorer, parameter: { readonly dwWindowStateFlags: number, readonly dwValidFlagsMask: number }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'BeforeNavigate2', argNames: SHDocVw.EventHelperTypes.InternetExplorerMedium_BeforeNavigate2_ArgNames, + handler: (this: SHDocVw.InternetExplorerMedium, parameter: SHDocVw.EventHelperTypes.InternetExplorerMedium_BeforeNavigate2_Parameter) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'BeforeScriptExecute', argNames: ['pDispWindow'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly pDispWindow: any }) => void): void; + on(obj: SHDocVw.InternetExplorerMedium, event: 'ClientToHostWindow', argNames: ['CX', 'CY'], handler: (this: SHDocVw.InternetExplorerMedium, parameter: { CX: number, CY: number }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'CommandStateChange', argNames: ['Command', 'Enable'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly Command: number, readonly Enable: boolean }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'DocumentComplete' | 'NavigateComplete2', argNames: ['pDisp', 'URL'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly pDisp: any, readonly URL: any }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'FileDownload', argNames: ['ActiveDocument', 'Cancel'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly ActiveDocument: boolean, Cancel: boolean }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'NavigateError', argNames: ['pDisp', 'URL', 'Frame', 'StatusCode', 'Cancel'], + handler: (this: SHDocVw.InternetExplorerMedium, parameter: { readonly pDisp: any, readonly URL: any, readonly Frame: any, readonly StatusCode: any, Cancel: boolean }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'NewProcess', argNames: ['lCauseFlag', 'pWB2', 'Cancel'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly lCauseFlag: number, readonly pWB2: any, Cancel: boolean }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'NewWindow2', argNames: ['ppDisp', 'Cancel'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { ppDisp: any, Cancel: boolean }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'NewWindow3', argNames: ['ppDisp', 'Cancel', 'dwFlags', 'bstrUrlContext', 'bstrUrl'], + handler: (this: SHDocVw.InternetExplorerMedium, parameter: { + ppDisp: any, Cancel: boolean, readonly dwFlags: number, readonly bstrUrlContext: string, + readonly bstrUrl: string + }) => void): void; + on(obj: SHDocVw.InternetExplorerMedium, event: 'OnFullScreen', argNames: ['FullScreen'], handler: (this: SHDocVw.InternetExplorerMedium, + parameter: { readonly FullScreen: boolean }) => void): void; + on(obj: SHDocVw.InternetExplorerMedium, event: 'OnMenuBar', argNames: ['MenuBar'], handler: (this: SHDocVw.InternetExplorerMedium, parameter: { readonly MenuBar: boolean }) => void): void; + on(obj: SHDocVw.InternetExplorerMedium, event: 'OnStatusBar', argNames: ['StatusBar'], handler: (this: SHDocVw.InternetExplorerMedium, parameter: { readonly StatusBar: boolean }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'OnTheaterMode', argNames: ['TheaterMode'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly TheaterMode: boolean }) => void): void; + on(obj: SHDocVw.InternetExplorerMedium, event: 'OnToolBar', argNames: ['ToolBar'], handler: (this: SHDocVw.InternetExplorerMedium, parameter: { readonly ToolBar: boolean }) => void): void; + on(obj: SHDocVw.InternetExplorerMedium, event: 'OnVisible', argNames: ['Visible'], handler: (this: SHDocVw.InternetExplorerMedium, parameter: { readonly Visible: boolean }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'PrintTemplateInstantiation' | 'PrintTemplateTeardown', argNames: ['pDisp'], + handler: (this: SHDocVw.InternetExplorerMedium, parameter: { readonly pDisp: any }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'PrivacyImpactedStateChange', argNames: ['bImpacted'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly bImpacted: boolean }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'ProgressChange', argNames: ['Progress', 'ProgressMax'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly Progress: number, readonly ProgressMax: number }) => void): void; + on(obj: SHDocVw.InternetExplorerMedium, event: 'PropertyChange', argNames: ['szProperty'], handler: (this: SHDocVw.InternetExplorerMedium, + parameter: { readonly szProperty: string }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'RedirectXDomainBlocked', argNames: ['pDisp', 'StartURL', 'RedirectURL', 'Frame', 'StatusCode'], + handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly pDisp: any, readonly StartURL: any, readonly RedirectURL: any, readonly Frame: any, readonly StatusCode: any }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'SetPhishingFilterStatus', argNames: ['PhishingFilterStatus'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly PhishingFilterStatus: number }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'SetSecureLockIcon', argNames: ['SecureLockIcon'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly SecureLockIcon: number }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'StatusTextChange' | 'TitleChange', argNames: ['Text'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly Text: string }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'ThirdPartyUrlBlocked', argNames: ['URL', 'dwCount'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly URL: any, readonly dwCount: number }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'UpdatePageStatus', argNames: ['pDisp', 'nPage', 'fDone'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly pDisp: any, readonly nPage: any, readonly fDone: any }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'WebWorkerFinsihed', argNames: ['dwUniqueID'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly dwUniqueID: number }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'WebWorkerStarted', argNames: ['dwUniqueID', 'bstrWorkerLabel'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly dwUniqueID: number, readonly bstrWorkerLabel: string }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'WindowClosing', argNames: ['IsChildWindow', 'Cancel'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly IsChildWindow: boolean, Cancel: boolean }) => void): void; + on(obj: SHDocVw.InternetExplorerMedium, event: 'WindowSetHeight', argNames: ['Height'], handler: (this: SHDocVw.InternetExplorerMedium, parameter: { readonly Height: number }) => void): void; + on(obj: SHDocVw.InternetExplorerMedium, event: 'WindowSetLeft', argNames: ['Left'], handler: (this: SHDocVw.InternetExplorerMedium, parameter: { readonly Left: number }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'WindowSetResizable', argNames: ['Resizable'], handler: ( + this: SHDocVw.InternetExplorerMedium, parameter: { readonly Resizable: boolean }) => void): void; + on(obj: SHDocVw.InternetExplorerMedium, event: 'WindowSetTop', argNames: ['Top'], handler: (this: SHDocVw.InternetExplorerMedium, parameter: { readonly Top: number }) => void): void; + on(obj: SHDocVw.InternetExplorerMedium, event: 'WindowSetWidth', argNames: ['Width'], handler: (this: SHDocVw.InternetExplorerMedium, parameter: { readonly Width: number }) => void): void; + on( + obj: SHDocVw.InternetExplorerMedium, event: 'WindowStateChanged', argNames: ['dwWindowStateFlags', 'dwValidFlagsMask'], + handler: (this: SHDocVw.InternetExplorerMedium, parameter: { readonly dwWindowStateFlags: number, readonly dwValidFlagsMask: number }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'BeforeNavigate2', argNames: SHDocVw.EventHelperTypes.ShellBrowserWindow_BeforeNavigate2_ArgNames, + handler: (this: SHDocVw.ShellBrowserWindow, parameter: SHDocVw.EventHelperTypes.ShellBrowserWindow_BeforeNavigate2_Parameter) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'BeforeScriptExecute', argNames: ['pDispWindow'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly pDispWindow: any }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'ClientToHostWindow', argNames: ['CX', 'CY'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { CX: number, CY: number }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'CommandStateChange', argNames: ['Command', 'Enable'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly Command: number, readonly Enable: boolean }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'DocumentComplete' | 'NavigateComplete2', argNames: ['pDisp', 'URL'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly pDisp: any, readonly URL: any }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'FileDownload', argNames: ['ActiveDocument', 'Cancel'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly ActiveDocument: boolean, Cancel: boolean }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'NavigateError', argNames: ['pDisp', 'URL', 'Frame', 'StatusCode', 'Cancel'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly pDisp: any, readonly URL: any, readonly Frame: any, readonly StatusCode: any, Cancel: boolean }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'NewProcess', argNames: ['lCauseFlag', 'pWB2', 'Cancel'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly lCauseFlag: number, readonly pWB2: any, Cancel: boolean }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'NewWindow2', argNames: ['ppDisp', 'Cancel'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { ppDisp: any, Cancel: boolean }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'NewWindow3', argNames: ['ppDisp', 'Cancel', 'dwFlags', 'bstrUrlContext', 'bstrUrl'], + handler: (this: SHDocVw.ShellBrowserWindow, parameter: { ppDisp: any, Cancel: boolean, readonly dwFlags: number, readonly bstrUrlContext: string, readonly bstrUrl: string }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'OnFullScreen', argNames: ['FullScreen'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly FullScreen: boolean }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'OnMenuBar', argNames: ['MenuBar'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly MenuBar: boolean }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'OnStatusBar', argNames: ['StatusBar'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly StatusBar: boolean }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'OnTheaterMode', argNames: ['TheaterMode'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly TheaterMode: boolean }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'OnToolBar', argNames: ['ToolBar'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly ToolBar: boolean }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'OnVisible', argNames: ['Visible'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly Visible: boolean }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'PrintTemplateInstantiation' | 'PrintTemplateTeardown', argNames: ['pDisp'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly pDisp: any }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'PrivacyImpactedStateChange', argNames: ['bImpacted'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly bImpacted: boolean }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'ProgressChange', argNames: ['Progress', 'ProgressMax'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly Progress: number, readonly ProgressMax: number }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'PropertyChange', argNames: ['szProperty'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly szProperty: string }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'RedirectXDomainBlocked', argNames: ['pDisp', 'StartURL', 'RedirectURL', 'Frame', 'StatusCode'], + handler: (this: SHDocVw.ShellBrowserWindow, parameter: { + readonly pDisp: any, readonly StartURL: any, readonly RedirectURL: any, readonly Frame: any, + readonly StatusCode: any + }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'SetPhishingFilterStatus', argNames: ['PhishingFilterStatus'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly PhishingFilterStatus: number }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'SetSecureLockIcon', argNames: ['SecureLockIcon'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly SecureLockIcon: number }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'StatusTextChange' | 'TitleChange', argNames: ['Text'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly Text: string }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'ThirdPartyUrlBlocked', argNames: ['URL', 'dwCount'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly URL: any, readonly dwCount: number }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'UpdatePageStatus', argNames: ['pDisp', 'nPage', 'fDone'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly pDisp: any, readonly nPage: any, readonly fDone: any }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'WebWorkerFinsihed', argNames: ['dwUniqueID'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly dwUniqueID: number }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'WebWorkerStarted', argNames: ['dwUniqueID', 'bstrWorkerLabel'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly dwUniqueID: number, readonly bstrWorkerLabel: string }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'WindowClosing', argNames: ['IsChildWindow', 'Cancel'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly IsChildWindow: boolean, Cancel: boolean }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'WindowSetHeight', argNames: ['Height'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly Height: number }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'WindowSetLeft', argNames: ['Left'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly Left: number }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'WindowSetResizable', argNames: ['Resizable'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly Resizable: boolean }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'WindowSetTop', argNames: ['Top'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly Top: number }) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'WindowSetWidth', argNames: ['Width'], handler: (this: SHDocVw.ShellBrowserWindow, parameter: { readonly Width: number }) => void): void; + on( + obj: SHDocVw.ShellBrowserWindow, event: 'WindowStateChanged', argNames: ['dwWindowStateFlags', 'dwValidFlagsMask'], handler: ( + this: SHDocVw.ShellBrowserWindow, parameter: { readonly dwWindowStateFlags: number, readonly dwValidFlagsMask: number }) => void): void; + on( + obj: SHDocVw.ShellNameSpace, event: 'FavoritesSelectionChange', argNames: SHDocVw.EventHelperTypes.ShellNameSpace_FavoritesSelectionChange_ArgNames, + handler: (this: SHDocVw.ShellNameSpace, parameter: SHDocVw.EventHelperTypes.ShellNameSpace_FavoritesSelectionChange_Parameter) => void): void; + on(obj: SHDocVw.ShellWindows, event: 'WindowRegistered' | 'WindowRevoked', argNames: ['lCookie'], handler: (this: SHDocVw.ShellWindows, parameter: { readonly lCookie: number }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'BeforeNavigate2', argNames: SHDocVw.EventHelperTypes.WebBrowser_BeforeNavigate2_ArgNames, handler: ( + this: SHDocVw.WebBrowser, parameter: SHDocVw.EventHelperTypes.WebBrowser_BeforeNavigate2_Parameter) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'BeforeScriptExecute', argNames: ['pDispWindow'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly pDispWindow: any }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'ClientToHostWindow', argNames: ['CX', 'CY'], handler: (this: SHDocVw.WebBrowser, parameter: { CX: number, CY: number }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'CommandStateChange', argNames: ['Command', 'Enable'], handler: ( + this: SHDocVw.WebBrowser, parameter: { readonly Command: number, readonly Enable: boolean }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'DocumentComplete' | 'NavigateComplete2', argNames: ['pDisp', 'URL'], handler: ( + this: SHDocVw.WebBrowser, parameter: { readonly pDisp: any, readonly URL: any }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'FileDownload', argNames: ['ActiveDocument', 'Cancel'], handler: ( + this: SHDocVw.WebBrowser, parameter: { readonly ActiveDocument: boolean, Cancel: boolean }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'NavigateError', argNames: ['pDisp', 'URL', 'Frame', 'StatusCode', 'Cancel'], handler: ( + this: SHDocVw.WebBrowser, parameter: { readonly pDisp: any, readonly URL: any, readonly Frame: any, readonly StatusCode: any, Cancel: boolean }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'NewProcess', argNames: ['lCauseFlag', 'pWB2', 'Cancel'], handler: ( + this: SHDocVw.WebBrowser, parameter: { readonly lCauseFlag: number, readonly pWB2: any, Cancel: boolean }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'NewWindow2', argNames: ['ppDisp', 'Cancel'], handler: (this: SHDocVw.WebBrowser, parameter: { ppDisp: any, Cancel: boolean }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'NewWindow3', argNames: ['ppDisp', 'Cancel', 'dwFlags', 'bstrUrlContext', 'bstrUrl'], handler: ( + this: SHDocVw.WebBrowser, parameter: { ppDisp: any, Cancel: boolean, readonly dwFlags: number, readonly bstrUrlContext: string, readonly bstrUrl: string }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'OnFullScreen', argNames: ['FullScreen'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly FullScreen: boolean }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'OnMenuBar', argNames: ['MenuBar'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly MenuBar: boolean }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'OnStatusBar', argNames: ['StatusBar'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly StatusBar: boolean }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'OnTheaterMode', argNames: ['TheaterMode'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly TheaterMode: boolean }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'OnToolBar', argNames: ['ToolBar'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly ToolBar: boolean }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'OnVisible', argNames: ['Visible'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly Visible: boolean }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'PrintTemplateInstantiation' | 'PrintTemplateTeardown', argNames: ['pDisp'], handler: ( + this: SHDocVw.WebBrowser, parameter: { readonly pDisp: any }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'PrivacyImpactedStateChange', argNames: ['bImpacted'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly bImpacted: boolean }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'ProgressChange', argNames: ['Progress', 'ProgressMax'], handler: ( + this: SHDocVw.WebBrowser, parameter: { readonly Progress: number, readonly ProgressMax: number }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'PropertyChange', argNames: ['szProperty'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly szProperty: string }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'RedirectXDomainBlocked', argNames: ['pDisp', 'StartURL', 'RedirectURL', 'Frame', 'StatusCode'], + handler: (this: SHDocVw.WebBrowser, parameter: { readonly pDisp: any, readonly StartURL: any, readonly RedirectURL: any, readonly Frame: any, readonly StatusCode: any }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'SetPhishingFilterStatus', argNames: ['PhishingFilterStatus'], handler: ( + this: SHDocVw.WebBrowser, parameter: { readonly PhishingFilterStatus: number }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'SetSecureLockIcon', argNames: ['SecureLockIcon'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly SecureLockIcon: number }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'StatusTextChange' | 'TitleChange', argNames: ['Text'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly Text: string }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'ThirdPartyUrlBlocked', argNames: ['URL', 'dwCount'], handler: ( + this: SHDocVw.WebBrowser, parameter: { readonly URL: any, readonly dwCount: number }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'UpdatePageStatus', argNames: ['pDisp', 'nPage', 'fDone'], handler: ( + this: SHDocVw.WebBrowser, parameter: { readonly pDisp: any, readonly nPage: any, readonly fDone: any }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'WebWorkerFinsihed', argNames: ['dwUniqueID'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly dwUniqueID: number }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'WebWorkerStarted', argNames: ['dwUniqueID', 'bstrWorkerLabel'], handler: ( + this: SHDocVw.WebBrowser, parameter: { readonly dwUniqueID: number, readonly bstrWorkerLabel: string }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'WindowClosing', argNames: ['IsChildWindow', 'Cancel'], handler: ( + this: SHDocVw.WebBrowser, parameter: { readonly IsChildWindow: boolean, Cancel: boolean }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'WindowSetHeight', argNames: ['Height'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly Height: number }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'WindowSetLeft', argNames: ['Left'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly Left: number }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'WindowSetResizable', argNames: ['Resizable'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly Resizable: boolean }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'WindowSetTop', argNames: ['Top'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly Top: number }) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'WindowSetWidth', argNames: ['Width'], handler: (this: SHDocVw.WebBrowser, parameter: { readonly Width: number }) => void): void; + on( + obj: SHDocVw.WebBrowser, event: 'WindowStateChanged', argNames: ['dwWindowStateFlags', 'dwValidFlagsMask'], handler: ( + this: SHDocVw.WebBrowser, parameter: { readonly dwWindowStateFlags: number, readonly dwValidFlagsMask: number }) => void): void; + on( + obj: SHDocVw.WebBrowser_V1, event: 'BeforeNavigate', argNames: SHDocVw.EventHelperTypes.WebBrowser_V1_BeforeNavigate_ArgNames, + handler: (this: SHDocVw.WebBrowser_V1, parameter: SHDocVw.EventHelperTypes.WebBrowser_V1_BeforeNavigate_Parameter) => void): void; + on( + obj: SHDocVw.WebBrowser_V1, event: 'CommandStateChange', argNames: ['Command', 'Enable'], handler: ( + this: SHDocVw.WebBrowser_V1, parameter: { readonly Command: number, readonly Enable: boolean }) => void): void; + on( + obj: SHDocVw.WebBrowser_V1, event: 'FrameBeforeNavigate', argNames: SHDocVw.EventHelperTypes.WebBrowser_V1_FrameBeforeNavigate_ArgNames, + handler: (this: SHDocVw.WebBrowser_V1, parameter: SHDocVw.EventHelperTypes.WebBrowser_V1_FrameBeforeNavigate_Parameter) => void): void; + on(obj: SHDocVw.WebBrowser_V1, event: 'FrameNavigateComplete' | 'NavigateComplete', argNames: ['URL'], handler: (this: SHDocVw.WebBrowser_V1, parameter: { readonly URL: string }) => void): void; + on( + obj: SHDocVw.WebBrowser_V1, event: 'FrameNewWindow', argNames: SHDocVw.EventHelperTypes.WebBrowser_V1_FrameNewWindow_ArgNames, + handler: (this: SHDocVw.WebBrowser_V1, parameter: SHDocVw.EventHelperTypes.WebBrowser_V1_FrameNewWindow_Parameter) => void): void; + on( + obj: SHDocVw.WebBrowser_V1, event: 'NewWindow', argNames: SHDocVw.EventHelperTypes.WebBrowser_V1_NewWindow_ArgNames, handler: ( + this: SHDocVw.WebBrowser_V1, parameter: SHDocVw.EventHelperTypes.WebBrowser_V1_NewWindow_Parameter) => void): void; + on( + obj: SHDocVw.WebBrowser_V1, event: 'ProgressChange', argNames: ['Progress', 'ProgressMax'], handler: ( + this: SHDocVw.WebBrowser_V1, parameter: { readonly Progress: number, readonly ProgressMax: number }) => void): void; + on(obj: SHDocVw.WebBrowser_V1, event: 'PropertyChange', argNames: ['Property'], handler: (this: SHDocVw.WebBrowser_V1, parameter: { readonly Property: string }) => void): void; + on(obj: SHDocVw.WebBrowser_V1, event: 'Quit', argNames: ['Cancel'], handler: (this: SHDocVw.WebBrowser_V1, parameter: { Cancel: boolean }) => void): void; + on(obj: SHDocVw.WebBrowser_V1, event: 'StatusTextChange' | 'TitleChange', argNames: ['Text'], handler: (this: SHDocVw.WebBrowser_V1, parameter: { readonly Text: string }) => void): void; + on(obj: SHDocVw.InternetExplorer, event: 'DownloadBegin' | 'DownloadComplete' | 'OnQuit', handler: (this: SHDocVw.InternetExplorer, parameter: {}) => void): void; + on(obj: SHDocVw.InternetExplorerMedium, event: 'DownloadBegin' | 'DownloadComplete' | 'OnQuit', handler: (this: SHDocVw.InternetExplorerMedium, parameter: {}) => void): void; + on(obj: SHDocVw.ShellBrowserWindow, event: 'DownloadBegin' | 'DownloadComplete' | 'OnQuit', handler: (this: SHDocVw.ShellBrowserWindow, parameter: {}) => void): void; + on(obj: SHDocVw.ShellNameSpace, event: 'DoubleClick' | 'Initialized' | 'SelectionChange', handler: (this: SHDocVw.ShellNameSpace, parameter: {}) => void): void; + on(obj: SHDocVw.WebBrowser, event: 'DownloadBegin' | 'DownloadComplete' | 'OnQuit', handler: (this: SHDocVw.WebBrowser, parameter: {}) => void): void; + on(obj: SHDocVw.WebBrowser_V1, event: 'DownloadBegin' | 'DownloadComplete' | 'WindowActivate' | 'WindowMove' | 'WindowResize', handler: (this: SHDocVw.WebBrowser_V1, parameter: {}) => void): void; + new (progid: K): ActiveXObjectNameMap[K]; +} + +interface ActiveXObjectNameMap { + 'InternetExplorer.Application': SHDocVw.InternetExplorer; + 'Shell.Explorer': SHDocVw.WebBrowser; + 'Shell.UIHelper': SHDocVw.ShellUIHelper; + 'ShellNameSpace.ShellNameSpace': SHDocVw.ShellNameSpace; +} + +interface EnumeratorConstructor { + new(col: SHDocVw.ShellWindows): Enumerator; +} diff --git a/types/activex-shdocvw/package.json b/types/activex-shdocvw/package.json new file mode 100644 index 0000000000..d9b1031263 --- /dev/null +++ b/types/activex-shdocvw/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "activex-helpers": "*" + } +} \ No newline at end of file diff --git a/types/yfiles/tsconfig.json b/types/activex-shdocvw/tsconfig.json similarity index 75% rename from types/yfiles/tsconfig.json rename to types/activex-shdocvw/tsconfig.json index 9152563e46..1759b6965f 100644 --- a/types/yfiles/tsconfig.json +++ b/types/activex-shdocvw/tsconfig.json @@ -1,13 +1,11 @@ + { "compilerOptions": { "module": "commonjs", - "lib": [ - "es6", - "dom" - ], + "lib": ["es5", "scripthost"], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ @@ -19,6 +17,6 @@ }, "files": [ "index.d.ts", - "yfiles-tests.ts" + "activex-shdocvw-tests.ts" ] } \ No newline at end of file diff --git a/types/activex-shdocvw/tslint.json b/types/activex-shdocvw/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/activex-shdocvw/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/activex-shell/activex-shell-tests.ts b/types/activex-shell/activex-shell-tests.ts new file mode 100644 index 0000000000..1a7e08754c --- /dev/null +++ b/types/activex-shell/activex-shell-tests.ts @@ -0,0 +1,489 @@ +/// + +const shell = new ActiveXObject('Shell.Application'); + +const getWindowsFolder = () => shell.NameSpace(Shell32.ShellSpecialFolderConstants.ssfWINDOWS); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/gg537735(v=vs.85).aspx +(() => { + const folder = getWindowsFolder(); + if (!folder) { return; } + const folderItem = folder.ParseName('system.ini'); + if (!folderItem) { return; } + shell.AddToRecent(folderItem.Path); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774065(v=vs.85).aspx +(() => { + const folder = shell.BrowseForFolder(0, 'Example', 0, Shell32.ShellSpecialFolderConstants.ssfWINDOWS); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/gg537736(v=vs.85).aspx +const canStartStop = shell.CanStartStopService('service name'); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774069(v=vs.85).aspx +shell.ControlPanelItem('desk.cpl'); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774073(v=vs.85).aspx +shell.Explore('C:\\'); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/gg537737(v=vs.85).aspx +const explorerPolicy = shell.ExplorerPolicy('ValueName'); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/gg537739(v=vs.85).aspx +const settingValue = shell.GetSetting(Shell32.SettingKey.SSF_SHOWALLOBJECTS); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/gg537740(v=vs.85).aspx +const processorLevel = shell.GetSystemInformation('ProcessorLevel'); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/gg537741(v=vs.85).aspx +const isRestricted = shell.IsRestricted('system', 'undockwithoutlogon'); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/gg537742(v=vs.85).aspx +const isServiceRunning = shell.IsServiceRunning('Themes'); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774086(v=vs.85).aspx +shell.Open(Shell32.ShellSpecialFolderConstants.ssfWINDOWS); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/gg537743(v=vs.85).aspx +shell.ServiceStart('Messenger', true); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/gg537744(v=vs.85).aspx +shell.ServiceStop('Messenger', true); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/gg537745(v=vs.85).aspx +shell.ShellExecute("notepad.exe", "", "", "open", Shell32.ShellExecuteShow.Normal); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/gg537746(v=vs.85).aspx?cs-save-lang=1&cs-lang=jscript#code-snippet-1 +shell.ShowBrowserBar(Shell32.ExplorerBarCLSID.Favorites, true); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774107(v=vs.85).aspx +const wshShell = new ActiveXObject('WScript.Shell'); +wshShell.Popup(shell.Windows().Count); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787866(v=vs.85).aspx +shell.NameSpace(`c:\\windows`)!.CopyHere('c:\\autoexec.bat'); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787870(v=vs.85).aspx +(() => { + const folder = shell.NameSpace('c:\\windows'); + const folderItem = folder ? folder.ParseName('clock.avi') : undefined; + if (folder && folderItem) { + const info = folder.GetDetailsOf(folderItem, Shell32.FileSystemDetails.Type); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787874(v=vs.85).aspx +shell.NameSpace('c:\\windows')!.MoveHere('c:\\temp.txt', Shell32.FileOperationFlag.FOF_NOCONFIRMATION); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787876(v=vs.85).aspx +shell.NameSpace('c:\\')!.NewFolder('TestFolder'); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787858(v=vs.85).aspx +(() => { + const folder = shell.NameSpace("\\\\server\\share\\folder"); + const offlineStatus = folder ? folder.OfflineStatus : undefined; +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787880(v=vs.85).aspx +(() => { + const folder = shell.NameSpace(Shell32.ShellSpecialFolderConstants.ssfPROGRAMS); + WScript.Echo(folder!.ParentFolder.Title); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787860(v=vs.85).aspx +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787816(v=vs.85).aspx +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787850(v=vs.85).aspx +(() => { + const folder = shell.NameSpace('C:\\WINDOWS'); + const folderItem = folder ? folder.Self : undefined; + if (folderItem) { + const verbs = folderItem.Verbs(); + folderItem.InvokeVerb(); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787812(v=vs.85).aspx +(() => { + const parentFolder = getWindowsFolder(); + const folderItem = parentFolder ? parentFolder.ParseName('system32') : undefined; + const folder = folderItem ? folderItem.GetFolder : undefined; +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787814(v=vs.85).aspx +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787824(v=vs.85).aspx +(() => { + const folder = shell.NameSpace(Shell32.ShellSpecialFolderConstants.ssfPROGRAMS); + const folderItem = folder ? folder.ParseName('Internet Explorer.lnk') : undefined; + if (folderItem && folderItem.IsLink) { + const link = folderItem.GetLink; + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787818(v=vs.85).aspx +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787819(v=vs.85).aspx +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787821(v=vs.85).aspx +(() => { + const folder = getWindowsFolder(); + const folderItem = folder ? folder.Self : undefined; + if (folderItem) { + const isBrowsable = folderItem.IsBrowsable; + const isFileSystem = folderItem.IsFileSystem; + const isFolder = folderItem.IsFolder; + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787825(v=vs.85).aspx +(() => { + const folder = getWindowsFolder(); + const folderItem = folder!.ParseName('notepad.exe'); + if (folderItem) { + const oldDate = folderItem.ModifyDate; + folderItem.ModifyDate = new Date(1900, 1, 1, 18, 5).getVarDate(); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787827(v=vs.85).aspx +(() => { + const rootFolder = shell.NameSpace('C:\\'); + const folderItem = rootFolder ? rootFolder.ParseName('autoexec.bat') : undefined; + if (folderItem) { + const oldName = folderItem.Name; + folderItem.Name = 'test.bat'; + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787829(v=vs.85).aspx +(() => { + const folder = getWindowsFolder(); + const folderItem = folder ? folder.Self : undefined; + const parent = folderItem ? folderItem.Parent : undefined; + if (parent) { + WScript.Echo('Got parent object'); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787844(v=vs.85).aspx +(() => { + const folder = getWindowsFolder(); + const folderItem = folder ? folder.Self : undefined; + const path = folderItem ? folderItem.Path : ''; +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787846(v=vs.85).aspx +(() => { + const folder = getWindowsFolder(); + const folderItem = folder!.ParseName('notepad.exe'); + const size = folderItem ? folderItem.Size : undefined; +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787848(v=vs.85).aspx +(() => { + const folder = getWindowsFolder(); + if (folder) { + WScript.Echo(folder.Self.Type); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787798(v=vs.85).aspx +(() => { + const folder = getWindowsFolder(); + const folderItems = folder ? folder.Items() : undefined; + const count = folderItems ? folderItems.Count : undefined; +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787794(v=vs.85).aspx +(() => { + const folder = shell.NameSpace(Shell32.ShellSpecialFolderConstants.ssfDRIVES); + if (folder) { + folder.Items().InvokeVerbEx(); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774170(v=vs.85).aspx +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774174(v=vs.85).aspx +(() => { + const folder = shell.NameSpace(Shell32.ShellSpecialFolderConstants.ssfPROGRAMS); + const verbs = folder ? folder.Self.Verbs() : undefined; + if (verbs) { + const verb = verbs.Item(0); + WScript.Echo(verb.Name); + verb.DoIt(); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787787(v=vs.85).aspx +(() => { + const folder = getWindowsFolder(); + if (folder) { + const folderItems = folder.Items(); + WScript.Echo(folderItems.Count); + folderItems.Filter(Shell32.ShellFolderEnumerationFlags.SHCONTF_NONFOLDERS, '*.txt'); + WScript.Echo(folderItems.Count); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb787791(v=vs.85).aspx +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774162(v=vs.85).aspx +(() => { + const echoFirstVerbName = (folder: Shell32.Folder3 | null) => { + if (!folder) { return; } + const verbs = folder.Items().Verbs; + WScript.Echo(verbs.Item(0).Name); + }; + + let folder = getWindowsFolder(); + echoFirstVerbName(folder); + + folder = shell.NameSpace(Shell32.ShellSpecialFolderConstants.ssfCONTROLS); + echoFirstVerbName(folder); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774158(v=vs.85).aspx +(() => { + const folder = shell.NameSpace(Shell32.ShellSpecialFolderConstants.ssfCONTROLS); + if (folder) { + const verbs = folder.Self.Verbs(); + WScript.Echo(verbs.Count); + } +})(); + +const getIELink = () => { + const folder = shell.NameSpace(Shell32.ShellSpecialFolderConstants.ssfPROGRAMS); + const folderItem = folder ? folder.ParseName('Internet Explorer.lnk') : undefined; + return { + link: folderItem ? folderItem.GetLink : undefined, + folderItem + }; +}; + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb773990(v=vs.85).aspx +(() => { + const { link, folderItem } = getIELink(); + if (link && folderItem) { + WScript.Echo(link.GetIconLocation(folderItem.Path)); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb773996(v=vs.85).aspx +(() => { + const { link } = getIELink(); + if (link) { + link.Resolve(Shell32.ShellLinkResolveFlags.NoUI); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb773998(v=vs.85).aspx +(() => { + const { link } = getIELink(); + if (link) { + link.Description = 'New Description'; + link.Save(); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774002(v=vs.85).aspx +(() => { + const { link } = getIELink(); + if (link) { + link.SetIconLocation(link.Path, 1); + link.Save(); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb773986(v=vs.85).aspx +(() => { + const { link } = getIELink(); + if (link) { + WScript.Echo(link.Arguments); + link.Arguments = '/s'; + link.Save(); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb773988(v=vs.85).aspx +(() => { + const { link } = getIELink(); + if (link) { + WScript.Echo(link.Description); + link.Description = 'Test'; + link.Save(); + } +})(); + +const parseHotkey = (hotkey: number) => { + // missing implementation + return { + shift: false, + ctrl: false, + alt: false, + extended: false, + hotkey + }; +}; +const buildHotkey = (hotkey: number, shift: boolean = false, ctrl: boolean = false, alt: boolean = false, extended: boolean = false) => { + // missing implementation + return 0; +}; + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb773992(v=vs.85).aspx +(() => { + const { link } = getIELink(); + if (link) { + const { hotkey } = parseHotkey(link.Hotkey); + WScript.Echo(hotkey); + link.Hotkey = buildHotkey(4); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb773994(v=vs.85).aspx +(() => { + const { link } = getIELink(); + if (link) { + WScript.Echo(link.Path); + link.Path = 'C:\\Program Files\\IE\\IEXPLORE.EXE'; + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774006(v=vs.85).aspx +(() => { + const { link } = getIELink(); + if (link) { + WScript.Echo(link.ShowCommand); + link.ShowCommand = Shell32.LinkShowWindowState.Normal; + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774008(v=vs.85).aspx +(() => { + const { link } = getIELink(); + if (link) { + WScript.Echo(link.WorkingDirectory); + link.WorkingDirectory = ''; + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774115(v=vs.85).aspx +(() => { + const { link } = getIELink(); + if (link) { + const target = link.Target; + if (target) { + WScript.Echo(target.Size); + } + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774055(v=vs.85).aspx +(() => { + const folder = getWindowsFolder(); + const folderItem = folder ? folder.ParseName('notepad.exe') : undefined; + if (folderItem) { + WScript.Echo(folderItem.ExtendedProperty('infotip')); + } + + const wordDoc = shell.NameSpace('C:\\')!.ParseName('test.doc'); + if (wordDoc) { + const FMTID_SummaryInfo = "{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"; + const PID_TITLE = "2"; + const PID_AUTHOR = "4"; + const SCID_TITLE = `${FMTID_SummaryInfo} ${PID_TITLE}`; + const SCID_AUTHOR = `${FMTID_SummaryInfo} ${PID_AUTHOR}`; + const docTitle = wordDoc.ExtendedProperty(SCID_TITLE); + const docAuthor = wordDoc.ExtendedProperty(SCID_AUTHOR); + } +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774057(v=vs.85).aspx +(() => { + const folder = getWindowsFolder(); + const folderItem = folder ? folder.ParseName('notepad.exe') : undefined; + if (folderItem) { + folderItem.InvokeVerbEx("open", "c:\\autoexec.bat"); + } +})(); + +const collectionToArray = (col: any): T[] => { // tslint:disable-line no-unnecessary-generics + const results: T[] = []; + const enumerator = new Enumerator(col); + enumerator.moveFirst(); + while (!enumerator.atEnd()) { + results.push(enumerator.item()); + enumerator.moveNext(); + } + return results; +}; + +interface String { + endsWith(searchString: string, length?: number): boolean; +} +if (!String.prototype.endsWith) { + String.prototype.endsWith = function(search, this_len) { + if (this_len === undefined || this_len > this.length) { + this_len = this.length; + } + return this.substring(this_len - search.length, this_len) === search; + }; +} + +// shell.Windows() includes items other than Explorer windows, such as Internet Explorer tabs +const getExplorerWindows = () => + collectionToArray(shell.Windows()) + .filter(x => x.FullName.toLowerCase().endsWith('explorer.exe')); + +const getFolderViews = () => + getExplorerWindows() + .map(x => x.Document as Shell32.ShellFolderView); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774045(v=vs.85).aspx +(() => { + getFolderViews().forEach(x => + ActiveXObject.on(x, 'SelectionChanged', function(this: Shell32.ShellFolderView) { + WScript.Echo(`Selection change in ${this.Folder.Title} -- count: ${this.SelectedItems().Count}`); + }) + ); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb773970(v=vs.85).aspx +WScript.Echo(shell.Windows().Item().Path); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb773969(v=vs.85).aspx +WScript.Echo(shell.Windows().Count); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774043(v=vs.85).aspx +(() => { + getFolderViews().forEach(x => + WScript.Echo(`${x.Folder.Title} -- ${x.SelectedItems().Count} selected items`) + ); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774047(v=vs.85).aspx +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774022(v=vs.85).aspx +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774053(v=vs.85).aspx +(() => { + const folderView = getExplorerWindows()[0].Document as Shell32.ShellFolderView; + const folder = folderView.Folder; + if (folder) { + const folderItem = folder.Self; + folderView.SelectItem(folder.Self, Shell32.ShellFolderViewSelectItem.Focus); + } + WScript.Echo(folderView.ViewOptions); +})(); + +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb774020(v=vs.85).aspx +(() => { + const folderView = getExplorerWindows()[0].Document as Shell32.ShellFolderView; + const focusedItem = folderView.FocusedItem; + if (focusedItem) { + WScript.Echo(`Focused item in first Excplorer window -- ${focusedItem.Path}`); + } +})(); + +(() => { + const router = new ActiveXObject('Shell.FolderView'); + const folder = getFolderViews()[0]; + router.SetFolderView(folder); + ActiveXObject.on(router, 'EnumDone', () => WScript.Echo('Current folder view was finisehd enumerating')); + ActiveXObject.on(router, 'SelectionChanged', () => WScript.Echo('Selection changed in current folder view')); + // the folder view monitored by the ShellFolderViewOC object can be changed via SetFolderView without disconnecting and reconnecting the handlers +})(); diff --git a/types/activex-shell/index.d.ts b/types/activex-shell/index.d.ts new file mode 100644 index 0000000000..cb59a11c5e --- /dev/null +++ b/types/activex-shell/index.d.ts @@ -0,0 +1,1016 @@ +// Type definitions for Microsoft Shell Controls And Automation - Shell32 1.0 +// Project: https://msdn.microsoft.com/en-us/library/windows/desktop/bb773938(v=vs.85).aspx +// Definitions by: Zev Spitz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/// + +declare namespace Shell32 { + // tslint:disable-next-line no-const-enum + const enum BrowseInfoFlags { + /** + * Allow folder junctions such as a library or a compressed file with a .zip file name extension to be browsed. + * + * _Windows 7 and later._ + */ + BIF_BROWSEFILEJUNCTIONS = 0x00010000, + + /** Only return computers. If the user selects anything other than a computer, the **OK** button is grayed. */ + BIF_BROWSEFORCOMPUTER = 0x00001000, + + /** + * Only allow the selection of printers. If the user selects anything other than a printer, the **OK** button is grayed. + * + * In Windows XP and later systems, the best practice is to use a Windows XP-style dialog, setting the root of the dialog to the **Printers and Faxes** folder (`CSIDL_PRINTERS`). + */ + BIF_BROWSEFORPRINTER = 0x00002000, + + /** + * The browse dialog box displays files as well as folders. + * + * _[Version 4.7.1](https://msdn.microsoft.com/en-us/library/windows/desktop/bb776779.aspx)_ + */ + BIF_BROWSEINCLUDEFILES = 0x00004000, + + /** + * The browse dialog box can display URLs. The `BIF_USENEWUI` and `BIF_BROWSEINCLUDEFILES` flags must also be set. If any of these three flags are not set, the browser dialog box rejects URLs. + * Even when these flags are set, the browse dialog box displays URLs only if the folder that contains the selected item supports URLs. + * + * When the folder's [IShellFolder::GetAttributesOf](https://msdn.microsoft.com/en-us/library/windows/desktop/bb775068.aspx) method is called to request the selected item's attributes, the + * folder must set the `SFGAO_FOLDER` attribute flag. Otherwise, the browse dialog box will not display the URL. + * + * _[Version 5.0](https://msdn.microsoft.com/en-us/library/windows/desktop/bb776779.aspx)_ + */ + BIF_BROWSEINCLUDEURLS = 0x00000080, + + /** Do not include network folders below the domain level in the dialog box's tree view control. */ + BIF_DONTGOBELOWDOMAIN = 0x00000002, + + /** + * Include an edit control in the browse dialog box that allows the user to type the name of an item. + * + * _[Version 4.7.1](https://msdn.microsoft.com/en-us/library/windows/desktop/bb776779.aspx)_ + */ + BIF_EDITBOX = 0x00000010, + + /** + * Use the new user interface. Setting this flag provides the user with a larger dialog box that can be resized. The dialog box has several new capabilities, including: drag-and-drop + * capability within the dialog box, reordering, shortcut menus, new folders, delete, and other shortcut menu commands. + * + * _[Version 5.0](https://msdn.microsoft.com/en-us/library/windows/desktop/bb776779.aspx)_ + */ + BIF_NEWDIALOGSTYLE = 0x00000040, + + /** + * Do not include the **New Folder** button in the browse dialog box. + * + * _[Version 6.0](https://msdn.microsoft.com/en-us/library/windows/desktop/bb776779.aspx)_ + */ + BIF_NONEWFOLDERBUTTON = 0x00000200, + + /** + * When the selected item is a shortcut, return the PIDL of the shortcut itself rather than its target. + * + * _[Version 6.0](https://msdn.microsoft.com/en-us/library/windows/desktop/bb776779.aspx)_ + */ + BIF_NOTRANSLATETARGETS = 0x00000400, + + /** + * Only return file system ancestors. An ancestor is a subfolder that is beneath the root folder in the namespace hierarchy. If the user selects an ancestor of the root folder that is not + * part of the file system, the **OK** button is grayed. + */ + BIF_RETURNFSANCESTORS = 0x00000008, + + /** + * Only return file system directories. If the user selects folders that are not part of the file system, the **OK** button is grayed. + * + * **Note** The **OK** button remains enabled for `\\server` items, as well as `\\server\share` and directory items. However, if the user selects a `\\server` item, passing the PIDL + * returned by [SHBrowseForFolder](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762115.aspx) to + * [SHGetPathFromIDList](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762194.aspx) fails. + */ + BIF_RETURNONLYFSDIRS = 0x00000001, + + /** + * The browse dialog box can display sharable resources on remote systems. This is intended for applications that want to expose remote shares on a local system. The BIF_NEWDIALOGSTYLE flag + * must also be set. + * + * _[Version 5.0](https://msdn.microsoft.com/en-us/library/windows/desktop/bb776779.aspx)_ + */ + BIF_SHAREABLE = 0x00008000, + + /** + * Include a status area in the dialog box. The callback function can set the status text by sending messages to the dialog box. This flag is not supported when BIF_NEWDIALOGSTYLE + * is specified. + */ + BIF_STATUSTEXT = 0x00000004, + + /** + * When combined with `BIF_NEWDIALOGSTYLE`, adds a usage hint to the dialog box, in place of the edit box. `BIF_EDITBOX` overrides this flag. + * + * _[Version 6.0](https://msdn.microsoft.com/en-us/library/windows/desktop/bb776779.aspx)_ + */ + BIF_UAHINT = 0x00000100, + + /** + * Use the new user interface, including an edit box. This flag is equivalent to `BIF_EDITBOX | BIF_NEWDIALOGSTYLE`. + * + * _[Version 5.0](https://msdn.microsoft.com/en-us/library/windows/desktop/bb776779.aspx)_ + */ + BIF_USENEWUI = 0x00000090, + + /** + * If the user types an invalid name into the edit box, the browse dialog box calls the application's + * [BrowseCallbackProc](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762598.aspx) with the **BFFM_VALIDATEFAILED** message. This flag is ignored if BIF_EDITBOX is not specified. + * + * _[Version 4.71](https://msdn.microsoft.com/en-us/library/windows/desktop/bb776779)_ + */ + BIF_VALIDATE = 0x00000020, + } + + // tslint:disable-next-line no-const-enum + const enum ExplorerBarCLSID { + Favorites = '{EFA24E61-B078-11d0-89E4-00C04FC9E26E}', + Folders = '{EFA24E64-B078-11d0-89E4-00C04FC9E26E}', + History = '{EFA24E62-B078-11d0-89E4-00C04FC9E26E}', + Search = '{30D02401-6A81-11d0-8274-00C04FD5AE38}', + } + + // tslint:disable-next-line no-const-enum + const enum FileOperationFlag { + /** Preserve undo information, if possible. */ + FOF_ALLOWUNDO = 64, + + /** Perform the operation on files only if a wildcard file name (*.*) is specified. */ + FOF_FILESONLY = 128, + + /** Respond with "Yes to All" for any dialog box that is displayed. */ + FOF_NOCONFIRMATION = 16, + + /** Do not confirm the creation of a new directory if the operation requires one to be created. */ + FOF_NOCONFIRMMKDIR = 512, + + /** + * Do not copy connected files as a group. Only copy the specified files. + * + * _[Version 5.0](https://msdn.microsoft.com/en-us/library/windows/desktop/bb776779.aspx)_ + */ + FOF_NO_CONNECTED_ELEMENTS = 8192, + + /** + * Do not copy the security attributes of the file. + * + * _[Version 4.7.1](https://msdn.microsoft.com/en-us/library/windows/desktop/bb776779.aspx)_ + */ + FOF_NOCOPYSECURITYATTRIBS = 2048, + + /** Do not display a user interface if an error occurs. */ + FOF_NOERRORUI = 1024, + + /** Only operate in the local directory. Do not operate recursively into subdirectories. */ + FOF_NORECURSION = 4096, + + /** Give the file being operated on a new name in a move, copy, or rename operation if a file with the target name already exists. */ + FOF_RENAMEONCOLLISION = 8, + + /** Do not display a progress dialog box. */ + FOF_SILENT = 4, + + /** Display a progress dialog box but do not show the file names. */ + FOF_SIMPLEPROGRESS = 256, + } + + // tslint:disable-next-line no-const-enum + const enum FileSystemDetails { + Name = 0, + Size = 1, + Type = 2, + LastModified = 3, + Attributes = 4, + InfoTip = -1, + } + + // tslint:disable-next-line no-const-enum + const enum HotkeyModifiers { + SHIFT = 1, + CTRL = 2, + ALT = 4, + Extended = 8 + } + + // tslint:disable-next-line no-const-enum + const enum LinkShowWindowState { + /** Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. */ + Normal = 1, + + /** Activates the window and displays it as a minimized window. */ + Minimized = 2, + + /** Activates the window and displays it as a maximized window. */ + Maximized = 3 + } + + /** Constants for Folder2.OfflineStatus */ + // tslint:disable-next-line no-const-enum + const enum OfflineFolderStatus { + OFS_DIRTYCACHE = 3, + OFS_INACTIVE = -1, + OFS_OFFLINE = 1, + OFS_ONLINE = 0, + OFS_SERVERBACK = 2, + } + + // tslint:disable-next-line no-const-enum + const enum ShellFolderEnumerationFlags { + /** **Windows 7 and later** The calling application is checking for the existence of child items in the folder. */ + SHCONTF_CHECKING_FOR_CHILDREN = 0x00010, + + /** Include items that are folders in the enumeration. */ + SHCONTF_FOLDERS = 0x00020, + + /** Include items that are not folders in the enumeration. */ + SHCONTF_NONFOLDERS = 0x00040, + + /** Include hidden items in the enumeration. This does not include hidden system items. (To include hidden system items, use SHCONTF_INCLUDESUPERHIDDEN.) */ + SHCONTF_INCLUDEHIDDEN = 0x00080, + + /** The calling application is looking for printer objects. */ + SHCONTF_NETPRINTERSRCH = 0x00200, + + /** The calling application is looking for resources that can be shared. */ + SHCONTF_SHAREABLE = 0x00400, + + /** Include items with accessible storage and their ancestors, including hidden items. */ + SHCONTF_STORAGE = 0x00800, + + /** **Windows 7 and later**. Child folders should provide a navigation enumeration. */ + SHCONTF_NAVIGATION_ENUM = 0x01000, + + /** **Windows Vista and later**. The calling application is looking for resources that can be enumerated quickly. */ + SHCONTF_FASTITEMS = 0x02000, + + /** **Windows Vista and later**. Enumerate items as a simple list even if the folder itself is not structured in that way. */ + SHCONTF_FLATLIST = 0x04000, + + /** + * **Windows Vista and later**. The calling application is monitoring for change notifications.This means that the enumerator does not have to return all results. + * Items can be reported through change notifications. + */ + SHCONTF_ENABLE_ASYNC = 0x08000, + + /** + * **Windows 7 and later**. Include hidden system items in the enumeration. This value does not include hidden non-system items. + * (To include hidden non-system items, use SHCONTF_INCLUDEHIDDEN.) + */ + SHCONTF_INCLUDESUPERHIDDEN = 0x10000, + } + + // tslint:disable-next-line no-const-enum + const enum ShellFolderViewOptions { + /** The **Show All Files** option is enabled. */ + SFVVO_SHOWALLOBJECTS = 0x00000001, + + /** The **Hide extensions for known file types** option is disabled. */ + SFVVO_SHOWEXTENSIONS = 0x00000002, + + /** The **Display Compressed Files and Folders with Alternate Color** option is enabled. */ + SFVVO_SHOWCOMPCOLOR = 0x00000008, + + /** The **Do Not Show Hidden Files** option is enabled. */ + SFVVO_SHOWSYSFILES = 0x00000020, + + /** The **Classic Style** option is enabled. */ + SFVVO_WIN95CLASSIC = 0x00000040, + + /** The **Double-Click to Open an Item** option is enabled. */ + SFVVO_DOUBLECLICKINWEBVIEW = 0x00000080, + + /** The **Active Desktop – View as Web Page** option is enabled. */ + SFVVO_DESKTOPHTML = 0x00000200 + } + + // tslint:disable-next-line no-const-enum + const enum ShellFolderViewSelectItem { + Deselect = 0, + Select = 1, + EditMode = 3, + DeselectAllButThis = 4, + ScrollIntoView = 8, + Focus = 16 + } + + // tslint:disable-next-line no-const-enum + const enum ShellLinkResolveFlags { + /** + * Do not display a dialog box if the link cannot be resolved. When this flag is set, the high-order word of _fFlags_ specifies a time-out duration, in milliseconds. + * The method returns if the link cannot be resolved within the time-out duration. If the high-order word is set to zero, the time-out duration defaults to 3000 milliseconds (3 seconds). + */ + NoUI = 1, + + /** If the link has changed, update its path and list of identifiers. */ + Update = 4, + + /** Do not update the link information. */ + NoUpdate = 8, + + /** Do not execute the search heuristics. */ + NoSearch = 16, + + /** Do not use distributed link tracking. */ + NoTrack = 32, + + /** + * Disable distributed link tracking. By default, distributed link tracking tracks removable media across multiple devices based on the volume name. + * It also uses the UNC path to track remote file systems whose drive letter has changed. Setting this flag disables both types of tracking. + */ + NoLinkInfo = 64, + + /** Call the Windows Installer. */ + InvokeMSI = 128 + } + + // tslint:disable-next-line no-const-enum + const enum SettingKey { + /** + * The state of the **Use check boxes to select items** option. This option is enabled automatically when the system has a pen input device configured. + * + * _Windows Vista and later_ + */ + SSF_AUTOCHECKSELECT = 0x00800000, + + /** Not used. */ + SSF_DESKTOPHTML = 0x00000200, + + /** The state of the **Allow all uppercase names** option. As of Windows Vista, this folder option is no longer available. */ + SSF_DONTPRETTYPATH = 0x00000800, + + /** The state of the **Double-click to open an item (single-click to select)** option. */ + SSF_DOUBLECLICKINWEBVIEW = 0x00000080, + + /** Not used. */ + SSF_FILTER = 0x00010000, + + /** Not used. */ + SSF_HIDDENFILEEXTS = 0x00000004, + + /** The state of icon display in the Windows Explorer list view. If this option is active, no icons are displayed in the list view. */ + SSF_HIDEICONS = 0x00004000, + + /** + * The state of display name display in the Windows Explorer list view. If this option is active, icons are displayed in the list view, but display names are not. + * + * _Windows Vista and later_ + */ + SSF_ICONSONLY = 0x01000000, + + /** The state of the **Show map network drive button in toolbar** option. As of Windows Vista, this option is no longer available. */ + SSF_MAPNETDRVBUTTON = 0x00001000, + + /** The state of the Recycle Bin's **Display delete confirmation dialog** option. */ + SSF_NOCONFIRMRECYCLE = 0x00008000, + + /** The state of the **Automatically search for network folders and printers** option. As of Windows Vista, this option is no longer available. */ + SSF_NONETCRAWLING = 0x00100000, + + /** The state of the **Launch folder windows in a separate process** option. */ + SSF_SEPPROCESS = 0x00080000, + + /** Not used. */ + SSF_SERVERADMINUI = 0x00000004, + + /** The state of the **Hidden files and folders** option. */ + SSF_SHOWALLOBJECTS = 0x00000001, + + /** The state of the **Show File Attributes in Detail View** option. As of Windows Vista, this option is no longer available. */ + SSF_SHOWATTRIBCOL = 0x00000100, + + /** The state of the **Show encrypted or compressed NTFS files in color** option. */ + SSF_SHOWCOMPCOLOR = 0x00000008, + + /** The state of the **Hide extensions for known file types** option. */ + SSF_SHOWEXTENSIONS = 0x00000002, + + /** The state of the **Show pop-up description for folder and desktop items** option. */ + SSF_SHOWINFOTIP = 0x00002000, + + /** Not used. */ + SSF_SHOWSTARTPAGE = 0x00400000, + + /** The state of the **Hide protected operating system files** option. */ + SSF_SHOWSUPERHIDDEN = 0x00040000, + + /** + * The state of the **Hidden files and folders** option. In Windows Vista and later, this is equivalent to `SSF_SHOWALLOBJECTS`. In versions of Windows before Windows Vista, this value + * referred to the state of the **Do not show hidden files and folders** option. + */ + SSF_SHOWSYSFILES = 0x00000020, + + /** + * The state of the **Display file icon on thumbnails** option. If this option is active, a file type overlay is applied when a file supplies a thumbnail representation. + * + * _Windows Vista and later_ + */ + SSF_SHOWTYPEOVERLAY = 0x02000000, + + /** Not used. */ + SSF_SORTCOLUMNS = 0x00000010, + + /** The state of the Windows XP display option, which selects between the Windows XP style and the classic style. As of Windows Vista, this option is no longer available. */ + SSF_STARTPANELON = 0x00200000, + + /** The state of the **Display as a web view option**. As of Windows Vista, this option is no longer available. */ + SSF_WEBVIEW = 0x00020000, + + /** The state of the **Classic Style** option. As of Windows Vista, this option is no longer available. */ + SSF_WIN95CLASSIC = 0x00000400, + } + + // tslint:disable-next-line no-const-enum + const enum ShellExecuteShow { + /** Open the application with a hidden window. */ + Hidden = 0, + + /** Open the application with a normal window. If the window is minimized or maximized, the system restores it to its original size and position. */ + Normal = 1, + + /** Open the application with a minimized window. */ + Minimized = 2, + + /** Open the application with a maximized window. */ + Maximized = 3, + + /** Open the application with its window at its most recent size and position. The active window remains active. */ + Last = 4, + + /** Open the application with its window at its current size and position. */ + Current = 5, + + /** Open the application with a minimized window. The active window remains active. */ + MinimizedNotActivated = 7, + + /** Open the application with its window in the default state specified by the application. */ + Application = 10, + } + + /** Constants for Special Folders for open/Explore */ + // tslint:disable-next-line no-const-enum + const enum ShellSpecialFolderConstants { + ssfALTSTARTUP = 29, + ssfAPPDATA = 26, + ssfBITBUCKET = 10, + ssfCOMMONALTSTARTUP = 30, + ssfCOMMONAPPDATA = 35, + ssfCOMMONDESKTOPDIR = 25, + ssfCOMMONFAVORITES = 31, + ssfCOMMONPROGRAMS = 23, + ssfCOMMONSTARTMENU = 22, + ssfCOMMONSTARTUP = 24, + ssfCONTROLS = 3, + ssfCOOKIES = 33, + ssfDESKTOP = 0, + ssfDESKTOPDIRECTORY = 16, + ssfDRIVES = 17, + ssfFAVORITES = 6, + ssfFONTS = 20, + ssfHISTORY = 34, + ssfINTERNETCACHE = 32, + ssfLOCALAPPDATA = 28, + ssfMYPICTURES = 39, + ssfNETHOOD = 19, + ssfNETWORK = 18, + ssfPERSONAL = 5, + ssfPRINTERS = 4, + ssfPRINTHOOD = 27, + ssfPROFILE = 40, + ssfPROGRAMFILES = 38, + ssfPROGRAMFILESx86 = 48, + ssfPROGRAMS = 2, + ssfRECENT = 8, + ssfSENDTO = 9, + ssfSTARTMENU = 11, + ssfSTARTUP = 7, + ssfSYSTEM = 37, + ssfSYSTEMx86 = 41, + ssfTEMPLATES = 21, + ssfWINDOWS = 36, + } + + /** FileSearchBand Class */ + class FileSearchBand { + private 'Shell32.FileSearchBand_typekey': FileSearchBand; + private constructor(); + + /** Retrieve the file from which the search was restored. */ + readonly QueryFile: any; + + /** Get the search scope */ + readonly Scope: any; + + /** Retrieve the guid of the currently active search. */ + readonly SearchID: string; + + /** method SetFocus */ + SetFocus(): void; + + /** method SetSearchParameters */ + SetSearchParameters(pbstrSearchID: string, bNavToResults: boolean, pvarScope?: any, pvarQueryFile?: any): void; + } + + /** Definition of interface Folder version 3 */ + class Folder3 { + private 'Shell32.Folder3_typekey': Folder3; + private constructor(); + + /** Get Application object */ + readonly Application: any; + + /** Copy Items to this folder. */ + CopyHere(vItem: string | ShellFolderItem | FolderItems3, vOptions?: FileOperationFlag): void; + + /** Call this after the WebView barricade is dismissed by the user */ + DismissedWebViewBarricade(): void; + + /** + * Get the details about an item. + * @param vItem The item for which to retrieve the information. + * @param iColumn An integer value that specifies the information to be retrieved. The information available for an item depends on the folder in which it is displayed. This value + * corresponds to the zero-based column number that is displayed in a Shell view. + */ + GetDetailsOf(vItem: ShellFolderItem, iColumn: number): string; + + /** Should the WebView barricade be shown? */ + readonly HaveToShowWebViewBarricade: boolean; + + /** The collection of Items in folder */ + Items(): FolderItems3; + + /** Move Items to this folder. */ + MoveHere(vItem: string | ShellFolderItem | FolderItems3, vOptions?: FileOperationFlag): void; + + /** Create a new sub folder in this folder. */ + NewFolder(bName: string): void; + + /** Offline status of the server? */ + readonly OfflineStatus: OfflineFolderStatus; + + /** Get Parent object */ + readonly ParentFolder: Folder3; + + /** Parse the name to get an item. */ + ParseName(bName: string): ShellFolderItem | null; + + /** Folder's FolderItem interface */ + readonly Self: ShellFolderItem; + + /** Ask if the WebView barricade should be shown or not */ + ShowWebViewBarricade: boolean; + + /** Synchronize all offline files */ + Synchronize(): void; + + /** Get the display name for the window */ + readonly Title: string; + } + + /** Definition of interface FolderItems3 */ + class FolderItems3 { + private 'Shell32.FolderItems3_typekey': FolderItems3; + private constructor(); + + /** Get Application object */ + readonly Application: any; + + /** Get count of items in the folder */ + readonly Count: number; + + /** Set a wildcard filter to apply to the items returned */ + Filter(grfFlags: ShellFolderEnumerationFlags, bstrFileSpec: string): void; + + /** + * Executes a verb on a collection of `FolderItem` objects + * @param vVerb String that corresponds to the command to be executed. If no verb is specified, the default verb is executed. + * @param vArgs String with one or more arguments to the command specified by vVerb. The format of this string depends on the particular verb. + */ + InvokeVerbEx(vVerb?: string, vArgs?: string): void; + + /** Return the figure for the given index */ + Item(index?: any): ShellFolderItem; + + /** Get the list of verbs common to all the items */ + readonly Verbs: FolderItemVerbs; + } + + /** Definition of interface FolderItemVerb */ + class FolderItemVerb { + private 'Shell32.FolderItemVerb_typekey': FolderItemVerb; + private constructor(); + + /** Execute the verb */ + DoIt(): void; + + /** Get display name for item */ + readonly Name: string; + } + + /** Definition of interface FolderItemVerbs */ + class FolderItemVerbs { + private 'Shell32.FolderItemVerbs_typekey': FolderItemVerbs; + private constructor(); + + /** Get count of open folder windows */ + readonly Count: number; + + /** Return the specified verb */ + Item(index?: any): FolderItemVerb; + } + + /** Shell Object Type Information */ + class Shell { + private 'Shell32.Shell_typekey': Shell; + private constructor(); + + /** Add an object to the Recent Docuements */ + AddToRecent(varFile: string | null, bstrCategory?: string): void; + + /** Get Application object */ + readonly Application: any; + + /** Browse the name space for a Folder */ + BrowseForFolder(Hwnd: number, Title: string, Options: number | BrowseInfoFlags, RootFolder?: string | ShellSpecialFolderConstants): Folder3; + + /** Determine if the current user can start/stop the named service. */ + CanStartStopService(ServiceName: string): boolean; + + /** Cascade Windows */ + CascadeWindows(): void; + + /* + * Runs the specified Control Panel (*.cpl) application. If the application is already open, it will activate the running instance. + * + * **Note** As of Windows Vista, most Control Panel applications are Shell items and cannot be opened with this function. To open those Control Panel applications, pass the canonical name to + * `control.exe`. For example: + * + * `control.exe /name Microsoft.Personalization` + */ + ControlPanelItem(bstrDir: string): void; + + /** Eject the pc */ + EjectPC(): void; + + /** Explore a folder */ + Explore(vDir: string | ShellSpecialFolderConstants): void; + + /** + * Return explorer policy value + * + * The specified value name must be within the **HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer** subkey. + * If the value name does not exist then the method returns null. + */ + ExplorerPolicy(bstrPolicyName: string): any; + + /** Bring up the file run dialog box */ + FileRun(): void; + + /** Find a computer */ + FindComputer(): void; + + /** Find Files */ + FindFiles(): void; + + /** Find a Printer in the Directory Service */ + FindPrinter(Name?: string, location?: string, model?: string): void; + + /** Return shell global setting */ + GetSetting(lSetting: number | SettingKey): boolean; + + /** + * `DirectoryServiceAvailable` -- Returns **true** if the directory service is available + * + * `IsOS_DomainMember` -- Returns **true** if the computer is a member of a domain (_Windows XP and later_) + * + * `IsOS_Personal` -- Returns **true** if the operating system is Windows XP Home Edition (_Windows XP only_) + * + * `IsOS_Professional` -- Returns **true** if the operating system is Windows XP Professional Edition (_Windows XP only_) + */ + GetSystemInformation(Name: 'DirectoryServiceAvailable' | 'IsOS_DomainMember' | 'IsOS_Personal' | 'IsOS_Professional'): boolean; + + /** + * `DoubleClickTime` -- The double-click time, in milliseconds + * + * `PhysicalMemoryInstalled` -- The amount of physical memory installed, in bytes + * + * `ProcessorArchitecture` -- The processor architecture. For details, see the discussion of the **wProcessorArchitecture** member of the + * [`SYSTEM_INFO`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724958.aspx) structure + * + * `ProcessorLevel` -- The processor level. Returns 3, 4, or 5, for x386, x486, and Pentium-level processors, respectively (_Windows Vista and later_) + * + * `ProcessorSpeed` -- The processor speed, in megahertz (MHz) + */ + GetSystemInformation(Name: 'DoubleClickTime' | 'PhysicalMemoryInstalled' | 'ProcessorArchitecture' | 'ProcessorLevel' | 'ProcessorSpeed'): number; + + /** Display shell help */ + Help(): void; + + /** get restriction settings */ + IsRestricted(Group: string, Restriction: string): number; + + /** Determine if a service is running by name. */ + IsServiceRunning(ServiceName: string): any; + + /** Minimize all windows */ + MinimizeAll(): void; + + /** Get special folder from ShellSpecialFolderConstants */ + NameSpace(vDir: string | ShellSpecialFolderConstants): Folder3 | null; + + /** Open a folder */ + Open(vDir: string | ShellSpecialFolderConstants): void; + + /** Get Parent object */ + readonly Parent: any; + + /** Refresh the menu */ + RefreshMenu(): void; + + /** Immersive Search */ + SearchCommand(): void; + + /** + * Start a service by name, and optionally set it to autostart. + * + * The method returns `false` if the service has already been started. Before calling this method, you can call + * [Shell.IsServiceRunning](https://msdn.microsoft.com/en-us/library/windows/desktop/gg537742.aspx) to ascertain the status of the service. + */ + ServiceStart(ServiceName: string, Persistent?: boolean): boolean; + + /** + * Stop a service by name, and optionally disable autostart. + * + * The method returns `false` if the service has already been stopped. Before calling this method, you can call + * [Shell.IsServiceRunning](https://msdn.microsoft.com/en-us/library/windows/desktop/gg537742.aspx) to ascertain the status of the service. + */ + ServiceStop(ServiceName: string, Persistent?: boolean): boolean; + + /** Displays the **Date and Time Properties** dialog box. */ + SetTime(): void; + + /** + * Execute generic command + * @param sFile A string that contains the name of the file on which `ShellExecute` will perform the action specified by `vOperation`. + * @param [vArgs] A string that contains parameter values for the operation. + * @param [vDir] The fully qualified path of the directory that contains the file specified by `sFile`. If this parameter is not specified, the current working directory is used. + * @param [vOperation] The operation to be performed. This value is set to one of the verb strings that is supported by the file. If this parameter is not specified, the default operation is + * performed. + * @param [vShow] A recommendation as to how the application window should be displayed initially. The application can ignore this recommendation. + */ + ShellExecute(File: string, vArgs?: string, vDir?: string, vOperation?: string, vShow?: ShellExecuteShow): void; + + /** Show/Hide browser bar. */ + ShowBrowserBar(bstrClsid: ExplorerBarCLSID, bShow: boolean): any; + + /** Exit Windows */ + ShutdownWindows(): void; + + /** Tile windows horizontally */ + TileHorizontally(): void; + + /** Tile windows vertically */ + TileVertically(): void; + + /** Raise/lower the desktop */ + ToggleDesktop(): void; + + /** Displays the **Taskbar and Start Menu Properties** dialog box. */ + TrayProperties(): void; + + /** Undo Minimize All */ + UndoMinimizeALL(): void; + + /** The collection of open folder windows */ + Windows(): ShellWindows; + + /** Displays the **Windows Security** dialog box. */ + WindowsSecurity(): void; + + /** Displays your open windows in a 3D stack that you can flip through. */ + WindowSwitcher(): void; + } + + /** ShellDispatch Load in Shell Context */ + class ShellDispatchInproc { + private 'Shell32.ShellDispatchInproc_typekey': ShellDispatchInproc; + private constructor(); + } + + /** Shell Folder Item */ + class ShellFolderItem { + private 'Shell32.ShellFolderItem_typekey': ShellFolderItem; + private constructor(); + + /** Get Application object */ + readonly Application: any; + + /** Access an extended property */ + ExtendedProperty(bstrPropName: string): any; + + /** If item is a folder return folder object */ + readonly GetFolder: Folder3 | null; + + /** If item is link return link object */ + readonly GetLink: ShellLinkObject | null; + + /** + * Execute a command on the item. + * Must be one of the values returned by the item's `FolderItemVerb.Name` property. + * If no verb is specified, the default verb will be invoked. + */ + InvokeVerb(vVerb?: string): void; + + /** + * Extended version of InvokeVerb + * @param vVerb String that corresponds to the command to be executed. If no verb is specified, the default verb is executed. + * @param vArgs String with one or more arguments to the command specified by vVerb. The format of this string depends on the particular verb. + */ + InvokeVerbEx(vVerb?: string, vArgs?: string): void; + + /** Indicates if the item can be hosted inside a browser or Windows Explorer frame. */ + readonly IsBrowsable: boolean; + + /** Is the item a file system object? */ + readonly IsFileSystem: boolean; + + /** Is the item a Folder? */ + readonly IsFolder: boolean; + + /** Is the item a link? */ + readonly IsLink: boolean; + + /** Modification Date? */ + ModifyDate: VarDate; + + /** Get display name for item */ + Name: string; + + /** Get Parent object */ + readonly Parent: any; + + /** Get the pathname to the item */ + readonly Path: string; + + /** Size */ + readonly Size: number; + + /** Contains a string representation of the item's type */ + readonly Type: string; + + /** Get the list of verbs for the object */ + Verbs(): FolderItemVerbs; + } + + /** Shell Folder View Object */ + class ShellFolderView { + private 'Shell32.ShellFolderView_typekey': ShellFolderView; + private constructor(); + + /** Get Application object */ + readonly Application: any; + + /** Get Current View Mode */ + CurrentViewMode: number; + + /** Filter View */ + FilterView(bstrFilterText: string): void; + + /** The currently focused item in the folder */ + readonly FocusedItem: ShellFolderItem; + + /** Get the folder being viewed */ + readonly Folder: Folder3; + + /** Get Folder Flags */ + FolderFlags: number; + + /** Get Group By Column */ + GroupBy: string; + + /** Set Icon Size */ + IconSize: number; + + /** Show items menu and return command selected */ + PopupItemMenu(pfi: ShellFolderItem, vx?: any, vy?: any): string; + + /** The collection of Selected Items in folder */ + SelectedItems(): FolderItems3; + + /** Select the item */ + SelectItem(pvfi: ShellFolderItem, dwFlags: ShellFolderViewSelectItem): void; + + /** Select Item relative to the Current Item */ + SelectItemRelative(iRelative: number): void; + + /** Get Sorting Columns */ + SortColumns: string; + + /** Returns the view options for showing a folder. */ + readonly ViewOptions: ShellFolderViewOptions; + } + + /** + * The **ShellFolderView** object fires two events, **EnumDone** and **SelectionChanged**, that are typically handled by applications. However, some applications + * must handle events from a series of **ShellFolderView** objects. For example, an application might host a **WebBrowser** control that allows users to navigate through + * a series of folders. Each folder has its own **ShellFolderView** object with its associated events. Handling these events can be difficult. + * + * The **ShellFolderViewOC** object simplifies event handling for such scenarios. It allows applications to handle events for all ShellFolderView objects with a single + * pair of **ShellFolderViewOC** event handlers. Each time the user navigates to a new folder, the application passes the associated **ShellFolderView** object to the + * **ShellFolderViewOC** object by calling **SetFolderView**. Then, when an **EnumDone** or **SelectionChanged** event is fired, the **ShellFolderViewOC** object + * forwards the event to its own handler for processing. + */ + class ShellFolderViewOC { + private 'Shell32.ShellFolderViewOC_typekey': ShellFolderViewOC; + private constructor(); + + /** Set the ShellFolderView object to monitor events of. */ + SetFolderView(pdisp: ShellFolderView): void; + } + + /** Shell Link object */ + class ShellLinkObject { + private 'Shell32.ShellLinkObject_typekey': ShellLinkObject; + private constructor(); + + /** Arguments for the link */ + Arguments: string; + + /** Description of the link */ + Description: string; + + /** Get the IconLocation for the link */ + GetIconLocation(pbs: string): number; + + /** Hotkey for the link */ + Hotkey: number; + + /** Fully qualified path of the link */ + Path: string; + + /** Tell the link to resolve itself */ + Resolve(fFlags: ShellLinkResolveFlags): void; + + /** + * Tell the link to save the changes + * @param sFile The fully qualified path of the file where the new link information is to be saved. If no file is specified, the current file is used. + */ + Save(vWhere?: string): void; + + /** + * Set the IconLocation for the link + * @param sPath The fully qualified path of the file that contains the icon. + * @param iIcon The index of the icon in the file specified by _sPath_. + */ + SetIconLocation(sPath: string, iIcon: number): void; + + /** Get the Show Command for the link */ + ShowCommand: LinkShowWindowState; + + /** Get the target of a link object */ + readonly Target: ShellFolderItem | null; + + /** Get the working directory for the link */ + WorkingDirectory: string; + } + + class ShellWindows { + private 'Shell32.ShellWindows_typekey': ShellWindows; + private constructor(); + + /** + * Retrieves an InternetExplorer object that represents the Shell window. + * @param index Default is 0 + */ + Item(index?: number): SHDocVw.InternetExplorer; + + /** Contains the number of items in the collection. */ + readonly Count: number; + } +} + +interface ActiveXObject { + on( + obj: Shell32.ShellFolderView, event: 'BeginDrag' | 'DefaultVerbInvoked' | 'EnumDone' | 'SelectionChanged' | 'VerbInvoked', handler: ( + this: Shell32.ShellFolderView, parameter: {}) => void): void; + on( + obj: Shell32.ShellFolderViewOC, event: 'BeginDrag' | 'DefaultVerbInvoked' | 'EnumDone' | 'SelectionChanged' | 'VerbInvoked', + handler: (this: Shell32.ShellFolderViewOC, parameter: {}) => void): void; + new (progid: K): ActiveXObjectNameMap[K]; +} + +interface ActiveXObjectNameMap { + 'Shell.Application': Shell32.Shell; + 'Shell.FolderView': Shell32.ShellFolderViewOC; +} + +interface EnumeratorConstructor { + new(col: Shell32.FolderItems3): Enumerator; + new(col: Shell32.FolderItemVerbs): Enumerator; + new(col: Shell32.ShellWindows): Enumerator; +} diff --git a/types/activex-shell/package.json b/types/activex-shell/package.json new file mode 100644 index 0000000000..d9b1031263 --- /dev/null +++ b/types/activex-shell/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "activex-helpers": "*" + } +} \ No newline at end of file diff --git a/types/activex-shell/tsconfig.json b/types/activex-shell/tsconfig.json new file mode 100644 index 0000000000..97b3ee81cb --- /dev/null +++ b/types/activex-shell/tsconfig.json @@ -0,0 +1,22 @@ + +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es5", "scripthost"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "activex-shell-tests.ts" + ] +} \ No newline at end of file diff --git a/types/activex-shell/tslint.json b/types/activex-shell/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/activex-shell/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/activex-stdole/tsconfig.json b/types/activex-stdole/tsconfig.json index cbe3ce7aae..d96d7fd4dc 100644 --- a/types/activex-stdole/tsconfig.json +++ b/types/activex-stdole/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-vbide/tsconfig.json b/types/activex-vbide/tsconfig.json index 6fb205a3c4..504d5c01b2 100644 --- a/types/activex-vbide/tsconfig.json +++ b/types/activex-vbide/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-wia/tsconfig.json b/types/activex-wia/tsconfig.json index e77b3d1b66..b1b82a2134 100644 --- a/types/activex-wia/tsconfig.json +++ b/types/activex-wia/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/activex-word/tsconfig.json b/types/activex-word/tsconfig.json index c62626ca52..e220df56dc 100644 --- a/types/activex-word/tsconfig.json +++ b/types/activex-word/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/adal-angular/tsconfig.json b/types/adal-angular/tsconfig.json index 9052e3fc04..b7adaf8e3c 100644 --- a/types/adal-angular/tsconfig.json +++ b/types/adal-angular/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/add-zero/tsconfig.json b/types/add-zero/tsconfig.json index e71d235cdf..bb76d7ed20 100644 --- a/types/add-zero/tsconfig.json +++ b/types/add-zero/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "add-zero-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/add2home/tsconfig.json b/types/add2home/tsconfig.json index 904e5e7453..d32b9dc570 100644 --- a/types/add2home/tsconfig.json +++ b/types/add2home/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/adm-zip/tsconfig.json b/types/adm-zip/tsconfig.json index 8e998c6f38..da3abd8503 100644 --- a/types/adm-zip/tsconfig.json +++ b/types/adm-zip/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/adone/adone.d.ts b/types/adone/adone.d.ts index 34540761b5..0d6e3255ee 100644 --- a/types/adone/adone.d.ts +++ b/types/adone/adone.d.ts @@ -110,6 +110,8 @@ declare namespace adone { export function require(path: string): object; export const package: object; + export function sprintf(format: string, ...args: any[]): string; + namespace I { interface Runtime { term: object; // TODO diff --git a/types/adone/glosses/application.d.ts b/types/adone/glosses/application.d.ts index 6b2b783d68..4c9661843a 100644 --- a/types/adone/glosses/application.d.ts +++ b/types/adone/glosses/application.d.ts @@ -1,5 +1,275 @@ declare namespace adone { namespace application { - function run(app: object, ignoreArgs?: boolean): Promise; + namespace I { + type ArgumentType = ((x: string, index: number) => any) | RegExp; + + interface ArgumentInfo { + name: string | string[]; + action?: "store" + | "store_const" + | "store_true" + | "store_false" + | "append" + | "count" + | "set"; + nargs?: number | "+" | "*" | "?" + type?: ArgumentType | ArgumentType[]; + verify?: (args: any, opts: any) => boolean; // TODO + required?: boolean; + description?: string; + help?: string; + holder?: string | string[]; + appendDefaultMessage?: boolean; + appendChoicesHelpMessage?: boolean; + default?: any; + enabled?: boolean; + } + + interface Group { + name: string; + description?: string; + } + + interface MainCommandInfo { + arguments?: Array; + options?: Array; + description?: string; + optionsGroups?: Group[]; + blindMode?: boolean; + match?: (name: string) => boolean; + handler?: (args: object, opts: object) => void; + } + + interface CommandInfo extends MainCommandInfo { + name?: string | string[]; + group?: string; + } + + interface ApplicationInfo { + name?: string; + description?: string; + subsystems?: SubsystemInfo[]; + commandsGroups?: Group[] + } + + interface SubsystemInfo { + name: string; + description?: string; + subsystem: string; + transpile?: boolean; + group?: string; + } + } + + function DSubsystem(info?: I.ApplicationInfo): (...args: any[]) => void; + + function DApplication(info?: I.ApplicationInfo): (...args: any[]) => void; + + function DCliCommand(info?: I.CommandInfo): (...args: any[]) => void; + + function DMainCliCommand(info?: I.MainCommandInfo): (...args: any[]) => void; + + namespace I { + interface LoadSubsystemOptions { + 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 + } + + interface AddSubsystemInfo extends CommonAddSubsystemInfo { + subsystem: Subsystem | string, + } + + interface SysInfo { + name: string; + description: string; + group: string; + configureArgs: any[]; + instance: Subsystem; + path: string | null; + } + + interface SysInfoWithPath extends SysInfo { + path: string; + } + + interface SysInfoNoPath extends SysInfo { + path: null; + } + + interface AddSubsystemsFromOptions extends CommonAddSubsystemInfo { + filter?: string[] | ((file: string) => boolean | Promise) + } + } + + class Subsystem extends event.AsyncEmitter { + constructor(options?: { name?: string }); + + readonly name?: string; + + readonly root?: Subsystem; + + setRoot(root: Subsystem): void; + + readonly parent?: Subsystem; + + readonly state: number; + + readonly isOwned: boolean; + + setState(state: number): void; + + waitForState(expectedState: number, timeout?: number): Promise; + + configure(): void; + + initialize(): void; + + uninitialize(): void; + + configureSubsystems(): Promise; + + uninitializeSubsystems(): Promise; + + reinitializeSubsystems(): Promise; + + configureSubsystem(name: string): Promise; + + loadSubsystem(subsystem: string | Subsystem, options?: I.LoadSubsystemOptions): Promise; + + unloadSubsystem(name: string): Promise; + + initializeSubsystem(name: string): Promise; + + uninitializeSubsystem(name: string): Promise; + + reinitializeSubsystem(name: string): Promise; + + getSubsystem(name: string): Subsystem; + + hasSubsystem(name: string): boolean; + + hasSubsystems(): boolean; + + addSubsystem(info: I.AddSubsystemInfo & { subsystem: Subsystem }): I.SysInfoNoPath; + addSubsystem(info: I.AddSubsystemInfo & { subsystem: string }): I.SysInfoWithPath; + + addSubsystemsFrom(path: string, options?: I.AddSubsystemsFromOptions): I.SysInfoWithPath; + + instantiateSubsystem(subsystem: string | Subsystem, options?: { + transpile?: boolean + }): Subsystem; + + deleteSubsystem(name: string, force?: boolean): void; + + getSubsystemInfo(name: string): I.SysInfo; + + getSubsystems(): I.SysInfo[]; + } + + namespace I { + interface ReportOptions { + events?: string; + signal?: string; + filename?: string; + directory?: string; + } + } + + class Application extends Subsystem { + readonly isMain: boolean; + + main(): void; + + enableReport(opts?: I.ReportOptions): void; + + reportEnabled(): boolean; + + run(): Promise; + + exit(code?: number): Promise; + + exitOnSignal(...names: string[]): void; + + removeProcesshandlers(): void; + + _uncaughtException(err: any): void; + + _unhandledRejection(reson: any, p: Promise): void; + + _rejectionHandled(p: Promise): void; + + _signalExit(sigName: string): void; + + } + + namespace I { + interface Command { + // ? + } + + interface Argument { + // ? + } + + interface PositionalArgument extends Argument { + // ? + } + + interface OptionalArgument extends Argument { + // ? + } + + interface DefineCommandFromSubsystemOptions { + name?: string; + description?: string; + group?: string; + subsystem: string | Subsystem; + configureArgs?: any[]; + lazily?: boolean; + transpile?: boolean; + } + } + + class CliApplication extends Application { + run(options?: { ignoreArgs?: boolean }): Promise; + + getVersion(): Promise; + + exposeCliInterface(ctxId?: string): void; + + readonly mainCommand: I.Command; + + defineMainCommand(schema: I.MainCommandInfo): this; + + defineArguments(schema: I.MainCommandInfo): this; + + defineCommand(schema: I.CommandInfo): I.Command; + + defineCommandFromSubsystem(options?: I.DefineCommandFromSubsystemOptions): void; + + defineOption(schema: I.ArgumentInfo): void; + + defineOptionsGroup(schema: I.Group): void; + + defineCommandsGroup(schema: I.Group): void; + + option(path: string, options?: { value?: boolean }): any; + } + + function run(app: Application, ignoreArgs?: boolean): Promise; + + function runCli(app: CliApplication, ignoreArgs?: boolean): Promise; } } diff --git a/types/adone/glosses/archives.d.ts b/types/adone/glosses/archives.d.ts index 3f059ff14d..ddeb25d891 100644 --- a/types/adone/glosses/archives.d.ts +++ b/types/adone/glosses/archives.d.ts @@ -448,7 +448,7 @@ declare namespace adone { isCompressed(): boolean; } - interface ZipFile extends event.EventEmitter { + interface ZipFile extends event.Emitter { /** * true until close() is called; then it's false */ diff --git a/types/adone/glosses/assertion.d.ts b/types/adone/glosses/assertion.d.ts index e7ba662791..ca0d75bdf5 100644 --- a/types/adone/glosses/assertion.d.ts +++ b/types/adone/glosses/assertion.d.ts @@ -38,7 +38,7 @@ declare namespace adone { proxyExcludedKeys: string[]; } - type PossibleTypes = util.I.PossibleTypes | "array"; + type PossibleTypes = meta.I.PossibleTypes | "array"; type UseFunction = (fn: () => void) => assertion; @@ -53,18 +53,10 @@ declare namespace adone { * Throws an AssertionError, like node.js */ fail(actual?: any, expected?: any, message?: string, operator?: any): void; - /** - * Asserts that value is truthy - */ - isOk(value: any, message?: string): void; /** * Asserts that value is truthy */ ok(value: any, message?: string): void; - /** - * Asserts that value is falsy - */ - isNotOk(value: any, message?: string): void; /** * Asserts that value is falsy */ @@ -104,51 +96,51 @@ declare namespace adone { /** * Asserts that value > above */ - isAbove(value: any, above: any, message?: string): void; + above(value: any, above: any, message?: string): void; /** * Asserts that value >= atLeast */ - isAtLeast(value: any, atLeast: any, message?: string): void; + atLeast(value: any, atLeast: any, message?: string): void; /** * Asserts that value < below */ - isBelow(value: any, below: any, message?: string): void; + below(value: any, below: any, message?: string): void; /** * Asserts that value <= atMost */ - isAtMost(value: any, atMost: any, message?: string): void; + atMost(value: any, atMost: any, message?: string): void; /** * Asserts that value is true */ - isTrue(value: any, message?: string): void; + true(value: any, message?: string): void; /** * Asserts that value is not true */ - isNotTrue(value: any, message?: string): void; + notTrue(value: any, message?: string): void; /** * Asserts that value is false */ - isFalse(value: any, message?: string): void; + false(value: any, message?: string): void; /** * Asserts that value is not false */ - isNotFalse(value: any, message?: string): void; + notFalse(value: any, message?: string): void; /** * Asserts that value is null */ - isNull(value: any, message?: string): void; + null(value: any, message?: string): void; /** * Asserts that valus is not null */ - isNotNull(value: any, message?: string): void; + notNull(value: any, message?: string): void; /** * Asserts that value is NaN */ - isNaN(value: any, message?: string): void; + NaN(value: any, message?: string): void; /** * Asserts that value is not NaN */ - isNotNaN(value: any, message?: string): void; + NotNaN(value: any, message?: string): void; /** * Asserts that value is neither null nor undefined */ @@ -160,63 +152,63 @@ declare namespace adone { /** * Asserts that value is undefined */ - isUndefined(value: any, message?: string): void; + undefined(value: any, message?: string): void; /** * Asserts that value is not undefined */ - isDefined(value: any, message?: string): void; + defined(value: any, message?: string): void; /** * Asserts that value is a function */ - isFunction(value: any, message?: string): void; + function(value: any, message?: string): void; /** * Asserts that value is not a function */ - isNotFunction(value: any, message?: string): void; + notFunction(value: any, message?: string): void; /** * Asserts that value is an object of type Object */ - isObject(value: any, message?: string): void; + object(value: any, message?: string): void; /** * Asserts that value is not an object of type Object */ - isNotObject(value: any, message?: string): void; + notObject(value: any, message?: string): void; /** * Asserts that value is an array */ - isArray(value: any, message?: string): void; + array(value: any, message?: string): void; /** * Asserts that value is not an array */ - isNotArray(value: any, message?: string): void; + notArray(value: any, message?: string): void; /** * Asserts that value is a string */ - isString(value: any, message?: string): void; + string(value: any, message?: string): void; /** * Asserts that value is not a string */ - isNotString(value: any, message?: string): void; + notString(value: any, message?: string): void; /** * Asserts that value is a number */ - isNumber(value: any, message?: string): void; + number(value: any, message?: string): void; /** * Asserts that value is not a number */ - isNotNumber(value: any, message?: string): void; + notNumber(value: any, message?: string): void; /** * Asserts that value is a finite number */ - isFinite(value: any, message?: string): void; + finite(value: any, message?: string): void; /** * Asserts that value is a boolean */ - isBoolean(value: any, message?: string): void; + boolean(value: any, message?: string): void; /** * Asserts that value is not a boolean */ - isNotBoolean(value: any, message?: string): void; + notBoolean(value: any, message?: string): void; /** * Asserts that value's type is `type` */ @@ -562,66 +554,34 @@ declare namespace adone { * Throws an error if value is truthy */ ifError(value: any): void; - /** - * Asserts that object is extensible - */ - isExtensible(object: object, message?: string): void; /** * Asserts that object is extensible */ extensible(object: object, message?: string): void; - /** - * Asserts that object is not extensible - */ - isNotExtensible(object: object, message?: string): void; /** * Asserts that object is not extensible */ notExtensible(object: object, message?: string): void; - /** - * Asserts that object is sealed - */ - isSealed(object: object, message?: string): void; /** * Asserts that object is sealed */ sealed(object: object, message?: string): void; - /** - * Asserts that object is not sealed - */ - isNotSealed(object: object, message?: string): void; /** * Asserts that object is not sealed */ notSealed(object: object, message?: string): void; - /** - * Asserts that object is frozen - */ - isFrozen(object: object, message?: string): void; /** * Asserts that object is frozen */ frozen(object: object, message?: string): void; - /** - * Asserts that object is not frozen - */ - isNotFrozen(object: object, message?: string): void; /** * Asserts that object is not frozen */ notFrozen(object: object, message?: string): void; - /** - * Asserts that value is empty - */ - isEmpty(value: any, message?: string): void; /** * Asserts that value is empty */ empty(value: any, message?: string): void; - /** - * Asserts that value is not empty - */ - isNotEmpty(value: any, message?: string): void; /** * Asserts that value is not empty */ @@ -710,43 +670,43 @@ declare namespace adone { /** * Asserts that the target is non-strictly equal to true */ - ok: this; + ok(): this; /** * Asserts that the target is true */ - true: this; + true(): this; /** * Asserts that the target is false */ - false: this; + false(): this; /** * Asserts that the target is null */ - null: this; + null(): this; /** * Asserts that the target is undefined */ - undefined: this; + undefined(): this; /** * Asserts that the target is NaN */ - NaN: this; + NaN(): this; /** * Asserts that the target is neither null nor undefined */ - exist: this; + exist(): this; /** * Asserts that the target is empty */ - empty: this; + empty(): this; /** * Asserts that the target is an arguments object */ - arguments: this; + arguments(): this; /** * Asserts that the target is an arguments object */ - Arguments: this; + Arguments(): this; /** * Asserts that the target is strictly equal to value(===) */ @@ -976,26 +936,26 @@ declare namespace adone { /** * Asserts that the target is extensible */ - extensible: this; + extensible(): this; /** * Asserts that the target is sealed */ - sealed: this; + sealed(): this; /** * Asserts that the target is frozen */ - frozen: this; + frozen(): this; /** * Asserts that the target is a finite number */ - finite: this; + finite(): this; } interface MockAssertions extends Assertion { /** * Asserts that the spy has been called */ - called: this; + called(): this; /** * Asserts that the spy has been called n times */ @@ -1003,15 +963,15 @@ declare namespace adone { /** * Asserts that the spy has been called once */ - calledOnce: this; + calledOnce(): this; /** * Asserts that the spy has been called twice */ - calledTwice: this; + calledTwice(): this; /** * Asserts that the spy has been been called with `new` */ - calledThrice: this; + calledThrice(): this; /** * Asserts that the spy has been called before anotherSpy */ @@ -1059,7 +1019,7 @@ declare namespace adone { } } - class AssertionError extends x.Exception { + class AssertionError extends exception.Exception { constructor(message?: string, props?: object, ssf?: object) } diff --git a/types/adone/glosses/collections.d.ts b/types/adone/glosses/collections.d.ts deleted file mode 100644 index 178921136d..0000000000 --- a/types/adone/glosses/collections.d.ts +++ /dev/null @@ -1,1965 +0,0 @@ -declare namespace adone { - namespace collection { - namespace I.LinkedList { - /** - * Represents the node of a linked list - */ - interface Node { - /** - * The next node - */ - next?: Node; - - /** - * The previous node - */ - prev?: Node; - - /** - * The value this node contains - */ - value: T; - } - } - - /** - * Represents a linked list - */ - class LinkedList { - /** - * The maximum length of the list - */ - readonly maxLength: number; - - /** - * Current length of the list - */ - readonly length: number; - - /** - * Whether the list is autoresizable - */ - readonly autoresize: boolean; - - /** - * @param maxLength Maximum length of the linked list - */ - constructor(maxLength?: number); - - /** - * Whether the list is full - */ - readonly full: boolean; - - /** - * Whether the list is empty - */ - readonly empty: boolean; - - /** - * Resizes the list - */ - resize(newLength: number): this; - - /** - * Adds a new node to the end - * - * @returns Added node - */ - push(value: T): I.LinkedList.Node; - - /** - * Removes the last node, returns undefined if the list is empty - */ - pop(): T | undefined; - - /** - * Removes the first node, returns undefined if the list is empty - */ - shift(): T | undefined; - - /** - * Inserts a new node at the beginning of the list - * - * @returns Added node - */ - unshift(value: T): I.LinkedList.Node; - - /** - * Moves the given node to the end of the list - */ - pushNode(node: I.LinkedList.Node): void; - - /** - * Moved the given node to the beginning of the list - */ - unshiftNode(node: I.LinkedList.Node): void; - - /** - * Removes the given node from the list - */ - removeNode(node: I.LinkedList.Node): void; - - /** - * Clears the list - * - * @param strong Whether to reset all the node's values - */ - clear(strong?: boolean): void; - - /** - * Convers the list to an array - */ - toArray(): T[]; - - /** - * The first element of the list - */ - readonly front: T; - - /** - * The last element of the list - */ - readonly back: T; - - /** - * Returns an iterator over the list elements - */ - [Symbol.iterator](): IterableIterator; - - /** - * Returns the next node for the given node - */ - nextNode(node: I.LinkedList.Node): I.LinkedList.Node; - - /** - * Maps this linked list to a new one using the given function - */ - map(fn: (value: T, index: number) => R): LinkedList; - - /** - * Invokes the given callback for each value from the beginning to the end (much faster than for-of). - * If the given function returns false it stops iterating. - */ - forEach(callback: (value: T, index: number) => void | boolean): void; - - /** - * Default length of a new created linked list - */ - static DEFAULT_LENGTH: number; - } - - namespace I { - type Long = math.Long; - - type Longable = math.I.Longable; - - namespace ByteArray { - interface Varint32 { - value: number; - length: number; - } - - interface Varint64 { - value: Long; - length: number; - } - - interface String { - string: string; - length: number; - } - - type Wrappable = string | ByteArray | Buffer | Uint8Array | ArrayBuffer; - - type Metrics = "b" | "c"; - } - } - - /** - * Represents an array of bytes, enhanced Node.js Buffer - */ - class ByteArray { - /** - * Constructs a new ByteArray - * - * @param capacity Initial capacity. Defaults to ByteArray.DEFAULT_CAPACITY(64) - * @param noAssert Whether to skip assertions of offsets and values. Defaults to ByteArray.DEFAULT_NOASSERT(false) - */ - constructor(capacity?: number, noAssert?: boolean); - - /** - * Reads a BitSet as an array of booleans. - * - * @param offset Offset to read from. Will use and increase offset by length if omitted. - */ - readBitSet(offset?: number): boolean[]; - - /** - * Reads the specified number of bytes. - * - * @param length Number of bytes to read - * @param offset Offset to read from. Will use and increase offset by length if omitted. - */ - read(length: number, offset?: number): ByteArray; - - /** - * Reads an 8bit signed integer - * - * @param offset Offset to read from - */ - readInt8(offset?: number): number; - - /** - * Reads an 8bit unsigned integer - * - * @param offset Offset to read from - */ - readUInt8(offset?: number): number; - - /** - * Reads a 16bit signed le integer - * - * @param offset Offset to read from - */ - readInt16LE(offset?: number): number; - - /** - * Reads a 16bit unsigned le integer - * - * @param offset Offset to read from - */ - readUInt16LE(offset?: number): number; - - /** - * Reads a 16bit signed be integer - * - * @param offset Offset to read from - */ - readInt16BE(offset?: number): number; - - /** - * Reads a 16bit unsigned be integer - * - * @param offset Offset to read from - */ - readUInt16BE(offset?: number): number; - - /** - * Reads a 32bit signed le integer - * - * @param offset Offset to read from - */ - readInt32LE(offset?: number): number; - - /** - * Reads a 32bit unsigned le integer - * - * @param offset Offset to read from - */ - readUInt32LE(offset?: number): number; - - /** - * Reads a 32bit signed be integer - * - * @param offset Offset to read from - */ - readInt32BE(offset?: number): number; - - /** - * Reads a 32bit unsigned be integer - * - * @param offset Offset to read from - */ - readUInt32BE(offset?: number): number; - - /** - * Reads a 64bit signed le integer as math.Long - * - * @param offset Offset to read from - */ - readInt64LE(offset?: number): math.Long; - - /** - * Reads a 64bit unsigned le integer as math.Long - * - * @param offset Offset to read from - */ - readUInt64LE(offset?: number): math.Long; - - /** - * Reads a 64bit signed be integer as math.Long - * - * @param offset Offset to read from - */ - readInt64BE(offset?: number): math.Long; - - /** - * Reads a 64bit unsigned be integer as math.Long - * - * @param offset Offset to read from - */ - readUInt64BE(offset?: number): math.Long; - - /** - * Reads a 32bit le float - * - * @param offset Offset to read from - */ - readFloatLE(offset?: number): number; - - /** - * Reads a 32bit be float - * - * @param offset Offset to read from - */ - readFloatBE(offset?: number): number; - - /** - * Reads a 64bit le float - * - * @param offset Offset to read from - */ - readDoubleLE(offset?: number): number; - - /** - * Reads a 64bit be float - * - * @param offset Offset to read from - */ - readDoubleBE(offset?: number): number; - - /** - * Appends some data to this ByteArray. - * This will overwrite any contents behind the specified offset up to the appended data's length. - * - * @param source The source write from - * @param offset Offset to write to - * @param length length to read from the source - * @param encoding encoding to use for wrapping the source in bytearray - */ - write(source: I.ByteArray.Wrappable, offset?: number, length?: number, encoding?: string): this; - - /** - * Writes the array as a bitset. - * @param value Array of booleans to write - */ - writeBitSet(value: number[]): this; - - /** - * Writes the array as a bitset. - * @param value Array of booleans to write - * @param offset Offset to write to - */ - writeBitSet(value: number[], offset: number): number; - - /** - * Writes an 8bit signed integer - * - * @param offset Offset to write to - */ - writeInt8(value: number, offset?: number): this; - - /** - * Writes an 8bit unsigned integer - * - * @param offset Offset to write to - */ - writeUInt8(value: number, offset?: number): this; - - /** - * Writes a 16bit signed le integer - * - * @param offset Offset to write to - */ - writeInt16LE(value: number, offset?: number): this; - - /** - * Writes a 16bit signed be integer - * - * @param offset Offset to write to - */ - writeInt16BE(value: number, offset?: number): this; - - /** - * Writes a 16bit unsigned le integer - * - * @param offset Offset to write to - */ - writeUInt16LE(value: number, offset?: number): this; - - /** - * Writes a 16bit unsigned be integer - * - * @param offset Offset to write to - */ - writeUInt16BE(value: number, offset?: number): this; - - /** - * Writes a 32bit signed le integer - * - * @param offset Offset to write to - */ - writeInt32LE(value: number, offset?: number): this; - - /** - * Writes a 32bit signed be integer - * - * @param offset Offset to write to - */ - writeInt32BE(value: number, offset?: number): this; - - /** - * Writes a 32bit unsigned le integer - * - * @param offset Offset to write to - */ - writeUInt32LE(value: number, offset?: number): this; - - /** - * Writes a 32bit unsigned be integer - * - * @param offset Offset to write to - */ - writeUInt32BE(value: number, offset?: number): this; - - /** - * Writes a 64bit signed le long integer - * - * @param offset Offset to write to - */ - writeInt64LE(value: math.Long | string | number, offset?: number): this; - - /** - * Writes a 64bit signed be long integer - * - * @param offset Offset to write to - */ - writeInt64BE(value: math.Long | string | number, offset?: number): this; - - /** - * Writes a 64bit unsigned le long integer - * - * @param offset Offset to write to - */ - writeUInt64LE(value: math.Long | string | number, offset?: number): this; - - /** - * Writes a 64bit unsigned be long integer - * - * @param offset Offset to write to - */ - writeUInt64BE(value: math.Long | string | number, offset?: number): this; - - /** - * Writes a 32bit le float - * - * @param offset Offset to write to - */ - writeFloatLE(value: number, offset?: number): this; - - /** - * Writes a 32bit be float - * - * @param offset Offset to write to - */ - writeFloatBE(value: number, offset?: number): this; - - /** - * Writes a 64bit le float - * - * @param offset Offset to write to - */ - writeDoubleLE(value: number, offset?: number): this; - - /** - * Writes a 64bit be float - * - * @param offset Offset to write to - */ - writeDoubleBE(value: number, offset?: number): this; - - /** - * Writes a 32bit base 128 variable-length integer - */ - writeVarint32(value: number): this; - - /** - * Writes a 32bit base 128 variable-length integer - * - * @param offset Offset to write to - */ - writeVarint32(value: number, offset: number): number; - - /** - * Writes a zig-zag encoded 32bit base 128 variable-length integer - */ - writeVarint32ZigZag(value: number): this; - - /** - * Writes a zig-zag encoded 32bit base 128 variable-length integer - * - * @param offset Offset to write to - */ - writeVarint32ZigZag(value: number, offset: number): number; - - /** - * Reads a 32bit base 128 variable-length integer - */ - readVarint32(): number; - - /** - * Reads a 32bit base 128 variable-length integer - * - * @param offset Offset to read from - */ - readVarint32(offset: number): I.ByteArray.Varint32; - - /** - * Reads a zig-zag encoded 32bit base 128 variable-length integer - */ - readVarint32ZigZag(): number; - - /** - * Reads a zig-zag encoded 32bit base 128 variable-length integer - * - * @param offset Offset to read from - */ - readVarint32ZigZag(offset: number): I.ByteArray.Varint32; - - /** - * Writes a 64bit base 128 variable-length integer - */ - writeVarint64(value: math.Long | string | number): this; - - /** - * Writes a 64bit base 128 variable-length integer - * - * @param offset Offset to write to - */ - writeVarint64(value: math.Long | string | number, offset: number): number; - - /** - * Writes a zig-zag encoded 64bit base 128 variable-length integer - */ - writeVarint64ZigZag(value: math.Long | string | number): this; - - /** - * Writes a zig-zag encoded 64bit base 128 variable-length integer - * - * @param offset Offset to write to - */ - writeVarint64ZigZag(value: math.Long | string | number, offset: number): number; - - /** - * Reads a 64bit base 128 variable-length integer - */ - readVarint64(): I.Long; - - /** - * Reads a 64bit base 128 variable-length integer - * - * @param offset Offset to read from - */ - readVarint64(offset: number): I.ByteArray.Varint64; - - /** - * Reads a zig-zag encoded 64bit base 128 variable-length integer - */ - readVarint64ZigZag(): math.Long; - - /** - * Reads a zig-zag encoded 64bit base 128 variable-length integer - * - * @param offset Offset to read from - */ - readVarint64ZigZag(offset: number): I.ByteArray.Varint64; - - /** - * Writes a NULL-terminated UTF8 encoded string. - * For this to work the specified string must not contain any NULL characters itself - */ - writeCString(str: string): this; - - /** - * Writes a NULL-terminated UTF8 encoded string. - * For this to work the specified string must not contain any NULL characters itself - * - * @param offset Offset to write to - */ - writeCString(str: string, offset: number): number; - - /** - * Reads a NULL-terminated UTF8 encoded string. - * For this to work the string read must not contain any NULL characters itself - */ - readCString(): string; - - /** - * Reads a NULL-terminated UTF8 encoded string. - * For this to work the string read must not contain any NULL characters itself - * - * @param offset Offset to read from - */ - readCString(offset: number): I.ByteArray.String; - - /** - * Writes an UTF8 encoded string - */ - writeString(str: string): this; - - /** - * Writes an UTF8 encoded string - * - * @param offset Offset to write to - */ - writeString(str: string, offset: number): number; - - /** - * Reads an UTF8 encoded string - * - * @param length Number of characters or bytes to read - * @param metrics Metrics specifying what n is meant to count. Defaults to ByteArray.METRICS_CHARS("c") - */ - readString(length: number, metrics?: I.ByteArray.Metrics): string; - - /** - * Reads an UTF8 encoded string - * - * @param length Number of characters or bytes to read - * @param metrics Metrics specifying what n is meant to count. Defaults to ByteArray.METRICS_CHARS("c") - * @param offset Offset to read from - */ - readString(length: number, metrics: I.ByteArray.Metrics, offset: number): I.ByteArray.String; - - /** - * Reads an UTF8 encoded string - * - * @param length Number of characters or bytes to read - * @param offset Offset to read from - */ - readString(length: number, offset: number): I.ByteArray.String; - - /** - * Writes a length as varint32 prefixed UTF8 encoded string - */ - writeVString(str: string): this; - - /** - * Writes a length as varint32 prefixed UTF8 encoded string - * - * @param offset Offset to read from - */ - writeVString(str: string, offset: number): number; - - /** - * Reads a length as varint32 prefixed UTF8 encoded string - */ - readVString(): string; - - /** - * Reads a length as varint32 prefixed UTF8 encoded string - * - * @param offset Offset to read from - */ - readVString(offset: number): I.ByteArray.String; - - /** - * Appends this ByteArray's contents to another ByteArray. - * This will overwrite any contents behind the specified offset up to the length of this ByteArray's data - * - * @param offset Offset to append to - */ - appendTo(target: ByteArray, offset?: number): this; - - /** - * Enables or disables assertions of argument types and offsets. - * Assertions are enabled by default but you can opt to disable them if your code already makes sure that everything is valid - */ - assert(assert?: boolean): this; - - /** - * Gets the capacity of this ByteArray's backing buffer - */ - capacity(): number; - - /** - * Clears this ByteArray's offsets by setting offset to 0 and limit to the backing buffer's capacity - */ - clear(): this; - - /** - * Creates a cloned instance of this ByteArray, - * preset with this ByteArray's values for offset, markedOffset and limit - * - * @param copy Whether to copy the backing buffer or to return another view on the same, false by default - */ - clone(copy?: boolean): ByteArray; - - /** - * Compacts this ByteArray to be backed by a buffer of its contents' length. - * Will set offset = 0 and limit = capacity and adapt markedOffset to the same relative position if set - * - * @param begin Offset to start at, buffer offset by default - * @param end Offset to end at, buffer limit by default - */ - compact(begin?: number, end?: number): this; - - /** - * Creates a copy of this ByteArray's contents. - * - * @param begin Begin offset, buffer offset by default - * @param end End offset, buffer limit by default - */ - copy(begin?: number, end?: number): ByteArray; - - /** - * Copies this ByteArray's contents to another ByteArray. - * - * @param targetOffset Offset to copy to. Will use and increase the target's offset by the number of bytes copied if omitted - * @param sourceOffset Offset to start copying from. Will use and increase offset by the number of bytes copied if omitted - * @param sourceLimit Offset to end copying from, defaults to the buffer limit - */ - copyTo(target: ByteArray, targetOffset?: number, souceOffset?: number, sourceLimit?: number): this | ByteArray; - - /** - * Makes sure that this ByteArray is backed by a ByteArray#buffer of at least the specified capacity. - * If the current capacity is exceeded, it will be doubled. - * If double the current capacity is less than the required capacity, the required capacity will be used instead - */ - ensureCapacity(capacity: number): this; - - /** - * Overwrites this ByteArray's contents with the specified value. - * - * @param value Byte value to fill with. If given as a string, the first character is used - * @param begin Begin offset. Will use and increase offset by the number of bytes written if omitted. defaults to offset - * @param end End offset, defaults to limit. - */ - fill(value: string | number, begin?: number, end?: number): this; - - /** - * Makes this ByteArray ready for a new sequence of write or relative read operations. - * Sets limit = offset and offset = 0. - * Make sure always to flip a ByteArray when all relative read or write operations are complete - */ - flip(): this; - - /** - * Marks an offset on this ByteArray to be used later - * - * @param offset Offset to mark. Defaults to offset. - */ - mark(offset?: number): this; - - /** - * Prepends some data to this ByteArray. - * This will overwrite any contents before the specified offset up to the prepended data's length. - * If there is not enough space available before the specified offset, - * the backing buffer will be resized and its contents moved accordingly - * - * @param source Data to prepend - * @param offset Offset to prepend at. Will use and decrease offset by the number of bytes prepended if omitted. - */ - prepend(source: I.ByteArray.Wrappable, offset: number): this; - - /** - * Prepends some data to this ByteArray. - * This will overwrite any contents before the specified offset up to the prepended data's length. - * If there is not enough space available before the specified offset, - * the backing buffer will be resized and its contents moved accordingly - * - * @param source Data to prepend - * @param encoding Encoding if data is a string - * @param offset Offset to prepend at. Will use and decrease offset by the number of bytes prepended if omitted. - */ - prepend(source: I.ByteArray.Wrappable, encoding?: string, offset?: number): this; - - /** - * Prepends this ByteArray to another ByteArray. - * This will overwrite any contents before the specified offset up to the prepended data's length. - * If there is not enough space available before the specified offset, - * the backing buffer will be resized and its contents moved accordingly - * - * @param offset Offset to prepend at - */ - prependTo(target: ByteArray, offset?: number): this; - - /** - * Gets the number of remaining readable bytes - */ - remaining(): number; - - /** - * Resets this ByteArray's offset. - * If an offset has been marked through mark before, offset will be set to markedOffset, which will then be discarded. - * If no offset has been marked, sets offset = 0 - */ - reset(): this; - - /** - * Resizes this ByteArray to be backed by a buffer of at least the given capacity. - * Will do nothing if already that large or larger. - * - * @param capacity Capacity required - */ - resize(capacity: number): this; - - /** - * Reverses this ByteArray's contents. - * - * @param begin Offset to start at, defaults to offset - * @param end Offset to end at, defaults to limit - */ - reverse(begin?: number, end?: number): this; - - /** - * Skips the next length bytes. This will just advance - */ - skip(length: number): this; - - /** - * Slices this ByteArray by creating a cloned instance with offset = begin and limit = end - * - * @param begin Begin offset, defaults to offset - * @param end End offset, defaults to limit - */ - slice(begin?: number, end?: number): ByteArray; - - /** - * Returns a copy of the backing buffer that contains this ByteArray's contents. - * - * @param forceCopy If true returns a copy, otherwise returns a view referencing the same memory if possible, false by default - * @param begin Begin offset, offset by default - * @param end End offset, limit by default - */ - toBuffer(forceCopy?: boolean, begin?: number, end?: number): Buffer; - - /** - * Returns a raw buffer compacted to contain this ByteArray's contents - */ - toArrayBuffer(): ArrayBuffer; - - /** - * Converts the ByteArray's contents to a string - * - * @param encoding Output encoding - * @param begin Begin offset, offset by default - * @param end End offset, limit by default - */ - toString(encoding?: string, begin?: number, end?: number): string; - - /** - * Encodes this ByteArray's contents to a base64 encoded string - * - * @param begin Begin offset, offset by default - * @param end End offset, limit by default - */ - toBase64(begin?: number, end?: number): string; - - /** - * Encodes this ByteArray to a binary encoded string, that is using only characters 0x00-0xFF as bytes - * - * @param begin Begin offset, offset by default - * @param end End offset, limit by default - */ - toBinary(begin?: number, end?: number): string; - - /** - * Encodes this ByteArray to a hex encoded string with marked offsets - * - * @param columns If true returns two columns hex + ascii, defaults to false - */ - toDebug(columns?: boolean): string; - - /** - * Encodes this ByteArray's contents to a hex encoded string - * - * @param begin Begin offset, offset by default - * @param end End offset, limit by default - */ - toHex(begin?: number, end?: number): string; - - /** - * Encodes this ByteArray's contents to an UTF8 encoded string - * - * @param begin Begin offset, offset by default - * @param end End offset, limit by default - */ - toUTF8(begin?: number, end?: number): string; - - static accessor(): typeof Buffer; - - /** - * Allocates a new ByteArray backed by a buffer of the specified capacity. - * - * @param capacity Initial capacity. Defaults to ByteArray.DEFAULT_CAPACITY(64) - * @param noAssert Whether to skip assertions of offsets and values. Defaults to ByteArray.DEFAULT_NOASSERT(false) - */ - static allocate(capacity?: number, noAssert?: boolean): ByteArray; - - /** - * Concatenates multiple ByteArrays into one - * - * @param encoding Encoding for strings - * @param noAssert Whether to skip assertions of offsets and values. Defaults to ByteArray.DEFAULT_NOASSERT(false) - */ - static concat(buffers: I.ByteArray.Wrappable[], encoding?: string, noAssert?: boolean): ByteArray; - - static type(): typeof Buffer; - - /** - * Wraps a buffer or a string. - * Sets the allocated ByteArray's offset to 0 and its limit to the length of the wrapped data - * - * @param encoding Encoding for strings - * @param noAssert Whether to skip assertions of offsets and values. Defaults to ByteArray.DEFAULT_NOASSERT(false) - */ - static wrap(buffer: I.ByteArray.Wrappable, encoding?: string, noAssert?: boolean): ByteArray; - - /** - * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer - */ - static calculateVarint32(value: number): number; - - /** - * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding - */ - static zigZagEncode32(n: number): number; - - /** - * Decodes a zigzag encoded signed 32bit integer - */ - static zigZagDecode32(n: number): number; - - /** - * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer - */ - static calculateVarint64(value: number | string): number; - - /** - * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding - */ - static zigZagEncode64(value: number | string | I.Long): I.Long; - - /** - * Decodes a zigzag encoded signed 64bit integer. - */ - static zigZagDecode64(value: number | string | I.Long): I.Long; - - /** - * Calculates the number of UTF8 characters of a string. - * JavaScript itself uses UTF-16, - * so that a string's length property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF - */ - static calculateUTF8Chars(str: string): number; - - /** - * Calculates the number of UTF8 bytes of a string. - */ - static calculateString(str: string): number; - - /** - * Decodes a base64 encoded string to a ByteArray - */ - static fromBase64(str: string): ByteArray; - - /** - * Encodes a binary string to base64 like window.btoa does - */ - static btoa(str: string): string; - - /** - * Decodes a base64 encoded string to binary like window.atob does - */ - static atob(b64: string): string; - - /** - * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteArray - */ - static fromBinary(str: string): ByteArray; - - /** - * Decodes a hex encoded string with marked offsets to a ByteArray - */ - static fromDebug(str: string, noAssert?: boolean): ByteArray; - - /** - * Decodes a hex encoded string to a ByteArray - */ - static fromHex(str: string, noAssert?: boolean): ByteArray; - - /** - * Decodes an UTF8 encoded string to a ByteArray - */ - static fromUTF8(str: string, noAssert?: boolean): ByteArray; - - /** - * Default initial capacity - */ - static DEFAULT_CAPACITY: number; - - /** - * Default no assertions flag - */ - static DEFAULT_NOASSERT: boolean; - - /** - * Maximum number of bytes required to store a 32bit base 128 variable-length integer - */ - static MAX_VARINT32_BYTES: number; - - /** - * Maximum number of bytes required to store a 64bit base 128 variable-length integer - */ - static MAX_VARINT64_BYTES: number; - - /** - * Metrics representing number of UTF8 characters. Evaluates to `c`. - */ - static METRICS_CHARS: string; - - /** - * Metrics representing number of bytes. Evaluates to `b`. - */ - static METRICS_BYTES: string; - } - - /** - * Represents a queue - */ - class Queue { - /** - * Whether the queue is full - */ - readonly full: boolean; - - /** - * The length of the queue - */ - readonly length: number; - - /** - * Whether the queue is empty - */ - readonly empty: boolean; - - /** - * Inserts a new element at the end - */ - push(x: S): this; - - /** - * Removes and returns an element from the beginning - */ - pop(): T | undefined; - } - - /** - * Represents an asynchronous queue, each pop is a promise - * that is resolved with an existing element or an element that will be pushed in the future - */ - class AsyncQueue extends Queue> { - /** - * Returns a promise that will be resolved with an existing element or an element that will be pushed in the future - */ - pop(): Promise; - } - - namespace I.PriorityQueue { - interface ConstructorOptions { - /** - * Function that compares objects. - * - * Must return a positive value if a > b, a negative if a < b, and zero for equal objects - */ - compare?(a: T, b: T): number; - - /** - * Function that evaluates the priority value by the given objects, - * if the returned value > 0, then the first argument has higher priority, - * = 0 same priority, < 0 lower priority. - * By default the top element is an element that has the highest priority, - * the default priority function is equal to the compare function - */ - priority?(a: T, b: T): number; - } - } - - /** - * Represents a priority queue - */ - class PriorityQueue { - /** - * Whether the queue is empty - */ - readonly empty: boolean; - - /** - * The length of the queue - */ - readonly length: number; - - constructor(options?: I.PriorityQueue.ConstructorOptions); - - /** - * Clones the queue - */ - clone(): PriorityQueue; - - /** - * Inserts a new element - */ - push(x: T): this; - - /** - * Removes the top element (that has the highest priority) - */ - pop(): T | undefined; - - /** - * Deletes the given element from the queue - */ - delete(x: T): this; - - /** - * Replaces the top element (pop + push) - */ - replace(x: T): T; - - /** - * Faster push + pop - */ - pushpop(x: T): T; - - /** - * Converts the queue to an array, it works with a clone of the queue, so the original queue is untouched - */ - toArray(): T[]; - - /** - * Creates a queue object from the given iterable - */ - static from(iterable: Iterable, options?: I.PriorityQueue.ConstructorOptions): PriorityQueue; - } - - /** - * Represents a faster LRU cache but with less functionality - */ - class FastLRU { - /** - * @param size Cache size, unlimited by default - */ - constructor(size?: number, options?: { - /** - * Function that is called when a value is deleted - */ - dispose?(key: K, value: V): void - }); - - /** - * The actual size of the cache - */ - readonly size: number; - - /** - * Gets the value by the given key - */ - get(key: K): V | undefined; - - /** - * Sets a new value for the given key - */ - set(key: K, value: V): void; - - /** - * Deletes the given key from the cache - */ - delete(key: K): boolean; - - /** - * Checks whether the cache has an element with the given key - */ - has(key: K): boolean; - - /** - * Returns the keys iterator - */ - keys(): IterableIterator; - - /** - * Returns the values iterator - */ - values(): IterableIterator; - - /** - * Returns the entries iterator - */ - entries(): IterableIterator<[K, V]>; - - /** - * Clears the cache - */ - clear(): void; - } - - /** - * Represents a stack - */ - class Stack { - /** - * Whether the stack is empty - */ - readonly empty: boolean; - - /** - * The top element of the stack - */ - readonly top: T; - - /** - * Inserts a new element - */ - push(x: T): this; - - /** - * Removes the top element - */ - pop(): T | undefined; - - /** - * Returns an iterator over the values - */ - [Symbol.iterator](): IterableIterator; - - /** - * Creates a stack and pushed all the values from the given iterable object - */ - static from(iterable: Iterable): Stack; - } - - namespace I.BinarySearchTree { - interface ConstructorOptions { - /** - * The parent tree - */ - parent?: Tree; - - /** - * Value to keep in this node - */ - value?: V; - - /** - * WHether the values must be unique, false by default. - * If false you can store many values for same keys, otherwise only one - */ - unique?: boolean; - - /** - * Custom keys comparator, by default if a > b => -1, a < b -1, a === b => 0 - */ - compareKeys?(a: K, b: K): number; - - /** - * Function that defines whether 2 values are the same, by default a === b - */ - checkValueEquality?(a: V, b: V): boolean; - } - - interface Query { - $lt?: K; - $lte?: K; - $gt?: K; - $gte?: K; - } - } - - /** - * Represents a binary search tree - */ - class BinarySearchTree { - constructor(options?: I.BinarySearchTree.ConstructorOptions>); - - /** - * Returns the max descendant tree - */ - getMaxKeyDescendant(): BinarySearchTree; - - /** - * Returns the maximum key - */ - getMaxKey(): K; - - /** - * Returns the min descendant tree - */ - getMinKeyDescendant(): BinarySearchTree; - - /** - * Returns the minumum key - */ - getMinKey(): K; - - /** - * Traverses the tree and calls the given function for each node - */ - checkAllNodesFullfillCondition(test: (key: K, value: V) => void): void; - - /** - * Checks whether the tree is a binary search tree - */ - checkIsBST(): void; - - /** - * Returns the of keys in the tree - */ - getNumberOfKeys(): number; - - /** - * Inserts a new key/value - */ - insert(key: K, value: V): void; - - /** - * Searches the given key in the tree - */ - search(key: K): V[]; - - /** - * Returns all the values from the given key bounds - */ - betweenBounds(query: I.BinarySearchTree.Query): V[]; - - /** - * Deletes the given key/value from the tree - */ - delete(key: K, value?: V): void; - - /** - * Executed the given callback for each node from left to right - */ - executeOnEveryNode(fn: (tree: BinarySearchTree) => void): void; - - /** - * Prints the tree - */ - prettyPrint(printData?: boolean, spacing?: string): void; - } - - /** - * Represents an AVL tree, a self-balancing binary search tree - */ - class AVLTree { - constructor(options?: I.BinarySearchTree.ConstructorOptions>); - - /** - * Checks whether the tree is an avl tree - */ - checkIsAVLT(): void; - - /** - * Inserts a new key/value - */ - insert(key: K, value: V): void; - - /** - * Deletes the given key/value from the tree - */ - delete(key: K, value?: V): void; - - /** - * Returns the of keys in the tree - */ - getNumberOFKeys(): number; - - /** - * Searches the given key in the tree - */ - search(key: K): V[]; - - /** - * Returns all the values from the given key bounds - */ - betweenBounds(query: I.BinarySearchTree.Query): V[]; - - /** - * Executed the given callback for each node from left to right - */ - executeOnEveryNode(fn: (tree: AVLTree) => void): void; - - /** - * Prints the tree - */ - prettyPrint(printDate?: boolean, spacing?: string): void; - } - - namespace I.RedBlackTree { - interface Node { - /** - * The key associated to the node - */ - key: K; - - /** - * The value associated to the node - */ - value: V; - - /** - * The left subtree of the node - */ - left?: Node; - - /** - * The right subtree of the node - */ - right?: Node; - } - - interface Iterator { - /** - * Checks if the iterator is valid - */ - readonly valid: boolean; - - /** - * The value of the node at the iterator's current position, null if invalid - */ - readonly node: Node | null; - - /** - * The key of the item referenced by the iterator, undefined if invalid - */ - readonly key?: K; - - /** - * The value of the item referenced by the iterator, undefined if invalid - */ - readonly value?: V; - - /** - * Returns the position of this iterator in the sequence - */ - readonly index: number; - - /** - * If true, then the iterator is not at the end of the sequence - */ - readonly hasNext: boolean; - - /** - * If true, then the iterator is not at the beginning of the sequence - */ - readonly hasPrev: boolean; - - /** - * The tree associated to the iterator - */ - tree: RedBlackTree; - - /** - * Makes a copy of the iterator - */ - clone(): Iterator; - - /** - * Removes the item at the position of the iterator and returns a new rb-tree - */ - remove(): RedBlackTree; - - /** - * Advances the iterator to the next position - */ - next(): void; - - /** - * Updates the value of the node in the tree at this iterator and returns a new rb-tree - */ - update(value: V): RedBlackTree; - - /** - * Moves the iterator backward one element - */ - prev(): void; - } - } - - /** - * Represents a fully persistent red-black tree - */ - class RedBlackTree { - /** - * The root node of the tree - */ - root: I.RedBlackTree.Node; - - constructor(compare?: (a: K, b: K) => number, root?: RedBlackTree); - - /** - * A sorted array of all the keys in the tree - */ - readonly keys: K[]; - - /** - * An array of all the values in the tree - */ - readonly values: V[]; - - /** - * The number of items in the tree - */ - readonly length: number; - - /** - * An iterator pointing to the first element in the tree - */ - readonly begin: I.RedBlackTree.Iterator; - - /** - * An iterator pointing to the last element in the tree - */ - readonly end: I.RedBlackTree.Iterator; - - /** - * Creates a new tree with the new pair inserted - */ - insert(key: K, value: V): RedBlackTree; - - /** - * Walks a visitor function over the nodes of the tree in order - * - * @param visit A callback that gets executed on each node. - * If a truthy value is returned from the visitor, then iteration is stopped. - * @param lo An optional start of the range to visit (inclusive) - * @param hi An optional end of the range to visit (non-inclusive) - */ - forEach(visit: (key: K, value: V) => T, lo?: K, hi?: K): T; - - /** - * Finds an iterator starting at the given element - */ - at(idx: number): I.RedBlackTree.Iterator; - - /** - * Finds the first item in the tree whose key is >= key - */ - ge(key: K): I.RedBlackTree.Iterator; - - /** - * Finds the first item in the tree whose key is > key - */ - gt(key: K): I.RedBlackTree.Iterator; - - /** - * Finds the first item in the tree whose key is < key - */ - lt(key: K): I.RedBlackTree.Iterator; - - /** - * Finds the first item in the tree whose key is <= key - */ - le(key: K): I.RedBlackTree.Iterator; - - /** - * Returns an iterator pointing to the first item in the tree with key, otherwise null - */ - find(key: K): I.RedBlackTree.Iterator | null; - - /** - * Removes the first item with key in the tree - */ - remove(key: K): RedBlackTree; - - /** - * Retrieves the value associated to the given key - */ - get(key: K): V | undefined; - } - - /** - * Respresetns a data structure which is a combination of an array and a set. - * Adding a new member is O(1), testing for membership is O(1), - * and finding the index of an element is O(1). - */ - class ArraySet { - /** - * The number of unique items in this ArraySet. - * If duplicates have been added, than those do not count towards the size. - */ - readonly length: number; - - /** - * Adds the given value to this set. - * - * @param allowDuplicates Whether to allow duplicates in the set, false by default - */ - add(value: T, allowDuplicates?: boolean): this; - - /** - * Checks whether the given value is a member of the set - */ - has(value: T): boolean; - - /** - * Returns the index of the given element. - * If the value is not present it will return -1 - */ - indexOf(value: T): number; - - /** - * Converts the set to an array - */ - toArray(): T[]; - - /** - * Creates an ArraySet from the given iterable object - * - * @param allowDuplicates Whether to allow duplicates in the set, false by default - */ - static from(iterable: Iterable, allowDuplicates?: boolean): ArraySet; - } - - namespace I.BufferList { - type Appendable = Buffer | BufferList | string | number | Array; - } - - /** - * Represents a Node.js Buffer list collector, reader and streamer with callback/promise interface support - */ - class BufferList extends std.stream.Duplex implements PromiseLike { - /** - * Creates a new buffer list - */ - constructor(); - - /** - * Creates a new buffer list and initiates with the given value - */ - constructor(buffer: I.BufferList.Appendable); - - /** - * Creates a new buffer list and subscribes the given callback on the end/error event - */ - constructor(callback: (err: any, data: Buffer) => void); - - /** - * Adds an additional buffer or BufferList to the internal list - */ - append(buf: I.BufferList.Appendable): this; - - /** - * Ends the stream - */ - end(chunk?: Buffer): void; - end(chunk?: () => void): void; - - /** - * Returns the byte at the specified index - */ - get(idx: number): number; - - /** - * Returns a new Buffer object containing the bytes within the range specified. - */ - slice(start?: number, end?: number): Buffer; - - /** - * Copies the content of the list in the dest buffer - * starting from destStart and containing the bytes within the range specified with srcStart to srcEnd - * - * @param dstStart writes from this position - * @param srcStart reads bytes from this position - * @param srcEnd read bytes to this position - */ - copy(dst: T, dstStart?: number, srcStart?: number, srcEnd?: number): T; - - /** - * Returns a new BufferList object containing the bytes within the range specified. - * No copies will be performed. All buffers in the result share memory with the original list. - * - * @param start slice from - * @param end slice to - */ - shallowSlice(start?: number, end?: number): BufferList; - - /** - * Return a string representation of the buffer - */ - toString(encoding?: fs.I.Encoding, start?: number, end?: number): string; - - /** - * Shifts bytes off the start of the list - */ - consume(bytes: number): this; - - /** - * Performs a shallow-copy of the list. - */ - duplicate(): BufferList; - - /** - * Destroys the stream - */ - destroy(): void; - - then( - onfulfilled?: ((value: Buffer) => T1 | PromiseLike) | null, - onrejected?: ((reason: any) => T2 | PromiseLike) | null - ): PromiseLike; - - catch(onrejected?: ((reason: any) => T | PromiseLike) | null): PromiseLike; - } - - /** - * Represents a Map that has a default values factory object or function. - * Each get of non-existent key goes through the factory - */ - class DefaultMap extends Map { - constructor(factory?: ((key: K) => V) | { [key: string]: V }, iterable?: Iterable<[K, V]>); - } - - namespace I.LRU { - type LengthCalculator = (value: V, key: K) => number; - interface ConstructorOptions { - /** - * The maximum size of the cache, checked by applying the length function to all values in the cache. - * Default is Infinity - */ - max?: number; - - /** - * Maximum age in ms. Items are not pro-actively pruned out as they age, - * but if you try to get an item that is too old, - * it'll drop it and return undefined instead of giving it to you - */ - maxAge?: number; - - /** - * Function that is used to calculate the length of stored items - */ - length?: LengthCalculator; - - /** - * Function that is called on items when they are dropped from the cache - */ - dispose?(key: K, value: V): void; - - /** - * Whether to return the stale value before deleting it - */ - stale?: boolean; - - /** - * Dispose will only be called when a key falls out of the cache, not when it is overwritten - */ - noDisposeOnSet?: boolean; - } - - interface SerializedEntry { - /** - * key - */ - key: K; - - /** - * value - */ - value: V; - - /** - * when it becomes expired - */ - e: number; - } - - interface Entry { - /** - * key - */ - key: K; - - /** - * value - */ - value: V; - - /** - * entry length - */ - length: number; - - /** - * Timestamp when the entry was created - */ - now: number; - - /** - * Maximum live time - */ - maxAge: number; - } - } - - /** - * Represent an LRU cache - */ - class LRU { - /** - * Creates an LRU cache of the given size - */ - constructor(max: number); - - /** - * Creates an LRU cache with the given options - */ - constructor(options?: I.LRU.ConstructorOptions); - - /** - * The length of the cache, setter resizes the cache - */ - max: number; - - /** - * stale setting - */ - allowStale: boolean; - - /** - * maxAge setting - */ - maxAge: number; - - /** - * length setting - */ - lengthCalculator: I.LRU.LengthCalculator; - - /** - * Total length of objects in cache taking into account length options function - */ - readonly length: number; - - /** - * Total quantity of objects currently in cache. - * Note, that stale items are returned as part of this item count. - */ - readonly itemCount: number; - - /** - * Iterates over all the keys in the cache, in reverse recent-ness order. (ie, less recently used items are iterated over first.) - */ - rforEach(fn: (this: T, value: V, key: K, cache: LRU) => void, thisp?: T): void; - - /** - * Iterates over all the keys in the cache, in order of recent-ness - */ - forEach(fn: (this: T, value: V, key: K, cache: LRU) => void, thisp?: T): void; - - /** - * Returns an array of the keys in the cache - */ - keys(): K[]; - - /** - * Returns an array of the values in the cache - */ - values(): V[]; - - /** - * Clears the cache entirely, throwing away all values - */ - reset(): void; - - /** - * Return an array of the cache entries ready for serialization and usage with 'destinationCache.load(arr)` - */ - dump(): Array>; - - /** - * Returns an internal lru list of entries - */ - dumpLru(): LinkedList>; - - /** - * @param opts std.util.inspect options - */ - inspect(opts?: object): string; - - /** - * Sets a new value for the given key. Updates the "recently used"-ness of the key - * - * @param maxAge maxAge option specific for this key - * @returns Whether the key was set - */ - set(key: K, value: V, maxAge?: number): boolean; - - /** - * Check if a key is in the cache, without updating the recent-ness or deleting it for being stale - */ - has(key: K): boolean; - - /** - * Gets the value of the given key. Updates the "recently used"-ness of the key - */ - get(key: K): V | undefined; - - /** - * Returns the key value without updating the "recently used"-ness of the key - */ - peek(key: K): V | undefined; - - /** - * Deletes the less recently used element - */ - pop(): I.LRU.Entry; - - /** - * Deletes a key out of the cache - */ - del(key: K): void; - - /** - * Loads another cache entries array, obtained with sourceCache.dump(), into the cache. - * The destination cache is reset before loading new entries - */ - load(arr: Array>): void; - - /** - * Manually iterates over the entire cache proactively pruning old entries - */ - prune(): void; - } - - /** - * Represents a Map that keeps keys only for a specified interval of time - */ - class TimedoutMap extends Map { - /** - * @param timeout maximum age of the keys, 1000 by default - * @param callback callback that is called with each key when the timeout is passed - */ - constructor(timeout?: number, callback?: (key: K) => void); - - /** - * Gets the timeout - */ - getTimeout(): number; - - /** - * Sets the timeout - */ - setTimeout(ms: number): void; - - /** - * Iterates over the map and calls the callback for each element - */ - forEach(callback: (this: T, value: V, key: K, cache: this) => void, thisArg?: T): this; - - /** - * Deletes the given key - */ - delete(key: K): boolean; - } - } -} diff --git a/types/adone/glosses/collections/array_set.d.ts b/types/adone/glosses/collections/array_set.d.ts new file mode 100644 index 0000000000..c13d8769f1 --- /dev/null +++ b/types/adone/glosses/collections/array_set.d.ts @@ -0,0 +1,44 @@ +declare namespace adone.collection { + /** + * Respresetns a data structure which is a combination of an array and a set. + * Adding a new member is O(1), testing for membership is O(1), + * and finding the index of an element is O(1). + */ + class ArraySet { + /** + * The number of unique items in this ArraySet. + * If duplicates have been added, than those do not count towards the size. + */ + readonly length: number; + + /** + * Adds the given value to this set. + * + * @param allowDuplicates Whether to allow duplicates in the set, false by default + */ + add(value: T, allowDuplicates?: boolean): this; + + /** + * Checks whether the given value is a member of the set + */ + has(value: T): boolean; + + /** + * Returns the index of the given element. + * If the value is not present it will return -1 + */ + indexOf(value: T): number; + + /** + * Converts the set to an array + */ + toArray(): T[]; + + /** + * Creates an ArraySet from the given iterable object + * + * @param allowDuplicates Whether to allow duplicates in the set, false by default + */ + static from(iterable: Iterable, allowDuplicates?: boolean): ArraySet; + } +} diff --git a/types/adone/glosses/collections/async_queue.d.ts b/types/adone/glosses/collections/async_queue.d.ts new file mode 100644 index 0000000000..9a575a33be --- /dev/null +++ b/types/adone/glosses/collections/async_queue.d.ts @@ -0,0 +1,12 @@ +declare namespace adone.collection { + /** + * Represents an asynchronous queue, each pop is a promise + * that is resolved with an existing element or an element that will be pushed in the future + */ + class AsyncQueue extends Queue> { + /** + * Returns a promise that will be resolved with an existing element or an element that will be pushed in the future + */ + pop(): Promise; + } +} diff --git a/types/adone/glosses/collections/avl_tree.d.ts b/types/adone/glosses/collections/avl_tree.d.ts new file mode 100644 index 0000000000..2b5dc132b6 --- /dev/null +++ b/types/adone/glosses/collections/avl_tree.d.ts @@ -0,0 +1,48 @@ +declare namespace adone.collection { + /** + * Represents an AVL tree, a self-balancing binary search tree + */ + class AVLTree { + constructor(options?: I.BinarySearchTree.ConstructorOptions>); + + /** + * Checks whether the tree is an avl tree + */ + checkIsAVLT(): void; + + /** + * Inserts a new key/value + */ + insert(key: K, value: V): void; + + /** + * Deletes the given key/value from the tree + */ + delete(key: K, value?: V): void; + + /** + * Returns the of keys in the tree + */ + getNumberOFKeys(): number; + + /** + * Searches the given key in the tree + */ + search(key: K): V[]; + + /** + * Returns all the values from the given key bounds + */ + betweenBounds(query: I.BinarySearchTree.Query): V[]; + + /** + * Executed the given callback for each node from left to right + */ + executeOnEveryNode(fn: (tree: AVLTree) => void): void; + + /** + * Prints the tree + */ + prettyPrint(printDate?: boolean, spacing?: string): void; + } +} diff --git a/types/adone/glosses/collections/binary_search_tree.d.ts b/types/adone/glosses/collections/binary_search_tree.d.ts new file mode 100644 index 0000000000..878bd7e6a4 --- /dev/null +++ b/types/adone/glosses/collections/binary_search_tree.d.ts @@ -0,0 +1,110 @@ +declare namespace adone.collection { + namespace I.BinarySearchTree { + interface ConstructorOptions { + /** + * The parent tree + */ + parent?: Tree; + + /** + * Value to keep in this node + */ + value?: V; + + /** + * WHether the values must be unique, false by default. + * If false you can store many values for same keys, otherwise only one + */ + unique?: boolean; + + /** + * Custom keys comparator, by default if a > b => -1, a < b -1, a === b => 0 + */ + compareKeys?(a: K, b: K): number; + + /** + * Function that defines whether 2 values are the same, by default a === b + */ + checkValueEquality?(a: V, b: V): boolean; + } + + interface Query { + $lt?: K; + $lte?: K; + $gt?: K; + $gte?: K; + } + } + + /** + * Represents a binary search tree + */ + class BinarySearchTree { + constructor(options?: I.BinarySearchTree.ConstructorOptions>); + + /** + * Returns the max descendant tree + */ + getMaxKeyDescendant(): BinarySearchTree; + + /** + * Returns the maximum key + */ + getMaxKey(): K; + + /** + * Returns the min descendant tree + */ + getMinKeyDescendant(): BinarySearchTree; + + /** + * Returns the minumum key + */ + getMinKey(): K; + + /** + * Traverses the tree and calls the given function for each node + */ + checkAllNodesFullfillCondition(test: (key: K, value: V) => void): void; + + /** + * Checks whether the tree is a binary search tree + */ + checkIsBST(): void; + + /** + * Returns the of keys in the tree + */ + getNumberOfKeys(): number; + + /** + * Inserts a new key/value + */ + insert(key: K, value: V): void; + + /** + * Searches the given key in the tree + */ + search(key: K): V[]; + + /** + * Returns all the values from the given key bounds + */ + betweenBounds(query: I.BinarySearchTree.Query): V[]; + + /** + * Deletes the given key/value from the tree + */ + delete(key: K, value?: V): void; + + /** + * Executed the given callback for each node from left to right + */ + executeOnEveryNode(fn: (tree: BinarySearchTree) => void): void; + + /** + * Prints the tree + */ + prettyPrint(printData?: boolean, spacing?: string): void; + } +} diff --git a/types/adone/glosses/collections/buffer_list.d.ts b/types/adone/glosses/collections/buffer_list.d.ts new file mode 100644 index 0000000000..b2a4157385 --- /dev/null +++ b/types/adone/glosses/collections/buffer_list.d.ts @@ -0,0 +1,92 @@ +declare namespace adone.collection { + namespace I.BufferList { + type Appendable = Buffer | BufferList | string | number | Array; + } + + /** + * Represents a Node.js Buffer list collector, reader and streamer with callback/promise interface support + */ + class BufferList extends std.stream.Duplex implements PromiseLike { + /** + * Creates a new buffer list + */ + constructor(); + + /** + * Creates a new buffer list and initiates with the given value + */ + constructor(buffer: I.BufferList.Appendable); + + /** + * Creates a new buffer list and subscribes the given callback on the end/error event + */ + constructor(callback: (err: any, data: Buffer) => void); + + /** + * Adds an additional buffer or BufferList to the internal list + */ + append(buf: I.BufferList.Appendable): this; + + /** + * Ends the stream + */ + end(chunk?: Buffer): void; + end(chunk?: () => void): void; + + /** + * Returns the byte at the specified index + */ + get(idx: number): number; + + /** + * Returns a new Buffer object containing the bytes within the range specified. + */ + slice(start?: number, end?: number): Buffer; + + /** + * Copies the content of the list in the dest buffer + * starting from destStart and containing the bytes within the range specified with srcStart to srcEnd + * + * @param dstStart writes from this position + * @param srcStart reads bytes from this position + * @param srcEnd read bytes to this position + */ + copy(dst: T, dstStart?: number, srcStart?: number, srcEnd?: number): T; + + /** + * Returns a new BufferList object containing the bytes within the range specified. + * No copies will be performed. All buffers in the result share memory with the original list. + * + * @param start slice from + * @param end slice to + */ + shallowSlice(start?: number, end?: number): BufferList; + + /** + * Return a string representation of the buffer + */ + toString(encoding?: fs.I.Encoding, start?: number, end?: number): string; + + /** + * Shifts bytes off the start of the list + */ + consume(bytes: number): this; + + /** + * Performs a shallow-copy of the list. + */ + duplicate(): BufferList; + + /** + * Destroys the stream + */ + destroy(): void; + + then( + onfulfilled?: ((value: Buffer) => T1 | PromiseLike) | null, + onrejected?: ((reason: any) => T2 | PromiseLike) | null + ): PromiseLike; + + catch(onrejected?: ((reason: any) => T | PromiseLike) | null): PromiseLike; + } +} diff --git a/types/adone/glosses/collections/byte_array.d.ts b/types/adone/glosses/collections/byte_array.d.ts new file mode 100644 index 0000000000..1dc3080fb3 --- /dev/null +++ b/types/adone/glosses/collections/byte_array.d.ts @@ -0,0 +1,892 @@ +declare namespace adone.collection { + namespace I { + type Long = math.Long; + + type Longable = math.I.Longable; + + namespace ByteArray { + interface Varint32 { + value: number; + length: number; + } + + interface Varint64 { + value: Long; + length: number; + } + + interface String { + string: string; + length: number; + } + + type Wrappable = string | ByteArray | Buffer | Uint8Array | ArrayBuffer; + + type Metrics = "b" | "c"; + } + } + + /** + * Represents an array of bytes, enhanced Node.js Buffer + */ + class ByteArray { + readonly woffset: number; + + readonly roffset: number; + + readonly buffer: Buffer; + + readonly noAssert: boolean; + + /** + * Constructs a new ByteArray + * + * @param capacity Initial capacity. Defaults to ByteArray.DEFAULT_CAPACITY(64) + * @param noAssert Whether to skip assertions of offsets and values. Defaults to ByteArray.DEFAULT_NOASSERT(false) + */ + constructor(capacity?: number, noAssert?: boolean); + + /** + * Reads a BitSet as an array of booleans. + * + * @param offset Offset to read from. Will use and increase offset by length if omitted. + */ + readBitSet(offset?: number): boolean[]; + + /** + * Reads the specified number of bytes. + * + * @param length Number of bytes to read + * @param offset Offset to read from. Will use and increase offset by length if omitted. + */ + read(length: number, offset?: number): ByteArray; + + /** + * Reads an 8bit signed integer + * + * @param offset Offset to read from + */ + readInt8(offset?: number): number; + + /** + * Reads an 8bit unsigned integer + * + * @param offset Offset to read from + */ + readUInt8(offset?: number): number; + + /** + * Reads a 16bit signed le integer + * + * @param offset Offset to read from + */ + readInt16LE(offset?: number): number; + + /** + * Reads a 16bit unsigned le integer + * + * @param offset Offset to read from + */ + readUInt16LE(offset?: number): number; + + /** + * Reads a 16bit signed be integer + * + * @param offset Offset to read from + */ + readInt16BE(offset?: number): number; + + /** + * Reads a 16bit unsigned be integer + * + * @param offset Offset to read from + */ + readUInt16BE(offset?: number): number; + + /** + * Reads a 32bit signed le integer + * + * @param offset Offset to read from + */ + readInt32LE(offset?: number): number; + + /** + * Reads a 32bit unsigned le integer + * + * @param offset Offset to read from + */ + readUInt32LE(offset?: number): number; + + /** + * Reads a 32bit signed be integer + * + * @param offset Offset to read from + */ + readInt32BE(offset?: number): number; + + /** + * Reads a 32bit unsigned be integer + * + * @param offset Offset to read from + */ + readUInt32BE(offset?: number): number; + + /** + * Reads a 64bit signed le integer as math.Long + * + * @param offset Offset to read from + */ + readInt64LE(offset?: number): math.Long; + + /** + * Reads a 64bit unsigned le integer as math.Long + * + * @param offset Offset to read from + */ + readUInt64LE(offset?: number): math.Long; + + /** + * Reads a 64bit signed be integer as math.Long + * + * @param offset Offset to read from + */ + readInt64BE(offset?: number): math.Long; + + /** + * Reads a 64bit unsigned be integer as math.Long + * + * @param offset Offset to read from + */ + readUInt64BE(offset?: number): math.Long; + + /** + * Reads a 32bit le float + * + * @param offset Offset to read from + */ + readFloatLE(offset?: number): number; + + /** + * Reads a 32bit be float + * + * @param offset Offset to read from + */ + readFloatBE(offset?: number): number; + + /** + * Reads a 64bit le float + * + * @param offset Offset to read from + */ + readDoubleLE(offset?: number): number; + + /** + * Reads a 64bit be float + * + * @param offset Offset to read from + */ + readDoubleBE(offset?: number): number; + + /** + * Appends some data to this ByteArray. + * This will overwrite any contents behind the specified offset up to the appended data's length. + * + * @param source The source write from + * @param offset Offset to write at + * @param length length to read from the source + * @param encoding encoding to use for wrapping the source in bytearray + */ + write(source: I.ByteArray.Wrappable, offset?: number, length?: number, encoding?: string): this; + + /** + * Writes the array as a bitset. + * @param value Array of booleans to write + */ + writeBitSet(value: number[]): this; + + /** + * Writes the array as a bitset. + * @param value Array of booleans to write + * @param offset Offset to write at + */ + writeBitSet(value: number[], offset: number): number; + + /** + * Writes a buffer at the given offset + * @param buf Buffer to write + * @param offset Offset to write at + */ + writeBuffer(buf: Buffer, offset?: number): this; + + /** + * Writes an 8bit signed integer + * + * @param offset Offset to write at + */ + writeInt8(value: number, offset?: number): this; + + /** + * Writes an 8bit unsigned integer + * + * @param offset Offset to write at + */ + writeUInt8(value: number, offset?: number): this; + + /** + * Writes a 16bit signed le integer + * + * @param offset Offset to write at + */ + writeInt16LE(value: number, offset?: number): this; + + /** + * Writes a 16bit signed be integer + * + * @param offset Offset to write at + */ + writeInt16BE(value: number, offset?: number): this; + + /** + * Writes a 16bit unsigned le integer + * + * @param offset Offset to write at + */ + writeUInt16LE(value: number, offset?: number): this; + + /** + * Writes a 16bit unsigned be integer + * + * @param offset Offset to write at + */ + writeUInt16BE(value: number, offset?: number): this; + + /** + * Writes a 32bit signed le integer + * + * @param offset Offset to write at + */ + writeInt32LE(value: number, offset?: number): this; + + /** + * Writes a 32bit signed be integer + * + * @param offset Offset to write at + */ + writeInt32BE(value: number, offset?: number): this; + + /** + * Writes a 32bit unsigned le integer + * + * @param offset Offset to write at + */ + writeUInt32LE(value: number, offset?: number): this; + + /** + * Writes a 32bit unsigned be integer + * + * @param offset Offset to write at + */ + writeUInt32BE(value: number, offset?: number): this; + + /** + * Writes a 64bit signed le long integer + * + * @param offset Offset to write at + */ + writeInt64LE(value: math.Long | string | number, offset?: number): this; + + /** + * Writes a 64bit signed be long integer + * + * @param offset Offset to write at + */ + writeInt64BE(value: math.Long | string | number, offset?: number): this; + + /** + * Writes a 64bit unsigned le long integer + * + * @param offset Offset to write at + */ + writeUInt64LE(value: math.Long | string | number, offset?: number): this; + + /** + * Writes a 64bit unsigned be long integer + * + * @param offset Offset to write at + */ + writeUInt64BE(value: math.Long | string | number, offset?: number): this; + + /** + * Writes a 32bit le float + * + * @param offset Offset to write at + */ + writeFloatLE(value: number, offset?: number): this; + + /** + * Writes a 32bit be float + * + * @param offset Offset to write at + */ + writeFloatBE(value: number, offset?: number): this; + + /** + * Writes a 64bit le float + * + * @param offset Offset to write at + */ + writeDoubleLE(value: number, offset?: number): this; + + /** + * Writes a 64bit be float + * + * @param offset Offset to write at + */ + writeDoubleBE(value: number, offset?: number): this; + + /** + * Writes a 32bit base 128 variable-length integer + */ + writeVarint32(value: number): this; + + /** + * Writes a 32bit base 128 variable-length integer + * + * @param offset Offset to write at + */ + writeVarint32(value: number, offset: number): number; + + /** + * Writes a zig-zag encoded 32bit base 128 variable-length integer + */ + writeVarint32ZigZag(value: number): this; + + /** + * Writes a zig-zag encoded 32bit base 128 variable-length integer + * + * @param offset Offset to write at + */ + writeVarint32ZigZag(value: number, offset: number): number; + + /** + * Reads a 32bit base 128 variable-length integer + */ + readVarint32(): number; + + /** + * Reads a 32bit base 128 variable-length integer + * + * @param offset Offset to read from + */ + readVarint32(offset: number): I.ByteArray.Varint32; + + /** + * Reads a zig-zag encoded 32bit base 128 variable-length integer + */ + readVarint32ZigZag(): number; + + /** + * Reads a zig-zag encoded 32bit base 128 variable-length integer + * + * @param offset Offset to read from + */ + readVarint32ZigZag(offset: number): I.ByteArray.Varint32; + + /** + * Writes a 64bit base 128 variable-length integer + */ + writeVarint64(value: math.Long | string | number): this; + + /** + * Writes a 64bit base 128 variable-length integer + * + * @param offset Offset to write at + */ + writeVarint64(value: math.Long | string | number, offset: number): number; + + /** + * Writes a zig-zag encoded 64bit base 128 variable-length integer + */ + writeVarint64ZigZag(value: math.Long | string | number): this; + + /** + * Writes a zig-zag encoded 64bit base 128 variable-length integer + * + * @param offset Offset to write at + */ + writeVarint64ZigZag(value: math.Long | string | number, offset: number): number; + + /** + * Reads a 64bit base 128 variable-length integer + */ + readVarint64(): I.Long; + + /** + * Reads a 64bit base 128 variable-length integer + * + * @param offset Offset to read from + */ + readVarint64(offset: number): I.ByteArray.Varint64; + + /** + * Reads a zig-zag encoded 64bit base 128 variable-length integer + */ + readVarint64ZigZag(): math.Long; + + /** + * Reads a zig-zag encoded 64bit base 128 variable-length integer + * + * @param offset Offset to read from + */ + readVarint64ZigZag(offset: number): I.ByteArray.Varint64; + + /** + * Writes a NULL-terminated UTF8 encoded string. + * For this to work the specified string must not contain any NULL characters itself + */ + writeCString(str: string): this; + + /** + * Writes a NULL-terminated UTF8 encoded string. + * For this to work the specified string must not contain any NULL characters itself + * + * @param offset Offset to write at + */ + writeCString(str: string, offset: number): number; + + /** + * Reads a NULL-terminated UTF8 encoded string. + * For this to work the string read must not contain any NULL characters itself + */ + readCString(): string; + + /** + * Reads a NULL-terminated UTF8 encoded string. + * For this to work the string read must not contain any NULL characters itself + * + * @param offset Offset to read from + */ + readCString(offset: number): I.ByteArray.String; + + /** + * Writes an UTF8 encoded string + */ + writeString(str: string): this; + + /** + * Writes an UTF8 encoded string + * + * @param offset Offset to write at + */ + writeString(str: string, offset: number): number; + + /** + * Reads an UTF8 encoded string + * + * @param length Number of characters or bytes to read + * @param metrics Metrics specifying what n is meant to count. Defaults to ByteArray.METRICS_CHARS("c") + */ + readString(length: number, metrics?: I.ByteArray.Metrics): string; + + /** + * Reads an UTF8 encoded string + * + * @param length Number of characters or bytes to read + * @param metrics Metrics specifying what n is meant to count. Defaults to ByteArray.METRICS_CHARS("c") + * @param offset Offset to read from + */ + readString(length: number, metrics: I.ByteArray.Metrics, offset: number): I.ByteArray.String; + + /** + * Reads an UTF8 encoded string + * + * @param length Number of characters or bytes to read + * @param offset Offset to read from + */ + readString(length: number, offset: number): I.ByteArray.String; + + /** + * Writes a length as varint32 prefixed UTF8 encoded string + */ + writeVString(str: string): this; + + /** + * Writes a length as varint32 prefixed UTF8 encoded string + * + * @param offset Offset to read from + */ + writeVString(str: string, offset: number): number; + + /** + * Reads a length as varint32 prefixed UTF8 encoded string + */ + readVString(): string; + + /** + * Reads a length as varint32 prefixed UTF8 encoded string + * + * @param offset Offset to read from + */ + readVString(offset: number): I.ByteArray.String; + + /** + * Appends this ByteArray's contents to another ByteArray. + * This will overwrite any contents behind the specified offset up to the length of this ByteArray's data + * + * @param offset Offset to append to + */ + appendTo(target: ByteArray, offset?: number): this; + + /** + * Enables or disables assertions of argument types and offsets. + * Assertions are enabled by default but you can opt to disable them if your code already makes sure that everything is valid + */ + assert(assert?: boolean): this; + + /** + * Gets the capacity of this ByteArray's backing buffer + */ + capacity(): number; + + /** + * Clears this ByteArray's offsets by setting offset to 0 and limit to the backing buffer's capacity + */ + clear(): this; + + /** + * Creates a cloned instance of this ByteArray, + * preset with this ByteArray's values for offset, markedOffset and limit + * + * @param copy Whether to copy the backing buffer or to return another view on the same, false by default + */ + clone(copy?: boolean): ByteArray; + + /** + * Compacts this ByteArray to be backed by a buffer of its contents' length. + * Will set offset = 0 and limit = capacity and adapt markedOffset to the same relative position if set + * + * @param begin Offset to start at, buffer offset by default + * @param end Offset to end at, buffer limit by default + */ + compact(begin?: number, end?: number): this; + + /** + * Creates a copy of this ByteArray's contents. + * + * @param begin Begin offset, buffer offset by default + * @param end End offset, buffer limit by default + */ + copy(begin?: number, end?: number): ByteArray; + + /** + * Copies this ByteArray's contents to another ByteArray. + * + * @param targetOffset Offset to copy to. Will use and increase the target's offset by the number of bytes copied if omitted + * @param sourceOffset Offset to start copying from. Will use and increase offset by the number of bytes copied if omitted + * @param sourceLimit Offset to end copying from, defaults to the buffer limit + */ + copyTo(target: ByteArray, targetOffset?: number, souceOffset?: number, sourceLimit?: number): this | ByteArray; + + /** + * Makes sure that this ByteArray is backed by a ByteArray#buffer of at least the specified capacity. + * If the current capacity is exceeded, it will be doubled. + * If double the current capacity is less than the required capacity, the required capacity will be used instead + */ + ensureCapacity(capacity: number): this; + + /** + * Overwrites this ByteArray's contents with the specified value. + * + * @param value Byte value to fill with. If given as a string, the first character is used + * @param begin Begin offset. Will use and increase offset by the number of bytes written if omitted. defaults to offset + * @param end End offset, defaults to limit. + */ + fill(value: string | number, begin?: number, end?: number): this; + + /** + * Makes this ByteArray ready for a new sequence of write or relative read operations. + * Sets limit = offset and offset = 0. + * Make sure always to flip a ByteArray when all relative read or write operations are complete + */ + flip(): this; + + /** + * Marks an offset on this ByteArray to be used later + * + * @param offset Offset to mark. Defaults to offset. + */ + mark(offset?: number): this; + + /** + * Prepends some data to this ByteArray. + * This will overwrite any contents before the specified offset up to the prepended data's length. + * If there is not enough space available before the specified offset, + * the backing buffer will be resized and its contents moved accordingly + * + * @param source Data to prepend + * @param offset Offset to prepend at. Will use and decrease offset by the number of bytes prepended if omitted. + */ + prepend(source: I.ByteArray.Wrappable, offset: number): this; + + /** + * Prepends some data to this ByteArray. + * This will overwrite any contents before the specified offset up to the prepended data's length. + * If there is not enough space available before the specified offset, + * the backing buffer will be resized and its contents moved accordingly + * + * @param source Data to prepend + * @param encoding Encoding if data is a string + * @param offset Offset to prepend at. Will use and decrease offset by the number of bytes prepended if omitted. + */ + prepend(source: I.ByteArray.Wrappable, encoding?: string, offset?: number): this; + + /** + * Prepends this ByteArray to another ByteArray. + * This will overwrite any contents before the specified offset up to the prepended data's length. + * If there is not enough space available before the specified offset, + * the backing buffer will be resized and its contents moved accordingly + * + * @param offset Offset to prepend at + */ + prependTo(target: ByteArray, offset?: number): this; + + /** + * Gets the number of remaining readable bytes + */ + remaining(): number; + + /** + * Resets this ByteArray's offset. + * If an offset has been marked through mark before, offset will be set to markedOffset, which will then be discarded. + * If no offset has been marked, sets offset = 0 + */ + reset(): this; + + /** + * Resizes this ByteArray to be backed by a buffer of at least the given capacity. + * Will do nothing if already that large or larger. + * + * @param capacity Capacity required + */ + resize(capacity: number): this; + + /** + * Reverses this ByteArray's contents. + * + * @param begin Offset to start at, defaults to offset + * @param end Offset to end at, defaults to limit + */ + reverse(begin?: number, end?: number): this; + + /** + * Skips the next length bytes. This will just advance + */ + skip(length: number): this; + + /** + * Slices this ByteArray by creating a cloned instance with offset = begin and limit = end + * + * @param begin Begin offset, defaults to offset + * @param end End offset, defaults to limit + */ + slice(begin?: number, end?: number): ByteArray; + + /** + * Returns a copy of the backing buffer that contains this ByteArray's contents. + * + * @param forceCopy If true returns a copy, otherwise returns a view referencing the same memory if possible, false by default + * @param begin Begin offset, offset by default + * @param end End offset, limit by default + */ + toBuffer(forceCopy?: boolean, begin?: number, end?: number): Buffer; + + /** + * Returns a raw buffer compacted to contain this ByteArray's contents + */ + toArrayBuffer(): ArrayBuffer; + + /** + * Converts the ByteArray's contents to a string + * + * @param encoding Output encoding + * @param begin Begin offset, offset by default + * @param end End offset, limit by default + */ + toString(encoding?: string, begin?: number, end?: number): string; + + /** + * Encodes this ByteArray's contents to a base64 encoded string + * + * @param begin Begin offset, offset by default + * @param end End offset, limit by default + */ + toBase64(begin?: number, end?: number): string; + + /** + * Encodes this ByteArray to a binary encoded string, that is using only characters 0x00-0xFF as bytes + * + * @param begin Begin offset, offset by default + * @param end End offset, limit by default + */ + toBinary(begin?: number, end?: number): string; + + /** + * Encodes this ByteArray to a hex encoded string with marked offsets + * + * @param columns If true returns two columns hex + ascii, defaults to false + */ + toDebug(columns?: boolean): string; + + /** + * Encodes this ByteArray's contents to a hex encoded string + * + * @param begin Begin offset, offset by default + * @param end End offset, limit by default + */ + toHex(begin?: number, end?: number): string; + + /** + * Encodes this ByteArray's contents to an UTF8 encoded string + * + * @param begin Begin offset, offset by default + * @param end End offset, limit by default + */ + toUTF8(begin?: number, end?: number): string; + + static accessor(): typeof Buffer; + + /** + * Allocates a new ByteArray backed by a buffer of the specified capacity. + * + * @param capacity Initial capacity. Defaults to ByteArray.DEFAULT_CAPACITY(64) + * @param noAssert Whether to skip assertions of offsets and values. Defaults to ByteArray.DEFAULT_NOASSERT(false) + */ + static allocate(capacity?: number, noAssert?: boolean): ByteArray; + + /** + * Concatenates multiple ByteArrays into one + * + * @param encoding Encoding for strings + * @param noAssert Whether to skip assertions of offsets and values. Defaults to ByteArray.DEFAULT_NOASSERT(false) + */ + static concat(buffers: I.ByteArray.Wrappable[], encoding?: string, noAssert?: boolean): ByteArray; + + static type(): typeof Buffer; + + /** + * Wraps a buffer or a string. + * Sets the allocated ByteArray's offset to 0 and its limit to the length of the wrapped data + * + * @param encoding Encoding for strings + * @param noAssert Whether to skip assertions of offsets and values. Defaults to ByteArray.DEFAULT_NOASSERT(false) + */ + static wrap(buffer: I.ByteArray.Wrappable, encoding?: string, noAssert?: boolean): ByteArray; + + /** + * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer + */ + static calculateVarint32(value: number): number; + + /** + * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding + */ + static zigZagEncode32(n: number): number; + + /** + * Decodes a zigzag encoded signed 32bit integer + */ + static zigZagDecode32(n: number): number; + + /** + * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer + */ + static calculateVarint64(value: number | string): number; + + /** + * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding + */ + static zigZagEncode64(value: number | string | I.Long): I.Long; + + /** + * Decodes a zigzag encoded signed 64bit integer. + */ + static zigZagDecode64(value: number | string | I.Long): I.Long; + + /** + * Calculates the number of UTF8 characters of a string. + * JavaScript itself uses UTF-16, + * so that a string's length property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF + */ + static calculateUTF8Chars(str: string): number; + + /** + * Calculates the number of UTF8 bytes of a string. + */ + static calculateString(str: string): number; + + /** + * Decodes a base64 encoded string to a ByteArray + */ + static fromBase64(str: string): ByteArray; + + /** + * Encodes a binary string to base64 like window.btoa does + */ + static btoa(str: string): string; + + /** + * Decodes a base64 encoded string to binary like window.atob does + */ + static atob(b64: string): string; + + /** + * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteArray + */ + static fromBinary(str: string): ByteArray; + + /** + * Decodes a hex encoded string with marked offsets to a ByteArray + */ + static fromDebug(str: string, noAssert?: boolean): ByteArray; + + /** + * Decodes a hex encoded string to a ByteArray + */ + static fromHex(str: string, noAssert?: boolean): ByteArray; + + /** + * Decodes an UTF8 encoded string to a ByteArray + */ + static fromUTF8(str: string, noAssert?: boolean): ByteArray; + + /** + * Default initial capacity + */ + static DEFAULT_CAPACITY: number; + + /** + * Default no assertions flag + */ + static DEFAULT_NOASSERT: boolean; + + /** + * Maximum number of bytes required to store a 32bit base 128 variable-length integer + */ + static MAX_VARINT32_BYTES: number; + + /** + * Maximum number of bytes required to store a 64bit base 128 variable-length integer + */ + static MAX_VARINT64_BYTES: number; + + /** + * Metrics representing number of UTF8 characters. Evaluates to `c`. + */ + static METRICS_CHARS: string; + + /** + * Metrics representing number of bytes. Evaluates to `b`. + */ + static METRICS_BYTES: string; + } +} diff --git a/types/adone/glosses/collections/default_map.d.ts b/types/adone/glosses/collections/default_map.d.ts new file mode 100644 index 0000000000..46b8ccebfe --- /dev/null +++ b/types/adone/glosses/collections/default_map.d.ts @@ -0,0 +1,9 @@ +declare namespace adone.collection { + /** + * Represents a Map that has a default values factory object or function. + * Each get of non-existent key goes through the factory + */ + class DefaultMap extends Map { + constructor(factory?: ((key: K) => V) | { [key: string]: V }, iterable?: Iterable<[K, V]>); + } +} diff --git a/types/adone/glosses/collections/fast_lru.d.ts b/types/adone/glosses/collections/fast_lru.d.ts new file mode 100644 index 0000000000..e991322bc0 --- /dev/null +++ b/types/adone/glosses/collections/fast_lru.d.ts @@ -0,0 +1,61 @@ +declare namespace adone.collection { + /** + * Represents a faster LRU cache but with less functionality + */ + class FastLRU { + /** + * @param size Cache size, unlimited by default + */ + constructor(size?: number, options?: { + /** + * Function that is called when a value is deleted + */ + dispose?(key: K, value: V): void + }); + + /** + * The actual size of the cache + */ + readonly size: number; + + /** + * Gets the value by the given key + */ + get(key: K): V | undefined; + + /** + * Sets a new value for the given key + */ + set(key: K, value: V): void; + + /** + * Deletes the given key from the cache + */ + delete(key: K): boolean; + + /** + * Checks whether the cache has an element with the given key + */ + has(key: K): boolean; + + /** + * Returns the keys iterator + */ + keys(): IterableIterator; + + /** + * Returns the values iterator + */ + values(): IterableIterator; + + /** + * Returns the entries iterator + */ + entries(): IterableIterator<[K, V]>; + + /** + * Clears the cache + */ + clear(): void; + } +} diff --git a/types/adone/glosses/collections/index.d.ts b/types/adone/glosses/collections/index.d.ts new file mode 100644 index 0000000000..234ffe85f4 --- /dev/null +++ b/types/adone/glosses/collections/index.d.ts @@ -0,0 +1,28 @@ +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// + +declare namespace adone { + /** + * Data structures + */ + namespace collection { + // + } +} diff --git a/types/adone/glosses/collections/linked_list.d.ts b/types/adone/glosses/collections/linked_list.d.ts new file mode 100644 index 0000000000..69ffa4da4b --- /dev/null +++ b/types/adone/glosses/collections/linked_list.d.ts @@ -0,0 +1,150 @@ +declare namespace adone.collection { + namespace I.LinkedList { + /** + * Represents the node of a linked list + */ + interface Node { + /** + * The next node + */ + next?: Node; + + /** + * The previous node + */ + prev?: Node; + + /** + * The value this node contains + */ + value: T; + } + } + + /** + * Represents a linked list + */ + class LinkedList { + /** + * The maximum length of the list + */ + readonly maxLength: number; + + /** + * Current length of the list + */ + readonly length: number; + + /** + * Whether the list is autoresizable + */ + readonly autoresize: boolean; + + /** + * @param maxLength Maximum length of the linked list + */ + constructor(maxLength?: number); + + /** + * Whether the list is full + */ + readonly full: boolean; + + /** + * Whether the list is empty + */ + readonly empty: boolean; + + /** + * Resizes the list + */ + resize(newLength: number): this; + + /** + * Adds a new node to the end + * + * @returns Added node + */ + push(value: T): I.LinkedList.Node; + + /** + * Removes the last node, returns undefined if the list is empty + */ + pop(): T | undefined; + + /** + * Removes the first node, returns undefined if the list is empty + */ + shift(): T | undefined; + + /** + * Inserts a new node at the beginning of the list + * + * @returns Added node + */ + unshift(value: T): I.LinkedList.Node; + + /** + * Moves the given node to the end of the list + */ + pushNode(node: I.LinkedList.Node): void; + + /** + * Moved the given node to the beginning of the list + */ + unshiftNode(node: I.LinkedList.Node): void; + + /** + * Removes the given node from the list + */ + removeNode(node: I.LinkedList.Node): void; + + /** + * Clears the list + * + * @param strong Whether to reset all the node's values + */ + clear(strong?: boolean): void; + + /** + * Convers the list to an array + */ + toArray(): T[]; + + /** + * The first element of the list + */ + readonly front: T; + + /** + * The last element of the list + */ + readonly back: T; + + /** + * Returns an iterator over the list elements + */ + [Symbol.iterator](): IterableIterator; + + /** + * Returns the next node for the given node + */ + nextNode(node: I.LinkedList.Node): I.LinkedList.Node; + + /** + * Maps this linked list to a new one using the given function + */ + map(fn: (value: T, index: number) => R): LinkedList; + + /** + * Invokes the given callback for each value from the beginning to the end (much faster than for-of). + * If the given function returns false it stops iterating. + */ + forEach(callback: (value: T, index: number) => void | boolean): void; + + /** + * Default length of a new created linked list + */ + static DEFAULT_LENGTH: number; + } +} diff --git a/types/adone/glosses/collections/lru.d.ts b/types/adone/glosses/collections/lru.d.ts new file mode 100644 index 0000000000..7d41e32cd5 --- /dev/null +++ b/types/adone/glosses/collections/lru.d.ts @@ -0,0 +1,213 @@ +declare namespace adone.collection { + namespace I.LRU { + type LengthCalculator = (value: V, key: K) => number; + interface ConstructorOptions { + /** + * The maximum size of the cache, checked by applying the length function to all values in the cache. + * Default is Infinity + */ + max?: number; + + /** + * Maximum age in ms. Items are not pro-actively pruned out as they age, + * but if you try to get an item that is too old, + * it'll drop it and return undefined instead of giving it to you + */ + maxAge?: number; + + /** + * Function that is used to calculate the length of stored items + */ + length?: LengthCalculator; + + /** + * Function that is called on items when they are dropped from the cache + */ + dispose?(key: K, value: V): void; + + /** + * Whether to return the stale value before deleting it + */ + stale?: boolean; + + /** + * Dispose will only be called when a key falls out of the cache, not when it is overwritten + */ + noDisposeOnSet?: boolean; + } + + interface SerializedEntry { + /** + * key + */ + key: K; + + /** + * value + */ + value: V; + + /** + * when it becomes expired + */ + e: number; + } + + interface Entry { + /** + * key + */ + key: K; + + /** + * value + */ + value: V; + + /** + * entry length + */ + length: number; + + /** + * Timestamp when the entry was created + */ + now: number; + + /** + * Maximum live time + */ + maxAge: number; + } + } + + /** + * Represent an LRU cache + */ + class LRU { + /** + * Creates an LRU cache of the given size + */ + constructor(max: number); + + /** + * Creates an LRU cache with the given options + */ + constructor(options?: I.LRU.ConstructorOptions); + + /** + * The length of the cache, setter resizes the cache + */ + max: number; + + /** + * stale setting + */ + allowStale: boolean; + + /** + * maxAge setting + */ + maxAge: number; + + /** + * length setting + */ + lengthCalculator: I.LRU.LengthCalculator; + + /** + * Total length of objects in cache taking into account length options function + */ + readonly length: number; + + /** + * Total quantity of objects currently in cache. + * Note, that stale items are returned as part of this item count. + */ + readonly itemCount: number; + + /** + * Iterates over all the keys in the cache, in reverse recent-ness order. (ie, less recently used items are iterated over first.) + */ + rforEach(fn: (this: T, value: V, key: K, cache: LRU) => void, thisp?: T): void; + + /** + * Iterates over all the keys in the cache, in order of recent-ness + */ + forEach(fn: (this: T, value: V, key: K, cache: LRU) => void, thisp?: T): void; + + /** + * Returns an array of the keys in the cache + */ + keys(): K[]; + + /** + * Returns an array of the values in the cache + */ + values(): V[]; + + /** + * Clears the cache entirely, throwing away all values + */ + reset(): void; + + /** + * Return an array of the cache entries ready for serialization and usage with 'destinationCache.load(arr)` + */ + dump(): Array>; + + /** + * Returns an internal lru list of entries + */ + dumpLru(): LinkedList>; + + /** + * @param opts std.util.inspect options + */ + inspect(opts?: object): string; + + /** + * Sets a new value for the given key. Updates the "recently used"-ness of the key + * + * @param maxAge maxAge option specific for this key + * @returns Whether the key was set + */ + set(key: K, value: V, maxAge?: number): boolean; + + /** + * Check if a key is in the cache, without updating the recent-ness or deleting it for being stale + */ + has(key: K): boolean; + + /** + * Gets the value of the given key. Updates the "recently used"-ness of the key + */ + get(key: K): V | undefined; + + /** + * Returns the key value without updating the "recently used"-ness of the key + */ + peek(key: K): V | undefined; + + /** + * Deletes the less recently used element + */ + pop(): I.LRU.Entry; + + /** + * Deletes a key out of the cache + */ + del(key: K): void; + + /** + * Loads another cache entries array, obtained with sourceCache.dump(), into the cache. + * The destination cache is reset before loading new entries + */ + load(arr: Array>): void; + + /** + * Manually iterates over the entire cache proactively pruning old entries + */ + prune(): void; + } +} diff --git a/types/adone/glosses/collections/map_cache.d.ts b/types/adone/glosses/collections/map_cache.d.ts new file mode 100644 index 0000000000..55bbb6e05f --- /dev/null +++ b/types/adone/glosses/collections/map_cache.d.ts @@ -0,0 +1,13 @@ +declare namespace adone.collection { + class MapCache { + has(key: string): boolean; + + get(key: string): T; + + set(key: string, value: T): void; + + delete(key: string): void; + + clear(): void; + } +} diff --git a/types/adone/glosses/collections/ns_cache.d.ts b/types/adone/glosses/collections/ns_cache.d.ts new file mode 100644 index 0000000000..5630c295d3 --- /dev/null +++ b/types/adone/glosses/collections/ns_cache.d.ts @@ -0,0 +1,17 @@ +declare namespace adone.collection { + class NSCache { + constructor(size: number, namespaces: string[]); + + resize(newSize: number): void; + + set(ns: string, key: string, value: T): void; + + get(ns: string, key: string): T; + + has(ns: string, key: string): boolean; + + delete(ns: string, key: string): void; + + clear(): void; + } +} diff --git a/types/adone/glosses/collections/priority_queue.d.ts b/types/adone/glosses/collections/priority_queue.d.ts new file mode 100644 index 0000000000..0fb1e92814 --- /dev/null +++ b/types/adone/glosses/collections/priority_queue.d.ts @@ -0,0 +1,78 @@ +declare namespace adone.collection { + namespace I.PriorityQueue { + interface ConstructorOptions { + /** + * Function that compares objects. + * + * Must return a positive value if a > b, a negative if a < b, and zero for equal objects + */ + compare?(a: T, b: T): number; + + /** + * Function that evaluates the priority value by the given objects, + * if the returned value > 0, then the first argument has higher priority, + * = 0 same priority, < 0 lower priority. + * By default the top element is an element that has the highest priority, + * the default priority function is equal to the compare function + */ + priority?(a: T, b: T): number; + } + } + + /** + * Represents a priority queue + */ + class PriorityQueue { + /** + * Whether the queue is empty + */ + readonly empty: boolean; + + /** + * The length of the queue + */ + readonly length: number; + + constructor(options?: I.PriorityQueue.ConstructorOptions); + + /** + * Clones the queue + */ + clone(): PriorityQueue; + + /** + * Inserts a new element + */ + push(x: T): this; + + /** + * Removes the top element (that has the highest priority) + */ + pop(): T | undefined; + + /** + * Deletes the given element from the queue + */ + delete(x: T): this; + + /** + * Replaces the top element (pop + push) + */ + replace(x: T): T; + + /** + * Faster push + pop + */ + pushpop(x: T): T; + + /** + * Converts the queue to an array, it works with a clone of the queue, so the original queue is untouched + */ + toArray(): T[]; + + /** + * Creates a queue object from the given iterable + */ + static from(iterable: Iterable, options?: I.PriorityQueue.ConstructorOptions): PriorityQueue; + } +} diff --git a/types/adone/glosses/collections/queue.d.ts b/types/adone/glosses/collections/queue.d.ts new file mode 100644 index 0000000000..e67eb8fda9 --- /dev/null +++ b/types/adone/glosses/collections/queue.d.ts @@ -0,0 +1,31 @@ +declare namespace adone.collection { + /** + * Represents a queue + */ + class Queue { + /** + * Whether the queue is full + */ + readonly full: boolean; + + /** + * The length of the queue + */ + readonly length: number; + + /** + * Whether the queue is empty + */ + readonly empty: boolean; + + /** + * Inserts a new element at the end + */ + push(x: S): this; + + /** + * Removes and returns an element from the beginning + */ + pop(): T | undefined; + } +} diff --git a/types/adone/glosses/collections/rb_tree.d.ts b/types/adone/glosses/collections/rb_tree.d.ts new file mode 100644 index 0000000000..2ed7a81323 --- /dev/null +++ b/types/adone/glosses/collections/rb_tree.d.ts @@ -0,0 +1,184 @@ +declare namespace adone.collection { + namespace I.RedBlackTree { + interface Node { + /** + * The key associated to the node + */ + key: K; + + /** + * The value associated to the node + */ + value: V; + + /** + * The left subtree of the node + */ + left?: Node; + + /** + * The right subtree of the node + */ + right?: Node; + } + + interface Iterator { + /** + * Checks if the iterator is valid + */ + readonly valid: boolean; + + /** + * The value of the node at the iterator's current position, null if invalid + */ + readonly node: Node | null; + + /** + * The key of the item referenced by the iterator, undefined if invalid + */ + readonly key?: K; + + /** + * The value of the item referenced by the iterator, undefined if invalid + */ + readonly value?: V; + + /** + * Returns the position of this iterator in the sequence + */ + readonly index: number; + + /** + * If true, then the iterator is not at the end of the sequence + */ + readonly hasNext: boolean; + + /** + * If true, then the iterator is not at the beginning of the sequence + */ + readonly hasPrev: boolean; + + /** + * The tree associated to the iterator + */ + tree: RedBlackTree; + + /** + * Makes a copy of the iterator + */ + clone(): Iterator; + + /** + * Removes the item at the position of the iterator and returns a new rb-tree + */ + remove(): RedBlackTree; + + /** + * Advances the iterator to the next position + */ + next(): void; + + /** + * Updates the value of the node in the tree at this iterator and returns a new rb-tree + */ + update(value: V): RedBlackTree; + + /** + * Moves the iterator backward one element + */ + prev(): void; + } + } + + /** + * Represents a fully persistent red-black tree + */ + class RedBlackTree { + /** + * The root node of the tree + */ + root: I.RedBlackTree.Node; + + constructor(compare?: (a: K, b: K) => number, root?: RedBlackTree); + + /** + * A sorted array of all the keys in the tree + */ + readonly keys: K[]; + + /** + * An array of all the values in the tree + */ + readonly values: V[]; + + /** + * The number of items in the tree + */ + readonly length: number; + + /** + * An iterator pointing to the first element in the tree + */ + readonly begin: I.RedBlackTree.Iterator; + + /** + * An iterator pointing to the last element in the tree + */ + readonly end: I.RedBlackTree.Iterator; + + /** + * Creates a new tree with the new pair inserted + */ + insert(key: K, value: V): RedBlackTree; + + /** + * Walks a visitor function over the nodes of the tree in order + * + * @param visit A callback that gets executed on each node. + * If a truthy value is returned from the visitor, then iteration is stopped. + * @param lo An optional start of the range to visit (inclusive) + * @param hi An optional end of the range to visit (non-inclusive) + */ + forEach(visit: (key: K, value: V) => T, lo?: K, hi?: K): T; + + /** + * Finds an iterator starting at the given element + */ + at(idx: number): I.RedBlackTree.Iterator; + + /** + * Finds the first item in the tree whose key is >= key + */ + ge(key: K): I.RedBlackTree.Iterator; + + /** + * Finds the first item in the tree whose key is > key + */ + gt(key: K): I.RedBlackTree.Iterator; + + /** + * Finds the first item in the tree whose key is < key + */ + lt(key: K): I.RedBlackTree.Iterator; + + /** + * Finds the first item in the tree whose key is <= key + */ + le(key: K): I.RedBlackTree.Iterator; + + /** + * Returns an iterator pointing to the first item in the tree with key, otherwise null + */ + find(key: K): I.RedBlackTree.Iterator | null; + + /** + * Removes the first item with key in the tree + */ + remove(key: K): RedBlackTree; + + /** + * Retrieves the value associated to the given key + */ + get(key: K): V | undefined; + } +} diff --git a/types/adone/glosses/collections/refcounted_cache.d.ts b/types/adone/glosses/collections/refcounted_cache.d.ts new file mode 100644 index 0000000000..79410423a4 --- /dev/null +++ b/types/adone/glosses/collections/refcounted_cache.d.ts @@ -0,0 +1,9 @@ +declare namespace adone.collection { + class RefcountedCache extends MapCache { + ref(key: string): void; + + unref(key: string): void; + + references(key: string): number; + } +} diff --git a/types/adone/glosses/collections/set.d.ts b/types/adone/glosses/collections/set.d.ts new file mode 100644 index 0000000000..f1a6bae96d --- /dev/null +++ b/types/adone/glosses/collections/set.d.ts @@ -0,0 +1,17 @@ +declare namespace adone.collection { + class Set { + constructor(key?: (x: T) => any); + + has(value: T): boolean; + + add(value: T): void; + + delete(value: T): void; + + get(value: T): T; // ??? + + readonly size: number; + + only(): T; + } +} diff --git a/types/adone/glosses/collections/stack.d.ts b/types/adone/glosses/collections/stack.d.ts new file mode 100644 index 0000000000..90fe35b99b --- /dev/null +++ b/types/adone/glosses/collections/stack.d.ts @@ -0,0 +1,36 @@ +declare namespace adone.collection { + /** + * Represents a stack + */ + class Stack { + /** + * Whether the stack is empty + */ + readonly empty: boolean; + + /** + * The top element of the stack + */ + readonly top: T; + + /** + * Inserts a new element + */ + push(x: T): this; + + /** + * Removes the top element + */ + pop(): T | undefined; + + /** + * Returns an iterator over the values + */ + [Symbol.iterator](): IterableIterator; + + /** + * Creates a stack and pushed all the values from the given iterable object + */ + static from(iterable: Iterable): Stack; + } +} diff --git a/types/adone/glosses/collections/timedout_map.d.ts b/types/adone/glosses/collections/timedout_map.d.ts new file mode 100644 index 0000000000..fedcf79fa2 --- /dev/null +++ b/types/adone/glosses/collections/timedout_map.d.ts @@ -0,0 +1,32 @@ +declare namespace adone.collection { + /** + * Represents a Map that keeps keys only for a specified interval of time + */ + class TimedoutMap extends Map { + /** + * @param timeout maximum age of the keys, 1000 by default + * @param callback callback that is called with each key when the timeout is passed + */ + constructor(timeout?: number, callback?: (key: K) => void); + + /** + * Gets the timeout + */ + getTimeout(): number; + + /** + * Sets the timeout + */ + setTimeout(ms: number): void; + + /** + * Iterates over the map and calls the callback for each element + */ + forEach(callback: (this: T, value: V, key: K, cache: this) => void, thisArg?: T): this; + + /** + * Deletes the given key + */ + delete(key: K): boolean; + } +} diff --git a/types/adone/glosses/data.d.ts b/types/adone/glosses/data.d.ts index f711836bdd..4d3dae7b2b 100644 --- a/types/adone/glosses/data.d.ts +++ b/types/adone/glosses/data.d.ts @@ -30,7 +30,12 @@ declare namespace adone { * or an array of String and Number objects that serve as a whitelist * for selecting/filtering the properties of the value object to be included in the JSON string */ - replacer?: I.Replacer + replacer?: I.Replacer, + + /** + * Wheter to append a newline + */ + newline?: boolean }): Buffer; /** @@ -84,6 +89,8 @@ declare namespace adone { */ function decode(buf: collection.I.ByteArray.Wrappable): any; + function tryDecode(buf: collection.ByteArray): any; + namespace I { type Type = string | number; // ? type DecodeFunction = (buf: collection.ByteArray) => any; @@ -153,6 +160,8 @@ declare namespace adone { * Represents a MessagePack serializer */ class Serializer { + constructor(initialCapacity?: number); + /** * Encoder instance */ @@ -211,6 +220,8 @@ declare namespace adone { * x.Exception, Error, Date, Map, Set, math.Long */ const serializer: Serializer; + + function registerCommonTypesFor(s: Serializer): void; } /** @@ -244,21 +255,32 @@ declare namespace adone { * Base64 encoder */ namespace base64 { + namespace I { + interface DecodeOptions { + buffer?: boolean; + encoding?: string; + } + + interface EncodeOptions { + buffer?: boolean; + } + } + /** * Encodes a string/Buffer to base64 */ - function encode(str: string | Buffer, options: { buffer: false }): string; - function encode(str: string | Buffer, options?: { buffer?: true }): Buffer; + function encode(str: string | Buffer, options: I.EncodeOptions & { buffer: false }): string; + function encode(str: string | Buffer, options?: I.EncodeOptions): Buffer; /** * Decodes base64 string/buffer into a buffer */ - function decode(str: string | Buffer, options: { buffer: true }): Buffer; + function decode(str: string | Buffer, options: I.DecodeOptions & { buffer: true }): Buffer; /** * Decodes base64 string/buffer into a string */ - function decode(str: string | Buffer, options?: { buffer?: false }): string; + function decode(str: string | Buffer, options?: I.DecodeOptions): string; function encodeVLQ(value: number): string; @@ -560,7 +582,7 @@ declare namespace adone { /** * Represents a YAML exception */ - class Exception extends adone.x.Exception { + class Exception extends adone.exception.Exception { reason: string; mark: Mark; @@ -1028,5 +1050,183 @@ declare namespace adone { */ function decode(buf: Buffer, options?: I.DeserializeOptions): any; } + + namespace protobuf { + namespace schema { + namespace I { + interface Field { + name: string | null; + type: string | null; + tag: number; + map: { + from: string; + to: string; + } | null; + oneof: string | null; + required: boolean; + repeated: boolean; + options: object; + } + + interface Enum { + name: string; + values: object; + options: object; + } + + interface Extend { + name: string; + message: Message; + } + + interface Message { + name: string; + enums: Enum[]; + extends: Extend[]; + messages: Message[]; + fields: Field[]; + extensions: { + from: number, + to: number + } | null; + } + + interface RPCMethod { + name: string; + input_type: string | null; + output_type: string | null; + client_streaming: boolean; + server_streaming: boolean; + options: object; + } + + interface Service { + name: string; + methods: RPCMethod[]; + options: object; + } + + interface Schema { + syntax: any; // ?? + package: string | null; + imports: string[]; + enums: Enum[]; + messages: Message[]; + options: object; + extends: Extend[]; + services?: Service[]; + } + } + + function parse(buf: Buffer | string): I.Schema; + + function stringify(schema: object): string; + } + + function create(proto: Buffer | string | object, opts?: object): object; + } + + namespace base32 { + function charmap(alphabet: string, mappings?: T): T; + + namespace I { + interface Spec { + alphabet: string; + charmap: { + [c: string]: number; + }; + } + } + + const rfc4648: I.Spec; + + const crockford: I.Spec; + + const base32hex: I.Spec; + + namespace I { + interface DecoderOptions { + type: "rfc4648" | "crockford" | "base32hex"; + charmap?: object; + } + + interface EncoderOptions { + type: "rfc4648" | "crockford" | "base32hex"; + alphabet?: string; + } + } + + class Decoder { + constructor(options?: I.DecoderOptions); + + write(str: string): this; + + finalize(str?: string): Buffer; + } + + class Encoder { + constructor(options?: I.EncoderOptions); + + write(buf: Buffer): this; + + finalize(buf?: Buffer): string; + } + + function encode(buf: Buffer, options?: I.EncoderOptions): string; + + function decode(str: string, options?: I.DecoderOptions): Buffer; + } + + namespace I { + interface BaseX { + encode(buf: Buffer): string; + + decode(str: string): Buffer; + + decodeUnsafe(str: string): Buffer; + } + } + + function basex(alphabet: string): I.BaseX; + + const base58: I.BaseX; + + namespace base64url { + function unescape(str: string): string; + + function escape(str: string): string; + + namespace I { + interface EncodeOptions { + encoding?: string; + } + + interface DecodeOptions { + encoding?: string; + buffer?: boolean; + } + } + + function encode(str: Buffer | string, options?: I.EncodeOptions): string; + + function decode(str: string, options: I.DecodeOptions & { buffer: true }): Buffer; + function decode(str: string, options?: I.DecodeOptions): string; + } + + namespace varint { + function encode(num: number, out?: T[], offset?: number): T[]; + + function decode(buf: Buffer, offset?: number): number; + + function encodingLength(value: number): number; + } + + namespace varintSigned { + function encode(num: number, out?: T[], offset?: number): T[]; + + function decode(buf: Buffer, offset?: number): number; + + function encodingLength(value: number): number; + } } } diff --git a/types/adone/glosses/events.d.ts b/types/adone/glosses/events.d.ts index ecb323f925..e812624aa9 100644 --- a/types/adone/glosses/events.d.ts +++ b/types/adone/glosses/events.d.ts @@ -1,25 +1,48 @@ declare namespace adone { namespace event { - class EventEmitter { - static listenerCount(emitter: EventEmitter, event: string | symbol): number; + namespace I { + interface PropagateEventsEnder { + end(): void; + } + } + + class Emitter { + static listenerCount(emitter: Emitter, event: string | symbol): number; + static defaultMaxListeners: number; addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Array<(...args: any[]) => any>; + emit(event: string | symbol, ...args: any[]): boolean; + eventNames(): Array; + listenerCount(type: string | symbol): number; + + propagateEvents(dest: Emitter, events: string[]): I.PropagateEventsEnder; + + static propagateEvents(source: Emitter, dest: Emitter, events: string[]): I.PropagateEventsEnder; } - class AsyncEmitter extends EventEmitter { + class AsyncEmitter extends Emitter { constructor(concurrency?: number); setConcurrency(max?: number): this; diff --git a/types/adone/glosses/exceptions.d.ts b/types/adone/glosses/exceptions.d.ts index 347a3c632d..1b1981f80e 100644 --- a/types/adone/glosses/exceptions.d.ts +++ b/types/adone/glosses/exceptions.d.ts @@ -1,5 +1,5 @@ declare namespace adone { - namespace x { + namespace exception { class Exception extends Error { constructor(message?: string | Error, captureStackTrace?: boolean); } diff --git a/types/adone/glosses/fake.d.ts b/types/adone/glosses/fake.d.ts new file mode 100644 index 0000000000..0c403747e4 --- /dev/null +++ b/types/adone/glosses/fake.d.ts @@ -0,0 +1,337 @@ +declare namespace adone { + namespace fake { + namespace I { + interface Card { + name: string; + username: string; + email: string; + address: FullAddress; + phone: string; + website: string; + company: Company; + posts: Post[]; + accountHistory: string[]; + } + + interface FullAddress { + streetA: string; + streetB: string; + streetC: string; + streetD: string; + city: string; + state: string; + county: string; + zipcode: string; + geo: Geo; + } + + interface Geo { + lat: string; + lng: string; + } + + interface Company { + name: string; + catchPhrase: string; + bs: string; + } + + interface Post { + words: string; + sentence: string; + sentences: string; + paragraph: string; + } + + interface ContextualCard { + name: string; + username: string; + email: string; + dob: Date; + phone: string; + address: Address; + website: string; + company: Company; + } + + interface Address { + street: string; + suite: string; + city: string; + state: string; + zipcode: string; + geo: Geo; + } + + interface UserCard { + name: string; + username: string; + email: string; + address: Address; + phone: string; + website: string; + company: Company; + } + + interface Transaction { + amount: string; + date: Date; + business: string; + name: string; + type: string; + account: string; + } + } + + namespace address { + function zipCode(format?: string): string; + function city(format?: number): string; + function cityPrefix(): string; + function citySuffix(): string; + function streetName(): string; + function streetAddress(useFullAddress?: boolean): string; + function streetSuffix(): string; + function streetPrefix(): string; + function secondaryAddress(): string; + function county(): string; + function country(): string; + function countryCode(): string; + function state(useAbbr?: boolean): string; + function stateAbbr(): string; + function latitude(): string; + function longitude(): string; + } + + namespace commerce { + function color(): string; + function department(): string; + function productName(): string; + function price(min?: number, max?: number, dec?: number, symbol?: string): string; + function productAdjective(): string; + function productMaterial(): string; + function product(): string; + } + + namespace company { + function suffixes(): string[]; + function companyName(format?: number): string; + function companySuffix(): string; + function catchPhrase(): string; + function bs(): string; + function catchPhraseAdjective(): string; + function catchPhraseDescriptor(): string; + function catchPhraseNoun(): string; + function bsAdjective(): string; + function bsBuzz(): string; + function bsNoun(): string; + } + + namespace database { + function column(): string; + function type(): string; + function collation(): string; + function engine(): string; + } + + namespace date { + function past(years?: number, refDate?: string|Date): Date; + function future(years?: number, refDate?: string|Date): Date; + function between(from: string|number|Date, to: string|Date): Date; + function recent(days?: number): Date; + function soon(days?: number): Date; + function month(options?: { abbr?: boolean, context?: boolean }): string; + function weekday(options?: { abbr?: boolean, context?: boolean }): string; + } + + function fake(str: string): string; + + namespace finance { + function account(length?: number): string; + function accountName(): string; + function mask(length?: number, parens?: boolean, elipsis?: boolean): string; + function amount(min?: number, max?: number, dec?: number, symbol?: string): string; + function transactionType(): string; + function currencyCode(): string; + function currencyName(): string; + function currencySymbol(): string; + function bitcoinAddress(): string; + function ethereumAddress(): string; + function iban(formatted?: boolean): string; + function bic(): string; + } + + namespace hacker { + function abbreviation(): string; + function adjective(): string; + function noun(): string; + function verb(): string; + function ingverb(): string; + function phrase(): string; + } + + namespace helpers { + function randomize(array: T[]): T; + function randomize(): string; + function slugify(string?: string): string; + function replaceSymbolWithNumber(string?: string, symbol?: string): string; + function replaceSymbols(string?: string): string; + function shuffle(o: T[]): T[]; + function shuffle(): string[]; + function mustache(str: string, data: { [key: string]: string|((substring: string, ...args: any[]) => string) }): string; + function createCard(): I.Card; + function contextualCard(): I.ContextualCard; + function userCard(): I.UserCard; + function createTransaction(): I.Transaction; + } + + namespace image { + function image(): string; + function avatar(): string; + function imageUrl(width?: number, height?: number, category?: string): string; + function abstract(width?: number, height?: number): string; + function animals(width?: number, height?: number): string; + function business(width?: number, height?: number): string; + function cats(width?: number, height?: number): string; + function city(width?: number, height?: number): string; + function food(width?: number, height?: number): string; + function nightlife(width?: number, height?: number): string; + function fashion(width?: number, height?: number): string; + function people(width?: number, height?: number): string; + function nature(width?: number, height?: number): string; + function sports(width?: number, height?: number): string; + function technics(width?: number, height?: number): string; + function transport(width?: number, height?: number): string; + function dataUri(width?: number, height?: number): string; + } + + namespace internet { + function avatar(): string; + function email(firstName?: string, lastName?: string, provider?: string): string; + function exampleEmail(firstName?: string, lastName?: string): string; + function userName(firstName?: string, lastName?: string): string; + function protocol(): string; + function url(): string; + function domainName(): string; + function domainSuffix(): string; + function domainWord(): string; + function ip(): string; + function ipv6(): string; + function userAgent(): string; + function color(baseRed255?: number, baseGreen255?: number, baseBlue255?: number): string; + function mac(): string; + function password(len?: number, memorable?: boolean, pattern?: string|RegExp, prefix?: string): string; + } + + namespace lorem { + function word(): string; + function words(num?: number): string; + function sentence(wordCount?: number, range?: number): string; + function slug(wordCount?: number): string; + function sentences(sentenceCount?: number): string; + function paragraph(sentenceCount?: number): string; + function paragraphs(paragraphCount?: number, separator?: string): string; + function text(times?: number): string; + function lines(lineCount?: number): string; + } + + namespace name { + function firstName(gender?: number): string; + function lastName(gender?: number): string; + function findName(firstName?: string, lastName?: string, gender?: number): string; + function jobTitle(): string; + function prefix(): string; + function suffix(): string; + function title(): string; + function jobDescriptor(): string; + function jobArea(): string; + function jobType(): string; + } + + namespace phone { + function phoneNumber(format?: string): string; + function phoneNumberFormat(phoneFormatsArrayIndex?: number): string; + function phoneFormats(): string; + } + + namespace random { + function number(max: number): number; + function number(options?: { min?: number, max?: number, precision?: number }): number; + function arrayElement(): string; + function arrayElement(array: T[]): T; + function objectElement(object?: { [key: string]: any }, field?: "key"): string; + function objectElement(object?: { [key: string]: T }, field?: any): T; + function uuid(): string; + function boolean(): boolean; + function word(type?: string): string; + function words(count?: number): string; + function image(): string; + function locale(): string; + function alphaNumeric(count?: number): string; + function hexaDecimal(count?: number): string; + } + + namespace system { + function fileName(ext: string, type: string): string; + function commonFileName(ext: string, type: string): string; + function mimeType(): string; + function commonFileType(): string; + function commonFileExt(): string; + function fileType(): string; + function fileExt(mimeType: string): string; + function directoryPath(): string; + function filePath(): string; + function semver(): string; + } + + function seed(value: number): void; + + namespace I { + type Locale = + | "az" + | "cz" + | "de" + | "de_AT" + | "de_CH" + | "el" + | "en" + | "en_AU" + | "en_BORK" + | "en_CA" + | "en_GB" + | "en_IE" + | "en_IND" + | "en_US" + | "en_au_ocker" + | "es" + | "es_MX" + | "fa" + | "fr" + | "fr_CA" + | "ge" + | "id_ID" + | "it" + | "ja" + | "ko" + | "lv" + | "nb_NO" + | "nep" + | "nl" + | "nl_BE" + | "pl" + | "pt_BR" + | "ro" + | "ru" + | "sk" + | "sv" + | "tr" + | "uk" + | "vi" + | "zh_CN" + | "zh_TW"; + } + + function getLocale(): I.Locale; + + function setLocale(locale: I.Locale): void; + } +} diff --git a/types/adone/glosses/fast.d.ts b/types/adone/glosses/fast.d.ts index 725e0e9db3..1b04bec6d3 100644 --- a/types/adone/glosses/fast.d.ts +++ b/types/adone/glosses/fast.d.ts @@ -152,7 +152,7 @@ declare namespace adone { type SymbolicFile = File; /* tslint:disable-next-line:no-empty-interface */ - interface Stream extends stream.CoreStream { + interface Stream extends stream.core.Stream { // } } @@ -160,7 +160,7 @@ declare namespace adone { export const File: I.FileConstructor; namespace I { - type CoreStreamSource = stream.I.CoreStream.Source; + type CoreStreamSource = stream.core.I.Source; interface LocalStreamConstructorOptions { /** @@ -586,7 +586,7 @@ declare namespace adone { /** * Read JSON manifests written out by revisionHash */ - manifest?: File[] | stream.CoreStream, + manifest?: File[] | stream.core.Stream, /** * Modify the name of the unreved files before using them diff --git a/types/adone/glosses/fs.d.ts b/types/adone/glosses/fs.d.ts index 7fa8f51593..7517764faf 100644 --- a/types/adone/glosses/fs.d.ts +++ b/types/adone/glosses/fs.d.ts @@ -22,6 +22,14 @@ declare namespace adone { function readlink(path: string | Buffer | I.URL, options: { encoding: null }): Promise; function readlink(path: string | Buffer | I.URL, options?: { encoding?: I.Encoding }): Promise; + /** + * Reads the value of a symbolic link + */ + function readlinkSync(path: string | Buffer | I.URL, encoding: null): Buffer; + function readlinkSync(path: string | Buffer | I.URL, encoding: I.Encoding): string; + function readlinkSync(path: string | Buffer | I.URL, options: { encoding: null }): Buffer; + function readlinkSync(path: string | Buffer | I.URL, options?: { encoding?: I.Encoding }): string; + /** * Deletes a name and possibly the file it refers to */ @@ -32,6 +40,21 @@ declare namespace adone { */ function unlinkSync(path: string | Buffer | I.URL): void; + /** + * Changes the file system timestamps of the object referenced by path + */ + function utimes(path: string | Buffer | I.URL, atime: number | string | Date, mtime: number | string | Date): Promise; + + /** + * Changes the file system timestamps of the object referenced by path + */ + function utimesSync(path: string | Buffer | I.URL, atime: number | string | Date, mtime: number | string | Date): void; + + /** + * Changes the file system timestamps of the object referenced by path + */ + function utimesMillis(path: string | Buffer | I.URL, atime: number, mtime: number): Promise; + /** * Changes permissions of a file */ @@ -42,6 +65,11 @@ declare namespace adone { */ function chown(path: string | Buffer | I.URL, uid: number, gid: number): Promise; + /** + * Changes ownership recursively for a given path + */ + function chownr(path: string | Buffer | I.URL, uid: number, gid: number): Promise; + /** * Deletes a directory */ @@ -63,6 +91,87 @@ declare namespace adone { function readdirSync(path: string | Buffer | I.URL, options: { encoding: null }): Buffer[]; function readdirSync(path: string | Buffer | I.URL, options?: { encoding?: I.Encoding }): string[]; + namespace I { + interface ReaddirpEntry { + /** + * filename + */ + name: string; + + /** + * full path to a file + */ + fullPath: string; + + /** + * relative path to a file + */ + path: string; + + /** + * relative path to the parent dir + */ + parentDir: string; + + /** + * full path to the parent dir + */ + fullParentDir: string; + + /** + * file stats + */ + stat: fs.I.Stats; + } + + type ReaddirpFilter = string | ((entry: ReaddirpEntry) => boolean); + + interface ReaddirpOptions { + /** + * filter for files + */ + fileFilter?: ReaddirpFilter | ReaddirpFilter[]; + + /** + * filter for directories + */ + directoryFilter?: ReaddirpFilter | ReaddirpFilter[]; + + /** + * maximum recursion depth + * + * Infinity by default + */ + depth?: number; + + /** + * whether to emit files + * + * true by default + */ + files?: boolean; + + /** + * whether to emit directories + * + * true by default + */ + directories?: boolean; + + /** + * whether to use lstat for stating + * + * false by default + */ + lstat?: boolean; + } + } + + /** + * Traverses the given path + */ + function readdirp(root: string | Buffer | I.URL, options?: I.ReaddirpOptions): stream.core.Stream; + /** * Gets file status, identical to stat, except that if pathname is a symbolic link, * then it returns information about the link itself, not the file that it refers to @@ -117,6 +226,15 @@ declare namespace adone { flag?: I.Flag }): Promise; + /** + * Appends data to a file, creating the file if it does not yet exist + */ + function appendFileSync(file: string | Buffer | number, data: string | Buffer, options?: { + encoding?: I.Encoding, + mode?: number, + flag?: I.Flag + }): void; + /** * Tests a user's permissions for the file or directory specified by path */ @@ -154,6 +272,14 @@ declare namespace adone { cwd?: string }): Promise; + /** + * Recursively deletes empty directiries inside the given directory + */ + function rmEmpty(path: string, options?: { + cwd?: string; + filter?: (filename: string) => boolean + }): Promise; + namespace I { interface Access { read: boolean; @@ -460,12 +586,12 @@ declare namespace adone { /** * Copies this from this directory to the given path */ - copyTo(destPath: string, options?: I.CopyOptions): Promise; + copyTo(destPath: string, options?: I.CopyToOptions): Promise; /** * Copies files from the given path to this directory */ - copyFrom(srcPath: string, options?: I.CopyOptions): Promise; + copyFrom(srcPath: string, options?: I.CopyToOptions): Promise; /** * Creates a new directory with the given path @@ -560,7 +686,7 @@ declare namespace adone { /** * Represents a file that supports random access */ - class RandomAccessFile extends event.EventEmitter { + class RandomAccessFile extends event.Emitter { constructor(filename: string, options?: I.RandomAccessFile.ConstructorOptions); /** @@ -602,7 +728,7 @@ declare namespace adone { /** * Represents an abstract random access reader */ - class AbstractRandomAccessReader extends event.EventEmitter { + class AbstractRandomAccessReader extends event.Emitter { /** * Increments the reference counter */ @@ -826,7 +952,7 @@ declare namespace adone { }>; } - type Stream = stream.CoreStream; + type Stream = stream.core.Stream; interface EmitterConstructor { new(pattern: string, optons: Options, callback?: (error: any, matches: string[]) => void): Emitter; @@ -835,7 +961,7 @@ declare namespace adone { prototype: Emitter; } - interface Emitter extends event.EventEmitter { + interface Emitter extends event.Emitter { isIgnored(path: string): boolean; /** @@ -999,7 +1125,7 @@ declare namespace adone { /** * Represents a file watcher */ - class Watcher extends event.EventEmitter { + class Watcher extends event.Emitter { constructor(options?: I.Watcher.ConstructorOptions); /** @@ -1128,214 +1254,209 @@ declare namespace adone { function whichSync(cmd: string, options?: I.Which.Options): string; /** - * Functions to work with files using file descriptors + * Opens and possibly creates a file */ - namespace fd { - /** - * Opens and possibly create a file - */ - function open(path: string | Buffer | I.URL, flags: I.Flag | number, mode?: number): Promise; + function open(path: string | Buffer | I.URL, flags: I.Flag | number, mode?: number): Promise; - /** - * Opens and possibly create a file - */ - function openSync(path: string | Buffer | I.URL, flags: I.Flag | number, mode?: number): I.FD; + /** + * Opens and possibly creates a file + */ + function openSync(path: string | Buffer | I.URL, flags: I.Flag | number, mode?: number): I.FD; - /** - * Closes a file descriptor - */ - function close(fd: I.FD): Promise; + /** + * Closes a file descriptor + */ + function close(fd: I.FD): Promise; - /** - * Closes a file descriptor - */ - function closeSync(fd: I.FD): void; + /** + * Closes a file descriptor + */ + function closeSync(fd: I.FD): void; - /** - * Changes the file timestamps of a file referenced by the supplied file descriptor - */ - function utimes(fd: I.FD, atime: number, mtime: number): Promise; + /** + * Changes the file timestamps of a file referenced by the supplied file descriptor + */ + function futimes(fd: I.FD, atime: number, mtime: number): Promise; - /** - * Changes the file timestamps of a file referenced by the supplied file descriptor - */ - function utimesSync(fd: I.FD, atime: number, mtime: number): void; + /** + * Changes the file timestamps of a file referenced by the supplied file descriptor + */ + function futimesSync(fd: I.FD, atime: number, mtime: number): void; - /** - * Gets file status - */ - function stat(fd: I.FD): Promise; + /** + * Gets file status + */ + function fstat(fd: I.FD): Promise; - /** - * Gets file status - */ - function statSync(fd: I.FD): I.Stats; + /** + * Gets file status + */ + function fstatSync(fd: I.FD): I.Stats; - /** - * Truncates a file to a specified length - */ - function truncate(fd: I.FD, length?: number): Promise; + /** + * Truncates a file to a specified length + */ + function ftruncate(fd: I.FD, length?: number): Promise; - /** - * Truncates a file to a specified length - */ - function truncateSync(fd: I.FD, length?: number): void; + /** + * Truncates a file to a specified length + */ + function ftruncateSync(fd: I.FD, length?: number): void; + /** + * Read data from the file specified by fd + */ + function read( + fd: I.FD, /** - * Read data from the file specified by fd + * The buffer that the data will be written to */ - function read( - fd: I.FD, - /** - * The buffer that the data will be written to - */ - buffer: Buffer | Uint8Array, - /** - * The offset in the buffer to start writing at - */ - offset: number, - /** - * An integer specifying the number of bytes to read - */ - length: number, - /** - * An argument specifying where to begin reading from in the file - */ - position: number - ): Promise; - - function readSync( - fd: I.FD, - /** - * The buffer that the data will be written to - */ - buffer: Buffer | Uint8Array, - /** - * The offset in the buffer to start writing at - */ - offset: number, - /** - * An integer specifying the number of bytes to read - */ - length: number, - /** - * An argument specifying where to begin reading from in the file - */ - position: number - ): number; - + buffer: Buffer | Uint8Array, /** - * Writes buffer to the file specified by fd + * The offset in the buffer to start writing at */ - function write( - fd: I.FD, - buffer: Buffer | Uint8Array, - /** - * Determines the part of the buffer to be written - */ - offset?: number, - /** - * An integer specifying the number of bytes to write - */ - length?: number, - /** - * The offset from the beginning of the file where this data should be written - */ - position?: number - ): Promise; - + offset: number, /** - * Writes string to the file specified by fd + * An integer specifying the number of bytes to read */ - function write( - fd: I.FD, - string: string, - /** - * The offset from the beginning of the file where this data should be written - */ - position?: number, - /** - * The expected string encoding - */ - encoding?: I.Encoding - ): Promise; - + length: number, /** - * Writes buffer to the file specified by fd + * An argument specifying where to begin reading from in the file */ - function writeSync( - fd: I.FD, - buffer: Buffer | Uint8Array, - /** - * Determines the part of the buffer to be written - */ - offset?: number, - /** - * An integer specifying the number of bytes to write - */ - length?: number, - /** - * The offset from the beginning of the file where this data should be written - */ - position?: number - ): number; + position: number + ): Promise; + function readSync( + fd: I.FD, /** - * Writes string to the file specified by fd + * The buffer that the data will be written to */ - function writeSync( - fd: I.FD, - string: string, - /** - * The offset from the beginning of the file where this data should be written - */ - position?: number, - /** - * The expected string encoding - */ - encoding?: I.Encoding - ): number; + buffer: Buffer | Uint8Array, + /** + * The offset in the buffer to start writing at + */ + offset: number, + /** + * An integer specifying the number of bytes to read + */ + length: number, + /** + * An argument specifying where to begin reading from in the file + */ + position: number + ): number; + /** + * Writes buffer to the file specified by fd + */ + function write( + fd: I.FD, + buffer: Buffer | Uint8Array, /** - * Synchronizes a file's in-core state with storage + * Determines the part of the buffer to be written */ - function sync(fd: I.FD): Promise; + offset?: number, + /** + * An integer specifying the number of bytes to write + */ + length?: number, + /** + * The offset from the beginning of the file where this data should be written + */ + position?: number + ): Promise; + /** + * Writes string to the file specified by fd + */ + function write( + fd: I.FD, + string: string, /** - * Synchronizes a file's in-core state with storage + * The offset from the beginning of the file where this data should be written */ - function syncSync(fd: I.FD): void; + position?: number, + /** + * The expected string encoding + */ + encoding?: I.Encoding + ): Promise; + /** + * Writes buffer to the file specified by fd + */ + function writeSync( + fd: I.FD, + buffer: Buffer | Uint8Array, /** - * Changes ownership of a file + * Determines the part of the buffer to be written */ - function chown(fd: I.FD, uid: number, gid: number): Promise; + offset?: number, + /** + * An integer specifying the number of bytes to write + */ + length?: number, + /** + * The offset from the beginning of the file where this data should be written + */ + position?: number + ): number; + /** + * Writes string to the file specified by fd + */ + function writeSync( + fd: I.FD, + string: string, /** - * Changes ownership of a file + * The offset from the beginning of the file where this data should be written */ - function chownSync(fd: I.FD, uid: number, gid: number): void; + position?: number, + /** + * The expected string encoding + */ + encoding?: I.Encoding + ): number; - /** - * Changes permissions of a file - */ - function chmod(fd: I.FD, mode: number): Promise; + /** + * Synchronizes a file's in-core state with storage + */ + function fsync(fd: I.FD): Promise; - /** - * Changes permissions of a file - */ - function chmodSync(fd: I.FD, mode: number): void; + /** + * Synchronizes a file's in-core state with storage + */ + function fsyncSync(fd: I.FD): void; - /** - * Repositions read/write file offset - */ - function seek(fd: I.FD, offset: number, whence: number): Promise; + /** + * Changes ownership of a file + */ + function fchown(fd: I.FD, uid: number, gid: number): Promise; - /** - * Applies or removes an advisory lock on an open file - */ - function lock(fd: I.FD, flags: "sh" | "ex" | "shnb" | "exnb" | "un" | number): Promise; - } + /** + * Changes ownership of a file + */ + function fchownSync(fd: I.FD, uid: number, gid: number): void; + + /** + * Changes permissions of a file + */ + function fchmod(fd: I.FD, mode: number): Promise; + + /** + * Changes permissions of a file + */ + function fchmodSync(fd: I.FD, mode: number): void; + + /** + * Repositions read/write file offset + */ + function seek(fd: I.FD, offset: number, whence: number): Promise; + + /** + * Applies or removes an advisory lock on an open file + */ + function flock(fd: I.FD, flags: "sh" | "ex" | "shnb" | "exnb" | "un" | number): Promise; namespace constants { const F_OK: number; @@ -1475,12 +1596,63 @@ declare namespace adone { function existsSync(path: string | Buffer | I.URL): boolean; /** - * Creates a new directory and any necessary subdirectories + * Creates a new directory */ function mkdir(path: string, mode?: number): Promise; + /** + * Creates a new directory + */ + function mkdirSync(path: string, mode?: number): Promise; + + /** + * Creates a new directory and any necessary subdirectories + */ + function mkdirp(path: string, mode?: number): Promise; + + /** + * Creates a new directory and any necessary subdirectories + */ + function mkdirpSync(path: string, mode?: number): Promise; + namespace I { interface CopyOptions { + /** + * regexp or function against which each filename is tested whether to copy it or not + */ + filter?: RegExp | ((src: string, dst: string) => boolean); + + /** + * transform function which applies when files are streamed + */ + transform?( + readStream: NodeJS.ReadableStream, + writeStream: NodeJS.WritableStream, + file: { + name: string, + mode: number, + mtime: Date, + atime: Date, + stats: adone.fs.I.Stats + } + ): void; + + /** + * Whether to overwrite destination files if they exist. + * + * true by default + */ + clobber?: boolean; // ??? + + /** + * Whether to overwrite destination files if they exist. + * + * true by default + */ + overwrite?: boolean; + } + + interface CopyToOptions { /** * Do not replace existing files */ @@ -1494,10 +1666,15 @@ declare namespace adone { } /** - * Copies all files from src to dst + * Recursively copies all the files from src to dst */ function copy(src: string, dst: string, options?: I.CopyOptions): Promise; + /** + * Copies all files from src to dst + */ + function copyTo(src: string, dst: string, options?: I.CopyToOptions): Promise; + /** * Renames a file */ @@ -1514,8 +1691,32 @@ declare namespace adone { /** * Returns the last lines of a file + * + * @param path path to a file + * @param n number of lines to return */ - function tail(path: string, n: number, options?: { separator?: string, chunkLength?: number }): Promise; + function tail(path: string, n: number, options?: { + /** + * Line separator + * + * By default "\r\n" for windows and "\n" for others + */ + separator?: string, + + /** + * The number of bytes to read at once + * + * By default 4096 + */ + chunkLength?: number + + /** + * Position from which to start reading (from the end) + * + * By default stats.size of the file + */ + pos?: number + }): Promise; namespace I { interface StatVFS { @@ -1667,11 +1868,6 @@ declare namespace adone { */ function lookup(path: string): Promise; - /** - * Recursively changes ownership of files - */ - function chownr(path: string, uid: number, gid: number): Promise; - namespace I.TailWatcher { interface ConstructorOptions { /** @@ -1709,7 +1905,7 @@ declare namespace adone { * Represents an event emitter that watches for a file growing, * emits "line" event for each new line in a file */ - class TailWatcher extends event.EventEmitter { + class TailWatcher extends event.Emitter { constructor(filename: string, options?: I.TailWatcher.ConstructorOptions); /** diff --git a/types/adone/glosses/is.d.ts b/types/adone/glosses/is.d.ts index 335439a0bf..9065da138b 100644 --- a/types/adone/glosses/is.d.ts +++ b/types/adone/glosses/is.d.ts @@ -6,13 +6,13 @@ declare namespace adone { /** * Checks whether the given object is `null` */ - function _null(obj: any): boolean; + function _null(obj: any): obj is null; export { _null as null }; /** * Checks whether the given object is `undefined` */ - export function undefined(obj: any): boolean; + export function undefined(obj: any): obj is undefined; /** * Checks whether the given object is nither `undefined` nor `null` @@ -22,52 +22,54 @@ declare namespace adone { /** * Checks whether the given object is either `undefined` or `null` */ - export function nil(obj: any): boolean; + export function nil(obj: any): obj is undefined | null; /** * Checks whether the given object is a number */ - export function number(obj: any): boolean; + export function number(obj: any): obj is number; /** * Checks whether the given object is a finite number or a string represents a finite number */ - export function numeral(obj: any): boolean; + export function numeral(obj: number): obj is number; + export function numeral(obj: string): obj is string; + export function numeral(obj: any): obj is number | string; /** * Checks whether the given object is either +Infinity or -Inginity */ - export function infinite(obj: any): boolean; + export function infinite(obj: any): obj is number; /** * Checks whether the given object is an odd number */ - export function odd(obj: any): boolean; + export function odd(obj: any): obj is number; /** * Checks whether the given object is an even number */ - export function even(obj: any): boolean; + export function even(obj: any): obj is number; /** * Checks whether the given object is a float */ - export function float(obj: any): boolean; + export function float(obj: any): obj is number; /** * Checks whether the given object is -0 */ - export function negativeZero(obj: any): boolean; + export function negativeZero(obj: any): obj is number; /** * Checks whether the given object is a string */ - export function string(obj: any): boolean; + export function string(obj: any): obj is string; /** - * Checks whether the given object is an empty string + * Checks whether the given object is an empty string, i.e. a string with only whitespace characters */ - export function emptyString(obj: any): boolean; + export function emptyString(obj: any): obj is string; /** * Checks whether the first string is a substring of the second string from the given offset @@ -87,7 +89,7 @@ declare namespace adone { /** * Checks whether the given object is a boolean */ - export function boolean(obj: any): boolean; + export function boolean(obj: any): obj is boolean; /** * Checks whether the given object is a string with ".json" extension or an object @@ -215,7 +217,7 @@ declare namespace adone { /** * Checks whether the given string is a glob */ - export function glob(str: string): boolean; + export function glob(str: any): str is string; /** * Checks whether the given path is not a dot-file path (.secret) @@ -225,18 +227,18 @@ declare namespace adone { /** * Checks whether the given object is a function */ - function _function(obj: any): boolean; + function _function(obj: any): obj is (...args: any[]) => any; export { _function as function }; /** * Checks whether the given object is an async function */ - export function asyncFunction(obj: any): boolean; + export function asyncFunction(obj: any): obj is (...args: any[]) => Promise; /** * Checks whether the given object is a promise */ - export function promise(obj: any): boolean; + export function promise(obj: any): obj is PromiseLike; /** * Checks whether the given string is a valid date-string @@ -246,7 +248,7 @@ declare namespace adone { /** * Checks whether the given object is a buffer */ - export function buffer(obj: any): boolean; + export function buffer(obj: any): obj is Buffer; /** * Checks whether the given object is a callback function, i.e. it has a common function name @@ -266,27 +268,27 @@ declare namespace adone { /** * Checks whether the given object is a finite number */ - export function finite(obj: any): boolean; + export function finite(obj: any): obj is number; /** * Checks whether the given object is an integer */ - export function integer(obj: any): boolean; + export function integer(obj: any): obj is number; /** * Checks whether the given object is a safe integer */ - export function safeInteger(obj: any): boolean; + export function safeInteger(obj: any): obj is number; /** * Checks whether the given object is an array */ - export function array(obj: any): boolean; + export function array(obj: any): obj is any[]; /** * Checks whether the given object is a Uint8 array */ - export function uint8Array(obj: any): boolean; + export function uint8Array(obj: any): obj is Uint8Array; /** * Checks whether the given object is an adone configuration @@ -296,22 +298,22 @@ declare namespace adone { /** * Checks whether the given object is an instance of adone.math.Long */ - export function long(obj: any): boolean; + export function long(obj: any): obj is adone.math.Long; /** * Checks whether the given object is an instance of adone.math.BigNumber */ - export function bigNumber(obj: any): boolean; + export function bigNumber(obj: any): obj is adone.math.BigNumber; /** * Checks whether the given object is an instance of adone.collection.ByteArray */ - export function byteArray(obj: any): boolean; + export function byteArray(obj: any): obj is adone.collection.ByteArray; /** * Checks whether the given object is an instance of adone.datetime */ - export function datetime(obj: any): boolean; + export function datetime(obj: any): obj is adone.I.datetime.Datetime; export function transform(obj: any): boolean; @@ -498,17 +500,17 @@ declare namespace adone { /** * Checks whether the given object is an array buffer */ - export function arrayBuffer(obj: any): boolean; + export function arrayBuffer(obj: any): obj is ArrayBuffer; /** * Checks whether the given object is an array buffer view */ - export function arrayBufferView(obj: any): boolean; + export function arrayBufferView(obj: any): obj is ArrayBufferView; /** * Checks whether the given object is a date */ - export function date(obj: any): boolean; + export function date(obj: any): obj is Date; /** * Checks whether the given object is an error, instance of Error @@ -518,27 +520,22 @@ declare namespace adone { /** * Checks whether the given object is a map */ - export function map(obj: any): boolean; + export function map(obj: any): obj is Map; /** * Checks whether the given object is a regexp */ - export function regexp(obj: any): boolean; + export function regexp(obj: any): obj is RegExp; /** * Checks whether the given object is a set */ - export function set(obj: any): boolean; + export function set(obj: any): obj is Set; /** * Checks whether the given object is a symbol */ - export function symbol(obj: any): boolean; - - /** - * Checks whether the given buffer a valid UTF-8 encoded text - */ - export function validUTF8(obj: Buffer): boolean; + export function symbol(obj: any): obj is symbol; /** * Checks whether the given object is a vault valuable @@ -549,5 +546,135 @@ declare namespace adone { * Checks whether the given object is an adone task */ export function task(obj: any): boolean; + + namespace I { + interface FQDNOptions { + /** + * Whether to require top-level domain, default `true` + */ + requireTld?: boolean; + + /** + * Whether to allow underscores("_"), default `false` + */ + allowUnderscores?: boolean; + + /** + * Whether to allow trailing dot, default `false` + */ + allowTrailingDot?: boolean; + } + } + + /** + * Checks whether the given object(string) is a fully qualified domain name (e.g. domain.com). + */ + export function fqdn(obj: any, options?: I.FQDNOptions): obj is string; + + /** + * Checks whether the given object(string) is a url + */ + export function url(obj: any, options?: I.FQDNOptions & { + /** + * List of valid protocols. + * Used when requireValidProtocol is `true`. + * Default ["http", "https", "ftp"] + */ + protocols?: string[], + + /** + * Whether to require protocol, default `true` + */ + requireProtocol?: boolean, + + /** + * Whether to require host, default `true` + */ + requireHost?: boolean, + + /** + * Whether to require valid protocol defined in `protocols` options, default `true` + */ + requireValidProtocol?: boolean, + + /** + * Whether to allow urls like "//example.com", default `false` + */ + allowProtocolRelativeUrls?: boolean + }): obj is string; + + /** + * Checks whether the given object(string) is a valid email address + */ + export function email(obj: any, options?: { + /** + * Whether to allow email addresses with display names ("Name "") + */ + allowDisplayName?: boolean, + + /** + * Whether to require display name + */ + requireDisplayName?: boolean, + + /** + * Whether to allow UTF8 characters in the local part + */ + allowUtf8LocalPart?: boolean, + + /** + * Whether to require top-level domain, default `true` + */ + requireTld?: boolean + }): obj is string; + + /** + * Checks whether the given object is a valid IPv4 address + */ + export function ip(obj: any, version: 4): boolean; + + /** + * Checks whether the given object is a valid IPv6 address + */ + export function ip(obj: any, version: 6): boolean; + + /** + * Checks whether the given object in a valid IPv4 or IPv6 address + */ + export function ip(obj: any): boolean; + + /** + * Checks whether the given object is a valid UUIDv1 identifier + */ + export function uuid(obj: any, version: 1): obj is string; + + /** + * Checks whether the given object is a valid UUIDv2 identifier + */ + export function uuid(obj: any, version: 2): obj is string; + + /** + * Checks whether the given object is a valid UUIDv3 identifier + */ + export function uuid(obj: any, version: 3): obj is string; + + /** + * Checks whether the given object is a valid UUIDv4 identifier + */ + export function uuid(obj: any, version: 4): obj is string; + + /** + * Checks whether the given object is a valid UUIDv5 identifier + */ + export function uuid(obj: any, version: 5): obj is string; + + /** + * Checks whether the given object is a valid UUID identifier (v1, v2, v3, v4 or v5) + */ + export function uuid(obj: any, version?: "all"): obj is string; + + export function emitter(obj: any): obj is event.Emitter; + + export function asyncEmitter(obj: any): obj is event.AsyncEmitter; } } diff --git a/types/adone/glosses/meta.d.ts b/types/adone/glosses/meta.d.ts new file mode 100644 index 0000000000..bc96c1e148 --- /dev/null +++ b/types/adone/glosses/meta.d.ts @@ -0,0 +1,13 @@ +declare namespace adone { + namespace meta { + namespace I { + type PossibleTypes = "object" | "class" | "null" | "global" | "Array" | "RegExp" | "Date" + | "Promise" | "Set" | "Map" | "WeakSet" | "DataView" | "Map Iterator" | "Set Iterator" + | "Array Iterator" | "String Iterator" | "Object" | "function" | "boolean" | "number" + | "undefined" | "string" | "symbol"; + } + + function typeOf(obj: any): I.PossibleTypes; + function typeOf(obj: any): string; + } +} diff --git a/types/adone/glosses/promise.d.ts b/types/adone/glosses/promise.d.ts index cdfe0ec2f5..cc0eac9c73 100644 --- a/types/adone/glosses/promise.d.ts +++ b/types/adone/glosses/promise.d.ts @@ -125,5 +125,36 @@ declare namespace adone { */ function _finally(promise: Promise, onFinally?: (...args: any[]) => void): Promise; export { _finally as finally }; + + namespace I { + type ResolvableProps = object & {[K in keyof T]: PromiseLike | T[K]}; + } + + /** + * Returns a promise that is fulfilled when all the object's values are fulfilled + */ + export function props(obj: I.ResolvableProps): Promise; + + namespace I { + interface _RetryOptions { + max: number; + + timeout: number; + + match: (string | RegExp | Error) | Array; + + backOffBase: number; + + backOffExponent: number; + + report: (message: string, options: _RetryOptions, err: any) => void; + + name: string; + } + + type RetryOptions = Partial<_RetryOptions>; + } + + export function retry(fn: (info: { current: number }) => PromiseLike | T, options?: number | I.RetryOptions): Promise; } } diff --git a/types/adone/glosses/shani.d.ts b/types/adone/glosses/shani.d.ts index 0b79633f78..5bc2d0153f 100644 --- a/types/adone/glosses/shani.d.ts +++ b/types/adone/glosses/shani.d.ts @@ -94,6 +94,11 @@ declare namespace adone { * Mark this block as exclusive */ skip: DescribeFunction; + + /** + * Mark this block as todo + */ + todo: DescribeFunction; } interface TestOptions { @@ -146,6 +151,11 @@ declare namespace adone { * Mark this test as exclusive */ skip: TestFunction; + + /** + * Mark this test as todo + */ + todo: TestFunction; } interface HookRuntimeContext { @@ -172,7 +182,7 @@ declare namespace adone { | "end before each hook" | "end after each hook" | "end before test hook" | "end after test hook"; - interface Emitter extends event.EventEmitter { + interface Emitter extends event.Emitter { on(event: "enter block", listener: (event: { block: Block }) => void): this; on(event: "exit block", listener: (event: { block: Block }) => void): this; on(event: "start test", listener: (event: { block: Block, test: Test }) => void): this; @@ -267,6 +277,11 @@ declare namespace adone { */ only(): this; + /** + * Marks this test as todo + */ + todo(): this; + /** * Returns the timeout of the test */ @@ -355,6 +370,11 @@ declare namespace adone { */ only(): this; + /** + * Marks this block as todo + */ + todo(): this; + /** * Returns the timeout of the block */ @@ -1423,7 +1443,7 @@ declare namespace adone { /** * Requires the value to be of the given type */ - typeOf(type: adone.util.I.PossibleTypes): Matcher; + typeOf(type: adone.meta.I.PossibleTypes): Matcher; typeOf(type: string): Matcher; /** diff --git a/types/adone/glosses/std.d.ts b/types/adone/glosses/std.d.ts index ec4bc4c37a..58be35f3b5 100644 --- a/types/adone/glosses/std.d.ts +++ b/types/adone/glosses/std.d.ts @@ -1,4 +1,4 @@ -import * as assert from "assert"; +import assert = require("assert"); import * as fs from "fs"; import * as path from "path"; import * as util from "util"; diff --git a/types/adone/glosses/streams.d.ts b/types/adone/glosses/streams.d.ts index 012a6aadc3..e4d07065b6 100644 --- a/types/adone/glosses/streams.d.ts +++ b/types/adone/glosses/streams.d.ts @@ -1,223 +1,225 @@ declare namespace adone { namespace stream { - namespace I.CoreStream { - interface ConstructorOptions { - /** - * Whether the initial stream is asynchronous - */ - async?: boolean; + namespace core { + namespace I { + interface ConstructorOptions { + /** + * Whether the initial stream is asynchronous + */ + async?: boolean; - /** - * Whether the initial stream is synchronous - */ - sync?: boolean; + /** + * Whether the initial stream is synchronous + */ + sync?: boolean; - /** - * The initial transform (passthrough is default) - */ - transform?: TransformFunction; + /** + * The initial transform (passthrough is default) + */ + transform?: TransformFunction; - /** - * The initial flush function - */ - flush?: FlushFunction; + /** + * The initial flush function + */ + flush?: FlushFunction; + } + + type Source = S[] | Stream; + + interface TransformContext { + /** + * Pushes the given value into the stream + */ + push(value: T): boolean; + } + + type TransformFunction = (this: TransformContext, value: S) => void; + type FlushFunction = (this: TransformContext) => void; } - type Source = S[] | CoreStream; + /** + * Represents a chain of transform streams + */ + class Stream implements PromiseLike { + constructor(source?: I.Source, options?: I.ConstructorOptions); + + /** + * Writes the given value into the stream + */ + write(value: S): boolean; - interface TransformContext { /** * Pushes the given value into the stream */ push(value: T): boolean; + + /** + * Ends the stream + */ + end(): this; + + /** + * Destroys the stream + */ + destroy(): this; + + /** + * Pauses the stream + */ + pause(): this; + + /** + * Resumes the stream + */ + resume(): this; + + /** + * Whether the stream is paused + */ + isPaused(): boolean; + + /** + * Whether the stream is ended + */ + isEnded(): boolean; + + /** + * Pipes this stream to another + */ + pipe(stream: T, options?: { end?: boolean }): T; + + /** + * Adds a new synchronous transform stream into the chain + */ + throughSync(transform: I.TransformFunction, flush?: I.FlushFunction): Stream; + + /** + * Adds a new asynchronous transform stream into the chain + */ + throughAsync(transform: I.TransformFunction, flush?: I.FlushFunction): Stream; + + /** + * Adds a new transform stream into the chain + */ + through(transform: I.TransformFunction, flush?: I.FlushFunction): Stream; + + /** + * Adds a new map transform into the chain. + * + * Note: synchronous functions create a synchronous transform. + * If your function returns a promise use an asynchronous function if you don't want to pass a promise through the stream + */ + map(callback: (value: T) => R | Promise): Stream; + + /** + * Adds a new conditional map transform into the chain + */ + mapIf(condition: (value: T) => boolean | Promise, callback: (value: T) => R): Stream; + + /** + * Adds a new filter transform into the chain + */ + filter(callback: (value: T) => boolean | Promise): this; + + /** + * Adds a new transform that calls the given callback for each value from the stream. + * + * This method resumes the stream. + */ + forEach(callback: (value: T) => void, options?: { + /** + * Whethe to wait for asynchronous functions (await) + */ + wait?: boolean, + + /** + * Passthrough the read values, by default it eats everything + */ + passthrough?: boolean + }): this; + + /** + * Adds a new transform that calls the given callback when the underlying stream ends. + * + * This method resumes the stream. + */ + done(callback: () => void, options?: { + /** + * Passthrough the read values, by default it eats everything + */ + passthrough?: boolean + }): this; + + /** + * Adds a new transform that gather all the read values into an array and calls the given callback + * when the underlying stream ends. + * + * This method resumes the stream. + */ + toArray(callback: (result: T[]) => void, options?: { + /** + * Passthrough the read values, by default it eats everything + */ + passthrough?: boolean + }): this; + + /** + * Adds a new transform that filters the values by their uniqueness + * + * @param prop callback that calculates value's hash which is used in uniqueness checks + */ + unique(prop?: (value: T) => any): this; + + /** + * Adds a new transform that filters the values using the given given function with ability to restore the filtered values + */ + stash(name: string, filter: (value: T) => boolean): this; + stash(filter: (value: T) => boolean): this; + + /** + * Adds a new transform that restores the previous stashed values + */ + unstash(name?: string): Stream; // ?? + + /** + * Flattens all the read array values + */ + flatten(): Stream; // ?? + + /** + * Merges the given stream into a core stream + */ + static merge(streams: Array | nodestd.stream.Transform | nodestd.stream.Readable | nodestd.stream.Duplex>, options?: { + /** + * Whether to end the stream when all the given streams end + */ + end?: boolean, + + /** + * Options for the initial core stream + */ + sourceOptions?: I.ConstructorOptions + }): Stream; + + /** + * Creates a promise that will be fulfilled with an array of all the emitted values or the first occurred error. + * + * This method resumes the stream. + */ + then(onResolve?: (value: T[]) => T1 | PromiseLike, onReject?: (reason: any) => T2 | PromiseLike): Promise; + + /** + * Creates a promise that will be fulfilled with an array of all the emitted values or the first occurred error. + * + * This method resumes the stream. + */ + catch(onReject?: (reason: any) => T1 | PromiseLike): Promise; } - type TransformFunction = (this: TransformContext, value: S) => void; - type FlushFunction = (this: TransformContext) => void; + /** + * Creates a CoreStream instance + */ + function create(source?: I.Source, options?: I.ConstructorOptions): Stream; } - - /** - * Represents a chain of transform streams - */ - class CoreStream implements PromiseLike { - constructor(source?: I.CoreStream.Source, options?: I.CoreStream.ConstructorOptions); - - /** - * Writes the given value into the stream - */ - write(value: S): boolean; - - /** - * Pushes the given value into the stream - */ - push(value: T): boolean; - - /** - * Ends the stream - */ - end(): this; - - /** - * Destroys the stream - */ - destroy(): this; - - /** - * Pauses the stream - */ - pause(): this; - - /** - * Resumes the stream - */ - resume(): this; - - /** - * Whether the stream is paused - */ - isPaused(): boolean; - - /** - * Whether the stream is ended - */ - isEnded(): boolean; - - /** - * Pipes this stream to another - */ - pipe(stream: T, options?: { end?: boolean }): T; - - /** - * Adds a new synchronous transform stream into the chain - */ - throughSync(transform: I.CoreStream.TransformFunction, flush?: I.CoreStream.FlushFunction): CoreStream; - - /** - * Adds a new asynchronous transform stream into the chain - */ - throughAsync(transform: I.CoreStream.TransformFunction, flush?: I.CoreStream.FlushFunction): CoreStream; - - /** - * Adds a new transform stream into the chain - */ - through(transform: I.CoreStream.TransformFunction, flush?: I.CoreStream.FlushFunction): CoreStream; - - /** - * Adds a new map transform into the chain. - * - * Note: synchronous functions create a synchronous transform. - * If your function returns a promise use an asynchronous function if you don't want to pass a promise through the stream - */ - map(callback: (value: T) => R | Promise): CoreStream; - - /** - * Adds a new conditional map transform into the chain - */ - mapIf(condition: (value: T) => boolean | Promise, callback: (value: T) => R): CoreStream; - - /** - * Adds a new filter transform into the chain - */ - filter(callback: (value: T) => boolean | Promise): this; - - /** - * Adds a new transform that calls the given callback for each value from the stream. - * - * This method resumes the stream. - */ - forEach(callback: (value: T) => void, options?: { - /** - * Whethe to wait for asynchronous functions (await) - */ - wait?: boolean, - - /** - * Passthrough the read values, by default it eats everything - */ - passthrough?: boolean - }): this; - - /** - * Adds a new transform that calls the given callback when the underlying stream ends. - * - * This method resumes the stream. - */ - done(callback: () => void, options?: { - /** - * Passthrough the read values, by default it eats everything - */ - passthrough?: boolean - }): this; - - /** - * Adds a new transform that gather all the read values into an array and calls the given callback - * when the underlying stream ends. - * - * This method resumes the stream. - */ - toArray(callback: (result: T[]) => void, options?: { - /** - * Passthrough the read values, by default it eats everything - */ - passthrough?: boolean - }): this; - - /** - * Adds a new transform that filters the values by their uniqueness - * - * @param prop callback that calculates value's hash which is used in uniqueness checks - */ - unique(prop?: (value: T) => any): this; - - /** - * Adds a new transform that filters the values using the given given function with ability to restore the filtered values - */ - stash(name: string, filter: (value: T) => boolean): this; - stash(filter: (value: T) => boolean): this; - - /** - * Adds a new transform that restores the previous stashed values - */ - unstash(name?: string): CoreStream; // ?? - - /** - * Flattens all the read array values - */ - flatten(): CoreStream; // ?? - - /** - * Merges the given stream into a core stream - */ - static merge(streams: Array | nodestd.stream.Transform | nodestd.stream.Readable | nodestd.stream.Duplex>, options?: { - /** - * Whether to end the stream when all the given streams end - */ - end?: boolean, - - /** - * Options for the initial core stream - */ - sourceOptions?: I.CoreStream.ConstructorOptions - }): CoreStream; - - /** - * Creates a promise that will be fulfilled with an array of all the emitted values or the first occurred error. - * - * This method resumes the stream. - */ - then(onResolve?: (value: T[]) => T1 | PromiseLike, onReject?: (reason: any) => T2 | PromiseLike): Promise; - - /** - * Creates a promise that will be fulfilled with an array of all the emitted values or the first occurred error. - * - * This method resumes the stream. - */ - catch(onReject?: (reason: any) => T1 | PromiseLike): Promise; - } - - /** - * Creates a CoreStream instance - */ - function core(source?: I.CoreStream.Source, options?: I.CoreStream.ConstructorOptions): CoreStream; } } diff --git a/types/adone/glosses/utils.d.ts b/types/adone/glosses/utils.d.ts index 6a05273ffd..480c2354ce 100644 --- a/types/adone/glosses/utils.d.ts +++ b/types/adone/glosses/utils.d.ts @@ -16,10 +16,6 @@ declare namespace adone { function functionName(fn: (...args: any[]) => any): string; - function mapArguments(argmap: (...args: any[]) => any): (...args: any[]) => any; - function mapArguments(argmap: number): (...args: T[]) => T[]; - function mapArguments(...args: any[]): (x: T) => T; - namespace I { interface ParseMsResult { days: number; @@ -33,8 +29,6 @@ declare namespace adone { function pluralizeWord(str: string, plural?: string, count?: number): string; - function functionParams(func: (...args: any[]) => any): string[]; - function randomChoice(arrayLike: ArrayLike, from?: number, to?: number): T; function shuffleArray(array: T[]): T[]; @@ -70,19 +64,8 @@ declare namespace adone { function globParent(str: string): string; - namespace I { - interface ByResult { - (a: S, b: S): R; - compare(a: T, b: T): R; - by(a: S): T; - } - } - function by(by: (a: S) => T, compare?: (a: T, b: T) => R): I.ByResult; - function toFastProperties(object: object): object; - function stripBom(x: string): string; - namespace I { interface SortKeysOptions { deep?: boolean; @@ -118,12 +101,42 @@ declare namespace adone { namespace I { interface CloneOptions { + /** + * Clone recursively + * + * `true` by default + */ deep?: boolean; + + /** + * Clone non-plain object, they will be plain objects + * + * `false` by default + */ + nonPlainObjects?: boolean; + + /** + * Clone only enumerable properties + * + * `true` by default + */ + onlyEnumerable?: boolean; } } - function clone(object: object, options?: I.CloneOptions): object; - function toUTF8Array(str: string): number[]; + class Cloner { + /** + * Clones the given object + */ + clone(obj: any, options?: I.CloneOptions): any; + + /** + * Returns a clone function that is binded to this cloner + */ + binding(): (obj: any, options?: I.CloneOptions) => any; + } + + function clone(object: any, options?: I.CloneOptions): any; function asyncIter(array: T[], iter: (elem: T, index: number, cb: () => void) => any, cb: () => void): void; @@ -150,20 +163,31 @@ declare namespace adone { function assignDeep(target: T, ...sources: object[]): T; namespace I { - interface MatchOptions { + interface MatchPathOptions { index?: boolean; start?: number; end?: number; dot?: boolean; } } - function match(criteria: any, options?: I.MatchOptions): (value: any, options?: I.MatchOptions) => number | boolean; - function match(criteria: any, value: any, options?: I.MatchOptions): number | boolean; + function matchPath(criteria: any, options?: I.MatchPathOptions): (value: any, options?: I.MatchPathOptions) => number | boolean; + function matchPath(criteria: any, value: any, options?: I.MatchPathOptions): number | boolean; namespace I { + class Sorter { + edges: string[]; + + add(item: string, deps: string | string[]): void; + + sort(): string[]; + + clear(): void; + } + interface ToposortFunction { - (edges: Array<[T, T]>): T[]; - array(nodes: T[], edges: Array<[T, T]>): T[]; + (edges: Array<[string, string]>): string[]; + array(nodes: string[], edges: Array<[string, string]>): string[]; + Sorter: typeof Sorter; } } const toposort: I.ToposortFunction; @@ -188,16 +212,6 @@ declare namespace adone { } function jsesc(argument: any, options?: I.JSEscOptions): string; - namespace I { - type PossibleTypes = "object" | "class" | "null" | "global" | "Array" | "RegExp" | "Date" - | "Promise" | "Set" | "Map" | "WeakSet" | "DataView" | "Map Iterator" | "Set Iterator" - | "Array Iterator" | "String Iterator" | "Object" | "function" | "boolean" | "number" - | "undefined" | "string" | "symbol"; - } - - function typeOf(obj: any): I.PossibleTypes; - function typeOf(obj: any): string; - namespace memcpy { function utou(target: Buffer, targetOffset: number, source: Buffer, sourceStart: number, sourceEnd: number): number; function atoa(target: ArrayBuffer, targetOffset: number, source: ArrayBuffer, sourceStart: number, sourceEnd: number): number; @@ -217,12 +231,12 @@ declare namespace adone { function v1(options?: I.V1Options): string; function v1(options: I.V1Options, buf: any[], offset?: number): number[]; - function v4(options?: any): string; - function v4(options: any, buf: any[], offset?: number): number[]; - function v3(name: string | number[], namespace: string | number[]): string; function v3(name: string | number[], namespace: string | number[], buf: any[], offset?: number): number[]; + function v4(options?: any): string; + function v4(options: any, buf: any[], offset?: number): number[]; + function v5(name: string | number[], namespace: string | number[]): string; function v5(name: string | number[], namespace: string | number[], buf: any[], offset?: number): number[]; } @@ -237,40 +251,6 @@ declare namespace adone { } function delegate(object: object, property: string): I.Delegator; - namespace I { - interface GlobExpOptions { - nocomment?: boolean; - nonegate?: boolean; - nobrace?: boolean; - noglobstar?: boolean; - nocase?: boolean; - dot?: boolean; - noext?: boolean; - matchBase?: boolean; - flipNegate?: boolean; - } - } - - class GlobExp { - constructor(pattern: string, options?: I.GlobExpOptions); - - hasMagic(): boolean; - - static hasMagic(pattern: string, options?: I.GlobExpOptions): boolean; - - expandBraces(): string[]; - - static expandBraces(pattern: string, options?: I.GlobExpOptions): string[]; - - makeRe(): RegExp; - - static makeRe(pattern: string, options?: I.GlobExpOptions): RegExp; - - static test(p: string, pattern: string, options?: I.GlobExpOptions): boolean; - - test(p: string): boolean; - } - namespace iconv { // TODO: need to normalize source code } @@ -278,9 +258,6 @@ declare namespace adone { namespace sqlstring { function escapeId(val: string | string[], forbidQualified?: boolean): string; function dateToString(date: any, timeZone?: string): string; - function arrayToList(array: any[]): string; - function bufferToString(buffer: Buffer): string; - function objectToValues(object: object, timeZone?: string): string; function escape(value: any, stringifyObjects?: boolean, timeZone?: string): string; function format(sql: string, values?: any, stringifyObjects?: boolean, timeZone?: string): string; } @@ -316,49 +293,71 @@ declare namespace adone { } const binarySearch: I.BinarySearchFunction; + /** + * buffer tools + */ namespace buffer { - function concat(list: Buffer[], totalLength: number): Buffer; - function mask(buffer: Buffer, mask: Buffer, output: Buffer, offset: number, length: number): void; - function unmask(buffer: Buffer, mask: Buffer): void; + /** + * Converts the given Buffer to ArrayBuffer + */ + function toArrayBuffer(buf: Buffer): ArrayBuffer; + + /** + * Returns a new buffer that represents a^b + * + * If the lengths are not equal, it assumes missing bytes as 0x00 + * + * @param length length of the result buffer. max(a.length, b.length) by default + */ + function xor(a: Buffer, b: Buffer, length?: number): Buffer; } function shebang(str: string): string | null; - class ReInterval { - constructor(callback: (...args: any[]) => void, interval: number, args?: any[]); - - reschedule(interval: number): void; - - clear(): void; - - destroy(): void; - } - - class RateLimiter { - constructor(tokensPerInterval?: number, interval?: number, fireImmediately?: boolean); - - removeTokens(count: number): Promise; - - tryRemoveTokens(count: number): boolean; - - getTokensRemaining(): number; - } - namespace I { - interface ThrottleOptions { - max?: number; - interval?: number; - ordered?: boolean; - waitForReturn?: boolean; + interface ReInterval { + reschedule(interval: number): void; + + clear(): void; + + destroy(): void; } } - function throttle(fn: () => R, options?: I.ThrottleOptions): () => Promise; - function throttle(fn: (a: T1) => R, options?: I.ThrottleOptions): (a: T1) => Promise; - function throttle(fn: (a: T1, b: T2) => R, options?: I.ThrottleOptions): (a: T1, b: T2) => Promise; - function throttle(fn: (a: T1, b: T2, c: T3) => R, options?: I.ThrottleOptions): (a: T1, b: T2, c: T3) => Promise; - function throttle(fn: (a: T1, b: T2, c: T3, d: T4) => R, options?: I.ThrottleOptions): (a: T1, b: T2, c: T3, d: T4) => Promise; - function throttle(fn: (a: T1, b: T2, c: T3, d: T4, e: T5) => R, options?: I.ThrottleOptions): (a: T1, b: T2, c: T3, d: T4, e: T5) => Promise; - function throttle(fn: (...args: any[]) => R, options?: I.ThrottleOptions): (...args: any[]) => Promise; + + function reinterval(callback: (...args: any[]) => void, interval: number, args?: any[]): I.ReInterval; + + namespace throttle { + namespace I { + interface Options { + max?: number; + interval?: number; + ordered?: boolean; + waitForReturn?: boolean; + onDone?: () => void; + drop?: boolean; + dropLast?: boolean; + } + } + function create(fn: () => R, options?: I.Options): () => Promise; + function create(fn: (a: T1) => R, options?: I.Options): (a: T1) => Promise; + function create(fn: (a: T1, b: T2) => R, options?: I.Options): (a: T1, b: T2) => Promise; + function create(fn: (a: T1, b: T2, c: T3) => R, options?: I.Options): (a: T1, b: T2, c: T3) => Promise; + function create(fn: (a: T1, b: T2, c: T3, d: T4) => R, options?: I.Options): (a: T1, b: T2, c: T3, d: T4) => Promise; + function create(fn: (a: T1, b: T2, c: T3, d: T4, e: T5) => R, options?: I.Options): (a: T1, b: T2, c: T3, d: T4, e: T5) => Promise; + function create(fn: (...args: any[]) => R, options?: I.Options): (...args: any[]) => Promise; + + class RateLimiter { + constructor(tokensPerInterval?: number, interval?: number, fireImmediately?: boolean); + + removeTokens(count: number): Promise; + + tryRemoveTokens(count: number): boolean; + + getTokensRemaining(): number; + } + + const DROPPED: symbol; + } namespace I.fakeClock { interface Timer { @@ -475,36 +474,6 @@ declare namespace adone { function lowerBoundKey(range: I.Range): T | undefined; } - /** - * Utils for uid/gid - */ - namespace userid { - /** - * Returns uid by the given username - */ - function uid(username: string): { uid: number, gid: number }; - - /** - * Returns gid by the given groupname - */ - function gid(groupname: string): number; - - /** - * Returns username by the given uid - */ - function username(uid: number): string; - - /** - * Returns groupname by the given gid - */ - function groupname(gid: number): string; - - /** - * Returns gids the given user belongs - */ - function gids(username: string): number[]; - } - /** * Represents a log file rotator */ @@ -572,5 +541,598 @@ declare namespace adone { function debounce(fn: (a: T1, b: T2, c: T3, d: T4) => R, timeout: number, options?: I.DebounceOptions): (a: T1, b: T2, c: T3, d: T4) => R; function debounce(fn: (a: T1, b: T2, c: T3, d: T4, e: T5) => R, timeout: number, options?: I.DebounceOptions): (a: T1, b: T2, c: T3, d: T4, e: T5) => R; function debounce(fn: (...args: any[]) => R, timeout: number, options?: I.DebounceOptions): (...args: any[]) => R; + + /** + * Finds difference between the given arrays + */ + function arrayDiff(...arrays: T[][]): T[]; + + namespace I { + type FillRangeTransform = () => void; + + interface FillRangeOptions { + /** + * The increment to use for the range. Can be used with letters or numbers + */ + step?: number; + + /** + * By default, null is returned when an invalid range is passed. + * Enable this option to throw a RangeError on invalid ranges + * + * false by default + */ + strictRanges?: boolean; + + /** + * Cast all returned values to strings. + * + * By default, integers are returned as numbers. + */ + stringify?: boolean; + + /** + * Create a regex-compatible source string, instead of expanding values to an array. + * + * false by default + */ + toRegex?: boolean; + + /** + * Customize each value in the returned array (or string) + */ + transform?: FillRangeTransform; + } + } + + /** + * Expands numbers and letters + */ + function fillRange(from: number, to: number, options: I.FillRangeOptions & { toRegex: true }): string; + function fillRange(from: number, to: number, options: I.FillRangeOptions & { stringify: true }): string[]; + function fillRange(from: number, to: number, options?: I.FillRangeOptions): number[]; + + function fillRange(from: string, to: string, options: I.FillRangeOptions & { toRegex: true }): string; + function fillRange(from: string, to: string, options?: I.FillRangeOptions): string[]; + + function fillRange(from: string | number, to: string | number, options: I.FillRangeOptions & { toRegex: true }): string; + function fillRange(from: string | number, to: string | number, options?: I.FillRangeOptions): Array; + + namespace inflection { + function singularizeWord(str: string, singular?: string): string; + function pluralizeWord(str: string, plural?: string): string; + function underscore(str: string, allUpperCase?: boolean): string; + } + + function machineId(original?: boolean): Promise; + + namespace I { + interface MergeOptions { + plainObjects?: boolean; + allowPrototypes?: boolean; + } + } + + function merge(target: any, source: any, options?: I.MergeOptions): any; + + function omit(obj: any, props: ((v: string) => boolean) | string[] | string): object; + + function parseTime(val: number): number; + function parseTime(val: any): number | null; + + function pick(obj: any, props: Iterable): object; + + // pool: TODO + + namespace querystring { + function escape(str: string): string; + + const formats: { + RFC1738: "RFC1738" + RFC3986: "RFC3986", + default: string, + formatters: { + RFC1738(val: string): string, + RFC3986(val: string): string + } + }; + + namespace I { + interface ParseOptions { + ignoreQueryPrefix?: boolean; + delimiter?: string; + depth?: number; + arrayLimit?: number; + parseArrays?: boolean; + decoder?: (str: string, defaultDecoder: (str: string) => string) => string; + allowDots?: boolean; + plainObjects?: boolean; + allowPrototypes?: boolean; + parameterLimit?: number; + strictNullHandling?: boolean; + } + + interface StringifyOptions { + delimiter?: string; + strictNullHandling?: boolean; + skipNulls?: boolean; + encode?: boolean; + encoder?: (str: string) => any; + filter?: Array | ((prefix: string, value: any) => any); + arrayFormat?: "indices" | "brackets" | "repeat"; + indices?: boolean; + sort?: (a: any, b: any) => number; + serializeDate?: (d: Date) => string; + format?: "RFC1738" | "RFC3986"; + encodeValuesOnly?: boolean; + addQueryPrefix?: boolean; + allowDots?: boolean; + } + } + + function parse(str: string, options?: I.ParseOptions): any; + + function stringify(obj: any, options?: I.StringifyOptions): string; + + function unescape(str: string): string; + } + + namespace I { + interface RegexNotOptions { + contains?: boolean; + } + } + + function regexNot(pattern: string, options?: I.RegexNotOptions): RegExp; + + function repeat(item: T, n: number): T[]; + + // retry: TODO + + function signalNameToCode(signame: string): number; + + function splitBuffer(buf: string | Buffer, splitBuf: string | Buffer, includeDelim?: boolean): Buffer[]; + + namespace I { + type SplitStringSplitFunction = (token: { + val: string; + idx: number; + arr: string[]; + str: string; + }) => void; + + interface SplitStringOptions { + braces?: object | boolean; + keepEscaping?: boolean; + keepQuotes?: boolean; + keepDoubleQuotes?: boolean; + keepSingleQuotes?: boolean; + separator?: string; + split?: SplitStringSplitFunction; + } + } + + function splitString(str: string): string[]; + function splitString(str: string, options: I.SplitStringOptions): string[]; + function splitString(str: string, splitter: I.SplitStringSplitFunction): string[]; + function splitString(str: string, options: I.SplitStringOptions, splitter: I.SplitStringSplitFunction): string[]; + + // terraformer: TODO + + namespace I { + interface ToRegexOptions { + contains?: boolean; + negate?: boolean; + nocase?: boolean; + flags?: string; + cache?: boolean; + } + } + + function toRegex(patterns: string | string[], options?: I.ToRegexOptions): RegExp; + + namespace I { + interface ToRegexRangeOptions { + capture?: boolean; + shorthand?: boolean; + relaxZeros?: boolean; + } + } + + function toRegexRange(min: string | number, max: string | number, options?: I.ToRegexRangeOptions): RegExp; + + namespace xorDistance { + function compare(a: Buffer, b: Buffer): boolean; + + function create(a: Buffer, b: Buffer): Buffer; + + function gt(a: Buffer, b: Buffer): boolean; + + function lt(a: Buffer, b: Buffer): boolean; + + function eq(a: Buffer, b: Buffer): boolean; + } + + namespace I { + interface BracesOptions { + /** + * Generate an "expanded" brace pattern (this option is unncessary with the `.expand` method, which does the same thing). + * + * @default undefined + */ + expand?: boolean; + + /** + * Enabled by default. + * + * @default true + */ + optimize?: boolean; + + /** + * Duplicates are removed by default. To keep duplicates, pass `{nodupes: false}` on the options + * + * @default true + */ + nodupes?: boolean; + + /** + * When `braces.expand()` is used, or `options.expand` is true, brace patterns will automatically be [optimized](#optionsoptimize) + * when the difference between the range minimum and range maximum exceeds the `rangeLimit`. + * This is to prevent huge ranges from freezing your application. + * + * You can set this to any number, or change `options.rangeLimit` to `Inifinity` to disable this altogether. + * + * @default 250 + */ + rangeLimit?: number; + + /** + * Customize range expansion. + * + * @default undefined + */ + transform?: (str: string) => string; + + /** + * In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times. + * + * Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists) + * + * The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) + * are defined in the given pattern, and not to try to expand them as lists. + * + * @default undefined + */ + quantifiers?: boolean; + + /** + * Strip backslashes that were used for escaping from the result. + * + * @default undefined + */ + unescape?: boolean; + } + interface BracesFunction { + (pattern: string, options?: BracesOptions): string[]; + expand(pattern: string, options?: BracesOptions): string[]; + MAX_LENGTH: number; + clearCache(): void; + resizeCache(newSize: number): void; + getCache(): object; // TODO + makeRe(pattern: string, options?: BracesOptions): RegExp; + } + } + + const braces: I.BracesFunction; + + namespace I { + interface MatchOptions { + /** + * Allow glob patterns without slashes to match a file path based on its basename. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `matchBase`. + * + * @default false + */ + basename?: boolean; + + /** + * Enabled by default, this option enforces bash-like behavior with stars immediately following a bracket expression. + * Bash bracket expressions are similar to regex character classes, but unlike regex, a star following a bracket expression **does not repeat the bracketed characters**. + * Instead, the star is treated the same as an other star. + * + * @default true + */ + bash?: boolean; + + /** + * Disable regex and function memoization. + * + * @default undefined + */ + cache?: boolean; + + /** + * Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `dot`. + * + * @default false + */ + dot?: boolean; + + /** + * Similar to the `--failglob` behavior in Bash, throws an error when no matches are found. + * + * @default undefined + */ + failglob?: boolean; + + /** + * String or array of glob patterns to match files to ignore. + * + * @default undefined + */ + ignore?: string | string[]; + + /** + * Alias for [options.basename](#options-basename). + */ + matchBase?: boolean; + + /** + * Disable expansion of brace patterns. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nobrace`. + * + * @default undefined + */ + nobrace?: boolean; + + /** + * Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + * + * @default undefined + */ + nocase?: boolean; + + /** + * Remove duplicate elements from the result array. + * + * @default undefined + */ + nodupes?: boolean; + + /** + * Disable extglob support, so that extglobs are regarded as literal characters. + * + * @default undefined + */ + noext?: boolean; + + /** + * Disallow negation (`!`) patterns, and treat leading `!` as a literal character to match. + * + * @default undefined + */ + nonegate?: boolean; + + /** + * Disable matching with globstars (`**`). + * + * @default undefined + */ + noglobstar?: boolean; + + /** + * Alias for [options.nullglob](#options-nullglob). + */ + nonull?: boolean; + + /** + * If `true`, when no matches are found the actual (arrayified) glob pattern is returned instead of an empty array. + * Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nonull`. + * + * @default undefined + */ + nullglob?: boolean; + + /** + * Pass your own instance of [snapdragon](https://github.com/jonschlinkert/snapdragon), to customize parsers or compilers. + * + * @default undefined + */ + snapdragon?: object; + + /** + * Generate a source map by enabling the `sourcemap` option with the `.parse`, `.compile`, or `.create` methods. + * + * _(Note that sourcemaps are currently not enabled for brace patterns)_ + */ + sourcemap?: boolean; + + /** + * Remove backslashes from returned matches. + * + * @default undefined + */ + unescape?: boolean; + + /** + * Convert path separators on returned files to posix/unix-style forward slashes. + * + * @default true + */ + unixify?: boolean; + } + + interface MatchFunction { + /** + * The main function takes a list of strings and one or more glob patterns to use for matching. + * + * @param list A list of strings to match + * @param patterns One or more glob patterns to use for matching. + * @param options See available options for changing how matches are performed + * @returns Returns an array of matches + */ + (list: string[], patterns: string | string[], options?: MatchOptions): string[]; + + /** + * Similar to the main function, but `pattern` must be a string. + * + * @param list Array of strings to match + * @param pattern Glob pattern to use for matching. + * @param options See available options for changing how matches are performed + * @returns Returns an array of matches + */ + match(list: string[], pattern: string, options?: MatchOptions): string[]; + + /** + * Returns true if the specified `string` matches the given glob `pattern`. + * + * @param string String to match + * @param pattern Glob pattern to use for matching. + * @param options See available options for changing how matches are performed + * @returns Returns true if the string matches the glob pattern. + */ + isMatch(string: string, pattern: string, options?: MatchOptions): boolean; + + /** + * Returns true if some of the strings in the given `list` match any of the given glob `patterns`. + * + * @param list The string or array of strings to test. Returns as soon as the first match is found. + * @param patterns One or more glob patterns to use for matching. + * @param options See available options for changing how matches are performed + * @returns Returns true if any patterns match `str` + */ + some(list: string | string[], patterns: string | string[], options?: MatchOptions): boolean; + + /** + * Returns true if every string in the given `list` matches any of the given glob `patterns`. + * + * @param list The string or array of strings to test. + * @param patterns One or more glob patterns to use for matching. + * @param options See available options for changing how matches are performed + * @returns Returns true if any patterns match `str` + */ + every(list: string | string[], patterns: string | string[], options?: MatchOptions): boolean; + + /** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * @param str The string to test. + * @param patterns One or more glob patterns to use for matching. + * @param options See available options for changing how matches are performed + * @returns Returns true if any patterns match `str` + */ + any(str: string | string[], patterns: string | string[], options?: MatchOptions): boolean; + + /** + * Returns true if **all** of the given `patterns` match the specified string. + * + * @param str The string to test. + * @param patterns One or more glob patterns to use for matching. + * @param options See available options for changing how matches are performed + * @returns Returns true if any patterns match `str` + */ + all(str: string | string[], patterns: string | string[], options?: MatchOptions): boolean; + + /** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * @param list Array of strings to match. + * @param patterns One or more glob pattern to use for matching. + * @param options See available options for changing how matches are performed + * @returns Returns an array of strings that **do not match** the given patterns. + */ + not(list: string[], patterns: string | string[], options?: MatchOptions): string[]; + + /** + * Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * @param str The string to match. + * @param patterns Glob pattern to use for matching. + * @param options See available options for changing how matches are performed + * @returns Returns true if the patter matches any part of `str`. + */ + contains(str: string, patterns: string | string[], options?: MatchOptions): boolean; + + /** + * Filter the keys of the given object with the given `glob` pattern and `options`. Does not attempt to match nested keys. + * If you need this feature, use [glob-object](https://github.com/jonschlinkert/glob-object) instead. + * + * @param object The object with keys to filter. + * @param patterns One or more glob patterns to use for matching. + * @param options See available options for changing how matches are performed + * @returns Returns an object with only keys that match the given patterns. + */ + matchKeys(object: T, patterns: string | string[], options?: MatchOptions): Partial; + + /** + * Returns a memoized matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns true if the string is a match. + * + * @param pattern Glob pattern + * @param options See available options for changing how matches are performed. + * @returns Returns a matcher function. + */ + matcher(pattern: string | string[], options?: MatchOptions): (str: string) => boolean; + + /** + * Returns an array of matches captured by `pattern` in `string, or`null` if the pattern did not match. + * + * @param pattern Glob pattern to use for matching. + * @param string String to match + * @param options See available options for changing how matches are performed + * @returns Returns an array of captures if the string matches the glob pattern, otherwise `null`. + */ + capture(pattern: string, string: string, options?: MatchOptions): string[] | null; + + /** + * Create a regular expression from the given glob `pattern`. + * + * @param pattern A glob pattern to convert to regex. + * @param options See available options for changing how matches are performed. + * @returns Returns a regex created from the given pattern. + */ + makeRe(pattern: string, options?: MatchOptions): RegExp; + + /** + * Expand the given brace `pattern`. + * + * @param pattern String with brace pattern to expand. + * @param options Any options to change how expansion is performed. See the [braces](https://github.com/micromatch/braces) library for all available options. + */ + braces(pattern: string, options?: MatchOptions): string[]; + + /** + * Parses the given glob `pattern` and returns an array of abstract syntax trees (ASTs), with the compiled `output` and optional source `map` on each AST. + * + * @param pattern Glob pattern to parse and compile. + * @param options Any options to change how parsing and compiling is performed. + * @returns Returns an object with the parsed AST, compiled string and optional source map. + */ + create(pattern: string, options?: MatchOptions): object; + + /** + * Parse the given `str` with the given `options`. + * + * @returns Returns an AST + */ + parse(str: string, options?: MatchOptions): object; + + /** + * Compile the given `ast` or string with the given `options`. + * + * @returns Returns an object that has an `output` property with the compiled string. + */ + compile(ast: object | string, options?: MatchOptions): object; + + MAX_LENGTH: number; + + clearCache(): void; + + resizeCache(newSize: number): void; + + getCache(): object; // TODO + } + } + + const match: I.MatchFunction; } } diff --git a/types/adone/index.d.ts b/types/adone/index.d.ts index 74883c2185..5d22ac1bfd 100644 --- a/types/adone/index.d.ts +++ b/types/adone/index.d.ts @@ -8,16 +8,18 @@ /// /// /// -/// +/// /// /// /// /// /// +/// /// /// /// /// +/// /// /// /// diff --git a/types/adone/test/glosses/application.ts b/types/adone/test/glosses/application.ts new file mode 100644 index 0000000000..38c5b0c8ff --- /dev/null +++ b/types/adone/test/glosses/application.ts @@ -0,0 +1,1663 @@ +namespace applicationTests { + const { + CliApplication, + DApplication, + DSubsystem, + DCliCommand, + DMainCliCommand, + Subsystem, + runCli, + Application + } = adone.application; + + namespace DApplicationTests { + { + @DApplication() + class App extends CliApplication {} + } + { + @DApplication({}) + class App extends CliApplication {} + } + { + @DApplication({ + name: "hello" + }) + class App extends CliApplication {} + } + { + @DApplication({ + description: "hello" + }) + class App extends CliApplication {} + } + { + @DApplication({ + subsystems: [ + { + name: "hello", + subsystem: "a.js" + } + ] + }) + class App extends CliApplication {} + } + { + @DApplication({ + subsystems: [ + { + name: "hello", + subsystem: "a.js", + transpile: true + } + ] + }) + class App extends CliApplication {} + } + { + @DApplication({ + commandsGroups: [{ + name: "a", + description: "b" + }] + }) + class App extends CliApplication {} + } + } + + namespace DSubsystemTests { + { + @DSubsystem() + class App extends Subsystem {} + } + { + @DSubsystem({}) + class App extends Subsystem {} + } + { + @DSubsystem({ + name: "hello" + }) + class App extends Subsystem {} + } + { + @DSubsystem({ + description: "hello" + }) + class App extends Subsystem {} + } + { + @DSubsystem({ + subsystems: [ + { + name: "hello", + subsystem: "a.js" + } + ] + }) + class App extends Subsystem {} + } + { + @DSubsystem({ + subsystems: [ + { + name: "hello", + subsystem: "a.js", + transpile: true + } + ] + }) + class App extends Subsystem {} + } + { + @DSubsystem({ + commandsGroups: [{ + name: "a", + description: "b" + }] + }) + class App extends Subsystem {} + } + } + + namespace DMainCliCommandTests { + { + class App extends CliApplication { + @DMainCliCommand() + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({}) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({}) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + blindMode: true + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + description: "a" + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + match: (arg) => arg.startsWith("hello") + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + optionsGroups: [{ + description: "a", + name: "a" + }] + }) + main() {} + } + } + + namespace argumentsTests { + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: ["hello"] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: ["hello"] + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + action: "append" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + action: "count" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + action: "set" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + action: "store_const" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + action: "store_false" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + action: "store_true" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + action: "store" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + appendChoicesHelpMessage: true + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + appendDefaultMessage: false + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + default: null + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + description: "hello" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + enabled: false + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + help: "asd" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + holder: "a" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + holder: ["a"] + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + nargs: 1 + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + nargs: "*" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + nargs: "+" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + nargs: "?" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + required: false + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + type: String + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + type: (x: string, i: number) => { + return true; + } + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + type: [(x: string, i: number) => { + return true; + }] + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + type: [/^abc$/] + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + arguments: [{ + name: "hello", + verify: (args, opts) => { + return true; + } + }] + }) + main() {} + } + } + } + + namespace optionsTests { + { + class App extends CliApplication { + @DMainCliCommand({ + options: ["--hello"] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: ["hello"] + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + action: "append" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + action: "count" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + action: "set" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + action: "store_const" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + action: "store_false" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + action: "store_true" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + action: "store" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + appendChoicesHelpMessage: true + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + appendDefaultMessage: false + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + default: null + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + description: "hello" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + enabled: false + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + help: "asd" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + holder: "a" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + holder: ["a"] + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + nargs: 1 + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + nargs: "*" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + nargs: "+" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + nargs: "?" + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + required: false + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + type: String + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + type: (x: string, i: number) => { + return true; + } + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + type: [(x: string, i: number) => { + return true; + }] + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + type: [/^abc$/] + }] + }) + main() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + verify: (args, opts) => { + return true; + } + }] + }) + main() {} + } + } + } + } + + namespace DCliCommandTests { + { + class App extends CliApplication { + @DCliCommand() + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({}) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({}) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + blindMode: true + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + description: "a" + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + match: (arg) => arg.startsWith("hello") + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + optionsGroups: [{ + description: "a", + name: "a" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + name: "cmdd" + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + group: "asdasd" + }) + cmd() {} + } + } + + namespace argumentsTests { + { + class App extends CliApplication { + @DCliCommand({ + arguments: ["hello"] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: ["hello"] + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + action: "append" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + action: "count" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + action: "set" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + action: "store_const" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + action: "store_false" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + action: "store_true" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + action: "store" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + appendChoicesHelpMessage: true + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + appendDefaultMessage: false + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + default: null + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + description: "hello" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + enabled: false + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + help: "asd" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + holder: "a" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + holder: ["a"] + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + nargs: 1 + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + nargs: "*" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + nargs: "+" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + nargs: "?" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + required: false + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + type: String + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + type: (x: string, i: number) => { + return true; + } + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + type: [(x: string, i: number) => { + return true; + }] + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + type: [/^abc$/] + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + arguments: [{ + name: "hello", + verify: (args, opts) => { + return true; + } + }] + }) + cmd() {} + } + } + } + + namespace optionsTests { + { + class App extends CliApplication { + @DCliCommand({ + options: ["--hello"] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: ["hello"] + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + action: "append" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + action: "count" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + action: "set" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + action: "store_const" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + action: "store_false" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + action: "store_true" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + action: "store" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + appendChoicesHelpMessage: true + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + appendDefaultMessage: false + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + default: null + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + description: "hello" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + enabled: false + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + help: "asd" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + holder: "a" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + holder: ["a"] + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + nargs: 1 + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + nargs: "*" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + nargs: "+" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + nargs: "?" + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + required: false + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + type: String + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + type: (x: string, i: number) => { + return true; + } + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + type: [(x: string, i: number) => { + return true; + }] + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DCliCommand({ + options: [{ + name: "--hello", + type: [/^abc$/] + }] + }) + cmd() {} + } + } + { + class App extends CliApplication { + @DMainCliCommand({ + options: [{ + name: "--hello", + verify: (args, opts) => { + return true; + } + }] + }) + cmd() {} + } + } + } + } + + namespace subsystemTests { + new Subsystem().name; + new Subsystem().root; + new Subsystem().setRoot(new Subsystem()); + new Subsystem().parent; + new Subsystem().state + 2; + new Subsystem().isOwned === true; + new Subsystem().setState(1); + new Subsystem().waitForState(2).then(() => {}); + new Subsystem().waitForState(2, 100).then(() => {}); + new Subsystem().configure(); + new Subsystem().initialize(); + new Subsystem().uninitialize(); + new Subsystem().configureSubsystems().then(() => {}); + new Subsystem().uninitializeSubsystems().then(() => {}); + new Subsystem().reinitializeSubsystems().then(() => {}); + new Subsystem().configureSubsystem("a").then(() => {}); + new Subsystem().loadSubsystem("a").then(() => {}); + new Subsystem().loadSubsystem(new Subsystem()).then(() => {}); + new Subsystem().loadSubsystem(new Subsystem(), {}).then(() => {}); + new Subsystem().loadSubsystem(new Subsystem(), { description: "a" }).then(() => {}); + new Subsystem().loadSubsystem(new Subsystem(), { group: "a" }).then(() => {}); + new Subsystem().loadSubsystem(new Subsystem(), { name: "a" }).then(() => {}); + new Subsystem().loadSubsystem(new Subsystem(), { transpile: false }).then(() => {}); + new Subsystem().unloadSubsystem("a").then(() => {}); + new Subsystem().initializeSubsystem("a").then(() => {}); + new Subsystem().uninitializeSubsystem("a").then(() => {}); + new Subsystem().getSubsystem("a").waitForState(2).then(() => {}); + new Subsystem().hasSubsystem("a") === true; + new Subsystem().hasSubsystem("a") === true; + new Subsystem().hasSubsystems() === true; + new Subsystem().addSubsystem({ subsystem: "ppp" }); + new Subsystem().addSubsystem({ subsystem: "ppp", bind: true }); + new Subsystem().addSubsystem({ subsystem: "ppp", bind: "a" }); + new Subsystem().addSubsystem({ subsystem: "ppp", configureArgs: [1] }); + new Subsystem().addSubsystem({ subsystem: "ppp", description: "a" }); + new Subsystem().addSubsystem({ subsystem: "ppp", group: "a" }); + new Subsystem().addSubsystem({ subsystem: "ppp", name: "a" }); + new Subsystem().addSubsystem({ subsystem: "ppp", transpile: false }); + new Subsystem().addSubsystem({ subsystem: "ppp", useFilename: true }); + { + const sysInfo = new Subsystem().addSubsystem({ subsystem: "ppp" }); + sysInfo.configureArgs[0]; + sysInfo.description.charCodeAt(10); + sysInfo.group.charCodeAt(10); + sysInfo.instance.waitForState(2, 30).then(() => {}); + sysInfo.name.charCodeAt(100); + sysInfo.path.charCodeAt(100); + } + { + const sysInfo = new Subsystem().addSubsystem({ subsystem: new Subsystem() }); + sysInfo.configureArgs[0]; + sysInfo.description.charCodeAt(10); + sysInfo.group.charCodeAt(10); + sysInfo.instance.waitForState(2, 30).then(() => {}); + sysInfo.name.charCodeAt(100); + sysInfo.path === null; + } + new Subsystem().addSubsystemsFrom("asd", {}); + new Subsystem().addSubsystemsFrom("asd", { filter: ["a"] }); + new Subsystem().addSubsystemsFrom("asd", { filter: (file) => file.charCodeAt(100) === 100 }); + new Subsystem().addSubsystemsFrom("asd", { filter: async (file) => file.charCodeAt(100) === 100 }); + new Subsystem().addSubsystemsFrom("asd", { bind: "a" }); + new Subsystem().addSubsystemsFrom("asd", { bind: true }); + new Subsystem().addSubsystemsFrom("asd", { configureArgs: [1] }); + new Subsystem().addSubsystemsFrom("asd", { description: "a" }); + new Subsystem().addSubsystemsFrom("asd", { group: "a" }); + new Subsystem().addSubsystemsFrom("asd", { name: "a" }); + new Subsystem().addSubsystemsFrom("asd", { transpile: true }); + new Subsystem().addSubsystemsFrom("asd", { useFilename: true }); + + new Subsystem().instantiateSubsystem("asd").waitForState(2, 200).then(() => {}); + new Subsystem().instantiateSubsystem(new Subsystem()).waitForState(2, 200).then(() => {}); + new Subsystem().instantiateSubsystem(new Subsystem(), { transpile: false }).waitForState(2, 200).then(() => {}); + new Subsystem().deleteSubsystem("name"); + new Subsystem().deleteSubsystem("name", true); + new Subsystem().getSubsystemInfo("name").configureArgs[0]; + new Subsystem().getSubsystems()[0].configureArgs[0]; + } + + namespace applicationTests { + new Application().isMain === true; + new Application().main(); + new Application().enableReport(); + new Application().enableReport({}); + new Application().enableReport({ directory: "a" }); + new Application().enableReport({ events: "a" }); + new Application().enableReport({ filename: "a" }); + new Application().enableReport({ signal: "a" }); + new Application().run().then(() => {}); + new Application().exit().then(() => {}); + new Application().exit(1).then(() => {}); + new Application().exitOnSignal("SIGINT", "SIGUSR1"); + new Application().removeProcesshandlers(); + new Application()._uncaughtException; + new Application()._unhandledRejection; + new Application()._rejectionHandled; + new Application()._signalExit("asd"); + } + + namespace cliApplicationTests { + new CliApplication().run({ ignoreArgs: true }).then(() => {}); + new CliApplication().getVersion().then(() => {}); + new CliApplication().exposeCliInterface(); + new CliApplication().mainCommand; + new CliApplication().defineMainCommand({ + arguments: [{ + name: "a", + default: 100500, + nargs: 100, + required: false + }], + options: [{ + name: "--a", + default: 1000, + nargs: 101231 + }], + optionsGroups: [{ + name: "a", + description: "a" + }] + }); + new CliApplication().defineCommand({ + name: "a", + arguments: [{ + name: "a", + default: 100500, + nargs: 100, + required: false + }], + options: [{ + name: "--a", + default: 1000, + nargs: 101231 + }], + optionsGroups: [{ + name: "a", + description: "a" + }] + }); + new CliApplication().defineCommandFromSubsystem({ + configureArgs: [1], + description: "a", + lazily: true, + subsystem: "a", + group: "a", + name: "a", + transpile: false + }); + new CliApplication().defineOption({ + name: "--a", + action: "store" + }); + new CliApplication().defineOptionsGroup({ + name: "a", + description: "b" + }); + new CliApplication().defineCommandsGroup({ + name: "a", + description: "b" + }); + new CliApplication().option("a"); + new CliApplication().option("a", { value: true }); + } +} diff --git a/types/adone/test/glosses/assertion.ts b/types/adone/test/glosses/assertion.ts index 4d07c78182..3e457dc876 100644 --- a/types/adone/test/glosses/assertion.ts +++ b/types/adone/test/glosses/assertion.ts @@ -3,9 +3,9 @@ namespace assertionTests { namespace assertionInterface { namespace exception { - const a: adone.x.Exception = new assertion.AssertionError(); - const b: adone.x.Exception = new assertion.AssertionError("hello"); - const c: adone.x.Exception = new assertion.AssertionError("hello", { actual: 2, expected: 3 }, () => {}); + const a: adone.exception.Exception = new assertion.AssertionError(); + const b: adone.exception.Exception = new assertion.AssertionError("hello"); + const c: adone.exception.Exception = new assertion.AssertionError("hello", { actual: 2, expected: 3 }, () => {}); } namespace config { @@ -38,11 +38,11 @@ namespace assertionTests { assert.fail(1, 2, "hello"); assert.fail(1, 2, "hello", "<"); - assert.isOk(1); - assert.isOk(1, "hello"); + assert.ok(1); + assert.ok(1, "hello"); - assert.isNotOk(1); - assert.isNotOk(1, "hello"); + assert.notOk(1); + assert.notOk(1, "hello"); assert.equal(1, 2); assert.equal(1, 2, "hello"); @@ -68,38 +68,38 @@ namespace assertionTests { assert.notDeepEqual(1, 2); assert.notDeepEqual(1, 2, "hello"); - assert.isAbove(1, 2); - assert.isAbove(1, 2, "hello"); + assert.above(1, 2); + assert.above(1, 2, "hello"); - assert.isAtLeast(1, 2); - assert.isAtLeast(1, 2, "hello"); + assert.atLeast(1, 2); + assert.atLeast(1, 2, "hello"); - assert.isBelow(1, 2); - assert.isBelow(1, 2, "hello"); + assert.below(1, 2); + assert.below(1, 2, "hello"); - assert.isAtMost(1, 2); - assert.isAtMost(1, 2, "hello"); + assert.atMost(1, 2); + assert.atMost(1, 2, "hello"); - assert.isTrue(1); - assert.isTrue(1, "hello"); + assert.true(1); + assert.true(1, "hello"); - assert.isNotTrue(1); - assert.isNotTrue(1, "hello"); + assert.notTrue(1); + assert.notTrue(1, "hello"); - assert.isFalse(1); - assert.isFalse(1, "hello"); + assert.false(1); + assert.false(1, "hello"); - assert.isNotFalse(1); - assert.isNotFalse(1, "hello"); + assert.notFalse(1); + assert.notFalse(1, "hello"); - assert.isNull(1); - assert.isNull(1, "hello"); + assert.null(1); + assert.null(1, "hello"); - assert.isNaN(1); - assert.isNaN(1, "hello"); + assert.NaN(1); + assert.NaN(1, "hello"); - assert.isNotNaN(1); - assert.isNotNaN(1, "hello"); + assert.NotNaN(1); + assert.NotNaN(1, "hello"); assert.exists(1); assert.exists(1, "hello"); @@ -107,49 +107,49 @@ namespace assertionTests { assert.notExists(1); assert.notExists(1, "hello"); - assert.isUndefined(1); - assert.isUndefined(1, "hello"); + assert.undefined(1); + assert.undefined(1, "hello"); - assert.isDefined(1); - assert.isDefined(1, "hello"); + assert.defined(1); + assert.defined(1, "hello"); - assert.isFunction(1); - assert.isFunction(1, "hello"); + assert.function(1); + assert.function(1, "hello"); - assert.isNotFunction(1); - assert.isNotFunction(1, "hello"); + assert.notFunction(1); + assert.notFunction(1, "hello"); - assert.isObject(1); - assert.isObject(1, "hello"); + assert.object(1); + assert.object(1, "hello"); - assert.isNotObject(1); - assert.isNotObject(1, "hello"); + assert.notObject(1); + assert.notObject(1, "hello"); - assert.isArray(1); - assert.isArray(1, "hello"); + assert.array(1); + assert.array(1, "hello"); - assert.isNotArray(1); - assert.isNotArray(1, "hello"); + assert.notArray(1); + assert.notArray(1, "hello"); - assert.isString(1, "hello"); + assert.string(1, "hello"); - assert.isNotString(1); - assert.isNotString(1, "hello"); + assert.notString(1); + assert.notString(1, "hello"); - assert.isNumber(1); - assert.isNumber(1, "hello"); + assert.number(1); + assert.number(1, "hello"); - assert.isNotNumber(1); - assert.isNotNumber(1, "hello"); + assert.notNumber(1); + assert.notNumber(1, "hello"); - assert.isFinite(1); - assert.isFinite(1, "hello"); + assert.finite(1); + assert.finite(1, "hello"); - assert.isBoolean(1); - assert.isBoolean(1, "hello"); + assert.boolean(1); + assert.boolean(1, "hello"); - assert.isNotBoolean(1); - assert.isNotBoolean(1, "hello"); + assert.notBoolean(1); + assert.notBoolean(1, "hello"); assert.typeOf(1, "string"); assert.typeOf(1, "number", "hello"); @@ -457,26 +457,26 @@ namespace assertionTests { assert.ifError(1); - assert.isExtensible({}); - assert.isExtensible({}, "hello"); + assert.extensible({}); + assert.extensible({}, "hello"); - assert.isNotExtensible({}); - assert.isNotExtensible({}, "hello"); + assert.notExtensible({}); + assert.notExtensible({}, "hello"); - assert.isSealed({}); - assert.isSealed({}, "hello"); + assert.sealed({}); + assert.sealed({}, "hello"); - assert.isNotSealed({}); - assert.isNotSealed({}, "hello"); + assert.notSealed({}); + assert.notSealed({}, "hello"); - assert.isFrozen({}); - assert.isFrozen({}, "hello"); + assert.frozen({}); + assert.frozen({}, "hello"); - assert.isNotFrozen({}); - assert.isNotFrozen({}, "hello"); + assert.notFrozen({}); + assert.notFrozen({}, "hello"); - assert.isEmpty({}); - assert.isEmpty({}, "hello"); + assert.empty({}); + assert.empty({}, "hello"); } const { expect } = assertion; @@ -499,16 +499,16 @@ namespace assertionTests { expect(1).to.contain(2, "hello").and; expect(1).but.contains(2).and; expect(1).but.contains(2, "hello").and; - expect(1).to.ok.not.ok; - expect(1).to.be.true.but.false; - expect(1).to.be.false.but.true; - expect(1).to.be.null.and.null; - expect(1).to.be.undefined.and.true; - expect(1).to.be.NaN.and.null; - expect(1).to.exist.and.be.null; - expect(1).to.be.empty.and.true; - expect(1).to.be.arguments.and.a("number"); - expect(1).to.be.Arguments.and.false; + expect(1).to.ok().and.a("string"); + expect(1).to.be.true().but.false(); + expect(1).to.be.false().but.true(); + expect(1).to.be.null().and.null(); + expect(1).to.be.undefined().and.true(); + expect(1).to.be.NaN().and.null(); + expect(1).to.exist().and.be.null(); + expect(1).to.be.empty().and.true(); + expect(1).to.be.arguments().and.a("number"); + expect(1).to.be.Arguments().and.false(); expect(1).to.be.equal(2).and; expect(1).to.be.equal(2, "hello").and; expect(1).but.equals(2).and; @@ -624,19 +624,19 @@ namespace assertionTests { expect(() => {}).but.decreases({}, "a", "hello").and; expect(() => {}).to.decreases({}).by(2).and; expect(() => {}).to.decreases({}).by(2, "hello").and; - expect({}).to.be.extensible.and; - expect({}).to.be.sealed.and; - expect({}).to.be.frozen.and; - expect({}).to.be.finite.and; + expect({}).to.be.extensible().and; + expect({}).to.be.sealed().and; + expect({}).to.be.frozen().and; + expect({}).to.be.finite().and; namespace mockTests { const s1 = adone.shani.util.spy(); const s2 = adone.shani.util.spy(); - expect(s1).to.have.been.called; - expect(s1).to.have.been.calledOnce; - expect(s1).to.have.been.calledTwice; - expect(s1).to.have.been.calledThrice; + expect(s1).to.have.been.called(); + expect(s1).to.have.been.calledOnce(); + expect(s1).to.have.been.calledTwice(); + expect(s1).to.have.been.calledThrice(); expect(s1).to.have.callCount(100); expect(s1).to.have.been.calledBefore(s2); expect(s1).to.have.been.calledAfter(s2); diff --git a/types/adone/test/glosses/collections.ts b/types/adone/test/glosses/collections.ts deleted file mode 100644 index ec227d4440..0000000000 --- a/types/adone/test/glosses/collections.ts +++ /dev/null @@ -1,1003 +0,0 @@ -namespace collectionTests { - const { collection } = adone; - - namespace linkedListTests { - const { LinkedList } = collection; - - namespace creation { - new LinkedList(); - new LinkedList(10); - } - - namespace properties { - { const a: boolean = new LinkedList().full; } - { const a: boolean = new LinkedList().empty; } - { const a: number = new LinkedList().maxLength; } - { const a: number = new LinkedList().length; } - { const a: boolean = new LinkedList().autoresize; } - } - - namespace resize { - { const a: boolean = new LinkedList().resize(100).full; } - } - - namespace push { - const a = new LinkedList().push(10); - a.next; - a.prev; - const b: number = a.value; - } - - namespace pop { - const a: number | undefined = new LinkedList().pop(); - } - - namespace shift { - const a: number | undefined = new LinkedList().shift(); - } - - namespace unshift { - const a = new LinkedList().unshift("hello"); - a.next; - a.prev; - const b: string = a.value; - } - - namespace pushNode { - const a = new LinkedList(); - const node = a.push("1230"); - a.pushNode(node); - } - - namespace unshiftNode { - const a = new LinkedList(); - const node = a.push(10); - a.unshiftNode(node); - } - - namespace removeNode { - const a = new LinkedList(); - const node = a.unshift("10"); - a.removeNode(node); - } - - namespace clear { - new LinkedList().clear(); - new LinkedList().clear(true); - } - - namespace toArray { - const a = new LinkedList(); - const b: number[] = a.toArray(); - } - - namespace front { - const a = new LinkedList(); - const b: number = a.front; - } - - namespace back { - const a = new LinkedList(); - const b: number = a.back; - } - - namespace iterating { - const a = new LinkedList(); - for (const b of a) { - const i: string = b; - } - const c = new LinkedList(); - for (const b of c) { - const i: number = b; - } - } - - namespace nextNode { - const a = new LinkedList(); - const n1 = a.push("h"); - const n2 = a.nextNode(n1); - n1.next; - n1.prev; - const t: string = n1.value; - } - - namespace map { - const a = new LinkedList(); - const f = (a: number, idx: number) => `${a}${idx}`; - const b = a.map(f); - const c: string = b.front; - } - - namespace forEach { - const a = new LinkedList(); - - a.forEach((a: number, b: number) => { - const c = a + b; - }); - } - - namespace static { - const a: number = LinkedList.DEFAULT_LENGTH; - } - } - - namespace ByteArrayTests { - const { ByteArray } = collection; - - new ByteArray(); - new ByteArray(10); - new ByteArray(10, true); - - const buffer = new ByteArray(); - - namespace readBitSet { - const a: boolean[] = buffer.readBitSet(); - const b: boolean[] = buffer.readBitSet(10); - } - - namespace read { - const a: adone.collection.ByteArray = buffer.read(1); - const b: adone.collection.ByteArray = buffer.read(1, 10); - } - - namespace readInt8 { - const a: number = buffer.readInt8(); - const b: number = buffer.readInt8(10); - } - - namespace readUInt8 { - const a: number = buffer.readUInt8(); - const b: number = buffer.readUInt8(10); - } - - namespace readInt16LE { - const a: number = buffer.readInt16LE(); - const b: number = buffer.readInt16LE(10); - } - - namespace readUInt16LE { - const a: number = buffer.readUInt16LE(); - const b: number = buffer.readUInt16LE(10); - } - - namespace readInt16BE { - const a: number = buffer.readInt16BE(); - const b: number = buffer.readInt16BE(10); - } - - namespace readUInt16BE { - const a: number = buffer.readUInt16BE(); - const b: number = buffer.readUInt16BE(10); - } - - namespace readInt32LE { - const a: number = buffer.readInt32LE(); - const b: number = buffer.readInt32LE(10); - } - - namespace readUInt32LE { - const a: number = buffer.readUInt32LE(); - const b: number = buffer.readUInt32LE(10); - } - - namespace readInt32BE { - const a: number = buffer.readInt32BE(); - const b: number = buffer.readInt32BE(10); - } - - namespace readUInt32BE { - const a: number = buffer.readUInt32BE(); - const b: number = buffer.readUInt32BE(10); - } - - namespace readInt64LE { - const a: adone.math.Long = buffer.readInt64LE(); - const b: adone.math.Long = buffer.readInt64LE(10); - } - - namespace readUInt64LE { - const a: adone.math.Long = buffer.readUInt64LE(); - const b: adone.math.Long = buffer.readUInt64LE(10); - } - - namespace readInt64BE { - const a: adone.math.Long = buffer.readInt64BE(); - const b: adone.math.Long = buffer.readInt64BE(10); - } - - namespace readUInt64BE { - const a: adone.math.Long = buffer.readUInt64BE(); - const b: adone.math.Long = buffer.readUInt64BE(10); - } - - namespace readFloatLE { - const a: number = buffer.readFloatLE(); - const b: number = buffer.readFloatLE(10); - } - - namespace readFloatBE { - const a: number = buffer.readFloatBE(); - const b: number = buffer.readFloatBE(10); - } - - namespace readDoubleLE { - const a: number = buffer.readDoubleLE(); - const b: number = buffer.readDoubleLE(10); - } - - namespace readDoubleBE { - const a: number = buffer.readDoubleBE(); - const b: number = buffer.readDoubleBE(10); - } - - namespace write { - const a: adone.collection.ByteArray = buffer.write("1"); - const b: adone.collection.ByteArray = buffer.write(new ByteArray()); - const c: adone.collection.ByteArray = buffer.write(Buffer.alloc(10)); - const d: adone.collection.ByteArray = buffer.write(new Uint8Array([1, 2, 3])); - const e: adone.collection.ByteArray = buffer.write(new ArrayBuffer(10)); - const f: adone.collection.ByteArray = buffer.write("1", 10); - const g: adone.collection.ByteArray = buffer.write("1", 10, 10); - const h: adone.collection.ByteArray = buffer.write("1", 10, 10, "utf8"); - } - - namespace writeBitSet { - const a: adone.collection.ByteArray = buffer.writeBitSet([1, 2, 3]); - const b: number = buffer.writeBitSet([1, 2, 3], 10); - } - - namespace writeInt8 { - const a: adone.collection.ByteArray = buffer.writeInt8(10); - const b: adone.collection.ByteArray = buffer.writeInt8(10, 10); - } - - namespace writeUInt8 { - const a: adone.collection.ByteArray = buffer.writeUInt8(10); - const b: adone.collection.ByteArray = buffer.writeUInt8(10, 10); - } - - namespace writeInt16LE { - const a: adone.collection.ByteArray = buffer.writeInt16LE(10); - const b: adone.collection.ByteArray = buffer.writeInt16LE(10, 10); - } - - namespace writeInt16BE { - const a: adone.collection.ByteArray = buffer.writeInt16BE(10); - const b: adone.collection.ByteArray = buffer.writeInt16BE(10, 10); - } - - namespace writeUInt16LE { - const a: adone.collection.ByteArray = buffer.writeUInt16LE(10); - const b: adone.collection.ByteArray = buffer.writeUInt16LE(10, 10); - } - - namespace writeUInt16BE { - const a: adone.collection.ByteArray = buffer.writeUInt16BE(10); - const b: adone.collection.ByteArray = buffer.writeUInt16BE(10, 10); - } - - namespace writeInt32LE { - const a: adone.collection.ByteArray = buffer.writeInt32LE(10); - const b: adone.collection.ByteArray = buffer.writeInt32LE(10, 10); - } - - namespace writeInt32BE { - const a: adone.collection.ByteArray = buffer.writeInt32BE(10); - const b: adone.collection.ByteArray = buffer.writeInt32BE(10, 10); - } - - namespace writeUInt32LE { - const a: adone.collection.ByteArray = buffer.writeUInt32LE(10); - const b: adone.collection.ByteArray = buffer.writeUInt32LE(10, 10); - } - - namespace writeUInt32BE { - const a: adone.collection.ByteArray = buffer.writeUInt32BE(10); - const b: adone.collection.ByteArray = buffer.writeUInt32BE(10, 10); - } - - namespace writeInt64LE { - const a: adone.collection.ByteArray = buffer.writeInt64LE(10); - const b: adone.collection.ByteArray = buffer.writeInt64LE(10, 10); - } - - namespace writeInt64BE { - const a: adone.collection.ByteArray = buffer.writeInt64BE(10); - const b: adone.collection.ByteArray = buffer.writeInt64BE(10, 10); - } - - namespace writeUInt64LE { - const a: adone.collection.ByteArray = buffer.writeUInt64LE(10); - const b: adone.collection.ByteArray = buffer.writeUInt64LE(10, 10); - } - - namespace writeUInt64BE { - const a: adone.collection.ByteArray = buffer.writeUInt64BE(10); - const b: adone.collection.ByteArray = buffer.writeUInt64BE(10, 10); - } - - namespace writeFloatLE { - const a: adone.collection.ByteArray = buffer.writeFloatLE(10); - const b: adone.collection.ByteArray = buffer.writeFloatLE(10, 10); - } - - namespace writeFloatBE { - const a: adone.collection.ByteArray = buffer.writeFloatBE(10); - const b: adone.collection.ByteArray = buffer.writeFloatBE(10, 10); - } - - namespace writeDoubleLE { - const a: adone.collection.ByteArray = buffer.writeDoubleLE(10); - const b: adone.collection.ByteArray = buffer.writeDoubleLE(10, 10); - } - - namespace writeDoubleBE { - const a: adone.collection.ByteArray = buffer.writeDoubleBE(10); - const b: adone.collection.ByteArray = buffer.writeDoubleBE(10, 10); - } - - namespace writeVarInt32 { - const a: adone.collection.ByteArray = buffer.writeVarint32(10); - const b: number = buffer.writeVarint32(10, 10); - } - - namespace writeVarInt32ZigZag { - const a: adone.collection.ByteArray = buffer.writeVarint32ZigZag(10); - const b: number = buffer.writeVarint32ZigZag(10, 10); - } - - namespace readVarint32 { - const a: number = buffer.readVarint32(); - const b: { value: number, length: number } = buffer.readVarint32(10); - } - - namespace readVarint32ZigZag { - const a: number = buffer.readVarint32ZigZag(); - const b: { value: number, length: number } = buffer.readVarint32ZigZag(10); - } - - namespace writeVarint64 { - const a: adone.collection.ByteArray = buffer.writeVarint64(10); - const b: number = buffer.writeVarint64(10, 10); - } - - namespace writeVarint64ZigZag { - const a: adone.collection.ByteArray = buffer.writeVarint64ZigZag(10); - const b: number = buffer.writeVarint64ZigZag(10, 10); - } - - namespace readVarint64 { - const a: adone.math.Long = buffer.readVarint64(); - const b: { value: adone.math.Long, length: number } = buffer.readVarint64(10); - } - - namespace readVarint64ZigZag { - const a: adone.math.Long = buffer.readVarint64ZigZag(); - const b: { value: adone.math.Long, length: number } = buffer.readVarint64ZigZag(10); - } - - namespace writeCString { - const a: adone.collection.ByteArray = buffer.writeCString("asd"); - const b: number = buffer.writeCString("123", 10); - } - - namespace readCString { - const a: string = buffer.readCString(); - const b: { string: string, length: number } = buffer.readCString(10); - } - - namespace writeString { - const a: adone.collection.ByteArray = buffer.writeString("abc"); - const b: number = buffer.writeString("abc", 10); - } - - namespace readString { - const a: string = buffer.readString(10); - const b: string = buffer.readString(10, "b"); - const c: string = buffer.readString(10, "c"); - const d: { string: string, length: number } = buffer.readString(10, "c", 10); - } - - namespace writeVString { - const a: adone.collection.ByteArray = buffer.writeVString("abc"); - const b: number = buffer.writeVString("abc", 10); - } - - namespace readVString { - const a: string = buffer.readVString(); - const b: { string: string, length: number } = buffer.readVString(10); - } - - namespace appendTo { - const a: adone.collection.ByteArray = buffer.appendTo(new ByteArray()); - const b: adone.collection.ByteArray = buffer.appendTo(new ByteArray(), 10); - } - - namespace assert { - const a: adone.collection.ByteArray = buffer.assert(); - const b: adone.collection.ByteArray = buffer.assert(true); - } - - namespace capacity { - const a: number = buffer.capacity(); - } - - namespace clear { - const a: adone.collection.ByteArray = buffer.clear(); - } - - namespace copy { - const a: adone.collection.ByteArray = buffer.clone(); - const c: adone.collection.ByteArray = buffer.clone(true); - } - - namespace compact { - const a: adone.collection.ByteArray = buffer.compact(); - const b: adone.collection.ByteArray = buffer.compact(1); - const c: adone.collection.ByteArray = buffer.compact(1, 10); - } - - namespace copyTo { - const a: adone.collection.ByteArray = buffer.copyTo(new ByteArray()); - const b: adone.collection.ByteArray = buffer.copyTo(new ByteArray(), 0); - const c: adone.collection.ByteArray = buffer.copyTo(new ByteArray(), 0, 0); - const d: adone.collection.ByteArray = buffer.copyTo(new ByteArray(), 0, 0, 10); - } - - namespace ensureCapacity { - const a: adone.collection.ByteArray = buffer.ensureCapacity(10); - } - - namespace fill { - const a: adone.collection.ByteArray = buffer.fill("0"); - const b: adone.collection.ByteArray = buffer.fill(0); - const c: adone.collection.ByteArray = buffer.fill(0, 0); - const d: adone.collection.ByteArray = buffer.fill(0, 0, 10); - } - - namespace flip { - const a: adone.collection.ByteArray = buffer.flip(); - } - - namespace mark { - const a: adone.collection.ByteArray = buffer.mark(); - const b: adone.collection.ByteArray = buffer.mark(10); - } - - namespace prepend { - const a: adone.collection.ByteArray = buffer.prepend(""); - const b: adone.collection.ByteArray = buffer.prepend(new ByteArray()); - const c: adone.collection.ByteArray = buffer.prepend(Buffer.alloc(10)); - const d: adone.collection.ByteArray = buffer.prepend(new Uint8Array([1, 2, 3])); - const e: adone.collection.ByteArray = buffer.prepend(new ArrayBuffer(10)); - const f: adone.collection.ByteArray = buffer.prepend("", "utf8"); - const g: adone.collection.ByteArray = buffer.prepend("", "utf8", 10); - const h: adone.collection.ByteArray = buffer.prepend("", 10); - } - - namespace prependTo { - const a: adone.collection.ByteArray = buffer.prependTo(new ByteArray()); - const b: adone.collection.ByteArray = buffer.prependTo(new ByteArray(), 10); - } - - namespace remaining { - const a: number = buffer.remaining(); - } - - namespace reset { - const a: adone.collection.ByteArray = buffer.reset(); - } - - namespace resize { - const a: adone.collection.ByteArray = buffer.resize(10); - } - - namespace reverse { - const a: adone.collection.ByteArray = buffer.reverse(); - const b: adone.collection.ByteArray = buffer.reverse(1); - const c: adone.collection.ByteArray = buffer.reverse(1, 10); - } - - namespace skip { - const a: adone.collection.ByteArray = buffer.skip(10); - } - - namespace slice { - const a: adone.collection.ByteArray = buffer.slice(); - const b: adone.collection.ByteArray = buffer.slice(1); - const c: adone.collection.ByteArray = buffer.slice(1, 10); - } - - namespace toBuffer { - const a: Buffer = buffer.toBuffer(); - const b: Buffer = buffer.toBuffer(true); - const c: Buffer = buffer.toBuffer(true, 0); - const d: Buffer = buffer.toBuffer(true, 0, 10); - } - - namespace toArrayBuffer { - const a: ArrayBuffer = buffer.toArrayBuffer(); - } - - namespace toString { - const a: string = buffer.toString(); - const b: string = buffer.toString("utf8"); - const c: string = buffer.toString("utf8", 0); - const d: string = buffer.toString("utf8", 0, 10); - } - - namespace toBase64 { - const a: string = buffer.toBase64(); - const b: string = buffer.toBase64(0); - const c: string = buffer.toBase64(0, 10); - } - - namespace toBinary { - const a: string = buffer.toBinary(); - const b: string = buffer.toBinary(0); - const c: string = buffer.toBinary(0, 10); - } - - namespace toDebug { - const a: string = buffer.toDebug(); - const b: string = buffer.toDebug(true); - } - - namespace toUTF8 { - const a: string = buffer.toUTF8(); - const b: string = buffer.toUTF8(0); - const c: string = buffer.toUTF8(0, 10); - } - - namespace static { - namespace accessor { - const a: typeof Buffer = ByteArray.accessor(); - } - - namespace allocate { - const a: adone.collection.ByteArray = ByteArray.allocate(); - const b: adone.collection.ByteArray = ByteArray.allocate(10); - const c: adone.collection.ByteArray = ByteArray.allocate(10, true); - } - - namespace concat { - const a: adone.collection.ByteArray = ByteArray.concat([ - new ByteArray(), - Buffer.alloc(10), - new Uint8Array([1, 2, 3]), - new ArrayBuffer(10) - ]); - const b: adone.collection.ByteArray = ByteArray.concat([ - new ByteArray(), - Buffer.alloc(10), - new Uint8Array([1, 2, 3]), - new ArrayBuffer(10) - ], "utf8"); - const c: adone.collection.ByteArray = ByteArray.concat([ - new ByteArray(), - Buffer.alloc(10), - new Uint8Array([1, 2, 3]), - new ArrayBuffer(10) - ], "utf8", true); - } - - namespace type { - const a: typeof Buffer = ByteArray.type(); - } - - namespace wrap { - const a: adone.collection.ByteArray = ByteArray.wrap(""); - const b: adone.collection.ByteArray = ByteArray.wrap(new ByteArray()); - const c: adone.collection.ByteArray = ByteArray.wrap(Buffer.alloc(10)); - const d: adone.collection.ByteArray = ByteArray.wrap(new Uint8Array([1, 2, 3])); - const e: adone.collection.ByteArray = ByteArray.wrap(new ArrayBuffer(10)); - const f: adone.collection.ByteArray = ByteArray.wrap("", "utf8"); - const g: adone.collection.ByteArray = ByteArray.wrap("", "utf8", true); - } - - namespace calculateVarint32 { - const a: number = ByteArray.calculateVarint32(10); - } - - namespace zigZagEncode32 { - const a: number = ByteArray.zigZagEncode32(10); - } - - namespace zigZagDecode32 { - const a: number = ByteArray.zigZagDecode32(10); - } - - namespace calculateVarint64 { - const a: number = ByteArray.calculateVarint64(10); - const b: number = ByteArray.calculateVarint64("10"); - } - - namespace zigZagEncode64 { - const a: adone.math.Long = ByteArray.zigZagEncode64(10); - const b: adone.math.Long = ByteArray.zigZagEncode64("10"); - const c: adone.math.Long = ByteArray.zigZagEncode64(adone.math.Long.fromValue(10)); - } - - namespace zigZagDecode64 { - const a: adone.math.Long = ByteArray.zigZagDecode64(10); - const b: adone.math.Long = ByteArray.zigZagDecode64("10"); - const c: adone.math.Long = ByteArray.zigZagDecode64(adone.math.Long.fromValue(10)); - } - - namespace calculateUTF8Chars { - const a: number = ByteArray.calculateUTF8Chars("123"); - } - - namespace calculateString { - const a: number = ByteArray.calculateString("123"); - } - - namespace fromBase64 { - const a: adone.collection.ByteArray = ByteArray.fromBase64("123"); - } - - namespace btoa { - const a: string = ByteArray.btoa("123"); - } - - namespace atob { - const a: string = ByteArray.atob("123"); - } - - namespace fromBinary { - const a: adone.collection.ByteArray = ByteArray.fromBinary("123"); - } - - namespace fromDebug { - const a: adone.collection.ByteArray = ByteArray.fromDebug("12"); - const b: adone.collection.ByteArray = ByteArray.fromDebug("12", true); - } - - namespace fromHex { - const a: adone.collection.ByteArray = ByteArray.fromHex("192"); - const b: adone.collection.ByteArray = ByteArray.fromHex("192", true); - } - - namespace fromUTF8 { - const a: adone.collection.ByteArray = ByteArray.fromUTF8("123"); - const b: adone.collection.ByteArray = ByteArray.fromUTF8("123", true); - } - - namespace constants { - const a: number = ByteArray.DEFAULT_CAPACITY; - const b: boolean = ByteArray.DEFAULT_NOASSERT; - const c: number = ByteArray.MAX_VARINT32_BYTES; - const d: number = ByteArray.MAX_VARINT64_BYTES; - const e: string = ByteArray.METRICS_CHARS; - const f: string = ByteArray.METRICS_BYTES; - } - } - } - - namespace queueTests { - const { Queue } = collection; - type Queue = adone.collection.Queue; - - new Queue(); - { const a: Queue = new Queue().push(123).push(123); } - { const a: number | undefined = new Queue().push(123).pop(); } - { const a: string | undefined = new Queue().push(123).pop(); } - { const a: boolean = new Queue().full; } - { const a: number = new Queue().length; } - { const a: boolean = new Queue().empty; } - } - - namespace asyncQueueTests { - const { AsyncQueue } = collection; - type AsyncQueue = adone.collection.AsyncQueue; - - { const a: AsyncQueue = new AsyncQueue().push(123); } - { const a: Promise = new AsyncQueue().push(123).pop(); } - } - - namespace priorityQueueTests { - const { PriorityQueue } = collection; - type PriorityQueue = adone.collection.PriorityQueue; - - { const a: boolean = new PriorityQueue().empty; } - { const a: number = new PriorityQueue().length; } - new PriorityQueue(); - new PriorityQueue({}); - new PriorityQueue({ - compare(a: number, b: number) { - return a - b; - } - }); - new PriorityQueue({ - priority(a: string, b: string) { - return a.length - b.length; - } - }); - { const a: PriorityQueue = new PriorityQueue().clone(); } - { const a: PriorityQueue = new PriorityQueue().push("123"); } - { const a: string | undefined = new PriorityQueue().pop(); } - { const a: PriorityQueue = new PriorityQueue().delete("123"); } - { const a: PriorityQueue = new PriorityQueue().delete("123"); } - { const a: string = new PriorityQueue().replace("123"); } - { const a: string = new PriorityQueue().pushpop("123"); } - { const a: string[] = new PriorityQueue().toArray(); } - { const a: PriorityQueue = PriorityQueue.from(["1"]); } - { const a: PriorityQueue = PriorityQueue.from(["1"], {}); } - { const a: PriorityQueue = PriorityQueue.from(["1"], { compare: (a: string, b: string) => a.length - b.length }); } - { const a: PriorityQueue = PriorityQueue.from(["1"], { priority: (a: string, b: string) => a.length - b.length }); } - } - - namespace fastlruTests { - const { FastLRU } = collection; - - new FastLRU(); - new FastLRU(100); - new FastLRU(100, { dispose: (key: string, value: number) => null }); - { const a: number = new FastLRU().size; } - { const a: number | undefined = new FastLRU().get("key"); } - new FastLRU().set("key", 123); - { const a: boolean = new FastLRU().delete("key"); } - { const a: boolean = new FastLRU().has("key"); } - { const a: string[] = [...new FastLRU().keys()]; } - { const a: number[] = [...new FastLRU().values()]; } - { const a: number[] = [...new FastLRU().values()]; } - { const a: Array<[string, number]> = [...new FastLRU().entries()]; } - new FastLRU().clear(); - } - - namespace stackTests { - const { Stack } = collection; - type Stack = adone.collection.Stack; - - { const a: boolean = new Stack().empty; } - { const a: number = new Stack().top; } - { const a: Stack = new Stack().push(123); } - { const a: number | undefined = new Stack().pop(); } - { const a: number[] = [...new Stack()]; } - { const a: Stack = Stack.from([1, 2, 3]); } - } - - namespace binarySearchTreeTests { - const { BinarySearchTree } = collection; - type BinarySearchTree = adone.collection.BinarySearchTree; - - new BinarySearchTree(); - new BinarySearchTree({}); - new BinarySearchTree({ checkValueEquality: (a: number, b: number) => a === b }); - new BinarySearchTree({ compareKeys: (a: string, b: string) => a.length - b.length }); - new BinarySearchTree({ parent: new BinarySearchTree() }); - new BinarySearchTree({ unique: true }); - new BinarySearchTree({ value: 123 }); - { const a: BinarySearchTree = new BinarySearchTree().getMaxKeyDescendant(); } - { const a: string = new BinarySearchTree().getMaxKey(); } - { const a: BinarySearchTree = new BinarySearchTree().getMinKeyDescendant(); } - { const a: string = new BinarySearchTree().getMinKey(); } - new BinarySearchTree().checkAllNodesFullfillCondition((key: string, value: number) => null); - new BinarySearchTree().checkIsBST(); - { const a: number = new BinarySearchTree().getNumberOfKeys(); } - new BinarySearchTree().insert("asd", 123); - { const a: number[] = new BinarySearchTree().search("asd"); } - { const a: number[] = new BinarySearchTree().betweenBounds({ $gt: "" }); } - { const a: number[] = new BinarySearchTree().betweenBounds({ $lt: "" }); } - { const a: number[] = new BinarySearchTree().betweenBounds({ $lte: "" }); } - { const a: number[] = new BinarySearchTree().betweenBounds({ $gte: "" }); } - new BinarySearchTree().delete("key"); - new BinarySearchTree().delete("key", 123); - new BinarySearchTree().executeOnEveryNode((tree: BinarySearchTree) => null); - new BinarySearchTree().prettyPrint(); - new BinarySearchTree().prettyPrint(true); - new BinarySearchTree().prettyPrint(true, " "); - } - - namespace avlTreeTests { - const { AVLTree } = collection; - type AVLTree = adone.collection.AVLTree; - - new AVLTree(); - new AVLTree({ checkValueEquality: (a: number, b: number) => a === b }); - new AVLTree({ compareKeys: (a: string, b: string) => a.length - b.length }); - new AVLTree({ parent: new AVLTree() }); - new AVLTree({ unique: false }); - new AVLTree({ value: 123 }); - new AVLTree().checkIsAVLT(); - new AVLTree().insert("123", 123); - new AVLTree().delete("123"); - new AVLTree().delete("123", 123); - { const a: number = new AVLTree().getNumberOFKeys(); } - { const a: number[] = new AVLTree().search("key"); } - { const a: number[] = new AVLTree().betweenBounds({}); } - { const a: number[] = new AVLTree().betweenBounds({ $gt: "ads" }); } - { const a: number[] = new AVLTree().betweenBounds({ $lt: "ads" }); } - { const a: number[] = new AVLTree().betweenBounds({ $gte: "ads" }); } - { const a: number[] = new AVLTree().betweenBounds({ $lte: "ads" }); } - new AVLTree().executeOnEveryNode((tree: AVLTree) => null); - } - - namespace redBlackTreeTests { - const { RedBlackTree } = collection; - type RedBlackTree = adone.collection.RedBlackTree; - type RedBlackTreeIterator = adone.collection.I.RedBlackTree.Iterator; - type RedBlackTreeNode = adone.collection.I.RedBlackTree.Node; - - new RedBlackTree(); - new RedBlackTree((a: string, b: string) => a.length - b.length); - new RedBlackTree(undefined, new RedBlackTree()); - { const a: string[] = new RedBlackTree().keys; } - { const a: number[] = new RedBlackTree().values; } - { const a: number = new RedBlackTree().length; } - { - const a: RedBlackTreeIterator = new RedBlackTree().begin; - { const b: boolean = a.valid; } - { const b: RedBlackTreeNode | null = a.node; } - { const b: string | undefined = a.key; } - { const b: number | undefined = a.value; } - { const b: number = a.index; } - { const b: boolean = a.hasNext; } - { const b: boolean = a.hasPrev; } - { const b: RedBlackTree = a.tree; } - { const b: RedBlackTreeIterator = a.clone(); } - { const b: RedBlackTree = a.remove(); } - a.next(); - { const b: RedBlackTree = a.update(333); } - a.prev(); - } - { const a: RedBlackTreeIterator = new RedBlackTree().end; } - { const a: RedBlackTree = new RedBlackTree().insert("123", 456); } - { const a: number = new RedBlackTree().forEach((key: string, value: number) => value); } - { const a: number = new RedBlackTree().forEach((key: string, value: number) => value, "1"); } - { const a: number = new RedBlackTree().forEach((key: string, value: number) => value, "1", "2"); } - { const a: RedBlackTreeIterator = new RedBlackTree().at(1); } - { const a: RedBlackTreeIterator = new RedBlackTree().ge("1"); } - { const a: RedBlackTreeIterator = new RedBlackTree().gt("1"); } - { const a: RedBlackTreeIterator = new RedBlackTree().lt("1"); } - { const a: RedBlackTreeIterator = new RedBlackTree().le("1"); } - { const a: RedBlackTreeIterator | null = new RedBlackTree().find("1"); } - { const a: RedBlackTree = new RedBlackTree().remove("1"); } - { const a: RedBlackTree = new RedBlackTree().remove("1"); } - { const a: number | undefined = new RedBlackTree().get("1"); } - } - - namespace arraySetTests { - const { ArraySet } = collection; - type ArraySet = adone.collection.ArraySet; - - new ArraySet(); - { const a: number = new ArraySet().length; } - { const a: ArraySet = new ArraySet().add("hello"); } - { const a: ArraySet = new ArraySet().add("hello", true); } - { const a: boolean = new ArraySet().has("string"); } - { const a: number = new ArraySet().indexOf("hello"); } - { const a: string[] = new ArraySet().toArray(); } - { const a: ArraySet = ArraySet.from([1]); } - { const a: ArraySet = ArraySet.from([1], true); } - } - - namespace bufferListTests { - const { BufferList } = collection; - type BufferList = adone.collection.BufferList; - - new BufferList(); - new BufferList(Buffer.from("123")); - new BufferList("123"); - new BufferList(123); - new BufferList([Buffer.from("123"), "123", 123]); - new BufferList((err: any, data: Buffer) => null); - new BufferList().append(Buffer.from("123")); - new BufferList().append("123"); - new BufferList().append(123); - new BufferList().append([Buffer.from("123"), "123", 123]); - new BufferList().end(Buffer.from("123")); - new BufferList().end(); - { const a: number = new BufferList().get(123); } - { const a: Buffer = new BufferList().slice(); } - { const a: Buffer = new BufferList().slice(1); } - { const a: Buffer = new BufferList().slice(1, 2); } - { const a: Buffer = new BufferList().copy(Buffer.alloc(100)); } - { const a: Buffer = new BufferList().copy(Buffer.alloc(100), 0); } - { const a: Buffer = new BufferList().copy(Buffer.alloc(100), 0, 1); } - { const a: Buffer = new BufferList().copy(Buffer.alloc(100), 0, 1, 2); } - { const a: BufferList = new BufferList().shallowSlice(); } - { const a: BufferList = new BufferList().shallowSlice(1); } - { const a: BufferList = new BufferList().shallowSlice(1, 2); } - { const a: string = new BufferList().toString(); } - { const a: string = new BufferList().toString("utf8"); } - { const a: string = new BufferList().toString("utf8", 1); } - { const a: string = new BufferList().toString("utf8", 1, 2); } - { const a: BufferList = new BufferList().consume(10); } - { const a: BufferList = new BufferList().duplicate(); } - new BufferList().destroy(); - new BufferList().then((x: Buffer) => null); - new BufferList().catch((err: any) => null); - } - - namespace defaultMapTests { - const { DefaultMap } = collection; - type DefaultMap = adone.collection.DefaultMap; - - new DefaultMap(); - { const a: DefaultMap = new DefaultMap(undefined, [["1", 2]]); } - { const a: DefaultMap = new DefaultMap((key: string) => 123); } - { const a: DefaultMap = new DefaultMap({ a: 123 }); } - } - - namespace lruTests { - const { LRU } = collection; - type LRU = adone.collection.LRU; - - new LRU(); - new LRU(100); - new LRU({}); - new LRU({ max: 100 }); - new LRU({ dispose: (key: string, value: number) => null }); - new LRU({ maxAge: 100 }); - new LRU({ noDisposeOnSet: false }); - new LRU({ stale: true }); - { const a: number = new LRU().max; } - { new LRU().max = 100; } - { const a: boolean = new LRU().allowStale; } - { new LRU().allowStale = false; } - { const a: number = new LRU().maxAge; } - { new LRU().maxAge = 100; } - { const a: (v: number, k: string) => number = new LRU().lengthCalculator; } - { new LRU().lengthCalculator = () => 123; } - { const a: number = new LRU().length; } - { const a: number = new LRU().itemCount; } - new LRU().rforEach((value: number, key: string) => null); - new LRU().rforEach(function (value: number, key: string) { - const b: number = this.a; - }, { a: 1 }); - new LRU().forEach((value: number, key: string) => null); - new LRU().forEach(function (value: number, key: string) { - const b: number = this.a; - }, { a: 1 }); - { const a: string[] = new LRU().keys(); } - { const a: number[] = new LRU().values(); } - new LRU().reset(); - { - const a: Array> = new LRU().dump(); - const [b] = a; - { const c: number = b.e; } - { const c: string = b.key; } - { const c: number = b.value; } - } - { - const a: adone.collection.LinkedList> = new LRU().dumpLru(); - const b = a.shift(); - if (b !== undefined) { - { const a: string = b.key; } - { const a: number = b.value; } - { const a: number = b.now; } - { const a: number = b.maxAge; } - } - } - { const a: string = new LRU().inspect(); } - { const a: string = new LRU().inspect({}); } - { const a: boolean = new LRU().set("asd", 13); } - { const a: boolean = new LRU().set("asd", 13, 100500); } - { const a: boolean = new LRU().has("asd"); } - { const a: number | undefined = new LRU().get("asd"); } - { const a: number | undefined = new LRU().peek("asd"); } - { const a: adone.collection.I.LRU.Entry = new LRU().pop(); } - new LRU().del("asd"); - new LRU().load(new LRU().dump()); - new LRU().prune(); - } - - namespace timedoutMapTests { - const { TimedoutMap } = collection; - type TimedoutMap = adone.collection.TimedoutMap; - - new TimedoutMap(); - new TimedoutMap(1000); - new TimedoutMap(1000, (key: string) => null); - { - const a: TimedoutMap = new TimedoutMap().forEach((value: number, key: string) => null); - } - { - const a: TimedoutMap = new TimedoutMap().forEach(function (value: number, key: string) { - const a: number = this.a; - }, { a: 1 }); - } - { const a: boolean = new TimedoutMap().delete("123"); } - } -} diff --git a/types/adone/test/glosses/collections/array_set.ts b/types/adone/test/glosses/collections/array_set.ts new file mode 100644 index 0000000000..49fd8582ce --- /dev/null +++ b/types/adone/test/glosses/collections/array_set.ts @@ -0,0 +1,19 @@ +namespace adoneTests.collection.ArraySet { + const { + collection: { + ArraySet + } + } = adone; + + type ArraySet = adone.collection.ArraySet; + + new ArraySet(); + { const a: number = new ArraySet().length; } + { const a: ArraySet = new ArraySet().add("hello"); } + { const a: ArraySet = new ArraySet().add("hello", true); } + { const a: boolean = new ArraySet().has("string"); } + { const a: number = new ArraySet().indexOf("hello"); } + { const a: string[] = new ArraySet().toArray(); } + { const a: ArraySet = ArraySet.from([1]); } + { const a: ArraySet = ArraySet.from([1], true); } +} diff --git a/types/adone/test/glosses/collections/async_queue.ts b/types/adone/test/glosses/collections/async_queue.ts new file mode 100644 index 0000000000..43374e6d3a --- /dev/null +++ b/types/adone/test/glosses/collections/async_queue.ts @@ -0,0 +1,12 @@ +namespace adoneTests.collection.AsyncQueue { + const { + collection: { + AsyncQueue + } + } = adone; + + type AsyncQueue = adone.collection.AsyncQueue; + + { const a: AsyncQueue = new AsyncQueue().push(123); } + { const a: Promise = new AsyncQueue().push(123).pop(); } +} diff --git a/types/adone/test/glosses/collections/avl_tree.ts b/types/adone/test/glosses/collections/avl_tree.ts new file mode 100644 index 0000000000..9c032deb2d --- /dev/null +++ b/types/adone/test/glosses/collections/avl_tree.ts @@ -0,0 +1,28 @@ +namespace adoneTests.collection.AVLTree { + const { + collection: { + AVLTree + } + } = adone; + + type AVLTree = adone.collection.AVLTree; + + new AVLTree(); + new AVLTree({ checkValueEquality: (a: number, b: number) => a === b }); + new AVLTree({ compareKeys: (a: string, b: string) => a.length - b.length }); + new AVLTree({ parent: new AVLTree() }); + new AVLTree({ unique: false }); + new AVLTree({ value: 123 }); + new AVLTree().checkIsAVLT(); + new AVLTree().insert("123", 123); + new AVLTree().delete("123"); + new AVLTree().delete("123", 123); + { const a: number = new AVLTree().getNumberOFKeys(); } + { const a: number[] = new AVLTree().search("key"); } + { const a: number[] = new AVLTree().betweenBounds({}); } + { const a: number[] = new AVLTree().betweenBounds({ $gt: "ads" }); } + { const a: number[] = new AVLTree().betweenBounds({ $lt: "ads" }); } + { const a: number[] = new AVLTree().betweenBounds({ $gte: "ads" }); } + { const a: number[] = new AVLTree().betweenBounds({ $lte: "ads" }); } + new AVLTree().executeOnEveryNode((tree: AVLTree) => null); +} diff --git a/types/adone/test/glosses/collections/binary_search_tree.ts b/types/adone/test/glosses/collections/binary_search_tree.ts new file mode 100644 index 0000000000..56f9a28e72 --- /dev/null +++ b/types/adone/test/glosses/collections/binary_search_tree.ts @@ -0,0 +1,36 @@ +namespace adoneTests.collection.BinarySearchTree { + const { + collection: { + BinarySearchTree + } + } = adone; + + type BinarySearchTree = adone.collection.BinarySearchTree; + + new BinarySearchTree(); + new BinarySearchTree({}); + new BinarySearchTree({ checkValueEquality: (a: number, b: number) => a === b }); + new BinarySearchTree({ compareKeys: (a: string, b: string) => a.length - b.length }); + new BinarySearchTree({ parent: new BinarySearchTree() }); + new BinarySearchTree({ unique: true }); + new BinarySearchTree({ value: 123 }); + { const a: BinarySearchTree = new BinarySearchTree().getMaxKeyDescendant(); } + { const a: string = new BinarySearchTree().getMaxKey(); } + { const a: BinarySearchTree = new BinarySearchTree().getMinKeyDescendant(); } + { const a: string = new BinarySearchTree().getMinKey(); } + new BinarySearchTree().checkAllNodesFullfillCondition((key: string, value: number) => null); + new BinarySearchTree().checkIsBST(); + { const a: number = new BinarySearchTree().getNumberOfKeys(); } + new BinarySearchTree().insert("asd", 123); + { const a: number[] = new BinarySearchTree().search("asd"); } + { const a: number[] = new BinarySearchTree().betweenBounds({ $gt: "" }); } + { const a: number[] = new BinarySearchTree().betweenBounds({ $lt: "" }); } + { const a: number[] = new BinarySearchTree().betweenBounds({ $lte: "" }); } + { const a: number[] = new BinarySearchTree().betweenBounds({ $gte: "" }); } + new BinarySearchTree().delete("key"); + new BinarySearchTree().delete("key", 123); + new BinarySearchTree().executeOnEveryNode((tree: BinarySearchTree) => null); + new BinarySearchTree().prettyPrint(); + new BinarySearchTree().prettyPrint(true); + new BinarySearchTree().prettyPrint(true, " "); +} diff --git a/types/adone/test/glosses/collections/buffer_list.ts b/types/adone/test/glosses/collections/buffer_list.ts new file mode 100644 index 0000000000..265d54033f --- /dev/null +++ b/types/adone/test/glosses/collections/buffer_list.ts @@ -0,0 +1,42 @@ +namespace adoneTests.collection.BufferList { + const { + collection: { + BufferList + } + } = adone; + + type BufferList = adone.collection.BufferList; + + new BufferList(); + new BufferList(Buffer.from("123")); + new BufferList("123"); + new BufferList(123); + new BufferList([Buffer.from("123"), "123", 123]); + new BufferList((err: any, data: Buffer) => null); + new BufferList().append(Buffer.from("123")); + new BufferList().append("123"); + new BufferList().append(123); + new BufferList().append([Buffer.from("123"), "123", 123]); + new BufferList().end(Buffer.from("123")); + new BufferList().end(); + { const a: number = new BufferList().get(123); } + { const a: Buffer = new BufferList().slice(); } + { const a: Buffer = new BufferList().slice(1); } + { const a: Buffer = new BufferList().slice(1, 2); } + { const a: Buffer = new BufferList().copy(Buffer.alloc(100)); } + { const a: Buffer = new BufferList().copy(Buffer.alloc(100), 0); } + { const a: Buffer = new BufferList().copy(Buffer.alloc(100), 0, 1); } + { const a: Buffer = new BufferList().copy(Buffer.alloc(100), 0, 1, 2); } + { const a: BufferList = new BufferList().shallowSlice(); } + { const a: BufferList = new BufferList().shallowSlice(1); } + { const a: BufferList = new BufferList().shallowSlice(1, 2); } + { const a: string = new BufferList().toString(); } + { const a: string = new BufferList().toString("utf8"); } + { const a: string = new BufferList().toString("utf8", 1); } + { const a: string = new BufferList().toString("utf8", 1, 2); } + { const a: BufferList = new BufferList().consume(10); } + { const a: BufferList = new BufferList().duplicate(); } + new BufferList().destroy(); + new BufferList().then((x: Buffer) => null); + new BufferList().catch((err: any) => null); +} diff --git a/types/adone/test/glosses/collections/byte_array.ts b/types/adone/test/glosses/collections/byte_array.ts new file mode 100644 index 0000000000..7254008322 --- /dev/null +++ b/types/adone/test/glosses/collections/byte_array.ts @@ -0,0 +1,561 @@ +namespace adoneTests.collection.ByteArray { + const { + collection: { + ByteArray + } + } = adone; + + new ByteArray(); + new ByteArray(10); + new ByteArray(10, true); + + const buffer = new ByteArray(); + + buffer.woffset === 2; + buffer.roffset === 3; + buffer.noAssert === true; + buffer.buffer.writeUInt8(0, 0); + + namespace readBitSet { + const a: boolean[] = buffer.readBitSet(); + const b: boolean[] = buffer.readBitSet(10); + } + + namespace read { + const a: adone.collection.ByteArray = buffer.read(1); + const b: adone.collection.ByteArray = buffer.read(1, 10); + } + + namespace readInt8 { + const a: number = buffer.readInt8(); + const b: number = buffer.readInt8(10); + } + + namespace readUInt8 { + const a: number = buffer.readUInt8(); + const b: number = buffer.readUInt8(10); + } + + namespace readInt16LE { + const a: number = buffer.readInt16LE(); + const b: number = buffer.readInt16LE(10); + } + + namespace readUInt16LE { + const a: number = buffer.readUInt16LE(); + const b: number = buffer.readUInt16LE(10); + } + + namespace readInt16BE { + const a: number = buffer.readInt16BE(); + const b: number = buffer.readInt16BE(10); + } + + namespace readUInt16BE { + const a: number = buffer.readUInt16BE(); + const b: number = buffer.readUInt16BE(10); + } + + namespace readInt32LE { + const a: number = buffer.readInt32LE(); + const b: number = buffer.readInt32LE(10); + } + + namespace readUInt32LE { + const a: number = buffer.readUInt32LE(); + const b: number = buffer.readUInt32LE(10); + } + + namespace readInt32BE { + const a: number = buffer.readInt32BE(); + const b: number = buffer.readInt32BE(10); + } + + namespace readUInt32BE { + const a: number = buffer.readUInt32BE(); + const b: number = buffer.readUInt32BE(10); + } + + namespace readInt64LE { + const a: adone.math.Long = buffer.readInt64LE(); + const b: adone.math.Long = buffer.readInt64LE(10); + } + + namespace readUInt64LE { + const a: adone.math.Long = buffer.readUInt64LE(); + const b: adone.math.Long = buffer.readUInt64LE(10); + } + + namespace readInt64BE { + const a: adone.math.Long = buffer.readInt64BE(); + const b: adone.math.Long = buffer.readInt64BE(10); + } + + namespace readUInt64BE { + const a: adone.math.Long = buffer.readUInt64BE(); + const b: adone.math.Long = buffer.readUInt64BE(10); + } + + namespace readFloatLE { + const a: number = buffer.readFloatLE(); + const b: number = buffer.readFloatLE(10); + } + + namespace readFloatBE { + const a: number = buffer.readFloatBE(); + const b: number = buffer.readFloatBE(10); + } + + namespace readDoubleLE { + const a: number = buffer.readDoubleLE(); + const b: number = buffer.readDoubleLE(10); + } + + namespace readDoubleBE { + const a: number = buffer.readDoubleBE(); + const b: number = buffer.readDoubleBE(10); + } + + namespace write { + const a: adone.collection.ByteArray = buffer.write("1"); + const b: adone.collection.ByteArray = buffer.write(new ByteArray()); + const c: adone.collection.ByteArray = buffer.write(Buffer.alloc(10)); + const d: adone.collection.ByteArray = buffer.write(new Uint8Array([1, 2, 3])); + const e: adone.collection.ByteArray = buffer.write(new ArrayBuffer(10)); + const f: adone.collection.ByteArray = buffer.write("1", 10); + const g: adone.collection.ByteArray = buffer.write("1", 10, 10); + const h: adone.collection.ByteArray = buffer.write("1", 10, 10, "utf8"); + } + + namespace writeBitSet { + const a: adone.collection.ByteArray = buffer.writeBitSet([1, 2, 3]); + const b: number = buffer.writeBitSet([1, 2, 3], 10); + } + + namespace writeInt8 { + const a: adone.collection.ByteArray = buffer.writeInt8(10); + const b: adone.collection.ByteArray = buffer.writeInt8(10, 10); + } + + namespace writeUInt8 { + const a: adone.collection.ByteArray = buffer.writeUInt8(10); + const b: adone.collection.ByteArray = buffer.writeUInt8(10, 10); + } + + namespace writeInt16LE { + const a: adone.collection.ByteArray = buffer.writeInt16LE(10); + const b: adone.collection.ByteArray = buffer.writeInt16LE(10, 10); + } + + namespace writeInt16BE { + const a: adone.collection.ByteArray = buffer.writeInt16BE(10); + const b: adone.collection.ByteArray = buffer.writeInt16BE(10, 10); + } + + namespace writeUInt16LE { + const a: adone.collection.ByteArray = buffer.writeUInt16LE(10); + const b: adone.collection.ByteArray = buffer.writeUInt16LE(10, 10); + } + + namespace writeUInt16BE { + const a: adone.collection.ByteArray = buffer.writeUInt16BE(10); + const b: adone.collection.ByteArray = buffer.writeUInt16BE(10, 10); + } + + namespace writeInt32LE { + const a: adone.collection.ByteArray = buffer.writeInt32LE(10); + const b: adone.collection.ByteArray = buffer.writeInt32LE(10, 10); + } + + namespace writeInt32BE { + const a: adone.collection.ByteArray = buffer.writeInt32BE(10); + const b: adone.collection.ByteArray = buffer.writeInt32BE(10, 10); + } + + namespace writeUInt32LE { + const a: adone.collection.ByteArray = buffer.writeUInt32LE(10); + const b: adone.collection.ByteArray = buffer.writeUInt32LE(10, 10); + } + + namespace writeUInt32BE { + const a: adone.collection.ByteArray = buffer.writeUInt32BE(10); + const b: adone.collection.ByteArray = buffer.writeUInt32BE(10, 10); + } + + namespace writeInt64LE { + const a: adone.collection.ByteArray = buffer.writeInt64LE(10); + const b: adone.collection.ByteArray = buffer.writeInt64LE(10, 10); + } + + namespace writeInt64BE { + const a: adone.collection.ByteArray = buffer.writeInt64BE(10); + const b: adone.collection.ByteArray = buffer.writeInt64BE(10, 10); + } + + namespace writeUInt64LE { + const a: adone.collection.ByteArray = buffer.writeUInt64LE(10); + const b: adone.collection.ByteArray = buffer.writeUInt64LE(10, 10); + } + + namespace writeUInt64BE { + const a: adone.collection.ByteArray = buffer.writeUInt64BE(10); + const b: adone.collection.ByteArray = buffer.writeUInt64BE(10, 10); + } + + namespace writeFloatLE { + const a: adone.collection.ByteArray = buffer.writeFloatLE(10); + const b: adone.collection.ByteArray = buffer.writeFloatLE(10, 10); + } + + namespace writeFloatBE { + const a: adone.collection.ByteArray = buffer.writeFloatBE(10); + const b: adone.collection.ByteArray = buffer.writeFloatBE(10, 10); + } + + namespace writeDoubleLE { + const a: adone.collection.ByteArray = buffer.writeDoubleLE(10); + const b: adone.collection.ByteArray = buffer.writeDoubleLE(10, 10); + } + + namespace writeDoubleBE { + const a: adone.collection.ByteArray = buffer.writeDoubleBE(10); + const b: adone.collection.ByteArray = buffer.writeDoubleBE(10, 10); + } + + namespace writeVarInt32 { + const a: adone.collection.ByteArray = buffer.writeVarint32(10); + const b: number = buffer.writeVarint32(10, 10); + } + + namespace writeVarInt32ZigZag { + const a: adone.collection.ByteArray = buffer.writeVarint32ZigZag(10); + const b: number = buffer.writeVarint32ZigZag(10, 10); + } + + namespace readVarint32 { + const a: number = buffer.readVarint32(); + const b: { value: number, length: number } = buffer.readVarint32(10); + } + + namespace readVarint32ZigZag { + const a: number = buffer.readVarint32ZigZag(); + const b: { value: number, length: number } = buffer.readVarint32ZigZag(10); + } + + namespace writeVarint64 { + const a: adone.collection.ByteArray = buffer.writeVarint64(10); + const b: number = buffer.writeVarint64(10, 10); + } + + namespace writeVarint64ZigZag { + const a: adone.collection.ByteArray = buffer.writeVarint64ZigZag(10); + const b: number = buffer.writeVarint64ZigZag(10, 10); + } + + namespace readVarint64 { + const a: adone.math.Long = buffer.readVarint64(); + const b: { value: adone.math.Long, length: number } = buffer.readVarint64(10); + } + + namespace readVarint64ZigZag { + const a: adone.math.Long = buffer.readVarint64ZigZag(); + const b: { value: adone.math.Long, length: number } = buffer.readVarint64ZigZag(10); + } + + namespace writeCString { + const a: adone.collection.ByteArray = buffer.writeCString("asd"); + const b: number = buffer.writeCString("123", 10); + } + + namespace readCString { + const a: string = buffer.readCString(); + const b: { string: string, length: number } = buffer.readCString(10); + } + + namespace writeString { + const a: adone.collection.ByteArray = buffer.writeString("abc"); + const b: number = buffer.writeString("abc", 10); + } + + namespace readString { + const a: string = buffer.readString(10); + const b: string = buffer.readString(10, "b"); + const c: string = buffer.readString(10, "c"); + const d: { string: string, length: number } = buffer.readString(10, "c", 10); + } + + namespace writeVString { + const a: adone.collection.ByteArray = buffer.writeVString("abc"); + const b: number = buffer.writeVString("abc", 10); + } + + namespace readVString { + const a: string = buffer.readVString(); + const b: { string: string, length: number } = buffer.readVString(10); + } + + namespace appendTo { + const a: adone.collection.ByteArray = buffer.appendTo(new ByteArray()); + const b: adone.collection.ByteArray = buffer.appendTo(new ByteArray(), 10); + } + + namespace assert { + const a: adone.collection.ByteArray = buffer.assert(); + const b: adone.collection.ByteArray = buffer.assert(true); + } + + namespace capacity { + const a: number = buffer.capacity(); + } + + namespace clear { + const a: adone.collection.ByteArray = buffer.clear(); + } + + namespace copy { + const a: adone.collection.ByteArray = buffer.clone(); + const c: adone.collection.ByteArray = buffer.clone(true); + } + + namespace compact { + const a: adone.collection.ByteArray = buffer.compact(); + const b: adone.collection.ByteArray = buffer.compact(1); + const c: adone.collection.ByteArray = buffer.compact(1, 10); + } + + namespace copyTo { + const a: adone.collection.ByteArray = buffer.copyTo(new ByteArray()); + const b: adone.collection.ByteArray = buffer.copyTo(new ByteArray(), 0); + const c: adone.collection.ByteArray = buffer.copyTo(new ByteArray(), 0, 0); + const d: adone.collection.ByteArray = buffer.copyTo(new ByteArray(), 0, 0, 10); + } + + namespace ensureCapacity { + const a: adone.collection.ByteArray = buffer.ensureCapacity(10); + } + + namespace fill { + const a: adone.collection.ByteArray = buffer.fill("0"); + const b: adone.collection.ByteArray = buffer.fill(0); + const c: adone.collection.ByteArray = buffer.fill(0, 0); + const d: adone.collection.ByteArray = buffer.fill(0, 0, 10); + } + + namespace flip { + const a: adone.collection.ByteArray = buffer.flip(); + } + + namespace mark { + const a: adone.collection.ByteArray = buffer.mark(); + const b: adone.collection.ByteArray = buffer.mark(10); + } + + namespace prepend { + const a: adone.collection.ByteArray = buffer.prepend(""); + const b: adone.collection.ByteArray = buffer.prepend(new ByteArray()); + const c: adone.collection.ByteArray = buffer.prepend(Buffer.alloc(10)); + const d: adone.collection.ByteArray = buffer.prepend(new Uint8Array([1, 2, 3])); + const e: adone.collection.ByteArray = buffer.prepend(new ArrayBuffer(10)); + const f: adone.collection.ByteArray = buffer.prepend("", "utf8"); + const g: adone.collection.ByteArray = buffer.prepend("", "utf8", 10); + const h: adone.collection.ByteArray = buffer.prepend("", 10); + } + + namespace prependTo { + const a: adone.collection.ByteArray = buffer.prependTo(new ByteArray()); + const b: adone.collection.ByteArray = buffer.prependTo(new ByteArray(), 10); + } + + namespace remaining { + const a: number = buffer.remaining(); + } + + namespace reset { + const a: adone.collection.ByteArray = buffer.reset(); + } + + namespace resize { + const a: adone.collection.ByteArray = buffer.resize(10); + } + + namespace reverse { + const a: adone.collection.ByteArray = buffer.reverse(); + const b: adone.collection.ByteArray = buffer.reverse(1); + const c: adone.collection.ByteArray = buffer.reverse(1, 10); + } + + namespace skip { + const a: adone.collection.ByteArray = buffer.skip(10); + } + + namespace slice { + const a: adone.collection.ByteArray = buffer.slice(); + const b: adone.collection.ByteArray = buffer.slice(1); + const c: adone.collection.ByteArray = buffer.slice(1, 10); + } + + namespace toBuffer { + const a: Buffer = buffer.toBuffer(); + const b: Buffer = buffer.toBuffer(true); + const c: Buffer = buffer.toBuffer(true, 0); + const d: Buffer = buffer.toBuffer(true, 0, 10); + } + + namespace toArrayBuffer { + const a: ArrayBuffer = buffer.toArrayBuffer(); + } + + namespace toString { + const a: string = buffer.toString(); + const b: string = buffer.toString("utf8"); + const c: string = buffer.toString("utf8", 0); + const d: string = buffer.toString("utf8", 0, 10); + } + + namespace toBase64 { + const a: string = buffer.toBase64(); + const b: string = buffer.toBase64(0); + const c: string = buffer.toBase64(0, 10); + } + + namespace toBinary { + const a: string = buffer.toBinary(); + const b: string = buffer.toBinary(0); + const c: string = buffer.toBinary(0, 10); + } + + namespace toDebug { + const a: string = buffer.toDebug(); + const b: string = buffer.toDebug(true); + } + + namespace toUTF8 { + const a: string = buffer.toUTF8(); + const b: string = buffer.toUTF8(0); + const c: string = buffer.toUTF8(0, 10); + } + + namespace static { + namespace accessor { + const a: typeof Buffer = ByteArray.accessor(); + } + + namespace allocate { + const a: adone.collection.ByteArray = ByteArray.allocate(); + const b: adone.collection.ByteArray = ByteArray.allocate(10); + const c: adone.collection.ByteArray = ByteArray.allocate(10, true); + } + + namespace concat { + const a: adone.collection.ByteArray = ByteArray.concat([ + new ByteArray(), + Buffer.alloc(10), + new Uint8Array([1, 2, 3]), + new ArrayBuffer(10) + ]); + const b: adone.collection.ByteArray = ByteArray.concat([ + new ByteArray(), + Buffer.alloc(10), + new Uint8Array([1, 2, 3]), + new ArrayBuffer(10) + ], "utf8"); + const c: adone.collection.ByteArray = ByteArray.concat([ + new ByteArray(), + Buffer.alloc(10), + new Uint8Array([1, 2, 3]), + new ArrayBuffer(10) + ], "utf8", true); + } + + namespace type { + const a: typeof Buffer = ByteArray.type(); + } + + namespace wrap { + const a: adone.collection.ByteArray = ByteArray.wrap(""); + const b: adone.collection.ByteArray = ByteArray.wrap(new ByteArray()); + const c: adone.collection.ByteArray = ByteArray.wrap(Buffer.alloc(10)); + const d: adone.collection.ByteArray = ByteArray.wrap(new Uint8Array([1, 2, 3])); + const e: adone.collection.ByteArray = ByteArray.wrap(new ArrayBuffer(10)); + const f: adone.collection.ByteArray = ByteArray.wrap("", "utf8"); + const g: adone.collection.ByteArray = ByteArray.wrap("", "utf8", true); + } + + namespace calculateVarint32 { + const a: number = ByteArray.calculateVarint32(10); + } + + namespace zigZagEncode32 { + const a: number = ByteArray.zigZagEncode32(10); + } + + namespace zigZagDecode32 { + const a: number = ByteArray.zigZagDecode32(10); + } + + namespace calculateVarint64 { + const a: number = ByteArray.calculateVarint64(10); + const b: number = ByteArray.calculateVarint64("10"); + } + + namespace zigZagEncode64 { + const a: adone.math.Long = ByteArray.zigZagEncode64(10); + const b: adone.math.Long = ByteArray.zigZagEncode64("10"); + const c: adone.math.Long = ByteArray.zigZagEncode64(adone.math.Long.fromValue(10)); + } + + namespace zigZagDecode64 { + const a: adone.math.Long = ByteArray.zigZagDecode64(10); + const b: adone.math.Long = ByteArray.zigZagDecode64("10"); + const c: adone.math.Long = ByteArray.zigZagDecode64(adone.math.Long.fromValue(10)); + } + + namespace calculateUTF8Chars { + const a: number = ByteArray.calculateUTF8Chars("123"); + } + + namespace calculateString { + const a: number = ByteArray.calculateString("123"); + } + + namespace fromBase64 { + const a: adone.collection.ByteArray = ByteArray.fromBase64("123"); + } + + namespace btoa { + const a: string = ByteArray.btoa("123"); + } + + namespace atob { + const a: string = ByteArray.atob("123"); + } + + namespace fromBinary { + const a: adone.collection.ByteArray = ByteArray.fromBinary("123"); + } + + namespace fromDebug { + const a: adone.collection.ByteArray = ByteArray.fromDebug("12"); + const b: adone.collection.ByteArray = ByteArray.fromDebug("12", true); + } + + namespace fromHex { + const a: adone.collection.ByteArray = ByteArray.fromHex("192"); + const b: adone.collection.ByteArray = ByteArray.fromHex("192", true); + } + + namespace fromUTF8 { + const a: adone.collection.ByteArray = ByteArray.fromUTF8("123"); + const b: adone.collection.ByteArray = ByteArray.fromUTF8("123", true); + } + + namespace constants { + const a: number = ByteArray.DEFAULT_CAPACITY; + const b: boolean = ByteArray.DEFAULT_NOASSERT; + const c: number = ByteArray.MAX_VARINT32_BYTES; + const d: number = ByteArray.MAX_VARINT64_BYTES; + const e: string = ByteArray.METRICS_CHARS; + const f: string = ByteArray.METRICS_BYTES; + } + } +} diff --git a/types/adone/test/glosses/collections/default_map.ts b/types/adone/test/glosses/collections/default_map.ts new file mode 100644 index 0000000000..1273b91982 --- /dev/null +++ b/types/adone/test/glosses/collections/default_map.ts @@ -0,0 +1,14 @@ +namespace adoneTests.collection.DefaultMap { + const { + collection: { + DefaultMap + } + } = adone; + + type DefaultMap = adone.collection.DefaultMap; + + new DefaultMap(); + { const a: DefaultMap = new DefaultMap(undefined, [["1", 2]]); } + { const a: DefaultMap = new DefaultMap((key: string) => 123); } + { const a: DefaultMap = new DefaultMap({ a: 123 }); } +} diff --git a/types/adone/test/glosses/collections/fast_lru.ts b/types/adone/test/glosses/collections/fast_lru.ts new file mode 100644 index 0000000000..0e61f51dc5 --- /dev/null +++ b/types/adone/test/glosses/collections/fast_lru.ts @@ -0,0 +1,21 @@ +namespace adoneTests.collection.FastLRU { + const { + collection: { + FastLRU + } + } = adone; + + new FastLRU(); + new FastLRU(100); + new FastLRU(100, { dispose: (key: string, value: number) => null }); + { const a: number = new FastLRU().size; } + { const a: number | undefined = new FastLRU().get("key"); } + new FastLRU().set("key", 123); + { const a: boolean = new FastLRU().delete("key"); } + { const a: boolean = new FastLRU().has("key"); } + { const a: string[] = [...new FastLRU().keys()]; } + { const a: number[] = [...new FastLRU().values()]; } + { const a: number[] = [...new FastLRU().values()]; } + { const a: Array<[string, number]> = [...new FastLRU().entries()]; } + new FastLRU().clear(); +} diff --git a/types/adone/test/glosses/collections/linked_list.ts b/types/adone/test/glosses/collections/linked_list.ts new file mode 100644 index 0000000000..f64a32c1aa --- /dev/null +++ b/types/adone/test/glosses/collections/linked_list.ts @@ -0,0 +1,123 @@ +namespace adoneTests.collection.LinkedList { + const { + collection: { + LinkedList + } + } = adone; + + namespace creation { + new LinkedList(); + new LinkedList(10); + } + + namespace properties { + { const a: boolean = new LinkedList().full; } + { const a: boolean = new LinkedList().empty; } + { const a: number = new LinkedList().maxLength; } + { const a: number = new LinkedList().length; } + { const a: boolean = new LinkedList().autoresize; } + } + + namespace resize { + { const a: boolean = new LinkedList().resize(100).full; } + } + + namespace push { + const a = new LinkedList().push(10); + a.next; + a.prev; + const b: number = a.value; + } + + namespace pop { + const a: number | undefined = new LinkedList().pop(); + } + + namespace shift { + const a: number | undefined = new LinkedList().shift(); + } + + namespace unshift { + const a = new LinkedList().unshift("hello"); + a.next; + a.prev; + const b: string = a.value; + } + + namespace pushNode { + const a = new LinkedList(); + const node = a.push("1230"); + a.pushNode(node); + } + + namespace unshiftNode { + const a = new LinkedList(); + const node = a.push(10); + a.unshiftNode(node); + } + + namespace removeNode { + const a = new LinkedList(); + const node = a.unshift("10"); + a.removeNode(node); + } + + namespace clear { + new LinkedList().clear(); + new LinkedList().clear(true); + } + + namespace toArray { + const a = new LinkedList(); + const b: number[] = a.toArray(); + } + + namespace front { + const a = new LinkedList(); + const b: number = a.front; + } + + namespace back { + const a = new LinkedList(); + const b: number = a.back; + } + + namespace iterating { + const a = new LinkedList(); + for (const b of a) { + const i: string = b; + } + const c = new LinkedList(); + for (const b of c) { + const i: number = b; + } + } + + namespace nextNode { + const a = new LinkedList(); + const n1 = a.push("h"); + const n2 = a.nextNode(n1); + n1.next; + n1.prev; + const t: string = n1.value; + } + + namespace map { + const a = new LinkedList(); + const f = (a: number, idx: number) => `${a}${idx}`; + const b = a.map(f); + const c: string = b.front; + } + + namespace forEach { + const a = new LinkedList(); + + a.forEach((a: number, b: number) => { + const c = a + b; + }); + } + + namespace static { + const a: number = LinkedList.DEFAULT_LENGTH; + } +} diff --git a/types/adone/test/glosses/collections/lru.ts b/types/adone/test/glosses/collections/lru.ts new file mode 100644 index 0000000000..934e5a1fbf --- /dev/null +++ b/types/adone/test/glosses/collections/lru.ts @@ -0,0 +1,67 @@ +namespace adoneTests.collection.LRU { + const { + collection: { + LRU + } + } = adone; + + type LRU = adone.collection.LRU; + + new LRU(); + new LRU(100); + new LRU({}); + new LRU({ max: 100 }); + new LRU({ dispose: (key: string, value: number) => null }); + new LRU({ maxAge: 100 }); + new LRU({ noDisposeOnSet: false }); + new LRU({ stale: true }); + { const a: number = new LRU().max; } + { new LRU().max = 100; } + { const a: boolean = new LRU().allowStale; } + { new LRU().allowStale = false; } + { const a: number = new LRU().maxAge; } + { new LRU().maxAge = 100; } + { const a: (v: number, k: string) => number = new LRU().lengthCalculator; } + { new LRU().lengthCalculator = () => 123; } + { const a: number = new LRU().length; } + { const a: number = new LRU().itemCount; } + new LRU().rforEach((value: number, key: string) => null); + new LRU().rforEach(function (value: number, key: string) { + const b: number = this.a; + }, { a: 1 }); + new LRU().forEach((value: number, key: string) => null); + new LRU().forEach(function (value: number, key: string) { + const b: number = this.a; + }, { a: 1 }); + { const a: string[] = new LRU().keys(); } + { const a: number[] = new LRU().values(); } + new LRU().reset(); + { + const a: Array> = new LRU().dump(); + const [b] = a; + { const c: number = b.e; } + { const c: string = b.key; } + { const c: number = b.value; } + } + { + const a: adone.collection.LinkedList> = new LRU().dumpLru(); + const b = a.shift(); + if (b !== undefined) { + { const a: string = b.key; } + { const a: number = b.value; } + { const a: number = b.now; } + { const a: number = b.maxAge; } + } + } + { const a: string = new LRU().inspect(); } + { const a: string = new LRU().inspect({}); } + { const a: boolean = new LRU().set("asd", 13); } + { const a: boolean = new LRU().set("asd", 13, 100500); } + { const a: boolean = new LRU().has("asd"); } + { const a: number | undefined = new LRU().get("asd"); } + { const a: number | undefined = new LRU().peek("asd"); } + { const a: adone.collection.I.LRU.Entry = new LRU().pop(); } + new LRU().del("asd"); + new LRU().load(new LRU().dump()); + new LRU().prune(); +} diff --git a/types/adone/test/glosses/collections/map_cache.ts b/types/adone/test/glosses/collections/map_cache.ts new file mode 100644 index 0000000000..bcd0ffb887 --- /dev/null +++ b/types/adone/test/glosses/collections/map_cache.ts @@ -0,0 +1,21 @@ +namespace adoneTests.collection.MapCache { + const { + collection: { + MapCache + } + } = adone; + + new MapCache(); + + new MapCache().has("hello"); + new MapCache().get("hello"); + new MapCache().set("hello", "world"); + new MapCache().delete("hello"); + new MapCache().clear(); + + { + const a = new MapCache(); + a.set("a", "b"); + a.get("a").charCodeAt(20); + } +} diff --git a/types/adone/test/glosses/collections/ns_cache.ts b/types/adone/test/glosses/collections/ns_cache.ts new file mode 100644 index 0000000000..a8e8c14397 --- /dev/null +++ b/types/adone/test/glosses/collections/ns_cache.ts @@ -0,0 +1,21 @@ +namespace adoneTests.collection.NSCache { + const { + collection: { + NSCache + } + } = adone; + + new NSCache(10, ["a", "b", "c"]); + new NSCache(10, ["a", "b", "c"]).resize(100); + new NSCache(10, ["a", "b", "c"]).set("a", "b", "c"); + new NSCache(10, ["a", "b", "c"]).get("a", "b"); + new NSCache(10, ["a", "b", "c"]).has("a", "b"); + new NSCache(10, ["a", "b", "c"]).delete("a", "b"); + new NSCache(10, ["a", "b", "c"]).clear(); + + { + const a = new NSCache(10, ["a", "b", "c"]); + a.set("a", "b", "c"); + a.get("a", "b").charCodeAt(100); + } +} diff --git a/types/adone/test/glosses/collections/priority_queue.ts b/types/adone/test/glosses/collections/priority_queue.ts new file mode 100644 index 0000000000..950e7394e7 --- /dev/null +++ b/types/adone/test/glosses/collections/priority_queue.ts @@ -0,0 +1,36 @@ +namespace adoneTests.collection.PriorityQueue { + const { + collection: { + PriorityQueue + } + } = adone; + + type PriorityQueue = adone.collection.PriorityQueue; + + { const a: boolean = new PriorityQueue().empty; } + { const a: number = new PriorityQueue().length; } + new PriorityQueue(); + new PriorityQueue({}); + new PriorityQueue({ + compare(a: number, b: number) { + return a - b; + } + }); + new PriorityQueue({ + priority(a: string, b: string) { + return a.length - b.length; + } + }); + { const a: PriorityQueue = new PriorityQueue().clone(); } + { const a: PriorityQueue = new PriorityQueue().push("123"); } + { const a: string | undefined = new PriorityQueue().pop(); } + { const a: PriorityQueue = new PriorityQueue().delete("123"); } + { const a: PriorityQueue = new PriorityQueue().delete("123"); } + { const a: string = new PriorityQueue().replace("123"); } + { const a: string = new PriorityQueue().pushpop("123"); } + { const a: string[] = new PriorityQueue().toArray(); } + { const a: PriorityQueue = PriorityQueue.from(["1"]); } + { const a: PriorityQueue = PriorityQueue.from(["1"], {}); } + { const a: PriorityQueue = PriorityQueue.from(["1"], { compare: (a: string, b: string) => a.length - b.length }); } + { const a: PriorityQueue = PriorityQueue.from(["1"], { priority: (a: string, b: string) => a.length - b.length }); } +} diff --git a/types/adone/test/glosses/collections/queue.ts b/types/adone/test/glosses/collections/queue.ts new file mode 100644 index 0000000000..fd6df7f39b --- /dev/null +++ b/types/adone/test/glosses/collections/queue.ts @@ -0,0 +1,17 @@ +namespace adoneTests.collection.Queue { + const { + collection: { + Queue + } + } = adone; + + type Queue = adone.collection.Queue; + + new Queue(); + { const a: Queue = new Queue().push(123).push(123); } + { const a: number | undefined = new Queue().push(123).pop(); } + { const a: string | undefined = new Queue().push(123).pop(); } + { const a: boolean = new Queue().full; } + { const a: number = new Queue().length; } + { const a: boolean = new Queue().empty; } +} diff --git a/types/adone/test/glosses/collections/rb_tree.ts b/types/adone/test/glosses/collections/rb_tree.ts new file mode 100644 index 0000000000..1b624284f6 --- /dev/null +++ b/types/adone/test/glosses/collections/rb_tree.ts @@ -0,0 +1,48 @@ +namespace adoneTests.collection.RedBlackTree { + const { + collection: { + RedBlackTree + } + } = adone; + + type RedBlackTree = adone.collection.RedBlackTree; + type RedBlackTreeIterator = adone.collection.I.RedBlackTree.Iterator; + type RedBlackTreeNode = adone.collection.I.RedBlackTree.Node; + + new RedBlackTree(); + new RedBlackTree((a: string, b: string) => a.length - b.length); + new RedBlackTree(undefined, new RedBlackTree()); + { const a: string[] = new RedBlackTree().keys; } + { const a: number[] = new RedBlackTree().values; } + { const a: number = new RedBlackTree().length; } + { + const a: RedBlackTreeIterator = new RedBlackTree().begin; + { const b: boolean = a.valid; } + { const b: RedBlackTreeNode | null = a.node; } + { const b: string | undefined = a.key; } + { const b: number | undefined = a.value; } + { const b: number = a.index; } + { const b: boolean = a.hasNext; } + { const b: boolean = a.hasPrev; } + { const b: RedBlackTree = a.tree; } + { const b: RedBlackTreeIterator = a.clone(); } + { const b: RedBlackTree = a.remove(); } + a.next(); + { const b: RedBlackTree = a.update(333); } + a.prev(); + } + { const a: RedBlackTreeIterator = new RedBlackTree().end; } + { const a: RedBlackTree = new RedBlackTree().insert("123", 456); } + { const a: number = new RedBlackTree().forEach((key: string, value: number) => value); } + { const a: number = new RedBlackTree().forEach((key: string, value: number) => value, "1"); } + { const a: number = new RedBlackTree().forEach((key: string, value: number) => value, "1", "2"); } + { const a: RedBlackTreeIterator = new RedBlackTree().at(1); } + { const a: RedBlackTreeIterator = new RedBlackTree().ge("1"); } + { const a: RedBlackTreeIterator = new RedBlackTree().gt("1"); } + { const a: RedBlackTreeIterator = new RedBlackTree().lt("1"); } + { const a: RedBlackTreeIterator = new RedBlackTree().le("1"); } + { const a: RedBlackTreeIterator | null = new RedBlackTree().find("1"); } + { const a: RedBlackTree = new RedBlackTree().remove("1"); } + { const a: RedBlackTree = new RedBlackTree().remove("1"); } + { const a: number | undefined = new RedBlackTree().get("1"); } +} diff --git a/types/adone/test/glosses/collections/refcounted_cache.ts b/types/adone/test/glosses/collections/refcounted_cache.ts new file mode 100644 index 0000000000..6262d57d60 --- /dev/null +++ b/types/adone/test/glosses/collections/refcounted_cache.ts @@ -0,0 +1,17 @@ +namespace adoneTests.collection.RefcountedCache { + const { + collection: { + RefcountedCache + } + } = adone; + + new RefcountedCache(); + new RefcountedCache().ref("a"); + new RefcountedCache().unref("a"); + new RefcountedCache().references("a") === 5; + + { + const a = new RefcountedCache(); + a.get("b").charCodeAt(100); + } +} diff --git a/types/adone/test/glosses/collections/set.ts b/types/adone/test/glosses/collections/set.ts new file mode 100644 index 0000000000..2e2314956e --- /dev/null +++ b/types/adone/test/glosses/collections/set.ts @@ -0,0 +1,26 @@ +namespace adoneTests.collection.Set { + const { + collection: { + Set + } + } = adone; + + new Set().add("a"); + new Set().has("a"); + new Set().delete("a"); + new Set().get("a"); + new Set().has("a") === true; + new Set().only(); + new Set().size === 5; + + { + const a = new Set(); + + a.add(1); + a.has(2); + a.delete(2); + a.get(2); // ??? + a.only() === 5; + a.size === 5; + } +} diff --git a/types/adone/test/glosses/collections/stack.ts b/types/adone/test/glosses/collections/stack.ts new file mode 100644 index 0000000000..df13f82f8e --- /dev/null +++ b/types/adone/test/glosses/collections/stack.ts @@ -0,0 +1,16 @@ +namespace adoneTests.collection.Stack { + const { + collection: { + Stack + } + } = adone; + + type Stack = adone.collection.Stack; + + { const a: boolean = new Stack().empty; } + { const a: number = new Stack().top; } + { const a: Stack = new Stack().push(123); } + { const a: number | undefined = new Stack().pop(); } + { const a: number[] = [...new Stack()]; } + { const a: Stack = Stack.from([1, 2, 3]); } +} diff --git a/types/adone/test/glosses/collections/timedout_map.ts b/types/adone/test/glosses/collections/timedout_map.ts new file mode 100644 index 0000000000..ffca754e2a --- /dev/null +++ b/types/adone/test/glosses/collections/timedout_map.ts @@ -0,0 +1,22 @@ +namespace adoneTests.collection.TimedoutMap { + const { + collection: { + TimedoutMap + } + } = adone; + + type TimedoutMap = adone.collection.TimedoutMap; + + new TimedoutMap(); + new TimedoutMap(1000); + new TimedoutMap(1000, (key: string) => null); + { + const a: TimedoutMap = new TimedoutMap().forEach((value: number, key: string) => null); + } + { + const a: TimedoutMap = new TimedoutMap().forEach(function (value: number, key: string) { + const a: number = this.a; + }, { a: 1 }); + } + { const a: boolean = new TimedoutMap().delete("123"); } +} diff --git a/types/adone/test/glosses/data.ts b/types/adone/test/glosses/data.ts index e8ccedddcc..00403a56da 100644 --- a/types/adone/test/glosses/data.ts +++ b/types/adone/test/glosses/data.ts @@ -11,6 +11,7 @@ namespace dataTests { { const a: Buffer = json.encode(1, { replacer: ["a", "b", "c"] }); } { const a: Buffer = json.encode(1, { replacer: (k: string, v: any) => null }); } { const a: Buffer = json.encode(1, { space: " " }); } + { const a: Buffer = json.encode(1, { newline: true }); } json.decode("123"); json.decode(Buffer.from("123")); @@ -52,6 +53,8 @@ namespace dataTests { mpak.decode(new Uint8Array(10)); mpak.decode(new ArrayBuffer(10)); + mpak.tryDecode(new adone.collection.ByteArray()); + new mpak.Encoder([]); new mpak.Encoder([{ type: 10, @@ -73,6 +76,9 @@ namespace dataTests { new mpak.Decoder([]).decode(new ArrayBuffer(10)); new mpak.Decoder([]).tryDecode(adone.collection.ByteArray.wrap("hello")); + new mpak.Serializer(); + new mpak.Serializer(100); + mpak.registerCommonTypesFor(new mpak.Serializer()); { const a: adone.data.mpak.Encoder = new mpak.Serializer().encoder; } { const a: adone.data.mpak.Decoder = new mpak.Serializer().decoder; } { const a: adone.data.mpak.Serializer = new mpak.Serializer().registerEncoder(10, (x) => true, (x) => new adone.collection.ByteArray(10)); } @@ -125,6 +131,7 @@ namespace dataTests { { const a: string = base64.decode("string", {}); } { const a: string = base64.decode("string", { buffer: false }); } { const a: Buffer = base64.decode("string", { buffer: true }); } + { const a: string = base64.decode("string", { encoding: "utf8" }); } { const a: string = base64.encodeVLQ(123); } { const a: number = base64.decodeVLQ("H"); } @@ -563,4 +570,277 @@ namespace dataTests { bson.decode(bson.encode({ a: 1 }), { promoteLongs: false }).a; bson.decode(bson.encode({ a: 1 }), { promoteValues: true }).a; } + + namespace protobuf { + const { + protobuf + } = data; + + protobuf.create("hello"); + protobuf.create(Buffer.from("hello")); + protobuf.create({}); + protobuf.create({}, {}); + + namespace schema { + const { + schema + } = protobuf; + + const s = schema.parse("hello"); + s.syntax; + s.package; + if (!adone.is.null(s.package)) { + const c: string = s.package; + } + s.imports[0].charCodeAt(100); + + namespace enums { + const [a] = s.enums; + a.name.charCodeAt(100); + a.values; + a.options; + } + + namespace message { + const [msg] = s.messages; + msg.name; + { + const [a] = msg.enums; + a.name; + a.options; + a.values; + } + { + const [a] = msg.extends; + a.name; + a.message; + } + { + const [a] = msg.messages; + a.name; + a.enums; + a.extends; + a.messages; + a.fields; + a.extensions; + } + { + const [a] = msg.fields; + if (!adone.is.null(a.name)) { + a.name.charCodeAt(100); + } + if (!adone.is.null(a.type)) { + a.type.charCodeAt(100); + } + a.tag === 3; + if (!adone.is.null(a.map)) { + a.map.from.charCodeAt(100); + a.map.to.charCodeAt(100); + } + if (!adone.is.null(a.oneof)) { + a.oneof.charCodeAt(100); + } + a.required === false; + a.repeated === true; + a.options; + } + if (!adone.is.null(msg.extensions)) { + msg.extensions.from === 2; + msg.extensions.to === 3; + } + } + + s.options; + + s.extends[0].message; + s.extends[0].name; + + if (!adone.is.nil(s.services)) { + const [svc] = s.services; + + svc.name.charCodeAt(100); + svc.options; + + const [m] = svc.methods; + + m.name.charCodeAt(100); + if (!adone.is.null(m.input_type)) { + m.input_type.charCodeAt(100); + } + if (!adone.is.null(m.output_type)) { + m.output_type.charCodeAt(100); + } + m.client_streaming === true; + m.server_streaming === true; + m.options; + } + } + } + + namespace base32 { + const { + base32 + } = data; + + base32.charmap("asd"); + base32.charmap("asd", {}); + + base32.rfc4648.alphabet.charCodeAt(0); + base32.rfc4648.charmap["X"] === 2; + + base32.crockford.alphabet.charCodeAt(0); + base32.crockford.charmap["X"] === 2; + + base32.base32hex.alphabet.charCodeAt(0); + base32.base32hex.charmap["X"] === 2; + + namespace decoder { + const { + Decoder + } = base32; + new Decoder(); + new Decoder({ + type: "base32hex" + }); + new Decoder({ + type: "crockford" + }); + new Decoder({ + type: "rfc4648" + }); + new Decoder({ + type: "rfc4648", + charmap: {} + }); + const d = new Decoder(); + d.write("asd").write("aa"); + { const a: Buffer = d.finalize(); } + { const a: Buffer = d.finalize("c"); } + } + + namespace encoder { + const { + Encoder + } = base32; + + new Encoder(); + new Encoder({ + type: "base32hex" + }); + new Encoder({ + type: "crockford" + }); + new Encoder({ + type: "rfc4648" + }); + new Encoder({ + type: "rfc4648", + alphabet: "a" + }); + + const e = new Encoder(); + e.write(Buffer.from("b")).write(Buffer.from("a")); + { const a: string = e.finalize(); } + { const a: string = e.finalize(Buffer.from("c")); } + } + + base32.encode(Buffer.from("hello")).charCodeAt(100); + base32.encode(Buffer.from("hello"), { + type: "rfc4648" + }).charCodeAt(100); + base32.encode(Buffer.from("hello"), { + type: "crockford" + }).charCodeAt(100); + base32.encode(Buffer.from("hello"), { + type: "base32hex" + }).charCodeAt(100); + base32.encode(Buffer.from("hello"), { + type: "base32hex", + alphabet: "asd" + }).charCodeAt(100); + + base32.decode("asd").writeUInt8(100, 0); + base32.decode("asd", { + type: "base32hex" + }).writeUInt8(100, 0); + base32.decode("asd", { + type: "crockford" + }).writeUInt8(100, 0); + base32.decode("asd", { + type: "rfc4648" + }).writeUInt8(100, 0); + base32.decode("asd", { + type: "rfc4648", + charmap: {} + }).writeUInt8(100, 0); + } + + namespace basex { + const { + basex + } = data; + + const d = basex("abc"); + const a: Buffer = d.decode("str"); + const b: string = d.encode(Buffer.from("hello")); + const c: Buffer = d.decodeUnsafe("hello"); + } + + namespace base58 { + const { + base58 + } = data; + + const a: Buffer = base58.decode("str"); + const b: string = base58.encode(Buffer.from("hello")); + const c: Buffer = base58.decodeUnsafe("hello"); + } + + namespace base64url { + const { + base64url + } = data; + + base64url.unescape("a").charCodeAt(100); + base64url.escape("a").charCodeAt(100); + + base64url.encode("a").charCodeAt(100); + base64url.encode(Buffer.from("a")).charCodeAt(100); + base64url.encode(Buffer.from("a"), {}).charCodeAt(100); + base64url.encode(Buffer.from("a"), { + encoding: "utf8" + }).charCodeAt(100); + + base64url.decode("a").charCodeAt(100); + base64url.decode("a", { buffer: true }).writeUInt8(0, 0); + base64url.decode("a", { encoding: "utf8" }).charCodeAt(100); + } + + namespace varint { + const { + varint + } = data; + + varint.encode(12)[0]; + varint.encode(12, [])[0]; + varint.encode(12, [], 1)[0]; + + varint.decode(Buffer.from("hello")) === 5; + varint.decode(Buffer.from("hello"), 2) === 5; + varint.encodingLength(100500) === 5; + } + + namespace varintSigned { + const { + varintSigned + } = data; + + varintSigned.encode(12)[0]; + varintSigned.encode(12, [])[0]; + varintSigned.encode(12, [], 1)[0]; + + varintSigned.decode(Buffer.from("hello")) === 5; + varintSigned.decode(Buffer.from("hello"), 2) === 5; + varintSigned.encodingLength(100500) === 5; + } } diff --git a/types/adone/test/glosses/events.ts b/types/adone/test/glosses/events.ts index 7f31089b52..448867951e 100644 --- a/types/adone/test/glosses/events.ts +++ b/types/adone/test/glosses/events.ts @@ -1,76 +1,86 @@ namespace eventsTests { namespace EventEmitter { namespace static { - const a: number = adone.event.EventEmitter.listenerCount(new adone.event.EventEmitter(), "event"); - const b: number = adone.event.EventEmitter.defaultMaxListeners; + const a: number = adone.event.Emitter.listenerCount(new adone.event.Emitter(), "event"); + const b: number = adone.event.Emitter.defaultMaxListeners; } namespace addListener { - const a: adone.event.EventEmitter = new adone.event.EventEmitter().addListener("event", () => { }); - const b: adone.event.EventEmitter = new adone.event.EventEmitter().addListener(Symbol("event"), () => { }); + const a: adone.event.Emitter = new adone.event.Emitter().addListener("event", () => { }); + const b: adone.event.Emitter = new adone.event.Emitter().addListener(Symbol("event"), () => { }); } namespace on { - const a: adone.event.EventEmitter = new adone.event.EventEmitter().on("event", () => { }); - const b: adone.event.EventEmitter = new adone.event.EventEmitter().on(Symbol("event"), () => { }); + const a: adone.event.Emitter = new adone.event.Emitter().on("event", () => { }); + const b: adone.event.Emitter = new adone.event.Emitter().on(Symbol("event"), () => { }); } namespace once { - const a: adone.event.EventEmitter = new adone.event.EventEmitter().once("event", () => { }); - const b: adone.event.EventEmitter = new adone.event.EventEmitter().once(Symbol("event"), () => { }); + const a: adone.event.Emitter = new adone.event.Emitter().once("event", () => { }); + const b: adone.event.Emitter = new adone.event.Emitter().once(Symbol("event"), () => { }); } namespace prependListener { - const a: adone.event.EventEmitter = new adone.event.EventEmitter().prependListener("event", () => { }); - const b: adone.event.EventEmitter = new adone.event.EventEmitter().prependListener(Symbol("event"), () => { }); + const a: adone.event.Emitter = new adone.event.Emitter().prependListener("event", () => { }); + const b: adone.event.Emitter = new adone.event.Emitter().prependListener(Symbol("event"), () => { }); } namespace prependOnceListener { - const a: adone.event.EventEmitter = new adone.event.EventEmitter().prependOnceListener("event", () => { }); - const b: adone.event.EventEmitter = new adone.event.EventEmitter().prependOnceListener(Symbol("event"), () => { }); + const a: adone.event.Emitter = new adone.event.Emitter().prependOnceListener("event", () => { }); + const b: adone.event.Emitter = new adone.event.Emitter().prependOnceListener(Symbol("event"), () => { }); } namespace removeListener { - const a: adone.event.EventEmitter = new adone.event.EventEmitter().removeListener("event", () => { }); - const b: adone.event.EventEmitter = new adone.event.EventEmitter().removeListener(Symbol("event"), () => { }); + const a: adone.event.Emitter = new adone.event.Emitter().removeListener("event", () => { }); + const b: adone.event.Emitter = new adone.event.Emitter().removeListener(Symbol("event"), () => { }); } namespace removeAllListeners { - const a: adone.event.EventEmitter = new adone.event.EventEmitter().removeAllListeners("event"); - const b: adone.event.EventEmitter = new adone.event.EventEmitter().removeAllListeners(Symbol("event")); + const a: adone.event.Emitter = new adone.event.Emitter().removeAllListeners("event"); + const b: adone.event.Emitter = new adone.event.Emitter().removeAllListeners(Symbol("event")); } namespace setMaxListeners { - const a: adone.event.EventEmitter = new adone.event.EventEmitter().setMaxListeners(10); + const a: adone.event.Emitter = new adone.event.Emitter().setMaxListeners(10); } namespace getMaxListeners { - const a: number = new adone.event.EventEmitter().getMaxListeners(); + const a: number = new adone.event.Emitter().getMaxListeners(); } namespace listeners { - const a: Array<(...args: any[]) => any> = new adone.event.EventEmitter().listeners("event"); - const b: Array<(...args: any[]) => any> = new adone.event.EventEmitter().listeners(Symbol("event")); + const a: Array<(...args: any[]) => any> = new adone.event.Emitter().listeners("event"); + const b: Array<(...args: any[]) => any> = new adone.event.Emitter().listeners(Symbol("event")); } namespace emit { - const a: boolean = new adone.event.EventEmitter().emit("event", 1, 2, 3); - const b: boolean = new adone.event.EventEmitter().emit(Symbol("event"), 1, 2, 3); + const a: boolean = new adone.event.Emitter().emit("event", 1, 2, 3); + const b: boolean = new adone.event.Emitter().emit(Symbol("event"), 1, 2, 3); } namespace eventNames { - const a: Array = new adone.event.EventEmitter().eventNames(); - const b: Array = new adone.event.EventEmitter().eventNames(); + const a: Array = new adone.event.Emitter().eventNames(); + const b: Array = new adone.event.Emitter().eventNames(); } namespace listenerCount { - const a: number = new adone.event.EventEmitter().listenerCount("event"); - const b: number = new adone.event.EventEmitter().listenerCount(Symbol("event")); + const a: number = new adone.event.Emitter().listenerCount("event"); + const b: number = new adone.event.Emitter().listenerCount(Symbol("event")); + } + + namespace propagateEvents { + const e = new adone.event.Emitter().propagateEvents(new adone.event.Emitter(), ["a"]); + e.end(); + } + + namespace staticPropagateEvents { + const e = adone.event.Emitter.propagateEvents(new adone.event.Emitter(), new adone.event.Emitter(), ["a"]); + e.end(); } } namespace AsyncEmitter { - const a: adone.event.EventEmitter = new adone.event.AsyncEmitter(); + const a: adone.event.Emitter = new adone.event.AsyncEmitter(); new adone.event.AsyncEmitter(10); namespace setConcurrency { diff --git a/types/adone/test/glosses/exceptions.ts b/types/adone/test/glosses/exceptions.ts index e13dc3fff7..d9694990d0 100644 --- a/types/adone/test/glosses/exceptions.ts +++ b/types/adone/test/glosses/exceptions.ts @@ -1,36 +1,36 @@ namespace ExcetpionsTests { - { const a: Error = new adone.x.Exception(); } - { const a: Error = new adone.x.Exception("message"); } - { const a: Error = new adone.x.Exception(new Error()); } - { const a: Error = new adone.x.Exception(new Error(), true); } - { const a: adone.x.Exception = new adone.x.Runtime(); } - { const a: adone.x.Exception = new adone.x.IncompleteBufferError(); } - { const a: adone.x.Exception = new adone.x.NotImplemented(); } - { const a: adone.x.Exception = new adone.x.IllegalState(); } - { const a: adone.x.Exception = new adone.x.NotValid(); } - { const a: adone.x.Exception = new adone.x.Unknown(); } - { const a: adone.x.Exception = new adone.x.NotExists(); } - { const a: adone.x.Exception = new adone.x.Exists(); } - { const a: adone.x.Exception = new adone.x.Empty(); } - { const a: adone.x.Exception = new adone.x.InvalidAccess(); } - { const a: adone.x.Exception = new adone.x.NotSupported(); } - { const a: adone.x.Exception = new adone.x.InvalidArgument(); } - { const a: adone.x.Exception = new adone.x.InvalidNumberOfArguments(); } - { const a: adone.x.Exception = new adone.x.NotFound(); } - { const a: adone.x.Exception = new adone.x.Timeout(); } - { const a: adone.x.Exception = new adone.x.Incorrect(); } - { const a: adone.x.Exception = new adone.x.NotAllowed(); } - { const a: adone.x.Exception = new adone.x.LimitExceeded(); } - { const a: adone.x.Exception = new adone.x.Encoding(); } - { const a: adone.x.Exception = new adone.x.Network(); } - { const a: adone.x.Exception = new adone.x.Bind(); } - { const a: adone.x.Exception = new adone.x.Connect(); } - { const a: adone.x.Exception = new adone.x.Database(); } - { const a: adone.x.Exception = new adone.x.DatabaseInitialization(); } - { const a: adone.x.Exception = new adone.x.DatabaseOpen(); } - { const a: adone.x.Exception = new adone.x.DatabaseRead(); } - { const a: adone.x.Exception = new adone.x.DatabaseWrite(); } - { const a: adone.x.Exception = new adone.x.NetronIllegalState(); } - { const a: adone.x.Exception = new adone.x.NetronPeerDisconnected(); } - { const a: adone.x.Exception = new adone.x.NetronTimeout(); } + { const a: Error = new adone.exception.Exception(); } + { const a: Error = new adone.exception.Exception("message"); } + { const a: Error = new adone.exception.Exception(new Error()); } + { const a: Error = new adone.exception.Exception(new Error(), true); } + { const a: adone.exception.Exception = new adone.exception.Runtime(); } + { const a: adone.exception.Exception = new adone.exception.IncompleteBufferError(); } + { const a: adone.exception.Exception = new adone.exception.NotImplemented(); } + { const a: adone.exception.Exception = new adone.exception.IllegalState(); } + { const a: adone.exception.Exception = new adone.exception.NotValid(); } + { const a: adone.exception.Exception = new adone.exception.Unknown(); } + { const a: adone.exception.Exception = new adone.exception.NotExists(); } + { const a: adone.exception.Exception = new adone.exception.Exists(); } + { const a: adone.exception.Exception = new adone.exception.Empty(); } + { const a: adone.exception.Exception = new adone.exception.InvalidAccess(); } + { const a: adone.exception.Exception = new adone.exception.NotSupported(); } + { const a: adone.exception.Exception = new adone.exception.InvalidArgument(); } + { const a: adone.exception.Exception = new adone.exception.InvalidNumberOfArguments(); } + { const a: adone.exception.Exception = new adone.exception.NotFound(); } + { const a: adone.exception.Exception = new adone.exception.Timeout(); } + { const a: adone.exception.Exception = new adone.exception.Incorrect(); } + { const a: adone.exception.Exception = new adone.exception.NotAllowed(); } + { const a: adone.exception.Exception = new adone.exception.LimitExceeded(); } + { const a: adone.exception.Exception = new adone.exception.Encoding(); } + { const a: adone.exception.Exception = new adone.exception.Network(); } + { const a: adone.exception.Exception = new adone.exception.Bind(); } + { const a: adone.exception.Exception = new adone.exception.Connect(); } + { const a: adone.exception.Exception = new adone.exception.Database(); } + { const a: adone.exception.Exception = new adone.exception.DatabaseInitialization(); } + { const a: adone.exception.Exception = new adone.exception.DatabaseOpen(); } + { const a: adone.exception.Exception = new adone.exception.DatabaseRead(); } + { const a: adone.exception.Exception = new adone.exception.DatabaseWrite(); } + { const a: adone.exception.Exception = new adone.exception.NetronIllegalState(); } + { const a: adone.exception.Exception = new adone.exception.NetronPeerDisconnected(); } + { const a: adone.exception.Exception = new adone.exception.NetronTimeout(); } } diff --git a/types/adone/test/glosses/fake.ts b/types/adone/test/glosses/fake.ts new file mode 100644 index 0000000000..016d7ba7b0 --- /dev/null +++ b/types/adone/test/glosses/fake.ts @@ -0,0 +1,206 @@ +namespace adoneTests.fake { + const { + fake + } = adone; + + { const a: string = fake.address.zipCode(); } + { const a: string = fake.address.zipCode('###'); } + { const a: string = fake.address.city(); } + { const a: string = fake.address.city(0); } + { const a: string = fake.address.cityPrefix(); } + { const a: string = fake.address.citySuffix(); } + { const a: string = fake.address.streetName(); } + { const a: string = fake.address.streetAddress(); } + { const a: string = fake.address.streetAddress(false); } + { const a: string = fake.address.streetSuffix(); } + { const a: string = fake.address.streetPrefix(); } + { const a: string = fake.address.secondaryAddress(); } + { const a: string = fake.address.county(); } + { const a: string = fake.address.country(); } + { const a: string = fake.address.countryCode(); } + { const a: string = fake.address.state(); } + { const a: string = fake.address.state(false); } + { const a: string = fake.address.stateAbbr(); } + { const a: string = fake.address.latitude(); } + { const a: string = fake.address.longitude(); } + + { const a: string = fake.commerce.color(); } + { const a: string = fake.commerce.department(); } + { const a: string = fake.commerce.productName(); } + { const a: string = fake.commerce.price(); } + { const a: string = fake.commerce.price(0, 0, 0, '#'); } + { const a: string = fake.commerce.productAdjective(); } + { const a: string = fake.commerce.productMaterial(); } + { const a: string = fake.commerce.product(); } + + { const a: string[] = fake.company.suffixes(); } + { const a: string = fake.company.companyName(); } + { const a: string = fake.company.companyName(0); } + { const a: string = fake.company.companySuffix(); } + { const a: string = fake.company.catchPhrase(); } + { const a: string = fake.company.bs(); } + { const a: string = fake.company.catchPhraseAdjective(); } + { const a: string = fake.company.catchPhraseDescriptor(); } + { const a: string = fake.company.catchPhraseNoun(); } + { const a: string = fake.company.bsAdjective(); } + { const a: string = fake.company.bsBuzz(); } + { const a: string = fake.company.bsNoun(); } + + { const a: string = fake.database.column(); } + { const a: string = fake.database.type(); } + { const a: string = fake.database.collation(); } + { const a: string = fake.database.engine(); } + + { const a: Date = fake.date.past(); } + { const a: Date = fake.date.future(); } + { const a: Date = fake.date.between('foo', 'bar'); } + { const a: Date = fake.date.between(new Date(), new Date()); } + { const a: Date = fake.date.recent(); } + { const a: Date = fake.date.recent(100); } + { const a: Date = fake.date.soon(); } + { const a: Date = fake.date.soon(30); } + { const a: string = fake.date.month(); } + { const a: string = fake.date.month({ + abbr: true, + context: true + }); } + { const a: string = fake.date.weekday(); } + { const a: string = fake.date.weekday({ + abbr: true, + context: true + }); } + + { const a: string = fake.finance.account(); } + { const a: string = fake.finance.account(0); } + { const a: string = fake.finance.accountName(); } + { const a: string = fake.finance.mask(); } + { const a: string = fake.finance.mask(0, false, false); } + { const a: string = fake.finance.amount(); } + { const a: string = fake.finance.amount(0, 0, 0, '#'); } + { const a: string = fake.finance.transactionType(); } + { const a: string = fake.finance.currencyCode(); } + { const a: string = fake.finance.currencyName(); } + { const a: string = fake.finance.currencySymbol(); } + { const a: string = fake.finance.bitcoinAddress(); } + { const a: string = fake.finance.ethereumAddress(); } + { const a: string = fake.finance.iban(); } + { const a: string = fake.finance.iban(true); } + { const a: string = fake.finance.bic(); } + + { const a: string = fake.hacker.abbreviation(); } + { const a: string = fake.hacker.adjective(); } + { const a: string = fake.hacker.noun(); } + { const a: string = fake.hacker.verb(); } + { const a: string = fake.hacker.ingverb(); } + { const a: string = fake.hacker.phrase(); } + + { const a: string = fake.helpers.randomize(); } + { const a: number = fake.helpers.randomize([1, 2, 3, 4]); } + { const a: string = fake.helpers.randomize(['foo', 'bar', 'quux']); } + { const a: string = fake.helpers.slugify('foo bar quux'); } + { const a: string = fake.helpers.replaceSymbolWithNumber('foo# bar#'); } + { const a: string = fake.helpers.replaceSymbols('foo# bar? quux#'); } + { const a: string[] = fake.helpers.shuffle(['foo', 'bar', 'quux']); } + { const a: string = fake.helpers.mustache('{{foo}}{{bar}}', {foo: 'x', bar: 'y'}); } + + const card = fake.helpers.createCard(); + { const a: string = card.name; } + { const a: string = card.address.streetA; } + const contextualCard = fake.helpers.contextualCard(); + { const a: string = contextualCard.name; } + { const a: string = contextualCard.address.suite; } + const userCard = fake.helpers.userCard(); + { const a: string = userCard.name; } + { const a: string = userCard.address.suite; } + + { const a: string = fake.internet.avatar(); } + { const a: string = fake.internet.email(); } + { const a: string = fake.internet.email('foo', 'bar', 'quux'); } + { const a: string = fake.internet.exampleEmail(); } + { const a: string = fake.internet.exampleEmail('foo', 'bar'); } + { const a: string = fake.internet.protocol(); } + { const a: string = fake.internet.url(); } + { const a: string = fake.internet.domainName(); } + { const a: string = fake.internet.domainSuffix(); } + { const a: string = fake.internet.domainWord(); } + { const a: string = fake.internet.ip(); } + { const a: string = fake.internet.userAgent(); } + { const a: string = fake.internet.color(); } + { const a: string = fake.internet.color(0, 0, 0); } + { const a: string = fake.internet.mac(); } + { const a: string = fake.internet.password(); } + { const a: string = fake.internet.password(0, false, '#', 'foo'); } + + { const a: string = fake.lorem.word(); } + { const a: string = fake.lorem.words(); } + { const a: string = fake.lorem.words(0); } + { const a: string = fake.lorem.sentence(); } + { const a: string = fake.lorem.sentence(0, 0); } + { const a: string = fake.lorem.slug(); } + { const a: string = fake.lorem.slug(0); } + { const a: string = fake.lorem.sentences(); } + { const a: string = fake.lorem.sentences(0); } + { const a: string = fake.lorem.paragraph(); } + { const a: string = fake.lorem.paragraph(0); } + { const a: string = fake.lorem.paragraphs(); } + { const a: string = fake.lorem.paragraphs(0, ''); } + { const a: string = fake.lorem.text(); } + { const a: string = fake.lorem.text(0); } + { const a: string = fake.lorem.lines(); } + { const a: string = fake.lorem.lines(0); } + + { const a: string = fake.name.firstName(); } + { const a: string = fake.name.firstName(0); } + { const a: string = fake.name.lastName(); } + { const a: string = fake.name.lastName(0); } + { const a: string = fake.name.findName(); } + { const a: string = fake.name.findName('', '', 0); } + { const a: string = fake.name.jobTitle(); } + { const a: string = fake.name.prefix(); } + { const a: string = fake.name.suffix(); } + { const a: string = fake.name.title(); } + { const a: string = fake.name.jobDescriptor(); } + { const a: string = fake.name.jobArea(); } + { const a: string = fake.name.jobType(); } + + { const a: string = fake.phone.phoneNumber(); } + { const a: string = fake.phone.phoneNumber('#'); } + { const a: string = fake.phone.phoneNumberFormat(); } + { const a: string = fake.phone.phoneNumberFormat(0); } + { const a: string = fake.phone.phoneFormats(); } + + { const a: number = fake.random.number(); } + { const a: number = fake.random.number(0); } + { const a: number = fake.random.number({ + min: 0, + max: 0, + precision: 0 + }); } + { const a: string = fake.random.arrayElement(); } + { const a: string = fake.random.arrayElement(['foo', 'bar', 'quux']); } + { const a: string = fake.random.objectElement(); } + { const a: string = fake.random.objectElement({foo: 'bar', field: 'foo'}); } + { const a: string = fake.random.uuid(); } + { const a: boolean = fake.random.boolean(); } + { const a: string = fake.random.word(); } + { const a: string = fake.random.word("noun"); } + { const a: string = fake.random.words(); } + { const a: string = fake.random.words(0); } + { const a: string = fake.random.image(); } + { const a: string = fake.random.locale(); } + { const a: string = fake.random.alphaNumeric(); } + { const a: string = fake.random.alphaNumeric(0); } + { const a: string = fake.random.hexaDecimal(); } + { const a: string = fake.random.hexaDecimal(3); } + + { const a: string = fake.system.fileName("foo", "bar"); } + { const a: string = fake.system.commonFileName("foo", "bar"); } + { const a: string = fake.system.mimeType(); } + { const a: string = fake.system.commonFileType(); } + { const a: string = fake.system.commonFileExt(); } + { const a: string = fake.system.fileType(); } + { const a: string = fake.system.fileExt("foo"); } + { const a: string = fake.system.directoryPath(); } + { const a: string = fake.system.filePath(); } + { const a: string = fake.system.semver(); } +} diff --git a/types/adone/test/glosses/fs.ts b/types/adone/test/glosses/fs.ts index 8b7e765c9f..e7c5333624 100644 --- a/types/adone/test/glosses/fs.ts +++ b/types/adone/test/glosses/fs.ts @@ -11,6 +11,15 @@ namespace fsTests { fs.readlink("file", null).then((x: Buffer) => x); fs.readlink("file", "hex").then((x: string) => x); fs.readlink("file").then((x: string) => x); + fs.readlinkSync("file"); + fs.readlinkSync(Buffer.from("file")); + fs.readlinkSync(new URL("file://file")); + { const a: string = fs.readlinkSync("file", {}); } + { const a: string = fs.readlinkSync("file", { encoding: "utf8" }); } + { const a: Buffer = fs.readlinkSync("file", { encoding: null }); } + { const a: Buffer = fs.readlinkSync("file", null); } + { const a: string = fs.readlinkSync("file", "hex"); } + { const a: string = fs.readlinkSync("file"); } } namespace unlinkTests { @@ -22,6 +31,24 @@ namespace fsTests { fs.unlinkSync(new URL("file://file")); } + namespace utimesTests { + fs.utimes("hello", 100, 100).then(() => {}); + fs.utimes(Buffer.from("hello"), 100, 100).then(() => {}); + fs.utimes(new URL("hello"), 100, 100).then(() => {}); + fs.utimes("hello", "100", "100").then(() => {}); + fs.utimes("hello", new Date(100), new Date(100)).then(() => {}); + + fs.utimesSync("hello", 100, 100); + fs.utimesSync(Buffer.from("hello"), 100, 100); + fs.utimesSync(new URL("hello"), 100, 100); + fs.utimesSync("hello", "100", "100"); + fs.utimesSync("hello", new Date(100), new Date(100)); + + fs.utimesMillis("hello", 100, 100); + fs.utimesMillis(Buffer.from("hello"), 100, 100); + fs.utimesMillis(new URL("hello"), 100, 100); + } + namespace chmodTests { fs.chmod("file", 0o333).then(() => {}); fs.chmod(Buffer.from("file"), 0o333).then(() => {}); @@ -60,6 +87,87 @@ namespace fsTests { const e: Buffer[] = fs.readdirSync("file", { encoding: null }); } + namespace readdirpTests { + fs.readdirp("hello").forEach((entry) => { + { const a: string = entry.fullParentDir; } + { const a: string = entry.fullPath; } + { const a: string = entry.name; } + { const a: string = entry.parentDir; } + { const a: string = entry.path; } + { const a: adone.fs.I.Stats = entry.stat; } + }); + + fs.readdirp(Buffer.from("hello")); + fs.readdirp(new URL("hello")); + fs.readdirp("hello", {}); + fs.readdirp("hello", { depth: 100 }); + fs.readdirp("hello", { directories: true }); + fs.readdirp("hello", { directoryFilter: () => true }); + fs.readdirp("hello", { + directoryFilter: (entry) => { + { const a: string = entry.fullParentDir; } + { const a: string = entry.fullPath; } + { const a: string = entry.name; } + { const a: string = entry.parentDir; } + { const a: string = entry.path; } + { const a: adone.fs.I.Stats = entry.stat; } + return true; + } + }); + fs.readdirp("hello", { + directoryFilter: [(entry) => { + { const a: string = entry.fullParentDir; } + { const a: string = entry.fullPath; } + { const a: string = entry.name; } + { const a: string = entry.parentDir; } + { const a: string = entry.path; } + { const a: adone.fs.I.Stats = entry.stat; } + return true; + }] + }); + fs.readdirp("hello", { + directoryFilter: ["*"] + }); + fs.readdirp("hello", { + directoryFilter: "*" + }); + fs.readdirp("hello", { fileFilter: () => true }); + fs.readdirp("hello", { + fileFilter: (entry) => { + { const a: string = entry.fullParentDir; } + { const a: string = entry.fullPath; } + { const a: string = entry.name; } + { const a: string = entry.parentDir; } + { const a: string = entry.path; } + { const a: adone.fs.I.Stats = entry.stat; } + return true; + } + }); + fs.readdirp("hello", { + fileFilter: [(entry) => { + { const a: string = entry.fullParentDir; } + { const a: string = entry.fullPath; } + { const a: string = entry.name; } + { const a: string = entry.parentDir; } + { const a: string = entry.path; } + { const a: adone.fs.I.Stats = entry.stat; } + return true; + }] + }); + fs.readdirp("hello", { + fileFilter: ["*"] + }); + fs.readdirp("hello", { + fileFilter: "*" + }); + fs.readdirp("hello", { + files: false + }); + fs.readdirp("hello", { + lstat: true + }); + } + namespace lstatTests { fs.lstat("file").then((x: nodestd.fs.Stats) => {}); fs.lstat(Buffer.from("file")).then((x: nodestd.fs.Stats) => {}); @@ -119,6 +227,15 @@ namespace fsTests { fs.appendFile("file", "hello", { encoding: "utf8" }).then(() => {}); fs.appendFile("file", "hello", { mode: 0o755 }).then(() => {}); fs.appendFile("file", "hello", { flag: "w" }).then(() => {}); + + fs.appendFileSync("file", "hello"); + fs.appendFileSync(Buffer.from("file"), "hello"); + fs.appendFileSync(10, "hello"); + fs.appendFileSync("file", Buffer.from("hello")); + fs.appendFileSync("file", "hello", {}); + fs.appendFileSync("file", "hello", { encoding: "utf8" }); + fs.appendFileSync("file", "hello", { mode: 0o755 }); + fs.appendFileSync("file", "hello", { flag: "w" }); } namespace accessTests { @@ -153,6 +270,12 @@ namespace fsTests { fs.rm("file", { cwd: __dirname }).then((x) => {}); } + namespace rmEmptyTests { + fs.rmEmpty("file").then(() => {}); + fs.rmEmpty("file", { cwd: "a" }).then(() => {}); + fs.rmEmpty("file", { filter: (filename) => filename.charCodeAt(0) === 100 }).then(() => {}); + } + namespace ModeTests { const stat = fs.statSync("file"); const mode = new fs.Mode(stat); @@ -513,37 +636,36 @@ namespace fsTests { } namespace fdTests { - const { fd } = fs; - fd.open("hello", "r+").then((x: number) => {}); - fd.open(Buffer.from("hello"), "r+").then((x: number) => {}); - fd.open(new URL("file://hello"), "r+").then((x: number) => {}); - { const a: number = fd.openSync("hello", "r+"); } - { const a: number = fd.openSync(Buffer.from("hello"), "r+"); } - { const a: number = fd.openSync(new URL("file://hello"), "r+"); } - fd.close(10).then(() => {}); - fd.closeSync(10); - fd.utimes(10, 100500, 100500).then(() => {}); - fd.utimesSync(10, 100500, 100500); - fd.stat(10).then((x: adone.fs.I.Stats) => {}); - { const a: adone.fs.I.Stats = fd.statSync(10); } - fd.truncate(10).then(() => {}); - fd.truncate(10, 10).then(() => {}); - fd.truncateSync(10); - fd.truncateSync(10, 10); - fd.read(10, Buffer.alloc(10), 0, 10, 10).then((x: number) => {}); - { const a: number = fd.readSync(10, Buffer.alloc(10), 0, 10, 10); } - fd.write(10, Buffer.alloc(10), 0, 10, 10).then((x: number) => {}); - { const a: number = fd.writeSync(10, Buffer.alloc(10), 0, 10, 10); } - fd.write(10, "hello", 10, "utf8").then((x: number) => {}); - { const a: number = fd.writeSync(10, "hello", 10, "utf8"); } - fd.sync(10).then(() => {}); - fd.syncSync(10); - fd.chown(10, 0, 0).then(() => {}); - fd.chownSync(10, 0, 0); - fd.chmod(10, 0o755).then(() => {}); - fd.chmodSync(10, 0o755); - fd.seek(10, 100, 0).then((x: number) => {}); - fd.lock(10, "sh").then(() => {}); + fs.open("hello", "r+").then((x: number) => {}); + fs.open(Buffer.from("hello"), "r+").then((x: number) => {}); + fs.open(new URL("file://hello"), "r+").then((x: number) => {}); + { const a: number = fs.openSync("hello", "r+"); } + { const a: number = fs.openSync(Buffer.from("hello"), "r+"); } + { const a: number = fs.openSync(new URL("file://hello"), "r+"); } + fs.close(10).then(() => {}); + fs.closeSync(10); + fs.futimes(10, 100500, 100500).then(() => {}); + fs.futimesSync(10, 100500, 100500); + fs.fstat(10).then((x: adone.fs.I.Stats) => {}); + { const a: adone.fs.I.Stats = fs.fstatSync(10); } + fs.ftruncate(10).then(() => {}); + fs.ftruncate(10, 10).then(() => {}); + fs.ftruncateSync(10); + fs.ftruncateSync(10, 10); + fs.read(10, Buffer.alloc(10), 0, 10, 10).then((x: number) => {}); + { const a: number = fs.readSync(10, Buffer.alloc(10), 0, 10, 10); } + fs.write(10, Buffer.alloc(10), 0, 10, 10).then((x: number) => {}); + { const a: number = fs.writeSync(10, Buffer.alloc(10), 0, 10, 10); } + fs.write(10, "hello", 10, "utf8").then((x: number) => {}); + { const a: number = fs.writeSync(10, "hello", 10, "utf8"); } + fs.fsync(10).then(() => {}); + fs.fsyncSync(10); + fs.fchown(10, 0, 0).then(() => {}); + fs.fchownSync(10, 0, 0); + fs.fchmod(10, 0o755).then(() => {}); + fs.fchmodSync(10, 0o755); + fs.seek(10, 100, 0).then((x: number) => {}); + fs.flock(10, "sh").then(() => {}); } namespace constantsTests { @@ -668,13 +790,44 @@ namespace fsTests { namespace mkdirTests { fs.mkdir("/path/to/some/dir").then(() => {}); fs.mkdir("/path/to/some/dir", 0o755).then(() => {}); + + fs.mkdirSync("/path/to/some/dir").then(() => {}); + fs.mkdirSync("/path/to/some/dir", 0o755).then(() => {}); + } + + namespace mkdirTests { + fs.mkdirp("/path/to/some/dir").then(() => {}); + fs.mkdirp("/path/to/some/dir", 0o755).then(() => {}); + + fs.mkdirpSync("/path/to/some/dir").then(() => {}); + fs.mkdirpSync("/path/to/some/dir", 0o755).then(() => {}); } namespace copyTests { fs.copy("a", "b").then(() => {}); - fs.copy("a", "b", {}).then(() => {}); - fs.copy("a", "b", { cwd: "/tmp" }).then(() => {}); - fs.copy("a", "b", { ignoreExisting: true }).then(() => {}); + fs.copy("a", "b", {}); + fs.copy("a", "b", { clobber: true }).then(() => {}); + fs.copy("a", "b", { overwrite: true }).then(() => {}); + fs.copy("a", "b", { filter: /asd/ }).then(() => {}); + fs.copy("a", "b", { filter: () => true }).then(() => {}); + fs.copy("a", "b", { filter: (a) => a.charCodeAt(0) === 100 }).then(() => {}); + fs.copy("a", "b", { + transform(r, w, file) { + file.atime.getDay(); + file.mtime.getDay(); + file.mode.toExponential(); + file.name.charCodeAt(0); + file.stats.atimeMs.toExponential(); + r.pipe(w); + } + }).then(() => {}); + } + + namespace copyTests { + fs.copyTo("a", "b").then(() => {}); + fs.copyTo("a", "b", {}); + fs.copyTo("a", "b", { cwd: "/tmp" }).then(() => {}); + fs.copyTo("a", "b", { ignoreExisting: true }).then(() => {}); } namespace renameTests { @@ -689,6 +842,7 @@ namespace fsTests { fs.tail("file", 10, {}).then((x: Buffer[]) => {}); fs.tail("file", 10, { separator: "\n" }).then((x: Buffer[]) => {}); fs.tail("file", 10, { chunkLength: 4096 }).then((x: Buffer[]) => {}); + fs.tail("file", 10, { pos: 10 }).then((x: Buffer[]) => {}); } namespace statVFSTests { diff --git a/types/adone/test/glosses/is.ts b/types/adone/test/glosses/is.ts index 2734824822..2065dfe01b 100644 --- a/types/adone/test/glosses/is.ts +++ b/types/adone/test/glosses/is.ts @@ -1,115 +1,423 @@ namespace isTests { - { const a: boolean = adone.is.null({}); } - { const a: boolean = adone.is.undefined({}); } - { const a: boolean = adone.is.exist({}); } - { const a: boolean = adone.is.nil({}); } - { const a: boolean = adone.is.number({}); } - { const a: boolean = adone.is.numeral({}); } - { const a: boolean = adone.is.infinite({}); } - { const a: boolean = adone.is.odd({}); } - { const a: boolean = adone.is.even({}); } - { const a: boolean = adone.is.float({}); } - { const a: boolean = adone.is.negativeZero({}); } - { const a: boolean = adone.is.string({}); } - { const a: boolean = adone.is.emptyString({}); } - { const a: boolean = adone.is.substring("abc", "abcdef"); } - { const a: boolean = adone.is.substring("abc", "abcdef", 0); } - { const a: boolean = adone.is.prefix("abc", "abcdef"); } - { const a: boolean = adone.is.suffix("def", "abbdef"); } - { const a: boolean = adone.is.boolean({}); } - { const a: boolean = adone.is.json({}); } - { const a: boolean = adone.is.object({}); } - { const a: boolean = adone.is.plainObject({}); } - { const a: boolean = adone.is.class({}); } - { const a: boolean = adone.is.emptyObject({}); } - { const a: boolean = adone.is.propertyOwned({}, "a"); } - { const a: boolean = adone.is.propertyDefined({}, "a"); } - { const a: boolean = adone.is.conforms({}, {}); } - { const a: boolean = adone.is.conforms({}, {}, true); } - { const a: boolean = adone.is.arrayLikeObject({}); } - { const a: boolean = adone.is.inArray(1, [1, 2, 3]); } - { const a: boolean = adone.is.inArray(1, [1, 2, 3], 0); } - { const a: boolean = adone.is.inArray(1, [1, 2, 3], 0, (a, b) => a === b); } - { const a: boolean = adone.is.sameType({}, {}); } - { const a: boolean = adone.is.primitive({}); } - { const a: boolean = adone.is.equalArrays([], []); } - { const a: boolean = adone.is.deepEqual({}, {}); } - { const a: boolean = adone.is.shallowEqual({}, {}); } - { const a: boolean = adone.is.stream({}); } - { const a: boolean = adone.is.writableStream({}); } - { const a: boolean = adone.is.readableStream({}); } - { const a: boolean = adone.is.duplexStream({}); } - { const a: boolean = adone.is.transformStream({}); } - { const a: boolean = adone.is.utf8(Buffer.alloc(10)); } - { const a: boolean = adone.is.win32PathAbsolute("abc"); } - { const a: boolean = adone.is.posixPathAbsolute("abc"); } - { const a: boolean = adone.is.pathAbsolute("abc"); } - { const a: boolean = adone.is.glob("abc"); } - { const a: boolean = adone.is.dotfile("abc"); } - { const a: boolean = adone.is.function(() => { }); } - { const a: boolean = adone.is.asyncFunction(async () => { }); } - { const a: boolean = adone.is.promise({}); } - { const a: boolean = adone.is.validDate("07.08.2017"); } - { const a: boolean = adone.is.buffer({}); } - { const a: boolean = adone.is.callback({}); } - { const a: boolean = adone.is.generator({}); } - { const a: boolean = adone.is.nan({}); } - { const a: boolean = adone.is.finite({}); } - { const a: boolean = adone.is.integer({}); } - { const a: boolean = adone.is.safeInteger({}); } - { const a: boolean = adone.is.array({}); } - { const a: boolean = adone.is.uint8Array({}); } - { const a: boolean = adone.is.configuration({}); } - { const a: boolean = adone.is.long({}); } - { const a: boolean = adone.is.bigNumber({}); } - { const a: boolean = adone.is.byteArray({}); } - { const a: boolean = adone.is.datetime({}); } - { const a: boolean = adone.is.transform({}); } - { const a: boolean = adone.is.subsystem({}); } - { const a: boolean = adone.is.application({}); } - { const a: boolean = adone.is.logger({}); } - { const a: boolean = adone.is.coreStream({}); } - { const a: boolean = adone.is.fastStream({}); } - { const a: boolean = adone.is.fastLocalStream({}); } - { const a: boolean = adone.is.fastLocalMapStream({}); } - { const a: boolean = adone.is.genesisNetron({}); } - { const a: boolean = adone.is.genesisPeer({}); } - { const a: boolean = adone.is.netronAdapter({}); } - { const a: boolean = adone.is.netron({}); } - { const a: boolean = adone.is.netronPeer({}); } - { const a: boolean = adone.is.netronDefinition({}); } - { const a: boolean = adone.is.netronDefinitions({}); } - { const a: boolean = adone.is.netronReference({}); } - { const a: boolean = adone.is.netronInterface({}); } - { const a: boolean = adone.is.netronContext({}); } - { const a: boolean = adone.is.netronIMethod({}, "hello"); } - { const a: boolean = adone.is.netronIProperty({}, "hello"); } - { const a: boolean = adone.is.netronStub({}); } - { const a: boolean = adone.is.netronRemoteStub({}); } - { const a: boolean = adone.is.netronStream({}); } - { const a: boolean = adone.is.iterable({}); } - { const a: boolean = adone.is.windows; } - { const a: boolean = adone.is.linux; } - { const a: boolean = adone.is.freebsd; } - { const a: boolean = adone.is.darwin; } - { const a: boolean = adone.is.sunos; } - { const a: boolean = adone.is.uppercase("abc"); } - { const a: boolean = adone.is.lowercase("abc"); } - { const a: boolean = adone.is.digits("012"); } - { const a: boolean = adone.is.identifier("someMethod"); } - { const a: boolean = adone.is.binaryExtension("mp3"); } - { const a: boolean = adone.is.binaryPath("a.mp3"); } - { const a: boolean = adone.is.ip4("192.168.1.1"); } - { const a: boolean = adone.is.ip6("::192.168.1.1"); } - { const a: boolean = adone.is.arrayBuffer({}); } - { const a: boolean = adone.is.arrayBufferView({}); } - { const a: boolean = adone.is.date({}); } - { const a: boolean = adone.is.error({}); } - { const a: boolean = adone.is.map({}); } - { const a: boolean = adone.is.regexp({}); } - { const a: boolean = adone.is.set({}); } - { const a: boolean = adone.is.symbol({}); } - { const a: boolean = adone.is.validUTF8(Buffer.from("hello")); } - { const a: boolean = adone.is.vaultValuable({}); } - { const a: boolean = adone.is.task({}); } + const { + is + } = adone; + { + const a: boolean = is.null({}); + const b: any = 2; + if (is.null(b)) { + const c: null = b; + } + } + { + const a: boolean = is.undefined({}); + const b: any = 2; + if (is.undefined(b)) { + const c: undefined = b; + } + } + { const a: boolean = is.exist({}); } + { + const a: boolean = is.nil({}); + const b: any = 2; + if (is.nil(b)) { + const c: null | undefined = b; + } + } + { + const a: boolean = is.number({}); + const b: any = 2; + if (is.number(b)) { + b.toExponential(); + } + } + { + const a: boolean = is.numeral({}); + const b: any = 2; + if (is.numeral(b)) { + const c: string | number = b; + } + } + { + const a: boolean = is.infinite({}); + const b: any = 2; + if (is.infinite(b)) { + b.toPrecision(); + } + } + { + const a: boolean = is.odd({}); + const b: any = 2; + if (is.odd(b)) { + b.toFixed(2); + } + } + { + const a: boolean = is.even({}); + const b: any = 2; + if (is.even(b)) { + b.toFixed(2); + } + } + { + const a: boolean = is.float({}); + const b: any = 2; + if (is.float(b)) { + b.toFixed(); + } + } + { + const a: boolean = is.negativeZero({}); + const b: any = 2; + if (is.negativeZero(b)) { + b.toFixed(); + } + } + { + const a: boolean = is.string({}); + const b: any = 2; + if (is.string(b)) { + b.charCodeAt(0); + } + } + { + const a: boolean = is.emptyString({}); + const b: any = 2; + if (is.emptyString(b)) { + b.charCodeAt(0); + } + } + { const a: boolean = is.substring("abc", "abcdef"); } + { const a: boolean = is.substring("abc", "abcdef", 0); } + { const a: boolean = is.prefix("abc", "abcdef"); } + { const a: boolean = is.suffix("def", "abbdef"); } + { + const a: boolean = is.boolean({}); + const b: any = 2; + if (is.boolean(b)) { + b === true; + } + } + { const a: boolean = is.json({}); } + { const a: boolean = is.object({}); } + { const a: boolean = is.plainObject({}); } + { const a: boolean = is.class({}); } + { const a: boolean = is.emptyObject({}); } + { const a: boolean = is.propertyOwned({}, "a"); } + { const a: boolean = is.propertyDefined({}, "a"); } + { const a: boolean = is.conforms({}, {}); } + { const a: boolean = is.conforms({}, {}, true); } + { const a: boolean = is.arrayLikeObject({}); } + { const a: boolean = is.inArray(1, [1, 2, 3]); } + { const a: boolean = is.inArray(1, [1, 2, 3], 0); } + { const a: boolean = is.inArray(1, [1, 2, 3], 0, (a, b) => a === b); } + { const a: boolean = is.sameType({}, {}); } + { const a: boolean = is.primitive({}); } + { const a: boolean = is.equalArrays([], []); } + { const a: boolean = is.deepEqual({}, {}); } + { const a: boolean = is.shallowEqual({}, {}); } + { const a: boolean = is.stream({}); } + { const a: boolean = is.writableStream({}); } + { const a: boolean = is.readableStream({}); } + { const a: boolean = is.duplexStream({}); } + { const a: boolean = is.transformStream({}); } + { const a: boolean = is.utf8(Buffer.alloc(10)); } + { const a: boolean = is.win32PathAbsolute("abc"); } + { const a: boolean = is.posixPathAbsolute("abc"); } + { const a: boolean = is.pathAbsolute("abc"); } + { + const a: boolean = is.glob("abc"); + const b: any = 2; + if (is.glob(b)) { + b.charCodeAt(0); + } + } + { const a: boolean = is.dotfile("abc"); } + { + const a: boolean = is.function(() => { }); + const b: any = 2; + if (is.function(b)) { + b(); + } + } + { + const a: boolean = is.asyncFunction(async () => { }); + const b: any = 2; + if (is.asyncFunction(b)) { + b().then(() => {}); + } + } + { + const a: boolean = is.promise({}); + const b: any = 2; + if (is.promise(b)) { + b.then(() => {}); + } + const c = Promise.resolve(2); + if (is.promise(c)) { + c.then((x) => x.toFixed(2)); + } + } + { const a: boolean = is.validDate("07.08.2017"); } + { + const a: boolean = is.buffer({}); + const b: any = 2; + if (is.buffer(b)) { + b.writeDoubleBE(10, 10); + } + } + { const a: boolean = is.callback({}); } + { const a: boolean = is.generator({}); } + { const a: boolean = is.nan({}); } + { + const a: boolean = is.finite({}); + const b: any = 2; + if (is.finite(b)) { + b.toFixed(); + } + } + { + const a: boolean = is.integer({}); + const b: any = 2; + if (is.integer(b)) { + b.toFixed(); + } + } + { + const a: boolean = is.safeInteger({}); + const b: any = 2; + if (is.safeInteger(b)) { + b.toFixed(); + } + } + { + const a: boolean = is.array({}); + const b: any = 2; + if (is.array(b)) { + b.length + b[0]; + } + const c = [1, 2, 3]; + if (is.array(c)) { + c[0].toFixed(0); + } + } + { + const a: boolean = is.uint8Array({}); + const b: any = 2; + if (is.uint8Array(b)) { + b.copyWithin(1, 2); + } + } + { const a: boolean = is.configuration({}); } + { + const a: boolean = is.long({}); + const b: any = 2; + if (is.long(b)) { + b.getHighBitsUnsigned(); + } + } + { + const a: boolean = is.bigNumber({}); + const b: any = 2; + if (is.bigNumber(b)) { + b.add(b).isBitSet(10); + } + } + { + const a: boolean = is.byteArray({}); + const b: any = 2; + if (is.byteArray(b)) { + b.toBuffer(); + } + } + { + const a: boolean = is.datetime({}); + const b: any = 2; + if (is.datetime(b)) { + b.add(2, "hours"); + } + } + { const a: boolean = is.transform({}); } + { const a: boolean = is.subsystem({}); } + { const a: boolean = is.application({}); } + { const a: boolean = is.logger({}); } + { const a: boolean = is.coreStream({}); } + { const a: boolean = is.fastStream({}); } + { const a: boolean = is.fastLocalStream({}); } + { const a: boolean = is.fastLocalMapStream({}); } + { const a: boolean = is.genesisNetron({}); } + { const a: boolean = is.genesisPeer({}); } + { const a: boolean = is.netronAdapter({}); } + { const a: boolean = is.netron({}); } + { const a: boolean = is.netronPeer({}); } + { const a: boolean = is.netronDefinition({}); } + { const a: boolean = is.netronDefinitions({}); } + { const a: boolean = is.netronReference({}); } + { const a: boolean = is.netronInterface({}); } + { const a: boolean = is.netronContext({}); } + { const a: boolean = is.netronIMethod({}, "hello"); } + { const a: boolean = is.netronIProperty({}, "hello"); } + { const a: boolean = is.netronStub({}); } + { const a: boolean = is.netronRemoteStub({}); } + { const a: boolean = is.netronStream({}); } + { const a: boolean = is.iterable({}); } + { const a: boolean = is.windows; } + { const a: boolean = is.linux; } + { const a: boolean = is.freebsd; } + { const a: boolean = is.darwin; } + { const a: boolean = is.sunos; } + { const a: boolean = is.uppercase("abc"); } + { const a: boolean = is.lowercase("abc"); } + { const a: boolean = is.digits("012"); } + { const a: boolean = is.identifier("someMethod"); } + { const a: boolean = is.binaryExtension("mp3"); } + { const a: boolean = is.binaryPath("a.mp3"); } + { const a: boolean = is.ip4("192.168.1.1"); } + { const a: boolean = is.ip6("::192.168.1.1"); } + { + const a: boolean = is.arrayBuffer({}); + const b: any = 2; + if (is.arrayBuffer(b)) { + b.slice(10); + } + } + { + const a: boolean = is.arrayBufferView({}); + const b: any = 2; + if (is.arrayBufferView(b)) { + b.byteLength + b.byteOffset; + } + } + { + const a: boolean = is.date({}); + const b: any = 2; + if (is.date(b)) { + b.getMonth() + b.getDate(); + } + } + { const a: boolean = is.error({}); } + { + const a: boolean = is.map({}); + const b: any = 2; + if (is.map(b)) { + b.has("asd"); + b.set(1, 2); + b.set("1", 2); + } + } + { + const a: boolean = is.regexp({}); + const b: any = 2; + if (is.regexp(b)) { + b.test("hello"); + } + } + { + const a: boolean = is.set({}); + const b: any = 2; + if (is.set(b)) { + b.add("h"); + b.has(1); + } + } + { const a: boolean = is.symbol({}); } + { const a: boolean = is.vaultValuable({}); } + { const a: boolean = is.task({}); } + { + const a: boolean = is.fqdn(1); + const b: any = 2; + if (is.fqdn(b)) { + b.charCodeAt(0); + } + if (is.fqdn(b, {})) { + b.charCodeAt(0); + } + is.fqdn(1, { + allowTrailingDot: false + }); + is.fqdn(1, { + allowUnderscores: false + }); + is.fqdn(1, { + requireTld: true + }); + } + { + const a: boolean = is.email(1); + const b: any = 2; + if (is.email(b)) { + b.charCodeAt(0); + } + if (is.email(b, {})) { + b.charCodeAt(0); + } + is.email(1, { + allowDisplayName: false + }); + is.email(1, { + allowUtf8LocalPart: false + }); + is.email(1, { + requireDisplayName: false + }); + is.email(1, { + requireTld: false + }); + } + { + const a: boolean = is.uuid(2); + const b: any = 2; + if (is.uuid(b)) { + b.charCodeAt(0); + } + } + { + const a: boolean = is.uuid(2, "all"); + const b: any = 2; + if (is.uuid(b, "all")) { + b.charCodeAt(0); + } + } + { + const a: boolean = is.uuid(2, "all"); + const b: any = 2; + if (is.uuid(b, "all")) { + b.charCodeAt(0); + } + } + { + const a: boolean = is.uuid(2, 1); + const b: any = 2; + if (is.uuid(b, 1)) { + b.charCodeAt(0); + } + } + { + const a: boolean = is.uuid(2, 2); + const b: any = 2; + if (is.uuid(b, 2)) { + b.charCodeAt(0); + } + } + { + const a: boolean = is.uuid(2, 3); + const b: any = 2; + if (is.uuid(b, 2)) { + b.charCodeAt(0); + } + } + { + const a: boolean = is.uuid(2, 4); + const b: any = 2; + if (is.uuid(b, 2)) { + b.charCodeAt(0); + } + } + { + const a: boolean = is.uuid(2, 5); + const b: any = 2; + if (is.uuid(b, 2)) { + b.charCodeAt(0); + } + } } diff --git a/types/adone/test/glosses/meta.ts b/types/adone/test/glosses/meta.ts new file mode 100644 index 0000000000..fbcde09b1a --- /dev/null +++ b/types/adone/test/glosses/meta.ts @@ -0,0 +1,7 @@ +namespace metaTests { + const { meta } = adone; + + namespace typeOf { + const a: string = meta.typeOf(1); + } +} diff --git a/types/adone/test/glosses/promise.ts b/types/adone/test/glosses/promise.ts index a8866d95a1..9df672cae8 100644 --- a/types/adone/test/glosses/promise.ts +++ b/types/adone/test/glosses/promise.ts @@ -106,4 +106,34 @@ namespace promiseTests { namespace _finally { promise.finally(Promise.resolve(2), () => 2).then((x: number) => {}); } + + namespace props { + promise.props({ a: Promise.resolve(2) }).then((x) => x.a); + } + + namespace retry { + promise.retry((info) => { + { const a: number = info.current; } + }); + + promise.retry(() => {}, {}); + promise.retry(() => {}, { backOffBase: 1000 }); + promise.retry(() => {}, { backOffExponent: 2 }); + promise.retry(() => {}, { match: "a" }); + promise.retry(() => {}, { match: ["a"] }); + promise.retry(() => {}, { match: [/abc/] }); + promise.retry(() => {}, { match: /abc/ }); + promise.retry(() => {}, { match: [new Error()] }); + promise.retry(() => {}, { match: new Error() }); + promise.retry(() => {}, { max: 100 }); + promise.retry(() => {}, { name: "asd" }); + promise.retry(() => {}, { + report(msg: string, opts) { + opts.backOffBase < 100; + } + }); + promise.retry(() => {}, { + timeout: 100 + }); + } } diff --git a/types/adone/test/glosses/streams.ts b/types/adone/test/glosses/streams.ts index bd090dc467..caa278955a 100644 --- a/types/adone/test/glosses/streams.ts +++ b/types/adone/test/glosses/streams.ts @@ -2,82 +2,82 @@ namespace streamsTests { const { stream } = adone; namespace CoreStreamTests { - const { CoreStream } = stream; + const { core: { Stream } } = stream; - new CoreStream(); - new CoreStream(undefined); - new CoreStream(undefined, {}); - new CoreStream(undefined, { async: true }); - new CoreStream(undefined, { sync: true }); - new CoreStream(undefined, { + new Stream(); + new Stream(undefined); + new Stream(undefined, {}); + new Stream(undefined, { async: true }); + new Stream(undefined, { sync: true }); + new Stream(undefined, { transform(x) { this.push(x); } }); - new CoreStream(undefined, { + new Stream(undefined, { flush() { this.push(1); } }); - new CoreStream([]); - new CoreStream(new CoreStream([])); + new Stream([]); + new Stream(new Stream([])); - { const a: boolean = new CoreStream().write(1); } - { const a: boolean = new CoreStream().push(1); } - { const a: adone.stream.CoreStream = new CoreStream().end(); } - { const a: adone.stream.CoreStream = new CoreStream().destroy(); } - { const a: adone.stream.CoreStream = new CoreStream().pause(); } - { const a: adone.stream.CoreStream = new CoreStream().resume(); } - { const a: boolean = new CoreStream().isPaused(); } - { const a: boolean = new CoreStream().isEnded(); } - { const a: nodestd.stream.Transform = new CoreStream().pipe(new adone.std.stream.Transform()); } - { const a: adone.stream.CoreStream = new CoreStream().throughSync(function () { this.push(1); }); } - { const a: adone.stream.CoreStream = new CoreStream().throughSync(function () { this.push(1); }, function () { this.push(1); }); } - { const a: adone.stream.CoreStream = new CoreStream().throughAsync(function () { this.push(1); }); } - { const a: adone.stream.CoreStream = new CoreStream().throughAsync(function () { this.push(1); }, function () { this.push(1); }); } - { const a: adone.stream.CoreStream = new CoreStream().through(function () { this.push(1); }, function () { this.push(1); }); } - { const a: adone.stream.CoreStream = new CoreStream([1, 2, 3]).map((x) => `${x}`); } - { const a: adone.stream.CoreStream = new CoreStream().mapIf((x) => x === "1", () => 1); } - { const a: adone.stream.CoreStream = new CoreStream().mapIf(async (x) => x === "1", () => 1); } - { const a: adone.stream.CoreStream = new CoreStream().filter((x) => x === 1); } - { const a: adone.stream.CoreStream = new CoreStream().filter(async (x) => x === 1); } - { const a: adone.stream.CoreStream = new CoreStream().forEach(async (x) => x === 1); } - { const a: adone.stream.CoreStream = new CoreStream().forEach(async (x) => x === 1, {}); } - { const a: adone.stream.CoreStream = new CoreStream().forEach(async (x) => x === 1, { passthrough: true }); } - { const a: adone.stream.CoreStream = new CoreStream().forEach(async (x) => x === 1, { wait: true }); } - { const a: adone.stream.CoreStream = new CoreStream().done(() => {}); } - { const a: adone.stream.CoreStream = new CoreStream().done(() => {}, {}); } - { const a: adone.stream.CoreStream = new CoreStream().done(() => {}, { passthrough: true }); } - { const a: adone.stream.CoreStream = new CoreStream().toArray((x: any[]) => {}); } - { const a: adone.stream.CoreStream = new CoreStream().toArray((x: any[]) => {}, {}); } - { const a: adone.stream.CoreStream = new CoreStream().toArray((x: any[]) => {}, { passthrough: true }); } - { const a: adone.stream.CoreStream = new CoreStream().unique(); } - { const a: adone.stream.CoreStream = new CoreStream().unique((x) => x + 1); } - { const a: adone.stream.CoreStream = new CoreStream().stash((x) => x === 1); } - { const a: adone.stream.CoreStream = new CoreStream().stash("hello", (x) => x === 1); } - { const a: adone.stream.CoreStream = new CoreStream().unstash("hello"); } - { const a: adone.stream.CoreStream = new CoreStream().unstash(); } - { const a: adone.stream.CoreStream = new CoreStream().flatten(); } - { const a: Promise = new CoreStream().then(); } - { const a: Promise = new CoreStream().then(() => "1"); } - { const a: Promise = new CoreStream().then(() => 1, () => 2); } - { const a: Promise = new CoreStream().catch(); } - { const a: Promise = new CoreStream().catch(() => 1); } - { const a: adone.stream.CoreStream = CoreStream.merge([new CoreStream()]); } - { const a: adone.stream.CoreStream = CoreStream.merge([new adone.std.stream.Readable()]); } - { const a: adone.stream.CoreStream = CoreStream.merge([new adone.std.stream.Transform()]); } - { const a: adone.stream.CoreStream = CoreStream.merge([new adone.std.stream.Transform()]); } - { const a: adone.stream.CoreStream = CoreStream.merge([new adone.std.stream.Duplex()]); } - { const a: adone.stream.CoreStream = CoreStream.merge([], {}); } - { const a: adone.stream.CoreStream = CoreStream.merge([], { end: true }); } - { const a: adone.stream.CoreStream = CoreStream.merge([], { sourceOptions: {} }); } - { const a: adone.stream.CoreStream = CoreStream.merge([], { sourceOptions: { async: true } }); } - { const a: adone.stream.CoreStream = CoreStream.merge([], { sourceOptions: { sync: false } }); } - { const a: adone.stream.CoreStream = CoreStream.merge([], { sourceOptions: { transform(x) { this.push(x); } } }); } - { const a: adone.stream.CoreStream = CoreStream.merge([], { sourceOptions: { flush() { this.push(1); } } }); } + { const a: boolean = new Stream().write(1); } + { const a: boolean = new Stream().push(1); } + { const a: adone.stream.core.Stream = new Stream().end(); } + { const a: adone.stream.core.Stream = new Stream().destroy(); } + { const a: adone.stream.core.Stream = new Stream().pause(); } + { const a: adone.stream.core.Stream = new Stream().resume(); } + { const a: boolean = new Stream().isPaused(); } + { const a: boolean = new Stream().isEnded(); } + { const a: nodestd.stream.Transform = new Stream().pipe(new adone.std.stream.Transform()); } + { const a: adone.stream.core.Stream = new Stream().throughSync(function () { this.push(1); }); } + { const a: adone.stream.core.Stream = new Stream().throughSync(function () { this.push(1); }, function () { this.push(1); }); } + { const a: adone.stream.core.Stream = new Stream().throughAsync(function () { this.push(1); }); } + { const a: adone.stream.core.Stream = new Stream().throughAsync(function () { this.push(1); }, function () { this.push(1); }); } + { const a: adone.stream.core.Stream = new Stream().through(function () { this.push(1); }, function () { this.push(1); }); } + { const a: adone.stream.core.Stream = new Stream([1, 2, 3]).map((x) => `${x}`); } + { const a: adone.stream.core.Stream = new Stream().mapIf((x) => x === "1", () => 1); } + { const a: adone.stream.core.Stream = new Stream().mapIf(async (x) => x === "1", () => 1); } + { const a: adone.stream.core.Stream = new Stream().filter((x) => x === 1); } + { const a: adone.stream.core.Stream = new Stream().filter(async (x) => x === 1); } + { const a: adone.stream.core.Stream = new Stream().forEach(async (x) => x === 1); } + { const a: adone.stream.core.Stream = new Stream().forEach(async (x) => x === 1, {}); } + { const a: adone.stream.core.Stream = new Stream().forEach(async (x) => x === 1, { passthrough: true }); } + { const a: adone.stream.core.Stream = new Stream().forEach(async (x) => x === 1, { wait: true }); } + { const a: adone.stream.core.Stream = new Stream().done(() => {}); } + { const a: adone.stream.core.Stream = new Stream().done(() => {}, {}); } + { const a: adone.stream.core.Stream = new Stream().done(() => {}, { passthrough: true }); } + { const a: adone.stream.core.Stream = new Stream().toArray((x: any[]) => {}); } + { const a: adone.stream.core.Stream = new Stream().toArray((x: any[]) => {}, {}); } + { const a: adone.stream.core.Stream = new Stream().toArray((x: any[]) => {}, { passthrough: true }); } + { const a: adone.stream.core.Stream = new Stream().unique(); } + { const a: adone.stream.core.Stream = new Stream().unique((x) => x + 1); } + { const a: adone.stream.core.Stream = new Stream().stash((x) => x === 1); } + { const a: adone.stream.core.Stream = new Stream().stash("hello", (x) => x === 1); } + { const a: adone.stream.core.Stream = new Stream().unstash("hello"); } + { const a: adone.stream.core.Stream = new Stream().unstash(); } + { const a: adone.stream.core.Stream = new Stream().flatten(); } + { const a: Promise = new Stream().then(); } + { const a: Promise = new Stream().then(() => "1"); } + { const a: Promise = new Stream().then(() => 1, () => 2); } + { const a: Promise = new Stream().catch(); } + { const a: Promise = new Stream().catch(() => 1); } + { const a: adone.stream.core.Stream = Stream.merge([new Stream()]); } + { const a: adone.stream.core.Stream = Stream.merge([new adone.std.stream.Readable()]); } + { const a: adone.stream.core.Stream = Stream.merge([new adone.std.stream.Transform()]); } + { const a: adone.stream.core.Stream = Stream.merge([new adone.std.stream.Transform()]); } + { const a: adone.stream.core.Stream = Stream.merge([new adone.std.stream.Duplex()]); } + { const a: adone.stream.core.Stream = Stream.merge([], {}); } + { const a: adone.stream.core.Stream = Stream.merge([], { end: true }); } + { const a: adone.stream.core.Stream = Stream.merge([], { sourceOptions: {} }); } + { const a: adone.stream.core.Stream = Stream.merge([], { sourceOptions: { async: true } }); } + { const a: adone.stream.core.Stream = Stream.merge([], { sourceOptions: { sync: false } }); } + { const a: adone.stream.core.Stream = Stream.merge([], { sourceOptions: { transform(x) { this.push(x); } } }); } + { const a: adone.stream.core.Stream = Stream.merge([], { sourceOptions: { flush() { this.push(1); } } }); } (async () => { - const res = await new CoreStream([1, 2, 3, 4, 5]) + const res = await new Stream([1, 2, 3, 4, 5]) .map((x: number) => `${x}`) .mapIf((x: string) => x[0] === "1", (x) => x.slice(1)) .map((x) => [x, x, x]) @@ -91,13 +91,13 @@ namespace streamsTests { } namespace coreTests { - { const a: adone.stream.CoreStream = stream.core(); } - { const a: adone.stream.CoreStream = stream.core([1, 2, 3]); } - { const a: adone.stream.CoreStream = stream.core(stream.core([])); } - { const a: adone.stream.CoreStream = stream.core(undefined, {}); } - { const a: adone.stream.CoreStream = stream.core(undefined, { async: true }); } - { const a: adone.stream.CoreStream = stream.core(undefined, { sync: false }); } - { const a: adone.stream.CoreStream = stream.core(undefined, { transform(x) { this.push(Number(x)); } }); } - { const a: adone.stream.CoreStream = stream.core(undefined, { flush() { this.push(1); } }); } + { const a: adone.stream.core.Stream = stream.core.create(); } + { const a: adone.stream.core.Stream = stream.core.create([1, 2, 3]); } + { const a: adone.stream.core.Stream = stream.core.create(stream.core.create([])); } + { const a: adone.stream.core.Stream = stream.core.create(undefined, {}); } + { const a: adone.stream.core.Stream = stream.core.create(undefined, { async: true }); } + { const a: adone.stream.core.Stream = stream.core.create(undefined, { sync: false }); } + { const a: adone.stream.core.Stream = stream.core.create(undefined, { transform(x) { this.push(Number(x)); } }); } + { const a: adone.stream.core.Stream = stream.core.create(undefined, { flush() { this.push(1); } }); } } } diff --git a/types/adone/test/glosses/utils.ts b/types/adone/test/glosses/utils.ts index 33698bfb29..1ffabbd59b 100644 --- a/types/adone/test/glosses/utils.ts +++ b/types/adone/test/glosses/utils.ts @@ -34,13 +34,6 @@ namespace utilTests { const b: string = util.functionName((a, b, c) => { }); } - namespace mapArguments { - const a: (...args: any[]) => any = util.mapArguments(() => { }); - const b: (...args: T[]) => T[] = util.mapArguments(1); - const c: (...args: any[]) => any = util.mapArguments([1]); - const d: (x: T) => T = util.mapArguments(); - } - namespace parseMs { const result: { days: number; @@ -56,10 +49,6 @@ namespace utilTests { const c: string = util.pluralizeWord("day", "days", 1); } - namespace functionParams { - const a: string[] = util.functionParams((a: any, b: any, c: any) => { }); - } - namespace randomChoice { const a: number = util.randomChoice([1, 2, 3]); const b: string = util.randomChoice(["1", "2", "3"]); @@ -174,19 +163,10 @@ namespace utilTests { const a: string = util.globParent("a/b/c/**"); } - namespace by { - const a: (a: number, b: number) => any = util.by((x: number): number => x); - const b: (a: number, b: number) => number = util.by((x: number): string => `${x}`, (a: string, b: string) => a.length - b.length); - } - namespace toFastProperties { const a: object = util.toFastProperties({}); } - namespace stripBom { - const a: string = util.stripBom("123"); - } - namespace sortKeys { const a: object = util.sortKeys({}); const b: object = util.sortKeys({}, {}); @@ -234,16 +214,27 @@ namespace utilTests { const b: number | null = util.parseSize("123Kb"); } + namespace Cloner { + const a = new util.Cloner(); + a.clone({}); + a.clone({}, {}); + a.clone({}, { deep: true }); + a.clone({}, { nonPlainObjects: false }); + a.clone({}, { onlyEnumerable: true }); + const c = a.binding(); + c({}); + c({}, {}); + c({}, { deep: true }); + c({}, { onlyEnumerable: false }); + c({}, { nonPlainObjects: true }); + } + namespace clone { const a: object = util.clone({}); const b: object = util.clone({}, {}); const c: object = util.clone({}, { deep: true }); } - namespace toUTF8Array { - const a: number[] = util.toUTF8Array("hello"); - } - namespace asyncIter { util.asyncIter([1, 2, 3], () => { }, () => { }); } @@ -298,28 +289,34 @@ namespace utilTests { const a: object = util.assignDeep({ a: 1 }, { a: 2 }); } - namespace match { - const a: number | boolean = util.match(["a", "b", "c"], "a"); - const b: (a: any, b: any) => number | boolean = util.match("a", { index: true }); - const c: number | boolean = util.match(["a", "b", "c"], "a", { dot: true }); - const d: (a: any, b: any) => number | boolean = util.match("a", { end: 2 }); - const e: (a: any, b: any) => number | boolean = util.match("a", { start: 2 }); - const f: (a: any, b: any) => number | boolean = util.match("a"); + namespace matchPath { + const a: number | boolean = util.matchPath(["a", "b", "c"], "a"); + const b: (a: any, b: any) => number | boolean = util.matchPath("a", { index: true }); + const c: number | boolean = util.matchPath(["a", "b", "c"], "a", { dot: true }); + const d: (a: any, b: any) => number | boolean = util.matchPath("a", { end: 2 }); + const e: (a: any, b: any) => number | boolean = util.matchPath("a", { start: 2 }); + const f: (a: any, b: any) => number | boolean = util.matchPath("a"); } namespace toposort { - const a: number[] = util.toposort([ - [0, 1], - [2, 3], - [4, 5], - [6, 7] + const a: string[] = util.toposort([ + ["0", "1"], + ["2", "3"], + ["4", "5"], + ["6", "7"] ]); - const b: number[] = util.toposort.array([0, 1, 2], [ - [0, 1], - [2, 3], - [4, 5], - [6, 7] + const b: string[] = util.toposort.array(["0", "1", "2"], [ + ["0", "1"], + ["2", "3"], + ["4", "5"], + ["6", "7"] ]); + const sorter = new util.toposort.Sorter(); + sorter.add("a", "b"); + sorter.add("a", ["c"]); + const c: string[] = sorter.sort(); + sorter.clear(); + sorter.edges[0][0].charCodeAt(100); } namespace jsesc { @@ -340,10 +337,6 @@ namespace utilTests { const o: string = util.jsesc({ a: 1 }, { __inline2__: true }); } - namespace typeOf { - const a: string = util.typeOf(1); - } - namespace memcpy { const a: number = util.memcpy.utou(Buffer.alloc(10), 0, Buffer.alloc(10), 0, 10); const b: number = util.memcpy.atoa(new ArrayBuffer(10), 0, new ArrayBuffer(10), 0, 10); @@ -394,73 +387,6 @@ namespace utilTests { a.getter("a").access("b").method("c").setter("d"); } - namespace GlobExp { - { - const glob = new util.GlobExp("*.js"); - const a: boolean = glob.hasMagic(); - const b: string[] = glob.expandBraces(); - const c: RegExp = glob.makeRe(); - const d: boolean = glob.test("a.js"); - } - { - const a: boolean = util.GlobExp.hasMagic("*.js"); - const b: string[] = util.GlobExp.expandBraces("*.js"); - const c: RegExp = util.GlobExp.makeRe("*.js"); - const d: boolean = util.GlobExp.test("*.js", "a.js"); - } - new util.GlobExp(""); - new util.GlobExp("", {}); - new util.GlobExp("", { dot: true }); - new util.GlobExp("", { flipNegate: true }); - new util.GlobExp("", { matchBase: true }); - new util.GlobExp("", { nobrace: true }); - new util.GlobExp("", { nocase: true }); - new util.GlobExp("", { nocomment: true }); - new util.GlobExp("", { noext: true }); - new util.GlobExp("", { noglobstar: true }); - new util.GlobExp("", { nonegate: true }); - util.GlobExp.hasMagic("", {}); - util.GlobExp.hasMagic("", { dot: true }); - util.GlobExp.hasMagic("", { flipNegate: true }); - util.GlobExp.hasMagic("", { matchBase: true }); - util.GlobExp.hasMagic("", { nobrace: true }); - util.GlobExp.hasMagic("", { nocase: true }); - util.GlobExp.hasMagic("", { nocomment: true }); - util.GlobExp.hasMagic("", { noext: true }); - util.GlobExp.hasMagic("", { noglobstar: true }); - util.GlobExp.hasMagic("", { nonegate: true }); - util.GlobExp.expandBraces("", {}); - util.GlobExp.expandBraces("", { dot: true }); - util.GlobExp.expandBraces("", { flipNegate: true }); - util.GlobExp.expandBraces("", { matchBase: true }); - util.GlobExp.expandBraces("", { nobrace: true }); - util.GlobExp.expandBraces("", { nocase: true }); - util.GlobExp.expandBraces("", { nocomment: true }); - util.GlobExp.expandBraces("", { noext: true }); - util.GlobExp.expandBraces("", { noglobstar: true }); - util.GlobExp.expandBraces("", { nonegate: true }); - util.GlobExp.makeRe("", {}); - util.GlobExp.makeRe("", { dot: true }); - util.GlobExp.makeRe("", { flipNegate: true }); - util.GlobExp.makeRe("", { matchBase: true }); - util.GlobExp.makeRe("", { nobrace: true }); - util.GlobExp.makeRe("", { nocase: true }); - util.GlobExp.makeRe("", { nocomment: true }); - util.GlobExp.makeRe("", { noext: true }); - util.GlobExp.makeRe("", { noglobstar: true }); - util.GlobExp.makeRe("", { nonegate: true }); - util.GlobExp.test("a", "b", {}); - util.GlobExp.test("a", "b", { dot: true }); - util.GlobExp.test("a", "b", { flipNegate: true }); - util.GlobExp.test("a", "b", { matchBase: true }); - util.GlobExp.test("a", "b", { nobrace: true }); - util.GlobExp.test("a", "b", { nocase: true }); - util.GlobExp.test("a", "b", { nocomment: true }); - util.GlobExp.test("a", "b", { noext: true }); - util.GlobExp.test("a", "b", { noglobstar: true }); - util.GlobExp.test("a", "b", { nonegate: true }); - } - namespace iconv { // TODO } @@ -477,19 +403,6 @@ namespace utilTests { const b: string = util.sqlstring.dateToString(123, "local"); } - namespace arrayToList { - const a: string = util.sqlstring.arrayToList(["1", "a"]); - } - - namespace bufferToString { - const a: string = util.sqlstring.bufferToString(Buffer.alloc(10)); - } - - namespace objectToValues { - const a: string = util.sqlstring.objectToValues({ a: 1 }); - const b: string = util.sqlstring.objectToValues({ a: 1 }, "local"); - } - namespace escape { const a: string = util.sqlstring.escape(1); const b: string = util.sqlstring.escape(1, true); @@ -532,44 +445,55 @@ namespace utilTests { } namespace buffer { - const a: Buffer = util.buffer.concat([Buffer.alloc(10), Buffer.alloc(20)], 30); - util.buffer.mask(Buffer.alloc(10), Buffer.alloc(10), Buffer.alloc(10), 0, 10); - util.buffer.unmask(Buffer.alloc(10), Buffer.alloc(10)); + namespace toArrayBuffer { + const a = util.buffer.toArrayBuffer(Buffer.from("hello")); + a.slice(10); + } + + namespace xor { + const a = util.buffer.xor(Buffer.from("hello"), Buffer.from("world")); + a.writeUInt32LE(20, 1); + } } namespace shebang { const a: string | null = util.shebang("#!/bin/sh"); } - namespace ReInterval { - new util.ReInterval(() => { }, 1000); - new util.ReInterval(() => { }, 1000, [1]); - const a = new util.ReInterval(() => { }, 1000); + namespace reinterval { + util.reinterval(() => { }, 1000); + util.reinterval(() => { }, 1000, [1]); + const a = util.reinterval(() => { }, 1000); a.reschedule(400); a.clear(); a.destroy(); } - namespace RateLimiter { - new util.RateLimiter(); - new util.RateLimiter(1); - new util.RateLimiter(1, 1000); - new util.RateLimiter(1, 1000, true); - const a = new util.RateLimiter(); - a.removeTokens(1).then((x: number) => { }); - const b: boolean = a.tryRemoveTokens(10); - const c: number = a.getTokensRemaining(); - } - namespace throttle { - const a: () => Promise = util.throttle(() => 42); - const b: (a: number) => Promise = util.throttle((a: number) => `${a}`); - const c: (a: number, b: string) => Promise = util.throttle((a: number, b: string) => String(a) + b); - const d = util.throttle(() => { }, {}); - const e = util.throttle(() => { }, { interval: 1000 }); - const f = util.throttle(() => { }, { max: 10 }); - const g = util.throttle(() => { }, { ordered: true }); - const h = util.throttle(() => { }, { waitForReturn: true }); + namespace RateLimiter { + new util.throttle.RateLimiter(); + new util.throttle.RateLimiter(1); + new util.throttle.RateLimiter(1, 1000); + new util.throttle.RateLimiter(1, 1000, true); + const a = new util.throttle.RateLimiter(); + a.removeTokens(1).then((x: number) => { }); + const b: boolean = a.tryRemoveTokens(10); + const c: number = a.getTokensRemaining(); + } + + const a: () => Promise = util.throttle.create(() => 42); + const b: (a: number) => Promise = util.throttle.create((a: number) => `${a}`); + const c: (a: number, b: string) => Promise = util.throttle.create((a: number, b: string) => String(a) + b); + const d = util.throttle.create(() => { }, {}); + const e = util.throttle.create(() => { }, { interval: 1000 }); + const f = util.throttle.create(() => { }, { max: 10 }); + const g = util.throttle.create(() => { }, { ordered: true }); + const h = util.throttle.create(() => { }, { waitForReturn: true }); + const i = util.throttle.create(() => { }, { onDone() {} }); + const j = util.throttle.create(() => { }, { drop: true }); + const k = util.throttle.create(() => { }, { dropLast: true }); + + const l: symbol = util.throttle.DROPPED; } namespace fakeClock { @@ -741,17 +665,6 @@ namespace utilTests { } } - namespace userid { - const { userid } = util; - - { const a: number = userid.uid("someone").gid; } - { const a: number = userid.uid("someone").uid; } - { const a: number = userid.gid("someone"); } - { const a: string = userid.username(1000); } - { const a: string = userid.groupname(1000); } - { const gids: number[] = userid.gids("someone"); } - } - namespace LogRotator { const { LogRotator } = util; new LogRotator("file.log"); @@ -766,4 +679,679 @@ namespace utilTests { new LogRotator("file.log").start(); new LogRotator("file.log").stop(); } + + namespace arrayDiff { + const { arrayDiff } = util; + + arrayDiff([1, 2, 3], [4, 5, 6])[0].toFixed(); + arrayDiff(["1"])[0].charCodeAt(100); + } + + namespace fillRange { + const { fillRange } = util; + + { const a: number[] = fillRange(1, 2); } + { const a: string[] = fillRange(1, 2, { stringify: true }); } + { const a: string = fillRange(1, 2, { toRegex: true }); } + { const a: string[] = fillRange("1", "2"); } + { const a: string = fillRange("1", "2", { toRegex: true }); } + } + + namespace inflection { + const { inflection } = util; + + { const a: string = inflection.singularizeWord("hello"); } + { const a: string = inflection.singularizeWord("hello", "aaaa"); } + { const a: string = inflection.pluralizeWord("hello"); } + { const a: string = inflection.pluralizeWord("hello", "aaaa"); } + { const a: string = inflection.underscore("hello"); } + } + + namespace machineId { + const { machineId } = util; + + (async () => { + const a: string = await machineId(); + }); + } + + namespace merge { + const { merge } = util; + + merge({}, {}); + merge({}, {}, { allowPrototypes: true }); + merge({}, {}, { plainObjects: false }); + } + + namespace omit { + const { omit } = util; + + omit({}, ["a"]); + omit({}, "a"); + omit({}, (x) => x === "a"); + } + + namespace parseTime { + const { parseTime } = util; + + { const a: number = parseTime(123); } + { const a: number | null = parseTime("12"); } + } + + namespace pick { + const { pick } = util; + + pick({}, ["a", "b", "c"]); + pick({}, new Set(["a", "b", "c"])); + } + + namespace querystring { + const { querystring: qs } = util; + + { const a: string = qs.escape("asd"); } + { const a: string = qs.formats.default; } + { const a: string = qs.formats.RFC1738; } + { const a: string = qs.formats.RFC3986; } + { const a: string = qs.formats.formatters.RFC1738("ha"); } + { const a: string = qs.formats.formatters.RFC3986("ha"); } + { const a: object = qs.parse("asdasd"); } + { const a: object = qs.parse("asdasd", {}); } + { const a: object = qs.parse("asdasd", { allowDots: false }); } + { const a: object = qs.parse("asdasd", { allowPrototypes: false }); } + { const a: object = qs.parse("asdasd", { arrayLimit: 100 }); } + { const a: object = qs.parse("asdasd", { decoder: (s) => s }); } + { const a: object = qs.parse("asdasd", { decoder: (s, d) => d(s) }); } + { const a: object = qs.parse("asdasd", { delimiter: "a" }); } + { const a: object = qs.parse("asdasd", { depth: 100 }); } + { const a: object = qs.parse("asdasd", { ignoreQueryPrefix: false }); } + { const a: object = qs.parse("asdasd", { parameterLimit: 100 }); } + { const a: object = qs.parse("asdasd", { parseArrays: false }); } + { const a: object = qs.parse("asdasd", { plainObjects: true }); } + { const a: object = qs.parse("asdasd", { strictNullHandling: false }); } + { const a: string = qs.stringify({}); } + { const a: string = qs.stringify({}, {}); } + { const a: string = qs.stringify({}, { addQueryPrefix: false }); } + { const a: string = qs.stringify({}, { allowDots: false }); } + { const a: string = qs.stringify({}, { arrayFormat: "indices" }); } + { const a: string = qs.stringify({}, { arrayFormat: "brackets" }); } + { const a: string = qs.stringify({}, { arrayFormat: "repeat" }); } + { const a: string = qs.stringify({}, { delimiter: "1" }); } + { const a: string = qs.stringify({}, { encode: true }); } + { const a: string = qs.stringify({}, { encoder: (s) => s }); } + { const a: string = qs.stringify({}, { encodeValuesOnly: false }); } + { const a: string = qs.stringify({}, { filter: [1, 2, 3] }); } + { const a: string = qs.stringify({}, { filter: ["1", "2", "3"] }); } + { const a: string = qs.stringify({}, { filter: (prefix: string, value: any) => value === 1 }); } + { const a: string = qs.stringify({}, { indices: false }); } + { const a: string = qs.stringify({}, { serializeDate(d) { return String(d.getTime()); } }); } + { const a: string = qs.stringify({}, { skipNulls: false }); } + { const a: string = qs.stringify({}, { sort(a, b) { return a - b; } }); } + { const a: string = qs.stringify({}, { strictNullHandling: false }); } + } + + namespace regexNot { + const { regexNot } = util; + + { const a: RegExp = regexNot("a"); } + { const a: RegExp = regexNot("a", {}); } + { const a: RegExp = regexNot("a", { contains: false }); } + } + + namespace repeat { + const { repeat } = util; + { const a: number[] = repeat(1, 10); } + { const a: string[] = repeat("a", 10); } + { const a: number[][] = repeat([2], 10); } + } + + namespace signalNameToCode { + const { signalNameToCode } = util; + signalNameToCode("SIGINT").toFixed(2); + } + + namespace splitBuffer { + const { splitBuffer } = util; + + { const a: Buffer[] = splitBuffer(Buffer.from("asd"), Buffer.from("|")); } + { const a: Buffer[] = splitBuffer(Buffer.from("asd"), Buffer.from("|"), true); } + { const a: Buffer[] = splitBuffer("asd", Buffer.from("|"), true); } + { const a: Buffer[] = splitBuffer("asd", "|"); } + } + + namespace splitString { + const { splitString } = util; + + splitString("a"); + splitString("a", {}); + splitString("a", { braces: false }); + splitString("a", { keepDoubleQuotes: false }); + splitString("a", { keepEscaping: false }); + splitString("a", { keepQuotes: false }); + splitString("a", { keepSingleQuotes: false }); + splitString("a", { separator: "|" }); + splitString("a", { + split(token) { + { const a: string[] = token.arr; } + { const a: number = token.idx; } + { const a: string = token.str; } + { const a: string = token.val; } + } + }); + splitString("a", (token) => { + { const a: string[] = token.arr; } + { const a: number = token.idx; } + { const a: string = token.str; } + { const a: string = token.val; } + }); + splitString("a", {}, (token) => { + { const a: string[] = token.arr; } + { const a: number = token.idx; } + { const a: string = token.str; } + { const a: string = token.val; } + }); + } + + namespace toRegex { + const { toRegex } = util; + + { const a: RegExp = toRegex("a"); } + { const a: RegExp = toRegex(["a"]); } + { const a: RegExp = toRegex(["a"], {}); } + { const a: RegExp = toRegex(["a"], { cache: false }); } + { const a: RegExp = toRegex(["a"], { contains: false }); } + { const a: RegExp = toRegex(["a"], { flags: "i" }); } + { const a: RegExp = toRegex(["a"], { negate: false }); } + { const a: RegExp = toRegex(["a"], { nocase: false }); } + } + + namespace toRegexRange { + const { toRegexRange } = util; + + { const a: RegExp = toRegexRange(1, 10); } + { const a: RegExp = toRegexRange("1", "10"); } + { const a: RegExp = toRegexRange(1, 10, {}); } + { const a: RegExp = toRegexRange(1, 10, { capture: false }); } + { const a: RegExp = toRegexRange(1, 10, { relaxZeros: true }); } + { const a: RegExp = toRegexRange(1, 10, { shorthand: false }); } + } + + namespace xorDistance { + const { compare, create, eq, gt, lt } = util.xorDistance; + + { const a: boolean = compare(Buffer.from("1"), Buffer.from("2")); } + { const a: Buffer = create(Buffer.from("1"), Buffer.from("2")); } + { const a: boolean = gt(Buffer.from("1"), Buffer.from("2")); } + { const a: boolean = lt(Buffer.from("1"), Buffer.from("2")); } + { const a: boolean = eq(Buffer.from("1"), Buffer.from("2")); } + } + + namespace braces { + const { braces } = util; + + { const a: string[] = braces("a"); } + { const a: string[] = braces("a", {}); } + { const a: string[] = braces("a", { expand: false }); } + { const a: string[] = braces("a", { nodupes: false }); } + { const a: string[] = braces("a", { optimize: true }); } + { const a: string[] = braces("a", { quantifiers: false }); } + { const a: string[] = braces("a", { rangeLimit: 100 }); } + { const a: string[] = braces("a", { transform: (s: string) => s }); } + { const a: string[] = braces("a", { unescape: false }); } + + { const a: string[] = braces.expand("a"); } + { const a: string[] = braces.expand("a", {}); } + { const a: string[] = braces.expand("a", { expand: false }); } + { const a: string[] = braces.expand("a", { nodupes: false }); } + { const a: string[] = braces.expand("a", { optimize: true }); } + { const a: string[] = braces.expand("a", { quantifiers: false }); } + { const a: string[] = braces.expand("a", { rangeLimit: 100 }); } + { const a: string[] = braces.expand("a", { transform: (s: string) => s }); } + { const a: string[] = braces.expand("a", { unescape: false }); } + + { const a: RegExp = braces.makeRe("a"); } + { const a: RegExp = braces.makeRe("a", {}); } + { const a: RegExp = braces.makeRe("a", { expand: false }); } + { const a: RegExp = braces.makeRe("a", { nodupes: false }); } + { const a: RegExp = braces.makeRe("a", { optimize: true }); } + { const a: RegExp = braces.makeRe("a", { quantifiers: false }); } + { const a: RegExp = braces.makeRe("a", { rangeLimit: 100 }); } + { const a: RegExp = braces.makeRe("a", { transform: (s: string) => s }); } + { const a: RegExp = braces.makeRe("a", { unescape: false }); } + + { const a: number = braces.MAX_LENGTH; } + { const a: object = braces.getCache(); } + braces.clearCache(); + braces.resizeCache(100500); + } + + namespace match { + const { match } = util; + + { const a: string[] = match(["a"], "a"); } + { const a: string[] = match(["a"], ["a"]); } + { const a: string[] = match(["a"], ["a"], {}); } + { const a: string[] = match(["a"], ["a"], { basename: false }); } + { const a: string[] = match(["a"], ["a"], { bash: false }); } + { const a: string[] = match(["a"], ["a"], { cache: false }); } + { const a: string[] = match(["a"], ["a"], { dot: true }); } + { const a: string[] = match(["a"], ["a"], { failglob: false }); } + { const a: string[] = match(["a"], ["a"], { ignore: "a" }); } + { const a: string[] = match(["a"], ["a"], { ignore: ["a"] }); } + { const a: string[] = match(["a"], ["a"], { matchBase: false }); } + { const a: string[] = match(["a"], ["a"], { nobrace: true }); } + { const a: string[] = match(["a"], ["a"], { nocase: false }); } + { const a: string[] = match(["a"], ["a"], { nodupes: true }); } + { const a: string[] = match(["a"], ["a"], { noext: false }); } + { const a: string[] = match(["a"], ["a"], { noglobstar: true }); } + { const a: string[] = match(["a"], ["a"], { nonegate: false }); } + { const a: string[] = match(["a"], ["a"], { nonull: false }); } + { const a: string[] = match(["a"], ["a"], { nullglob: false }); } + { const a: string[] = match(["a"], ["a"], { snapdragon: {} }); } + { const a: string[] = match(["a"], ["a"], { sourcemap: false }); } + { const a: string[] = match(["a"], ["a"], { unescape: false }); } + { const a: string[] = match(["a"], ["a"], { unixify: false }); } + + { const a: string[] = match.match(["a"], "a"); } + { const a: string[] = match.match(["a"], "a", {}); } + { const a: string[] = match.match(["a"], "a", { basename: false }); } + { const a: string[] = match.match(["a"], "a", { bash: false }); } + { const a: string[] = match.match(["a"], "a", { cache: false }); } + { const a: string[] = match.match(["a"], "a", { dot: true }); } + { const a: string[] = match.match(["a"], "a", { failglob: false }); } + { const a: string[] = match.match(["a"], "a", { ignore: "a" }); } + { const a: string[] = match.match(["a"], "a", { ignore: ["a"] }); } + { const a: string[] = match.match(["a"], "a", { matchBase: false }); } + { const a: string[] = match.match(["a"], "a", { nobrace: true }); } + { const a: string[] = match.match(["a"], "a", { nocase: false }); } + { const a: string[] = match.match(["a"], "a", { nodupes: true }); } + { const a: string[] = match.match(["a"], "a", { noext: false }); } + { const a: string[] = match.match(["a"], "a", { noglobstar: true }); } + { const a: string[] = match.match(["a"], "a", { nonegate: false }); } + { const a: string[] = match.match(["a"], "a", { nonull: false }); } + { const a: string[] = match.match(["a"], "a", { nullglob: false }); } + { const a: string[] = match.match(["a"], "a", { snapdragon: {} }); } + { const a: string[] = match.match(["a"], "a", { sourcemap: false }); } + { const a: string[] = match.match(["a"], "a", { unescape: false }); } + { const a: string[] = match.match(["a"], "a", { unixify: false }); } + + { const a: boolean = match.isMatch("a", "a"); } + { const a: boolean = match.isMatch("a", "a", {}); } + { const a: boolean = match.isMatch("a", "a", { basename: false }); } + { const a: boolean = match.isMatch("a", "a", { bash: false }); } + { const a: boolean = match.isMatch("a", "a", { cache: false }); } + { const a: boolean = match.isMatch("a", "a", { dot: true }); } + { const a: boolean = match.isMatch("a", "a", { failglob: false }); } + { const a: boolean = match.isMatch("a", "a", { ignore: "a" }); } + { const a: boolean = match.isMatch("a", "a", { ignore: ["a"] }); } + { const a: boolean = match.isMatch("a", "a", { matchBase: false }); } + { const a: boolean = match.isMatch("a", "a", { nobrace: true }); } + { const a: boolean = match.isMatch("a", "a", { nocase: false }); } + { const a: boolean = match.isMatch("a", "a", { nodupes: true }); } + { const a: boolean = match.isMatch("a", "a", { noext: false }); } + { const a: boolean = match.isMatch("a", "a", { noglobstar: true }); } + { const a: boolean = match.isMatch("a", "a", { nonegate: false }); } + { const a: boolean = match.isMatch("a", "a", { nonull: false }); } + { const a: boolean = match.isMatch("a", "a", { nullglob: false }); } + { const a: boolean = match.isMatch("a", "a", { snapdragon: {} }); } + { const a: boolean = match.isMatch("a", "a", { sourcemap: false }); } + { const a: boolean = match.isMatch("a", "a", { unescape: false }); } + { const a: boolean = match.isMatch("a", "a", { unixify: false }); } + + { const a: boolean = match.some(["a"], ["a"]); } + { const a: boolean = match.some("a", "a"); } + { const a: boolean = match.some("a", "a", {}); } + { const a: boolean = match.some("a", "a", { basename: false }); } + { const a: boolean = match.some("a", "a", { bash: false }); } + { const a: boolean = match.some("a", "a", { cache: false }); } + { const a: boolean = match.some("a", "a", { dot: true }); } + { const a: boolean = match.some("a", "a", { failglob: false }); } + { const a: boolean = match.some("a", "a", { ignore: "a" }); } + { const a: boolean = match.some("a", "a", { ignore: ["a"] }); } + { const a: boolean = match.some("a", "a", { matchBase: false }); } + { const a: boolean = match.some("a", "a", { nobrace: true }); } + { const a: boolean = match.some("a", "a", { nocase: false }); } + { const a: boolean = match.some("a", "a", { nodupes: true }); } + { const a: boolean = match.some("a", "a", { noext: false }); } + { const a: boolean = match.some("a", "a", { noglobstar: true }); } + { const a: boolean = match.some("a", "a", { nonegate: false }); } + { const a: boolean = match.some("a", "a", { nonull: false }); } + { const a: boolean = match.some("a", "a", { nullglob: false }); } + { const a: boolean = match.some("a", "a", { snapdragon: {} }); } + { const a: boolean = match.some("a", "a", { sourcemap: false }); } + { const a: boolean = match.some("a", "a", { unescape: false }); } + { const a: boolean = match.some("a", "a", { unixify: false }); } + + { const a: boolean = match.every(["a"], ["a"]); } + { const a: boolean = match.every("a", "a"); } + { const a: boolean = match.every("a", "a", {}); } + { const a: boolean = match.every("a", "a", { basename: false }); } + { const a: boolean = match.every("a", "a", { bash: false }); } + { const a: boolean = match.every("a", "a", { cache: false }); } + { const a: boolean = match.every("a", "a", { dot: true }); } + { const a: boolean = match.every("a", "a", { failglob: false }); } + { const a: boolean = match.every("a", "a", { ignore: "a" }); } + { const a: boolean = match.every("a", "a", { ignore: ["a"] }); } + { const a: boolean = match.every("a", "a", { matchBase: false }); } + { const a: boolean = match.every("a", "a", { nobrace: true }); } + { const a: boolean = match.every("a", "a", { nocase: false }); } + { const a: boolean = match.every("a", "a", { nodupes: true }); } + { const a: boolean = match.every("a", "a", { noext: false }); } + { const a: boolean = match.every("a", "a", { noglobstar: true }); } + { const a: boolean = match.every("a", "a", { nonegate: false }); } + { const a: boolean = match.every("a", "a", { nonull: false }); } + { const a: boolean = match.every("a", "a", { nullglob: false }); } + { const a: boolean = match.every("a", "a", { snapdragon: {} }); } + { const a: boolean = match.every("a", "a", { sourcemap: false }); } + { const a: boolean = match.every("a", "a", { unescape: false }); } + { const a: boolean = match.every("a", "a", { unixify: false }); } + + { const a: boolean = match.any(["a"], ["a"]); } + { const a: boolean = match.any("a", "a"); } + { const a: boolean = match.any("a", "a", {}); } + { const a: boolean = match.any("a", "a", { basename: false }); } + { const a: boolean = match.any("a", "a", { bash: false }); } + { const a: boolean = match.any("a", "a", { cache: false }); } + { const a: boolean = match.any("a", "a", { dot: true }); } + { const a: boolean = match.any("a", "a", { failglob: false }); } + { const a: boolean = match.any("a", "a", { ignore: "a" }); } + { const a: boolean = match.any("a", "a", { ignore: ["a"] }); } + { const a: boolean = match.any("a", "a", { matchBase: false }); } + { const a: boolean = match.any("a", "a", { nobrace: true }); } + { const a: boolean = match.any("a", "a", { nocase: false }); } + { const a: boolean = match.any("a", "a", { nodupes: true }); } + { const a: boolean = match.any("a", "a", { noext: false }); } + { const a: boolean = match.any("a", "a", { noglobstar: true }); } + { const a: boolean = match.any("a", "a", { nonegate: false }); } + { const a: boolean = match.any("a", "a", { nonull: false }); } + { const a: boolean = match.any("a", "a", { nullglob: false }); } + { const a: boolean = match.any("a", "a", { snapdragon: {} }); } + { const a: boolean = match.any("a", "a", { sourcemap: false }); } + { const a: boolean = match.any("a", "a", { unescape: false }); } + { const a: boolean = match.any("a", "a", { unixify: false }); } + + { const a: boolean = match.all("a", "a"); } + { const a: boolean = match.all("a", ["a"]); } + { const a: boolean = match.all(["a"], "a"); } + { const a: boolean = match.all(["a"], "a", {}); } + { const a: boolean = match.all(["a"], ["a"], { basename: false }); } + { const a: boolean = match.all(["a"], ["a"], { bash: false }); } + { const a: boolean = match.all(["a"], ["a"], { cache: false }); } + { const a: boolean = match.all(["a"], ["a"], { dot: true }); } + { const a: boolean = match.all(["a"], ["a"], { failglob: false }); } + { const a: boolean = match.all(["a"], ["a"], { ignore: "a" }); } + { const a: boolean = match.all(["a"], ["a"], { ignore: ["a"] }); } + { const a: boolean = match.all(["a"], ["a"], { matchBase: false }); } + { const a: boolean = match.all(["a"], ["a"], { nobrace: true }); } + { const a: boolean = match.all(["a"], ["a"], { nocase: false }); } + { const a: boolean = match.all(["a"], ["a"], { nodupes: true }); } + { const a: boolean = match.all(["a"], ["a"], { noext: false }); } + { const a: boolean = match.all(["a"], ["a"], { noglobstar: true }); } + { const a: boolean = match.all(["a"], ["a"], { nonegate: false }); } + { const a: boolean = match.all(["a"], ["a"], { nonull: false }); } + { const a: boolean = match.all(["a"], ["a"], { nullglob: false }); } + { const a: boolean = match.all(["a"], ["a"], { snapdragon: {} }); } + { const a: boolean = match.all(["a"], ["a"], { sourcemap: false }); } + { const a: boolean = match.all(["a"], ["a"], { unescape: false }); } + { const a: boolean = match.all(["a"], ["a"], { unixify: false }); } + + { const a: string[] = match.not(["a"], ["a"]); } + { const a: string[] = match.not(["a"], "a"); } + { const a: string[] = match.not(["a"], "a", {}); } + { const a: string[] = match.not(["a"], "a", { basename: false }); } + { const a: string[] = match.not(["a"], "a", { bash: false }); } + { const a: string[] = match.not(["a"], "a", { cache: false }); } + { const a: string[] = match.not(["a"], "a", { dot: true }); } + { const a: string[] = match.not(["a"], "a", { failglob: false }); } + { const a: string[] = match.not(["a"], "a", { ignore: "a" }); } + { const a: string[] = match.not(["a"], "a", { ignore: ["a"] }); } + { const a: string[] = match.not(["a"], "a", { matchBase: false }); } + { const a: string[] = match.not(["a"], "a", { nobrace: true }); } + { const a: string[] = match.not(["a"], "a", { nocase: false }); } + { const a: string[] = match.not(["a"], "a", { nodupes: true }); } + { const a: string[] = match.not(["a"], "a", { noext: false }); } + { const a: string[] = match.not(["a"], "a", { noglobstar: true }); } + { const a: string[] = match.not(["a"], "a", { nonegate: false }); } + { const a: string[] = match.not(["a"], "a", { nonull: false }); } + { const a: string[] = match.not(["a"], "a", { nullglob: false }); } + { const a: string[] = match.not(["a"], "a", { snapdragon: {} }); } + { const a: string[] = match.not(["a"], "a", { sourcemap: false }); } + { const a: string[] = match.not(["a"], "a", { unescape: false }); } + { const a: string[] = match.not(["a"], "a", { unixify: false }); } + + { const a: boolean = match.contains("a", "a"); } + { const a: boolean = match.contains("a", ["a"]); } + { const a: boolean = match.contains("a", ["a"], {}); } + { const a: boolean = match.contains("a", ["a"], { basename: false }); } + { const a: boolean = match.contains("a", ["a"], { bash: false }); } + { const a: boolean = match.contains("a", ["a"], { cache: false }); } + { const a: boolean = match.contains("a", ["a"], { dot: true }); } + { const a: boolean = match.contains("a", ["a"], { failglob: false }); } + { const a: boolean = match.contains("a", ["a"], { ignore: "a" }); } + { const a: boolean = match.contains("a", ["a"], { ignore: ["a"] }); } + { const a: boolean = match.contains("a", ["a"], { matchBase: false }); } + { const a: boolean = match.contains("a", ["a"], { nobrace: true }); } + { const a: boolean = match.contains("a", ["a"], { nocase: false }); } + { const a: boolean = match.contains("a", ["a"], { nodupes: true }); } + { const a: boolean = match.contains("a", ["a"], { noext: false }); } + { const a: boolean = match.contains("a", ["a"], { noglobstar: true }); } + { const a: boolean = match.contains("a", ["a"], { nonegate: false }); } + { const a: boolean = match.contains("a", ["a"], { nonull: false }); } + { const a: boolean = match.contains("a", ["a"], { nullglob: false }); } + { const a: boolean = match.contains("a", ["a"], { snapdragon: {} }); } + { const a: boolean = match.contains("a", ["a"], { sourcemap: false }); } + { const a: boolean = match.contains("a", ["a"], { unescape: false }); } + { const a: boolean = match.contains("a", ["a"], { unixify: false }); } + + { const a: object = match.matchKeys({}, "a"); } + { const a: object = match.matchKeys({}, ["a"]); } + { const a: object = match.matchKeys({}, ["a"], {}); } + { const a: object = match.matchKeys({}, ["a"], { basename: false }); } + { const a: object = match.matchKeys({}, ["a"], { bash: false }); } + { const a: object = match.matchKeys({}, ["a"], { cache: false }); } + { const a: object = match.matchKeys({}, ["a"], { dot: true }); } + { const a: object = match.matchKeys({}, ["a"], { failglob: false }); } + { const a: object = match.matchKeys({}, ["a"], { ignore: "a" }); } + { const a: object = match.matchKeys({}, ["a"], { ignore: ["a"] }); } + { const a: object = match.matchKeys({}, ["a"], { matchBase: false }); } + { const a: object = match.matchKeys({}, ["a"], { nobrace: true }); } + { const a: object = match.matchKeys({}, ["a"], { nocase: false }); } + { const a: object = match.matchKeys({}, ["a"], { nodupes: true }); } + { const a: object = match.matchKeys({}, ["a"], { noext: false }); } + { const a: object = match.matchKeys({}, ["a"], { noglobstar: true }); } + { const a: object = match.matchKeys({}, ["a"], { nonegate: false }); } + { const a: object = match.matchKeys({}, ["a"], { nonull: false }); } + { const a: object = match.matchKeys({}, ["a"], { nullglob: false }); } + { const a: object = match.matchKeys({}, ["a"], { snapdragon: {} }); } + { const a: object = match.matchKeys({}, ["a"], { sourcemap: false }); } + { const a: object = match.matchKeys({}, ["a"], { unescape: false }); } + { const a: object = match.matchKeys({}, ["a"], { unixify: false }); } + + { const a: (s: string) => boolean = match.matcher("a"); } + { const a: (s: string) => boolean = match.matcher(["a"]); } + { const a: (s: string) => boolean = match.matcher(["a"], {}); } + { const a: (s: string) => boolean = match.matcher(["a"], { basename: false }); } + { const a: (s: string) => boolean = match.matcher(["a"], { bash: false }); } + { const a: (s: string) => boolean = match.matcher(["a"], { cache: false }); } + { const a: (s: string) => boolean = match.matcher(["a"], { dot: true }); } + { const a: (s: string) => boolean = match.matcher(["a"], { failglob: false }); } + { const a: (s: string) => boolean = match.matcher(["a"], { ignore: "a" }); } + { const a: (s: string) => boolean = match.matcher(["a"], { ignore: ["a"] }); } + { const a: (s: string) => boolean = match.matcher(["a"], { matchBase: false }); } + { const a: (s: string) => boolean = match.matcher(["a"], { nobrace: true }); } + { const a: (s: string) => boolean = match.matcher(["a"], { nocase: false }); } + { const a: (s: string) => boolean = match.matcher(["a"], { nodupes: true }); } + { const a: (s: string) => boolean = match.matcher(["a"], { noext: false }); } + { const a: (s: string) => boolean = match.matcher(["a"], { noglobstar: true }); } + { const a: (s: string) => boolean = match.matcher(["a"], { nonegate: false }); } + { const a: (s: string) => boolean = match.matcher(["a"], { nonull: false }); } + { const a: (s: string) => boolean = match.matcher(["a"], { nullglob: false }); } + { const a: (s: string) => boolean = match.matcher(["a"], { snapdragon: {} }); } + { const a: (s: string) => boolean = match.matcher(["a"], { sourcemap: false }); } + { const a: (s: string) => boolean = match.matcher(["a"], { unescape: false }); } + { const a: (s: string) => boolean = match.matcher(["a"], { unixify: false }); } + + { const a: string[] | null = match.capture("a", "a"); } + { const a: string[] | null = match.capture("a", "a", {}); } + { const a: string[] | null = match.capture("a", "a", { basename: false }); } + { const a: string[] | null = match.capture("a", "a", { bash: false }); } + { const a: string[] | null = match.capture("a", "a", { cache: false }); } + { const a: string[] | null = match.capture("a", "a", { dot: true }); } + { const a: string[] | null = match.capture("a", "a", { failglob: false }); } + { const a: string[] | null = match.capture("a", "a", { ignore: "a" }); } + { const a: string[] | null = match.capture("a", "a", { ignore: ["a"] }); } + { const a: string[] | null = match.capture("a", "a", { matchBase: false }); } + { const a: string[] | null = match.capture("a", "a", { nobrace: true }); } + { const a: string[] | null = match.capture("a", "a", { nocase: false }); } + { const a: string[] | null = match.capture("a", "a", { nodupes: true }); } + { const a: string[] | null = match.capture("a", "a", { noext: false }); } + { const a: string[] | null = match.capture("a", "a", { noglobstar: true }); } + { const a: string[] | null = match.capture("a", "a", { nonegate: false }); } + { const a: string[] | null = match.capture("a", "a", { nonull: false }); } + { const a: string[] | null = match.capture("a", "a", { nullglob: false }); } + { const a: string[] | null = match.capture("a", "a", { snapdragon: {} }); } + { const a: string[] | null = match.capture("a", "a", { sourcemap: false }); } + { const a: string[] | null = match.capture("a", "a", { unescape: false }); } + { const a: string[] | null = match.capture("a", "a", { unixify: false }); } + + { const a: RegExp = match.makeRe("a"); } + { const a: RegExp = match.makeRe("a", {}); } + { const a: RegExp = match.makeRe("a", { basename: false }); } + { const a: RegExp = match.makeRe("a", { bash: false }); } + { const a: RegExp = match.makeRe("a", { cache: false }); } + { const a: RegExp = match.makeRe("a", { dot: true }); } + { const a: RegExp = match.makeRe("a", { failglob: false }); } + { const a: RegExp = match.makeRe("a", { ignore: "a" }); } + { const a: RegExp = match.makeRe("a", { ignore: ["a"] }); } + { const a: RegExp = match.makeRe("a", { matchBase: false }); } + { const a: RegExp = match.makeRe("a", { nobrace: true }); } + { const a: RegExp = match.makeRe("a", { nocase: false }); } + { const a: RegExp = match.makeRe("a", { nodupes: true }); } + { const a: RegExp = match.makeRe("a", { noext: false }); } + { const a: RegExp = match.makeRe("a", { noglobstar: true }); } + { const a: RegExp = match.makeRe("a", { nonegate: false }); } + { const a: RegExp = match.makeRe("a", { nonull: false }); } + { const a: RegExp = match.makeRe("a", { nullglob: false }); } + { const a: RegExp = match.makeRe("a", { snapdragon: {} }); } + { const a: RegExp = match.makeRe("a", { sourcemap: false }); } + { const a: RegExp = match.makeRe("a", { unescape: false }); } + { const a: RegExp = match.makeRe("a", { unixify: false }); } + + { const a: string[] = match.braces("a"); } + { const a: string[] = match.braces("a", {}); } + { const a: string[] = match.braces("a", {}); } + { const a: string[] = match.braces("a", { basename: false }); } + { const a: string[] = match.braces("a", { bash: false }); } + { const a: string[] = match.braces("a", { cache: false }); } + { const a: string[] = match.braces("a", { dot: true }); } + { const a: string[] = match.braces("a", { failglob: false }); } + { const a: string[] = match.braces("a", { ignore: "a" }); } + { const a: string[] = match.braces("a", { ignore: ["a"] }); } + { const a: string[] = match.braces("a", { matchBase: false }); } + { const a: string[] = match.braces("a", { nobrace: true }); } + { const a: string[] = match.braces("a", { nocase: false }); } + { const a: string[] = match.braces("a", { nodupes: true }); } + { const a: string[] = match.braces("a", { noext: false }); } + { const a: string[] = match.braces("a", { noglobstar: true }); } + { const a: string[] = match.braces("a", { nonegate: false }); } + { const a: string[] = match.braces("a", { nonull: false }); } + { const a: string[] = match.braces("a", { nullglob: false }); } + { const a: string[] = match.braces("a", { snapdragon: {} }); } + { const a: string[] = match.braces("a", { sourcemap: false }); } + { const a: string[] = match.braces("a", { unescape: false }); } + { const a: string[] = match.braces("a", { unixify: false }); } + + { const a: object = match.create("a"); } + { const a: object = match.create("a", {}); } + { const a: object = match.create("a", { basename: false }); } + { const a: object = match.create("a", { bash: false }); } + { const a: object = match.create("a", { cache: false }); } + { const a: object = match.create("a", { dot: true }); } + { const a: object = match.create("a", { failglob: false }); } + { const a: object = match.create("a", { ignore: "a" }); } + { const a: object = match.create("a", { ignore: ["a"] }); } + { const a: object = match.create("a", { matchBase: false }); } + { const a: object = match.create("a", { nobrace: true }); } + { const a: object = match.create("a", { nocase: false }); } + { const a: object = match.create("a", { nodupes: true }); } + { const a: object = match.create("a", { noext: false }); } + { const a: object = match.create("a", { noglobstar: true }); } + { const a: object = match.create("a", { nonegate: false }); } + { const a: object = match.create("a", { nonull: false }); } + { const a: object = match.create("a", { nullglob: false }); } + { const a: object = match.create("a", { snapdragon: {} }); } + { const a: object = match.create("a", { sourcemap: false }); } + { const a: object = match.create("a", { unescape: false }); } + { const a: object = match.create("a", { unixify: false }); } + { const a: object = match.create("a"); } + + { const a: object = match.parse("a", {}); } + { const a: object = match.parse("a", { basename: false }); } + { const a: object = match.parse("a", { bash: false }); } + { const a: object = match.parse("a", { cache: false }); } + { const a: object = match.parse("a", { dot: true }); } + { const a: object = match.parse("a", { failglob: false }); } + { const a: object = match.parse("a", { ignore: "a" }); } + { const a: object = match.parse("a", { ignore: ["a"] }); } + { const a: object = match.parse("a", { matchBase: false }); } + { const a: object = match.parse("a", { nobrace: true }); } + { const a: object = match.parse("a", { nocase: false }); } + { const a: object = match.parse("a", { nodupes: true }); } + { const a: object = match.parse("a", { noext: false }); } + { const a: object = match.parse("a", { noglobstar: true }); } + { const a: object = match.parse("a", { nonegate: false }); } + { const a: object = match.parse("a", { nonull: false }); } + { const a: object = match.parse("a", { nullglob: false }); } + { const a: object = match.parse("a", { snapdragon: {} }); } + { const a: object = match.parse("a", { sourcemap: false }); } + { const a: object = match.parse("a", { unescape: false }); } + { const a: object = match.parse("a", { unixify: false }); } + + { const a: object = match.compile("a", {}); } + { const a: object = match.compile({}, {}); } + { const a: object = match.compile("a", { basename: false }); } + { const a: object = match.compile({}, { basename: false }); } + { const a: object = match.compile("a", { bash: false }); } + { const a: object = match.compile({}, { bash: false }); } + { const a: object = match.compile("a", { cache: false }); } + { const a: object = match.compile({}, { cache: false }); } + { const a: object = match.compile("a", { dot: true }); } + { const a: object = match.compile({}, { dot: true }); } + { const a: object = match.compile("a", { failglob: false }); } + { const a: object = match.compile({}, { failglob: false }); } + { const a: object = match.compile("a", { ignore: "a" }); } + { const a: object = match.compile({}, { ignore: "a" }); } + { const a: object = match.compile("a", { ignore: ["a"] }); } + { const a: object = match.compile({}, { ignore: ["a"] }); } + { const a: object = match.compile("a", { matchBase: false }); } + { const a: object = match.compile({}, { matchBase: false }); } + { const a: object = match.compile("a", { nobrace: true }); } + { const a: object = match.compile({}, { nobrace: true }); } + { const a: object = match.compile("a", { nocase: false }); } + { const a: object = match.compile({}, { nocase: false }); } + { const a: object = match.compile("a", { nodupes: true }); } + { const a: object = match.compile({}, { nodupes: true }); } + { const a: object = match.compile("a", { noext: false }); } + { const a: object = match.compile({}, { noext: false }); } + { const a: object = match.compile("a", { noglobstar: true }); } + { const a: object = match.compile({}, { noglobstar: true }); } + { const a: object = match.compile("a", { nonegate: false }); } + { const a: object = match.compile({}, { nonegate: false }); } + { const a: object = match.compile("a", { nonull: false }); } + { const a: object = match.compile({}, { nonull: false }); } + { const a: object = match.compile("a", { nullglob: false }); } + { const a: object = match.compile({}, { nullglob: false }); } + { const a: object = match.compile("a", { snapdragon: {} }); } + { const a: object = match.compile({}, { snapdragon: {} }); } + { const a: object = match.compile("a", { sourcemap: false }); } + { const a: object = match.compile({}, { sourcemap: false }); } + { const a: object = match.compile("a", { unescape: false }); } + { const a: object = match.compile({}, { unescape: false }); } + { const a: object = match.compile("a", { unixify: false }); } + { const a: object = match.compile({}, { unixify: false }); } + + { const a: number = match.MAX_LENGTH; } + match.clearCache(); + match.resizeCache(10050); + { const a: object = match.getCache(); } + } } diff --git a/types/adone/tsconfig.json b/types/adone/tsconfig.json index c23bf82155..e77e755b85 100644 --- a/types/adone/tsconfig.json +++ b/types/adone/tsconfig.json @@ -15,21 +15,44 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, + "experimentalDecorators": true }, "files": [ "index.d.ts", "adone.d.ts", + "glosses/fake.d.ts", "glosses/math/index.d.ts", "glosses/math/matrix.d.ts", "glosses/math/simd.d.ts", + "glosses/meta.d.ts", "glosses/std.d.ts", "glosses/utils.d.ts", "glosses/assertion.d.ts", "glosses/promise.d.ts", "glosses/shani.d.ts", "glosses/shani-global.d.ts", - "glosses/collections.d.ts", + "glosses/collections/index.d.ts", + "glosses/collections/array_set.d.ts", + "glosses/collections/async_queue.d.ts", + "glosses/collections/avl_tree.d.ts", + "glosses/collections/binary_search_tree.d.ts", + "glosses/collections/buffer_list.d.ts", + "glosses/collections/byte_array.d.ts", + "glosses/collections/default_map.d.ts", + "glosses/collections/fast_lru.d.ts", + "glosses/collections/linked_list.d.ts", + "glosses/collections/lru.d.ts", + "glosses/collections/map_cache.d.ts", + "glosses/collections/ns_cache.d.ts", + "glosses/collections/priority_queue.d.ts", + "glosses/collections/queue.d.ts", + "glosses/collections/rb_tree.d.ts", + "glosses/collections/refcounted_cache.d.ts", + "glosses/collections/set.d.ts", + "glosses/collections/stack.d.ts", + "glosses/collections/timedout_map.d.ts", "glosses/events.d.ts", "glosses/fs.d.ts", "glosses/is.d.ts", @@ -43,16 +66,37 @@ "adone-tests.ts", "test/index.ts", "test/index-import.ts", + "test/glosses/fake.ts", + "test/glosses/application.ts", + "test/glosses/collections/array_set.ts", + "test/glosses/collections/async_queue.ts", + "test/glosses/collections/avl_tree.ts", + "test/glosses/collections/binary_search_tree.ts", + "test/glosses/collections/buffer_list.ts", + "test/glosses/collections/byte_array.ts", + "test/glosses/collections/default_map.ts", + "test/glosses/collections/fast_lru.ts", + "test/glosses/collections/linked_list.ts", + "test/glosses/collections/lru.ts", + "test/glosses/collections/map_cache.ts", + "test/glosses/collections/ns_cache.ts", + "test/glosses/collections/priority_queue.ts", + "test/glosses/collections/queue.ts", + "test/glosses/collections/rb_tree.ts", + "test/glosses/collections/refcounted_cache.ts", + "test/glosses/collections/set.ts", + "test/glosses/collections/stack.ts", + "test/glosses/collections/timedout_map.ts", "test/glosses/math/index.ts", "test/glosses/math/matrix.ts", "test/glosses/math/simd.ts", + "test/glosses/meta.ts", "test/glosses/std.ts", "test/glosses/utils.ts", "test/glosses/assertion.ts", "test/glosses/promise.ts", "test/glosses/shani.ts", "test/glosses/shani-global.ts", - "test/glosses/collections.ts", "test/glosses/events.ts", "test/glosses/fs.ts", "test/glosses/is.ts", diff --git a/types/aframe/tsconfig.json b/types/aframe/tsconfig.json index 3385a8aca7..02c0041107 100755 --- a/types/aframe/tsconfig.json +++ b/types/aframe/tsconfig.json @@ -17,7 +17,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/agenda/agenda-tests.ts b/types/agenda/agenda-tests.ts index 964eb1b836..5cd18baf76 100644 --- a/types/agenda/agenda-tests.ts +++ b/types/agenda/agenda-tests.ts @@ -1,4 +1,4 @@ -import * as Agenda from "agenda"; +import Agenda = require("agenda"); var mongoConnectionString = "mongodb://127.0.0.1/agenda"; diff --git a/types/agenda/tsconfig.json b/types/agenda/tsconfig.json index 0a553809fd..2f448c9517 100644 --- a/types/agenda/tsconfig.json +++ b/types/agenda/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/aggregate-error/tsconfig.json b/types/aggregate-error/tsconfig.json index f092ab1c3e..836ac69bbf 100644 --- a/types/aggregate-error/tsconfig.json +++ b/types/aggregate-error/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/alertify/tsconfig.json b/types/alertify/tsconfig.json index 86ae0eac3d..731efc063b 100644 --- a/types/alertify/tsconfig.json +++ b/types/alertify/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/alexa-sdk/tsconfig.json b/types/alexa-sdk/tsconfig.json index d1932fa469..0fe3e93a8e 100644 --- a/types/alexa-sdk/tsconfig.json +++ b/types/alexa-sdk/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "alexa-sdk-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/alexa-voice-service/tsconfig.json b/types/alexa-voice-service/tsconfig.json index 737cccf9e6..90b1ec9310 100644 --- a/types/alexa-voice-service/tsconfig.json +++ b/types/alexa-voice-service/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/algebra.js/tsconfig.json b/types/algebra.js/tsconfig.json index e9f585ef8a..db065d64f2 100644 --- a/types/algebra.js/tsconfig.json +++ b/types/algebra.js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/algoliasearch/tsconfig.json b/types/algoliasearch/tsconfig.json index 4d7e52dd8b..41a2b8341e 100644 --- a/types/algoliasearch/tsconfig.json +++ b/types/algoliasearch/tsconfig.json @@ -1,16 +1,24 @@ { - "compilerOptions": { - "module": "commonjs", - "lib": ["es6"], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": ["../"], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": ["index.d.ts", "algoliasearch-tests.ts"] -} + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "algoliasearch-tests.ts" + ] +} \ No newline at end of file diff --git a/types/alt/tsconfig.json b/types/alt/tsconfig.json index 82260e525d..d062b2a515 100644 --- a/types/alt/tsconfig.json +++ b/types/alt/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/amazon-product-api/tsconfig.json b/types/amazon-product-api/tsconfig.json index 060741740b..148065775e 100644 --- a/types/amazon-product-api/tsconfig.json +++ b/types/amazon-product-api/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/amcharts/tsconfig.json b/types/amcharts/tsconfig.json index 1d07459b73..83ea10e97c 100644 --- a/types/amcharts/tsconfig.json +++ b/types/amcharts/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/amplify-deferred/tsconfig.json b/types/amplify-deferred/tsconfig.json index 443772e942..2e8ba65ef8 100644 --- a/types/amplify-deferred/tsconfig.json +++ b/types/amplify-deferred/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/amplify/tsconfig.json b/types/amplify/tsconfig.json index 44daa69ba9..f6c250d148 100644 --- a/types/amplify/tsconfig.json +++ b/types/amplify/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/amplitude-js/tsconfig.json b/types/amplitude-js/tsconfig.json index 0ca8f85efe..78806bc9f3 100644 --- a/types/amplitude-js/tsconfig.json +++ b/types/amplitude-js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/amqp-rpc/tsconfig.json b/types/amqp-rpc/tsconfig.json index f8bfc7aa64..29eaed2194 100644 --- a/types/amqp-rpc/tsconfig.json +++ b/types/amqp-rpc/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/amqp/tsconfig.json b/types/amqp/tsconfig.json index e73b54d700..e388306124 100644 --- a/types/amqp/tsconfig.json +++ b/types/amqp/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/amqplib/tsconfig.json b/types/amqplib/tsconfig.json index b5b83b84ce..e678b2ed30 100644 --- a/types/amqplib/tsconfig.json +++ b/types/amqplib/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/analytics-node/tsconfig.json b/types/analytics-node/tsconfig.json index 3684577e65..8a01d1d5f7 100644 --- a/types/analytics-node/tsconfig.json +++ b/types/analytics-node/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-agility/tsconfig.json b/types/angular-agility/tsconfig.json index 460060cde0..b0b8a89582 100644 --- a/types/angular-agility/tsconfig.json +++ b/types/angular-agility/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-animate/tsconfig.json b/types/angular-animate/tsconfig.json index d34d6a1d77..19a01dfff9 100644 --- a/types/angular-animate/tsconfig.json +++ b/types/angular-animate/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/angular-block-ui/tsconfig.json b/types/angular-block-ui/tsconfig.json index f5717731be..38788cb14c 100644 --- a/types/angular-block-ui/tsconfig.json +++ b/types/angular-block-ui/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-bootstrap-calendar/tsconfig.json b/types/angular-bootstrap-calendar/tsconfig.json index 72a05b7ce7..5bcba1159b 100644 --- a/types/angular-bootstrap-calendar/tsconfig.json +++ b/types/angular-bootstrap-calendar/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-bootstrap-lightbox/tsconfig.json b/types/angular-bootstrap-lightbox/tsconfig.json index 3792bc3da5..5e8d01f684 100644 --- a/types/angular-bootstrap-lightbox/tsconfig.json +++ b/types/angular-bootstrap-lightbox/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-breadcrumb/tsconfig.json b/types/angular-breadcrumb/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/angular-breadcrumb/tsconfig.json +++ b/types/angular-breadcrumb/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/angular-clipboard/tsconfig.json b/types/angular-clipboard/tsconfig.json index 0c6a1dadaf..504fce5afd 100644 --- a/types/angular-clipboard/tsconfig.json +++ b/types/angular-clipboard/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/angular-cookie/tsconfig.json b/types/angular-cookie/tsconfig.json index ae3ec8dd21..c4dd687a17 100644 --- a/types/angular-cookie/tsconfig.json +++ b/types/angular-cookie/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-cookies/tsconfig.json b/types/angular-cookies/tsconfig.json index d34d6a1d77..19a01dfff9 100644 --- a/types/angular-cookies/tsconfig.json +++ b/types/angular-cookies/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/angular-deferred-bootstrap/tsconfig.json b/types/angular-deferred-bootstrap/tsconfig.json index 119199cc5a..48a0fc6c3b 100644 --- a/types/angular-deferred-bootstrap/tsconfig.json +++ b/types/angular-deferred-bootstrap/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/angular-dialog-service/tsconfig.json b/types/angular-dialog-service/tsconfig.json index b6db392406..06a65572bf 100644 --- a/types/angular-dialog-service/tsconfig.json +++ b/types/angular-dialog-service/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-dynamic-locale/tsconfig.json b/types/angular-dynamic-locale/tsconfig.json index b117d5eabe..2669a8f2c1 100644 --- a/types/angular-dynamic-locale/tsconfig.json +++ b/types/angular-dynamic-locale/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-environment/tsconfig.json b/types/angular-environment/tsconfig.json index 35bd754e95..62fb380377 100644 --- a/types/angular-environment/tsconfig.json +++ b/types/angular-environment/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-es/tsconfig.json b/types/angular-es/tsconfig.json index 8eb4ea8925..1ef656103f 100644 --- a/types/angular-es/tsconfig.json +++ b/types/angular-es/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-feature-flags/tsconfig.json b/types/angular-feature-flags/tsconfig.json index 07b352a43c..d90297220f 100644 --- a/types/angular-feature-flags/tsconfig.json +++ b/types/angular-feature-flags/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-file-saver/tsconfig.json b/types/angular-file-saver/tsconfig.json index 60a3fb0eca..c00f267d7d 100644 --- a/types/angular-file-saver/tsconfig.json +++ b/types/angular-file-saver/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-file-upload/tsconfig.json b/types/angular-file-upload/tsconfig.json index 11194d71d0..ac8f890b89 100644 --- a/types/angular-file-upload/tsconfig.json +++ b/types/angular-file-upload/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-formly/tsconfig.json b/types/angular-formly/tsconfig.json index 3812b7cd66..7b6a686160 100644 --- a/types/angular-formly/tsconfig.json +++ b/types/angular-formly/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-fullscreen/tsconfig.json b/types/angular-fullscreen/tsconfig.json index 72a22e0897..03dc1874c4 100644 --- a/types/angular-fullscreen/tsconfig.json +++ b/types/angular-fullscreen/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-gettext/tsconfig.json b/types/angular-gettext/tsconfig.json index 43c7dc3cab..074b1ad11a 100644 --- a/types/angular-gettext/tsconfig.json +++ b/types/angular-gettext/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-google-analytics/tsconfig.json b/types/angular-google-analytics/tsconfig.json index b66432d04c..aff84bc612 100644 --- a/types/angular-google-analytics/tsconfig.json +++ b/types/angular-google-analytics/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-gridster/tsconfig.json b/types/angular-gridster/tsconfig.json index 94b4c6ceff..e722d13578 100644 --- a/types/angular-gridster/tsconfig.json +++ b/types/angular-gridster/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-growl-v2/tsconfig.json b/types/angular-growl-v2/tsconfig.json index 16ccffe41f..38d37a5922 100644 --- a/types/angular-growl-v2/tsconfig.json +++ b/types/angular-growl-v2/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-hotkeys/tsconfig.json b/types/angular-hotkeys/tsconfig.json index acb11ff247..efb5ab899b 100644 --- a/types/angular-hotkeys/tsconfig.json +++ b/types/angular-hotkeys/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "angular-hotkeys-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/angular-http-auth/tsconfig.json b/types/angular-http-auth/tsconfig.json index 61029fcc00..ac7e064e0e 100644 --- a/types/angular-http-auth/tsconfig.json +++ b/types/angular-http-auth/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-httpi/tsconfig.json b/types/angular-httpi/tsconfig.json index 64c28306cf..ea3d19611c 100644 --- a/types/angular-httpi/tsconfig.json +++ b/types/angular-httpi/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-idle/tsconfig.json b/types/angular-idle/tsconfig.json index 57cc641db8..442299d2f1 100644 --- a/types/angular-idle/tsconfig.json +++ b/types/angular-idle/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-jwt/tsconfig.json b/types/angular-jwt/tsconfig.json index b884cbc435..eb96bc8736 100644 --- a/types/angular-jwt/tsconfig.json +++ b/types/angular-jwt/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-load/tsconfig.json b/types/angular-load/tsconfig.json index ee5ee74b72..970cb503e6 100644 --- a/types/angular-load/tsconfig.json +++ b/types/angular-load/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-loading-bar/tsconfig.json b/types/angular-loading-bar/tsconfig.json index f639942629..8311dad9f5 100644 --- a/types/angular-loading-bar/tsconfig.json +++ b/types/angular-loading-bar/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-local-storage/tsconfig.json b/types/angular-local-storage/tsconfig.json index 44c357b558..5a73ac26f9 100644 --- a/types/angular-local-storage/tsconfig.json +++ b/types/angular-local-storage/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-localforage/tsconfig.json b/types/angular-localforage/tsconfig.json index dc98f1186d..847bbbbda0 100644 --- a/types/angular-localforage/tsconfig.json +++ b/types/angular-localforage/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-locker/tsconfig.json b/types/angular-locker/tsconfig.json index 35091c7ea8..d0fbbafb71 100644 --- a/types/angular-locker/tsconfig.json +++ b/types/angular-locker/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-material/tsconfig.json b/types/angular-material/tsconfig.json index 3ecdc4851c..7184dc1fb1 100644 --- a/types/angular-material/tsconfig.json +++ b/types/angular-material/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/angular-media-queries/tsconfig.json b/types/angular-media-queries/tsconfig.json index 6a02589dc1..80d3ac3f0c 100644 --- a/types/angular-media-queries/tsconfig.json +++ b/types/angular-media-queries/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-meteor/tsconfig.json b/types/angular-meteor/tsconfig.json index 16d4015269..62d012a4af 100644 --- a/types/angular-meteor/tsconfig.json +++ b/types/angular-meteor/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-mocks/tsconfig.json b/types/angular-mocks/tsconfig.json index cfce69a898..84f176c47b 100644 --- a/types/angular-mocks/tsconfig.json +++ b/types/angular-mocks/tsconfig.json @@ -20,6 +20,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/angular-modal/tsconfig.json b/types/angular-modal/tsconfig.json index c727f39fbb..7eb8491cd7 100644 --- a/types/angular-modal/tsconfig.json +++ b/types/angular-modal/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-notifications/tsconfig.json b/types/angular-notifications/tsconfig.json index 7186df8fd5..8914d19761 100644 --- a/types/angular-notifications/tsconfig.json +++ b/types/angular-notifications/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-notify/tsconfig.json b/types/angular-notify/tsconfig.json index a993101ea8..2a45fe4c01 100644 --- a/types/angular-notify/tsconfig.json +++ b/types/angular-notify/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-oauth2/tsconfig.json b/types/angular-oauth2/tsconfig.json index 253e138f2f..6c8b2cff83 100644 --- a/types/angular-oauth2/tsconfig.json +++ b/types/angular-oauth2/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-odata-resources/tsconfig.json b/types/angular-odata-resources/tsconfig.json index cf8b87b038..bf9ce61633 100644 --- a/types/angular-odata-resources/tsconfig.json +++ b/types/angular-odata-resources/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-pdfjs-viewer/tsconfig.json b/types/angular-pdfjs-viewer/tsconfig.json index bdae87bf50..584aacaaf3 100644 --- a/types/angular-pdfjs-viewer/tsconfig.json +++ b/types/angular-pdfjs-viewer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-permission/tsconfig.json b/types/angular-permission/tsconfig.json index 80dd668340..ccc8ab9ba0 100644 --- a/types/angular-permission/tsconfig.json +++ b/types/angular-permission/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/angular-promise-tracker/tsconfig.json b/types/angular-promise-tracker/tsconfig.json index 2e81cb6ea3..89ba7d321d 100644 --- a/types/angular-promise-tracker/tsconfig.json +++ b/types/angular-promise-tracker/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-q-spread/tsconfig.json b/types/angular-q-spread/tsconfig.json index a00f0e4d5f..8b381fb83f 100644 --- a/types/angular-q-spread/tsconfig.json +++ b/types/angular-q-spread/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/angular-resource/tsconfig.json b/types/angular-resource/tsconfig.json index 7599b3e12e..1f4598b8b9 100644 --- a/types/angular-resource/tsconfig.json +++ b/types/angular-resource/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/angular-route/tsconfig.json b/types/angular-route/tsconfig.json index 9960b488ba..12021442e1 100644 --- a/types/angular-route/tsconfig.json +++ b/types/angular-route/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/angular-sanitize/tsconfig.json b/types/angular-sanitize/tsconfig.json index 4ce7848518..2e1212592b 100644 --- a/types/angular-sanitize/tsconfig.json +++ b/types/angular-sanitize/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/angular-scenario/tsconfig.json b/types/angular-scenario/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/angular-scenario/tsconfig.json +++ b/types/angular-scenario/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/angular-scroll/tsconfig.json b/types/angular-scroll/tsconfig.json index b6d6daecb2..a844a05fd7 100644 --- a/types/angular-scroll/tsconfig.json +++ b/types/angular-scroll/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-signalr-hub/tsconfig.json b/types/angular-signalr-hub/tsconfig.json index d0e69b894d..d81d1cccc6 100644 --- a/types/angular-signalr-hub/tsconfig.json +++ b/types/angular-signalr-hub/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-spinner/tsconfig.json b/types/angular-spinner/tsconfig.json index e09fc93f8e..8eebbd1455 100644 --- a/types/angular-spinner/tsconfig.json +++ b/types/angular-spinner/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-storage/tsconfig.json b/types/angular-storage/tsconfig.json index 07dc148cef..e88846bcec 100644 --- a/types/angular-storage/tsconfig.json +++ b/types/angular-storage/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-strap/tsconfig.json b/types/angular-strap/tsconfig.json index 7ac157876b..da95fa04c8 100644 --- a/types/angular-strap/tsconfig.json +++ b/types/angular-strap/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-toastr/tsconfig.json b/types/angular-toastr/tsconfig.json index be88b26d08..36a22e1aee 100644 --- a/types/angular-toastr/tsconfig.json +++ b/types/angular-toastr/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-toasty/tsconfig.json b/types/angular-toasty/tsconfig.json index 085335904c..f4e2c1c4d0 100644 --- a/types/angular-toasty/tsconfig.json +++ b/types/angular-toasty/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-tooltips/tsconfig.json b/types/angular-tooltips/tsconfig.json index 8465b76909..84f3606454 100644 --- a/types/angular-tooltips/tsconfig.json +++ b/types/angular-tooltips/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-touchspin/tsconfig.json b/types/angular-touchspin/tsconfig.json index 8c3d5338c4..4084b66480 100644 --- a/types/angular-touchspin/tsconfig.json +++ b/types/angular-touchspin/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-translate/tsconfig.json b/types/angular-translate/tsconfig.json index 7b3df3db88..02bb9edf7a 100644 --- a/types/angular-translate/tsconfig.json +++ b/types/angular-translate/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-ui-bootstrap/tsconfig.json b/types/angular-ui-bootstrap/tsconfig.json index 62765ca465..36174e37b6 100644 --- a/types/angular-ui-bootstrap/tsconfig.json +++ b/types/angular-ui-bootstrap/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-ui-notification/tsconfig.json b/types/angular-ui-notification/tsconfig.json index 25e3769186..2b774ef2ff 100644 --- a/types/angular-ui-notification/tsconfig.json +++ b/types/angular-ui-notification/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-ui-router/tsconfig.json b/types/angular-ui-router/tsconfig.json index 83aeab8d3b..ba18a834ba 100644 --- a/types/angular-ui-router/tsconfig.json +++ b/types/angular-ui-router/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-ui-scroll/tsconfig.json b/types/angular-ui-scroll/tsconfig.json index 8fb95049e4..90fd12c708 100644 --- a/types/angular-ui-scroll/tsconfig.json +++ b/types/angular-ui-scroll/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-ui-sortable/tsconfig.json b/types/angular-ui-sortable/tsconfig.json index b96f69101e..3defe86650 100644 --- a/types/angular-ui-sortable/tsconfig.json +++ b/types/angular-ui-sortable/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-ui-tree/tsconfig.json b/types/angular-ui-tree/tsconfig.json index cb2693e910..3c8fa163c7 100644 --- a/types/angular-ui-tree/tsconfig.json +++ b/types/angular-ui-tree/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-websocket/tsconfig.json b/types/angular-websocket/tsconfig.json index 89d5cb9dc3..b24f8dfdf8 100644 --- a/types/angular-websocket/tsconfig.json +++ b/types/angular-websocket/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "angular-websocket-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/angular-wizard/tsconfig.json b/types/angular-wizard/tsconfig.json index a87aedbbe4..2409b05725 100644 --- a/types/angular-wizard/tsconfig.json +++ b/types/angular-wizard/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular-xeditable/tsconfig.json b/types/angular-xeditable/tsconfig.json index 44cdeea7bf..de3ba1d092 100644 --- a/types/angular-xeditable/tsconfig.json +++ b/types/angular-xeditable/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/angular.throttle/tsconfig.json b/types/angular.throttle/tsconfig.json index bcee04a06f..11865e0ab8 100644 --- a/types/angular.throttle/tsconfig.json +++ b/types/angular.throttle/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angular/angular-tests.ts b/types/angular/angular-tests.ts index 795e74a058..0b05400f6d 100644 --- a/types/angular/angular-tests.ts +++ b/types/angular/angular-tests.ts @@ -289,25 +289,25 @@ foo.then((x) => { // $q signature tests namespace TestQ { - interface TResult { + interface AbcObject { a: number; b: string; c: boolean; } - interface TValue { + interface EfObject { e: number; f: boolean; } - interface TOther { + interface GhObject { g: string; h: number; } - const tResult: TResult = null; - const promiseTResult: angular.IPromise = null; - const tValue: TValue = null; - const promiseTValue: angular.IPromise = null; - const tOther: TOther = null; - const promiseTOther: angular.IPromise = null; + const abcObject: AbcObject = null; + const abcObjectPromise: angular.IPromise = null; + const efObject: EfObject = null; + const efObjectPromise: angular.IPromise = null; + const ghObject: GhObject = null; + const ghObjectPromise: angular.IPromise = null; const $q: angular.IQService = null; const promiseAny: angular.IPromise = null; @@ -316,11 +316,11 @@ namespace TestQ { // $q constructor { - let result: angular.IPromise; - result = new $q((resolve: (value: TResult) => any) => {}); - result = new $q((resolve: (value: TResult) => any, reject: (value: any) => any) => {}); - result = $q((resolve: (value: TResult) => any) => {}); - result = $q((resolve: (value: TResult) => any, reject: (value: any) => any) => {}); + let result: angular.IPromise; + result = new $q((resolve: (value: AbcObject) => any) => {}); + result = new $q((resolve: (value: AbcObject) => any, reject: (value: any) => any) => {}); + result = $q((resolve: (value: AbcObject) => any) => {}); + result = $q((resolve: (value: AbcObject) => any, reject: (value: any) => any) => {}); } // $q.all @@ -332,8 +332,8 @@ namespace TestQ { $q.all([1, $q.when(2), '3']).then(([ n1, n2, n3 ]) => n1.toFixed() + n2.toFixed() + n3.slice(1)); } { - let result: angular.IPromise; - result = $q.all([promiseAny, promiseAny]); + let result: angular.IPromise; + result = $q.all([promiseAny, promiseAny]); } { let result: angular.IPromise<{[id: string]: any; }>; @@ -356,13 +356,13 @@ namespace TestQ { // $q.defer { - let result: angular.IDeferred; - result = $q.defer(); - result.resolve(tResult); + let result: angular.IDeferred; + result = $q.defer(); + result.resolve(abcObject); const anyValue: any = null; result.reject(anyValue); result.promise.then(result => { - return $q.resolve(result); + return $q.resolve(result); }); } @@ -380,10 +380,10 @@ namespace TestQ { result = $q.resolve(); } { - let result: angular.IPromise; - result = $q.resolve(tResult); - result = $q.resolve(promiseTResult); - const result2: angular.IPromise = $q.resolve(Math.random() > 0.5 ? tResult : promiseTOther); + let result: angular.IPromise; + result = $q.resolve(abcObject); + result = $q.resolve(abcObjectPromise); + const result2: angular.IPromise = $q.resolve(Math.random() > 0.5 ? abcObject : ghObjectPromise); } // $q.when @@ -392,32 +392,32 @@ namespace TestQ { result = $q.when(); } { - let result: angular.IPromise; - let resultOther: angular.IPromise; + let result: angular.IPromise; + let resultOther: angular.IPromise; - result = $q.when(tResult); - result = $q.when(promiseTResult); + result = $q.when(abcObject); + result = $q.when(abcObjectPromise); - result = $q.when(tValue, (result: TValue) => tResult); - result = $q.when(tValue, (result: TValue) => tResult, (any) => any); - result = $q.when(tValue, (result: TValue) => tResult, (any) => any, (any) => any); + result = $q.when(efObject, (result: EfObject) => abcObject); + result = $q.when(efObject, (result: EfObject) => abcObject, (any) => any); + result = $q.when(efObject, (result: EfObject) => abcObject, (any) => any, (any) => any); - result = $q.when(promiseTValue, (result: TValue) => tResult); - resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => tOther); - resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => tOther); - resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => tOther, (any) => any); - resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => promiseTOther); - resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => promiseTOther, (any) => any); + result = $q.when(efObjectPromise, (result: EfObject) => abcObject); + resultOther = $q.when(efObjectPromise, (result: EfObject) => abcObject, (any) => ghObject); + resultOther = $q.when(efObjectPromise, (result: EfObject) => abcObject, (any) => ghObject); + resultOther = $q.when(efObjectPromise, (result: EfObject) => abcObject, (any) => ghObject, (any) => any); + resultOther = $q.when(efObjectPromise, (result: EfObject) => abcObject, (any) => ghObjectPromise); + resultOther = $q.when(efObjectPromise, (result: EfObject) => abcObject, (any) => ghObjectPromise, (any) => any); - result = $q.when(tValue, (result: TValue) => promiseTResult); - result = $q.when(tValue, (result: TValue) => promiseTResult, (any) => any); - result = $q.when(tValue, (result: TValue) => promiseTResult, (any) => any, (any) => any); + result = $q.when(efObject, (result: EfObject) => abcObjectPromise); + result = $q.when(efObject, (result: EfObject) => abcObjectPromise, (any) => any); + result = $q.when(efObject, (result: EfObject) => abcObjectPromise, (any) => any, (any) => any); - result = $q.when(promiseTValue, (result: TValue) => promiseTResult); - resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => tOther); - resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => tOther, (any) => any); - resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => promiseTOther); - resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => promiseTOther, (any) => any); + result = $q.when(efObjectPromise, (result: EfObject) => abcObjectPromise); + resultOther = $q.when(efObjectPromise, (result: EfObject) => abcObjectPromise, (any) => ghObject); + resultOther = $q.when(efObjectPromise, (result: EfObject) => abcObjectPromise, (any) => ghObject, (any) => any); + resultOther = $q.when(efObjectPromise, (result: EfObject) => abcObjectPromise, (any) => ghObjectPromise); + resultOther = $q.when(efObjectPromise, (result: EfObject) => abcObjectPromise, (any) => ghObjectPromise, (any) => any); } } @@ -440,41 +440,41 @@ httpFoo.then((response: ng.IHttpResponse) => { // Deferred signature tests namespace TestDeferred { - const any: any = null; + const anything: any = null; - interface TResult { + interface AbcObject { a: number; b: string; c: boolean; } - const tResult: TResult = null; + const abcObject: AbcObject = null; - const deferred: angular.IDeferred = null; + const deferred: angular.IDeferred = null; // deferred.resolve { let result: void; result = deferred.resolve(); - result = deferred.resolve(tResult); + result = deferred.resolve(abcObject); } // deferred.reject { let result: void; result = deferred.reject(); - result = deferred.reject(any); + result = deferred.reject(anything); } // deferred.notify { let result: void; result = deferred.notify(); - result = deferred.notify(any); + result = deferred.notify(anything); } // deferred.promise { - let result: angular.IPromise; + let result: angular.IPromise; result = deferred.promise; } } @@ -517,111 +517,189 @@ namespace TestInjector { // Promise signature tests namespace TestPromise { - const any: any = null; + const anything: any = null; - interface TResult { - kind: 'result'; + interface AbcObject { + kind: 'abc'; a: number; b: string; c: boolean; } - interface TOther { - kind: 'other'; + interface DefObject { + kind: 'def'; d: number; e: string; f: boolean; } - function isTResult(x: TResult | TOther): x is TResult { - return x.kind === 'result'; + function isAbcObject(x: AbcObject | DefObject): x is AbcObject { + return x.kind === 'abc'; } - const tresult: TResult = null; - const tresultPromise: ng.IPromise = null; - const tresultHttpPromise: ng.IHttpPromise = null; + const abcObject: AbcObject = null; + const abcObjectPromise: ng.IPromise = null; + const abcObjectHttpPromise: ng.IHttpPromise = null; - const tother: TOther = null; - const totherPromise: ng.IPromise = null; - const totherHttpPromise: ng.IHttpPromise = null; + const defObject: DefObject = null; + const defObjectPromise: ng.IPromise = null; + const defObjectHttpPromise: ng.IHttpPromise = null; - const promise: angular.IPromise = null; + const promise: angular.IPromise = null; const $q: angular.IQService = null; - const assertPromiseType = (arg: angular.IPromise) => arg; - const reject = $q.reject(); + const rejectedPromise = $q.reject(); // promise.then - assertPromiseType(promise.then((result) => any)); - assertPromiseType(promise.then((result) => any, (any) => any)); - assertPromiseType(promise.then((result) => any, (any) => any, (any) => any)); + // $ExpectType IPromise + promise.then(result => anything); + // $ExpectType IPromise + promise.then(result => anything, any => any); + // $ExpectType IPromise + promise.then(result => anything, any => any, any => any); - assertPromiseType(promise.then((result) => reject)); - assertPromiseType(promise.then((result) => reject, (any) => reject)); - assertPromiseType(promise.then((result) => reject, (any) => reject, (any) => any)); + // $ExpectType IPromise + promise.then(result => rejectedPromise); + // $ExpectType IPromise + promise.then(result => rejectedPromise, any => rejectedPromise); + // $ExpectType IPromise + promise.then(result => rejectedPromise, any => rejectedPromise, any => any); - assertPromiseType(promise.then((result) => result)); - assertPromiseType(promise.then((result) => tresult)); - assertPromiseType(promise.then((result) => tresultPromise)); - assertPromiseType(promise.then((result) => result, (any) => any)); - assertPromiseType(promise.then((result) => result, (any) => any, (any) => any)); - assertPromiseType(promise.then((result) => result, (any) => reject, (any) => any)); + // $ExpectType IPromise + promise.then(result => result); + // $ExpectType IPromise + promise.then(result => abcObject); + // $ExpectType IPromise + promise.then(result => abcObjectPromise); + // $ExpectType IPromise + promise.then(result => result, any => any); + // $ExpectType IPromise + promise.then(result => result, any => Math.random()); + // $ExpectType IPromise + promise.then(result => result, any => any, any => any); + // $ExpectType IPromise + promise.then(result => result, any => Math.random(), any => any); + // $ExpectType IPromise + promise.then(result => result, any => rejectedPromise, any => any); - assertPromiseType | TResult>(promise.then((result) => anyOf2(reject, result))); - assertPromiseType(promise.then((result) => anyOf3(result, tresultPromise, reject))); - assertPromiseType(promise.then( - (result) => anyOf3(reject, result, tresultPromise), - (reason) => anyOf3(reject, tresult, tresultPromise) - )); + // $ExpectType IPromise + promise.then(result => anyOf2(rejectedPromise, result)); + // $ExpectType IPromise + promise.then(result => anyOf3(result, abcObjectPromise, rejectedPromise)); + // $ExpectType IPromise + promise.then( + result => anyOf3(rejectedPromise, result, abcObjectPromise), + reason => anyOf3(rejectedPromise, abcObject, abcObjectPromise) + ); - assertPromiseType>(promise.then((result) => tresultHttpPromise)); + // $ExpectType IPromise> + promise.then(result => abcObjectHttpPromise); - assertPromiseType(promise.then((result) => result, (any) => tother)); - assertPromiseType | angular.IPromise | TOther | angular.IPromise>(promise.then( - (result) => anyOf3(reject, result, totherPromise), - (reason) => anyOf3(reject, tother, tresultPromise) - )); + // $ExpectType IPromise + promise.then(result => result, any => defObject); - assertPromiseType(promise.then( - (result) => anyOf3(tresultPromise, result, totherPromise) - )); + // These are broken and seemingly can't be made to work + // with the current limitations of TypeScript. - assertPromiseType(promise.then((result) => result, (any) => tother, (any) => any)); - assertPromiseType(promise.then((result) => tresultPromise, (any) => totherPromise)); - assertPromiseType(promise.then((result) => tresultPromise, (any) => totherPromise, (any) => any)); - assertPromiseType>(promise.then((result) => tresultHttpPromise, (any) => totherHttpPromise)); - assertPromiseType>(promise.then((result) => tresultHttpPromise, (any) => totherHttpPromise, (any) => any)); + // xExpectType IPromise + // promise.then(result => anyOf2(result, defObjectPromise)); + // xExpectType IPromise + // promise.then(result => anyOf3(rejectedPromise, result, defObjectPromise)); + // xExpectType IPromise + // const a4 = promise.then( + // result => anyOf3(rejectedPromise, result, defObjectPromise), + // reason => anyOf3(rejectedPromise, defObject, abcObjectPromise) + // ); - assertPromiseType(promise.then((result) => tother)); - assertPromiseType(promise.then((result) => tother, (any) => any)); - assertPromiseType(promise.then((result) => tother, (any) => any, (any) => any)); - assertPromiseType(promise.then((result) => totherPromise)); - assertPromiseType(promise.then((result) => totherPromise, (any) => any)); - assertPromiseType(promise.then((result) => totherPromise, (any) => any, (any) => any)); - assertPromiseType>(promise.then((result) => totherHttpPromise)); - assertPromiseType>(promise.then((result) => totherHttpPromise, (any) => any)); - assertPromiseType>(promise.then((result) => totherHttpPromise, (any) => any, (any) => any)); + // $ExpectType IPromise + promise.then(result => + anyOf3(abcObjectPromise, result, defObjectPromise) + ); - assertPromiseType(promise.then((result) => tresult, (any) => tother).then(ambiguous => isTResult(ambiguous) ? ambiguous.c : ambiguous.f)); + // $ExpectType IPromise + promise.then(result => result, any => defObject, any => any); + // $ExpectType IPromise + promise.then(result => abcObjectPromise, any => defObjectPromise); + // $ExpectType IPromise + promise.then(result => abcObjectPromise, any => defObjectPromise, any => any); + // $ExpectType IPromise | IHttpResponse> + promise.then(result => abcObjectHttpPromise, any => defObjectHttpPromise); + // $ExpectType IPromise | IHttpResponse> + promise.then(result => abcObjectHttpPromise, any => defObjectHttpPromise, any => any); + + // $ExpectType IPromise + promise.then(result => defObject); + // $ExpectType IPromise + promise.then(result => defObject, any => any); + // $ExpectType IPromise + promise.then(result => defObject, any => any, any => any); + // $ExpectType IPromise + promise.then(result => defObjectPromise); + // $ExpectType IPromise + promise.then(result => defObjectPromise, any => any); + // $ExpectType IPromise + promise.then(result => defObjectPromise, any => any, any => any); + // $ExpectType IPromise> + promise.then(result => defObjectHttpPromise); + // $ExpectType IPromise + promise.then(result => defObjectHttpPromise, any => any); + // $ExpectType IPromise + promise.then(result => defObjectHttpPromise, any => any, any => any); + + // $ExpectType IPromise + promise + .then(result => abcObject, any => defObject) + .then(ambiguous => (isAbcObject(ambiguous) ? ambiguous.c : ambiguous.f)); + + // promise.then + $q.reject: + + // $ExpectType IPromise + $q.resolve(true).then(result => Math.random() > 0.5 ? Math.random() : $q.reject()); + // $ExpectType IPromise + $q.resolve(true).then(result => Math.random() > 0.5 ? Math.random() : $q.reject('a')); + // $ExpectType IPromise + $q.resolve().then(() => $q.reject('a')); + // $ExpectType IPromise + $q.resolve().then(() => { + if (Math.random() > 0.5) $q.reject(); + }); // promise.catch - assertPromiseType(promise.catch((err) => err)); - assertPromiseType(promise.catch((err) => any)); - assertPromiseType(promise.catch((err) => tresult)); - assertPromiseType>(promise.catch((err) => anyOf2(tresult, reject))); - assertPromiseType(promise.catch((err) => anyOf3(tresult, tresultPromise, reject))); - assertPromiseType(promise.catch((err) => tresultPromise)); - assertPromiseType>(promise.catch((err) => tresultHttpPromise)); - assertPromiseType(promise.catch((err) => tother)); - assertPromiseType(promise.catch((err) => totherPromise)); - assertPromiseType>(promise.catch((err) => totherHttpPromise)); + // $ExpectType IPromise + promise.catch(err => err); + // $ExpectType IPromise + promise.catch(err => anything); + // $ExpectType IPromise + promise.catch(err => abcObject); + // $ExpectType IPromise + promise.catch(err => anyOf2(abcObject, rejectedPromise)); + // $ExpectType IPromise + promise.catch(err => anyOf3(abcObject, abcObjectPromise, rejectedPromise)); + // $ExpectType IPromise + promise.catch(err => abcObjectPromise); + // $ExpectType IPromise> + promise.catch(err => abcObjectHttpPromise); + // $ExpectType IPromise + promise.catch(err => defObject); + // $ExpectType IPromise + promise.catch(err => defObjectPromise); + // $ExpectType IPromise> + promise.catch(err => defObjectHttpPromise); - assertPromiseType(promise.catch((err) => tother).then(ambiguous => isTResult(ambiguous) ? ambiguous.c : ambiguous.f)); + // $ExpectType IPromise + promise + .catch(err => defObject) + .then( + ambiguous => (isAbcObject(ambiguous) ? ambiguous.c : ambiguous.f) + ); // promise.finally - assertPromiseType(promise.finally(() => any)); - assertPromiseType(promise.finally(() => tresult)); - assertPromiseType(promise.finally(() => tother)); + // $ExpectType IPromise + promise.finally(() => anything); + // $ExpectType IPromise + promise.finally(() => abcObject); + // $ExpectType IPromise + promise.finally(() => defObject); } function test_angular_forEach() { @@ -648,12 +726,12 @@ let elementReadyFn = angular.element(() => { // $timeout signature tests namespace TestTimeout { - interface TResult { + interface AbcObject { a: number; b: string; c: boolean; } - const fnTResult: (...args: any[]) => TResult = null; + const abcObjectFn: (...args: any[]) => AbcObject = null; const promiseAny: angular.IPromise = null; const $timeout: angular.ITimeoutService = null; @@ -668,13 +746,13 @@ namespace TestTimeout { result = $timeout(1, true); } { - let result: angular.IPromise; - result = $timeout(fnTResult); - result = $timeout(fnTResult, 1); - result = $timeout(fnTResult, 1, true); - result = $timeout(fnTResult, 1, true, 1); - result = $timeout(fnTResult, 1, true, 1, ''); - result = $timeout(fnTResult, 1, true, 1, '', true); + let result: angular.IPromise; + result = $timeout(abcObjectFn); + result = $timeout(abcObjectFn, 1); + result = $timeout(abcObjectFn, 1, true); + result = $timeout(abcObjectFn, 1, true, 1); + result = $timeout(abcObjectFn, 1, true, 1, ''); + result = $timeout(abcObjectFn, 1, true, 1, '', true); } // $timeout.cancel @@ -1187,6 +1265,24 @@ function NgModelControllerTyping() { }; } +// FormController +angular.module('app').directive('formDebugChecker', () => { + return { + require: '^^form', + link: (scope, el, attrs, ctrl) => { + const form = ctrl as angular.IFormController; + el.on('click', () => { + const report = [] as string[]; + angular.forEach(form.$error, (controls, validationErrorKey) => { + const names = controls.map(control => control.$name); + report.push(`${validationErrorKey}: ${controls.length} control(s) (${names.join(', ')})`); + }); + console.log(`This form has ${report.length} error(s).\n${report.join('\n')}`); + }); + } + }; +}); + let $filter: angular.IFilterService; function testFilter() { diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts index efbabaa302..32a5c74b52 100644 --- a/types/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -357,9 +357,9 @@ declare namespace angular { $valid: boolean; $invalid: boolean; $submitted: boolean; - $error: any; - $name: string; - $pending: any; + $error: { [validationErrorKey: string]: Array }; + $name?: string; + $pending?: { [validationErrorKey: string]: Array }; $addControl(control: INgModelController | IFormController): void; $removeControl(control: INgModelController | IFormController): void; $setValidity(validationErrorKey: string, isValid: boolean, control: INgModelController | IFormController): void; @@ -399,8 +399,8 @@ declare namespace angular { $parsers: IModelParser[]; $formatters: IModelFormatter[]; $viewChangeListeners: IModelViewChangeListener[]; - $error: any; - $name: string; + $error: { [validationErrorKey: string]: boolean }; + $name?: string; $touched: boolean; $untouched: boolean; @@ -408,7 +408,7 @@ declare namespace angular { $validators: IModelValidators; $asyncValidators: IAsyncModelValidators; - $pending: any; + $pending?: { [validationErrorKey: string]: boolean }; $pristine: boolean; $dirty: boolean; $valid: boolean; @@ -1103,28 +1103,43 @@ declare namespace angular { interface IPromise { /** - * Regardless of when the promise was or will be resolved or rejected, then calls one of the success or error callbacks asynchronously as soon as the result is available. The callbacks are called with a single argument: the result or rejection reason. Additionally, the notify callback may be called zero or more times to provide a progress indication, before the promise is resolved or rejected. - * The successCallBack may return IPromise for when a $q.reject() needs to be returned - * This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method. + * Regardless of when the promise was or will be resolved or rejected, then calls one of + * the success or error callbacks asynchronously as soon as the result is available. The + * callbacks are called with a single argument: the result or rejection reason. + * Additionally, the notify callback may be called zero or more times to provide a + * progress indication, before the promise is resolved or rejected. + * The `successCallBack` may return `IPromise` for when a `$q.reject()` needs to + * be returned. + * This method returns a new promise which is resolved or rejected via the return value + * of the `successCallback`, `errorCallback`. It also notifies via the return value of + * the `notifyCallback` method. The promise can not be resolved or rejected from the + * `notifyCallback` method. */ - then(successCallback: (promiseValue: T) => IPromise|TResult, errorCallback?: null, notifyCallback?: (state: any) => any): IPromise; - then(successCallback: (promiseValue: T) => IPromise|TResult2, errorCallback?: null, notifyCallback?: (state: any) => any): IPromise; - - then(successCallback: (promiseValue: T) => IPromise|TResult, errorCallback: (reason: any) => IPromise|TCatch, notifyCallback?: (state: any) => any): IPromise; - then(successCallback: (promiseValue: T) => IPromise|TResult2, errorCallback: (reason: any) => IPromise|TCatch2, notifyCallback?: (state: any) => any): IPromise; + then( + successCallback?: + | ((value: T) => IPromise | IPromise | TResult1) + | null, + errorCallback?: + | ((reason: any) => IPromise | IPromise | TResult2) + | null, + notifyCallback?: (state: any) => any + ): IPromise; /** * Shorthand for promise.then(null, errorCallback) */ - catch(onRejected: (reason: any) => IPromise|TCatch): IPromise; - catch(onRejected: (reason: any) => IPromise|TCatch2): IPromise; + catch( + onRejected?: + | ((reason: any) => IPromise | IPromise | TResult) + | null + ): IPromise; /** * Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful to release resources or do some clean-up that needs to be done whether the promise was rejected or resolved. See the full specification for more information. * * Because finally is a reserved word in JavaScript and reserved keywords are not supported as property names by ES3, you'll need to invoke the method like promise['finally'](callback) to make your code IE8 and Android 2.x compatible. */ - finally(finallyCallback: () => any): IPromise; + finally(finallyCallback: () => void): IPromise; } interface IDeferred { diff --git a/types/angular/tsconfig.json b/types/angular/tsconfig.json index 5ce810f938..c8e218ccd3 100644 --- a/types/angular/tsconfig.json +++ b/types/angular/tsconfig.json @@ -23,6 +23,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } -} +} \ No newline at end of file diff --git a/types/angularfire/tsconfig.json b/types/angularfire/tsconfig.json index 79526d1d23..05a89bc308 100644 --- a/types/angularfire/tsconfig.json +++ b/types/angularfire/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angularlocalstorage/tsconfig.json b/types/angularlocalstorage/tsconfig.json index 18cbe35651..c3ce44e55b 100644 --- a/types/angularlocalstorage/tsconfig.json +++ b/types/angularlocalstorage/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/angulartics/tsconfig.json b/types/angulartics/tsconfig.json index 2cfa5bb6a9..18593f0b9c 100644 --- a/types/angulartics/tsconfig.json +++ b/types/angulartics/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/animation-frame/tsconfig.json b/types/animation-frame/tsconfig.json index 50f3aa0703..b1ec9c5358 100644 --- a/types/animation-frame/tsconfig.json +++ b/types/animation-frame/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/animejs/tsconfig.json b/types/animejs/tsconfig.json index 02c5552371..084939a4f9 100644 --- a/types/animejs/tsconfig.json +++ b/types/animejs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/annyang/tsconfig.json b/types/annyang/tsconfig.json index f16b627fac..8087bb565e 100644 --- a/types/annyang/tsconfig.json +++ b/types/annyang/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ansi-colors/tsconfig.json b/types/ansi-colors/tsconfig.json index 8a0f980cbc..7ee743c176 100644 --- a/types/ansi-colors/tsconfig.json +++ b/types/ansi-colors/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "ansi-colors-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/ansi-regex/tsconfig.json b/types/ansi-regex/tsconfig.json index cf1ac84a5c..67d64d91c2 100644 --- a/types/ansi-regex/tsconfig.json +++ b/types/ansi-regex/tsconfig.json @@ -7,17 +7,18 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, - "strictFunctionTypes": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "ansi-regex-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/ansi-styles/tsconfig.json b/types/ansi-styles/tsconfig.json index daf091f6ce..052e258a64 100644 --- a/types/ansi-styles/tsconfig.json +++ b/types/ansi-styles/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ansicolors/tsconfig.json b/types/ansicolors/tsconfig.json index 02963e3afd..352332b6c7 100644 --- a/types/ansicolors/tsconfig.json +++ b/types/ansicolors/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/any-db-transaction/tsconfig.json b/types/any-db-transaction/tsconfig.json index 70db166ef8..1eb8e09d43 100644 --- a/types/any-db-transaction/tsconfig.json +++ b/types/any-db-transaction/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/any-db/tsconfig.json b/types/any-db/tsconfig.json index 21170c7c68..b78a69c22c 100644 --- a/types/any-db/tsconfig.json +++ b/types/any-db/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/anybar/tsconfig.json b/types/anybar/tsconfig.json index 1dd62548e6..17fc096621 100644 --- a/types/anybar/tsconfig.json +++ b/types/anybar/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/anymatch/tsconfig.json b/types/anymatch/tsconfig.json index d30a18ba98..921e277144 100644 --- a/types/anymatch/tsconfig.json +++ b/types/anymatch/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/apex.js/tsconfig.json b/types/apex.js/tsconfig.json index 2a67c3005a..d254229f4e 100644 --- a/types/apex.js/tsconfig.json +++ b/types/apex.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/aphrodite/tsconfig.json b/types/aphrodite/tsconfig.json index 733098707c..0794c0ff34 100644 --- a/types/aphrodite/tsconfig.json +++ b/types/aphrodite/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "preserve" }, "files": [ diff --git a/types/api-error-handler/api-error-handler-tests.ts b/types/api-error-handler/api-error-handler-tests.ts index 67afbb0fce..aa72342d75 100644 --- a/types/api-error-handler/api-error-handler-tests.ts +++ b/types/api-error-handler/api-error-handler-tests.ts @@ -1,4 +1,4 @@ -import * as errorHandler from 'api-error-handler'; +import errorHandler = require('api-error-handler'); import * as express from 'express'; var api = express.Router(); diff --git a/types/api-error-handler/tsconfig.json b/types/api-error-handler/tsconfig.json index 343e9007e9..7c46d54e64 100644 --- a/types/api-error-handler/tsconfig.json +++ b/types/api-error-handler/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/apigee-access/tsconfig.json b/types/apigee-access/tsconfig.json index 3a18c6594a..fabc7bafac 100644 --- a/types/apigee-access/tsconfig.json +++ b/types/apigee-access/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/apollo-codegen/tsconfig.json b/types/apollo-codegen/tsconfig.json index a793b04d75..da8da1b4e9 100644 --- a/types/apollo-codegen/tsconfig.json +++ b/types/apollo-codegen/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/app-root-path/tsconfig.json b/types/app-root-path/tsconfig.json index 0786aa8b6c..c32fe9ae27 100644 --- a/types/app-root-path/tsconfig.json +++ b/types/app-root-path/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/appdmg/tsconfig.json b/types/appdmg/tsconfig.json index f4ca0f95c5..6d729c863b 100644 --- a/types/appdmg/tsconfig.json +++ b/types/appdmg/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "appdmg-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/appframework/tsconfig.json b/types/appframework/tsconfig.json index 8ed9e604ca..aa6405cffa 100644 --- a/types/appframework/tsconfig.json +++ b/types/appframework/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/applepayjs/tsconfig.json b/types/applepayjs/tsconfig.json index 892c52bd37..b2fb66fe6e 100644 --- a/types/applepayjs/tsconfig.json +++ b/types/applepayjs/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "baseUrl": "../", "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "lib": [ "dom", "es6" diff --git a/types/appletvjs/tsconfig.json b/types/appletvjs/tsconfig.json index 44dc1a34db..e1ad39d576 100644 --- a/types/appletvjs/tsconfig.json +++ b/types/appletvjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/applicationinsights-js/tsconfig.json b/types/applicationinsights-js/tsconfig.json index db2a137f6b..8eeecc5c0f 100644 --- a/types/applicationinsights-js/tsconfig.json +++ b/types/applicationinsights-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/aqb/tsconfig.json b/types/aqb/tsconfig.json index 44cb0d912f..09b73d3cfa 100644 --- a/types/aqb/tsconfig.json +++ b/types/aqb/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/arbiter/tsconfig.json b/types/arbiter/tsconfig.json index 674951954e..dafaff86db 100644 --- a/types/arbiter/tsconfig.json +++ b/types/arbiter/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/arcgis-js-api/tsconfig.json b/types/arcgis-js-api/tsconfig.json index 8a696a3a1e..815352a45c 100644 --- a/types/arcgis-js-api/tsconfig.json +++ b/types/arcgis-js-api/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/arcgis-js-api/v3/tsconfig.json b/types/arcgis-js-api/v3/tsconfig.json index 320cb582e1..63b40a8d0a 100644 --- a/types/arcgis-js-api/v3/tsconfig.json +++ b/types/arcgis-js-api/v3/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/arcgis-rest-api/tsconfig.json b/types/arcgis-rest-api/tsconfig.json index 346b0c1ea3..f65b0c47c2 100644 --- a/types/arcgis-rest-api/tsconfig.json +++ b/types/arcgis-rest-api/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/arcgis-to-geojson-utils/tsconfig.json b/types/arcgis-to-geojson-utils/tsconfig.json index c2ef5bf641..09d3eda55e 100644 --- a/types/arcgis-to-geojson-utils/tsconfig.json +++ b/types/arcgis-to-geojson-utils/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/archiver/archiver-tests.ts b/types/archiver/archiver-tests.ts index fc2e481330..752d9cc944 100644 --- a/types/archiver/archiver-tests.ts +++ b/types/archiver/archiver-tests.ts @@ -1,4 +1,4 @@ -import * as Archiver from 'archiver'; +import Archiver = require('archiver'); import * as fs from 'fs'; const options: Archiver.ArchiverOptions = { diff --git a/types/archiver/tsconfig.json b/types/archiver/tsconfig.json index 71db696c82..fc2d8192fe 100644 --- a/types/archiver/tsconfig.json +++ b/types/archiver/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/archy/tsconfig.json b/types/archy/tsconfig.json index d26c849987..34f8c99625 100644 --- a/types/archy/tsconfig.json +++ b/types/archy/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/are-we-there-yet/tsconfig.json b/types/are-we-there-yet/tsconfig.json index 9df0996daa..06a8973b97 100644 --- a/types/are-we-there-yet/tsconfig.json +++ b/types/are-we-there-yet/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/argon2-browser/tsconfig.json b/types/argon2-browser/tsconfig.json index a380778b29..3faa9d5cba 100644 --- a/types/argon2-browser/tsconfig.json +++ b/types/argon2-browser/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "argon2-browser-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/argparse/tsconfig.json b/types/argparse/tsconfig.json index 49e7b03ca8..f3aac6f2d4 100644 --- a/types/argparse/tsconfig.json +++ b/types/argparse/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/args/tsconfig.json b/types/args/tsconfig.json index d287417769..7b53eb08e5 100644 --- a/types/args/tsconfig.json +++ b/types/args/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/argv/tsconfig.json b/types/argv/tsconfig.json index 2a123030fa..5158b5969d 100644 --- a/types/argv/tsconfig.json +++ b/types/argv/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/arr-union/tsconfig.json b/types/arr-union/tsconfig.json index 64a3b1efed..a5fb2d419f 100644 --- a/types/arr-union/tsconfig.json +++ b/types/arr-union/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "arr-union-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/array-find-index/tsconfig.json b/types/array-find-index/tsconfig.json index 41c6183cbe..0de263e4f3 100644 --- a/types/array-find-index/tsconfig.json +++ b/types/array-find-index/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/array-foreach/tsconfig.json b/types/array-foreach/tsconfig.json index bacc698e34..3a83dc7215 100644 --- a/types/array-foreach/tsconfig.json +++ b/types/array-foreach/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/array-uniq/tsconfig.json b/types/array-uniq/tsconfig.json index 71557f6481..ca86571124 100644 --- a/types/array-uniq/tsconfig.json +++ b/types/array-uniq/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/arrify/tsconfig.json b/types/arrify/tsconfig.json index 63d89a9c7f..2bbc02b851 100644 --- a/types/arrify/tsconfig.json +++ b/types/arrify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/artillery/tsconfig.json b/types/artillery/tsconfig.json index 0ad4bae0ee..6f8e79fafa 100644 --- a/types/artillery/tsconfig.json +++ b/types/artillery/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "artillery-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/asana/tsconfig.json b/types/asana/tsconfig.json index 452aade0b1..d4d565e8e3 100644 --- a/types/asana/tsconfig.json +++ b/types/asana/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ascii2mathml/tsconfig.json b/types/ascii2mathml/tsconfig.json index b4c4b0a21b..e41fd0d954 100644 --- a/types/ascii2mathml/tsconfig.json +++ b/types/ascii2mathml/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/asciify/tsconfig.json b/types/asciify/tsconfig.json index 5f84d92e80..08737c3b21 100644 --- a/types/asciify/tsconfig.json +++ b/types/asciify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/asenv/tsconfig.json b/types/asenv/tsconfig.json index c779998e24..d58b835636 100644 --- a/types/asenv/tsconfig.json +++ b/types/asenv/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/asn1js/tsconfig.json b/types/asn1js/tsconfig.json index 59420b595d..2a8fff0568 100644 --- a/types/asn1js/tsconfig.json +++ b/types/asn1js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/aspnet-identity-pw/tsconfig.json b/types/aspnet-identity-pw/tsconfig.json index 2d2ba0ec28..ba41002410 100644 --- a/types/aspnet-identity-pw/tsconfig.json +++ b/types/aspnet-identity-pw/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/assert-equal-jsx/tsconfig.json b/types/assert-equal-jsx/tsconfig.json index 3f476135f8..1a14c64d1c 100644 --- a/types/assert-equal-jsx/tsconfig.json +++ b/types/assert-equal-jsx/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/assert-plus/tsconfig.json b/types/assert-plus/tsconfig.json index 5c89ae8c31..8c8ef3cd0a 100644 --- a/types/assert-plus/tsconfig.json +++ b/types/assert-plus/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/assertsharp/tsconfig.json b/types/assertsharp/tsconfig.json index bc2779726e..febbb6ed84 100644 --- a/types/assertsharp/tsconfig.json +++ b/types/assertsharp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/assets-webpack-plugin/assets-webpack-plugin-tests.ts b/types/assets-webpack-plugin/assets-webpack-plugin-tests.ts index 6851f853f2..b02c707d81 100644 --- a/types/assets-webpack-plugin/assets-webpack-plugin-tests.ts +++ b/types/assets-webpack-plugin/assets-webpack-plugin-tests.ts @@ -1,5 +1,5 @@ import * as webpack from 'webpack'; -import * as AssetsPlugin from 'assets-webpack-plugin'; +import AssetsPlugin = require('assets-webpack-plugin'); const config: webpack.Configuration = { plugins: [ diff --git a/types/assets-webpack-plugin/tsconfig.json b/types/assets-webpack-plugin/tsconfig.json index 3c08912345..91c958ed40 100644 --- a/types/assets-webpack-plugin/tsconfig.json +++ b/types/assets-webpack-plugin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/async-cache/tsconfig.json b/types/async-cache/tsconfig.json index 21657ef518..6a2cbf5f82 100644 --- a/types/async-cache/tsconfig.json +++ b/types/async-cache/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/async-lock/async-lock-tests.ts b/types/async-lock/async-lock-tests.ts index 259749d4f0..c6866d270b 100644 --- a/types/async-lock/async-lock-tests.ts +++ b/types/async-lock/async-lock-tests.ts @@ -10,6 +10,14 @@ lock.acquire("key", (done) => { done(); }).then(() => { /* ... */ }); +lock.acquire("key", () => "stringValue") +// Check returned value's type is inherited properly + .then((str) => str.replace("s", "S")); + +lock.acquire("key", async () => "stringValue") +// Check returned value's type is inherited properly + .then((str) => str.replace("s", "S")); + lock.acquire([ "key1", "key2" ], (done) => { done(); }, (err, ret) => { /* ... */ }); diff --git a/types/async-lock/index.d.ts b/types/async-lock/index.d.ts index 4a19590d73..5527482748 100644 --- a/types/async-lock/index.d.ts +++ b/types/async-lock/index.d.ts @@ -1,11 +1,12 @@ // Type definitions for async-lock // Project: https://github.com/rain1017/async-lock -// Definitions by: Elisée MAURER +// Definitions by: Elisée MAURER , Alejandro // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 -interface AsyncLockDoneCallback { - (err?: Error, ret?: any): void; +interface AsyncLockDoneCallback { + (err?: Error, ret?: T): void; } interface AsyncLockOptions { @@ -18,8 +19,13 @@ interface AsyncLockOptions { declare class AsyncLock { constructor(options?: AsyncLockOptions); - acquire(key: string | string[], fn: (done: AsyncLockDoneCallback) => any, cb: AsyncLockDoneCallback, opts?: AsyncLockOptions): void; - acquire(key: string | string[], fn: (done: AsyncLockDoneCallback) => any, opts?: AsyncLockOptions): PromiseLike; + acquire(key: string | string[], + fn: (() => T | PromiseLike) | ((done: AsyncLockDoneCallback) => any), + opts?: AsyncLockOptions): PromiseLike; + acquire(key: string | string[], + fn: (done: AsyncLockDoneCallback) => any, + cb: AsyncLockDoneCallback, + opts?: AsyncLockOptions): void; isBusy(): boolean; } diff --git a/types/async-lock/tsconfig.json b/types/async-lock/tsconfig.json index 1bc997ef73..22b7c33b0b 100644 --- a/types/async-lock/tsconfig.json +++ b/types/async-lock/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/async-lock/tslint.json b/types/async-lock/tslint.json index a41bf5d19a..35039ba334 100644 --- a/types/async-lock/tslint.json +++ b/types/async-lock/tslint.json @@ -8,13 +8,11 @@ "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, diff --git a/types/async-polling/tsconfig.json b/types/async-polling/tsconfig.json index 5bcccb20f2..d3f9246be9 100644 --- a/types/async-polling/tsconfig.json +++ b/types/async-polling/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/async-retry/tsconfig.json b/types/async-retry/tsconfig.json index 8bdf98656d..e371a3e4d6 100644 --- a/types/async-retry/tsconfig.json +++ b/types/async-retry/tsconfig.json @@ -14,10 +14,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ "index.d.ts", "async-retry-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/async-writer/tsconfig.json b/types/async-writer/tsconfig.json index 2b8771e48c..565754dbb5 100644 --- a/types/async-writer/tsconfig.json +++ b/types/async-writer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/async.nexttick/tsconfig.json b/types/async.nexttick/tsconfig.json index b824f94a44..71de47e764 100644 --- a/types/async.nexttick/tsconfig.json +++ b/types/async.nexttick/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/async/tsconfig.json b/types/async/tsconfig.json index 153a5471fb..3834ff925d 100644 --- a/types/async/tsconfig.json +++ b/types/async/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/asynciterator/tsconfig.json b/types/asynciterator/tsconfig.json index 8b8b919abc..345f06297a 100644 --- a/types/asynciterator/tsconfig.json +++ b/types/asynciterator/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "asynciterator-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/atmosphere.js/tsconfig.json b/types/atmosphere.js/tsconfig.json index f06f28e8f7..7c135528bc 100644 --- a/types/atmosphere.js/tsconfig.json +++ b/types/atmosphere.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/atom-keymap/tsconfig.json b/types/atom-keymap/tsconfig.json index 8a17cc061c..0da99e34c6 100644 --- a/types/atom-keymap/tsconfig.json +++ b/types/atom-keymap/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "atom-keymap-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/atom-mocha-test-runner/tsconfig.json b/types/atom-mocha-test-runner/tsconfig.json index c6e9fb20c0..78526855a4 100644 --- a/types/atom-mocha-test-runner/tsconfig.json +++ b/types/atom-mocha-test-runner/tsconfig.json @@ -16,10 +16,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "atom-mocha-test-runner-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/atom/tsconfig.json b/types/atom/tsconfig.json index a58ec7b74c..255161da5d 100644 --- a/types/atom/tsconfig.json +++ b/types/atom/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -24,4 +25,4 @@ "linter/index.d.ts", "status-bar/index.d.ts" ] -} +} \ No newline at end of file diff --git a/types/atpl/tsconfig.json b/types/atpl/tsconfig.json index 24f7da314f..29701793a6 100644 --- a/types/atpl/tsconfig.json +++ b/types/atpl/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/audiosprite/tsconfig.json b/types/audiosprite/tsconfig.json index b761c9572e..b62f115d3e 100644 --- a/types/audiosprite/tsconfig.json +++ b/types/audiosprite/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/auth0-angular/tsconfig.json b/types/auth0-angular/tsconfig.json index 42ee707301..7ebb721b12 100644 --- a/types/auth0-angular/tsconfig.json +++ b/types/auth0-angular/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/auth0-js/tsconfig.json b/types/auth0-js/tsconfig.json index a813aae68d..94352610d5 100644 --- a/types/auth0-js/tsconfig.json +++ b/types/auth0-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/auth0-js/v7/tsconfig.json b/types/auth0-js/v7/tsconfig.json index e76b7d7dd8..a545bdd735 100644 --- a/types/auth0-js/v7/tsconfig.json +++ b/types/auth0-js/v7/tsconfig.json @@ -23,7 +23,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/auth0-lock/tsconfig.json b/types/auth0-lock/tsconfig.json index 2e008d7c0d..4f1a4777b1 100644 --- a/types/auth0-lock/tsconfig.json +++ b/types/auth0-lock/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/auth0.widget/tsconfig.json b/types/auth0.widget/tsconfig.json index d18a18213b..bcf85a4971 100644 --- a/types/auth0.widget/tsconfig.json +++ b/types/auth0.widget/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/auth0/tsconfig.json b/types/auth0/tsconfig.json index dd7c60796c..035f06fa53 100644 --- a/types/auth0/tsconfig.json +++ b/types/auth0/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/auto-launch/tsconfig.json b/types/auto-launch/tsconfig.json index 952d3c0c5d..ae1120e02d 100644 --- a/types/auto-launch/tsconfig.json +++ b/types/auto-launch/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/auto-sni/auto-sni-tests.ts b/types/auto-sni/auto-sni-tests.ts index 6be54148fb..8cd17af850 100644 --- a/types/auto-sni/auto-sni-tests.ts +++ b/types/auto-sni/auto-sni-tests.ts @@ -1,4 +1,4 @@ -import * as autosni from "auto-sni"; +import autosni = require("auto-sni"); const a = autosni({ agreeTos: true, email: '', diff --git a/types/auto-sni/tsconfig.json b/types/auto-sni/tsconfig.json index 9c03900b72..9a339b5439 100644 --- a/types/auto-sni/tsconfig.json +++ b/types/auto-sni/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/autobahn/tsconfig.json b/types/autobahn/tsconfig.json index 35ca105b25..a3b68fe8fd 100644 --- a/types/autobahn/tsconfig.json +++ b/types/autobahn/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/autolinker/tsconfig.json b/types/autolinker/tsconfig.json index 7d8068c47c..14a6b796bf 100644 --- a/types/autolinker/tsconfig.json +++ b/types/autolinker/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/autoprefixer-core/tsconfig.json b/types/autoprefixer-core/tsconfig.json index 91b4bc2e7c..ec4c2ed5c6 100644 --- a/types/autoprefixer-core/tsconfig.json +++ b/types/autoprefixer-core/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/autoprefixer/tsconfig.json b/types/autoprefixer/tsconfig.json index 92adece604..526589c957 100644 --- a/types/autoprefixer/tsconfig.json +++ b/types/autoprefixer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/autosize/tsconfig.json b/types/autosize/tsconfig.json index d74b3d9c37..40eb47cb0e 100644 --- a/types/autosize/tsconfig.json +++ b/types/autosize/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/avoscloud-sdk/tsconfig.json b/types/avoscloud-sdk/tsconfig.json index 2d3d9589f4..4500518b48 100644 --- a/types/avoscloud-sdk/tsconfig.json +++ b/types/avoscloud-sdk/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/awesomplete/tsconfig.json b/types/awesomplete/tsconfig.json index 74f690ea77..c7d261fded 100644 --- a/types/awesomplete/tsconfig.json +++ b/types/awesomplete/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/aws-iot-device-sdk/tsconfig.json b/types/aws-iot-device-sdk/tsconfig.json index 3fdd4b0f28..4b938cc66f 100644 --- a/types/aws-iot-device-sdk/tsconfig.json +++ b/types/aws-iot-device-sdk/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/aws-lambda-mock-context/tsconfig.json b/types/aws-lambda-mock-context/tsconfig.json index 5d1dfe3f1f..8587235c8a 100644 --- a/types/aws-lambda-mock-context/tsconfig.json +++ b/types/aws-lambda-mock-context/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/aws-lambda/index.d.ts b/types/aws-lambda/index.d.ts index 8c95011f87..09070fb13c 100644 --- a/types/aws-lambda/index.d.ts +++ b/types/aws-lambda/index.d.ts @@ -457,7 +457,7 @@ export interface Statement { * http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html#api-gateway-custom-authorizer-output */ export interface AuthResponseContext { - [name: string]: string | number | boolean; + [name: string]: any; } /** diff --git a/types/aws-lambda/tsconfig.json b/types/aws-lambda/tsconfig.json index f4f2cc28f6..37e2690d7e 100644 --- a/types/aws-lambda/tsconfig.json +++ b/types/aws-lambda/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/aws-serverless-express/aws-serverless-express-tests.ts b/types/aws-serverless-express/aws-serverless-express-tests.ts index 4770163b3b..9bfd1b0e99 100644 --- a/types/aws-serverless-express/aws-serverless-express-tests.ts +++ b/types/aws-serverless-express/aws-serverless-express-tests.ts @@ -1,5 +1,5 @@ import * as awsServerlessExpress from 'aws-serverless-express'; -import * as express from 'express'; +import express = require('express'); import { eventContext } from 'aws-serverless-express/middleware'; const app = express(); diff --git a/types/aws-serverless-express/tsconfig.json b/types/aws-serverless-express/tsconfig.json index be920785f5..6c4cceb55a 100644 --- a/types/aws-serverless-express/tsconfig.json +++ b/types/aws-serverless-express/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/aws4/tsconfig.json b/types/aws4/tsconfig.json index a0bcbfa73e..014d560bbd 100644 --- a/types/aws4/tsconfig.json +++ b/types/aws4/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/axel/tsconfig.json b/types/axel/tsconfig.json index a3e2b5e015..ef8d480470 100644 --- a/types/axel/tsconfig.json +++ b/types/axel/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "axel-tests.ts", diff --git a/types/azure-mobile-services-client/tsconfig.json b/types/azure-mobile-services-client/tsconfig.json index 1d424df8c4..a31791ed92 100644 --- a/types/azure-mobile-services-client/tsconfig.json +++ b/types/azure-mobile-services-client/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/azure-sb/tsconfig.json b/types/azure-sb/tsconfig.json index 09c9a2a9e4..d111d611fb 100644 --- a/types/azure-sb/tsconfig.json +++ b/types/azure-sb/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "lib/servicebusservice.d.ts", @@ -38,5 +39,4 @@ "azure-sb-tests.ts", "index.d.ts" ] -} - +} \ No newline at end of file diff --git a/types/azure/tsconfig.json b/types/azure/tsconfig.json index 0c4b536df2..df0f82f64b 100644 --- a/types/azure/tsconfig.json +++ b/types/azure/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/b_/tsconfig.json b/types/b_/tsconfig.json index 9227b30bf1..6dfab1f4a1 100644 --- a/types/b_/tsconfig.json +++ b/types/b_/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/babel-code-frame/tsconfig.json b/types/babel-code-frame/tsconfig.json index 48e33ae829..57a0a8bb26 100644 --- a/types/babel-code-frame/tsconfig.json +++ b/types/babel-code-frame/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/babel-core/tsconfig.json b/types/babel-core/tsconfig.json index 41aee71205..11a8a8f40c 100644 --- a/types/babel-core/tsconfig.json +++ b/types/babel-core/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/babel-generator/tsconfig.json b/types/babel-generator/tsconfig.json index 76d138f54d..3024006f80 100644 --- a/types/babel-generator/tsconfig.json +++ b/types/babel-generator/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/babel-plugin-react-pug/tsconfig.json b/types/babel-plugin-react-pug/tsconfig.json index 6cb3ae3ee1..b29df5be30 100644 --- a/types/babel-plugin-react-pug/tsconfig.json +++ b/types/babel-plugin-react-pug/tsconfig.json @@ -15,6 +15,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/babel-plugin-syntax-jsx/tsconfig.json b/types/babel-plugin-syntax-jsx/tsconfig.json index 6b52644488..c139912293 100644 --- a/types/babel-plugin-syntax-jsx/tsconfig.json +++ b/types/babel-plugin-syntax-jsx/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/babel-template/tsconfig.json b/types/babel-template/tsconfig.json index 96de23cec7..4dc5b17820 100644 --- a/types/babel-template/tsconfig.json +++ b/types/babel-template/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/babel-traverse/tsconfig.json b/types/babel-traverse/tsconfig.json index 03dfa6ea51..dfbed1aef9 100644 --- a/types/babel-traverse/tsconfig.json +++ b/types/babel-traverse/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/babel-types/tsconfig.json b/types/babel-types/tsconfig.json index 92d7d6442e..ec251d52b2 100644 --- a/types/babel-types/tsconfig.json +++ b/types/babel-types/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/babel-webpack-plugin/tsconfig.json b/types/babel-webpack-plugin/tsconfig.json index 3e73343283..78fccc30bc 100644 --- a/types/babel-webpack-plugin/tsconfig.json +++ b/types/babel-webpack-plugin/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "babel-webpack-plugin-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/babelify/tsconfig.json b/types/babelify/tsconfig.json index 9e07702ef2..e54236cdd6 100644 --- a/types/babelify/tsconfig.json +++ b/types/babelify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/babylon-walk/tsconfig.json b/types/babylon-walk/tsconfig.json index 9e1d7c33b7..b92a49ec5e 100644 --- a/types/babylon-walk/tsconfig.json +++ b/types/babylon-walk/tsconfig.json @@ -14,6 +14,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/babylon/tsconfig.json b/types/babylon/tsconfig.json index 94d5c0bd59..750f9357ac 100644 --- a/types/babylon/tsconfig.json +++ b/types/babylon/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/babyparse/tsconfig.json b/types/babyparse/tsconfig.json index da28a97d29..86af41a356 100644 --- a/types/babyparse/tsconfig.json +++ b/types/babyparse/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/backbone-associations/tsconfig.json b/types/backbone-associations/tsconfig.json index 7f905ff541..b822a91a70 100644 --- a/types/backbone-associations/tsconfig.json +++ b/types/backbone-associations/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/backbone-fetch-cache/tsconfig.json b/types/backbone-fetch-cache/tsconfig.json index 28c3240abc..bf3efc040a 100644 --- a/types/backbone-fetch-cache/tsconfig.json +++ b/types/backbone-fetch-cache/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/backbone-relational/tsconfig.json b/types/backbone-relational/tsconfig.json index 961582a08f..d0b124e315 100644 --- a/types/backbone-relational/tsconfig.json +++ b/types/backbone-relational/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/backbone.layoutmanager/tsconfig.json b/types/backbone.layoutmanager/tsconfig.json index 85b5e97b31..be801dd5e2 100644 --- a/types/backbone.layoutmanager/tsconfig.json +++ b/types/backbone.layoutmanager/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/backbone.localstorage/tsconfig.json b/types/backbone.localstorage/tsconfig.json index 65302c1d16..f745e8beb4 100644 --- a/types/backbone.localstorage/tsconfig.json +++ b/types/backbone.localstorage/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/backbone.marionette/tsconfig.json b/types/backbone.marionette/tsconfig.json index b31d3cbfa4..a9396b0e55 100644 --- a/types/backbone.marionette/tsconfig.json +++ b/types/backbone.marionette/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/backbone.paginator/tsconfig.json b/types/backbone.paginator/tsconfig.json index 453c5e2861..fc77167b76 100644 --- a/types/backbone.paginator/tsconfig.json +++ b/types/backbone.paginator/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/backbone.radio/tsconfig.json b/types/backbone.radio/tsconfig.json index 024840f373..ebf120cfac 100644 --- a/types/backbone.radio/tsconfig.json +++ b/types/backbone.radio/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/backbone/tsconfig.json b/types/backbone/tsconfig.json index c1185d6adf..227a495055 100644 --- a/types/backbone/tsconfig.json +++ b/types/backbone/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/backgrid/tsconfig.json b/types/backgrid/tsconfig.json index f2db8efd4c..e7449e8481 100644 --- a/types/backgrid/tsconfig.json +++ b/types/backgrid/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/backlog-js/tsconfig.json b/types/backlog-js/tsconfig.json index 360392d4ca..5e2cfc0b1c 100644 --- a/types/backlog-js/tsconfig.json +++ b/types/backlog-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/backoff/tsconfig.json b/types/backoff/tsconfig.json index 1946d82f81..71a863de5b 100644 --- a/types/backoff/tsconfig.json +++ b/types/backoff/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/baconjs/tsconfig.json b/types/baconjs/tsconfig.json index c9d82e16f7..4da0a4158f 100644 --- a/types/baconjs/tsconfig.json +++ b/types/baconjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bagpipes/tsconfig.json b/types/bagpipes/tsconfig.json index 56d9d43a52..db3bcb65b2 100755 --- a/types/bagpipes/tsconfig.json +++ b/types/bagpipes/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/baidumap-web-sdk/tsconfig.json b/types/baidumap-web-sdk/tsconfig.json index 6504c4665a..a0ee2590d8 100644 --- a/types/baidumap-web-sdk/tsconfig.json +++ b/types/baidumap-web-sdk/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/barcode/tsconfig.json b/types/barcode/tsconfig.json index a66d2ab178..f608cf0384 100644 --- a/types/barcode/tsconfig.json +++ b/types/barcode/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bardjs/tsconfig.json b/types/bardjs/tsconfig.json index bd5226a586..bf1bcdf426 100644 --- a/types/bardjs/tsconfig.json +++ b/types/bardjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/base-64/tsconfig.json b/types/base-64/tsconfig.json index 49de73c3ef..a4ca7d05ca 100644 --- a/types/base-64/tsconfig.json +++ b/types/base-64/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/base-x/tsconfig.json b/types/base-x/tsconfig.json index d69790c7d6..42a2d63c40 100644 --- a/types/base-x/tsconfig.json +++ b/types/base-x/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/base16/tsconfig.json b/types/base16/tsconfig.json index d354b0ba01..01e600fe79 100644 --- a/types/base16/tsconfig.json +++ b/types/base16/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/base64-js/tsconfig.json b/types/base64-js/tsconfig.json index 3a65d8af45..0199f01efa 100644 --- a/types/base64-js/tsconfig.json +++ b/types/base64-js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bases/tsconfig.json b/types/bases/tsconfig.json index 4b8912ac99..97e27e72e2 100644 --- a/types/bases/tsconfig.json +++ b/types/bases/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bash-glob/tsconfig.json b/types/bash-glob/tsconfig.json index 6a45a2d74d..0fdaf237e6 100644 --- a/types/bash-glob/tsconfig.json +++ b/types/bash-glob/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "bash-glob-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/basic-auth/tsconfig.json b/types/basic-auth/tsconfig.json index 7c49ef4d01..09bfa7fda6 100644 --- a/types/basic-auth/tsconfig.json +++ b/types/basic-auth/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/batch-stream/tsconfig.json b/types/batch-stream/tsconfig.json index e99f40b376..e746a4a8a2 100644 --- a/types/batch-stream/tsconfig.json +++ b/types/batch-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bazinga-translator/tsconfig.json b/types/bazinga-translator/tsconfig.json index 1ca08ada9b..22d98fdda3 100644 --- a/types/bazinga-translator/tsconfig.json +++ b/types/bazinga-translator/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bcrypt-nodejs/tsconfig.json b/types/bcrypt-nodejs/tsconfig.json index 1d7991ff5f..ffce95575f 100644 --- a/types/bcrypt-nodejs/tsconfig.json +++ b/types/bcrypt-nodejs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bcrypt/tsconfig.json b/types/bcrypt/tsconfig.json index 97c8808944..484a20da18 100644 --- a/types/bcrypt/tsconfig.json +++ b/types/bcrypt/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bcryptjs/tsconfig.json b/types/bcryptjs/tsconfig.json index 094f87744c..f20bc8f4bf 100644 --- a/types/bcryptjs/tsconfig.json +++ b/types/bcryptjs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/beats/tsconfig.json b/types/beats/tsconfig.json index 89bd0b5995..51a7504c29 100644 --- a/types/beats/tsconfig.json +++ b/types/beats/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "beats-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/bech32/tsconfig.json b/types/bech32/tsconfig.json index 886ec79796..6fd17c5386 100644 --- a/types/bech32/tsconfig.json +++ b/types/bech32/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "bech32-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/bem-cn/tsconfig.json b/types/bem-cn/tsconfig.json index e9212d8d91..fcef3bbd2f 100644 --- a/types/bem-cn/tsconfig.json +++ b/types/bem-cn/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/benchmark/tsconfig.json b/types/benchmark/tsconfig.json index ba1b6a3e55..252c53edbf 100644 --- a/types/benchmark/tsconfig.json +++ b/types/benchmark/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/better-curry/tsconfig.json b/types/better-curry/tsconfig.json index e5ceee43fc..ca9c7198ad 100644 --- a/types/better-curry/tsconfig.json +++ b/types/better-curry/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/better-sqlite3/better-sqlite3-tests.ts b/types/better-sqlite3/better-sqlite3-tests.ts index 43d78e1503..34ee6808c3 100644 --- a/types/better-sqlite3/better-sqlite3-tests.ts +++ b/types/better-sqlite3/better-sqlite3-tests.ts @@ -1,4 +1,4 @@ -import * as Database from 'better-sqlite3'; +import Database = require('better-sqlite3'); const integer = Database.Integer(1); const err = new Database.SqliteError('ok', 'ok'); diff --git a/types/better-sqlite3/index.d.ts b/types/better-sqlite3/index.d.ts index 530f5c3e53..899a85a2e2 100644 --- a/types/better-sqlite3/index.d.ts +++ b/types/better-sqlite3/index.d.ts @@ -4,9 +4,7 @@ // Mathew Rumsey // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - -import * as Integer from 'integer'; +import Integer = require('integer'); interface RunResult { changes: number; diff --git a/types/better-sqlite3/tsconfig.json b/types/better-sqlite3/tsconfig.json index 30a480355b..498fdb02b0 100644 --- a/types/better-sqlite3/tsconfig.json +++ b/types/better-sqlite3/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bezier-easing/tsconfig.json b/types/bezier-easing/tsconfig.json index 2603e9bae8..cb1796c552 100644 --- a/types/bezier-easing/tsconfig.json +++ b/types/bezier-easing/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bezier-js/tsconfig.json b/types/bezier-js/tsconfig.json index 02796cc09c..ed32c02bde 100644 --- a/types/bezier-js/tsconfig.json +++ b/types/bezier-js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bgiframe/tsconfig.json b/types/bgiframe/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/bgiframe/tsconfig.json +++ b/types/bgiframe/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/big.js/tsconfig.json b/types/big.js/tsconfig.json index 950e8b410f..f0a159d0df 100644 --- a/types/big.js/tsconfig.json +++ b/types/big.js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bigi/tsconfig.json b/types/bigi/tsconfig.json index de6aa90a97..d2a61fc6d4 100644 --- a/types/bigi/tsconfig.json +++ b/types/bigi/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bigint/tsconfig.json b/types/bigint/tsconfig.json index 37005189a4..37b2fc8ffe 100644 --- a/types/bigint/tsconfig.json +++ b/types/bigint/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bignum/tsconfig.json b/types/bignum/tsconfig.json index 15cb8a7b4f..64fc11893f 100644 --- a/types/bignum/tsconfig.json +++ b/types/bignum/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bigscreen/tsconfig.json b/types/bigscreen/tsconfig.json index 71230cc8e1..16e554a953 100644 --- a/types/bigscreen/tsconfig.json +++ b/types/bigscreen/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/binary-parser/tsconfig.json b/types/binary-parser/tsconfig.json index cb361f52c5..5f5844d984 100644 --- a/types/binary-parser/tsconfig.json +++ b/types/binary-parser/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "binary-parser-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/bind-ponyfill/tsconfig.json b/types/bind-ponyfill/tsconfig.json index 29d2a7cac2..bc3d132161 100644 --- a/types/bind-ponyfill/tsconfig.json +++ b/types/bind-ponyfill/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bindings/tsconfig.json b/types/bindings/tsconfig.json index fb9350642a..885e8058e8 100644 --- a/types/bindings/tsconfig.json +++ b/types/bindings/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "bindings-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/bingmaps/tsconfig.json b/types/bingmaps/tsconfig.json index 421876221b..f3efc20f2b 100644 --- a/types/bingmaps/tsconfig.json +++ b/types/bingmaps/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bintrees/tsconfig.json b/types/bintrees/tsconfig.json index d21ec38c1e..13adede158 100644 --- a/types/bintrees/tsconfig.json +++ b/types/bintrees/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bip21/tsconfig.json b/types/bip21/tsconfig.json index be0b017722..c487184fe8 100644 --- a/types/bip21/tsconfig.json +++ b/types/bip21/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bip38/tsconfig.json b/types/bip38/tsconfig.json index 6ce875b1d1..b490f75d5b 100644 --- a/types/bip38/tsconfig.json +++ b/types/bip38/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "bip38-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/bip39/tsconfig.json b/types/bip39/tsconfig.json index d44c1197ad..d3452a293a 100644 --- a/types/bip39/tsconfig.json +++ b/types/bip39/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "bip39-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/bit-array/tsconfig.json b/types/bit-array/tsconfig.json index ba2e9e32a2..589e137b19 100644 --- a/types/bit-array/tsconfig.json +++ b/types/bit-array/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bitcoinjs-lib/tsconfig.json b/types/bitcoinjs-lib/tsconfig.json index f874ae9858..35de2c3aab 100644 --- a/types/bitcoinjs-lib/tsconfig.json +++ b/types/bitcoinjs-lib/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bittorrent-protocol/bittorrent-protocol-tests.ts b/types/bittorrent-protocol/bittorrent-protocol-tests.ts index c32b2af368..2faca76a5e 100644 --- a/types/bittorrent-protocol/bittorrent-protocol-tests.ts +++ b/types/bittorrent-protocol/bittorrent-protocol-tests.ts @@ -1,4 +1,4 @@ -import * as Protocol from 'bittorrent-protocol'; +import Protocol = require('bittorrent-protocol'); import * as net from 'net'; class TestExtension implements Protocol.Extension { diff --git a/types/bittorrent-protocol/tsconfig.json b/types/bittorrent-protocol/tsconfig.json index f128669698..311ea796cb 100644 --- a/types/bittorrent-protocol/tsconfig.json +++ b/types/bittorrent-protocol/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bitwise-xor/tsconfig.json b/types/bitwise-xor/tsconfig.json index a6b66cda37..35574c6254 100644 --- a/types/bitwise-xor/tsconfig.json +++ b/types/bitwise-xor/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bl/tsconfig.json b/types/bl/tsconfig.json index 0f7c861ce8..96ce63bb4e 100644 --- a/types/bl/tsconfig.json +++ b/types/bl/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/blacklist/tsconfig.json b/types/blacklist/tsconfig.json index 76cb49e40f..4e45bff651 100644 --- a/types/blacklist/tsconfig.json +++ b/types/blacklist/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/blazy/tsconfig.json b/types/blazy/tsconfig.json index e452d910ec..8e6b8be63e 100644 --- a/types/blazy/tsconfig.json +++ b/types/blazy/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bleno/tsconfig.json b/types/bleno/tsconfig.json index 338f3e3d24..ddc7332cf7 100644 --- a/types/bleno/tsconfig.json +++ b/types/bleno/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/blessed/blessed-tests.ts b/types/blessed/blessed-tests.ts index c5f857146f..aa38af8985 100644 --- a/types/blessed/blessed-tests.ts +++ b/types/blessed/blessed-tests.ts @@ -1,5 +1,6 @@ import * as blessed from "blessed"; import { readFileSync } from "fs"; +import { inspect } from "util"; let screen: blessed.Widgets.Screen = null; @@ -743,3 +744,71 @@ setTimeout(() => { table.setData(data1); screen.render(); }, 3000); + +// https://github.com/chjj/blessed/blob/master/test/program-mouse.js + +const program = blessed.program({ + dump: __dirname + '/logs/mouse.log' +}); + +// program.setMouse({ +// allMotion: true, +// //utfMouse: true +// urxvtMouse: true +// }, true); + +program.alternateBuffer(); +program.enableMouse(); +program.hideCursor(); + +program.setMouse({ sendFocus: true }, true); + +program.on('mouse', function(data) { + program.cup(data.y, data.x); + program.write(' '); + program.cup(0, 0); + program.write(inspect(data)); +}); + +program.on('resize', function(data) { + setTimeout(function() { + program.clear(); + program.cup(0, 0); + program.write(inspect({ cols: program.cols, rows: program.rows })); + }, 200); +}); + +process.on('SIGWINCH', function(data) { + setTimeout(function() { + program.cup(1, 0); + program.write(inspect({ winch: true, cols: program.cols, rows: program.rows })); + }, 200); +}); + +program.on('focus', function(data) { + program.clear(); + program.cup(0, 0); + program.write('FOCUSIN'); +}); + +program.on('blur', function(data) { + program.clear(); + program.cup(0, 0); + program.write('FOCUSOUT'); +}); + +program.key(['q', 'escape', 'C-c'], function() { + program.showCursor(); + program.disableMouse(); + program.normalBuffer(); + process.exit(0); +}); + +program.on('keypress', function(ch, data) { + if (data.name === 'mouse') return; + program.clear(); + program.cup(0, 0); + program.write(inspect(data)); +}); + +program.clear(); diff --git a/types/blessed/index.d.ts b/types/blessed/index.d.ts index eff4b72d24..7dae1709d2 100644 --- a/types/blessed/index.d.ts +++ b/types/blessed/index.d.ts @@ -7,13 +7,433 @@ /// import { EventEmitter } from "events"; +import { Writable, Readable } from "stream"; import * as stream from "stream"; import * as child_process from "child_process"; -export class BlessedProgram { - hideCursor: () => void; - move: any; - showCursor: any; +export interface IBlessedProgramOptions { + input?: Readable; + output?: Writable; + log?: string; + dump?: boolean; + zero?: boolean; + buffer?: boolean; + terminal?: string; + term?: string; + tput?: string; + debug?: boolean; + resizeTimeout?: boolean; +} + +export class BlessedProgram extends EventEmitter { + type: string; + options: IBlessedProgramOptions; + input: Readable; + output: Writable; + zero: boolean; + useBuffer: boolean; + x: number; + y: number; + savedX: number; + savedY: number; + cols: number; + rows: number; + scrollTop: number; + scrollBottom: number; + isOSXTerm: boolean; + isiTerm2: boolean; + isXFCE: boolean; + isTerminator: boolean; + isLXDE: boolean; + isVTE: boolean; + isRxvt: boolean; + isXterm: boolean; + tmux: boolean; + tmuxVersion: number; + + constructor(options?: IBlessedProgramOptions); + + log(): boolean; + debug(): boolean; + setupDump(): void; + setupTput(): void; + setTerminal(terminal: string): void; + has(name: string): boolean; + term(is: string): boolean; + + listen(): void; + destroy(): void; + + key(key: string|string[], listener: Function): void; + onceKey(key: string|string[], listener: Function): void; + + unKey(key: string|string[], listener: Function): void; + removeKey(key: string|string[], listener: Function): void; + + bindMouse(): void; + enableGpm(): void; + disableGpm(): void; + bindResponse(): void; + + response(name: string, text: string, callback: Function, noBypass?: boolean): boolean; + response(name: string, callback?: Function): boolean; + + write(text: string): boolean; + flush(): void; + print(text: string, attr?: boolean): boolean; + echo(text: string, attr?: boolean): boolean; + + setx(x: number): boolean; + sety(y: number): boolean; + move(x: number, y: number): boolean; + omove(x: number, y: number): void; + rsetx(x: number): boolean; + rsety(y: number): boolean; + rmove(x: number, y: number): void; + + simpleInsert(ch: string, i?: number, attr?: boolean): boolean; + repeat(ch: string, i?: number): string; + copyToClipboard(text: string): boolean; + + cursorShape(shape: string, blink?: boolean): boolean; + cursorColor(color: string): boolean; + cursorReset(): boolean; + resetCursor(): boolean; + + getTextParams(param: string, callback: Function): boolean; + getCursorColor(callback: Function): boolean; + + nul(): boolean; + + bell(): boolean; + bel(): boolean; + + vtab(): boolean; + + form(): boolean; + ff(): boolean; + + backspace(): boolean; + kbs(): boolean; + + tab(): boolean; + ht(): boolean; + + shiftOut(): boolean; + shiftIn(): boolean; + + return(): boolean; + cr(): boolean; + + feed(): boolean; + newline(): boolean; + nl(): boolean; + + index(): boolean; + ind(): boolean; + + reverseIndex(): boolean; + reverse(): boolean; + ri(): boolean; + + nextLine(): boolean; + reset(): boolean; + tabSet(): boolean; + + saveCursor(key: string): boolean; + sc(key: string): boolean; + + restoreCursor(key?: string, hide?: boolean): boolean; + rc(key?: string, hide?: boolean): boolean; + + lsaveCursor(key?: string): void; + lrestoreCursor(key?: string, hide?: boolean): void; + + lineHeight(): boolean; + + charset(val?: string, level?: number): boolean; + + enter_alt_charset_mode(): boolean; + as(): boolean; + smacs(): boolean; + + exit_alt_charset_mode(): boolean; + ae(): boolean; + rmacs(): boolean; + + setG(val: number): boolean; + + setTitle(title: string): boolean; + + resetColors(param?: string): boolean; + + dynamicColors(param?: string): boolean; + + selData(a: string, b: string): boolean; + + cursorUp(param?: number): boolean; + cuu(param?: number): boolean; + up(param?: number): boolean; + + cursorDown(param?: number): boolean; + cud(param?: number): boolean; + down(param?: number): boolean; + + cursorForward(param?: number): boolean; + cuf(param?: number): boolean; + right(param?: number): boolean; + forward(param?: number): boolean; + + cursorBackward(param?: number): boolean; + cub(param?: number): boolean; + left(param?: number): boolean; + back(param?: number): boolean; + + cursorPos(row?: number, col?: number): boolean; + cup(row?: number, col?: number): boolean; + pos(row?: number, col?: number): boolean; + + eraseInDisplay(param?: string): boolean; + ed(param?: string): boolean; + + clear(): boolean; + + eraseInLine(param?: string): boolean; + el(param?: string): boolean; + + charAttributes(param: string, val?: boolean): boolean; + charAttributes(param: string[], val?: boolean): boolean; + + setForeground(color: string, val?: boolean): boolean; + fg(color: string, val?: boolean): boolean; + + setBackground(color: string, val?: boolean): boolean; + bg(color: string, val?: boolean): boolean; + + deviceStatuses(param?: string, callback?: Function, dec?: boolean, noBypass?: boolean): boolean; + dsr(param?: string, callback?: Function, dec?: boolean, noBypass?: boolean): boolean; + + getCursor(callback: Function): boolean; + saveReportedCursor(callback: Function): void; + + restoreReportedCursor: () => boolean; + + insertChars(param?: number): boolean; + ich(param?: number): boolean; + + cursorNextLine(param?: number): boolean; + cnl(param?: number): boolean; + + cursorPrecedingLine(param?: number): boolean; + cpl(param?: number): boolean; + + cursorCharAbsolute(param?: number): boolean; + cha(param?: number): boolean; + + insertLines(param?: number): boolean; + il(param?: number): boolean; + + deleteLines(param?: number): boolean; + dl(param?: number): boolean; + + deleteChars(param?: number): boolean; + dch(param?: number): boolean; + + eraseChars(param?: number): boolean; + ech(param?: number): boolean; + + charPosAbsolute(param?: number): boolean; + hpa(param?: number): boolean; + + HPositionRelative(param?: number): boolean; + + sendDeviceAttributes(param?: number, callback?: Function): boolean; + da(param?: number, callback?: Function): boolean; + + linePosAbsolute(param?: number): boolean; + vpa(param?: number): boolean; + + VPositionRelative(param?: number): boolean; + vpr(param?: number): boolean; + + HVPosition(row?: number, col?: number): boolean; + hvp(row?: number, col?: number): boolean; + + setMode(...args: string[]): boolean; + sm(...args: string[]): boolean; + + decset(...args: string[]): boolean; + + showCursor(): boolean; + + alternateBuffer(): boolean; + smcup(): boolean; + alternate(): boolean; + + resetMode(...args: string[]): boolean; + rm(...args: string[]): boolean; + + decrst(...args: string[]): boolean; + + hideCursor(): boolean; + civis(): boolean; + vi(): boolean; + cursor_invisible(): boolean; + dectcemh(): boolean; + + normalBuffer(): boolean; + rmcup(): boolean; + + enableMouse(): void; + disableMouse(): void; + + setMouse(opt?: {}, enable?: boolean): void; + + setScrollRegion(top: number, bottom: number): boolean; + csr(top: number, bottom: number): boolean; + decstbm(top: number, bottom: number): boolean; + + saveCursorA(): boolean; + scA(): boolean; + + restoreCursorA(): boolean; + rcA(): boolean; + + cursorForwardTab(param?: number): boolean; + cht(param?: number): boolean; + + scrollUp(param?: number): boolean; + su(param?: number): boolean; + + scrollDown(param?: number): boolean; + sd(param?: number): boolean; + + initMouseTracking(...args: string[]): boolean; + + resetTitleModes(...args: string[]): boolean; + + cursorBackwardTab(param?: number): boolean; + cbt(param?: number): boolean; + + repeatPrecedingCharacter(param?: number): boolean; + rep(param?: number): boolean; + + tabClear(param?: number): boolean; + tbc(param?: number): boolean; + + mediaCopy(...args: string[]): boolean; + mc(...args: string[]): boolean; + + mc0(): boolean; + print_screen(): boolean; + ps(): boolean; + + mc5(): boolean; + prtr_on(): boolean; + po(): boolean; + + mc4(): boolean; + prtr_off(): boolean; + pf(): boolean; + + mc5p(): boolean; + prtr_non(): boolean; + p0(): boolean; + + setResources(...args: string[]): boolean; + + disableModifieres(...args: string[]): boolean; + + setPointerMode(...args: string[]): boolean; + + softReset(): boolean; + rs2(): boolean; + decstr(): boolean; + + requestAnsiMode(param?: number): boolean; + decrqm(param?: number): boolean; + + requestPrivateMode(param?: number): boolean; + decrqmp(param?: number): boolean; + + setConformanceLevel(...args: string[]): boolean; + decscl(...args: string[]): boolean; + + loadLEDs(param?: number): boolean; + decll(param?: number): boolean; + + setCursorStyle(param?: string): boolean; + decscursr(param?: string): boolean; + + setCharProtectionAttr(param?: number): boolean; + decsca(param?: number): boolean; + + restorePrivateValues(...args: string[]): boolean; + + setAttrInRectangle(...args: string[]): boolean; + deccara(...args: string[]): boolean; + + savePrivateValues(...args: string[]): boolean; + + manipulateWindow(...args: any[]): boolean; + + getWindowSize(callback?: Function): boolean; + + reverseAttrInRectangle(...args: string[]): boolean; + decrara(...args: string[]): boolean; + + setTitleModeFeature(...args: string[]): boolean; + + setWarningBellVolume(param?: number): boolean; + decswbv(param?: number): boolean; + + setMarginBellVolume(param?: number): boolean; + + copyRectangle(...args: string[]): boolean; + deccra(...args: string[]): boolean; + + enableFilterRectangle(...args: string[]): boolean; + decefr(...args: string[]): boolean; + + requestParameters(param?: number): boolean; + decreqtparm(param: number): boolean; + + selectChangeExtent(param?: number): boolean; + decsace(param?: number): boolean; + + fillRectangle(...args: string[]): boolean; + decfra(...args: string[]): boolean; + + enableLocatorReporting(...args: string[]): boolean; + decelr(...args: string[]): boolean; + + eraseRectangle(...args: string[]): boolean; + decera(...args: string[]): boolean; + + setLocatorEvents(...args: string[]): boolean; + decsle(...args: string[]): boolean; + + selectiveEraseRectangle(...args: string[]): boolean; + decsera(...args: string[]): boolean; + + requestLocatorPosition(param?: string, callback?: Function): boolean; + reqmp(param?: string, callback?: Function): boolean; + req_mouse_pos(param?: string, callback?: Function): boolean; + decrqlp(param?: string, callback?: Function): boolean; + + insertColumns(...args: string[]): boolean; + decic(...args: string[]): boolean; + + deleteColumns(...args: string[]): boolean; + decdc(...args: string[]): boolean; + + out(param: string, ...args: any[]): boolean; + + sigtstp(callback?: Function): boolean; + + pause(callback?: Function): Function; + + resume: () => void; } export namespace Widgets { @@ -3024,6 +3444,7 @@ export function message(options?: Widgets.MessageOptions): Widgets.MessageElemen export function loading(options?: Widgets.LoadingOptions): Widgets.LoadingElement; export function log(options?: Widgets.LogOptions): Widgets.Log; export function progressbar(options?: Widgets.ProgressBarOptions): Widgets.ProgressBarElement; +export function program(options?: Widgets.IScreenOptions): BlessedProgram; export function terminal(options?: Widgets.TerminalOptions): Widgets.TerminalElement; export function layout(options?: Widgets.LayoutOptions): Widgets.LayoutElement; export function escape(item: any): any; diff --git a/types/blessed/tsconfig.json b/types/blessed/tsconfig.json index e57d4b78d6..663cf64ce8 100644 --- a/types/blessed/tsconfig.json +++ b/types/blessed/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/blissfuljs/tsconfig.json b/types/blissfuljs/tsconfig.json index 42087d76ef..16201714f3 100644 --- a/types/blissfuljs/tsconfig.json +++ b/types/blissfuljs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/blob-stream/tsconfig.json b/types/blob-stream/tsconfig.json index 2ebe6cacb9..c8ae5c3565 100644 --- a/types/blob-stream/tsconfig.json +++ b/types/blob-stream/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/blob-to-buffer/tsconfig.json b/types/blob-to-buffer/tsconfig.json index 2421ce2493..ed4fc69e7b 100644 --- a/types/blob-to-buffer/tsconfig.json +++ b/types/blob-to-buffer/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "blob-to-buffer-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/blob-util/tsconfig.json b/types/blob-util/tsconfig.json index 7f7970ab0b..2f53f29186 100644 --- a/types/blob-util/tsconfig.json +++ b/types/blob-util/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/blocks/tsconfig.json b/types/blocks/tsconfig.json index 85da699a13..4203094315 100644 --- a/types/blocks/tsconfig.json +++ b/types/blocks/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bloomfilter/tsconfig.json b/types/bloomfilter/tsconfig.json index 76ea34c251..578ee0b36b 100644 --- a/types/bloomfilter/tsconfig.json +++ b/types/bloomfilter/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/blue-tape/tsconfig.json b/types/blue-tape/tsconfig.json index a4fc12b9e1..5271d69567 100644 --- a/types/blue-tape/tsconfig.json +++ b/types/blue-tape/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bluebird-global/index.d.ts b/types/bluebird-global/index.d.ts index c0e220ce07..c3f0fd9d43 100644 --- a/types/bluebird-global/index.d.ts +++ b/types/bluebird-global/index.d.ts @@ -44,7 +44,7 @@ * d. target es6, latest "es20xx", e.g. "es2017" */ -import * as Bluebird from "bluebird"; +import Bluebird = require("bluebird"); declare global { /* diff --git a/types/bluebird-global/tsconfig.json b/types/bluebird-global/tsconfig.json index d037429e0d..5256c6c206 100644 --- a/types/bluebird-global/tsconfig.json +++ b/types/bluebird-global/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bluebird-retry/tsconfig.json b/types/bluebird-retry/tsconfig.json index 5ae2b487db..ea6622b197 100644 --- a/types/bluebird-retry/tsconfig.json +++ b/types/bluebird-retry/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bluebird/tsconfig.json b/types/bluebird/tsconfig.json index 909dae3771..b0b641abfd 100644 --- a/types/bluebird/tsconfig.json +++ b/types/bluebird/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } -} +} \ No newline at end of file diff --git a/types/bluebird/v1/tsconfig.json b/types/bluebird/v1/tsconfig.json index 3e22a6a885..1a61a9f82c 100644 --- a/types/bluebird/v1/tsconfig.json +++ b/types/bluebird/v1/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bluebird/v2/tsconfig.json b/types/bluebird/v2/tsconfig.json index 773747fb4a..e58ea42703 100644 --- a/types/bluebird/v2/tsconfig.json +++ b/types/bluebird/v2/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/blueimp-md5/tsconfig.json b/types/blueimp-md5/tsconfig.json index 286b0abda2..84d291ab5f 100644 --- a/types/blueimp-md5/tsconfig.json +++ b/types/blueimp-md5/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/body-parser/body-parser-tests.ts b/types/body-parser/body-parser-tests.ts index fa18cad13b..2f6a33ea72 100644 --- a/types/body-parser/body-parser-tests.ts +++ b/types/body-parser/body-parser-tests.ts @@ -1,4 +1,4 @@ -import * as express from 'express'; +import express = require('express'); import { json, raw, diff --git a/types/body-parser/tsconfig.json b/types/body-parser/tsconfig.json index 9c0314a557..fcab8a9b2c 100644 --- a/types/body-parser/tsconfig.json +++ b/types/body-parser/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bonjour/bonjour-tests.ts b/types/bonjour/bonjour-tests.ts index 61e7373f01..aff3226eba 100644 --- a/types/bonjour/bonjour-tests.ts +++ b/types/bonjour/bonjour-tests.ts @@ -1,4 +1,4 @@ -import * as bonjour from 'bonjour'; +import bonjour = require('bonjour'); let bonjourOptions: bonjour.BonjourOptions; let bonjourInstance: bonjour.Bonjour; diff --git a/types/bonjour/tsconfig.json b/types/bonjour/tsconfig.json index 8cc7d3f823..8840a855b0 100644 --- a/types/bonjour/tsconfig.json +++ b/types/bonjour/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bookshelf/bookshelf-tests.ts b/types/bookshelf/bookshelf-tests.ts index 77af31461b..81c42f7680 100644 --- a/types/bookshelf/bookshelf-tests.ts +++ b/types/bookshelf/bookshelf-tests.ts @@ -1,6 +1,6 @@ -import * as Knex from 'knex'; -import * as Bookshelf from 'bookshelf'; -import * as assert from 'assert'; +import Knex = require('knex'); +import Bookshelf = require('bookshelf'); +import assert = require('assert'); import * as express from 'express'; import * as _ from "lodash"; @@ -1124,7 +1124,7 @@ ships.on('fetched', (collection, response) => { User.collection() .orderBy('-name') .fetch() - .then((users: Bookshelf.Collection) => { + .then((users: Bookshelf.Collection>) => { console.log(users); }) } diff --git a/types/bookshelf/index.d.ts b/types/bookshelf/index.d.ts index dca8d5fad2..c151e81624 100644 --- a/types/bookshelf/index.d.ts +++ b/types/bookshelf/index.d.ts @@ -250,7 +250,7 @@ declare namespace Bookshelf { detach(options?: SyncOptions): BlueBird; fetchOne(options?: CollectionFetchOneOptions): BlueBird; load(relations: string | string[], options?: SyncOptions): BlueBird>; - orderBy(column: string, order?: SortOrder): T; + orderBy(column: string, order?: SortOrder): Collection; // Declaration order matters otherwise TypeScript gets confused between query() and query(...query: string[]) query(): Knex.QueryBuilder; diff --git a/types/bookshelf/tsconfig.json b/types/bookshelf/tsconfig.json index e983e9b53c..97c8b4593f 100644 --- a/types/bookshelf/tsconfig.json +++ b/types/bookshelf/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/boolify-string/tsconfig.json b/types/boolify-string/tsconfig.json index fcc1b15038..dee33294ce 100644 --- a/types/boolify-string/tsconfig.json +++ b/types/boolify-string/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/boom/tsconfig.json b/types/boom/tsconfig.json index 81f6f5cacf..dc98c5e8dd 100644 --- a/types/boom/tsconfig.json +++ b/types/boom/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/boom/v3/tsconfig.json b/types/boom/v3/tsconfig.json index 1f8b8e7f4a..5e710a4782 100644 --- a/types/boom/v3/tsconfig.json +++ b/types/boom/v3/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/boom/v4/tsconfig.json b/types/boom/v4/tsconfig.json index 58f1109eee..0a547414fb 100644 --- a/types/boom/v4/tsconfig.json +++ b/types/boom/v4/tsconfig.json @@ -19,10 +19,11 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "boom-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/bootbox/tsconfig.json b/types/bootbox/tsconfig.json index 75da35b2bc..c5edc1ed75 100644 --- a/types/bootbox/tsconfig.json +++ b/types/bootbox/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bootpag/tsconfig.json b/types/bootpag/tsconfig.json index 69b09cc3a6..6861920942 100644 --- a/types/bootpag/tsconfig.json +++ b/types/bootpag/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bootstrap-datepicker/tsconfig.json b/types/bootstrap-datepicker/tsconfig.json index 6770944b42..a8fed647e2 100644 --- a/types/bootstrap-datepicker/tsconfig.json +++ b/types/bootstrap-datepicker/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bootstrap-fileinput/tsconfig.json b/types/bootstrap-fileinput/tsconfig.json index fa1c069762..b4076b50e2 100644 --- a/types/bootstrap-fileinput/tsconfig.json +++ b/types/bootstrap-fileinput/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/bootstrap-growl-ifightcrime/bootstrap-growl-ifightcrime-tests.ts b/types/bootstrap-growl-ifightcrime/bootstrap-growl-ifightcrime-tests.ts new file mode 100644 index 0000000000..78f92fcf71 --- /dev/null +++ b/types/bootstrap-growl-ifightcrime/bootstrap-growl-ifightcrime-tests.ts @@ -0,0 +1,25 @@ +// basic usage +$(document).ready(() => { + $.bootstrapGrowl('Message to show in alert'); +}); + +// with options example +let offsetOptions: BootstrapGrowlIfightcrime.OffsetOption = { + from: 'top', + amount: 20 +}; + +let options: BootstrapGrowlIfightcrime.Options = { + ele: 'body', + type: 'info', + offset: offsetOptions, + align: 'right', + width: 250, + delay: 4000, + allow_dismiss: true, + stackup_spacing: 10 +}; + +$(document).ready(() => { + $.bootstrapGrowl('Alert with options', options); +}); diff --git a/types/bootstrap-growl-ifightcrime/index.d.ts b/types/bootstrap-growl-ifightcrime/index.d.ts new file mode 100644 index 0000000000..45755682ea --- /dev/null +++ b/types/bootstrap-growl-ifightcrime/index.d.ts @@ -0,0 +1,78 @@ +// Type definitions for Bootstrap Growl Ifightcrime 1.1 +// Project: https://github.com/ifightcrime/bootstrap-growl +// Definitions by: Anderson Friaça +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +declare namespace BootstrapGrowlIfightcrime { + type OffsetPositionType = 'top' | 'bottom'; + + type AlertType = 'info' | 'danger' | 'success' | 'warning' | string | null; + + type AlignType = 'left' | 'center' | 'right'; + + interface OffsetOption { + /** + * Position: top or bottom + */ + from?: OffsetPositionType; + + /** + * Offset amount + */ + amount?: number; + } + + interface Options { + /** + * Which element to append to + */ + ele?: string; + + /** + * Values of (null, 'info', 'danger', 'success', 'warning') or another value + */ + type?: AlertType; + + /** + * Offset Options + */ + offset?: OffsetOption; + + /** + * 'left', 'right', or 'center' + */ + align?: AlignType; + + /** + * Integer + */ + width?: number; + + /** + * Time while the message will be displayed. It's not equivalent to the *demo* timeOut! + */ + delay?: number; + + /** + * If true then will display a cross to close the popup. + */ + allow_dismiss?: boolean; + + /** + * Spacing between consecutively stacked growls. + */ + stackup_spacing?: number; + } +} +interface JQueryStatic { + /** + * Show standard Bootstrap alerts into hovering "Growl-like" notifications + * @param message to show. + * @param options should be an options object. + * @returns The element. + */ + bootstrapGrowl: (message: string, options?: BootstrapGrowlIfightcrime.Options) => JQuery; +} diff --git a/types/bootstrap-growl-ifightcrime/tsconfig.json b/types/bootstrap-growl-ifightcrime/tsconfig.json new file mode 100644 index 0000000000..fc7523d1ed --- /dev/null +++ b/types/bootstrap-growl-ifightcrime/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", + "bootstrap-growl-ifightcrime-tests.ts" + ] +} \ No newline at end of file diff --git a/types/bootstrap-growl-ifightcrime/tslint.json b/types/bootstrap-growl-ifightcrime/tslint.json new file mode 100644 index 0000000000..4e88071852 --- /dev/null +++ b/types/bootstrap-growl-ifightcrime/tslint.json @@ -0,0 +1 @@ +{"extends": "dtslint/dt.json"} diff --git a/types/bootstrap-maxlength/tsconfig.json b/types/bootstrap-maxlength/tsconfig.json index 403883963c..e4b44ea983 100644 --- a/types/bootstrap-maxlength/tsconfig.json +++ b/types/bootstrap-maxlength/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bootstrap-notify/tsconfig.json b/types/bootstrap-notify/tsconfig.json index f833291433..655e25aee4 100644 --- a/types/bootstrap-notify/tsconfig.json +++ b/types/bootstrap-notify/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bootstrap-select/tsconfig.json b/types/bootstrap-select/tsconfig.json index 108bd0a43f..5e091020b7 100644 --- a/types/bootstrap-select/tsconfig.json +++ b/types/bootstrap-select/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bootstrap-slider/tsconfig.json b/types/bootstrap-slider/tsconfig.json index 7400a08d09..290df45757 100644 --- a/types/bootstrap-slider/tsconfig.json +++ b/types/bootstrap-slider/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bootstrap-switch/tsconfig.json b/types/bootstrap-switch/tsconfig.json index 794d73cac9..12b39ceee9 100644 --- a/types/bootstrap-switch/tsconfig.json +++ b/types/bootstrap-switch/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bootstrap-table/tsconfig.json b/types/bootstrap-table/tsconfig.json index b38fb73330..8ce2a4f120 100644 --- a/types/bootstrap-table/tsconfig.json +++ b/types/bootstrap-table/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bootstrap-touchspin/tsconfig.json b/types/bootstrap-touchspin/tsconfig.json index 1ce86dec76..dd3a9a264f 100644 --- a/types/bootstrap-touchspin/tsconfig.json +++ b/types/bootstrap-touchspin/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bootstrap-treeview/tsconfig.json b/types/bootstrap-treeview/tsconfig.json index 30898529bb..07ec80679b 100644 --- a/types/bootstrap-treeview/tsconfig.json +++ b/types/bootstrap-treeview/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bootstrap-validator/tsconfig.json b/types/bootstrap-validator/tsconfig.json index 4f61ae94f9..c2fe1d7649 100644 --- a/types/bootstrap-validator/tsconfig.json +++ b/types/bootstrap-validator/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bootstrap.paginator/tsconfig.json b/types/bootstrap.paginator/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/bootstrap.paginator/tsconfig.json +++ b/types/bootstrap.paginator/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/bootstrap.timepicker/tsconfig.json b/types/bootstrap.timepicker/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/bootstrap.timepicker/tsconfig.json +++ b/types/bootstrap.timepicker/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/bootstrap.v3.datetimepicker/tsconfig.json b/types/bootstrap.v3.datetimepicker/tsconfig.json index 36febd5a8f..07477e55ee 100644 --- a/types/bootstrap.v3.datetimepicker/tsconfig.json +++ b/types/bootstrap.v3.datetimepicker/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/bootstrap.v3.datetimepicker/v3/tsconfig.json b/types/bootstrap.v3.datetimepicker/v3/tsconfig.json index 3dcc23bdff..2647486a31 100644 --- a/types/bootstrap.v3.datetimepicker/v3/tsconfig.json +++ b/types/bootstrap.v3.datetimepicker/v3/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/bootstrap/tsconfig.json b/types/bootstrap/tsconfig.json index 536901e8a6..69b44a5acc 100644 --- a/types/bootstrap/tsconfig.json +++ b/types/bootstrap/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bounce.js/tsconfig.json b/types/bounce.js/tsconfig.json index a0f7048729..e98358df0d 100644 --- a/types/bounce.js/tsconfig.json +++ b/types/bounce.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/box2d/tsconfig.json b/types/box2d/tsconfig.json index 9fae5e8326..d2792ff0aa 100644 --- a/types/box2d/tsconfig.json +++ b/types/box2d/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/brace-expansion/tsconfig.json b/types/brace-expansion/tsconfig.json index a64fa9ea3b..5bf38b657e 100644 --- a/types/brace-expansion/tsconfig.json +++ b/types/brace-expansion/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/braces/tsconfig.json b/types/braces/tsconfig.json index bdacb750ad..4cea273caa 100644 --- a/types/braces/tsconfig.json +++ b/types/braces/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/braft-editor/braft-editor-tests.tsx b/types/braft-editor/braft-editor-tests.tsx index 584927e0bd..999850acaa 100644 --- a/types/braft-editor/braft-editor-tests.tsx +++ b/types/braft-editor/braft-editor-tests.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import * as BraftEditor from "braft-editor"; +import BraftEditor = require("braft-editor"); import { RawDraftContentState, } from 'draft-js'; diff --git a/types/braft-editor/tsconfig.json b/types/braft-editor/tsconfig.json index f04b8febfe..f944ddb136 100644 --- a/types/braft-editor/tsconfig.json +++ b/types/braft-editor/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/braintree-web/tsconfig.json b/types/braintree-web/tsconfig.json index 3a39178d0e..8ebecd3737 100644 --- a/types/braintree-web/tsconfig.json +++ b/types/braintree-web/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/breeze/tsconfig.json b/types/breeze/tsconfig.json index 236bcba327..6960f68bf4 100644 --- a/types/breeze/tsconfig.json +++ b/types/breeze/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bricks.js/tsconfig.json b/types/bricks.js/tsconfig.json index 5f265430a3..af736ecb51 100644 --- a/types/bricks.js/tsconfig.json +++ b/types/bricks.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/brorand/brorand-tests.ts b/types/brorand/brorand-tests.ts index ac090e8724..eb7bf16570 100644 --- a/types/brorand/brorand-tests.ts +++ b/types/brorand/brorand-tests.ts @@ -1,5 +1,4 @@ - -import * as brorand from 'brorand'; +import brorand = require('brorand'); { let result: Buffer|Uint8Array = brorand(42); diff --git a/types/brorand/tsconfig.json b/types/brorand/tsconfig.json index 52e7dbf24c..46bf46253f 100644 --- a/types/brorand/tsconfig.json +++ b/types/brorand/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/browser-bunyan/tsconfig.json b/types/browser-bunyan/tsconfig.json index ab3fb51bd2..258572b639 100644 --- a/types/browser-bunyan/tsconfig.json +++ b/types/browser-bunyan/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/browser-fingerprint/tsconfig.json b/types/browser-fingerprint/tsconfig.json index 7f34a8f380..b542891e6d 100644 --- a/types/browser-fingerprint/tsconfig.json +++ b/types/browser-fingerprint/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/browser-harness/tsconfig.json b/types/browser-harness/tsconfig.json index 1694e52c08..94f44fa93e 100644 --- a/types/browser-harness/tsconfig.json +++ b/types/browser-harness/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/browser-pack/tsconfig.json b/types/browser-pack/tsconfig.json index 1dc87a2e2d..23cf069267 100644 --- a/types/browser-pack/tsconfig.json +++ b/types/browser-pack/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/browser-report/tsconfig.json b/types/browser-report/tsconfig.json index f0bb076ca9..d356e5aa89 100644 --- a/types/browser-report/tsconfig.json +++ b/types/browser-report/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/browser-resolve/browser-resolve-tests.ts b/types/browser-resolve/browser-resolve-tests.ts index 7d08de726f..25872b4b07 100644 --- a/types/browser-resolve/browser-resolve-tests.ts +++ b/types/browser-resolve/browser-resolve-tests.ts @@ -1,4 +1,4 @@ -import * as browserResolve from 'browser-resolve'; +import browserResolve = require('browser-resolve'); function basic_test_async(callback: (err?: Error, resolved?: string) => void) { browserResolve('typescript', function(error, resolved) { diff --git a/types/browser-resolve/tsconfig.json b/types/browser-resolve/tsconfig.json index 5f873c7ee5..82c5c037ca 100644 --- a/types/browser-resolve/tsconfig.json +++ b/types/browser-resolve/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/browser-sync/browser-sync-tests.ts b/types/browser-sync/browser-sync-tests.ts index 85cd464a21..bcd829367a 100644 --- a/types/browser-sync/browser-sync-tests.ts +++ b/types/browser-sync/browser-sync-tests.ts @@ -1,4 +1,4 @@ -import * as browserSync from "browser-sync"; +import browserSync = require("browser-sync"); (() => { //make sure that the interfaces are correctly exposed diff --git a/types/browser-sync/tsconfig.json b/types/browser-sync/tsconfig.json index 830268a3a6..0984bd5d70 100644 --- a/types/browser-sync/tsconfig.json +++ b/types/browser-sync/tsconfig.json @@ -19,7 +19,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/browserify/tsconfig.json b/types/browserify/tsconfig.json index df71b7fb3b..f0588d71c8 100644 --- a/types/browserify/tsconfig.json +++ b/types/browserify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bs58/tsconfig.json b/types/bs58/tsconfig.json index 9e0ed25701..3c8b90f97d 100644 --- a/types/bs58/tsconfig.json +++ b/types/bs58/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bson/tsconfig.json b/types/bson/tsconfig.json index aa4936d595..684c19c644 100644 --- a/types/bson/tsconfig.json +++ b/types/bson/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bucks/tsconfig.json b/types/bucks/tsconfig.json index f06df83926..fe5a89bfe7 100644 --- a/types/bucks/tsconfig.json +++ b/types/bucks/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/buffer-compare/tsconfig.json b/types/buffer-compare/tsconfig.json index 76638cae6e..0c58396698 100644 --- a/types/buffer-compare/tsconfig.json +++ b/types/buffer-compare/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/buffer-equal/tsconfig.json b/types/buffer-equal/tsconfig.json index 5576be8e43..d6b1d1f588 100644 --- a/types/buffer-equal/tsconfig.json +++ b/types/buffer-equal/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/buffers/tsconfig.json b/types/buffers/tsconfig.json index 148f3d1dbb..26bb76ee44 100644 --- a/types/buffers/tsconfig.json +++ b/types/buffers/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bufferstream/tsconfig.json b/types/bufferstream/tsconfig.json index 000bd2d09c..be892dede3 100644 --- a/types/bufferstream/tsconfig.json +++ b/types/bufferstream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bull/bull-tests.tsx b/types/bull/bull-tests.tsx index cbdcc83e0a..765be54733 100644 --- a/types/bull/bull-tests.tsx +++ b/types/bull/bull-tests.tsx @@ -2,8 +2,8 @@ * Created by Bruno Grieder */ -import * as Redis from "ioredis"; -import * as Queue from "bull"; +import Redis = require("ioredis"); +import Queue = require("bull"); const videoQueue = new Queue('video transcoding', 'redis://127.0.0.1:6379'); const audioQueue = new Queue('audio transcoding', {redis: {port: 6379, host: '127.0.0.1'}}); // Specify Redis connection using object diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index 28070ad44f..6cc4f5ed1d 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -228,11 +228,11 @@ declare namespace Bull { } interface JobCounts { - wait: number; active: number; completed: number; failed: number; delayed: number; + waiting: number; } interface JobInformation { @@ -384,21 +384,27 @@ declare namespace Bull { /** * Returns a promise that resolves when the queue is paused. - * The pause is global, meaning that all workers in all queue instances for a given queue will be paused. - * A paused queue will not process new jobs until resumed, - * but current jobs being processed will continue until they are finalized. + * + * A paused queue will not process new jobs until resumed, but current jobs being processed will continue until + * they are finalized. The pause can be either global or local. If global, all workers in all queue instances + * for a given queue will be paused. If local, just this worker will stop processing new jobs after the current + * lock expires. This can be useful to stop a worker from taking new jobs prior to shutting down. * * Pausing a queue that is already paused does nothing. */ - pause(): Promise; + pause(isLocal?: boolean): Promise; /** * Returns a promise that resolves when the queue is resumed after being paused. - * The resume is global, meaning that all workers in all queue instances for a given queue will be resumed. + * + * The resume can be either local or global. If global, all workers in all queue instances for a given queue + * will be resumed. If local, only this worker will be resumed. Note that resuming a queue globally will not + * resume workers that have been paused locally; for those, resume(true) must be called directly on their + * instances. * * Resuming a queue that is not paused does nothing. */ - resume(): Promise; + resume(isLocal?: boolean): Promise; /** * Returns a promise that returns the number of jobs in the queue, waiting or paused. @@ -445,6 +451,11 @@ declare namespace Bull { */ getFailed(start?: number, end?: number): Promise; + /** + * Returns a promise that will return an array with the waiting jobs between start and end. + */ + getWaiting(start?: number, end?: number): Promise; + /** * Returns JobInformation of repeatable jobs (ordered descending). Provide a start and/or an end * index to limit the number of results. Start defaults to 0, end to -1 and asc to false. diff --git a/types/bull/tsconfig.json b/types/bull/tsconfig.json index 3ce6f08792..6027d4730a 100644 --- a/types/bull/tsconfig.json +++ b/types/bull/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bull/v2/bull-tests.tsx b/types/bull/v2/bull-tests.tsx index fcf339b3c3..e6c82fe4f9 100644 --- a/types/bull/v2/bull-tests.tsx +++ b/types/bull/v2/bull-tests.tsx @@ -2,7 +2,7 @@ * Created by Bruno Grieder */ -import * as Queue from "bull" +import Queue = require("bull"); var videoQueue = Queue( 'video transcoding', 6379, '127.0.0.1' ); var audioQueue = Queue( 'audio transcoding', 6379, '127.0.0.1' ); diff --git a/types/bull/v2/tsconfig.json b/types/bull/v2/tsconfig.json index c0b2369568..980cf8d0cf 100644 --- a/types/bull/v2/tsconfig.json +++ b/types/bull/v2/tsconfig.json @@ -22,7 +22,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bump-regex/tsconfig.json b/types/bump-regex/tsconfig.json index 001effea6a..404f062975 100644 --- a/types/bump-regex/tsconfig.json +++ b/types/bump-regex/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "bump-regex-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/bunnymq/tsconfig.json b/types/bunnymq/tsconfig.json index d1a470e451..10ba808afe 100644 --- a/types/bunnymq/tsconfig.json +++ b/types/bunnymq/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bunyan-blackhole/tsconfig.json b/types/bunyan-blackhole/tsconfig.json index 0266e86bae..21feb4a051 100644 --- a/types/bunyan-blackhole/tsconfig.json +++ b/types/bunyan-blackhole/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bunyan-bugsnag/bunyan-bugsnag-tests.ts b/types/bunyan-bugsnag/bunyan-bugsnag-tests.ts index 3c46089690..39a4c14cf5 100644 --- a/types/bunyan-bugsnag/bunyan-bugsnag-tests.ts +++ b/types/bunyan-bugsnag/bunyan-bugsnag-tests.ts @@ -1,4 +1,4 @@ -import * as bunyanBugsnag from 'bunyan-bugsnag'; +import bunyanBugsnag = require('bunyan-bugsnag'); import * as bunyan from 'bunyan'; const stream1 = bunyanBugsnag(); diff --git a/types/bunyan-bugsnag/tsconfig.json b/types/bunyan-bugsnag/tsconfig.json index 1910cbaf79..ddfbaa92ab 100644 --- a/types/bunyan-bugsnag/tsconfig.json +++ b/types/bunyan-bugsnag/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bunyan-config/tsconfig.json b/types/bunyan-config/tsconfig.json index 7866deb22e..818c7dad3f 100644 --- a/types/bunyan-config/tsconfig.json +++ b/types/bunyan-config/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bunyan-format/tsconfig.json b/types/bunyan-format/tsconfig.json index c26359cdb6..a40e9a48e5 100644 --- a/types/bunyan-format/tsconfig.json +++ b/types/bunyan-format/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "bunyan-format-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/bunyan-logentries/tsconfig.json b/types/bunyan-logentries/tsconfig.json index f367f2fff8..0f9234b499 100644 --- a/types/bunyan-logentries/tsconfig.json +++ b/types/bunyan-logentries/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bunyan-prettystream/tsconfig.json b/types/bunyan-prettystream/tsconfig.json index ac589169ba..8cbd62ba10 100644 --- a/types/bunyan-prettystream/tsconfig.json +++ b/types/bunyan-prettystream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bunyan-winston-adapter/tsconfig.json b/types/bunyan-winston-adapter/tsconfig.json index 7278f5ac72..44b0bf2a41 100644 --- a/types/bunyan-winston-adapter/tsconfig.json +++ b/types/bunyan-winston-adapter/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bunyan/tsconfig.json b/types/bunyan/tsconfig.json index 290ffc3a6d..dfda2cef0e 100644 --- a/types/bunyan/tsconfig.json +++ b/types/bunyan/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/busboy/busboy-tests.ts b/types/busboy/busboy-tests.ts index 24291621a5..309572a37c 100644 --- a/types/busboy/busboy-tests.ts +++ b/types/busboy/busboy-tests.ts @@ -1,4 +1,4 @@ -import * as Busboy from 'busboy'; +import Busboy = require('busboy'); import * as http from 'http'; import * as util from 'util'; diff --git a/types/busboy/tsconfig.json b/types/busboy/tsconfig.json index 6e60377b23..8e894f9794 100644 --- a/types/busboy/tsconfig.json +++ b/types/busboy/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/business-rules-engine/tsconfig.json b/types/business-rules-engine/tsconfig.json index 385150055b..5a5b7469c1 100644 --- a/types/business-rules-engine/tsconfig.json +++ b/types/business-rules-engine/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bwip-js/bwip-js-tests.ts b/types/bwip-js/bwip-js-tests.ts index 29cc419d2c..d016b81ae5 100644 --- a/types/bwip-js/bwip-js-tests.ts +++ b/types/bwip-js/bwip-js-tests.ts @@ -1,4 +1,4 @@ -import * as bwipjs from 'bwip-js'; +import bwipjs = require('bwip-js'); import * as http from 'http'; import * as fs from 'fs'; diff --git a/types/bwip-js/tsconfig.json b/types/bwip-js/tsconfig.json index c421a4a7b6..8695c19f9f 100644 --- a/types/bwip-js/tsconfig.json +++ b/types/bwip-js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/byline/tsconfig.json b/types/byline/tsconfig.json index f21fc8983d..d4322a5534 100644 --- a/types/byline/tsconfig.json +++ b/types/byline/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bytebuffer/tsconfig.json b/types/bytebuffer/tsconfig.json index 5fdc833e9b..580d7bc39a 100644 --- a/types/bytebuffer/tsconfig.json +++ b/types/bytebuffer/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/bytes/tsconfig.json b/types/bytes/tsconfig.json index 4de1fdb57a..b541397abf 100644 --- a/types/bytes/tsconfig.json +++ b/types/bytes/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/c3/c3-tests.ts b/types/c3/c3-tests.ts index c449235fba..7ac2f0ccd8 100644 --- a/types/c3/c3-tests.ts +++ b/types/c3/c3-tests.ts @@ -1882,6 +1882,23 @@ function tooltip_order() { }); } +function tooltip_order_function() { + const chart = c3.generate({ + data: { + columns: [ + ["data1", 30, 200, 100, 400, 150, 250], + ["data2", 50, 20, 10, 40, 15, 25] + ] + }, + tooltip: { + order: (data1, data2) => { + return data1.id - data2.id; + // return data2.id - data2.id in case we want desc order + } + } + }); +} + //////////////////////// // Chart options Tests //////////////////////// diff --git a/types/c3/index.d.ts b/types/c3/index.d.ts index ccbbab7d7f..d68027f7d5 100644 --- a/types/c3/index.d.ts +++ b/types/c3/index.d.ts @@ -744,8 +744,9 @@ export interface TooltipOptions { contents?(data: any, defaultTitleFormat: string, defaultValueFormat: string, color: any): string; /** * Set tooltip values order + * Available Values: desc, asc, any[], function (data1, data2) { ... }, null */ - order?: string | any[] | ((data: Data) => boolean); + order?: string | any[] | ((data1: any, data2: any) => number) | null; } export interface SubchartOptions { diff --git a/types/c3/tsconfig.json b/types/c3/tsconfig.json index fe3b00c503..6ec75e8352 100644 --- a/types/c3/tsconfig.json +++ b/types/c3/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cache-manager/tsconfig.json b/types/cache-manager/tsconfig.json index f754de4a67..68cda85b6b 100644 --- a/types/cache-manager/tsconfig.json +++ b/types/cache-manager/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cal-heatmap/tsconfig.json b/types/cal-heatmap/tsconfig.json index ff8d65a2e2..b803ce055b 100644 --- a/types/cal-heatmap/tsconfig.json +++ b/types/cal-heatmap/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/callsite/tsconfig.json b/types/callsite/tsconfig.json index 473c5c08fd..3210df01f9 100644 --- a/types/callsite/tsconfig.json +++ b/types/callsite/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/callsites/tsconfig.json b/types/callsites/tsconfig.json index 010199b740..6551532b88 100644 --- a/types/callsites/tsconfig.json +++ b/types/callsites/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/calq/tsconfig.json b/types/calq/tsconfig.json index 595f095f74..cecaa097cd 100644 --- a/types/calq/tsconfig.json +++ b/types/calq/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/camelcase-keys/tsconfig.json b/types/camelcase-keys/tsconfig.json index f99870f8d9..0774991702 100644 --- a/types/camelcase-keys/tsconfig.json +++ b/types/camelcase-keys/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/camelcase/tsconfig.json b/types/camelcase/tsconfig.json index bcc1b505e1..28d8446c42 100644 --- a/types/camelcase/tsconfig.json +++ b/types/camelcase/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/camljs/tsconfig.json b/types/camljs/tsconfig.json index 5fbe5605e9..ed88508fc3 100644 --- a/types/camljs/tsconfig.json +++ b/types/camljs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/camo/tsconfig.json b/types/camo/tsconfig.json index 46a6a2814c..089ef0623c 100644 --- a/types/camo/tsconfig.json +++ b/types/camo/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cancan/tsconfig.json b/types/cancan/tsconfig.json index 8aace9dd52..f746eff819 100644 --- a/types/cancan/tsconfig.json +++ b/types/cancan/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "cancan-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/cannon/tsconfig.json b/types/cannon/tsconfig.json index ca5618a8a0..b75a303b0c 100644 --- a/types/cannon/tsconfig.json +++ b/types/cannon/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/canvas-gauges/tsconfig.json b/types/canvas-gauges/tsconfig.json index 07055c34bb..88a7c53ae5 100644 --- a/types/canvas-gauges/tsconfig.json +++ b/types/canvas-gauges/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/canvasjs/tsconfig.json b/types/canvasjs/tsconfig.json index 57f76052a9..3d14bb3e07 100644 --- a/types/canvasjs/tsconfig.json +++ b/types/canvasjs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/capitalize/tsconfig.json b/types/capitalize/tsconfig.json index 463b6ca645..14a386e76d 100644 --- a/types/capitalize/tsconfig.json +++ b/types/capitalize/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/card-validator/tsconfig.json b/types/card-validator/tsconfig.json index 685e0c4bbe..cc89881539 100644 --- a/types/card-validator/tsconfig.json +++ b/types/card-validator/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/case-sensitive-paths-webpack-plugin/tsconfig.json b/types/case-sensitive-paths-webpack-plugin/tsconfig.json index b8cb05390a..bddcd8721e 100644 --- a/types/case-sensitive-paths-webpack-plugin/tsconfig.json +++ b/types/case-sensitive-paths-webpack-plugin/tsconfig.json @@ -14,10 +14,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ "index.d.ts", "case-sensitive-paths-webpack-plugin-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/caseless/tsconfig.json b/types/caseless/tsconfig.json index c7dace4424..c153bc58d3 100644 --- a/types/caseless/tsconfig.json +++ b/types/caseless/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "caseless-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/cash/tsconfig.json b/types/cash/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/cash/tsconfig.json +++ b/types/cash/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/casperjs/tsconfig.json b/types/casperjs/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/casperjs/tsconfig.json +++ b/types/casperjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/cassandra-driver/tsconfig.json b/types/cassandra-driver/tsconfig.json index e47bfd4444..5f7dffd9f9 100644 --- a/types/cassandra-driver/tsconfig.json +++ b/types/cassandra-driver/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/catalog/catalog-tests.tsx b/types/catalog/catalog-tests.tsx new file mode 100644 index 0000000000..c77c0c1667 --- /dev/null +++ b/types/catalog/catalog-tests.tsx @@ -0,0 +1,42 @@ +import * as React from "react"; +import { Config, render, markdown, Catalog, ReactSpecimen, Page } from "catalog"; + +const config: Config = { + title: 'Test', + pages: [ + { + path: '/', + title: 'Introduction', + content: '/patd/to/file.md', + }, + { + path: '/materials', + title: 'Materials', + pages: [ + { + path: '/materials/typeface', + title: 'Typeface', + component: , + }, + ], + }, + ], + useBrowserHistory: true, + basePath: '/doc', + responsiveSizes: [ + { name: 'large', width: 978, height: 1100 }, + { name: 'medium', width: 640, height: 900 }, + { name: 'small', width: 471, height: 700 }, + ], +}; + +render(config, document.body); +; + +markdown` +# Test + +${ +
+} +`; diff --git a/types/catalog/index.d.ts b/types/catalog/index.d.ts new file mode 100644 index 0000000000..515008d7de --- /dev/null +++ b/types/catalog/index.d.ts @@ -0,0 +1,108 @@ +// Type definitions for catalog 2.1 +// Project: https://github.com/interactivethings/catalog/ +// Definitions by: Peter Gassner , Tomas Carnecky +// Definitions: https://github.com/interactivethings/catalog/ +// TypeScript Version: 2.3 + +import * as React from "react"; + +// Configuration + +// XXX: Can not name this 'Page' because there's already a 'Page' +// component here. +export interface ConfigPage { + path: string; + title: string; + + content?: any; + component?: any; + pages?: ConfigPage[]; +} + +export interface ConfigResponsiveSize { + name: string; + width: number; + height: number; +} + +export interface Config { + title: string; + pages: ConfigPage[]; + + useBrowserHistory?: boolean; + basePath?: string; + responsiveSizes?: ConfigResponsiveSize[]; +} + +export function render(config: Config, element: HTMLElement): void; +export function configure(config: any): any; +export function configureRoutes(config: any): any; +export function configureJSXRoutes(config: any): any; + +export function pageLoader(f: () => Promise): any; +export function markdown(...x: any[]): JSX.Element; + +// Components +export interface DefaultCatalogProps extends React.Props<{}> { + span?: number; + theme?: any; +} + +export class Card extends React.Component {} +export class Page extends React.Component {} +export interface SpanProps extends DefaultCatalogProps { + style?: any; +} +export class Span extends React.Component {} + +// Specimens +export class AudioSpecimen extends React.Component {} + +export interface CodeSpecimenProps extends DefaultCatalogProps { + rawBody: string; + collapsed: boolean; + lang: string; + raw: boolean; +} +export class CodeSpecimen extends React.Component {} + +export interface ColorSpecimenProps extends DefaultCatalogProps { + value: string; + name: string; +} +export class ColorSpecimen extends React.Component {} + +export interface ColorPaletteSpecimenProps extends DefaultCatalogProps { + colors: Array<{name?: string, value: string}>; + horizontal?: boolean; +} +export class ColorPaletteSpecimen extends React.Component {} + +export class HtmlSpecimen extends React.Component {} +export class HintSpecimen extends React.Component {} +export class ImageSpecimen extends React.Component {} + +export interface TypeSpecimenProps extends DefaultCatalogProps { + color?: string; + font: string; + headings: string[] | number[]; + style?: string; + weight: string; +} +export class TypeSpecimen extends React.Component {} +export class DownloadSpecimen extends React.Component {} + +export interface ReactSpecimenProps extends DefaultCatalogProps { + noSource?: boolean; + plain?: boolean; + light?: boolean; + dark?: boolean; + frame?: boolean; + state?: any; + responsive?: boolean | string | string[]; +} +export class ReactSpecimen extends React.Component {} + +export class VideoSpecimen extends React.Component {} + +export class Catalog extends React.Component {} diff --git a/types/catalog/tsconfig.json b/types/catalog/tsconfig.json new file mode 100644 index 0000000000..00e00ca7a7 --- /dev/null +++ b/types/catalog/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "catalog-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/catalog/tslint.json b/types/catalog/tslint.json new file mode 100644 index 0000000000..b4b47a0378 --- /dev/null +++ b/types/catalog/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/catbox/tsconfig.json b/types/catbox/tsconfig.json index 16f6fb780e..424dece7ec 100644 --- a/types/catbox/tsconfig.json +++ b/types/catbox/tsconfig.json @@ -14,13 +14,16 @@ ], "types": [], "paths": { - "boom": ["boom/v4"] + "boom": [ + "boom/v4" + ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "catbox-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/cbor/tsconfig.json b/types/cbor/tsconfig.json index 199ead141d..1211823d22 100644 --- a/types/cbor/tsconfig.json +++ b/types/cbor/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ccap/ccap-tests.ts b/types/ccap/ccap-tests.ts index 12a38a9f60..111fa2f457 100644 --- a/types/ccap/ccap-tests.ts +++ b/types/ccap/ccap-tests.ts @@ -1,4 +1,4 @@ -import * as ccap from 'ccap'; +import ccap = require('ccap'); const captcha1 = ccap(); diff --git a/types/ccap/tsconfig.json b/types/ccap/tsconfig.json index e4fa68a956..a043df5754 100644 --- a/types/ccap/tsconfig.json +++ b/types/ccap/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-arrays/tsconfig.json b/types/chai-arrays/tsconfig.json index 84b3de823b..f1d8d90394 100644 --- a/types/chai-arrays/tsconfig.json +++ b/types/chai-arrays/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-as-promised/tsconfig.json b/types/chai-as-promised/tsconfig.json index 2d1a15b6eb..002750f2df 100644 --- a/types/chai-as-promised/tsconfig.json +++ b/types/chai-as-promised/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-datetime/tsconfig.json b/types/chai-datetime/tsconfig.json index 93d28d082f..be6e164724 100644 --- a/types/chai-datetime/tsconfig.json +++ b/types/chai-datetime/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-dom/chai-dom-tests.ts b/types/chai-dom/chai-dom-tests.ts index 61b3b3c600..2cc7b0f232 100644 --- a/types/chai-dom/chai-dom-tests.ts +++ b/types/chai-dom/chai-dom-tests.ts @@ -1,5 +1,5 @@ import * as chai from 'chai'; -import * as chaiDom from 'chai-dom'; +import chaiDom = require('chai-dom'); chai.use(chaiDom); var expect = chai.expect; diff --git a/types/chai-dom/tsconfig.json b/types/chai-dom/tsconfig.json index 8840510c78..e6c3147faf 100644 --- a/types/chai-dom/tsconfig.json +++ b/types/chai-dom/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-enzyme/chai-enzyme-tests.tsx b/types/chai-enzyme/chai-enzyme-tests.tsx index 4b88d077aa..70cd34f2fd 100644 --- a/types/chai-enzyme/chai-enzyme-tests.tsx +++ b/types/chai-enzyme/chai-enzyme-tests.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import * as chaiEnzyme from "chai-enzyme"; +import chaiEnzyme = require("chai-enzyme"); import { expect } from "chai"; import { shallow } from "enzyme"; diff --git a/types/chai-enzyme/tsconfig.json b/types/chai-enzyme/tsconfig.json index 4b7cdcf075..0beb02ded3 100644 --- a/types/chai-enzyme/tsconfig.json +++ b/types/chai-enzyme/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/chai-fuzzy/tsconfig.json b/types/chai-fuzzy/tsconfig.json index c6254dc8d8..13b8041e55 100644 --- a/types/chai-fuzzy/tsconfig.json +++ b/types/chai-fuzzy/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-http/tsconfig.json b/types/chai-http/tsconfig.json index 3554b4ab09..0f73b862cd 100644 --- a/types/chai-http/tsconfig.json +++ b/types/chai-http/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-jest-snapshot/tsconfig.json b/types/chai-jest-snapshot/tsconfig.json index ae15eb95a0..d466996d29 100644 --- a/types/chai-jest-snapshot/tsconfig.json +++ b/types/chai-jest-snapshot/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-jquery/tsconfig.json b/types/chai-jquery/tsconfig.json index b26a07d06d..b7a09dd6fd 100644 --- a/types/chai-jquery/tsconfig.json +++ b/types/chai-jquery/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-json-schema/tsconfig.json b/types/chai-json-schema/tsconfig.json index 9c8408ae05..fe54d634bf 100644 --- a/types/chai-json-schema/tsconfig.json +++ b/types/chai-json-schema/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-oequal/tsconfig.json b/types/chai-oequal/tsconfig.json index 0e63915d75..a2f5f9697e 100644 --- a/types/chai-oequal/tsconfig.json +++ b/types/chai-oequal/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-spies/tsconfig.json b/types/chai-spies/tsconfig.json index a439cf07a4..0125b21a90 100644 --- a/types/chai-spies/tsconfig.json +++ b/types/chai-spies/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-string/chai-string-tests.ts b/types/chai-string/chai-string-tests.ts index 615a6c1f95..dc798c102a 100644 --- a/types/chai-string/chai-string-tests.ts +++ b/types/chai-string/chai-string-tests.ts @@ -51,6 +51,90 @@ describe('chai-string', function() { }); + + describe('#containIgnoreSpaces', function () { + + it('should return true', function () { + var str1 = '1234abcdef56', + str2 = '1234a\nb\tc\r d ef56'; + str1.should.containIgnoreSpaces(str2); + }); + + it('should return true (2)', function () { + var str1 = 'abcdef', + str2 = 'a\nb\tc\r d ef'; + str1.should.containIgnoreSpaces(str2); + }); + + it('should return false', function () { + var str1 = 'abdef', + str2 = 'a\nb\tc\r d ef'; + str1.should.not.containIgnoreSpaces(str2); + }); + }); + + describe('#containIgnoreCase', function () { + + it('should return true', function () { + var str1 = 'abcdef', + str2 = 'cDe'; + str1.should.containIgnoreCase(str2); + }); + + it('should return true (2)', function () { + 'abcdef'.should.containIgnoreCase('cDe'); + }); + + it('should return true (3)', function () { + var str1 = 'abcdef', + str2 = 'AbCdeF'; + str1.should.containIgnoreCase(str2); + }); + + it('should return false', function () { + var str1 = 'abcdef', + str2 = 'efg'; + str1.should.not.containIgnoreCase(str2); + }); + + it('should return false (3)', function () { + var str1 = 'abcdef', + str2 = 'zabcd'; + str1.should.not.containIgnoreCase(str2); + }); + }); + + describe('#indexOf', function () { + + it('should return true', function () { + var str = 'abcabd', + substr = 'ab', + index = 0; + str.indexOf(substr, index).should.be.true; + }); + + it('should return true (2)', function () { + var str = 'abcabd', + substr = 'ca', + index = 2; + str.indexOf(substr, index).should.be.true; + }); + + it('should return true (3)', function () { + var str = 'ababab', + substr = 'ba', + index = 1; + str.indexOf(substr, index).should.be.true; + }); + + it('should return false', function () { + var str = 'abcaab', + substr = 'da', + index = 1; + str.indexOf(substr, index).should.be.false; + }); + }); + describe('tdd alias', function() { let str: string; let str2: string; @@ -92,6 +176,14 @@ describe('chai-string', function() { assert.notEqualIgnoreSpaces(str, str2 + 'g'); }); + it('.containIgnoreSpaces', function () { + assert.containIgnoreSpaces(str, str2); + }); + + it('.notContainIgnoreSpaces', function () { + assert.notContainIgnoreSpaces(str, str2 + 'g'); + }); + it('.singleLine', function() { assert.singleLine(str); }); @@ -125,5 +217,13 @@ describe('chai-string', function() { assert.entriesCount('', 'ab', 0); }); + it('.indexOf', function () { + assert.indexOf('abcabd', 'ab', 0); + assert.indexOf('abcabd', 'ca', 2); + assert.indexOf('ababab', 'ba', 1); + assert.indexOf('ababab', 'ba', 1); + 'ababab'.indexOf('ba', 1).should.be.true; + }); + }); }); diff --git a/types/chai-string/index.d.ts b/types/chai-string/index.d.ts index fad380cf07..bc990104be 100644 --- a/types/chai-string/index.d.ts +++ b/types/chai-string/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for chai-string 1.1.4 +// Type definitions for chai-string 1.4.0 // Project: https://github.com/onechiporenko/chai-string // Definitions by: Nick Malaguti // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -14,10 +14,13 @@ declare global { endWith(expected: string, message?: string): Assertion; equalIgnoreCase(expected: string, message?: string): Assertion; equalIgnoreSpaces(expected: string, message?: string): Assertion; + containIgnoreCase(expected: string, msg?: string): Assertion; + containIgnoreSpaces(expected: string, msg?: string): Assertion; singleLine(message?: string): Assertion; reverseOf(message?: string): Assertion; palindrome(message?: string): Assertion; entriesCount(substr: string, expected: number, message?: string): Assertion; + indexOf(str: string, substr: string, index: number, msg?: string): Assertion; } interface Assert { @@ -29,6 +32,10 @@ declare global { notEqualIgnoreCase(val: string, exp: string, msg?: string): void; equalIgnoreSpaces(val: string, exp: string, msg?: string): void; notEqualIgnoreSpaces(val: string, exp: string, msg?: string): void; + containIgnoreCase(val: string, exp: string, msg?: string): void; + notContainIgnoreCase(val: string, exp: string, msg?: string): void; + containIgnoreSpaces(val: string, exp: string, msg?: string): void; + notContainIgnoreSpaces(val: string, exp: string, msg?: string): void; singleLine(val: string, msg?: string): void; notSingleLine(val: string, msg?: string): void; reverseOf(val: string, exp: string, msg?: string): void; @@ -36,6 +43,7 @@ declare global { palindrome(val: string, msg?: string): void; notPalindrome(val: string, msg?: string): void; entriesCount(str: string, substr: string, count: number, msg?: string): void; + indexOf(str: string, substr: string, index: number, msg?: string): void; } } } diff --git a/types/chai-string/tsconfig.json b/types/chai-string/tsconfig.json index 1227af23ab..bfea2831a3 100644 --- a/types/chai-string/tsconfig.json +++ b/types/chai-string/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-subset/tsconfig.json b/types/chai-subset/tsconfig.json index c79fad5e82..3c4fceea1e 100644 --- a/types/chai-subset/tsconfig.json +++ b/types/chai-subset/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-things/tsconfig.json b/types/chai-things/tsconfig.json index 84e31abe2f..451820be5f 100644 --- a/types/chai-things/tsconfig.json +++ b/types/chai-things/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-webdriverio/tsconfig.json b/types/chai-webdriverio/tsconfig.json index c44958af89..6f99050ed5 100644 --- a/types/chai-webdriverio/tsconfig.json +++ b/types/chai-webdriverio/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai-xml/tsconfig.json b/types/chai-xml/tsconfig.json index 95a0d68969..5c6cb3e360 100644 --- a/types/chai-xml/tsconfig.json +++ b/types/chai-xml/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chai/tsconfig.json b/types/chai/tsconfig.json index 4e0c687060..eb0c557006 100644 --- a/types/chai/tsconfig.json +++ b/types/chai/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/chai/v2/tsconfig.json b/types/chai/v2/tsconfig.json index 927a017f3d..e2efdb7c51 100644 --- a/types/chai/v2/tsconfig.json +++ b/types/chai/v2/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/chance/tsconfig.json b/types/chance/tsconfig.json index f05e6076cc..660b15aed2 100644 --- a/types/chance/tsconfig.json +++ b/types/chance/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/change-emitter/tsconfig.json b/types/change-emitter/tsconfig.json index 208441aafa..e0c6ea9a00 100644 --- a/types/change-emitter/tsconfig.json +++ b/types/change-emitter/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/charm/tsconfig.json b/types/charm/tsconfig.json index 40eba0a076..8e481fdee8 100644 --- a/types/charm/tsconfig.json +++ b/types/charm/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/charset/tsconfig.json b/types/charset/tsconfig.json index 52652c8e44..089cfffc1c 100644 --- a/types/charset/tsconfig.json +++ b/types/charset/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "charset-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/chart.js/chart.js-tests.ts b/types/chart.js/chart.js-tests.ts index 8d2190478f..8ba81e8747 100644 --- a/types/chart.js/chart.js-tests.ts +++ b/types/chart.js/chart.js-tests.ts @@ -1,4 +1,4 @@ -import { Chart, ChartData } from 'chart.js'; +import { Chart, ChartData, Point } from 'chart.js'; // alternative: // import chartjs = require('chart.js'); @@ -65,3 +65,11 @@ if (chart.chartArea) { console.log(chart.chartArea.bottom); console.log(chart.chartArea.left); } + +// http://www.chartjs.org/docs/latest/configuration/tooltip.html#position-modes +Chart.Tooltip.positioners.custom = (elements: any[], eventPosition: Point) => { + return { + x: eventPosition.x, + y: eventPosition.y + 10 + }; +}; diff --git a/types/chart.js/index.d.ts b/types/chart.js/index.d.ts index db20617c2d..9a8269bee4 100644 --- a/types/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -44,6 +44,9 @@ declare class Chart { static controllers: { [key: string]: any; }; + + // Tooltip Static Options + static Tooltip: Chart.ChartTooltipsStaticConfiguration; } declare class PluginServiceStatic { register(plugin: PluginServiceRegistrationOptions): void; @@ -268,13 +271,19 @@ declare namespace Chart { callbacks?: ChartTooltipCallback; filter?(item: ChartTooltipItem): boolean; itemSort?(itemA: ChartTooltipItem, itemB: ChartTooltipItem): number; - position?: "average"|"nearest"; + position?: string; caretPadding?: number; displayColors?: boolean; borderColor?: ChartColor; borderWidth?: number; } + interface ChartTooltipsStaticConfiguration { + positioners: {[mode: string]: ChartTooltipPositioner}; + } + + type ChartTooltipPositioner = (elements: any[], eventPosition: Point) => Point; + interface ChartHoverOptions { mode?: string; animationDuration?: number; @@ -561,6 +570,11 @@ declare namespace Chart { pointLabels?: PointLabelOptions; ticks?: TickOptions; } + + interface Point { + x: number; + y: number; + } } export = Chart; diff --git a/types/chart.js/tsconfig.json b/types/chart.js/tsconfig.json index 3b5b6bffed..eb4278aa82 100644 --- a/types/chart.js/tsconfig.json +++ b/types/chart.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chartist/tsconfig.json b/types/chartist/tsconfig.json index afe951be86..d4b563655d 100644 --- a/types/chartist/tsconfig.json +++ b/types/chartist/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chayns/tsconfig.json b/types/chayns/tsconfig.json index 4ac301174a..b5b318b647 100644 --- a/types/chayns/tsconfig.json +++ b/types/chayns/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/check-sum/tsconfig.json b/types/check-sum/tsconfig.json index 5d2955a50f..655aac3937 100644 --- a/types/check-sum/tsconfig.json +++ b/types/check-sum/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/check-types/tsconfig.json b/types/check-types/tsconfig.json index d3c89a7ac7..95a7ed6992 100644 --- a/types/check-types/tsconfig.json +++ b/types/check-types/tsconfig.json @@ -1,21 +1,24 @@ { - "compilerOptions": { - "module": "commonjs", - "lib": ["es6"], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "check-types-tests.ts" - ] + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "check-types-tests.ts" + ] } \ No newline at end of file diff --git a/types/checkstyle-formatter/tsconfig.json b/types/checkstyle-formatter/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/checkstyle-formatter/tsconfig.json +++ b/types/checkstyle-formatter/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/checksum/tsconfig.json b/types/checksum/tsconfig.json index 21e5de17ab..7ef760cb8b 100644 --- a/types/checksum/tsconfig.json +++ b/types/checksum/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cheerio/cheerio-tests.ts b/types/cheerio/cheerio-tests.ts index 1a9821a6bb..d686951213 100644 --- a/types/cheerio/cheerio-tests.ts +++ b/types/cheerio/cheerio-tests.ts @@ -1,6 +1,4 @@ - - -import * as cheerio from 'cheerio'; +import cheerio = require('cheerio'); /* * LOADING diff --git a/types/cheerio/tsconfig.json b/types/cheerio/tsconfig.json index 63c3aed57c..772ae1fb47 100644 --- a/types/cheerio/tsconfig.json +++ b/types/cheerio/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chmodr/tsconfig.json b/types/chmodr/tsconfig.json index 44e07784ac..a5832362a1 100644 --- a/types/chmodr/tsconfig.json +++ b/types/chmodr/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chocolatechipjs/tsconfig.json b/types/chocolatechipjs/tsconfig.json index d56dd67e2d..158cf322ee 100644 --- a/types/chocolatechipjs/tsconfig.json +++ b/types/chocolatechipjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chokidar/tsconfig.json b/types/chokidar/tsconfig.json index 77a34a3964..b425370a98 100644 --- a/types/chokidar/tsconfig.json +++ b/types/chokidar/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chosen-js/tsconfig.json b/types/chosen-js/tsconfig.json index 9f4ce049cb..64efa066d5 100644 --- a/types/chosen-js/tsconfig.json +++ b/types/chosen-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chownr/tsconfig.json b/types/chownr/tsconfig.json index 7b20bfde66..9a71fc1aa4 100644 --- a/types/chownr/tsconfig.json +++ b/types/chownr/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chroma-js/tsconfig.json b/types/chroma-js/tsconfig.json index af142ac45e..efa5a84ce3 100644 --- a/types/chroma-js/tsconfig.json +++ b/types/chroma-js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chroma-js/v0/tsconfig.json b/types/chroma-js/v0/tsconfig.json index 93226eedaf..2b91bad45b 100644 --- a/types/chroma-js/v0/tsconfig.json +++ b/types/chroma-js/v0/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index 3d85d3be14..cd12179213 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -6050,6 +6050,12 @@ declare namespace chrome.tabs { * @since Chrome 39. */ matchAboutBlank?: boolean; + /** + * Optional. The origin of the CSS to inject. This may only be specified for CSS, not JavaScript. Defaults to "author". + * One of: "author", or "user" + * @since Chrome 66. + */ + cssOrigin?: string; } export interface CreateProperties { diff --git a/types/chrome/tsconfig.json b/types/chrome/tsconfig.json index 57e4524e5a..96b0958f3b 100644 --- a/types/chrome/tsconfig.json +++ b/types/chrome/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -26,4 +27,4 @@ "test/chrome-app.ts", "test/chrome-webview.ts" ] -} +} \ No newline at end of file diff --git a/types/chui/tsconfig.json b/types/chui/tsconfig.json index 5463478868..49c70bca09 100644 --- a/types/chui/tsconfig.json +++ b/types/chui/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/circular-json/tsconfig.json b/types/circular-json/tsconfig.json index 65bd131757..b64620dc44 100644 --- a/types/circular-json/tsconfig.json +++ b/types/circular-json/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ckeditor/tsconfig.json b/types/ckeditor/tsconfig.json index e845e96c0a..5d44d8a447 100644 --- a/types/ckeditor/tsconfig.json +++ b/types/ckeditor/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/clamp-js-main/tsconfig.json b/types/clamp-js-main/tsconfig.json index 5c05321afc..716247df25 100644 --- a/types/clamp-js-main/tsconfig.json +++ b/types/clamp-js-main/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "clamp-js-main-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/clamp-js/tsconfig.json b/types/clamp-js/tsconfig.json index d858957f4b..3df9b8641f 100644 --- a/types/clamp-js/tsconfig.json +++ b/types/clamp-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/classnames/tsconfig.json b/types/classnames/tsconfig.json index f9b03432fc..2e41facc15 100644 --- a/types/classnames/tsconfig.json +++ b/types/classnames/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cldrjs/tsconfig.json b/types/cldrjs/tsconfig.json index b17ea4c0a9..9ae399aafb 100644 --- a/types/cldrjs/tsconfig.json +++ b/types/cldrjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/clean-css/tsconfig.json b/types/clean-css/tsconfig.json index fe65b21c11..0d5b17fb3b 100644 --- a/types/clean-css/tsconfig.json +++ b/types/clean-css/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/clean-stack/tsconfig.json b/types/clean-stack/tsconfig.json index e1fa33ac6c..e4e4814fe9 100644 --- a/types/clean-stack/tsconfig.json +++ b/types/clean-stack/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/clean-webpack-plugin/tsconfig.json b/types/clean-webpack-plugin/tsconfig.json index 2f342b4d42..c53b713f88 100644 --- a/types/clean-webpack-plugin/tsconfig.json +++ b/types/clean-webpack-plugin/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "clean-webpack-plugin-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/clear-require/tsconfig.json b/types/clear-require/tsconfig.json index 538fbe385e..806bd7fc11 100644 --- a/types/clear-require/tsconfig.json +++ b/types/clear-require/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cleave.js/index.d.ts b/types/cleave.js/index.d.ts index 27fe7d8c41..eae6bc75b9 100644 --- a/types/cleave.js/index.d.ts +++ b/types/cleave.js/index.d.ts @@ -1,6 +1,8 @@ -// Type definitions for cleave.js 1.0 +// Type definitions for cleave.js 1.1 // Project: https://github.com/nosir/cleave.js -// Definitions by: C Lentfort , J Giancono +// Definitions by: C Lentfort , +// J Giancono , +// Alex Shakun // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 diff --git a/types/cleave.js/react/index.d.ts b/types/cleave.js/react/index.d.ts index 6d40ea4ed5..1f50cbdbf3 100644 --- a/types/cleave.js/react/index.d.ts +++ b/types/cleave.js/react/index.d.ts @@ -6,6 +6,7 @@ type InitHandler = (owner: React.ReactInstance) => void; interface Props extends React.InputHTMLAttributes { onInit?: InitHandler; options: CleaveOptions; + htmlRef?: (i: any) => void; } declare var Cleave: React.ComponentClass; diff --git a/types/cleave.js/tsconfig.json b/types/cleave.js/tsconfig.json index 40e69541bc..40b7d000c9 100644 --- a/types/cleave.js/tsconfig.json +++ b/types/cleave.js/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ @@ -24,4 +25,4 @@ "options.d.ts", "react/index.d.ts" ] -} +} \ No newline at end of file diff --git a/types/cli-color/tsconfig.json b/types/cli-color/tsconfig.json index 4e8bceb94b..933f6db918 100644 --- a/types/cli-color/tsconfig.json +++ b/types/cli-color/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cli-spinner/tsconfig.json b/types/cli-spinner/tsconfig.json index 61c966becc..316be5cb01 100644 --- a/types/cli-spinner/tsconfig.json +++ b/types/cli-spinner/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "cli-spinner-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/cli-table2/tsconfig.json b/types/cli-table2/tsconfig.json index 4d5bea5b9d..40718ddc19 100644 --- a/types/cli-table2/tsconfig.json +++ b/types/cli-table2/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cli/tsconfig.json b/types/cli/tsconfig.json index 2a1b78ae92..6713e9be0c 100644 --- a/types/cli/tsconfig.json +++ b/types/cli/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/client-sessions/tsconfig.json b/types/client-sessions/tsconfig.json index c1556587bc..07f4f1048c 100644 --- a/types/client-sessions/tsconfig.json +++ b/types/client-sessions/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cliff/tsconfig.json b/types/cliff/tsconfig.json index 8c59f5c533..3edd8ddc45 100644 --- a/types/cliff/tsconfig.json +++ b/types/cliff/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/clipboard-js/tsconfig.json b/types/clipboard-js/tsconfig.json index 8927797525..ed9c969743 100644 --- a/types/clipboard-js/tsconfig.json +++ b/types/clipboard-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/clipboard/tsconfig.json b/types/clipboard/tsconfig.json index 5d960d2fd4..96e74d7bbc 100644 --- a/types/clipboard/tsconfig.json +++ b/types/clipboard/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/clipboardy/tsconfig.json b/types/clipboardy/tsconfig.json index 6d6bfcc76a..34c70f2c86 100644 --- a/types/clipboardy/tsconfig.json +++ b/types/clipboardy/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/clndr/tsconfig.json b/types/clndr/tsconfig.json index df25d1b075..9708a8b2b4 100644 --- a/types/clndr/tsconfig.json +++ b/types/clndr/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/clockpicker/tsconfig.json b/types/clockpicker/tsconfig.json index 64b80a0278..61aa239cea 100644 --- a/types/clockpicker/tsconfig.json +++ b/types/clockpicker/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "clockpicker-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/clone/tsconfig.json b/types/clone/tsconfig.json index 65bd178331..024e8a97fa 100644 --- a/types/clone/tsconfig.json +++ b/types/clone/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/closure-compiler/tsconfig.json b/types/closure-compiler/tsconfig.json index 4a15360b18..5f78d4927e 100644 --- a/types/closure-compiler/tsconfig.json +++ b/types/closure-compiler/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cloud-env/tsconfig.json b/types/cloud-env/tsconfig.json index 0972bef4e5..bbdc4f5f5c 100644 --- a/types/cloud-env/tsconfig.json +++ b/types/cloud-env/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cloudflare-apps/tsconfig.json b/types/cloudflare-apps/tsconfig.json index b521ed0aca..0dcc8d43cd 100644 --- a/types/cloudflare-apps/tsconfig.json +++ b/types/cloudflare-apps/tsconfig.json @@ -20,6 +20,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "preserve" } } \ No newline at end of file diff --git a/types/cls-hooked/tsconfig.json b/types/cls-hooked/tsconfig.json index 2e4da612f6..55af57a7cd 100644 --- a/types/cls-hooked/tsconfig.json +++ b/types/cls-hooked/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/clusterize.js/tsconfig.json b/types/clusterize.js/tsconfig.json index 10ca5c2a1a..dd8e3e7899 100644 --- a/types/clusterize.js/tsconfig.json +++ b/types/clusterize.js/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "clusterize.js-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/cmd-shim/tsconfig.json b/types/cmd-shim/tsconfig.json index 753e3b8c58..cb447abdcb 100644 --- a/types/cmd-shim/tsconfig.json +++ b/types/cmd-shim/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "cmd-shim-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/co-body/co-body-tests.ts b/types/co-body/co-body-tests.ts index 944cadd394..0b15f2bcc5 100644 --- a/types/co-body/co-body-tests.ts +++ b/types/co-body/co-body-tests.ts @@ -1,5 +1,5 @@ -import * as koa from 'koa'; -import * as parse from 'co-body'; +import koa = require('koa'); +import parse = require('co-body'); var app = new koa(); diff --git a/types/co-body/tsconfig.json b/types/co-body/tsconfig.json index 295cfcd7cd..3c6c8ea708 100644 --- a/types/co-body/tsconfig.json +++ b/types/co-body/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/co-views/tsconfig.json b/types/co-views/tsconfig.json index 8b129766a5..388ba1bd29 100644 --- a/types/co-views/tsconfig.json +++ b/types/co-views/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/code/tsconfig.json b/types/code/tsconfig.json index ae86da199a..610eae1463 100644 --- a/types/code/tsconfig.json +++ b/types/code/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/codemirror/tsconfig.json b/types/codemirror/tsconfig.json index 2ff349d98e..fdf3bf2d28 100644 --- a/types/codemirror/tsconfig.json +++ b/types/codemirror/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/codependency/tsconfig.json b/types/codependency/tsconfig.json index 990aecea5d..f770e7ed61 100644 --- a/types/codependency/tsconfig.json +++ b/types/codependency/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/coffeeify/tsconfig.json b/types/coffeeify/tsconfig.json index 0ed14ee2f2..2ab8b32406 100644 --- a/types/coffeeify/tsconfig.json +++ b/types/coffeeify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/coinbase/tsconfig.json b/types/coinbase/tsconfig.json index 6f8b261d27..3732908a04 100644 --- a/types/coinbase/tsconfig.json +++ b/types/coinbase/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "coinbase-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/coinstring/tsconfig.json b/types/coinstring/tsconfig.json index 43ca980dbb..902dc00b80 100644 --- a/types/coinstring/tsconfig.json +++ b/types/coinstring/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/collections/tsconfig.json b/types/collections/tsconfig.json index 466c5b12c4..2916e1a806 100644 --- a/types/collections/tsconfig.json +++ b/types/collections/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/color-convert/tsconfig.json b/types/color-convert/tsconfig.json index 52c14017a1..3ce21ead77 100644 --- a/types/color-convert/tsconfig.json +++ b/types/color-convert/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/color-name/tsconfig.json b/types/color-name/tsconfig.json index 56777b5a12..a88783ad70 100644 --- a/types/color-name/tsconfig.json +++ b/types/color-name/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "baseUrl": "../", "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "lib": [ "es6" ], diff --git a/types/color-string/tsconfig.json b/types/color-string/tsconfig.json index 27f7f9f5f1..a9ef4a043c 100644 --- a/types/color-string/tsconfig.json +++ b/types/color-string/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/color/color-tests.ts b/types/color/color-tests.ts index 4e475a0ce0..ac79ea42e9 100644 --- a/types/color/color-tests.ts +++ b/types/color/color-tests.ts @@ -25,8 +25,8 @@ const yellow: number = color.yellow(); const black: number = color.black(); const luminosity: number = color.luminosity(); const contrast: number = color.contrast(colorOther); -const dark: boolean = color.dark(); -const light: boolean = color.light(); +const isDark: boolean = color.isDark(); +const isLight: boolean = color.isLight(); const level: string = color.level(colorOther); const x: number = color.x(); diff --git a/types/color/index.d.ts b/types/color/index.d.ts index 8290b78129..716b8a9dcf 100644 --- a/types/color/index.d.ts +++ b/types/color/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for color 2.0 +// Type definitions for color 3.0 // Project: https://github.com/qix-/color#readme -// Definitions by: Junyoung Clare Jang +// Definitions by: Junyoung Clare Jang , James W. Lane // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -72,8 +72,8 @@ interface Color { luminosity(): number; contrast(color2: Color): number; level(color2: Color): 'AAA' | 'AA' | ''; - dark(): boolean; - light(): boolean; + isDark(): boolean; + isLight(): boolean; negate(): Color; lighten(ratio: number): Color; darken(ratio: number): Color; diff --git a/types/color/tsconfig.json b/types/color/tsconfig.json index 0924b02ae0..2cd717e58a 100644 --- a/types/color/tsconfig.json +++ b/types/color/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/color/v0/tsconfig.json b/types/color/v0/tsconfig.json index 73f49d6375..f73dc07711 100644 --- a/types/color/v0/tsconfig.json +++ b/types/color/v0/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/color/v1/tsconfig.json b/types/color/v1/tsconfig.json index 8d8204cf87..1e8e29f876 100644 --- a/types/color/v1/tsconfig.json +++ b/types/color/v1/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/color/v2/color-tests.ts b/types/color/v2/color-tests.ts new file mode 100644 index 0000000000..4e475a0ce0 --- /dev/null +++ b/types/color/v2/color-tests.ts @@ -0,0 +1,65 @@ +import Color = require('color'); + +const color: Color = new Color("white"); +const colorOther: Color = new Color("black"); +const colorRGB: Color = new Color({ r: 0, g: 0, b: 0 }, "rgb"); +const colorInt: Color = new Color(0x000000); +const colorWithoutNew: Color = Color(0x000000); +const colorByStaticMethod: Color = Color.rgb({ r: 0, g: 0, b: 0 }); + +const hex: string = color.hex(); +const percent: string = color.percentString(); +const keyword: string = color.keyword(); +const alpha: number = color.alpha(); +const red: number = color.red(); +const green: number = color.green(); +const blue: number = color.blue(); +const hue: number = color.hue(); +const saturationl: number = color.saturationl(); +const lightness: number = color.lightness(); +const saturationv: number = color.saturationv(); +const value: number = color.value(); +const cyan: number = color.cyan(); +const magenta: number = color.magenta(); +const yellow: number = color.yellow(); +const black: number = color.black(); +const luminosity: number = color.luminosity(); +const contrast: number = color.contrast(colorOther); +const dark: boolean = color.dark(); +const light: boolean = color.light(); +const level: string = color.level(colorOther); + +const x: number = color.x(); +const y: number = color.y(); +const z: number = color.z(); +const l: number = color.l(); +const a: number = color.a(); +const b: number = color.b(); +const rgbNumber: number = color.rgbNumber(); + +const chain: Color = color + .alpha(0) + .red(0) + .green(0) + .blue(0) + .hue(0) + .saturationl(0) + .lightness(0) + .saturationv(0) + .value(0) + .cyan(0) + .magenta(0) + .yellow(0) + .black(0) + .negate() + .lighten(0) + .darken(0) + .saturate(0) + .desaturate(0) + .grayscale() + .whiten(0) + .blacken(0) + .opaquer(0) + .rotate(0) + .mix(colorOther, 0) + .hsl(); diff --git a/types/color/v2/index.d.ts b/types/color/v2/index.d.ts new file mode 100644 index 0000000000..8290b78129 --- /dev/null +++ b/types/color/v2/index.d.ts @@ -0,0 +1,135 @@ +// Type definitions for color 2.0 +// Project: https://github.com/qix-/color#readme +// Definitions by: Junyoung Clare Jang +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import convert = require('color-convert'); + +type ColorParam = Color | string | ArrayLike | number | { [key: string]: any }; + +interface Color { + toString(): string; + toJSON(): Color; + string(places?: number): string; + percentString(places?: number): string; + array(): number[]; + object(): { alpha?: number } & { [key: string]: number }; + unitArray(): number[]; + unitObject(): { r: number, g: number, b: number, alpha?: number }; + round(places?: number): Color; + alpha(): number; + alpha(val: number): Color; + red(): number; + red(val: number): Color; + green(): number; + green(val: number): Color; + blue(): number; + blue(val: number): Color; + hue(): number; + hue(val: number): Color; + saturationl(): number; + saturationl(val: number): Color; + lightness(): number; + lightness(val: number): Color; + saturationv(): number; + saturationv(val: number): Color; + value(): number; + value(val: number): Color; + chroma(): number; + chroma(val: number): Color; + gray(): number; + gray(val: number): Color; + white(): number; + white(val: number): Color; + wblack(): number; + wblack(val: number): Color; + cyan(): number; + cyan(val: number): Color; + magenta(): number; + magenta(val: number): Color; + yellow(): number; + yellow(val: number): Color; + black(): number; + black(val: number): Color; + x(): number; + x(val: number): Color; + y(): number; + y(val: number): Color; + z(): number; + z(val: number): Color; + l(): number; + l(val: number): Color; + a(): number; + a(val: number): Color; + b(): number; + b(val: number): Color; + keyword(): string; + keyword(val: string): Color; + hex(): string; + hex(val: string): Color; + rgbNumber(): number; + luminosity(): number; + contrast(color2: Color): number; + level(color2: Color): 'AAA' | 'AA' | ''; + dark(): boolean; + light(): boolean; + negate(): Color; + lighten(ratio: number): Color; + darken(ratio: number): Color; + saturate(ratio: number): Color; + desaturate(ratio: number): Color; + whiten(ratio: number): Color; + blacken(ratio: number): Color; + grayscale(): Color; + fade(ratio: number): Color; + opaquer(ratio: number): Color; + rotate(degrees: number): Color; + mix(mixinColor: Color, weight?: number): Color; + + rgb(...args: number[]): Color; + hsl(...args: number[]): Color; + hsv(...args: number[]): Color; + hwb(...args: number[]): Color; + cmyk(...args: number[]): Color; + xyz(...args: number[]): Color; + lab(...args: number[]): Color; + lch(...args: number[]): Color; + ansi16(...args: number[]): Color; + ansi256(...args: number[]): Color; + hcg(...args: number[]): Color; + apple(...args: number[]): Color; +} + +interface ColorConstructor { + (obj?: ColorParam, model?: keyof (typeof convert)): Color; + new(obj?: ColorParam, model?: keyof (typeof convert)): Color; + rgb(...val: number[]): Color; + rgb(color: ColorParam): Color; + hsl(...val: number[]): Color; + hsl(color: ColorParam): Color; + hsv(...val: number[]): Color; + hsv(color: ColorParam): Color; + hwb(...val: number[]): Color; + hwb(color: ColorParam): Color; + cmyk(...val: number[]): Color; + cmyk(color: ColorParam): Color; + xyz(...val: number[]): Color; + xyz(color: ColorParam): Color; + lab(...val: number[]): Color; + lab(color: ColorParam): Color; + lch(...val: number[]): Color; + lch(color: ColorParam): Color; + ansi16(...val: number[]): Color; + ansi16(color: ColorParam): Color; + ansi256(...val: number[]): Color; + ansi256(color: ColorParam): Color; + hcg(...val: number[]): Color; + hcg(color: ColorParam): Color; + apple(...val: number[]): Color; + apple(color: ColorParam): Color; +} + +declare const Color: ColorConstructor; + +export = Color; diff --git a/types/color/v2/tsconfig.json b/types/color/v2/tsconfig.json new file mode 100644 index 0000000000..fef027287c --- /dev/null +++ b/types/color/v2/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "paths": { + "color": [ + "color/v2" + ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "color-tests.ts" + ] +} \ No newline at end of file diff --git a/types/color/v2/tslint.json b/types/color/v2/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/color/v2/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/colorbrewer/tsconfig.json b/types/colorbrewer/tsconfig.json index 561a5d114e..da629b0ce4 100644 --- a/types/colorbrewer/tsconfig.json +++ b/types/colorbrewer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/colors/tsconfig.json b/types/colors/tsconfig.json index 99d78ad72d..7b92f3a446 100644 --- a/types/colors/tsconfig.json +++ b/types/colors/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/com.darktalker.cordova.screenshot/tsconfig.json b/types/com.darktalker.cordova.screenshot/tsconfig.json index d2b5aabb00..80a6fbfe64 100644 --- a/types/com.darktalker.cordova.screenshot/tsconfig.json +++ b/types/com.darktalker.cordova.screenshot/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/combine-source-map/tsconfig.json b/types/combine-source-map/tsconfig.json index dfb725b738..0c89da9ae0 100644 --- a/types/combine-source-map/tsconfig.json +++ b/types/combine-source-map/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/combined-stream/combined-stream-tests.ts b/types/combined-stream/combined-stream-tests.ts index 776e530e63..ffdc0eaac7 100644 --- a/types/combined-stream/combined-stream-tests.ts +++ b/types/combined-stream/combined-stream-tests.ts @@ -1,4 +1,4 @@ -import * as CombinedStream from "combined-stream"; +import CombinedStream = require("combined-stream"); import { createReadStream, createWriteStream } from "fs"; const stream1 = new CombinedStream(); diff --git a/types/combined-stream/tsconfig.json b/types/combined-stream/tsconfig.json index bc69eb2505..6d88a54646 100644 --- a/types/combined-stream/tsconfig.json +++ b/types/combined-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/combokeys/tsconfig.json b/types/combokeys/tsconfig.json index b1fecec3b7..0c36d58c5a 100644 --- a/types/combokeys/tsconfig.json +++ b/types/combokeys/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cometd/tsconfig.json b/types/cometd/tsconfig.json index 02963e3afd..352332b6c7 100644 --- a/types/cometd/tsconfig.json +++ b/types/cometd/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/command-line-args/tsconfig.json b/types/command-line-args/tsconfig.json index 92c02160ae..742434add7 100644 --- a/types/command-line-args/tsconfig.json +++ b/types/command-line-args/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/command-line-commands/tsconfig.json b/types/command-line-commands/tsconfig.json index fd8670e4a1..43a82ddc71 100644 --- a/types/command-line-commands/tsconfig.json +++ b/types/command-line-commands/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/commangular/tsconfig.json b/types/commangular/tsconfig.json index bd900bd300..f2d837d87a 100644 --- a/types/commangular/tsconfig.json +++ b/types/commangular/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/comment-json/comment-json-tests.ts b/types/comment-json/comment-json-tests.ts index af91ff422f..56aa8453fe 100644 --- a/types/comment-json/comment-json-tests.ts +++ b/types/comment-json/comment-json-tests.ts @@ -14,3 +14,11 @@ const result = commentJson.parse(` // comment at the bottom `); const str = commentJson.stringify(result); + +const numericallyIndexed = commentJson.stringify(result, (key, value) => { +return key && Number.isInteger(Number(key)) + ? value + : undefined; +}); + +const whiteListed = commentJson.stringify(result, ['a', 1]); diff --git a/types/comment-json/index.d.ts b/types/comment-json/index.d.ts index 9c2652f34e..0aad1934ff 100644 --- a/types/comment-json/index.d.ts +++ b/types/comment-json/index.d.ts @@ -4,5 +4,20 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export type Reviver = (k: number | string, v: any) => any; + +/** + * Converts a JavaScript Object Notation (JSON) string into an object. + * @param json A valid JSON string. + * @param reviver A function that transforms the results. This function is called for each member of the object. + * @param removes_comments If true, the comments won't be maintained, which is often used when we want to get a clean object. + * If a member contains nested objects, the nested objects are transformed before the parent object is. + */ export function parse(json: string, reviver?: Reviver, removes_comments?: boolean): any; -export function stringify(value: any, replacer?: any, space?: string | number): string; + +/** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer A function that transforms the results or an array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + */ +export function stringify(value: any, replacer?: ((key: string, value: any) => any) | Array | null, space?: string | number): string; diff --git a/types/comment-json/tsconfig.json b/types/comment-json/tsconfig.json index 0745d1cfc0..4512d870b9 100644 --- a/types/comment-json/tsconfig.json +++ b/types/comment-json/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/common-tags/tsconfig.json b/types/common-tags/tsconfig.json index 21158de285..84732128c2 100644 --- a/types/common-tags/tsconfig.json +++ b/types/common-tags/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/commonmark/tsconfig.json b/types/commonmark/tsconfig.json index 682d69fed4..f25b7b8e9d 100644 --- a/types/commonmark/tsconfig.json +++ b/types/commonmark/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/compare-version/tsconfig.json b/types/compare-version/tsconfig.json index 5dcb7c3156..28e391540f 100644 --- a/types/compare-version/tsconfig.json +++ b/types/compare-version/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/complex/tsconfig.json b/types/complex/tsconfig.json index b8a54e716a..ec9be90750 100644 --- a/types/complex/tsconfig.json +++ b/types/complex/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/component-emitter/tsconfig.json b/types/component-emitter/tsconfig.json index 71ded6be82..e6a5fec6c6 100644 --- a/types/component-emitter/tsconfig.json +++ b/types/component-emitter/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/compose-function/tsconfig.json b/types/compose-function/tsconfig.json index cdbf9e9709..8a4ad44fa7 100644 --- a/types/compose-function/tsconfig.json +++ b/types/compose-function/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/compressible/tsconfig.json b/types/compressible/tsconfig.json index 8e036c88d9..c2ab1306cc 100644 --- a/types/compressible/tsconfig.json +++ b/types/compressible/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/compression-webpack-plugin/tsconfig.json b/types/compression-webpack-plugin/tsconfig.json index b80c7a1977..1e166ce2bc 100644 --- a/types/compression-webpack-plugin/tsconfig.json +++ b/types/compression-webpack-plugin/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/compression/tsconfig.json b/types/compression/tsconfig.json index 63ff5e3bc8..c0102986f8 100644 --- a/types/compression/tsconfig.json +++ b/types/compression/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/compute-stdev/tsconfig.json b/types/compute-stdev/tsconfig.json index f622c386a3..aa0baf9c99 100644 --- a/types/compute-stdev/tsconfig.json +++ b/types/compute-stdev/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "compute-stdev-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/concat-stream/tsconfig.json b/types/concat-stream/tsconfig.json index 20373a2de3..0cba6d2e70 100644 --- a/types/concat-stream/tsconfig.json +++ b/types/concat-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/concaveman/tsconfig.json b/types/concaveman/tsconfig.json index 6312321a70..392fb91c60 100644 --- a/types/concaveman/tsconfig.json +++ b/types/concaveman/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/conf/index.d.ts b/types/conf/index.d.ts index 9f88a88355..e58dc3ede7 100644 --- a/types/conf/index.d.ts +++ b/types/conf/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for conf 1.1 +// Type definitions for conf 1.4 // Project: https://github.com/sindresorhus/conf // Definitions by: Sam Verschueren // BendingBender @@ -24,6 +24,7 @@ declare class Conf implements Iterable<[string, T]> { has(key: string): boolean; delete(key: string): void; clear(): void; + onDidChange(key: string, callback: (oldVal: any, newVal: any) => void): void; [Symbol.iterator](): Iterator<[string, T]>; } diff --git a/types/conf/tsconfig.json b/types/conf/tsconfig.json index 84d6bf7657..aa03ea90e1 100644 --- a/types/conf/tsconfig.json +++ b/types/conf/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/conf/v0/tsconfig.json b/types/conf/v0/tsconfig.json index 004bd4a1b5..8b4a8695b8 100644 --- a/types/conf/v0/tsconfig.json +++ b/types/conf/v0/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/confidence/tsconfig.json b/types/confidence/tsconfig.json index 8996cbd660..7504130a82 100644 --- a/types/confidence/tsconfig.json +++ b/types/confidence/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/config/index.d.ts b/types/config/index.d.ts index ea5e5a940a..a18e765012 100644 --- a/types/config/index.d.ts +++ b/types/config/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Roman Korneev // Forrest Bice // James Donald +// Alberto Vasquez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -39,6 +40,9 @@ declare namespace c { // Return the sources for the configurations getConfigSources(): IConfigSource[]; + + // Returns a new deep copy of the current config object, or any part of the config if provided. + toObject(config?: any): any; /** * This allows module developers to attach their configurations onto diff --git a/types/config/tsconfig.json b/types/config/tsconfig.json index a595ffb10c..2717a0380e 100644 --- a/types/config/tsconfig.json +++ b/types/config/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/configstore/tsconfig.json b/types/configstore/tsconfig.json index 8479846189..3401254406 100644 --- a/types/configstore/tsconfig.json +++ b/types/configstore/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/confit/tsconfig.json b/types/confit/tsconfig.json index 6d141ea715..ab805bf10d 100644 --- a/types/confit/tsconfig.json +++ b/types/confit/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/connect-busboy/connect-busboy-tests.ts b/types/connect-busboy/connect-busboy-tests.ts index 2bbb832070..2db8cd45d7 100644 --- a/types/connect-busboy/connect-busboy-tests.ts +++ b/types/connect-busboy/connect-busboy-tests.ts @@ -1,4 +1,4 @@ -import * as connectBusboy from 'connect-busboy'; +import connectBusboy = require('connect-busboy'); import * as express from 'express'; diff --git a/types/connect-busboy/tsconfig.json b/types/connect-busboy/tsconfig.json index 112c160f2b..cb2e739029 100644 --- a/types/connect-busboy/tsconfig.json +++ b/types/connect-busboy/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "connect-busboy-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/connect-ensure-login/tsconfig.json b/types/connect-ensure-login/tsconfig.json index 95f39e8bf0..7351d8357b 100644 --- a/types/connect-ensure-login/tsconfig.json +++ b/types/connect-ensure-login/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/connect-flash/tsconfig.json b/types/connect-flash/tsconfig.json index 0d8c04c7de..fa58928986 100644 --- a/types/connect-flash/tsconfig.json +++ b/types/connect-flash/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/connect-history-api-fallback/connect-history-api-fallback-tests.ts b/types/connect-history-api-fallback/connect-history-api-fallback-tests.ts index 6095d2fecb..dc53a3b86f 100644 --- a/types/connect-history-api-fallback/connect-history-api-fallback-tests.ts +++ b/types/connect-history-api-fallback/connect-history-api-fallback-tests.ts @@ -1,6 +1,5 @@ -import * as historyApiFallback from 'connect-history-api-fallback'; - -import * as express from "express"; +import historyApiFallback = require('connect-history-api-fallback'); +import express = require('express'); const app = express(); app.use(historyApiFallback()); diff --git a/types/connect-history-api-fallback/tsconfig.json b/types/connect-history-api-fallback/tsconfig.json index ad8919e94e..dff6edbdd1 100644 --- a/types/connect-history-api-fallback/tsconfig.json +++ b/types/connect-history-api-fallback/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/connect-livereload/connect-livereload-tests.ts b/types/connect-livereload/connect-livereload-tests.ts index 26a09a2983..9049fa147c 100644 --- a/types/connect-livereload/connect-livereload-tests.ts +++ b/types/connect-livereload/connect-livereload-tests.ts @@ -1,6 +1,5 @@ - -import * as connect from "connect"; -import * as livereload from "connect-livereload"; +import connect = require("connect"); +import livereload = require("connect-livereload"); const app = connect(); @@ -28,13 +27,13 @@ app.use(livereload({ // include all urls by default include: [/.*/], - + // this function is used to determine if the content of `res.write` or `res.end` is html. html: function (str) { if (!str) return false; return /<[:_-\w\s\!\/\=\"\']+>/i.test(str); }, - + // rules are provided to find the place where the snippet should be inserted. // the main problem is that on the server side it can be tricky to determine if a string will be valid html on the client. // the function `fn` of the first `match` is executed like this `body.replace(rule.match, rule.fn);` @@ -49,13 +48,13 @@ app.use(livereload({ match: /<\!DOCTYPE.+?>/i, fn: append }], - + // port where the script is loaded port: 35729, - + // location where the script is provided (not by connect-livereload). Change this e.g. when serving livereload with a proxy. src: "http://localhost:35729/livereload.js?snipver=1", - + // Set this option to `true` to set `req.headers['accept-encoding']` to 'identity' (disabling compression) disableCompression: false })); diff --git a/types/connect-livereload/tsconfig.json b/types/connect-livereload/tsconfig.json index 599ea294bf..92d8c225c2 100644 --- a/types/connect-livereload/tsconfig.json +++ b/types/connect-livereload/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/connect-modrewrite/tsconfig.json b/types/connect-modrewrite/tsconfig.json index 235df5d93e..be62ccb0d3 100644 --- a/types/connect-modrewrite/tsconfig.json +++ b/types/connect-modrewrite/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/connect-mongo/connect-mongo-tests.ts b/types/connect-mongo/connect-mongo-tests.ts index 67caed7c27..351975d84c 100644 --- a/types/connect-mongo/connect-mongo-tests.ts +++ b/types/connect-mongo/connect-mongo-tests.ts @@ -1,8 +1,7 @@ - -import * as express from 'express'; +import express = require('express'); import * as mongoose from 'mongoose'; -import * as session from 'express-session'; -import * as connectMongo from 'connect-mongo'; +import session = require('express-session'); +import connectMongo = require('connect-mongo'); import * as mongodb from 'mongodb'; var app = express(); diff --git a/types/connect-mongo/tsconfig.json b/types/connect-mongo/tsconfig.json index ca12068b57..cb44c8c3ed 100644 --- a/types/connect-mongo/tsconfig.json +++ b/types/connect-mongo/tsconfig.json @@ -19,7 +19,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/connect-pg-simple/connect-pg-simple-tests.ts b/types/connect-pg-simple/connect-pg-simple-tests.ts index 1e90c9b4e5..6f7d629a59 100644 --- a/types/connect-pg-simple/connect-pg-simple-tests.ts +++ b/types/connect-pg-simple/connect-pg-simple-tests.ts @@ -1,7 +1,7 @@ import connectPgSimple = require("connect-pg-simple"); -import * as session from "express-session"; +import session = require("express-session"); import * as pg from "pg"; -import * as express from "express"; +import express = require('express'); const pgSession = connectPgSimple(session); diff --git a/types/connect-pg-simple/tsconfig.json b/types/connect-pg-simple/tsconfig.json index ed22faf257..e2194628bc 100644 --- a/types/connect-pg-simple/tsconfig.json +++ b/types/connect-pg-simple/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/connect-redis/connect-redis-tests.ts b/types/connect-redis/connect-redis-tests.ts index 11cd583a74..a312ffd3ca 100644 --- a/types/connect-redis/connect-redis-tests.ts +++ b/types/connect-redis/connect-redis-tests.ts @@ -1,5 +1,5 @@ -import * as connectRedis from "connect-redis"; -import * as session from "express-session"; +import connectRedis = require("connect-redis"); +import session = require("express-session"); let RedisStore = connectRedis(session); const store = new RedisStore({ diff --git a/types/connect-redis/tsconfig.json b/types/connect-redis/tsconfig.json index b47af7235d..69af94ebe8 100644 --- a/types/connect-redis/tsconfig.json +++ b/types/connect-redis/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/connect-slashes/tsconfig.json b/types/connect-slashes/tsconfig.json index 18eed04f1a..a07f0a4477 100644 --- a/types/connect-slashes/tsconfig.json +++ b/types/connect-slashes/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/connect-timeout/connect-timeout-tests.ts b/types/connect-timeout/connect-timeout-tests.ts index aa93ea179e..31342d7491 100644 --- a/types/connect-timeout/connect-timeout-tests.ts +++ b/types/connect-timeout/connect-timeout-tests.ts @@ -1,9 +1,7 @@ - - -import * as express from "express"; -import * as timeout from "connect-timeout"; -import * as bodyParser from "body-parser"; -import * as cookieParser from "cookie-parser"; +import express = require("express"); +import timeout = require("connect-timeout"); +import bodyParser = require("body-parser"); +import cookieParser = require("cookie-parser"); // example of using this top-level; note the use of haltOnTimedout // after every middleware; it will stop the request flow on a timeout diff --git a/types/connect-timeout/tsconfig.json b/types/connect-timeout/tsconfig.json index 79082f279a..701d7beedf 100644 --- a/types/connect-timeout/tsconfig.json +++ b/types/connect-timeout/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/connect/connect-tests.ts b/types/connect/connect-tests.ts index 627017a7e4..5a7590a9a0 100644 --- a/types/connect/connect-tests.ts +++ b/types/connect/connect-tests.ts @@ -1,6 +1,5 @@ - import * as http from "http"; -import * as connect from "connect"; +import connect = require("connect"); const app = connect(); @@ -15,7 +14,7 @@ app.use((err: Error, req: http.IncomingMessage, res: http.ServerResponse, next: if (err) { return res.end(`Error: ${err}`); } - + next(); }); diff --git a/types/connect/tsconfig.json b/types/connect/tsconfig.json index bcd813bc77..9fdfae264f 100644 --- a/types/connect/tsconfig.json +++ b/types/connect/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/console-stamp/tsconfig.json b/types/console-stamp/tsconfig.json index e4112e2035..c18c0edc84 100644 --- a/types/console-stamp/tsconfig.json +++ b/types/console-stamp/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/consolidate/tsconfig.json b/types/consolidate/tsconfig.json index aab02b23e5..2ed641f4b3 100644 --- a/types/consolidate/tsconfig.json +++ b/types/consolidate/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/consul/consul-tests.ts b/types/consul/consul-tests.ts index f749ef0a5d..988890766d 100644 --- a/types/consul/consul-tests.ts +++ b/types/consul/consul-tests.ts @@ -1,5 +1,4 @@ - -import * as Consul from "consul"; +import Consul = require("consul"); let ConsulStatic: Consul.ConsulStatic; let AclStatic: Consul.AclStatic = ConsulStatic.Acl; diff --git a/types/consul/tsconfig.json b/types/consul/tsconfig.json index 9401826c02..96142fb5d0 100644 --- a/types/consul/tsconfig.json +++ b/types/consul/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/content-disposition/tsconfig.json b/types/content-disposition/tsconfig.json index 25125c4ab6..b0c721f43f 100644 --- a/types/content-disposition/tsconfig.json +++ b/types/content-disposition/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/content-type/tsconfig.json b/types/content-type/tsconfig.json index 139851cbde..40c18138d3 100644 --- a/types/content-type/tsconfig.json +++ b/types/content-type/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/contentful-resolve-response/tsconfig.json b/types/contentful-resolve-response/tsconfig.json index f15c47db0a..09811fc7ba 100644 --- a/types/contentful-resolve-response/tsconfig.json +++ b/types/contentful-resolve-response/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/contextjs/tsconfig.json b/types/contextjs/tsconfig.json index 3054b8f3ca..ba45f1d91a 100644 --- a/types/contextjs/tsconfig.json +++ b/types/contextjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/continuation-local-storage/tsconfig.json b/types/continuation-local-storage/tsconfig.json index f1305a49af..7ff6d996f3 100644 --- a/types/continuation-local-storage/tsconfig.json +++ b/types/continuation-local-storage/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/convert-hrtime/tsconfig.json b/types/convert-hrtime/tsconfig.json index 9d2b304763..8ca78a7377 100644 --- a/types/convert-hrtime/tsconfig.json +++ b/types/convert-hrtime/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/convert-layout/tsconfig.json b/types/convert-layout/tsconfig.json index e9ef959215..4dda95576b 100644 --- a/types/convert-layout/tsconfig.json +++ b/types/convert-layout/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/convert-source-map/tsconfig.json b/types/convert-source-map/tsconfig.json index a9125c586c..e7fb07ca0c 100644 --- a/types/convert-source-map/tsconfig.json +++ b/types/convert-source-map/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/convict/tsconfig.json b/types/convict/tsconfig.json index 75e1402283..7177956370 100644 --- a/types/convict/tsconfig.json +++ b/types/convict/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cookie-parser/tsconfig.json b/types/cookie-parser/tsconfig.json index 20cf8359b5..a182eeaaa3 100644 --- a/types/cookie-parser/tsconfig.json +++ b/types/cookie-parser/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cookie-session/tsconfig.json b/types/cookie-session/tsconfig.json index bacf93c9f4..a046c14075 100644 --- a/types/cookie-session/tsconfig.json +++ b/types/cookie-session/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cookie-signature/tsconfig.json b/types/cookie-signature/tsconfig.json index 38aab055c7..04c9a9bc73 100644 --- a/types/cookie-signature/tsconfig.json +++ b/types/cookie-signature/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cookie/tsconfig.json b/types/cookie/tsconfig.json index f1a68c4f57..2c101fadf8 100644 --- a/types/cookie/tsconfig.json +++ b/types/cookie/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cookie_js/tsconfig.json b/types/cookie_js/tsconfig.json index d181ce7661..cfb0fd4eb8 100644 --- a/types/cookie_js/tsconfig.json +++ b/types/cookie_js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cookies/cookies-tests.ts b/types/cookies/cookies-tests.ts index 2f78f8ad49..cd46e0987b 100644 --- a/types/cookies/cookies-tests.ts +++ b/types/cookies/cookies-tests.ts @@ -1,8 +1,8 @@ -import * as Cookies from 'cookies'; +import Cookies = require('cookies'); import * as http from 'http'; -import * as Keygrip from 'keygrip'; -import * as express from 'express'; -import * as connect from 'connect'; +import Keygrip = require('keygrip'); +import express = require('express'); +import connect = require('connect'); const server = http.createServer((req, res) => { const cookies = new Cookies(req, res); diff --git a/types/cookies/tsconfig.json b/types/cookies/tsconfig.json index d7a17c23bc..6cbd9c2cff 100644 --- a/types/cookies/tsconfig.json +++ b/types/cookies/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/copy-paste/tsconfig.json b/types/copy-paste/tsconfig.json index 7c78f81542..ae30962d67 100644 --- a/types/copy-paste/tsconfig.json +++ b/types/copy-paste/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/copy-text-to-clipboard/tsconfig.json b/types/copy-text-to-clipboard/tsconfig.json index 2889d9fdc6..a04fdc0b8e 100644 --- a/types/copy-text-to-clipboard/tsconfig.json +++ b/types/copy-text-to-clipboard/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/copy-webpack-plugin/copy-webpack-plugin-tests.ts b/types/copy-webpack-plugin/copy-webpack-plugin-tests.ts index 022a734261..b58b242fc2 100644 --- a/types/copy-webpack-plugin/copy-webpack-plugin-tests.ts +++ b/types/copy-webpack-plugin/copy-webpack-plugin-tests.ts @@ -1,27 +1,27 @@ import { Configuration } from 'webpack' -import * as CopyWebpackPlugin from 'copy-webpack-plugin' +import CopyWebpackPlugin = require('copy-webpack-plugin'); const c: Configuration = { plugins: [ new CopyWebpackPlugin([ // {output}/file.txt { from: 'from/file.txt' }, - + // {output}/to/file.txt { from: 'from/file.txt', to: 'to/file.txt' }, - + // {output}/to/directory/file.txt { from: 'from/file.txt', to: 'to/directory' }, - + // Copy directory contents to {output}/ { from: 'from/directory' }, - + // Copy directory contents to {output}/to/directory/ { from: 'from/directory', to: 'to/directory' }, - + // Copy glob results to /absolute/path/ { from: 'from/directory/**/*', to: '/absolute/path' }, - + // Copy glob results (with dot files) to /absolute/path/ { from: { @@ -30,21 +30,21 @@ const c: Configuration = { }, to: '/absolute/path' }, - + // Copy glob results, relative to context { context: 'from/directory', from: '**/*', to: '/absolute/path' }, - + // {output}/file/without/extension { from: 'path/to/file.txt', to: 'file/without/extension', toType: 'file' }, - + // {output}/directory/with/extension.ext/file.txt { from: 'path/to/file.txt', @@ -53,16 +53,16 @@ const c: Configuration = { }, ], { ignore: [ - // Doesn't copy any files with a txt extension + // Doesn't copy any files with a txt extension '*.txt', - + // Doesn't copy any file, even if they start with a dot '**/*', - + // Doesn't copy any file, except if they start with a dot { glob: '**/*', dot: false } ], - + // By default, we only copy modified files during // a watch or webpack-dev-server build. Setting this // to `true` copies all files. diff --git a/types/copy-webpack-plugin/tsconfig.json b/types/copy-webpack-plugin/tsconfig.json index 026508651e..8bb618a386 100644 --- a/types/copy-webpack-plugin/tsconfig.json +++ b/types/copy-webpack-plugin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-ionic/tsconfig.json b/types/cordova-ionic/tsconfig.json index 52153dc3a6..67164add65 100644 --- a/types/cordova-ionic/tsconfig.json +++ b/types/cordova-ionic/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-app-version/tsconfig.json b/types/cordova-plugin-app-version/tsconfig.json index bf9fa4b727..22d3a48e1d 100644 --- a/types/cordova-plugin-app-version/tsconfig.json +++ b/types/cordova-plugin-app-version/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-background-mode/tsconfig.json b/types/cordova-plugin-background-mode/tsconfig.json index 2f4b1be013..9a2df069f6 100644 --- a/types/cordova-plugin-background-mode/tsconfig.json +++ b/types/cordova-plugin-background-mode/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-badge/tsconfig.json b/types/cordova-plugin-badge/tsconfig.json index 1354c708fd..8fd3f33576 100644 --- a/types/cordova-plugin-badge/tsconfig.json +++ b/types/cordova-plugin-badge/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-ble-central/tsconfig.json b/types/cordova-plugin-ble-central/tsconfig.json index 84cd1205c3..3c31e21f9e 100644 --- a/types/cordova-plugin-ble-central/tsconfig.json +++ b/types/cordova-plugin-ble-central/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-canvascamera/tsconfig.json b/types/cordova-plugin-canvascamera/tsconfig.json index dcc6bf63a2..487b814e24 100644 --- a/types/cordova-plugin-canvascamera/tsconfig.json +++ b/types/cordova-plugin-canvascamera/tsconfig.json @@ -11,6 +11,7 @@ "strictFunctionTypes": true, "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/cordova-plugin-device-name/tsconfig.json b/types/cordova-plugin-device-name/tsconfig.json index c74e58b914..a1c3a4bf29 100644 --- a/types/cordova-plugin-device-name/tsconfig.json +++ b/types/cordova-plugin-device-name/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-email-composer/tsconfig.json b/types/cordova-plugin-email-composer/tsconfig.json index 9de9930ed1..44cd31aecf 100644 --- a/types/cordova-plugin-email-composer/tsconfig.json +++ b/types/cordova-plugin-email-composer/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-file-opener2/tsconfig.json b/types/cordova-plugin-file-opener2/tsconfig.json index 0b84dfe84e..25d0779575 100644 --- a/types/cordova-plugin-file-opener2/tsconfig.json +++ b/types/cordova-plugin-file-opener2/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-ibeacon/tsconfig.json b/types/cordova-plugin-ibeacon/tsconfig.json index ba0aa9b7cf..b5423bd3ce 100644 --- a/types/cordova-plugin-ibeacon/tsconfig.json +++ b/types/cordova-plugin-ibeacon/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-insomnia/tsconfig.json b/types/cordova-plugin-insomnia/tsconfig.json index 9704e7c020..63dbb10719 100644 --- a/types/cordova-plugin-insomnia/tsconfig.json +++ b/types/cordova-plugin-insomnia/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-keyboard/tsconfig.json b/types/cordova-plugin-keyboard/tsconfig.json index 730b84c530..dd15c4b9c0 100644 --- a/types/cordova-plugin-keyboard/tsconfig.json +++ b/types/cordova-plugin-keyboard/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-mapsforge/tsconfig.json b/types/cordova-plugin-mapsforge/tsconfig.json index 2be513a0d3..589214939d 100644 --- a/types/cordova-plugin-mapsforge/tsconfig.json +++ b/types/cordova-plugin-mapsforge/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-ms-adal/tsconfig.json b/types/cordova-plugin-ms-adal/tsconfig.json index 9ebb3fca10..c49b79dbbc 100644 --- a/types/cordova-plugin-ms-adal/tsconfig.json +++ b/types/cordova-plugin-ms-adal/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-native-keyboard/tsconfig.json b/types/cordova-plugin-native-keyboard/tsconfig.json index 72ec2f6371..7d6b7d30ab 100644 --- a/types/cordova-plugin-native-keyboard/tsconfig.json +++ b/types/cordova-plugin-native-keyboard/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-ouralabs/tsconfig.json b/types/cordova-plugin-ouralabs/tsconfig.json index 2cbd8ea053..4a333de1ae 100644 --- a/types/cordova-plugin-ouralabs/tsconfig.json +++ b/types/cordova-plugin-ouralabs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-qrscanner/tsconfig.json b/types/cordova-plugin-qrscanner/tsconfig.json index e2ef38fa17..729bd22650 100644 --- a/types/cordova-plugin-qrscanner/tsconfig.json +++ b/types/cordova-plugin-qrscanner/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-spinner/tsconfig.json b/types/cordova-plugin-spinner/tsconfig.json index 19ec9b294f..4beead8631 100644 --- a/types/cordova-plugin-spinner/tsconfig.json +++ b/types/cordova-plugin-spinner/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-websql/tsconfig.json b/types/cordova-plugin-websql/tsconfig.json index db8d59bbe6..35d55b1bcb 100644 --- a/types/cordova-plugin-websql/tsconfig.json +++ b/types/cordova-plugin-websql/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-plugin-x-socialsharing/tsconfig.json b/types/cordova-plugin-x-socialsharing/tsconfig.json index e2c4bc63d9..d5ae67f587 100644 --- a/types/cordova-plugin-x-socialsharing/tsconfig.json +++ b/types/cordova-plugin-x-socialsharing/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-sqlite-storage/tsconfig.json b/types/cordova-sqlite-storage/tsconfig.json index a9eb2af0ad..1cd9548087 100644 --- a/types/cordova-sqlite-storage/tsconfig.json +++ b/types/cordova-sqlite-storage/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova-universal-links-plugin/tsconfig.json b/types/cordova-universal-links-plugin/tsconfig.json index 69322a9265..29ccaf6d57 100644 --- a/types/cordova-universal-links-plugin/tsconfig.json +++ b/types/cordova-universal-links-plugin/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "cordova-universal-links-plugin-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/cordova/tsconfig.json b/types/cordova/tsconfig.json index 591c25a1bb..11e7c87397 100644 --- a/types/cordova/tsconfig.json +++ b/types/cordova/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordova_app_version_plugin/tsconfig.json b/types/cordova_app_version_plugin/tsconfig.json index 2f439d4979..c0f2279ce6 100644 --- a/types/cordova_app_version_plugin/tsconfig.json +++ b/types/cordova_app_version_plugin/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cordovarduino/tsconfig.json b/types/cordovarduino/tsconfig.json index cb0cf33a1a..bfd40c8cee 100644 --- a/types/cordovarduino/tsconfig.json +++ b/types/cordovarduino/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/core-js/tsconfig.json b/types/core-js/tsconfig.json index a342d6c1bd..ce3411f183 100644 --- a/types/core-js/tsconfig.json +++ b/types/core-js/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cors/tsconfig.json b/types/cors/tsconfig.json index e9e1db77eb..c0a8ce0c52 100644 --- a/types/cors/tsconfig.json +++ b/types/cors/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cote/tsconfig.json b/types/cote/tsconfig.json index c25e78e090..4790b11aa5 100644 --- a/types/cote/tsconfig.json +++ b/types/cote/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/couchbase/tsconfig.json b/types/couchbase/tsconfig.json index 66ef360c2c..cf19e79d12 100644 --- a/types/couchbase/tsconfig.json +++ b/types/couchbase/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/countdown/tsconfig.json b/types/countdown/tsconfig.json index bf1074d820..21aa002443 100644 --- a/types/countdown/tsconfig.json +++ b/types/countdown/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/counterpart/tsconfig.json b/types/counterpart/tsconfig.json index 1a771cd73c..9a07a722df 100644 --- a/types/counterpart/tsconfig.json +++ b/types/counterpart/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/countries-and-timezones/tsconfig.json b/types/countries-and-timezones/tsconfig.json index e5f7728b57..ef7c8d2eb0 100644 --- a/types/countries-and-timezones/tsconfig.json +++ b/types/countries-and-timezones/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/country-list/tsconfig.json b/types/country-list/tsconfig.json index 30433764bf..12c80648b7 100644 --- a/types/country-list/tsconfig.json +++ b/types/country-list/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/country-select-js/tsconfig.json b/types/country-select-js/tsconfig.json index 56cb852a6d..a7bf843a06 100644 --- a/types/country-select-js/tsconfig.json +++ b/types/country-select-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/coverup/tsconfig.json b/types/coverup/tsconfig.json index 6102ad61b3..fbef238950 100644 --- a/types/coverup/tsconfig.json +++ b/types/coverup/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "coverup-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/cp-file/tsconfig.json b/types/cp-file/tsconfig.json index 12138d0002..e91ced1737 100644 --- a/types/cp-file/tsconfig.json +++ b/types/cp-file/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cpx/tsconfig.json b/types/cpx/tsconfig.json index d22546d432..8001a3fdea 100644 --- a/types/cpx/tsconfig.json +++ b/types/cpx/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "cpx-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/cpy/tsconfig.json b/types/cpy/tsconfig.json index 90098461b2..f7a536d8b5 100644 --- a/types/cpy/tsconfig.json +++ b/types/cpy/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cqrs-domain/tsconfig.json b/types/cqrs-domain/tsconfig.json index 7ea1caa8ec..8a2e98724d 100644 --- a/types/cqrs-domain/tsconfig.json +++ b/types/cqrs-domain/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "cqrs-domain-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/cradle/tsconfig.json b/types/cradle/tsconfig.json index 694d713edf..ea956b2e2f 100644 --- a/types/cradle/tsconfig.json +++ b/types/cradle/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/crc/tsconfig.json b/types/crc/tsconfig.json index 96511b6609..2b2be4c34d 100644 --- a/types/crc/tsconfig.json +++ b/types/crc/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/create-error/tsconfig.json b/types/create-error/tsconfig.json index 7ff8a82807..c5351c2e5a 100644 --- a/types/create-error/tsconfig.json +++ b/types/create-error/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/create-react-class/create-react-class-tests.ts b/types/create-react-class/create-react-class-tests.ts index ae62233135..b8025b23f0 100644 --- a/types/create-react-class/create-react-class-tests.ts +++ b/types/create-react-class/create-react-class-tests.ts @@ -1,7 +1,7 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; import * as DOM from "react-dom-factories"; -import * as createReactClass from "create-react-class"; +import createReactClass = require("create-react-class"); interface Props { foo: string; diff --git a/types/create-react-class/tsconfig.json b/types/create-react-class/tsconfig.json index b003c69e53..71314e3d35 100644 --- a/types/create-react-class/tsconfig.json +++ b/types/create-react-class/tsconfig.json @@ -16,10 +16,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "preserve" }, "files": [ "index.d.ts", "create-react-class-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/createjs-lib/tsconfig.json b/types/createjs-lib/tsconfig.json index 02963e3afd..352332b6c7 100644 --- a/types/createjs-lib/tsconfig.json +++ b/types/createjs-lib/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/createjs/tsconfig.json b/types/createjs/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/createjs/tsconfig.json +++ b/types/createjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/credential/tsconfig.json b/types/credential/tsconfig.json index fb8e758820..f2866ca2d6 100644 --- a/types/credential/tsconfig.json +++ b/types/credential/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/credit-card-type/tsconfig.json b/types/credit-card-type/tsconfig.json index 0a3b957a29..9af8700b89 100644 --- a/types/credit-card-type/tsconfig.json +++ b/types/credit-card-type/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cron/tsconfig.json b/types/cron/tsconfig.json index 19a72853db..ce814daac4 100644 --- a/types/cron/tsconfig.json +++ b/types/cron/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cropperjs/index.d.ts b/types/cropperjs/index.d.ts index cca1d6a39b..60b508dd8f 100644 --- a/types/cropperjs/index.d.ts +++ b/types/cropperjs/index.d.ts @@ -488,6 +488,21 @@ declare class cropperjs { */ rotateTo(degree: number): void; + /** + * Scale the image. + */ + scale(scaleX: number, scaleY?: number): void; + + /** + * Scale the abscissa of the image. + */ + scaleX(scaleX: number): void; + + /** + * Scale the ordinate of the image. + */ + scaleY(scaleY: number): void; + /** * Clear the crop box. */ diff --git a/types/cropperjs/tsconfig.json b/types/cropperjs/tsconfig.json index ea6b7edb26..928c16ebf8 100644 --- a/types/cropperjs/tsconfig.json +++ b/types/cropperjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/croppie/tsconfig.json b/types/croppie/tsconfig.json index aa4a07017d..f0bbbaaad6 100644 --- a/types/croppie/tsconfig.json +++ b/types/croppie/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cross-spawn/cross-spawn-tests.ts b/types/cross-spawn/cross-spawn-tests.ts new file mode 100644 index 0000000000..6cb36510d8 --- /dev/null +++ b/types/cross-spawn/cross-spawn-tests.ts @@ -0,0 +1,20 @@ +import spawn = require('cross-spawn'); +import * as cp from 'child_process'; + +const p1: cp.ChildProcess = spawn('my-cmd', ['foo', 'bar']); +const pw: cp.ChildProcess = spawn('my-cmd', ['foo', 'bar'], {env: process.env}); + +pw.on('error', (err: Error) => { + console.log(err); +}); + +const r1: Error = spawn.sync('foo').error; +const r2: string[] = spawn.sync('foo').output; +const r3: Buffer = spawn.sync('foo').stdout; +const r4: Buffer = spawn.sync('foo').stderr; +const r5: number = spawn.sync('foo').status; +const r6: string = spawn.sync('foo').signal; +const r7: string = spawn.sync('foo', {encoding: 'utf8'}).stdout; + +spawn.sync('foo', ['bar']); +spawn.sync('foo', ['bar'], {stdio: 'inherit'}); diff --git a/types/cross-spawn/index.d.ts b/types/cross-spawn/index.d.ts new file mode 100644 index 0000000000..8544b37528 --- /dev/null +++ b/types/cross-spawn/index.d.ts @@ -0,0 +1,16 @@ +// Type definitions for cross-spawn 6.0 +// Project: https://github.com/moxystudio/node-cross-spawn +// Definitions by: Alorel +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as child_process from 'child_process'; + +declare function spawn(command: string, args?: string[], options?: child_process.SpawnOptions): child_process.ChildProcess; + +declare namespace spawn { + const sync: typeof child_process.spawnSync; +} + +export = spawn; diff --git a/types/cross-spawn/tsconfig.json b/types/cross-spawn/tsconfig.json new file mode 100644 index 0000000000..6e4bd2b252 --- /dev/null +++ b/types/cross-spawn/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "cross-spawn-tests.ts" + ] +} \ No newline at end of file diff --git a/types/cross-spawn/tslint.json b/types/cross-spawn/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cross-spawn/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/cross-storage/tsconfig.json b/types/cross-storage/tsconfig.json index eb05417639..dc6b6a3c54 100644 --- a/types/cross-storage/tsconfig.json +++ b/types/cross-storage/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/crossfilter/tsconfig.json b/types/crossfilter/tsconfig.json index bc0573220f..8a107d0e84 100644 --- a/types/crossfilter/tsconfig.json +++ b/types/crossfilter/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/crossroads/tsconfig.json b/types/crossroads/tsconfig.json index b948857129..e1bb7591ed 100644 --- a/types/crossroads/tsconfig.json +++ b/types/crossroads/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cryptiles/tsconfig.json b/types/cryptiles/tsconfig.json index 6ae78bacb4..5309e478b8 100644 --- a/types/cryptiles/tsconfig.json +++ b/types/cryptiles/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/crypto-js/tsconfig.json b/types/crypto-js/tsconfig.json index 62ec3d1e40..04f4de4b4e 100644 --- a/types/crypto-js/tsconfig.json +++ b/types/crypto-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cryptojs/tsconfig.json b/types/cryptojs/tsconfig.json index 6747ffb9c5..63a696b449 100644 --- a/types/cryptojs/tsconfig.json +++ b/types/cryptojs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cson/tsconfig.json b/types/cson/tsconfig.json index a5ca0a8041..b7012ed2ba 100644 --- a/types/cson/tsconfig.json +++ b/types/cson/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/csprng/tsconfig.json b/types/csprng/tsconfig.json index b921bb3b7c..20e30e0d3c 100644 --- a/types/csprng/tsconfig.json +++ b/types/csprng/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/csrf/tsconfig.json b/types/csrf/tsconfig.json index 423d71f3c2..57efe7e073 100644 --- a/types/csrf/tsconfig.json +++ b/types/csrf/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/css-font-loading-module/tsconfig.json b/types/css-font-loading-module/tsconfig.json index b45d115596..2c64ee6074 100644 --- a/types/css-font-loading-module/tsconfig.json +++ b/types/css-font-loading-module/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/css-modules-require-hook/tsconfig.json b/types/css-modules-require-hook/tsconfig.json index e7f91df2f8..269853fbce 100644 --- a/types/css-modules-require-hook/tsconfig.json +++ b/types/css-modules-require-hook/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/css-modules/tsconfig.json b/types/css-modules/tsconfig.json index e079616b1d..c6294d2857 100644 --- a/types/css-modules/tsconfig.json +++ b/types/css-modules/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/css/tsconfig.json b/types/css/tsconfig.json index 7a69ddb612..50451f88d4 100644 --- a/types/css/tsconfig.json +++ b/types/css/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cssbeautify/tsconfig.json b/types/cssbeautify/tsconfig.json index a8c452dc97..627f481a2b 100644 --- a/types/cssbeautify/tsconfig.json +++ b/types/cssbeautify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/csurf/tsconfig.json b/types/csurf/tsconfig.json index 02963e3afd..352332b6c7 100644 --- a/types/csurf/tsconfig.json +++ b/types/csurf/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/csv-parse/tsconfig.json b/types/csv-parse/tsconfig.json index 2b52f434a2..fe155d7602 100644 --- a/types/csv-parse/tsconfig.json +++ b/types/csv-parse/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/csv-stringify/tsconfig.json b/types/csv-stringify/tsconfig.json index 766e9c084e..8c66a29cda 100644 --- a/types/csv-stringify/tsconfig.json +++ b/types/csv-stringify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/csvrow/tsconfig.json b/types/csvrow/tsconfig.json index 7fc1637725..76cb98cf19 100644 --- a/types/csvrow/tsconfig.json +++ b/types/csvrow/tsconfig.json @@ -14,10 +14,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, - "strictFunctionTypes" : true + "esModuleInterop": true, + "strictFunctionTypes": true }, "files": [ "index.d.ts", "csvrow-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/csvtojson/tsconfig.json b/types/csvtojson/tsconfig.json index 91b15a3856..3dde8e70e7 100644 --- a/types/csvtojson/tsconfig.json +++ b/types/csvtojson/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cucumber/cucumber-tests.ts b/types/cucumber/cucumber-tests.ts index f2aed9aec4..b7fa675095 100644 --- a/types/cucumber/cucumber-tests.ts +++ b/types/cucumber/cucumber-tests.ts @@ -1,6 +1,12 @@ import * as assert from "power-assert"; +import { setWorldConstructor, defineParameterType, After, AfterAll, Before, BeforeAll, Given, When, Then } from "cucumber"; import cucumber = require("cucumber"); +type Callback = cucumber.CallbackStepDefinition; +type Table = cucumber.TableDefinition; +type HookScenarioResult = cucumber.HookScenarioResult; +const Status = cucumber.Status; + // You can optionally declare your own world properties declare module "cucumber" { interface World { @@ -8,190 +14,166 @@ declare module "cucumber" { } } -function StepSample() { - type Callback = cucumber.CallbackStepDefinition; - type Table = cucumber.TableDefinition; - type HookScenarioResult = cucumber.HookScenarioResult; - const Status = cucumber.Status; - - cucumber.defineSupportCode(({setWorldConstructor, defineParameterType, After, AfterAll, Around, Before, BeforeAll, registerHandler, Given, When, Then}) => { - setWorldConstructor(function({attach, parameters}) { - this.attach = attach; - this.parameters = parameters; - this.visit = (url: string, callback: Callback) => { - callback(null, 'pending'); - }; - }); - - Before((scenarioResult: HookScenarioResult, callback: Callback) => { - console.log(scenarioResult.result.status === Status.FAILED); - callback(); - }); - - Before({ timeout: 1000 }, (scenarioResult: HookScenarioResult, callback: Callback) => { - console.log(scenarioResult.result.status === Status.FAILED); - callback(); - }); - - Before('@tag', (scenarioResult: HookScenarioResult, callback: Callback) => { - console.log(scenarioResult.result.status === Status.FAILED); - callback(); - }); - - BeforeAll((callback: Callback) => { - console.log("Before all"); - callback(); - }); - - BeforeAll({ timeout: 1000 }, (callback: Callback) => { - console.log("Before all"); - callback(); - }); - - BeforeAll('@tag', (callback: Callback) => { - console.log("Before all"); - callback(); - }); - - Around((scenarioResult: HookScenarioResult, runScenario: (error: string | null, callback?: () => void) => void) => { - if (scenarioResult.result.status === Status.FAILED) { - runScenario(null, () => { - console.log('finish tasks'); - }); - } - }); - - After((scenarioResult: HookScenarioResult, callback: Callback) => { - console.log("After"); - callback(); - }); - - After({ timeout: 1000 }, (scenarioResult: HookScenarioResult, callback: Callback) => { - console.log("After"); - callback(); - }); - - After('@tag', (scenarioResult: HookScenarioResult, callback: Callback) => { - console.log("After"); - callback(); - }); - - AfterAll((callback: Callback) => { - console.log("After all"); - callback(); - }); - - AfterAll({ timeout: 1000 }, (callback: Callback) => { - console.log("After all"); - callback(); - }); - - AfterAll('@tag', (callback: Callback) => { - console.log("After all"); - callback(); - }); - - registerHandler('AfterFeatures', (event: any, callback: () => void) => { - callback(); - }); - - Given(/^a variable set to (\d+)$/, (x: string) => { - console.log("the number is: " + x); - }); - - Given(/^a variable set to (\d+)$/, (x: number) => { - console.log(typeof x); - }); - - Given(/^I am on the Cucumber.js GitHub repository$/, function(callback: Callback) { - this.visit('https://github.com/cucumber/cucumber-js', callback); - }); - - When(/^I go to the README file$/, (title: string, callback: Callback) => { +function StepSampleWithoutDefineSupportCode() { + setWorldConstructor(function({attach, parameters}) { + this.attach = attach; + this.parameters = parameters; + this.visit = (url: string, callback: Callback) => { callback(null, 'pending'); - }); - - Then(/^I should see "(.*)" as the page title$/, {timeout: 60 * 1000}, function(title: string, callback: Callback) { - const pageTitle = this.browser.text('title'); - - if (title === pageTitle) { - callback(); - } else { - callback(new Error("Expected to be on page with title " + title)); - } - }); - - // Type for data_table.js on - // https://github.com/cucumber/cucumber-js/blob/a5fd8251918c278ab2e389226d165cedb44df14a/lib/cucumber/ast/data_table.js - - Given(/^a table step with Table raw$/, (table: Table) => { - const expected = [ - ['Cucumber', 'Cucumis sativus'], - ['Burr Gherkin', 'Cucumis anguria'] - ]; - const actual: string[][] = table.raw(); - assert.deepEqual(actual, expected); - }); - - Given(/^a table step with Table rows$/, (table: Table) => { - const expected = [ - ['Apricot', '5'], - ['Brocolli', '2'], - ['Cucumber', '10'] - ]; - const actual: string[][] = table.rows(); - assert.deepEqual(actual, expected); - }); - - Given(/^a table step with Table rowHash$/, (table: Table) => { - const expected = { - Cucumber: 'Cucumis sativus', - 'Burr Gherkin': 'Cucumis anguria' - }; - const actual: { [firstCol: string]: string } = table.rowsHash(); - assert.deepEqual(actual, expected); - }); - - Given(/^a table step$/, (table: Table) => { - const expected = [ - {Vegetable: 'Apricot', Rating: '5'}, - {Vegetable: 'Brocolli', Rating: '2'}, - {Vegetable: 'Cucumber', Rating: '10'} - ]; - const actual: Array<{ [colName: string]: string }> = table.hashes(); - assert.deepEqual(actual, expected); - }); - - defineParameterType({ - regexp: /particular/, - transformer: s => s.toUpperCase(), - typeName: 'param' // deprecated but still supported - }); - - defineParameterType({ - regexp: /particularly/, - transformer: s => s.toUpperCase(), - name: 'param' - }); - - Given('a {param} step', param => { - assert.equal(param, 'PARTICULAR'); - }); + }; }); - const fns: cucumber.SupportCodeConsumer[] = cucumber.getSupportCodeFns(); + Before((scenarioResult: HookScenarioResult, callback: Callback) => { + console.log(scenarioResult.result.status === Status.FAILED); + callback(); + }); - cucumber.clearSupportCodeFns(); -} + Before({ timeout: 1000 }, (scenarioResult: HookScenarioResult, callback: Callback) => { + console.log(scenarioResult.result.status === Status.FAILED); + callback(); + }); -function registerListener(): cucumber.EventListener { - const listener = Object.assign(cucumber.Listener(), { - handleBeforeScenarioEvent: (scenario: cucumber.events.ScenarioPayload, callback: () => void) => { - // do some interesting stuff ... + Before('@tag', (scenarioResult: HookScenarioResult, callback: Callback) => { + console.log(scenarioResult.result.status === Status.FAILED); + callback(); + }); + BeforeAll((callback: Callback) => { + console.log("Before all"); + callback(); + }); + + BeforeAll({ timeout: 1000 }, (callback: Callback) => { + console.log("Before all"); + callback(); + }); + + BeforeAll('@tag', (callback: Callback) => { + console.log("Before all"); + callback(); + }); + + After((scenarioResult: HookScenarioResult, callback: Callback) => { + console.log("After"); + callback(); + }); + + After({ timeout: 1000 }, (scenarioResult: HookScenarioResult, callback: Callback) => { + console.log("After"); + callback(); + }); + + After('@tag', (scenarioResult: HookScenarioResult, callback: Callback) => { + console.log("After"); + callback(); + }); + + AfterAll((callback: Callback) => { + console.log("After all"); + callback(); + }); + + AfterAll({ timeout: 1000 }, (callback: Callback) => { + console.log("After all"); + callback(); + }); + + AfterAll('@tag', (callback: Callback) => { + console.log("After all"); + callback(); + }); + + Given(/^a variable set to (\d+)$/, (x: string) => { + console.log("the number is: " + x); + }); + + Given(/^a variable set to (\d+)$/, (x: number) => { + console.log(typeof x); + }); + + Given(/^I am on the Cucumber.js GitHub repository$/, function(callback: Callback) { + this.visit('https://github.com/cucumber/cucumber-js', callback); + }); + + When(/^I go to the README file$/, (title: string, callback: Callback) => { + callback(null, 'pending'); + }); + + Then(/^I should see "(.*)" as the page title$/, {timeout: 60 * 1000}, function(title: string, callback: Callback) { + const pageTitle = this.browser.text('title'); + + if (title === pageTitle) { callback(); + } else { + callback(new Error("Expected to be on page with title " + title)); } }); - return listener; + // Type for data_table.js on + // https://github.com/cucumber/cucumber-js/blob/a5fd8251918c278ab2e389226d165cedb44df14a/lib/cucumber/ast/data_table.js + + Given(/^a table step with Table raw$/, (table: Table) => { + const expected = [ + ['Cucumber', 'Cucumis sativus'], + ['Burr Gherkin', 'Cucumis anguria'] + ]; + const actual: string[][] = table.raw(); + assert.deepEqual(actual, expected); + }); + + Given(/^a table step with Table rows$/, (table: Table) => { + const expected = [ + ['Apricot', '5'], + ['Brocolli', '2'], + ['Cucumber', '10'] + ]; + const actual: string[][] = table.rows(); + assert.deepEqual(actual, expected); + }); + + Given(/^a table step with Table rowHash$/, (table: Table) => { + const expected = { + Cucumber: 'Cucumis sativus', + 'Burr Gherkin': 'Cucumis anguria' + }; + const actual: { [firstCol: string]: string } = table.rowsHash(); + assert.deepEqual(actual, expected); + }); + + Given(/^a table step$/, (table: Table) => { + const expected = [ + {Vegetable: 'Apricot', Rating: '5'}, + {Vegetable: 'Brocolli', Rating: '2'}, + {Vegetable: 'Cucumber', Rating: '10'} + ]; + const actual: Array<{ [colName: string]: string }> = table.hashes(); + assert.deepEqual(actual, expected); + }); + + defineParameterType({ + regexp: /particular/, + transformer: s => s.toUpperCase(), + typeName: 'param' // deprecated but still supported + }); + + defineParameterType({ + regexp: /particularly/, + transformer: s => s.toUpperCase(), + name: 'param', + preferForRegexpMatch: false, + useForSnippets: false + }); + + Given('a {param} step', param => { + assert.equal(param, 'PARTICULAR'); + }); } + +// syntax defineSupportCode deprecated +function StepSample() { + cucumber.defineSupportCode((l) => { + }); +} + +const fns: cucumber.SupportCodeConsumer[] = cucumber.getSupportCodeFns(); +cucumber.clearSupportCodeFns(); diff --git a/types/cucumber/index.d.ts b/types/cucumber/index.d.ts index 8c2ad7020e..c222ad567a 100644 --- a/types/cucumber/index.d.ts +++ b/types/cucumber/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for cucumber-js 3.2 +// Type definitions for cucumber-js 4.0 // Project: https://github.com/cucumber/cucumber-js // Definitions by: Abraão Alves // Jan Molak @@ -49,6 +49,29 @@ export interface StepDefinitions { setDefaultTimeout(time: number): void; } +export function After(code: HookCode): void; +export function After(options: HookOptions | string, code: HookCode): void; +export function AfterAll(code: GlobalHookCode): void; +export function AfterAll(options: HookOptions | string, code: GlobalHookCode): void; +export function Before(code: HookCode): void; +export function Before(options: HookOptions | string, code: HookCode): void; +export function BeforeAll(code: GlobalHookCode): void; +export function BeforeAll(options: HookOptions | string, code: GlobalHookCode): void; + +export function defineParameterType(transform: Transform): void; +export function defineStep(pattern: RegExp | string, code: StepDefinitionCode): void; + +export function Given(pattern: RegExp | string, code: StepDefinitionCode): void; +export function Given(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; +export function setDefaultTimeout(time: number): void; +export function setDefinitionFunctionWrapper(fn: () => void, options?: {[key: string]: any}): void; +// tslint:disable-next-line ban-types +export function setWorldConstructor(world: ((this: World, init: {attach: Function, parameters: {[key: string]: any}}) => void) | {}): void; +export function Then(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; +export function Then(pattern: RegExp | string, code: StepDefinitionCode): void; +export function When(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; +export function When(pattern: RegExp | string, code: StepDefinitionCode): void; + export interface HookScenarioResult { sourceLocation: SourceLocation; result: ScenarioResult; @@ -98,12 +121,11 @@ export namespace pickle { export type HookCode = (this: World, scenario: HookScenarioResult, callback?: CallbackStepDefinition) => void; export type GlobalHookCode = (callback?: CallbackStepDefinition) => void; -// tslint:disable-next-line ban-types -export type AroundCode = (scenario: HookScenarioResult, runScenario?: (error: string, callback?: Function) => void) => void; - export interface Transform { regexp: RegExp; transformer(arg: string): any; + useForSnippets?: boolean; + preferForRegexpMatch?: boolean; name?: string; typeName?: string; // deprecated } @@ -122,12 +144,9 @@ export interface Hooks { After(options: HookOptions | string, code: HookCode): void; AfterAll(code: GlobalHookCode): void; AfterAll(options: HookOptions | string, code: GlobalHookCode): void; - Around(code: AroundCode): void; setDefaultTimeout(time: number): void; // tslint:disable-next-line ban-types setWorldConstructor(world: ((this: World, init: {attach: Function, parameters: {[key: string]: any}}) => void) | {}): void; - registerHandler(handlerOption: string, code: (event: any, callback: CallbackStepDefinition) => void): void; - registerListener(listener: EventListener): void; defineParameterType(transform: Transform): void; } diff --git a/types/cucumber/tsconfig.json b/types/cucumber/tsconfig.json index e2f9cd081b..53ede2654b 100644 --- a/types/cucumber/tsconfig.json +++ b/types/cucumber/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cucumber/v1/tsconfig.json b/types/cucumber/v1/tsconfig.json index 343c701491..495158d6b0 100644 --- a/types/cucumber/v1/tsconfig.json +++ b/types/cucumber/v1/tsconfig.json @@ -23,7 +23,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cucumber/v3/cucumber-tests.ts b/types/cucumber/v3/cucumber-tests.ts new file mode 100644 index 0000000000..f2aed9aec4 --- /dev/null +++ b/types/cucumber/v3/cucumber-tests.ts @@ -0,0 +1,197 @@ +import * as assert from "power-assert"; +import cucumber = require("cucumber"); + +// You can optionally declare your own world properties +declare module "cucumber" { + interface World { + visit(url: string, callback: CallbackStepDefinition): void; + } +} + +function StepSample() { + type Callback = cucumber.CallbackStepDefinition; + type Table = cucumber.TableDefinition; + type HookScenarioResult = cucumber.HookScenarioResult; + const Status = cucumber.Status; + + cucumber.defineSupportCode(({setWorldConstructor, defineParameterType, After, AfterAll, Around, Before, BeforeAll, registerHandler, Given, When, Then}) => { + setWorldConstructor(function({attach, parameters}) { + this.attach = attach; + this.parameters = parameters; + this.visit = (url: string, callback: Callback) => { + callback(null, 'pending'); + }; + }); + + Before((scenarioResult: HookScenarioResult, callback: Callback) => { + console.log(scenarioResult.result.status === Status.FAILED); + callback(); + }); + + Before({ timeout: 1000 }, (scenarioResult: HookScenarioResult, callback: Callback) => { + console.log(scenarioResult.result.status === Status.FAILED); + callback(); + }); + + Before('@tag', (scenarioResult: HookScenarioResult, callback: Callback) => { + console.log(scenarioResult.result.status === Status.FAILED); + callback(); + }); + + BeforeAll((callback: Callback) => { + console.log("Before all"); + callback(); + }); + + BeforeAll({ timeout: 1000 }, (callback: Callback) => { + console.log("Before all"); + callback(); + }); + + BeforeAll('@tag', (callback: Callback) => { + console.log("Before all"); + callback(); + }); + + Around((scenarioResult: HookScenarioResult, runScenario: (error: string | null, callback?: () => void) => void) => { + if (scenarioResult.result.status === Status.FAILED) { + runScenario(null, () => { + console.log('finish tasks'); + }); + } + }); + + After((scenarioResult: HookScenarioResult, callback: Callback) => { + console.log("After"); + callback(); + }); + + After({ timeout: 1000 }, (scenarioResult: HookScenarioResult, callback: Callback) => { + console.log("After"); + callback(); + }); + + After('@tag', (scenarioResult: HookScenarioResult, callback: Callback) => { + console.log("After"); + callback(); + }); + + AfterAll((callback: Callback) => { + console.log("After all"); + callback(); + }); + + AfterAll({ timeout: 1000 }, (callback: Callback) => { + console.log("After all"); + callback(); + }); + + AfterAll('@tag', (callback: Callback) => { + console.log("After all"); + callback(); + }); + + registerHandler('AfterFeatures', (event: any, callback: () => void) => { + callback(); + }); + + Given(/^a variable set to (\d+)$/, (x: string) => { + console.log("the number is: " + x); + }); + + Given(/^a variable set to (\d+)$/, (x: number) => { + console.log(typeof x); + }); + + Given(/^I am on the Cucumber.js GitHub repository$/, function(callback: Callback) { + this.visit('https://github.com/cucumber/cucumber-js', callback); + }); + + When(/^I go to the README file$/, (title: string, callback: Callback) => { + callback(null, 'pending'); + }); + + Then(/^I should see "(.*)" as the page title$/, {timeout: 60 * 1000}, function(title: string, callback: Callback) { + const pageTitle = this.browser.text('title'); + + if (title === pageTitle) { + callback(); + } else { + callback(new Error("Expected to be on page with title " + title)); + } + }); + + // Type for data_table.js on + // https://github.com/cucumber/cucumber-js/blob/a5fd8251918c278ab2e389226d165cedb44df14a/lib/cucumber/ast/data_table.js + + Given(/^a table step with Table raw$/, (table: Table) => { + const expected = [ + ['Cucumber', 'Cucumis sativus'], + ['Burr Gherkin', 'Cucumis anguria'] + ]; + const actual: string[][] = table.raw(); + assert.deepEqual(actual, expected); + }); + + Given(/^a table step with Table rows$/, (table: Table) => { + const expected = [ + ['Apricot', '5'], + ['Brocolli', '2'], + ['Cucumber', '10'] + ]; + const actual: string[][] = table.rows(); + assert.deepEqual(actual, expected); + }); + + Given(/^a table step with Table rowHash$/, (table: Table) => { + const expected = { + Cucumber: 'Cucumis sativus', + 'Burr Gherkin': 'Cucumis anguria' + }; + const actual: { [firstCol: string]: string } = table.rowsHash(); + assert.deepEqual(actual, expected); + }); + + Given(/^a table step$/, (table: Table) => { + const expected = [ + {Vegetable: 'Apricot', Rating: '5'}, + {Vegetable: 'Brocolli', Rating: '2'}, + {Vegetable: 'Cucumber', Rating: '10'} + ]; + const actual: Array<{ [colName: string]: string }> = table.hashes(); + assert.deepEqual(actual, expected); + }); + + defineParameterType({ + regexp: /particular/, + transformer: s => s.toUpperCase(), + typeName: 'param' // deprecated but still supported + }); + + defineParameterType({ + regexp: /particularly/, + transformer: s => s.toUpperCase(), + name: 'param' + }); + + Given('a {param} step', param => { + assert.equal(param, 'PARTICULAR'); + }); + }); + + const fns: cucumber.SupportCodeConsumer[] = cucumber.getSupportCodeFns(); + + cucumber.clearSupportCodeFns(); +} + +function registerListener(): cucumber.EventListener { + const listener = Object.assign(cucumber.Listener(), { + handleBeforeScenarioEvent: (scenario: cucumber.events.ScenarioPayload, callback: () => void) => { + // do some interesting stuff ... + + callback(); + } + }); + + return listener; +} diff --git a/types/cucumber/v3/index.d.ts b/types/cucumber/v3/index.d.ts new file mode 100644 index 0000000000..8c2ad7020e --- /dev/null +++ b/types/cucumber/v3/index.d.ts @@ -0,0 +1,311 @@ +// Type definitions for cucumber-js 3.2 +// Project: https://github.com/cucumber/cucumber-js +// Definitions by: Abraão Alves +// Jan Molak +// Isaiah Soung +// BendingBender +// ErikSchierboom +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +export enum Status { + AMBIGUOUS = "ambiguous", + FAILED = "failed", + PASSED = "passed", + PENDING = "pending", + SKIPPED = "skipped", + UNDEFINED = "undefined" +} + +export interface World { + [key: string]: any; +} + +export interface CallbackStepDefinition { + pending(): PromiseLike; + (error?: any, pending?: string): void; +} + +export interface TableDefinition { + raw(): string[][]; + rows(): string[][]; + rowsHash(): { [firstCol: string]: string }; + hashes(): Array<{ [colName: string]: string }>; +} + +export type StepDefinitionCode = (this: World, ...stepArgs: any[]) => any; + +export interface StepDefinitionOptions { + timeout?: number; +} + +export interface StepDefinitions { + Given(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + Given(pattern: RegExp | string, code: StepDefinitionCode): void; + When(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + When(pattern: RegExp | string, code: StepDefinitionCode): void; + Then(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + Then(pattern: RegExp | string, code: StepDefinitionCode): void; + setDefaultTimeout(time: number): void; +} + +export interface HookScenarioResult { + sourceLocation: SourceLocation; + result: ScenarioResult; + pickle: pickle.Pickle; +} + +export interface SourceLocation { + line: number; + url: string; +} + +export interface ScenarioResult { + duration: number; + status: Status; +} + +export namespace pickle { + interface Pickle { + language: string; + locations: Location[]; + name: string; + steps: Step[]; + tags: string[]; + } + + interface Location { + column: number; + line: number; + } + + interface Step { + arguments: Argument[]; + locations: Location[]; + text: string; + } + + interface Argument { + rows: Cell[]; + } + + interface Cell { + location: Location; + value: string; + } +} + +export type HookCode = (this: World, scenario: HookScenarioResult, callback?: CallbackStepDefinition) => void; +export type GlobalHookCode = (callback?: CallbackStepDefinition) => void; + +// tslint:disable-next-line ban-types +export type AroundCode = (scenario: HookScenarioResult, runScenario?: (error: string, callback?: Function) => void) => void; + +export interface Transform { + regexp: RegExp; + transformer(arg: string): any; + name?: string; + typeName?: string; // deprecated +} + +export interface HookOptions { + timeout?: number; + tags?: any; +} + +export interface Hooks { + Before(code: HookCode): void; + Before(options: HookOptions | string, code: HookCode): void; + BeforeAll(code: GlobalHookCode): void; + BeforeAll(options: HookOptions | string, code: GlobalHookCode): void; + After(code: HookCode): void; + After(options: HookOptions | string, code: HookCode): void; + AfterAll(code: GlobalHookCode): void; + AfterAll(options: HookOptions | string, code: GlobalHookCode): void; + Around(code: AroundCode): void; + setDefaultTimeout(time: number): void; + // tslint:disable-next-line ban-types + setWorldConstructor(world: ((this: World, init: {attach: Function, parameters: {[key: string]: any}}) => void) | {}): void; + registerHandler(handlerOption: string, code: (event: any, callback: CallbackStepDefinition) => void): void; + registerListener(listener: EventListener): void; + defineParameterType(transform: Transform): void; +} + +export class EventListener { + hear(event: events.Event, callback: () => void): void; + hasHandlerForEvent(event: events.Event): boolean; + buildHandlerNameForEvent(event: events.Event): string; + getHandlerForEvent(event: events.Event): EventHook; + buildHandlerName(shortName: string): string; + setHandlerForEvent(shortName: string, handler: EventListener): void; +} + +export function Listener(): EventListener; + +export namespace events { + interface Event { + name: string; + data: any; + } + + // tslint:disable-next-line no-empty-interface + interface EventPayload { + } + + interface FeaturesPayload extends EventPayload { + getFeatures(): any[]; // https://github.com/cucumber/cucumber-js/blob/dc698bf5bc10d591fa7adeec5fa21b2d90dc9679/lib/cucumber/runtime.js#L34 + } + + interface FeaturesResultPayload extends EventPayload { + duration: number; + scenarioResults: any[]; + success: boolean; + stepsResults: any[]; + strict: boolean; + } + + interface FeaturePayload extends EventPayload { + description: string; + keyword: string; + line: number; + name: string; + tags: Tag[]; + uri: string; + scenarios: Scenario[]; + } + + interface ScenarioPayload extends EventPayload { + feature: Feature; + exception: Error; + keyword: string; + lines: number[]; + name: string; + tags: Tag[]; + uri: string; + line: number; + description: string; + steps: Step[]; + } + + interface ScenarioResultPayload extends EventPayload { + duration: any; + failureException: Error; + scenario: Scenario; + status: Status; + stepResults: any[]; + } + + interface StepPayload extends EventPayload { + arguments: any; + line: number; + name: string; + scenario: Scenario; + uri: string; + isBackground: boolean; + keyword: string; + keywordType: string; + } + + interface StepResultPayload extends EventPayload { + ambiguousStepDefinitions: any; + attachments: any[]; + duration: any; + failureException: Error; + step: Step; + stepDefinition: StepDefinition; + status: Status; + } +} + +export interface StepDefinition { + // tslint:disable-next-line ban-types + code: Function; + line: number; + options: {}; + pattern: any; + uri: string; +} + +export interface Tag { + name: string; + line: number; +} + +export interface Step { + arguments: any; + line: number; + name: string; + scenario: Scenario; + uri: string; + isBackground: boolean; + keyword: string; + keywordType: string; +} + +export interface Scenario { + feature: Feature; + exception: Error; + keyword: string; + lines: number[]; + name: string; + tags: Tag[]; + uri: string; + line: number; + description: string; + steps: Step[]; +} + +export interface Feature { + description: string; + keyword: string; + line: number; + name: string; + tags: Tag[]; + uri: string; + scenarios: Scenario[]; +} + +export type EventHook = (event: events.Event, callback?: () => void) => void; + +export type SupportCodeConsumer = (stepDefinitions: StepDefinitions & Hooks) => void; + +export function defineSupportCode(consumer: SupportCodeConsumer): void; + +export function getSupportCodeFns(): SupportCodeConsumer[]; + +export function clearSupportCodeFns(): void; + +// https://github.com/cucumber/cucumber-js/commit/231183a8a11c985ef7ced1155b7a75f5120a34b6 +export class Formatter { + constructor(options?: any); + + log(data: any): void; +} + +export class SummaryFormatter extends Formatter { + indent(text: string, numberOfSpaces: number): any; +} + +export class PrettyFormatter extends SummaryFormatter { + formatTags(tags: Tag[]): any; + logIndented(text: string, level: number): void; + logStepResult(stepResult: any): void; +} + +export class ProgressFormatter extends SummaryFormatter { +} + +export class RerunFormatter extends Formatter { +} + +export class SnippetsFormatter extends Formatter { +} + +export class UsageFormatter extends Formatter { +} + +export class UsageJsonFormatter extends Formatter { +} + +export class JsonFormatter extends Formatter { +} diff --git a/types/cucumber/v3/tsconfig.json b/types/cucumber/v3/tsconfig.json new file mode 100644 index 0000000000..e10dd587c0 --- /dev/null +++ b/types/cucumber/v3/tsconfig.json @@ -0,0 +1,33 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": false, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "paths": { + "cucumber": [ + "cucumber/v3" + ], + "cucumber/*": [ + "cucumber/v3/*" + ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "cucumber-tests.ts" + ] +} \ No newline at end of file diff --git a/types/cucumber/v3/tslint.json b/types/cucumber/v3/tslint.json new file mode 100644 index 0000000000..215db37b37 --- /dev/null +++ b/types/cucumber/v3/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "no-any-union": false, + "rules": { + "no-any-union": false, + "no-unnecessary-generics": false + } +} diff --git a/types/cuid/tsconfig.json b/types/cuid/tsconfig.json index 6aebd0a158..26c0b1289e 100644 --- a/types/cuid/tsconfig.json +++ b/types/cuid/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/currency-formatter/tsconfig.json b/types/currency-formatter/tsconfig.json index 47674cfe0d..21957b7d91 100644 --- a/types/currency-formatter/tsconfig.json +++ b/types/currency-formatter/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/custom-error-generator/tsconfig.json b/types/custom-error-generator/tsconfig.json index ab16a76d97..99512cdf78 100644 --- a/types/custom-error-generator/tsconfig.json +++ b/types/custom-error-generator/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cwise-compiler/cwise-compiler-tests.ts b/types/cwise-compiler/cwise-compiler-tests.ts index 38e19de886..10d43f1930 100644 --- a/types/cwise-compiler/cwise-compiler-tests.ts +++ b/types/cwise-compiler/cwise-compiler-tests.ts @@ -1,9 +1,7 @@ -/// - -import * as parse from 'cwise-parser'; -import * as ndarray from 'ndarray'; -import * as compile from 'cwise-compiler'; -import * as tape from 'tape'; +import parse = require('cwise-parser'); +import ndarray = require('ndarray'); +import compile = require('cwise-compiler'); +import tape = require('tape'); tape("block tests", (t) => { const ops = require('ndarray-ops'); diff --git a/types/cwise-compiler/tsconfig.json b/types/cwise-compiler/tsconfig.json index 083c5f1666..09b88da3d2 100644 --- a/types/cwise-compiler/tsconfig.json +++ b/types/cwise-compiler/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cwise-parser/cwise-parser-tests.ts b/types/cwise-parser/cwise-parser-tests.ts index c50b9be06a..5ee5138a6e 100644 --- a/types/cwise-parser/cwise-parser-tests.ts +++ b/types/cwise-parser/cwise-parser-tests.ts @@ -1,6 +1,5 @@ -import * as parser from "cwise-parser"; -// import parser = require("cwise-parser"); -import * as tape from "tape"; +import parser = require("cwise-parser"); +import tape = require("tape"); tape("basic tests", (t) => { const parsed = parser((a: number, b: number, c: number) => { diff --git a/types/cwise-parser/tsconfig.json b/types/cwise-parser/tsconfig.json index 226bb609fb..b8d5702283 100644 --- a/types/cwise-parser/tsconfig.json +++ b/types/cwise-parser/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cwise/cwise-tests.ts b/types/cwise/cwise-tests.ts index b759fb1a0c..3d88ee40fd 100644 --- a/types/cwise/cwise-tests.ts +++ b/types/cwise/cwise-tests.ts @@ -1,6 +1,6 @@ -import * as cwise from 'cwise'; -import * as ndarray from 'ndarray'; -import * as tape from 'tape'; +import cwise = require('cwise'); +import ndarray = require('ndarray'); +import tape = require('tape'); // basic tape("only allow same shape", (t) => { @@ -150,8 +150,7 @@ tape("binary", (t) => { t.end(); }); -// browserify -import * as browserify from "browserify"; +import browserify = require("browserify"); import * as vm from 'vm'; import * as path from 'path'; diff --git a/types/cwise/tsconfig.json b/types/cwise/tsconfig.json index c1ea871113..d545fa98d3 100644 --- a/types/cwise/tsconfig.json +++ b/types/cwise/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cybozulabs-md5/tsconfig.json b/types/cybozulabs-md5/tsconfig.json index a85459ac83..53d546abf1 100644 --- a/types/cybozulabs-md5/tsconfig.json +++ b/types/cybozulabs-md5/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/cytoscape/tsconfig.json b/types/cytoscape/tsconfig.json index 348734c733..8796925930 100644 --- a/types/cytoscape/tsconfig.json +++ b/types/cytoscape/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-array/tsconfig.json b/types/d3-array/tsconfig.json index a1dbb238ee..58e25ed31f 100644 --- a/types/d3-array/tsconfig.json +++ b/types/d3-array/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-axis/tsconfig.json b/types/d3-axis/tsconfig.json index 5b54d1f622..6bb2a44fd4 100644 --- a/types/d3-axis/tsconfig.json +++ b/types/d3-axis/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-box/tsconfig.json b/types/d3-box/tsconfig.json index d6411b9a05..d0ea7a30a8 100644 --- a/types/d3-box/tsconfig.json +++ b/types/d3-box/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-brush/tsconfig.json b/types/d3-brush/tsconfig.json index 2aeb012361..52ad4235a8 100644 --- a/types/d3-brush/tsconfig.json +++ b/types/d3-brush/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-chord/tsconfig.json b/types/d3-chord/tsconfig.json index eff4938f78..c5fe3e9133 100644 --- a/types/d3-chord/tsconfig.json +++ b/types/d3-chord/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-collection/tsconfig.json b/types/d3-collection/tsconfig.json index c2ae30cdbd..134b625635 100644 --- a/types/d3-collection/tsconfig.json +++ b/types/d3-collection/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-color/tsconfig.json b/types/d3-color/tsconfig.json index d783922755..a6695317db 100644 --- a/types/d3-color/tsconfig.json +++ b/types/d3-color/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-contour/tsconfig.json b/types/d3-contour/tsconfig.json index 345a064caa..deb7c3dc8f 100644 --- a/types/d3-contour/tsconfig.json +++ b/types/d3-contour/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-dispatch/tsconfig.json b/types/d3-dispatch/tsconfig.json index b270a9c1a0..44d0f4c3e8 100644 --- a/types/d3-dispatch/tsconfig.json +++ b/types/d3-dispatch/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-drag/tsconfig.json b/types/d3-drag/tsconfig.json index cb6cab8ba0..f8e6c58777 100644 --- a/types/d3-drag/tsconfig.json +++ b/types/d3-drag/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-dsv/tsconfig.json b/types/d3-dsv/tsconfig.json index 400095c38d..da64649d23 100644 --- a/types/d3-dsv/tsconfig.json +++ b/types/d3-dsv/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "d3-dsv-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/d3-dsv/v0/tsconfig.json b/types/d3-dsv/v0/tsconfig.json index e0ae8b7a42..1a0cae31df 100644 --- a/types/d3-dsv/v0/tsconfig.json +++ b/types/d3-dsv/v0/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-ease/tsconfig.json b/types/d3-ease/tsconfig.json index 6d0831f1a5..ea4d66c4dd 100644 --- a/types/d3-ease/tsconfig.json +++ b/types/d3-ease/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-fetch/d3-fetch-tests.ts b/types/d3-fetch/d3-fetch-tests.ts new file mode 100644 index 0000000000..941955c996 --- /dev/null +++ b/types/d3-fetch/d3-fetch-tests.ts @@ -0,0 +1,51 @@ +import * as d3Fetch from 'd3-fetch'; +import { DSVParsedArray, DSVRowString, DSVRowAny } from 'd3-dsv'; + +interface MyType { + foo: string; +} + +const url = 'foo.bar'; + +const init: RequestInit = {}; + +let p1: Promise = d3Fetch.blob(url); +p1 = d3Fetch.blob(url, init); + +let p2: Promise = d3Fetch.buffer(url); +p2 = d3Fetch.buffer(url, init); + +let p3: Promise = d3Fetch.image(url); +const imageProperties = { + width: '300px', + height: '500px' +}; +p3 = d3Fetch.image(url, imageProperties); + +let p4: Promise = d3Fetch.json(url); +p4 = d3Fetch.json(url, init); +let p5: Promise = d3Fetch.json(url); +p5 = d3Fetch.json(url, init); + +let myString: Promise; +myString = d3Fetch.text(url); +myString = d3Fetch.text(url, init); + +const parseRow = (rawRow: DSVRowString, index: number, columns: string[]): (MyType | undefined | null) => { + const myType: MyType | null = rawRow['foo'] ? { foo: rawRow['foo'] + '+ bar' } : null; + return myType; +}; +let promise1: Promise>; +let promise2: Promise>; +promise1 = d3Fetch.csv(url); +promise1 = d3Fetch.csv(url, init); +promise2 = d3Fetch.csv(url, parseRow); +promise2 = d3Fetch.csv(url, init, parseRow); +promise1 = d3Fetch.dsv(';', url); +promise1 = d3Fetch.dsv(';', url, init); +promise2 = d3Fetch.dsv(';', url, parseRow); +promise2 = d3Fetch.dsv(';', url, init, parseRow); +promise1 = d3Fetch.tsv(url); +promise1 = d3Fetch.tsv(url, init); +promise2 = d3Fetch.tsv(url, parseRow); +promise2 = d3Fetch.tsv(url, init, parseRow); diff --git a/types/d3-fetch/index.d.ts b/types/d3-fetch/index.d.ts new file mode 100644 index 0000000000..3eb11ce48a --- /dev/null +++ b/types/d3-fetch/index.d.ts @@ -0,0 +1,236 @@ +// Type definitions for d3-fetch 1.0 +// Project: https://d3js.org/d3-fetch/ +// Definitions by: Hugues Stefanski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +// Last module patch version validated against: 1.0.1 + +import { DSVParsedArray, DSVRowString, DSVRowAny } from 'd3-dsv'; + +/** + * Fetches the binary file at the specified input URL and returns it as a Promise of a Blob. + * If init is specified, it is passed along to the underlying call to fetch. + * + * @param url A valid URL string. + * @param init An optional request initialization object. + */ +export function blob(url: string, init?: RequestInit): Promise; + +/** + * Fetches the binary file at the specified input URL and returns it as a Promise of an ArrayBuffer. + * If init is specified, it is passed along to the underlying call to fetch. + * + * @param url A valid URL string. + * @param init An optional request initialization object. + */ +export function buffer(url: string, init?: RequestInit): Promise; + +/** + * Fetches the CSV file at the specified input URL and returns + * a promise of an array of objects representing the parsed rows. The values of the properties of the parsed row + * objects are represented as strings. + * + * If init is specified, it is passed along to the underlying call to fetch. + * + * @param url A valid URL string. + * @param init An optional request initialization object. + */ +export function csv( + url: string, + init?: RequestInit, +): Promise>; +/** + * Fetches the CSV file at the specified input URL and returns + * a promise of an array of objects representing the parsed rows. + * + * The specified row conversion function is used to map and filter row objects to a more-specific representation; + * see dsv.csvParse for details. + * + * The generic parameter describes the type of the object representation of a parsed row. + * + * @param url A valid URL string. + * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), + * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, + * the row is skipped and will be ommitted from the array returned by dsv.csvParse; otherwise, the returned value defines the corresponding row object. + * In effect, row is similar to applying a map and filter operator to the returned rows. + */ +export function csv( + url: string, + row: (rawRow: DSVRowString, index: number, columns: string[]) => ParsedRow | undefined | null +): Promise>; +/** + * Fetches the CSV file at the specified input URL and returns + * a promise of an array of objects representing the parsed rows. + * + * The init object is passed along to the underlying call to fetch. + * + * The specified row conversion function is used to map and filter row objects to a more-specific representation; + * see dsv.csvParse for details. + * + * The generic parameter describes the type of the object representation of a parsed row. + * + * @param url A valid URL string. + * @param init An request initialization object. + * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), + * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, + * the row is skipped and will be ommitted from the array returned by dsv.csvParse; otherwise, the returned value defines the corresponding row object. + * In effect, row is similar to applying a map and filter operator to the returned rows. + */ +export function csv( + url: string, + init: RequestInit, + row: (rawRow: DSVRowString, index: number, columns: string[]) => ParsedRow | undefined | null +): Promise>; + +/** + * Fetches the DSV file with the specified delimiter character at the specified input URL and returns + * a promise of an array of objects representing the parsed rows. The values of the properties of the parsed row + * objects are represented as strings. + * + * If init is specified, it is passed along to the underlying call to fetch. + * + * @param delimiter The delimiter character used in the DSV file to be fetched. + * @param url A valid URL string. + * @param init An optional request initialization object. + */ +export function dsv( + delimiter: string, + url: string, + init?: RequestInit, +): Promise>; +/** + * Fetches the DSV file with the specified delimiter character at the specified input URL and returns + * a promise of an array of objects representing the parsed rows. + * + * The specified row conversion function is used to map and filter row objects to a more-specific representation; + * see dsv.parse for details. + * + * The generic parameter describes the type of the object representation of a parsed row. + * + * @param delimiter The delimiter character used in the DSV file to be fetched. + * @param url A valid URL string. + * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), + * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, + * the row is skipped and will be ommitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. + * In effect, row is similar to applying a map and filter operator to the returned rows. + */ +export function dsv( + delimiter: string, + url: string, + row: (rawRow: DSVRowString, index: number, columns: string[]) => ParsedRow | undefined | null +): Promise>; +/** + * Fetches the DSV file with the specified delimiter character at the specified input URL and returns + * a promise of an array of objects representing the parsed rows. + * + * The init object is passed along to the underlying call to fetch. + * + * The specified row conversion function is used to map and filter row objects to a more-specific representation; + * see dsv.parse for details. + * + * The generic parameter describes the type of the object representation of a parsed row. + * + * @param delimiter The delimiter character used in the DSV file to be fetched. + * @param url A valid URL string. + * @param init An request initialization object. + * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), + * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, + * the row is skipped and will be ommitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. + * In effect, row is similar to applying a map and filter operator to the returned rows. + */ +export function dsv( + delimiter: string, + url: string, + init: RequestInit, + row: (rawRow: DSVRowString, index: number, columns: string[]) => ParsedRow | undefined | null +): Promise>; + +/** + * Fetches the image at the specified input URL and returns a promise of an HTML image element. + * + * If init is specified, sets any additional properties on the image before loading. + * + * @param url A valid URL string. + * @param init An optional object of image properties to set. + */ +export function image(url: string, init?: {[key: string]: any}): Promise; + +/** + * Fetches the json file at the specified input URL and returns it as a Promise of a parsed JSON object. + * + * If init is specified, it is passed along to the underlying call to fetch. + * + * The generic parameter describes the type of the object parsed from the returned JSON. + * + * @param url A valid URL string. + * @param init An optional request initialization object. + */ +export function json(url: string, init?: RequestInit): Promise; + +/** + * Fetches the text file at the specified input URL and returns it as a Promise of a string. + * + * If init is specified, it is passed along to the underlying call to fetch. + * + * @param url A valid URL string. + * @param init An optional request initialization object. + */ +export function text(url: string, init?: RequestInit): Promise; + +/** + * Fetches the TSV file at the specified input URL and returns + * a promise of an array of objects representing the parsed rows. + * + * If init is specified, it is passed along to the underlying call to fetch. + * + * @param url A valid URL string. + * @param init An optional request initialization object. + */ +export function tsv( + url: string, + init?: RequestInit, +): Promise>; +/** + * Fetches the TSV file at the specified input URL and returns + * a promise of an array of objects representing the parsed rows. The values of the properties of the parsed row + * objects are represented as strings. + * + * The specified row conversion function is used to map and filter row objects to a more-specific representation; + * see dsv.tsvParse for details. + * + * The generic parameter describes the type of the object representation of a parsed row. + * + * @param url A valid URL string. + * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), + * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, + * the row is skipped and will be ommitted from the array returned by dsv.tsvParse; otherwise, the returned value defines the corresponding row object. + * In effect, row is similar to applying a map and filter operator to the returned rows. + */ +export function tsv( + url: string, + row: (rawRow: DSVRowString, index: number, columns: string[]) => ParsedRow | undefined | null +): Promise>; +/** + * Fetches the TSV file at the specified input URL and returns + * a promise of an array of objects representing the parsed rows. + * + * The init object is passed along to the underlying call to fetch. + * + * The specified row conversion function is used to map and filter row objects to a more-specific representation; + * see dsv.tsvParse for details. + * + * The generic parameter describes the type of the object representation of a parsed row. + * + * @param url A valid URL string. + * @param init An request initialization object. + * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), + * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, + * the row is skipped and will be ommitted from the array returned by dsv.tsvParse; otherwise, the returned value defines the corresponding row object. + * In effect, row is similar to applying a map and filter operator to the returned rows. + */ +export function tsv( + url: string, + init: RequestInit, + row: (rawRow: DSVRowString, index: number, columns: string[]) => ParsedRow | undefined | null +): Promise>; diff --git a/types/d3-fetch/tsconfig.json b/types/d3-fetch/tsconfig.json new file mode 100644 index 0000000000..f30552f20d --- /dev/null +++ b/types/d3-fetch/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", + "d3-fetch-tests.ts" + ] +} \ No newline at end of file diff --git a/types/d3-fetch/tslint.json b/types/d3-fetch/tslint.json new file mode 100644 index 0000000000..54efb0b84e --- /dev/null +++ b/types/d3-fetch/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false, + "no-unnecessary-generics": false + } +} diff --git a/types/d3-force/tsconfig.json b/types/d3-force/tsconfig.json index 3d407406eb..cb3b3630c3 100644 --- a/types/d3-force/tsconfig.json +++ b/types/d3-force/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-format/tsconfig.json b/types/d3-format/tsconfig.json index 6017e0916f..cd2ccee91b 100644 --- a/types/d3-format/tsconfig.json +++ b/types/d3-format/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-geo/tsconfig.json b/types/d3-geo/tsconfig.json index f3661c3ad2..ea909a0598 100644 --- a/types/d3-geo/tsconfig.json +++ b/types/d3-geo/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-hexbin/tsconfig.json b/types/d3-hexbin/tsconfig.json index 773221263b..5f58387e06 100644 --- a/types/d3-hexbin/tsconfig.json +++ b/types/d3-hexbin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-hierarchy/tsconfig.json b/types/d3-hierarchy/tsconfig.json index 7fbc1fb5df..88974b9359 100644 --- a/types/d3-hierarchy/tsconfig.json +++ b/types/d3-hierarchy/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-hsv/tsconfig.json b/types/d3-hsv/tsconfig.json index c92ce346b2..3249f8d778 100644 --- a/types/d3-hsv/tsconfig.json +++ b/types/d3-hsv/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-interpolate/tsconfig.json b/types/d3-interpolate/tsconfig.json index 14435aff3d..6a3fd2a0b5 100644 --- a/types/d3-interpolate/tsconfig.json +++ b/types/d3-interpolate/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-path/tsconfig.json b/types/d3-path/tsconfig.json index 5f3fa1ca3e..6651f7ec3c 100644 --- a/types/d3-path/tsconfig.json +++ b/types/d3-path/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-polygon/tsconfig.json b/types/d3-polygon/tsconfig.json index 79bd8a43b8..3ac84426f5 100644 --- a/types/d3-polygon/tsconfig.json +++ b/types/d3-polygon/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-quadtree/tsconfig.json b/types/d3-quadtree/tsconfig.json index cbbb70a658..3a54e793e7 100644 --- a/types/d3-quadtree/tsconfig.json +++ b/types/d3-quadtree/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-queue/tsconfig.json b/types/d3-queue/tsconfig.json index 72f00c11e5..e48b49503e 100644 --- a/types/d3-queue/tsconfig.json +++ b/types/d3-queue/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-random/tsconfig.json b/types/d3-random/tsconfig.json index a8db248667..f497ce18bf 100644 --- a/types/d3-random/tsconfig.json +++ b/types/d3-random/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-request/tsconfig.json b/types/d3-request/tsconfig.json index a52d00ffaa..741908230f 100644 --- a/types/d3-request/tsconfig.json +++ b/types/d3-request/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-sankey/tsconfig.json b/types/d3-sankey/tsconfig.json index 503145683b..5067a33516 100644 --- a/types/d3-sankey/tsconfig.json +++ b/types/d3-sankey/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-scale-chromatic/tsconfig.json b/types/d3-scale-chromatic/tsconfig.json index 6dda07c981..60c78baedc 100644 --- a/types/d3-scale-chromatic/tsconfig.json +++ b/types/d3-scale-chromatic/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-scale/tsconfig.json b/types/d3-scale/tsconfig.json index 4fb09e2d39..2fe9977909 100644 --- a/types/d3-scale/tsconfig.json +++ b/types/d3-scale/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-selection-multi/tsconfig.json b/types/d3-selection-multi/tsconfig.json index 7344010335..51dfdb320f 100644 --- a/types/d3-selection-multi/tsconfig.json +++ b/types/d3-selection-multi/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-selection/d3-selection-tests.ts b/types/d3-selection/d3-selection-tests.ts index 6019084be2..e4f50c89e4 100644 --- a/types/d3-selection/d3-selection-tests.ts +++ b/types/d3-selection/d3-selection-tests.ts @@ -89,10 +89,11 @@ const body5: d3Selection.Selection // d3Selection.select(baseTypeEl.node()!); // fails as baseTypeEl.node() is not of type HTMLBodyElement // test, when it is not certain, whether an element of the type to be selected exists -let maybeSVG1: d3Selection.Selection = d3Selection.select('svg'); +let maybeSVG1: d3Selection.Selection; maybeSVG1 = d3Selection.select('svg'); let maybeSVG2: d3Selection.Selection; +// maybeSVG2 = d3Selection.select(maybeSVG1.node()); // fails with strict function types maybeSVG2 = d3Selection.select(maybeSVG1.node()); // fails, as node type mismatches selection type @@ -144,8 +145,7 @@ const xSVGCircleElementList: NodeListOf = document.querySelect const circleSelection: d3Selection.Selection = d3Selection.selectAll(xSVGCircleElementList); // selectAll(...) accepts HTMLCollection, HTMLCollectionOf<...> argument - -const documentLinks: d3Selection.Selection = d3Selection.selectAll(document.links); +const documentLinks: d3Selection.Selection = d3Selection.selectAll(document.links); // --------------------------------------------------------------------------------------- // Tests of Sub-Selection Functions @@ -166,12 +166,13 @@ let firstG: d3Selection.Selection = svg // firstG = svgEl.select('svg'); // fails, element type of SVGSVGElement provided, but SVGGElement expexted on left-hand side (silly test to begin with) // test, when it is not certain, whether an element of the type to be selected exists -let maybeG: d3Selection.Selection = svgEl.select('g'); +let maybeG: d3Selection.Selection; +// maybeG = svgEl.select('g'); // fails, with strictFunctionTypes maybeG = svgEl.select('g'); // Using select(...) sub-selection with a selector function argument. -function svgGroupSelector(this: SVGSVGElement, d: SVGDatum, i: number, groups: SVGSVGElement[]): SVGGElement { +function svgGroupSelector(this: SVGSVGElement, d: SVGDatum, i: number, groups: SVGSVGElement[] | ArrayLike): SVGGElement { return this.querySelector('g')!; // this-type compatible with group element-type to which the selector function will be appplied } @@ -215,13 +216,14 @@ emptySubSelection = svgEl.selectAll(undefined); // Using selectAll(...) sub-selection with a string argument. -let elementsUnknownData: d3Selection.Selection = svgEl.selectAll('g'); +let elementsUnknownData: d3Selection.Selection = svgEl.selectAll('g'); +// let elementsAndDataUnknown: d3Selection.Selection = svgEl.selectAll('g'); // fails with strictFunctionTypes let gElementsOldData: d3Selection.Selection = svgEl.selectAll('g'); // gElementsOldData = svgEl.selectAll('g'); // fails default type parameters of selectAll for group element type and datum type do not match // Using selectAll(...) sub-selection with a selector function argument. -function svgGroupSelectorAll(this: SVGSVGElement, d: SVGDatum, i: number, groups: SVGSVGElement[]): NodeListOf { +function svgGroupSelectorAll(this: SVGSVGElement, d: SVGDatum, i: number, groups: SVGSVGElement[] | d3Selection.ArrayLike): NodeListOf { return this.querySelectorAll('g'); // this-type compatible with group element-type to which the selector function will be appplied } @@ -774,7 +776,7 @@ nRow = td2.data(); // flattened matrix (Array[16] of number) // Tests of Alternative DOM Manipulation // --------------------------------------------------------------------------------------- -// append(...) and creator(...) ---------------------------------------------------------- +// append(...), creator(...) and create(...) --------------------------------------------- // without append<...> typing returned selection has group element of type BaseType let newDiv: d3Selection.Selection; @@ -805,6 +807,12 @@ newDiv2 = body.append(function(d, i, g) { // return this.ownerDocument.createElement('a'); // fails, HTMLDivElement expected by inference, HTMLAnchorElement returned // }); +// create a detached element + +let detachedDiv: d3Selection.Selection; + +detachedDiv = d3Selection.create('div'); + // insert(...) --------------------------------------------------------------------------- // without insert<...> typing returned selection has group element of type BaseType @@ -847,6 +855,18 @@ newParagraph2 = body.insert(typeValueFunction, 'p.second-paragraph'); newParagraph2 = body.insert(typeValueFunction, beforeValueFunction); newParagraph2 = body.insert(typeValueFunction); +// clone(...) ---------------------------------------------------------------------------- + +let clonedParagraph: d3Selection.Selection; + +// shallow clone +clonedParagraph = newParagraph2.clone(); + +// deep clone + +newParagraph.append('span'); +clonedParagraph = newParagraph2.clone(true); + // sort(...) ----------------------------------------------------------------------------- // NB: Return new selection of same type @@ -925,14 +945,14 @@ circles = circles.call(enforceMinRadius, 40); // check chaining return type by r // on(...) ------------------------------------------------------------------------------- -let listener: undefined | ((this: HTMLBodyElement, datum: BodyDatum, index: number, group: HTMLBodyElement[] | ArrayLike) => void); +let listener: undefined | ((this: HTMLBodyElement, datum: BodyDatum, index: number, group: HTMLBodyElement[] | d3Selection.ArrayLike) => void); body = body.on('click', function(d, i, g) { const that: HTMLBodyElement = this; // const that2: SVGElement = this; // fails, type mismatch const datum: BodyDatum = d; const index: number = i; - const group: HTMLBodyElement[] | ArrayLike = g; + const group: HTMLBodyElement[] | d3Selection.ArrayLike = g; console.log('onclick print body background color: ', this.bgColor); // HTMLBodyElement console.log('onclick print "foo" datum property: ', d.foo); // BodyDatum type }); @@ -988,13 +1008,11 @@ interface SuccessEvent { } const successEvent = { type: 'wonEuro2016', team: 'Island' }; -let customListener: (this: HTMLBodyElement, finalOpponent: string) => string; - -customListener = finalOpponent => { +function customListener(this: HTMLBodyElement | null, finalOpponent: string): string { const e = d3Selection.event; return `${e.team} defeated ${finalOpponent} in the EURO 2016 Cup. Who would have thought!!!`; -}; +} const resultText: string = d3Selection.customEvent(successEvent, customListener, body.node(), 'Wales'); diff --git a/types/d3-selection/index.d.ts b/types/d3-selection/index.d.ts index b5231f37c2..7e23c4aaeb 100644 --- a/types/d3-selection/index.d.ts +++ b/types/d3-selection/index.d.ts @@ -1,9 +1,9 @@ -// Type definitions for D3JS d3-selection module 1.2 +// Type definitions for D3JS d3-selection module 1.3 // Project: https://github.com/d3/d3-selection/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 1.2.0 +// Last module patch version validated against: 1.3.0 // -------------------------------------------------------------------------- // Shared Type Definitions and Interfaces @@ -532,6 +532,15 @@ export interface Selection; + /** * Returns a new selection merging this selection with the specified other selection. * The returned selection has the same number of groups and the same parents as this selection. @@ -1103,6 +1112,15 @@ export function window(DOMNode: Window | Document | Element): Window; // for explicit bound-context dependent use // --------------------------------------------------------------------------- +/** + * Given the specified element name, returns a single-element selection containing + * a detached element of the given name in the current document. + * + * @param name Tag name of the element to be added. See "namespace" for details on supported namespace prefixes, + * such as for SVG elements. + */ +export function create(name: string): Selection; + /** * Given the specified element name, returns a function which creates an element of the given name, * assuming that "this" is the parent element. diff --git a/types/d3-selection/tsconfig.json b/types/d3-selection/tsconfig.json index 9dea0e1226..9ee4a0eef4 100644 --- a/types/d3-selection/tsconfig.json +++ b/types/d3-selection/tsconfig.json @@ -8,17 +8,18 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, - "strictFunctionTypes": false, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "d3-selection-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/d3-shape/d3-shape-tests.ts b/types/d3-shape/d3-shape-tests.ts index 687da79188..e668d152f8 100644 --- a/types/d3-shape/d3-shape-tests.ts +++ b/types/d3-shape/d3-shape-tests.ts @@ -17,6 +17,7 @@ import { HierarchyPointLink, HierarchyPointNode } from 'd3-hierarchy'; let context: CanvasRenderingContext2D | null = document.querySelector('canvas')!.getContext('2d'); let num: number; +let padAngleMaybe: number | undefined; let pathStringMaybe: string | null; // ----------------------------------------------------------------------------------- @@ -28,7 +29,7 @@ interface ArcDatum { oRadius: number; sAngle: number; eAngle: number; - pAngle: number; + pAngle?: number; } const arcDefaultDatum: d3Shape.DefaultArcObject = { @@ -39,6 +40,13 @@ const arcDefaultDatum: d3Shape.DefaultArcObject = { padAngle: 0.03 }; +const arcReducedDefaultDatum: d3Shape.DefaultArcObject = { + innerRadius: 40, + outerRadius: 60, + startAngle: 0, + endAngle: Math.PI / 2 +}; + const arcDatum: ArcDatum = { iRadius: 40, oRadius: 60, @@ -48,6 +56,7 @@ const arcDatum: ArcDatum = { }; let accessorArcDatumNumber: (this: any, d: ArcDatum, ...args: any[]) => number; +let accessorArcDatumNumberOrUndefined: (this: any, d: ArcDatum, ...args: any[]) => number | undefined; let accessorArcDatumNumberOrNull: ((this: any, d: ArcDatum, ...args: any[]) => number) | null; // DefaultArcObject interface ======================================================== @@ -64,7 +73,7 @@ num = defaultArcObject.innerRadius; num = defaultArcObject.outerRadius; num = defaultArcObject.startAngle; num = defaultArcObject.endAngle; -num = defaultArcObject.padAngle; +padAngleMaybe = defaultArcObject.padAngle; // arc(...) create Arc generator ===================================================== @@ -134,7 +143,7 @@ canvasArc = canvasArc.padAngle(0); svgArc = svgArc.padAngle(d => { return d.pAngle; // datum type is ArcDatum }); -accessorArcDatumNumber = svgArc.padAngle(); +accessorArcDatumNumberOrUndefined = svgArc.padAngle(); // padRadius(...) ---------------------------------------------------------------------- diff --git a/types/d3-shape/index.d.ts b/types/d3-shape/index.d.ts index 27a92a79fe..5408508683 100644 --- a/types/d3-shape/index.d.ts +++ b/types/d3-shape/index.d.ts @@ -32,9 +32,9 @@ export interface DefaultArcObject { */ endAngle: number; /** - * Pad angle of arcin radians. + * Optional. Pad angle of arcin radians. */ - padAngle: number; + padAngle?: number; } /** @@ -230,7 +230,7 @@ export interface Arc { * Returns the current pad angle accessor, which defaults to a function returning the padAngle property * of the first argument passed into it, or false if no data are passed in or the property is not defined. */ - padAngle(): (this: This, d: Datum, ...args: any[]) => number; + padAngle(): (this: This, d: Datum, ...args: any[]) => number | undefined; /** * Sets the pad angle to the specified number and returns this arc generator. * @@ -248,7 +248,7 @@ export interface Arc { * * @param angle Constant angle in radians. */ - padAngle(angle: number): this; + padAngle(angle: number | undefined): this; /** * Sets the pad angle to the specified function and returns this arc generator. * @@ -267,7 +267,7 @@ export interface Arc { * @param angle An accessor function returning a number in radians to be used as an angle. The accessor function is invoked in the same "this" context as the generator was invoked in and * receives the same arguments that were passed into the arc generator. */ - padAngle(angle: (this: This, d: Datum, ...args: any[]) => number): this; + padAngle(angle: (this: This, d: Datum, ...args: any[]) => number | undefined): this; /** * Returns the current pad radius accessor, which defaults to null, indicating that the pad radius should be automatically computed as sqrt(innerRadius * innerRadius + outerRadius * outerRadius). diff --git a/types/d3-shape/tsconfig.json b/types/d3-shape/tsconfig.json index 0436aafd66..95b8e8a112 100644 --- a/types/d3-shape/tsconfig.json +++ b/types/d3-shape/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-time-format/tsconfig.json b/types/d3-time-format/tsconfig.json index 782a3ab291..829d92b69e 100644 --- a/types/d3-time-format/tsconfig.json +++ b/types/d3-time-format/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "d3-time-format-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/d3-time/tsconfig.json b/types/d3-time/tsconfig.json index 963c0df157..aa5250e8df 100644 --- a/types/d3-time/tsconfig.json +++ b/types/d3-time/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-timer/tsconfig.json b/types/d3-timer/tsconfig.json index f3af0c7d8e..6f04f3f1de 100644 --- a/types/d3-timer/tsconfig.json +++ b/types/d3-timer/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-tip/tsconfig.json b/types/d3-tip/tsconfig.json index 8bd5f064c9..7a4d78071c 100644 --- a/types/d3-tip/tsconfig.json +++ b/types/d3-tip/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-transition/tsconfig.json b/types/d3-transition/tsconfig.json index f23a386a94..43d4e23565 100644 --- a/types/d3-transition/tsconfig.json +++ b/types/d3-transition/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-voronoi/tsconfig.json b/types/d3-voronoi/tsconfig.json index ada834dec3..88819747f1 100644 --- a/types/d3-voronoi/tsconfig.json +++ b/types/d3-voronoi/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3-zoom/tsconfig.json b/types/d3-zoom/tsconfig.json index ed184bf861..460c577983 100644 --- a/types/d3-zoom/tsconfig.json +++ b/types/d3-zoom/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3.cloud.layout/tsconfig.json b/types/d3.cloud.layout/tsconfig.json index ffb26214cc..5dc4a6e41b 100644 --- a/types/d3.cloud.layout/tsconfig.json +++ b/types/d3.cloud.layout/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3.slider/tsconfig.json b/types/d3.slider/tsconfig.json index a2a0a2c0c7..487fbb4be2 100644 --- a/types/d3.slider/tsconfig.json +++ b/types/d3.slider/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3/tsconfig.json b/types/d3/tsconfig.json index 8ec0a8e64e..adea130e6c 100644 --- a/types/d3/tsconfig.json +++ b/types/d3/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3/v3/tsconfig.json b/types/d3/v3/tsconfig.json index dd4cea8078..4912912a48 100644 --- a/types/d3/v3/tsconfig.json +++ b/types/d3/v3/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3kit/tsconfig.json b/types/d3kit/tsconfig.json index 40e266f6f9..3288c90ae9 100644 --- a/types/d3kit/tsconfig.json +++ b/types/d3kit/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3kit/v1/tsconfig.json b/types/d3kit/v1/tsconfig.json index f2112d2661..0856962263 100644 --- a/types/d3kit/v1/tsconfig.json +++ b/types/d3kit/v1/tsconfig.json @@ -23,7 +23,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/d3pie/tsconfig.json b/types/d3pie/tsconfig.json index c654f02557..ee657eb9ed 100644 --- a/types/d3pie/tsconfig.json +++ b/types/d3pie/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dagre-d3/tsconfig.json b/types/dagre-d3/tsconfig.json index 584a8cc848..c67751ed03 100644 --- a/types/dagre-d3/tsconfig.json +++ b/types/dagre-d3/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dagre-layout/tsconfig.json b/types/dagre-layout/tsconfig.json index 12bfb07f57..b1b3ec1692 100644 --- a/types/dagre-layout/tsconfig.json +++ b/types/dagre-layout/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dagre/tsconfig.json b/types/dagre/tsconfig.json index b5802bd42e..07d7208f87 100644 --- a/types/dagre/tsconfig.json +++ b/types/dagre/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dargs/tsconfig.json b/types/dargs/tsconfig.json index 88aef9d923..eb152319a9 100644 --- a/types/dargs/tsconfig.json +++ b/types/dargs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dashify/tsconfig.json b/types/dashify/tsconfig.json index 81e84c030c..4ca9ab12f2 100644 --- a/types/dashify/tsconfig.json +++ b/types/dashify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dat-gui/tsconfig.json b/types/dat-gui/tsconfig.json index 4961272694..b8138868cc 100644 --- a/types/dat-gui/tsconfig.json +++ b/types/dat-gui/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/data-driven/tsconfig.json b/types/data-driven/tsconfig.json index 7e3cb6a15c..4423546191 100644 --- a/types/data-driven/tsconfig.json +++ b/types/data-driven/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/datadog-metrics/tsconfig.json b/types/datadog-metrics/tsconfig.json index ca3613429a..3cb76e9dfd 100644 --- a/types/datadog-metrics/tsconfig.json +++ b/types/datadog-metrics/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/datatables.net-buttons/tsconfig.json b/types/datatables.net-buttons/tsconfig.json index 3e8d4ce82c..47ef321009 100644 --- a/types/datatables.net-buttons/tsconfig.json +++ b/types/datatables.net-buttons/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/datatables.net-fixedheader/tsconfig.json b/types/datatables.net-fixedheader/tsconfig.json index 5c747aa854..e42c69588e 100644 --- a/types/datatables.net-fixedheader/tsconfig.json +++ b/types/datatables.net-fixedheader/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/datatables.net-rowgroup/tsconfig.json b/types/datatables.net-rowgroup/tsconfig.json index c4550cded1..66d4610072 100644 --- a/types/datatables.net-rowgroup/tsconfig.json +++ b/types/datatables.net-rowgroup/tsconfig.json @@ -1,24 +1,25 @@ { - "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", - "datatables.net-rowgroup-tests.ts" - ] + "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", + "datatables.net-rowgroup-tests.ts" + ] } \ No newline at end of file diff --git a/types/datatables.net-rowreorder/tsconfig.json b/types/datatables.net-rowreorder/tsconfig.json index c16752cd22..3f2a9668a1 100644 --- a/types/datatables.net-rowreorder/tsconfig.json +++ b/types/datatables.net-rowreorder/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/datatables.net-select/tsconfig.json b/types/datatables.net-select/tsconfig.json index 50398d173e..63aaf5e9df 100644 --- a/types/datatables.net-select/tsconfig.json +++ b/types/datatables.net-select/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/datatables.net/tsconfig.json b/types/datatables.net/tsconfig.json index 04972add17..8aafdcfc1c 100644 --- a/types/datatables.net/tsconfig.json +++ b/types/datatables.net/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/date-arithmetic/tsconfig.json b/types/date-arithmetic/tsconfig.json index d8942e343c..2e9dea5326 100644 --- a/types/date-arithmetic/tsconfig.json +++ b/types/date-arithmetic/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/date.format.js/tsconfig.json b/types/date.format.js/tsconfig.json index a7a5e7f404..a835b70fa3 100644 --- a/types/date.format.js/tsconfig.json +++ b/types/date.format.js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dateformat/tsconfig.json b/types/dateformat/tsconfig.json index 1c5fc06611..0511224dad 100644 --- a/types/dateformat/tsconfig.json +++ b/types/dateformat/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/datejs/tsconfig.json b/types/datejs/tsconfig.json index 5d17ca2da9..eb53ed05f1 100644 --- a/types/datejs/tsconfig.json +++ b/types/datejs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/daterangepicker/tsconfig.json b/types/daterangepicker/tsconfig.json index 1ed4157bc7..621dd6dada 100644 --- a/types/daterangepicker/tsconfig.json +++ b/types/daterangepicker/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/db-migrate-base/tsconfig.json b/types/db-migrate-base/tsconfig.json index f4c835bb88..0d756c7d5c 100644 --- a/types/db-migrate-base/tsconfig.json +++ b/types/db-migrate-base/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/db-migrate-pg/tsconfig.json b/types/db-migrate-pg/tsconfig.json index c63efcd105..3243faf3dd 100644 --- a/types/db-migrate-pg/tsconfig.json +++ b/types/db-migrate-pg/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/db.js/tsconfig.json b/types/db.js/tsconfig.json index 75989af0b3..10ea07f745 100644 --- a/types/db.js/tsconfig.json +++ b/types/db.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dc/tsconfig.json b/types/dc/tsconfig.json index 863d600736..290a1e994d 100644 --- a/types/dc/tsconfig.json +++ b/types/dc/tsconfig.json @@ -24,6 +24,7 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/deasync/tsconfig.json b/types/deasync/tsconfig.json index d61004bac3..d62c8d7f8e 100644 --- a/types/deasync/tsconfig.json +++ b/types/deasync/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/debessmann/tsconfig.json b/types/debessmann/tsconfig.json index b8b4c01d06..1dc931d093 100644 --- a/types/debessmann/tsconfig.json +++ b/types/debessmann/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/debounce/tsconfig.json b/types/debounce/tsconfig.json index bf08d46e44..4dd1415a27 100644 --- a/types/debounce/tsconfig.json +++ b/types/debounce/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/debug/tsconfig.json b/types/debug/tsconfig.json index 7caca45f35..33cacd7464 100644 --- a/types/debug/tsconfig.json +++ b/types/debug/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/decamelize/tsconfig.json b/types/decamelize/tsconfig.json index 54bea1b020..9c034b4839 100644 --- a/types/decamelize/tsconfig.json +++ b/types/decamelize/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/decay/tsconfig.json b/types/decay/tsconfig.json index d35511f505..1300da9349 100644 --- a/types/decay/tsconfig.json +++ b/types/decay/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/decompress/tsconfig.json b/types/decompress/tsconfig.json index 33c7a8c5e8..a76b0817fd 100644 --- a/types/decompress/tsconfig.json +++ b/types/decompress/tsconfig.json @@ -14,10 +14,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ "index.d.ts", "decompress-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/decorum/tsconfig.json b/types/decorum/tsconfig.json index 82792e10c5..40ba95f9ea 100644 --- a/types/decorum/tsconfig.json +++ b/types/decorum/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dedent/tsconfig.json b/types/dedent/tsconfig.json index 30c39b0a23..61234daf73 100644 --- a/types/dedent/tsconfig.json +++ b/types/dedent/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/deep-assign/tsconfig.json b/types/deep-assign/tsconfig.json index 76d4b1b23e..f8a0647dca 100644 --- a/types/deep-assign/tsconfig.json +++ b/types/deep-assign/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/deep-diff/tsconfig.json b/types/deep-diff/tsconfig.json index 95cd2d22ac..76c498035e 100644 --- a/types/deep-diff/tsconfig.json +++ b/types/deep-diff/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/deep-equal/tsconfig.json b/types/deep-equal/tsconfig.json index e5c20aa772..9c016f9281 100644 --- a/types/deep-equal/tsconfig.json +++ b/types/deep-equal/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/deep-extend/tsconfig.json b/types/deep-extend/tsconfig.json index 768b1ac92d..ff77090b23 100644 --- a/types/deep-extend/tsconfig.json +++ b/types/deep-extend/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/deep-freeze-es6/tsconfig.json b/types/deep-freeze-es6/tsconfig.json index cf9a3b32f5..f47120248f 100644 --- a/types/deep-freeze-es6/tsconfig.json +++ b/types/deep-freeze-es6/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/deep-freeze-strict/tsconfig.json b/types/deep-freeze-strict/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/deep-freeze-strict/tsconfig.json +++ b/types/deep-freeze-strict/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/deep-freeze/tsconfig.json b/types/deep-freeze/tsconfig.json index 3fe6438f96..bd681a7f3b 100644 --- a/types/deep-freeze/tsconfig.json +++ b/types/deep-freeze/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/deepmerge/tsconfig.json b/types/deepmerge/tsconfig.json index b863d1bcb9..fd45a1df17 100644 --- a/types/deepmerge/tsconfig.json +++ b/types/deepmerge/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/defaults/tsconfig.json b/types/defaults/tsconfig.json index 4a66176c28..90757c2104 100644 --- a/types/defaults/tsconfig.json +++ b/types/defaults/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/defer-promise/tsconfig.json b/types/defer-promise/tsconfig.json index 1aaa667626..ef7ffa0690 100644 --- a/types/defer-promise/tsconfig.json +++ b/types/defer-promise/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "defer-promise-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/define-lazy-prop/tsconfig.json b/types/define-lazy-prop/tsconfig.json index e72c943c52..8b8f252553 100644 --- a/types/define-lazy-prop/tsconfig.json +++ b/types/define-lazy-prop/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/defined/tsconfig.json b/types/defined/tsconfig.json index 35b5bb7c83..3f8607f716 100644 --- a/types/defined/tsconfig.json +++ b/types/defined/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/deku/tsconfig.json b/types/deku/tsconfig.json index ad8473665d..67cbce0a6a 100644 --- a/types/deku/tsconfig.json +++ b/types/deku/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/del/tsconfig.json b/types/del/tsconfig.json index 6143d08346..8d4988bb00 100644 --- a/types/del/tsconfig.json +++ b/types/del/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/del/v2/tsconfig.json b/types/del/v2/tsconfig.json index 568d1a8a21..00f2f32920 100644 --- a/types/del/v2/tsconfig.json +++ b/types/del/v2/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/delaunator/tsconfig.json b/types/delaunator/tsconfig.json index a9c94600d8..97bca0c508 100644 --- a/types/delaunator/tsconfig.json +++ b/types/delaunator/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/delay/tsconfig.json b/types/delay/tsconfig.json index cb0da53652..039ccc4860 100644 --- a/types/delay/tsconfig.json +++ b/types/delay/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/denodeify/tsconfig.json b/types/denodeify/tsconfig.json index 04d0008cd5..309f54e7c1 100644 --- a/types/denodeify/tsconfig.json +++ b/types/denodeify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/deoxxa-content-type/tsconfig.json b/types/deoxxa-content-type/tsconfig.json index 5f50fa4676..10d2335f0f 100644 --- a/types/deoxxa-content-type/tsconfig.json +++ b/types/deoxxa-content-type/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/depcheck/tsconfig.json b/types/depcheck/tsconfig.json index f3a0a7df65..14f56cc2b5 100644 --- a/types/depcheck/tsconfig.json +++ b/types/depcheck/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "depcheck-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/depd/tsconfig.json b/types/depd/tsconfig.json index cea39d4996..3164f96fa6 100644 --- a/types/depd/tsconfig.json +++ b/types/depd/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/deployjava/tsconfig.json b/types/deployjava/tsconfig.json index 934531a4ee..7241ae5513 100644 --- a/types/deployjava/tsconfig.json +++ b/types/deployjava/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/destroy-on-hwm/tsconfig.json b/types/destroy-on-hwm/tsconfig.json index 8f77b1b9a4..54b7ae1b87 100644 --- a/types/destroy-on-hwm/tsconfig.json +++ b/types/destroy-on-hwm/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/destroy/tsconfig.json b/types/destroy/tsconfig.json index d3c5ca771d..4d57e05510 100644 --- a/types/destroy/tsconfig.json +++ b/types/destroy/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/detect-browser/tsconfig.json b/types/detect-browser/tsconfig.json index b1319407fc..745bcc8128 100644 --- a/types/detect-browser/tsconfig.json +++ b/types/detect-browser/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/detect-hover/tsconfig.json b/types/detect-hover/tsconfig.json index 69abd062cd..b2f4b457c6 100644 --- a/types/detect-hover/tsconfig.json +++ b/types/detect-hover/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/detect-indent/tsconfig.json b/types/detect-indent/tsconfig.json index 3119632150..e75f82a918 100644 --- a/types/detect-indent/tsconfig.json +++ b/types/detect-indent/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/detect-indent/v0/tsconfig.json b/types/detect-indent/v0/tsconfig.json index 6fb921c298..a646b4f457 100644 --- a/types/detect-indent/v0/tsconfig.json +++ b/types/detect-indent/v0/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/detect-it/tsconfig.json b/types/detect-it/tsconfig.json index 28787b09b8..c74d5b9c65 100644 --- a/types/detect-it/tsconfig.json +++ b/types/detect-it/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/detect-newline/tsconfig.json b/types/detect-newline/tsconfig.json index a94c517f93..1ee86197af 100644 --- a/types/detect-newline/tsconfig.json +++ b/types/detect-newline/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/detect-passive-events/tsconfig.json b/types/detect-passive-events/tsconfig.json index 83ddf05856..6e57a4488c 100644 --- a/types/detect-passive-events/tsconfig.json +++ b/types/detect-passive-events/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/detect-pointer/tsconfig.json b/types/detect-pointer/tsconfig.json index 50b7d6cb7d..de5138f95a 100644 --- a/types/detect-pointer/tsconfig.json +++ b/types/detect-pointer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/detect-port/tsconfig.json b/types/detect-port/tsconfig.json index 9d400580a4..353d626311 100644 --- a/types/detect-port/tsconfig.json +++ b/types/detect-port/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/detect-touch-events/tsconfig.json b/types/detect-touch-events/tsconfig.json index 03b3cc49cb..cfd46b1f2b 100644 --- a/types/detect-touch-events/tsconfig.json +++ b/types/detect-touch-events/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/devexpress-web/tsconfig.json b/types/devexpress-web/tsconfig.json index 3510853ddd..22b3c9ce8c 100644 --- a/types/devexpress-web/tsconfig.json +++ b/types/devexpress-web/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/devexpress-web/v161/tsconfig.json b/types/devexpress-web/v161/tsconfig.json index 0c6ad80e42..1875485bf1 100644 --- a/types/devexpress-web/v161/tsconfig.json +++ b/types/devexpress-web/v161/tsconfig.json @@ -23,7 +23,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/devexpress-web/v162/tsconfig.json b/types/devexpress-web/v162/tsconfig.json index 0878906afb..b0e0cd1a6f 100644 --- a/types/devexpress-web/v162/tsconfig.json +++ b/types/devexpress-web/v162/tsconfig.json @@ -23,7 +23,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/devtools-detect/tsconfig.json b/types/devtools-detect/tsconfig.json index 8ab64cb68c..cbf7e862ac 100644 --- a/types/devtools-detect/tsconfig.json +++ b/types/devtools-detect/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/df-visible/tsconfig.json b/types/df-visible/tsconfig.json index ca15676b02..3ada905eca 100644 --- a/types/df-visible/tsconfig.json +++ b/types/df-visible/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dhtmlxgantt/tsconfig.json b/types/dhtmlxgantt/tsconfig.json index f897e58d02..280ae19957 100644 --- a/types/dhtmlxgantt/tsconfig.json +++ b/types/dhtmlxgantt/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dhtmlxscheduler/tsconfig.json b/types/dhtmlxscheduler/tsconfig.json index 8d145fb613..71b2f56ab6 100644 --- a/types/dhtmlxscheduler/tsconfig.json +++ b/types/dhtmlxscheduler/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/di-lite/tsconfig.json b/types/di-lite/tsconfig.json index 7f10ef8967..e76b11c158 100644 --- a/types/di-lite/tsconfig.json +++ b/types/di-lite/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/diacritics/tsconfig.json b/types/diacritics/tsconfig.json index 03b49dbe95..f0b9510d2e 100644 --- a/types/diacritics/tsconfig.json +++ b/types/diacritics/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/diff-match-patch/tsconfig.json b/types/diff-match-patch/tsconfig.json index 11f60e2489..a28e29633b 100644 --- a/types/diff-match-patch/tsconfig.json +++ b/types/diff-match-patch/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/diff/tsconfig.json b/types/diff/tsconfig.json index 9a1fdba840..bf2e3af341 100644 --- a/types/diff/tsconfig.json +++ b/types/diff/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/diff2html/index.d.ts b/types/diff2html/index.d.ts index ce2522d444..1b75f1e3df 100644 --- a/types/diff2html/index.d.ts +++ b/types/diff2html/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Diff2Html { - + export interface Options { inputFormat?: string; outputFormat?: string; @@ -53,10 +53,11 @@ declare namespace Diff2Html { checksumAfter?: string; mode?: string; } - + export interface Diff2Html { - getJsonFromDiff(input: string, configuration?: Options): Result; + getJsonFromDiff(input: string, configuration?: Options): Result[]; getPrettyHtml(input: any, configuration?: Options): string; + getPrettyHtmlFromJson(input: Result[], configuration?: Options): string; } } diff --git a/types/diff2html/tsconfig.json b/types/diff2html/tsconfig.json index bb9662b5b6..7eb376bb33 100644 --- a/types/diff2html/tsconfig.json +++ b/types/diff2html/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dir-resolve/tsconfig.json b/types/dir-resolve/tsconfig.json index 129d8a0aa9..1a2677f4da 100644 --- a/types/dir-resolve/tsconfig.json +++ b/types/dir-resolve/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/discontinuous-range/tsconfig.json b/types/discontinuous-range/tsconfig.json index 26c43bf7f0..64edbc248e 100644 --- a/types/discontinuous-range/tsconfig.json +++ b/types/discontinuous-range/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/disposable-email-domains/tsconfig.json b/types/disposable-email-domains/tsconfig.json index 70b9e249d1..3fd51dba9b 100644 --- a/types/disposable-email-domains/tsconfig.json +++ b/types/disposable-email-domains/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/doccookies/tsconfig.json b/types/doccookies/tsconfig.json index e4de927a2f..9df6ed48d5 100644 --- a/types/doccookies/tsconfig.json +++ b/types/doccookies/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dock-spawn/tsconfig.json b/types/dock-spawn/tsconfig.json index a5c6c7b144..c79bde1059 100644 --- a/types/dock-spawn/tsconfig.json +++ b/types/dock-spawn/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dockerode/dockerode-tests.ts b/types/dockerode/dockerode-tests.ts index 458134917b..f53f0d2ad4 100644 --- a/types/dockerode/dockerode-tests.ts +++ b/types/dockerode/dockerode-tests.ts @@ -1,4 +1,4 @@ -import * as Docker from 'dockerode'; +import Docker = require('dockerode'); import * as fs from 'fs'; // Code samples from Dockerode 'Getting started' diff --git a/types/dockerode/tsconfig.json b/types/dockerode/tsconfig.json index 3334b9b296..85e6705d47 100644 --- a/types/dockerode/tsconfig.json +++ b/types/dockerode/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/docopt/tsconfig.json b/types/docopt/tsconfig.json index bc71021fcd..ac4ca64e76 100644 --- a/types/docopt/tsconfig.json +++ b/types/docopt/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/doctrine/tsconfig.json b/types/doctrine/tsconfig.json index 1b9e7702c2..cf7070091c 100644 --- a/types/doctrine/tsconfig.json +++ b/types/doctrine/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/documentdb-server/tsconfig.json b/types/documentdb-server/tsconfig.json index 98dcf6bf5c..9320c53f1b 100644 --- a/types/documentdb-server/tsconfig.json +++ b/types/documentdb-server/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/documentdb-session/tsconfig.json b/types/documentdb-session/tsconfig.json index 40ab7520b7..45398d91dd 100644 --- a/types/documentdb-session/tsconfig.json +++ b/types/documentdb-session/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/documentdb/tsconfig.json b/types/documentdb/tsconfig.json index 48c13eac51..f602f0c74d 100644 --- a/types/documentdb/tsconfig.json +++ b/types/documentdb/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dojo/tsconfig.json b/types/dojo/tsconfig.json index 140f764554..d7f9e50b42 100644 --- a/types/dojo/tsconfig.json +++ b/types/dojo/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -83,5 +84,4 @@ "dojox.widget.d.ts", "dojox.xml.d.ts" ] -} - +} \ No newline at end of file diff --git a/types/dom-inputevent/tsconfig.json b/types/dom-inputevent/tsconfig.json index a309b9ec2e..cd56b783f6 100644 --- a/types/dom-inputevent/tsconfig.json +++ b/types/dom-inputevent/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dom4/tsconfig.json b/types/dom4/tsconfig.json index 3db581ed36..579670df92 100644 --- a/types/dom4/tsconfig.json +++ b/types/dom4/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/domo/tsconfig.json b/types/domo/tsconfig.json index 1700042ecc..d98ca4d683 100644 --- a/types/domo/tsconfig.json +++ b/types/domo/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dompurify/tsconfig.json b/types/dompurify/tsconfig.json index f10fdda910..e43c9febde 100644 --- a/types/dompurify/tsconfig.json +++ b/types/dompurify/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/domready/tsconfig.json b/types/domready/tsconfig.json index 1495d185a6..08391e9dd2 100644 --- a/types/domready/tsconfig.json +++ b/types/domready/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/domurl/tsconfig.json b/types/domurl/tsconfig.json index c678dbc069..450c43b839 100644 --- a/types/domurl/tsconfig.json +++ b/types/domurl/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/donna/tsconfig.json b/types/donna/tsconfig.json index 6e06e71c36..c683e15ca5 100644 --- a/types/donna/tsconfig.json +++ b/types/donna/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dookie/tsconfig.json b/types/dookie/tsconfig.json index a788cba5bc..e4f71c26fa 100644 --- a/types/dookie/tsconfig.json +++ b/types/dookie/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dot-object/tsconfig.json b/types/dot-object/tsconfig.json index f58205cdaf..941ba764dc 100644 --- a/types/dot-object/tsconfig.json +++ b/types/dot-object/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dot-prop/tsconfig.json b/types/dot-prop/tsconfig.json index cbacf32b41..73180091a1 100644 --- a/types/dot-prop/tsconfig.json +++ b/types/dot-prop/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dot-prop/v2/tsconfig.json b/types/dot-prop/v2/tsconfig.json index f5770f3083..66701208fc 100644 --- a/types/dot-prop/v2/tsconfig.json +++ b/types/dot-prop/v2/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dot/tsconfig.json b/types/dot/tsconfig.json index 2c1a595ac6..dc732938b9 100644 --- a/types/dot/tsconfig.json +++ b/types/dot/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dotdir-regex/tsconfig.json b/types/dotdir-regex/tsconfig.json index 48f516abd8..05a1fa51fc 100644 --- a/types/dotdir-regex/tsconfig.json +++ b/types/dotdir-regex/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "dotdir-regex-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/dotdotdot/tsconfig.json b/types/dotdotdot/tsconfig.json index 8be8dc5245..646dc386bb 100644 --- a/types/dotdotdot/tsconfig.json +++ b/types/dotdotdot/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dotenv-safe/tsconfig.json b/types/dotenv-safe/tsconfig.json index 46b51afc29..3deacfa95d 100644 --- a/types/dotenv-safe/tsconfig.json +++ b/types/dotenv-safe/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dotenv/tsconfig.json b/types/dotenv/tsconfig.json index 5c51b4d698..f5e49e1b84 100644 --- a/types/dotenv/tsconfig.json +++ b/types/dotenv/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dotenv/v2/tsconfig.json b/types/dotenv/v2/tsconfig.json index facb307571..c7b540d409 100644 --- a/types/dotenv/v2/tsconfig.json +++ b/types/dotenv/v2/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dotfile-regex/tsconfig.json b/types/dotfile-regex/tsconfig.json index 899be54b3b..74e46144e6 100644 --- a/types/dotfile-regex/tsconfig.json +++ b/types/dotfile-regex/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "dotfile-regex-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/dottie/tsconfig.json b/types/dottie/tsconfig.json index f770bbf57d..34b719f7be 100644 --- a/types/dottie/tsconfig.json +++ b/types/dottie/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/double-ended-queue/tsconfig.json b/types/double-ended-queue/tsconfig.json index 5477379341..5289474c22 100644 --- a/types/double-ended-queue/tsconfig.json +++ b/types/double-ended-queue/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "double-ended-queue-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/doublearray/tsconfig.json b/types/doublearray/tsconfig.json index fbc5ab9e55..60fcedffa5 100644 --- a/types/doublearray/tsconfig.json +++ b/types/doublearray/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/doubleclick-gpt/tsconfig.json b/types/doubleclick-gpt/tsconfig.json index d240d560ce..0cadcea552 100644 --- a/types/doubleclick-gpt/tsconfig.json +++ b/types/doubleclick-gpt/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/download/download-tests.ts b/types/download/download-tests.ts index 34d56d763b..7a498ef0dd 100644 --- a/types/download/download-tests.ts +++ b/types/download/download-tests.ts @@ -28,8 +28,3 @@ download('unicorn.com/foo.jpg', 'dest', { }, useElectronNet: true }); - -import * as download2 from 'download'; - -let downloadFunction = download; -downloadFunction = download2; diff --git a/types/download/tsconfig.json b/types/download/tsconfig.json index 634ae5ab32..4c2a798181 100644 --- a/types/download/tsconfig.json +++ b/types/download/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "download-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/downloadjs/tsconfig.json b/types/downloadjs/tsconfig.json index 15703cf41a..ef9a4f48df 100644 --- a/types/downloadjs/tsconfig.json +++ b/types/downloadjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/draft-js/tsconfig.json b/types/draft-js/tsconfig.json index 58fc6cd302..6b00c0304b 100644 --- a/types/draft-js/tsconfig.json +++ b/types/draft-js/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/drag-timetable/tsconfig.json b/types/drag-timetable/tsconfig.json index 875c35f69a..bb865cb850 100644 --- a/types/drag-timetable/tsconfig.json +++ b/types/drag-timetable/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/draggabilly/tsconfig.json b/types/draggabilly/tsconfig.json index d34c51c338..ce7ce9796a 100644 --- a/types/draggabilly/tsconfig.json +++ b/types/draggabilly/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dragster/tsconfig.json b/types/dragster/tsconfig.json index c415da2b1a..a01e46114a 100644 --- a/types/dragster/tsconfig.json +++ b/types/dragster/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dragula/tsconfig.json b/types/dragula/tsconfig.json index 8179057247..2a559a985a 100644 --- a/types/dragula/tsconfig.json +++ b/types/dragula/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dropboxjs/tsconfig.json b/types/dropboxjs/tsconfig.json index c1c700cf02..eacfcbef6a 100644 --- a/types/dropboxjs/tsconfig.json +++ b/types/dropboxjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dropkickjs/tsconfig.json b/types/dropkickjs/tsconfig.json index 31076fcede..236482a1b4 100644 --- a/types/dropkickjs/tsconfig.json +++ b/types/dropkickjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dropzone/tsconfig.json b/types/dropzone/tsconfig.json index 552b864cb7..122461bf99 100644 --- a/types/dropzone/tsconfig.json +++ b/types/dropzone/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dropzone/v4/tsconfig.json b/types/dropzone/v4/tsconfig.json index d88ab721fd..aae03fcbc2 100644 --- a/types/dropzone/v4/tsconfig.json +++ b/types/dropzone/v4/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { "dropzone": [ "dropzone/v4" diff --git a/types/dsv/tsconfig.json b/types/dsv/tsconfig.json index ba47a0e093..caec8c18be 100644 --- a/types/dsv/tsconfig.json +++ b/types/dsv/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dts-bundle/tsconfig.json b/types/dts-bundle/tsconfig.json index a380447ece..e0f3943154 100644 --- a/types/dts-bundle/tsconfig.json +++ b/types/dts-bundle/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dts-generator/tsconfig.json b/types/dts-generator/tsconfig.json index 97bc3726f6..2095dbfe71 100644 --- a/types/dts-generator/tsconfig.json +++ b/types/dts-generator/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/duplexer2/tsconfig.json b/types/duplexer2/tsconfig.json index 90332a13a9..f6c3a3bd6f 100644 --- a/types/duplexer2/tsconfig.json +++ b/types/duplexer2/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/duplexer3/tsconfig.json b/types/duplexer3/tsconfig.json index 1b3e73cc33..bffe49054d 100644 --- a/types/duplexer3/tsconfig.json +++ b/types/duplexer3/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/duplexify/tsconfig.json b/types/duplexify/tsconfig.json index 72c801f5ab..77cccda4d5 100644 --- a/types/duplexify/tsconfig.json +++ b/types/duplexify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/duplicate-package-checker-webpack-plugin/tsconfig.json b/types/duplicate-package-checker-webpack-plugin/tsconfig.json index 7174bf68ea..835669e473 100644 --- a/types/duplicate-package-checker-webpack-plugin/tsconfig.json +++ b/types/duplicate-package-checker-webpack-plugin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/durandal/tsconfig.json b/types/durandal/tsconfig.json index d34d6a1d77..19a01dfff9 100644 --- a/types/durandal/tsconfig.json +++ b/types/durandal/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/durandal/v1/tsconfig.json b/types/durandal/v1/tsconfig.json index d39bcbc18d..f0245c65e7 100644 --- a/types/durandal/v1/tsconfig.json +++ b/types/durandal/v1/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/dustjs-linkedin/tsconfig.json b/types/dustjs-linkedin/tsconfig.json index 36a7497468..a0f0dca49a 100644 --- a/types/dustjs-linkedin/tsconfig.json +++ b/types/dustjs-linkedin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dvtng-jss/tsconfig.json b/types/dvtng-jss/tsconfig.json index 3d47f98d9f..c7b51d7005 100644 --- a/types/dvtng-jss/tsconfig.json +++ b/types/dvtng-jss/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "dvtng-jss-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/dw-bxslider-4/tsconfig.json b/types/dw-bxslider-4/tsconfig.json index 64526359b3..e5465c64d5 100644 --- a/types/dw-bxslider-4/tsconfig.json +++ b/types/dw-bxslider-4/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dwt/tsconfig.json b/types/dwt/tsconfig.json index db2ac6bbf4..bc93f94dcd 100644 --- a/types/dwt/tsconfig.json +++ b/types/dwt/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dwt/v12/tsconfig.json b/types/dwt/v12/tsconfig.json index f856dd2657..7ef5ca74c2 100644 --- a/types/dwt/v12/tsconfig.json +++ b/types/dwt/v12/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dygraphs/tsconfig.json b/types/dygraphs/tsconfig.json index c3ff239b4b..d6df213d34 100644 --- a/types/dygraphs/tsconfig.json +++ b/types/dygraphs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dymo-label-framework/tsconfig.json b/types/dymo-label-framework/tsconfig.json index 23ac4038d1..54a508bf9f 100644 --- a/types/dymo-label-framework/tsconfig.json +++ b/types/dymo-label-framework/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dynatable/tsconfig.json b/types/dynatable/tsconfig.json index 04ffb1120a..ca539d36d9 100644 --- a/types/dynatable/tsconfig.json +++ b/types/dynatable/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/dynogels/tsconfig.json b/types/dynogels/tsconfig.json index 40297f0a43..07145428de 100644 --- a/types/dynogels/tsconfig.json +++ b/types/dynogels/tsconfig.json @@ -14,7 +14,8 @@ "types": [], "noEmit": true, "strictFunctionTypes": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/each/tsconfig.json b/types/each/tsconfig.json index 4b80cb809d..0148832306 100644 --- a/types/each/tsconfig.json +++ b/types/each/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/earcut/tsconfig.json b/types/earcut/tsconfig.json index 5dca6eec84..24dddd5a2b 100644 --- a/types/earcut/tsconfig.json +++ b/types/earcut/tsconfig.json @@ -14,10 +14,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ "index.d.ts", "earcut-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/easeljs/tsconfig.json b/types/easeljs/tsconfig.json index 1925fa9a78..7b9d6a37f8 100644 --- a/types/easeljs/tsconfig.json +++ b/types/easeljs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/easy-api-request/tsconfig.json b/types/easy-api-request/tsconfig.json index 8cc26d7811..682a4930a0 100644 --- a/types/easy-api-request/tsconfig.json +++ b/types/easy-api-request/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/easy-jsend/tsconfig.json b/types/easy-jsend/tsconfig.json index 3efc497aaf..4a69b01d6e 100644 --- a/types/easy-jsend/tsconfig.json +++ b/types/easy-jsend/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/easy-session/tsconfig.json b/types/easy-session/tsconfig.json index 99d70bf37b..1e2dce35c0 100644 --- a/types/easy-session/tsconfig.json +++ b/types/easy-session/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/easy-table/tsconfig.json b/types/easy-table/tsconfig.json index 4013bbca85..1c1ae66ab8 100644 --- a/types/easy-table/tsconfig.json +++ b/types/easy-table/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/easy-xapi-utils/tsconfig.json b/types/easy-xapi-utils/tsconfig.json index 6cd04a79b9..2d2ccd5660 100644 --- a/types/easy-xapi-utils/tsconfig.json +++ b/types/easy-xapi-utils/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/easy-xapi/tsconfig.json b/types/easy-xapi/tsconfig.json index fa0e8da402..d77f1bf681 100644 --- a/types/easy-xapi/tsconfig.json +++ b/types/easy-xapi/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ebongarde-root/tsconfig.json b/types/ebongarde-root/tsconfig.json index 4765268055..e18dcd54f4 100644 --- a/types/ebongarde-root/tsconfig.json +++ b/types/ebongarde-root/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/echarts/index.d.ts b/types/echarts/index.d.ts index 2880216e46..1f42f8030c 100644 --- a/types/echarts/index.d.ts +++ b/types/echarts/index.d.ts @@ -2,6 +2,7 @@ // Project: http://echarts.baidu.com/ // Definitions by: Xie Jingyang , AntiMoron // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 declare namespace echarts { function init(dom: HTMLDivElement | HTMLCanvasElement, theme?: Object | string, opts?: { @@ -9,13 +10,13 @@ declare namespace echarts { renderer?: string }): ECharts; - const graphic: { + const graphic: Graphic; + + interface Graphic { clipPointsByRect(points: number[][], rect: ERectangle): number[][]; clipRectByRect(targetRect: ERectangle, rect: ERectangle): ERectangle; - LinearGradient: { new (x: number, y: number, x2: number, y2: number, colorStops: Array, globalCoord?: boolean): LinearGradient } - - }; - + LinearGradient: { new(x: number, y: number, x2: number, y2: number, colorStops: Array, globalCoord?: boolean): LinearGradient } + } function connect(group: string | Array): void; @@ -29,6 +30,15 @@ declare namespace echarts { function registerTheme(themeName: string, theme: Object): void; + interface MapObj { + /** geoJson data for map */ + geoJson: object, + /** special areas fro map */ + specialAreas: object + } + + function getMap(mapName: string): MapObj; + interface LinearGradient { colorStops: Array; global: boolean; @@ -39,9 +49,8 @@ declare namespace echarts { y2: number } - interface ECharts { - group: string; + group: string setOption(option: EChartOption, notMerge?: boolean, notRefreshImmediately?: boolean): void @@ -66,20 +75,20 @@ declare namespace echarts { hideLoading(): void getDataURL(opts: { - // 导出的格式,可选 png, jpeg + /** 导出的格式,可选 png, jpeg */ type?: string, - // 导出的图片分辨率比例,默认为 1。 + /** 导出的图片分辨率比例,默认为 1。*/ pixelRatio?: number, - // 导出的图片背景色,默认使用 option 里的 backgroundColor + /** 导出的图片背景色,默认使用 option 里的 backgroundColor */ backgroundColor?: string }): string getConnectedDataURL(opts: { - // 导出的格式,可选 png, jpeg + /** 导出的格式,可选 png, jpeg */ type: string, - // 导出的图片分辨率比例,默认为 1。 + /** 导出的图片分辨率比例,默认为 1。 */ pixelRatio: number, - // 导出的图片背景色,默认使用 option 里的 backgroundColor + /** 导出的图片背景色,默认使用 option 里的 backgroundColor */ backgroundColor: string }): string @@ -89,42 +98,32 @@ declare namespace echarts { dispose(): void - // 转换逻辑点到像素 - convertToPixel(finder: { - seriesIndex?: number, - seriesId?: string, - seriesName?: string, - geoIndex?: number, - geoId?: string, - geoName?: string, - xAxisIndex?: number, - xAxisId?: string, - xAxisName?: string, - yAxisIndex?: number, - yAxisId?: string, - yAxisName?: string, - gridIndex?: number, - gridId?: string - gridName?: string - } | string, value: string | Array): string | Array + /** 转换逻辑点到像素 */ + convertToPixel(finder: ConvertFinder | string, value: string | Array): string | Array - convertFromPixel(finder: { - seriesIndex?: number, - seriesId?: string, - seriesName?: string, - geoIndex?: number, - geoId?: string, - geoName?: string, - xAxisIndex?: number, - xAxisId?: string, - xAxisName?: string, - yAxisIndex?: number, - yAxisId?: string, - yAxisName?: string, - gridIndex?: number, - gridId?: string - gridName?: string - } | string, value: Array | string): Array | string + convertFromPixel(finder: ConvertFinder | string, value: Array | string): Array | string + + containPixel(finder: ConvertFinder | string, + /** 要被判断的点,为像素坐标值,以 echarts 实例的 dom 节点的左上角为坐标 [0, 0] 点。*/ + value: any[]): boolean + } + + interface ConvertFinder { + seriesIndex?: number, + seriesId?: string, + seriesName?: string, + geoIndex?: number, + geoId?: string, + geoName?: string, + xAxisIndex?: number, + xAxisId?: string, + xAxisName?: string, + yAxisIndex?: number, + yAxisId?: string, + yAxisName?: string, + gridIndex?: number, + gridId?: string + gridName?: string } interface ERectangle { diff --git a/types/echarts/tsconfig.json b/types/echarts/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/echarts/tsconfig.json +++ b/types/echarts/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/ecurve/tsconfig.json b/types/ecurve/tsconfig.json index b3d1d586fe..a63c9a4fb5 100644 --- a/types/ecurve/tsconfig.json +++ b/types/ecurve/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ed25519/tsconfig.json b/types/ed25519/tsconfig.json index 98fa33a4b1..31cc84042c 100644 --- a/types/ed25519/tsconfig.json +++ b/types/ed25519/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "ed25519-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/ed2curve/ed2curve-tests.ts b/types/ed2curve/ed2curve-tests.ts new file mode 100644 index 0000000000..bb26cf5b49 --- /dev/null +++ b/types/ed2curve/ed2curve-tests.ts @@ -0,0 +1,9 @@ +import * as ed2curve from 'ed2curve'; +import * as nacl from 'tweetnacl'; + +const myKeyPair = nacl.sign.keyPair(); + +const newPublicKey = ed2curve.convertPublicKey(myKeyPair.publicKey); +const newSecretKey = ed2curve.convertSecretKey(myKeyPair.secretKey); + +const newKeyPair = ed2curve.convertKeyPair(myKeyPair); diff --git a/types/ed2curve/index.d.ts b/types/ed2curve/index.d.ts new file mode 100644 index 0000000000..6b27ee56e4 --- /dev/null +++ b/types/ed2curve/index.d.ts @@ -0,0 +1,21 @@ +// Type definitions for ed2curve 0.2 +// Project: https://github.com/dchest/ed2curve-js +// Definitions by: Florian Keller +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { BoxKeyPair, SignKeyPair } from "tweetnacl"; + +export as namespace ed2curve; + +/** + * Converts Ed25519 public key to Curve25519 public key. + * montgomeryX = (edwardsY + 1)*inverse(1 - edwardsY) mod p + */ +export function convertPublicKey(publicKey: SignKeyPair["publicKey"]): BoxKeyPair["publicKey"] | null; + +/** Converts Ed25519 secret key to Curve25519 secret key. */ +export function convertSecretKey(secretKey: SignKeyPair["secretKey"]): BoxKeyPair["secretKey"] | null; + +/** Converts Ed25519 key pair to Curve25519 key pair. */ +export function convertKeyPair(keyPair: SignKeyPair): BoxKeyPair; diff --git a/types/ed2curve/package.json b/types/ed2curve/package.json new file mode 100644 index 0000000000..95cfca5ea9 --- /dev/null +++ b/types/ed2curve/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "tweetnacl": "^1.0.0" + } +} diff --git a/types/ed2curve/tsconfig.json b/types/ed2curve/tsconfig.json new file mode 100644 index 0000000000..41c38b86dc --- /dev/null +++ b/types/ed2curve/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "ed2curve-tests.ts" + ] +} \ No newline at end of file diff --git a/types/ed2curve/tslint.json b/types/ed2curve/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/ed2curve/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/egg-mock/tsconfig.json b/types/egg-mock/tsconfig.json index 86b33fc149..b1c6e12ced 100644 --- a/types/egg-mock/tsconfig.json +++ b/types/egg-mock/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/egg.js/tsconfig.json b/types/egg.js/tsconfig.json index c7364d3f99..45a13df64d 100644 --- a/types/egg.js/tsconfig.json +++ b/types/egg.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/egjs__axes/Axes.d.ts b/types/egjs__axes/Axes.d.ts index 83bd1f24af..2b00624ee2 100644 --- a/types/egjs__axes/Axes.d.ts +++ b/types/egjs__axes/Axes.d.ts @@ -1,4 +1,4 @@ -import * as Component from "@egjs/component"; +import Component = require("@egjs/component"); import { AnimationManager } from "./AnimationManager"; import { EventManager } from "./EventManager"; import { InterruptManager } from "./InterruptManager"; diff --git a/types/egjs__axes/tsconfig.json b/types/egjs__axes/tsconfig.json index 3086687bc3..6abab016ee 100644 --- a/types/egjs__axes/tsconfig.json +++ b/types/egjs__axes/tsconfig.json @@ -15,6 +15,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { "@egjs/component": [ "egjs__component" diff --git a/types/egjs__component/tsconfig.json b/types/egjs__component/tsconfig.json index 778e5a9f16..cc2373f384 100644 --- a/types/egjs__component/tsconfig.json +++ b/types/egjs__component/tsconfig.json @@ -15,6 +15,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { "@egjs/component": [ "egjs__component" diff --git a/types/ej.web.all/tsconfig.json b/types/ej.web.all/tsconfig.json index 0a0a2b79e4..fd4e862f17 100644 --- a/types/ej.web.all/tsconfig.json +++ b/types/ej.web.all/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ejs-locals/tsconfig.json b/types/ejs-locals/tsconfig.json index 7f549cd0a6..f52e703a13 100644 --- a/types/ejs-locals/tsconfig.json +++ b/types/ejs-locals/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ejs/tsconfig.json b/types/ejs/tsconfig.json index ea91455364..07c96c4dc5 100644 --- a/types/ejs/tsconfig.json +++ b/types/ejs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ejson/tsconfig.json b/types/ejson/tsconfig.json index 3769f3db66..37caf6d903 100644 --- a/types/ejson/tsconfig.json +++ b/types/ejson/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/elastic.js/tsconfig.json b/types/elastic.js/tsconfig.json index 6a705c4c27..498af2bd5c 100644 --- a/types/elastic.js/tsconfig.json +++ b/types/elastic.js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/elasticsearch/tsconfig.json b/types/elasticsearch/tsconfig.json index 21ac20d7e9..53c7b4e86d 100644 --- a/types/elasticsearch/tsconfig.json +++ b/types/elasticsearch/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "elasticsearch-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/electron-config/tsconfig.json b/types/electron-config/tsconfig.json index 8462205033..928f18f011 100644 --- a/types/electron-config/tsconfig.json +++ b/types/electron-config/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/electron-debug/tsconfig.json b/types/electron-debug/tsconfig.json index 65a83c7c64..8422bbf834 100644 --- a/types/electron-debug/tsconfig.json +++ b/types/electron-debug/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/electron-devtools-installer/tsconfig.json b/types/electron-devtools-installer/tsconfig.json index 77fbb1d7c5..1a943c0c96 100644 --- a/types/electron-devtools-installer/tsconfig.json +++ b/types/electron-devtools-installer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/electron-is-dev/tsconfig.json b/types/electron-is-dev/tsconfig.json index 1260f76477..1201808cbe 100644 --- a/types/electron-is-dev/tsconfig.json +++ b/types/electron-is-dev/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/electron-json-storage/tsconfig.json b/types/electron-json-storage/tsconfig.json index d5bbe0168b..a66e96746a 100644 --- a/types/electron-json-storage/tsconfig.json +++ b/types/electron-json-storage/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/electron-notifications/tsconfig.json b/types/electron-notifications/tsconfig.json index b5d1926fe9..486d6311e7 100644 --- a/types/electron-notifications/tsconfig.json +++ b/types/electron-notifications/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/electron-notify/tsconfig.json b/types/electron-notify/tsconfig.json index 49580cd305..d265180995 100644 --- a/types/electron-notify/tsconfig.json +++ b/types/electron-notify/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/electron-packager/electron-packager-tests.ts b/types/electron-packager/electron-packager-tests.ts index 482c49bbff..f956910b78 100644 --- a/types/electron-packager/electron-packager-tests.ts +++ b/types/electron-packager/electron-packager-tests.ts @@ -1,8 +1,16 @@ -import * as packager from "electron-packager"; +import packager = require("electron-packager"); -function callback(err: Error, appPath: string) { +function callback(err: Error, appPaths: string[]) { const msg = err.message; - const index = appPath.indexOf("test"); + const index = appPaths.indexOf("test"); +} + +function completeFunction(buildPath: string, electronVersion: string, platform: string, arch: string, callbackFn: () => void) { + callbackFn(); +} + +function ignoreFunction(path: string) { + return true; } packager({ @@ -10,20 +18,38 @@ packager({ name: "myapplication", platform: "win32", arch: "all", - electronVersion: "0.34.0" + electronVersion: "0.34.0", + win32metadata: { + CompanyName: "Acme CO", + FileDescription: "My application", + OriginalFilename: "myapp.exe", + ProductName: "Application", + InternalName: "roadrunner", + "requested-execution-level": "highestAvailable", + "application-manifest": "manifest.xml" + } }, callback); packager({ dir: ".", name: "myapplication", electronVersion: "0.34.0", - all: true + all: true, + win32metadata: { + CompanyName: "Acme CO", + FileDescription: "My application", + OriginalFilename: "myapp.exe", + ProductName: "Application", + InternalName: "roadrunner", + "requested-execution-level": "requireAdministrator", + "application-manifest": "manifest.xml" + } }, callback); packager({ dir: ".", name: "myapplication", - platform: "win32", + platform: "all", arch: "all", electronVersion: "0.34.0" }, callback); @@ -34,3 +60,136 @@ packager({ electronVersion: "0.34.0", all: true }, callback); + +packager({ + dir: ".", + name: "myapplication", + electronVersion: "0.34.0", + arch: "arm64", + executableName: "myapp" +}, callback); + +packager({ + dir: ".", + afterCopy: [ + completeFunction + ], + afterExtract: [ + completeFunction + ], + afterPrune: [ + completeFunction + ], + appCopyright: "Copyright", + appVersion: "1.0", + arch: "ia32", + asar: false, + buildVersion: "1.2.3", + derefSymlinks: true, + download: { + cache: "./zips", + mirror: "https://10.1.2.105/", + quiet: true, + strictSSL: true + }, + extraResource: "foo.js", + icon: "foo.ico", + ignore: /ab+c/, + out: "out", + overwrite: true, + packageManager: false, + prune: true, + quiet: true, + tmpdir: "/tmp", + win32metadata: { + CompanyName: "Acme CO", + FileDescription: "My application", + OriginalFilename: "myapp.exe", + ProductName: "Application", + InternalName: "roadrunner", + "requested-execution-level": "asInvoker", + "application-manifest": "manifest.xml" + } +}, callback); + +packager({ + dir: ".", + arch: "x64", + asar: true, + derefSymlinks: false, + download: { + cache: "./zips", + mirror: "https://10.1.2.105/", + quiet: false, + strictSSL: true + }, + extraResource: [ + "foo.js", + "bar.js" + ], + ignore: [ + /ab+c/, + new RegExp('abc') + ], + overwrite: false, + packageManager: "npm", + platform: "darwin", + prune: false, + quiet: false, + tmpdir: "false", + appBundleId: "123456", + appCategoryType: "public.app-category.developer-tools", + extendInfo: "plist.txt", + helperBundleId: "23223f", + osxSign: true +}, callback); + +packager({ + dir: ".", + arch: "armv7l", + asar: { + ordering: "order.txt", + unpack: "*.js", + unpackDir: "sub_dir" + }, + download: { + cache: "./zips", + mirror: "https://10.1.2.105/", + quiet: false, + strictSSL: false + }, + ignore: ignoreFunction, + packageManager: "cnpm", + platform: "linux" +}, callback); + +packager({ + dir: ".", + arch: [ + "ia32", + "x64" + ], + download: { + cache: "./zips", + mirror: "https://10.1.2.105/", + quiet: true, + strictSSL: false + }, + packageManager: "yarn", + platform: "mas", + extendInfo: { + foo: "bar" + }, + osxSign: { + identity: "myidentity", + entitlements: "path/to/my.entitlements", + "entitlements-inherit": "path/to/inherit.entitlements" + }, + protocols: [{ + name: "myappproto", + schemes: [ + "myapp", + "myapp2" + ] + }] +}, callback); diff --git a/types/electron-packager/index.d.ts b/types/electron-packager/index.d.ts index de33fa3499..6e430ecdb2 100644 --- a/types/electron-packager/index.d.ts +++ b/types/electron-packager/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for electron-packager 8.7 +// Type definitions for electron-packager 10.1 // Project: https://github.com/electron-userland/electron-packager // Definitions by: Maxime LUCE // Juan Jimenez-Anca +// John Kleinschmidt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -31,8 +32,8 @@ declare namespace electronPackager { type ignoreFunction = (path: string) => boolean; type onCompleteFn = (buildPath: string, electronVersion: string, platform: string, arch: string, callbackFn: () => void) => void; - type arch = "ia32" | "x64" | "armv7l" | "all"; - type packageManager = "npm" | "cnpm" | "yarn"; + type arch = "ia32" | "x64" | "armv7l" | "arm64" |"all"; + type packageManager = "npm" | "cnpm" | "yarn" | false; type platform = "linux" | "win32" | "darwin" | "mas" | "all"; interface AsarOptions { @@ -94,7 +95,7 @@ declare namespace electronPackager { * Arbitrary combinations of individual architectures are also supported via a comma-delimited string or array of strings. * The non-all values correspond to the architecture names used by Electron releases. This value is not restricted to the official set if download.mirror is set. */ - arch?: arch; + arch?: arch | arch[]; /** * Whether to package the application's source code into an archive, using Electron's archive format */ @@ -120,6 +121,10 @@ declare namespace electronPackager { * One or more files to be copied directly into the app's Contents/Resources directory for OS X target platforms, and the resources directory for other target platforms. */ extraResource?: string | string[]; + /** + * The name of the executable file, sans file extension. Defaults to the value for the name parameter + */ + executableName?: string; /** * The local path to the icon file, if the target platform supports setting embedding an icon. */ diff --git a/types/electron-packager/tsconfig.json b/types/electron-packager/tsconfig.json index 76f19f8f73..a279fa7571 100644 --- a/types/electron-packager/tsconfig.json +++ b/types/electron-packager/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/electron-settings/tsconfig.json b/types/electron-settings/tsconfig.json index badf76a8d0..655cfc5dc8 100644 --- a/types/electron-settings/tsconfig.json +++ b/types/electron-settings/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/electron-settings/v2/tsconfig.json b/types/electron-settings/v2/tsconfig.json index 810fdbd504..8e5453808e 100644 --- a/types/electron-settings/v2/tsconfig.json +++ b/types/electron-settings/v2/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/electron-spellchecker/tsconfig.json b/types/electron-spellchecker/tsconfig.json index 539cc30156..6494f31e81 100644 --- a/types/electron-spellchecker/tsconfig.json +++ b/types/electron-spellchecker/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "electron-spellchecker-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/electron-store/tsconfig.json b/types/electron-store/tsconfig.json index 6f21caec55..f5eb483b5e 100644 --- a/types/electron-store/tsconfig.json +++ b/types/electron-store/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/electron-util/tsconfig.json b/types/electron-util/tsconfig.json index c65e02a5c7..49206d08cd 100644 --- a/types/electron-util/tsconfig.json +++ b/types/electron-util/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "electron-util-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/electron-window-state/tsconfig.json b/types/electron-window-state/tsconfig.json index 3843443cda..3099f275a8 100644 --- a/types/electron-window-state/tsconfig.json +++ b/types/electron-window-state/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/electron-winstaller/tsconfig.json b/types/electron-winstaller/tsconfig.json index af16777473..41b83013bf 100644 --- a/types/electron-winstaller/tsconfig.json +++ b/types/electron-winstaller/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/element-ready/tsconfig.json b/types/element-ready/tsconfig.json index e5067c7ccf..fcd6b1d926 100644 --- a/types/element-ready/tsconfig.json +++ b/types/element-ready/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/element-resize-detector/tsconfig.json b/types/element-resize-detector/tsconfig.json index 9400053488..919187d401 100644 --- a/types/element-resize-detector/tsconfig.json +++ b/types/element-resize-detector/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "element-resize-detector-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/element-resize-event/tsconfig.json b/types/element-resize-event/tsconfig.json index 9d86e4632f..f0d3918e5a 100644 --- a/types/element-resize-event/tsconfig.json +++ b/types/element-resize-event/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/elm/tsconfig.json b/types/elm/tsconfig.json index bca395d3c2..c82a960fb7 100644 --- a/types/elm/tsconfig.json +++ b/types/elm/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/email-templates/tsconfig.json b/types/email-templates/tsconfig.json index 5a2994bb04..cb8601eaae 100644 --- a/types/email-templates/tsconfig.json +++ b/types/email-templates/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ember-data/tsconfig.json b/types/ember-data/tsconfig.json index 15f77391aa..0845f9e795 100644 --- a/types/ember-data/tsconfig.json +++ b/types/ember-data/tsconfig.json @@ -10,10 +10,13 @@ "strictNullChecks": true, "strictFunctionTypes": false, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -31,4 +34,4 @@ "test/injections.ts", "test/error.ts" ] -} +} \ No newline at end of file diff --git a/types/ember-feature-flags/tsconfig.json b/types/ember-feature-flags/tsconfig.json index 9481eddeb5..d71fce7001 100644 --- a/types/ember-feature-flags/tsconfig.json +++ b/types/ember-feature-flags/tsconfig.json @@ -15,11 +15,12 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "tests/helpers/with-feature.d.ts", "ember-feature-flags-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/ember-mocha/tsconfig.json b/types/ember-mocha/tsconfig.json index e9fdedfe7f..7c2a404282 100644 --- a/types/ember-mocha/tsconfig.json +++ b/types/ember-mocha/tsconfig.json @@ -9,13 +9,16 @@ "strictNullChecks": true, "strictFunctionTypes": false, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "ember-mocha-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/ember-modal-dialog/tsconfig.json b/types/ember-modal-dialog/tsconfig.json index 8834a9ae3d..1826d665c7 100644 --- a/types/ember-modal-dialog/tsconfig.json +++ b/types/ember-modal-dialog/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "ember-modal-dialog-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/ember-qunit/tsconfig.json b/types/ember-qunit/tsconfig.json index 1f9e626103..c09b50cd66 100644 --- a/types/ember-qunit/tsconfig.json +++ b/types/ember-qunit/tsconfig.json @@ -10,13 +10,16 @@ "strictNullChecks": true, "strictFunctionTypes": false, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "ember-qunit-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/ember-qunit/v2/tsconfig.json b/types/ember-qunit/v2/tsconfig.json index e173bc0d73..2d4c3deabd 100644 --- a/types/ember-qunit/v2/tsconfig.json +++ b/types/ember-qunit/v2/tsconfig.json @@ -10,16 +10,21 @@ "strictNullChecks": true, "strictFunctionTypes": false, "baseUrl": "../../", - "typeRoots": ["../../"], + "typeRoots": [ + "../../" + ], "paths": { - "ember-qunit": ["ember-qunit/v2"] + "ember-qunit": [ + "ember-qunit/v2" + ] }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "ember-qunit-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/ember-test-helpers/tsconfig.json b/types/ember-test-helpers/tsconfig.json index dc9c583d1c..9bd7a250d9 100644 --- a/types/ember-test-helpers/tsconfig.json +++ b/types/ember-test-helpers/tsconfig.json @@ -10,13 +10,16 @@ "strictNullChecks": true, "strictFunctionTypes": false, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "ember-test-helpers-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/ember-testing-helpers/tsconfig.json b/types/ember-testing-helpers/tsconfig.json index 622d4d1584..8cb8c83838 100644 --- a/types/ember-testing-helpers/tsconfig.json +++ b/types/ember-testing-helpers/tsconfig.json @@ -10,10 +10,13 @@ "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ember/index.d.ts b/types/ember/index.d.ts index 5f041b9df6..22ff839774 100755 --- a/types/ember/index.d.ts +++ b/types/ember/index.d.ts @@ -3284,7 +3284,7 @@ declare module 'ember' { declare module '@ember/application' { import Ember from 'ember'; - export default Ember.Application; + export default class Application extends Ember.Application { } export const getOwner: typeof Ember.getOwner; export const onLoad: typeof Ember.onLoad; export const runLoadHooks: typeof Ember.runLoadHooks; @@ -3299,22 +3299,23 @@ declare module '@ember/application/deprecations' { declare module '@ember/application/globals-resolver' { import Ember from 'ember'; - export default Ember.DefaultResolver; + export default class GlobalsResolver extends Ember.DefaultResolver { } } declare module '@ember/application/instance' { import Ember from 'ember'; - export default Ember.ApplicationInstance; + export default class ApplicationInstance extends Ember.ApplicationInstance { } } declare module '@ember/application/resolver' { import Ember from 'ember'; - export default Ember.Resolver; + export default class Resolver extends Ember.Resolver { } } declare module '@ember/array' { import Ember from 'ember'; - export default Ember.Array; + const EmberArray: typeof Ember.Array; + export default EmberArray; export const A: typeof Ember.A; export const isArray: typeof Ember.isArray; export const makeArray: typeof Ember.makeArray; @@ -3322,43 +3323,44 @@ declare module '@ember/array' { declare module '@ember/array/mutable' { import Ember from 'ember'; - export default Ember.MutableArray; + const MutableArray: typeof Ember.MutableArray; + export default MutableArray; } declare module '@ember/array/proxy' { import Ember from 'ember'; - export default Ember.ArrayProxy; + export default class ArrayProxy extends Ember.ArrayProxy { } } declare module '@ember/component' { import Ember from 'ember'; - export default Ember.Component; + export default class Component extends Ember.Component { } } declare module '@ember/component/checkbox' { import Ember from 'ember'; - export default Ember.Checkbox; + export default class Checkbox extends Ember.Checkbox { } } declare module '@ember/component/helper' { import Ember from 'ember'; - export default Ember.Helper; + export default class Helper extends Ember.Helper { } export const helper: typeof Ember.Helper.helper; } declare module '@ember/component/text-area' { import Ember from 'ember'; - export default Ember.TextArea; + export default class TextArea extends Ember.TextArea { } } declare module '@ember/component/text-field' { import Ember from 'ember'; - export default Ember.TextField; + export default class TextField extends Ember.TextField { } } declare module '@ember/controller' { import Ember from 'ember'; - export default Ember.Controller; + export default class Controller extends Ember.Controller { } export const inject: typeof Ember.inject.controller; } @@ -3375,28 +3377,29 @@ declare module '@ember/debug' { declare module '@ember/debug/container-debug-adapter' { import Ember from 'ember'; - export default Ember.ContainerDebugAdapter; + export default class ContainerDebugAdapter extends Ember.ContainerDebugAdapter { } } declare module '@ember/debug/data-adapter' { import Ember from 'ember'; - export default Ember.DataAdapter; + export default class DataAdapter extends Ember.DataAdapter { } } declare module '@ember/engine' { import Ember from 'ember'; - export default Ember.Engine; + export default class Engine extends Ember.Engine { } export const getEngineParent: typeof Ember.getEngineParent; } declare module '@ember/engine/instance' { import Ember from 'ember'; - export default Ember.EngineInstance; + export default class EngineInstance extends Ember.EngineInstance { } } declare module '@ember/enumerable' { import Ember from 'ember'; - export default Ember.Enumerable; + const Enumerable: typeof Ember.Enumerable; + export default Enumerable; } declare module '@ember/instrumentation' { @@ -3409,17 +3412,17 @@ declare module '@ember/instrumentation' { declare module '@ember/map' { import Ember from 'ember'; - export default Ember.Map; + export default class EmberMap extends Ember.Map { } } declare module '@ember/map/with-default' { import Ember from 'ember'; - export default Ember.MapWithDefault; + export default class MapWithDefault extends Ember.MapWithDefault { } } declare module '@ember/object' { import Ember from 'ember'; - export default Ember.Object; + export default class EmberObject extends Ember.Object { } export const aliasMethod: typeof Ember.aliasMethod; export const computed: typeof Ember.computed; export const defineProperty: typeof Ember.defineProperty; @@ -3434,7 +3437,7 @@ declare module '@ember/object' { declare module '@ember/object/computed' { import Ember from 'ember'; - export default Ember.ComputedProperty; + export default class ComputedProperty extends Ember.ComputedProperty { } export const alias: typeof Ember.computed.alias; export const and: typeof Ember.computed.and; export const bool: typeof Ember.computed.bool; @@ -3472,12 +3475,13 @@ declare module '@ember/object/computed' { declare module '@ember/object/core' { import Ember from 'ember'; - export default Ember.CoreObject; + export default class CoreObject extends Ember.CoreObject { } } declare module '@ember/object/evented' { import Ember from 'ember'; - export default Ember.Evented; + const Evented: typeof Ember.Evented; + export default Evented; export const on: typeof Ember.on; } @@ -3497,12 +3501,14 @@ declare module '@ember/object/internals' { declare module '@ember/object/mixin' { import Ember from 'ember'; - export default Ember.Mixin; + const Mixin: typeof Ember.Mixin; + export default Mixin; } declare module '@ember/object/observable' { import Ember from 'ember'; - export default Ember.Observable; + const Observable: typeof Ember.Observable; + export default Observable; } declare module '@ember/object/observers' { @@ -3513,12 +3519,13 @@ declare module '@ember/object/observers' { declare module '@ember/object/promise-proxy-mixin' { import Ember from 'ember'; - export default Ember.PromiseProxyMixin; + const PromiseProxyMixin: typeof Ember.PromiseProxyMixin; + export default PromiseProxyMixin; } declare module '@ember/object/proxy' { import Ember from 'ember'; - export default Ember.ObjectProxy; + export default class ObjectProxy extends Ember.ObjectProxy { } } declare module '@ember/polyfills' { @@ -3532,42 +3539,43 @@ declare module '@ember/polyfills' { declare module '@ember/routing/auto-location' { import Ember from 'ember'; - export default Ember.AutoLocation; + export default class AutoLocation extends Ember.AutoLocation { } } declare module '@ember/routing/hash-location' { import Ember from 'ember'; - export default Ember.HashLocation; + export default class HashLocation extends Ember.HashLocation { } } declare module '@ember/routing/history-location' { import Ember from 'ember'; - export default Ember.HistoryLocation; + export default class HistoryLocation extends Ember.HistoryLocation { } } declare module '@ember/routing/link-component' { import Ember from 'ember'; - export default Ember.LinkComponent; + export default class LinkComponent extends Ember.LinkComponent { } } declare module '@ember/routing/location' { import Ember from 'ember'; - export default Ember.Location; + const Location: typeof Ember.Location; + export default Location; } declare module '@ember/routing/none-location' { import Ember from 'ember'; - export default Ember.NoneLocation; + export default class NoneLocation extends Ember.NoneLocation { } } declare module '@ember/routing/route' { import Ember from 'ember'; - export default Ember.Route; + export default class Route extends Ember.Route { } } declare module '@ember/routing/router' { import Ember from 'ember'; - export default Ember.Router; + export default class EmberRouter extends Ember.Router { } } declare module '@ember/runloop' { @@ -3589,7 +3597,7 @@ declare module '@ember/runloop' { declare module '@ember/service' { import Ember from 'ember'; - export default Ember.Service; + export default class Service extends Ember.Service { } export const inject: typeof Ember.inject.service; } @@ -3619,7 +3627,7 @@ declare module '@ember/test' { declare module '@ember/test/adapter' { import Ember from 'ember'; - export default Ember.Test.Adapter; + export default class TestAdapter extends Ember.Test.Adapter { } } declare module '@ember/utils' { diff --git a/types/ember/tsconfig.json b/types/ember/tsconfig.json index 98d2623024..d8580b0760 100755 --- a/types/ember/tsconfig.json +++ b/types/ember/tsconfig.json @@ -11,10 +11,13 @@ "strictNullChecks": true, "strictFunctionTypes": false, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -47,4 +50,4 @@ "test/route.ts", "test/view-utils.ts" ] -} +} \ No newline at end of file diff --git a/types/ember/v1/tsconfig.json b/types/ember/v1/tsconfig.json index 7be1f0660b..c817172bbf 100644 --- a/types/ember/v1/tsconfig.json +++ b/types/ember/v1/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/emissary/tsconfig.json b/types/emissary/tsconfig.json index b6d04f07a7..b8d3d5241a 100644 --- a/types/emissary/tsconfig.json +++ b/types/emissary/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/emoji-mart/tsconfig.json b/types/emoji-mart/tsconfig.json index fb776e9a21..b0e8df2d67 100644 --- a/types/emoji-mart/tsconfig.json +++ b/types/emoji-mart/tsconfig.json @@ -15,6 +15,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ @@ -29,4 +30,4 @@ "dist-es/index.d.ts", "emoji-mart-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/emojione/tsconfig.json b/types/emojione/tsconfig.json index f74fb50d6f..3dc6a32fc9 100644 --- a/types/emojione/tsconfig.json +++ b/types/emojione/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/empower/tsconfig.json b/types/empower/tsconfig.json index 9d9d553fc0..ac5a3bd4d8 100644 --- a/types/empower/tsconfig.json +++ b/types/empower/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/emscripten/tsconfig.json b/types/emscripten/tsconfig.json index d17ea9a00a..55db0defd3 100644 --- a/types/emscripten/tsconfig.json +++ b/types/emscripten/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/encoding-japanese/tsconfig.json b/types/encoding-japanese/tsconfig.json index b3b7a2861f..90acb7e3aa 100644 --- a/types/encoding-japanese/tsconfig.json +++ b/types/encoding-japanese/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/end-of-stream/end-of-stream-tests.ts b/types/end-of-stream/end-of-stream-tests.ts index 211c6f5196..829a177d5c 100644 --- a/types/end-of-stream/end-of-stream-tests.ts +++ b/types/end-of-stream/end-of-stream-tests.ts @@ -1,4 +1,4 @@ -import * as eos from "end-of-stream"; +import eos = require("end-of-stream"); declare const readableStream: NodeJS.ReadableStream; declare const writableStream: NodeJS.WritableStream; diff --git a/types/end-of-stream/tsconfig.json b/types/end-of-stream/tsconfig.json index b46ee0c768..10cf712c76 100644 --- a/types/end-of-stream/tsconfig.json +++ b/types/end-of-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/engine.io-client/tsconfig.json b/types/engine.io-client/tsconfig.json index cb3a024a3e..e473bfebe5 100644 --- a/types/engine.io-client/tsconfig.json +++ b/types/engine.io-client/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/engine.io/tsconfig.json b/types/engine.io/tsconfig.json index b31b3394b0..5e35fcea3a 100644 --- a/types/engine.io/tsconfig.json +++ b/types/engine.io/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/enhanced-resolve/tsconfig.json b/types/enhanced-resolve/tsconfig.json index 9c87f7e7a1..784aadf889 100644 --- a/types/enhanced-resolve/tsconfig.json +++ b/types/enhanced-resolve/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/enigma.js/tsconfig.json b/types/enigma.js/tsconfig.json index b3b93456f0..10d59e2fab 100644 --- a/types/enigma.js/tsconfig.json +++ b/types/enigma.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ent/tsconfig.json b/types/ent/tsconfig.json index 53249c7605..ff83547680 100644 --- a/types/ent/tsconfig.json +++ b/types/ent/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/entities/tsconfig.json b/types/entities/tsconfig.json index 1a88ad9778..90c9f78f64 100644 --- a/types/entities/tsconfig.json +++ b/types/entities/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/env-to-object/tsconfig.json b/types/env-to-object/tsconfig.json index 2e59eff3e4..9154d82826 100644 --- a/types/env-to-object/tsconfig.json +++ b/types/env-to-object/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/envify/tsconfig.json b/types/envify/tsconfig.json index 381ca464c9..bfa88f845a 100644 --- a/types/envify/tsconfig.json +++ b/types/envify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/enzyme-adapter-react-15.4/enzyme-adapter-react-15.4-tests.ts b/types/enzyme-adapter-react-15.4/enzyme-adapter-react-15.4-tests.ts index 603c7634b3..af26532174 100644 --- a/types/enzyme-adapter-react-15.4/enzyme-adapter-react-15.4-tests.ts +++ b/types/enzyme-adapter-react-15.4/enzyme-adapter-react-15.4-tests.ts @@ -1,4 +1,4 @@ import { configure } from 'enzyme'; -import * as Adapter from 'enzyme-adapter-react-15.4'; +import Adapter = require('enzyme-adapter-react-15.4'); configure({ adapter: new Adapter() }); diff --git a/types/enzyme-adapter-react-15.4/tsconfig.json b/types/enzyme-adapter-react-15.4/tsconfig.json index 804fe8ee07..51543ab615 100644 --- a/types/enzyme-adapter-react-15.4/tsconfig.json +++ b/types/enzyme-adapter-react-15.4/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "enzyme-adapter-react-15.4-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/enzyme-adapter-react-15/enzyme-adapter-react-15-tests.ts b/types/enzyme-adapter-react-15/enzyme-adapter-react-15-tests.ts index 9be474c2d8..fa3c9a357a 100644 --- a/types/enzyme-adapter-react-15/enzyme-adapter-react-15-tests.ts +++ b/types/enzyme-adapter-react-15/enzyme-adapter-react-15-tests.ts @@ -1,4 +1,4 @@ import { configure } from 'enzyme'; -import * as Adapter from 'enzyme-adapter-react-15'; +import Adapter = require('enzyme-adapter-react-15'); configure({ adapter: new Adapter() }); diff --git a/types/enzyme-adapter-react-15/tsconfig.json b/types/enzyme-adapter-react-15/tsconfig.json index 23f0d0d292..fbd8458aac 100644 --- a/types/enzyme-adapter-react-15/tsconfig.json +++ b/types/enzyme-adapter-react-15/tsconfig.json @@ -1,21 +1,27 @@ { - "compilerOptions": { - "baseUrl": "../", - "typeRoots": ["../"], - "types": [], - "module": "commonjs", - "lib": ["es6", "dom"], - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "forceConsistentCasingInFileNames": true, - "noEmit": true - }, - "files": [ - "index.d.ts", - "enzyme-adapter-react-15-tests.ts" - ] -} + "compilerOptions": { + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, + "noEmit": true + }, + "files": [ + "index.d.ts", + "enzyme-adapter-react-15-tests.ts" + ] +} \ No newline at end of file diff --git a/types/enzyme-adapter-react-16/enzyme-adapter-react-16-tests.ts b/types/enzyme-adapter-react-16/enzyme-adapter-react-16-tests.ts index b8acf7f719..8b53ed9dc7 100644 --- a/types/enzyme-adapter-react-16/enzyme-adapter-react-16-tests.ts +++ b/types/enzyme-adapter-react-16/enzyme-adapter-react-16-tests.ts @@ -1,4 +1,4 @@ import { configure } from 'enzyme'; -import * as Adapter from 'enzyme-adapter-react-16'; +import Adapter = require('enzyme-adapter-react-16'); configure({ adapter: new Adapter() }); diff --git a/types/enzyme-adapter-react-16/tsconfig.json b/types/enzyme-adapter-react-16/tsconfig.json index 1c1c8e15f9..2f1b7b089c 100644 --- a/types/enzyme-adapter-react-16/tsconfig.json +++ b/types/enzyme-adapter-react-16/tsconfig.json @@ -1,21 +1,27 @@ { - "compilerOptions": { - "baseUrl": "../", - "typeRoots": ["../"], - "types": [], - "module": "commonjs", - "lib": ["es6", "dom"], - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "forceConsistentCasingInFileNames": true, - "noEmit": true - }, - "files": [ - "index.d.ts", - "enzyme-adapter-react-16-tests.ts" - ] -} + "compilerOptions": { + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, + "noEmit": true + }, + "files": [ + "index.d.ts", + "enzyme-adapter-react-16-tests.ts" + ] +} \ No newline at end of file diff --git a/types/enzyme-to-json/tsconfig.json b/types/enzyme-to-json/tsconfig.json index 948a88349a..be2b7c3113 100644 --- a/types/enzyme-to-json/tsconfig.json +++ b/types/enzyme-to-json/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/enzyme/tsconfig.json b/types/enzyme/tsconfig.json index 096b64a111..f8618a73da 100644 --- a/types/enzyme/tsconfig.json +++ b/types/enzyme/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/eonasdan-bootstrap-datetimepicker/tsconfig.json b/types/eonasdan-bootstrap-datetimepicker/tsconfig.json index d2f659f25f..ae702872b6 100644 --- a/types/eonasdan-bootstrap-datetimepicker/tsconfig.json +++ b/types/eonasdan-bootstrap-datetimepicker/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/epiceditor/tsconfig.json b/types/epiceditor/tsconfig.json index ccd9f7cce0..2d3338100c 100644 --- a/types/epiceditor/tsconfig.json +++ b/types/epiceditor/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/epilogue/epilogue-tests.ts b/types/epilogue/epilogue-tests.ts index 0cf40fd1e9..cff716f780 100644 --- a/types/epilogue/epilogue-tests.ts +++ b/types/epilogue/epilogue-tests.ts @@ -1,6 +1,6 @@ import * as epilogue from 'epilogue'; -import * as express from 'express'; -import * as Sequelize from 'sequelize'; +import express = require('express'); +import Sequelize = require('sequelize'); const database = new Sequelize({ }); diff --git a/types/epilogue/tsconfig.json b/types/epilogue/tsconfig.json index 593077c6bc..ab9ee2a292 100644 --- a/types/epilogue/tsconfig.json +++ b/types/epilogue/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "epilogue-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/epub/tsconfig.json b/types/epub/tsconfig.json index 90ba263b21..35b9ccc362 100644 --- a/types/epub/tsconfig.json +++ b/types/epub/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/eq.js/tsconfig.json b/types/eq.js/tsconfig.json index 3d35e3fefa..1fa222c5f8 100644 --- a/types/eq.js/tsconfig.json +++ b/types/eq.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/errorhandler/errorhandler-tests.ts b/types/errorhandler/errorhandler-tests.ts index f6a35dd19d..3f8ada3372 100644 --- a/types/errorhandler/errorhandler-tests.ts +++ b/types/errorhandler/errorhandler-tests.ts @@ -1,6 +1,5 @@ - -import * as express from 'express'; -import * as errorhandler from 'errorhandler'; +import express = require('express'); +import errorhandler = require('errorhandler'); var app = express(); diff --git a/types/errorhandler/tsconfig.json b/types/errorhandler/tsconfig.json index dc08f31d21..d827ee2b51 100644 --- a/types/errorhandler/tsconfig.json +++ b/types/errorhandler/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/es6-collections/tsconfig.json b/types/es6-collections/tsconfig.json index c2b2ba64d7..4297f94f93 100644 --- a/types/es6-collections/tsconfig.json +++ b/types/es6-collections/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/es6-promisify/tsconfig.json b/types/es6-promisify/tsconfig.json index 707e6094d3..ad7eafa8c2 100644 --- a/types/es6-promisify/tsconfig.json +++ b/types/es6-promisify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/es6-shim/tsconfig.json b/types/es6-shim/tsconfig.json index f11dcede04..54aeed6ac4 100644 --- a/types/es6-shim/tsconfig.json +++ b/types/es6-shim/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/es6-weak-map/tsconfig.json b/types/es6-weak-map/tsconfig.json index 2652a8f513..4c0232519a 100644 --- a/types/es6-weak-map/tsconfig.json +++ b/types/es6-weak-map/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/escape-html/tsconfig.json b/types/escape-html/tsconfig.json index 336fcb1583..34e696e44e 100644 --- a/types/escape-html/tsconfig.json +++ b/types/escape-html/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/escape-latex/tsconfig.json b/types/escape-latex/tsconfig.json index 2c782b99a5..1484ee5040 100644 --- a/types/escape-latex/tsconfig.json +++ b/types/escape-latex/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/escape-string-regexp/tsconfig.json b/types/escape-string-regexp/tsconfig.json index 46d2b8fec7..30e6ca0344 100644 --- a/types/escape-string-regexp/tsconfig.json +++ b/types/escape-string-regexp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/escodegen/tsconfig.json b/types/escodegen/tsconfig.json index 4755f2604a..9256804b2a 100644 --- a/types/escodegen/tsconfig.json +++ b/types/escodegen/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/eslint-plugin-prettier/tsconfig.json b/types/eslint-plugin-prettier/tsconfig.json index 67ba3c86f6..a04dd71953 100644 --- a/types/eslint-plugin-prettier/tsconfig.json +++ b/types/eslint-plugin-prettier/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/esprima-walk/tsconfig.json b/types/esprima-walk/tsconfig.json index 7314e2d509..db6207d8ff 100644 --- a/types/esprima-walk/tsconfig.json +++ b/types/esprima-walk/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/esprima/tsconfig.json b/types/esprima/tsconfig.json index 2ac3b4bb46..16cac910ee 100644 --- a/types/esprima/tsconfig.json +++ b/types/esprima/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/esprima/v2/tsconfig.json b/types/esprima/v2/tsconfig.json index a3c195ca3c..ff4deff6d5 100644 --- a/types/esprima/v2/tsconfig.json +++ b/types/esprima/v2/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/espruino/tsconfig.json b/types/espruino/tsconfig.json index 38bb3dfd03..9766072d18 100644 --- a/types/espruino/tsconfig.json +++ b/types/espruino/tsconfig.json @@ -2,8 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es2015", - "dom" + "es2015", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "espruino-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/esri-leaflet-geocoder/tsconfig.json b/types/esri-leaflet-geocoder/tsconfig.json index 6bdfac4c4d..ef48041716 100644 --- a/types/esri-leaflet-geocoder/tsconfig.json +++ b/types/esri-leaflet-geocoder/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/esri-leaflet/tsconfig.json b/types/esri-leaflet/tsconfig.json index 596c74f0a2..adfbf16e8b 100644 --- a/types/esri-leaflet/tsconfig.json +++ b/types/esri-leaflet/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/estraverse/tsconfig.json b/types/estraverse/tsconfig.json index 0a199a8857..d69033219b 100644 --- a/types/estraverse/tsconfig.json +++ b/types/estraverse/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/estree/tsconfig.json b/types/estree/tsconfig.json index 9e10c93348..d840cbe748 100644 --- a/types/estree/tsconfig.json +++ b/types/estree/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/etag/tsconfig.json b/types/etag/tsconfig.json index 5df46bdfe9..692a356590 100644 --- a/types/etag/tsconfig.json +++ b/types/etag/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ethjs-signer/tsconfig.json b/types/ethjs-signer/tsconfig.json index b9548b9847..c68bd2742f 100644 --- a/types/ethjs-signer/tsconfig.json +++ b/types/ethjs-signer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/eureka-js-client/tsconfig.json b/types/eureka-js-client/tsconfig.json index 8a981b029d..0863854329 100644 --- a/types/eureka-js-client/tsconfig.json +++ b/types/eureka-js-client/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/evaporate/tsconfig.json b/types/evaporate/tsconfig.json index 9164730455..5fb5abffa1 100644 --- a/types/evaporate/tsconfig.json +++ b/types/evaporate/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/event-emitter/tsconfig.json b/types/event-emitter/tsconfig.json index ef667ae292..8e8bbb8316 100644 --- a/types/event-emitter/tsconfig.json +++ b/types/event-emitter/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "all-off.d.ts", diff --git a/types/event-kit/tsconfig.json b/types/event-kit/tsconfig.json index 0b6a81c5f8..b83f78d573 100644 --- a/types/event-kit/tsconfig.json +++ b/types/event-kit/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "event-kit-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/event-loop-lag/tsconfig.json b/types/event-loop-lag/tsconfig.json index 39962c46ae..0a80b389ad 100644 --- a/types/event-loop-lag/tsconfig.json +++ b/types/event-loop-lag/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/event-stream/tsconfig.json b/types/event-stream/tsconfig.json index 6f3624e82f..5612b82ced 100644 --- a/types/event-stream/tsconfig.json +++ b/types/event-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/event-to-promise/event-to-promise-tests.ts b/types/event-to-promise/event-to-promise-tests.ts index 2b99ddc62f..d8ca31f496 100644 --- a/types/event-to-promise/event-to-promise-tests.ts +++ b/types/event-to-promise/event-to-promise-tests.ts @@ -1,21 +1,19 @@ import { EventEmitter } from 'events' -import * as eventToPromise from 'event-to-promise' - +import eventToPromise = require('event-to-promise'); { const ee = new EventEmitter() const ep = eventToPromise(ee, 'custom') - + ep.then(console.log) ee.emit('custom') } - { const et = new EventTarget() const tp = eventToPromise.multi(et, ['custom']) - + tp.then(console.log) et.dispatchEvent(new Event('custom')) } diff --git a/types/event-to-promise/tsconfig.json b/types/event-to-promise/tsconfig.json index d47bd1672d..e3bd1d3c46 100644 --- a/types/event-to-promise/tsconfig.json +++ b/types/event-to-promise/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/events/tsconfig.json b/types/events/tsconfig.json index f43a926ad8..35b4a183b7 100644 --- a/types/events/tsconfig.json +++ b/types/events/tsconfig.json @@ -1,25 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "target": "es6", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true + "module": "commonjs", + "target": "es6", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ - "index.d.ts", - "events-tests.ts" + "index.d.ts", + "events-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/evernote/tsconfig.json b/types/evernote/tsconfig.json index 2c89a52715..3815e7d498 100644 --- a/types/evernote/tsconfig.json +++ b/types/evernote/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/exceljs/tsconfig.json b/types/exceljs/tsconfig.json index a477befe57..c8cdf0d345 100644 --- a/types/exceljs/tsconfig.json +++ b/types/exceljs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/execa/execa-tests.ts b/types/execa/execa-tests.ts index abdbfd6dad..2525091f2a 100644 --- a/types/execa/execa-tests.ts +++ b/types/execa/execa-tests.ts @@ -1,5 +1,5 @@ -import * as assert from 'assert'; -import * as execa from 'execa'; +import assert = require('assert'); +import execa = require('execa'); import { PassThrough } from "stream"; execa('unicorns') diff --git a/types/execa/tsconfig.json b/types/execa/tsconfig.json index 2d20077a4f..61568807ee 100644 --- a/types/execa/tsconfig.json +++ b/types/execa/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/exit-hook/tsconfig.json b/types/exit-hook/tsconfig.json index 34396672b0..637da53ef1 100644 --- a/types/exit-hook/tsconfig.json +++ b/types/exit-hook/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/exit/tsconfig.json b/types/exit/tsconfig.json index 4343e78761..942627fd28 100644 --- a/types/exit/tsconfig.json +++ b/types/exit/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/exorcist/tsconfig.json b/types/exorcist/tsconfig.json index c32fd613f3..b6c15addd0 100644 --- a/types/exorcist/tsconfig.json +++ b/types/exorcist/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/expect.js/tsconfig.json b/types/expect.js/tsconfig.json index c8f60ed6e5..d9f4950675 100644 --- a/types/expect.js/tsconfig.json +++ b/types/expect.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/expect/tsconfig.json b/types/expect/tsconfig.json index 33e71dad4c..225b2ac217 100644 --- a/types/expect/tsconfig.json +++ b/types/expect/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/expectations/tsconfig.json b/types/expectations/tsconfig.json index 857a8a1eef..e22736f12d 100644 --- a/types/expectations/tsconfig.json +++ b/types/expectations/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index 9c9cfc979e..79c80aa29d 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -166,12 +166,7 @@ async () => { }; async () => { - const result = await Facebook.logInWithReadPermissionsAsync('appId'); - - if (result.type === 'success') { - result.expires; - result.token; - } + const { type, expires, token } = await Facebook.logInWithReadPermissionsAsync("appId"); }; () => ( diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index c9c0ca88f3..c3977918ad 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/expo/expo-sdk // Definitions by: Konstantin Kai // Martynas Kadiša +// Sergio Sánchez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -728,13 +729,11 @@ export namespace Facebook { permissions?: string[]; behavior?: 'web' | 'native' | 'browser' | 'system'; } - type Response = { - type: 'success'; - token: string; - expires: number; - } | { - type: 'cancel'; - }; + interface Response { + type: 'cancel' | 'success'; + token?: string; + expires?: number; + } function logInWithReadPermissionsAsync(appId: string, options?: Options): Promise; } @@ -1213,7 +1212,7 @@ export namespace Notifications { type LocalNotificationId = string | number; function addListener(listener: (notification: Notification) => any): EventSubscription; - function getExponentPushTokenAsync(): Promise; + function getExpoPushTokenAsync(): Promise; function presentLocalNotificationAsync(localNotification: LocalNotification): Promise; function scheduleLocalNotificationAsync( localNotification: LocalNotification, diff --git a/types/expo/tsconfig.json b/types/expo/tsconfig.json index 5d0f560837..8590ce01f7 100644 --- a/types/expo/tsconfig.json +++ b/types/expo/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "expo-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/expo/v23/expo-tests.tsx b/types/expo/v23/expo-tests.tsx index dd8696d5ba..0764a4d53e 100644 --- a/types/expo/v23/expo-tests.tsx +++ b/types/expo/v23/expo-tests.tsx @@ -159,12 +159,7 @@ async () => { }; async () => { - const result = await Facebook.logInWithReadPermissionsAsync('appId'); - - if (result.type === 'success') { - result.expires; - result.token; - } + const { type, expires, token } = await Facebook.logInWithReadPermissionsAsync("appId"); }; () => ( diff --git a/types/expo/v23/index.d.ts b/types/expo/v23/index.d.ts index 076cd43f8c..8aaa28bace 100644 --- a/types/expo/v23/index.d.ts +++ b/types/expo/v23/index.d.ts @@ -726,13 +726,11 @@ export namespace Facebook { permissions?: string[]; behavior?: 'web' | 'native' | 'browser' | 'system'; } - type Response = { - type: 'success'; - token: string; - expires: number; - } | { - type: 'cancel'; - }; + interface Response { + type: 'cancel' | 'success'; + token?: string; + expires?: number; + } function logInWithReadPermissionsAsync(appId: string, options?: Options): Promise; } diff --git a/types/expo/v23/tsconfig.json b/types/expo/v23/tsconfig.json index 4dbf5afca3..a2291cf3e2 100644 --- a/types/expo/v23/tsconfig.json +++ b/types/expo/v23/tsconfig.json @@ -23,10 +23,11 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "expo-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/expo__vector-icons/tsconfig.json b/types/expo__vector-icons/tsconfig.json index 9eb44c222f..a0aaaf4767 100644 --- a/types/expo__vector-icons/tsconfig.json +++ b/types/expo__vector-icons/tsconfig.json @@ -16,10 +16,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ "index.d.ts", "expo__vector-icons-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/express-brute-memcached/express-brute-memcached-tests.ts b/types/express-brute-memcached/express-brute-memcached-tests.ts index 37dadf6189..4a74da4d87 100644 --- a/types/express-brute-memcached/express-brute-memcached-tests.ts +++ b/types/express-brute-memcached/express-brute-memcached-tests.ts @@ -1,5 +1,5 @@ -import * as express from "express"; -import * as ExpressBrute from "express-brute"; +import express = require("express"); +import ExpressBrute = require("express-brute"); import MemcachedStore from "express-brute-memcached"; var app = express(); diff --git a/types/express-brute-memcached/tsconfig.json b/types/express-brute-memcached/tsconfig.json index c49c399e0d..031f4178f1 100644 --- a/types/express-brute-memcached/tsconfig.json +++ b/types/express-brute-memcached/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-brute-mongo/tsconfig.json b/types/express-brute-mongo/tsconfig.json index d57cb21dd2..37f2386a8a 100644 --- a/types/express-brute-mongo/tsconfig.json +++ b/types/express-brute-mongo/tsconfig.json @@ -19,7 +19,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-brute-redis/tsconfig.json b/types/express-brute-redis/tsconfig.json index a033b8f228..3fdde618ad 100644 --- a/types/express-brute-redis/tsconfig.json +++ b/types/express-brute-redis/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-brute/tsconfig.json b/types/express-brute/tsconfig.json index 30bf0ccf14..42a510b1ed 100644 --- a/types/express-brute/tsconfig.json +++ b/types/express-brute/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-busboy/express-busboy-tests.ts b/types/express-busboy/express-busboy-tests.ts index 512fd7f245..801ad24481 100644 --- a/types/express-busboy/express-busboy-tests.ts +++ b/types/express-busboy/express-busboy-tests.ts @@ -1,6 +1,5 @@ import * as expressBusboy from 'express-busboy'; - -import * as express from 'express'; +import express = require('express'); const app: express.Application = express(); const options: expressBusboy.ExpressBusboyOptions = {}; diff --git a/types/express-busboy/tsconfig.json b/types/express-busboy/tsconfig.json index 1920bb9991..3bd9a10474 100644 --- a/types/express-busboy/tsconfig.json +++ b/types/express-busboy/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "express-busboy-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/express-cluster/tsconfig.json b/types/express-cluster/tsconfig.json index 5d27d3ec2e..85722d9956 100644 --- a/types/express-cluster/tsconfig.json +++ b/types/express-cluster/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-debug/tsconfig.json b/types/express-debug/tsconfig.json index 9763943be8..65dccfc944 100644 --- a/types/express-debug/tsconfig.json +++ b/types/express-debug/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-domain-middleware/tsconfig.json b/types/express-domain-middleware/tsconfig.json index 454fedea14..e18ec4e697 100644 --- a/types/express-domain-middleware/tsconfig.json +++ b/types/express-domain-middleware/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-ejs-layouts/express-ejs-layouts-tests.ts b/types/express-ejs-layouts/express-ejs-layouts-tests.ts index 9d77105a9d..f6820c57cf 100644 --- a/types/express-ejs-layouts/express-ejs-layouts-tests.ts +++ b/types/express-ejs-layouts/express-ejs-layouts-tests.ts @@ -1,5 +1,5 @@ -import * as express from 'express'; -import * as expressEjsLayouts from 'express-ejs-layouts'; +import express = require('express'); +import expressEjsLayouts = require('express-ejs-layouts'); function expressRequestHandlerTest() { const app = express() diff --git a/types/express-ejs-layouts/tsconfig.json b/types/express-ejs-layouts/tsconfig.json index 7ade9f8819..83f8ab2270 100644 --- a/types/express-ejs-layouts/tsconfig.json +++ b/types/express-ejs-layouts/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "express-ejs-layouts-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/express-enforces-ssl/tsconfig.json b/types/express-enforces-ssl/tsconfig.json index 9e071e54fb..744f4f7b82 100644 --- a/types/express-enforces-ssl/tsconfig.json +++ b/types/express-enforces-ssl/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-fileupload/express-fileupload-tests.ts b/types/express-fileupload/express-fileupload-tests.ts index 21115937d1..2a268fb64e 100644 --- a/types/express-fileupload/express-fileupload-tests.ts +++ b/types/express-fileupload/express-fileupload-tests.ts @@ -1,4 +1,4 @@ -import * as express from 'express'; +import express = require('express'); import { RequestHandler, Request, Response, NextFunction } from 'express-serve-static-core'; import fileUpload = require('express-fileupload'); diff --git a/types/express-fileupload/tsconfig.json b/types/express-fileupload/tsconfig.json index ecbd735cea..34badd8266 100644 --- a/types/express-fileupload/tsconfig.json +++ b/types/express-fileupload/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-flash-2/tsconfig.json b/types/express-flash-2/tsconfig.json index 6a0ef5a28b..fcfa6b81db 100644 --- a/types/express-flash-2/tsconfig.json +++ b/types/express-flash-2/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-flash-notification/tsconfig.json b/types/express-flash-notification/tsconfig.json index 842aacf264..4341feca18 100644 --- a/types/express-flash-notification/tsconfig.json +++ b/types/express-flash-notification/tsconfig.json @@ -5,19 +5,20 @@ "es6" ], "noImplicitAny": true, - "noImplicitThis": true, + "noImplicitThis": true, "strictNullChecks": true, - "strictFunctionTypes": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "express-flash-notification-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/express-formidable/tsconfig.json b/types/express-formidable/tsconfig.json index 45a7b6c12b..66ac147736 100644 --- a/types/express-formidable/tsconfig.json +++ b/types/express-formidable/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "express-formidable-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/express-graphql/express-graphql-tests.ts b/types/express-graphql/express-graphql-tests.ts index d476682104..482b15c186 100644 --- a/types/express-graphql/express-graphql-tests.ts +++ b/types/express-graphql/express-graphql-tests.ts @@ -1,6 +1,6 @@ -import * as express from 'express'; +import express = require('express'); import 'express-session'; -import * as graphqlHTTP from 'express-graphql'; +import graphqlHTTP = require('express-graphql'); const app = express(); const schema = {}; @@ -10,7 +10,8 @@ const graphqlOption: graphqlHTTP.OptionsObj = { schema: schema, formatError: (error: Error) => ({ message: error.message - }) + }), + extensions: (args) => { } }; const graphqlOptionRequest = (request: express.Request): graphqlHTTP.OptionsObj => ({ @@ -23,7 +24,8 @@ const graphqlOptionRequestAsync = async (request: express.Request): Promise { } }; }; diff --git a/types/express-graphql/index.d.ts b/types/express-graphql/index.d.ts index 82f988a506..166bdae6e7 100644 --- a/types/express-graphql/index.d.ts +++ b/types/express-graphql/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Isman Usoh // Nitin Tutlani // Daniel Fader +// Ehsan Ziya // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -48,8 +49,22 @@ declare namespace graphqlHTTP { * A boolean to optionally enable GraphiQL mode. */ graphiql?: boolean, + + /** + * An optional function for adding additional metadata to the GraphQL response as a key-value object. + * The result will be added to "extensions" field in the resulting JSON. + */ + extensions?: ((args: ExtenstionsArgs) => any) | ((args: ExtenstionsArgs) => Promise); + }; + interface ExtenstionsArgs { + document: object, + variables: object, + operationName: any, + result: object + } + type Middleware = (request: Request, response: Response) => void; } diff --git a/types/express-graphql/tsconfig.json b/types/express-graphql/tsconfig.json index 7924c82706..c46f5fc04a 100644 --- a/types/express-graphql/tsconfig.json +++ b/types/express-graphql/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-handlebars/tsconfig.json b/types/express-handlebars/tsconfig.json index 9c6da1ba25..4233c4b5f8 100644 --- a/types/express-handlebars/tsconfig.json +++ b/types/express-handlebars/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-jwt/tsconfig.json b/types/express-jwt/tsconfig.json index f91064aba5..dff320327c 100644 --- a/types/express-jwt/tsconfig.json +++ b/types/express-jwt/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-less/tsconfig.json b/types/express-less/tsconfig.json index c8e44f8204..8d9e70440e 100644 --- a/types/express-less/tsconfig.json +++ b/types/express-less/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-minify/tsconfig.json b/types/express-minify/tsconfig.json index 65c999883e..48a257d074 100644 --- a/types/express-minify/tsconfig.json +++ b/types/express-minify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-mongo-sanitize/express-mongo-sanitize-tests.ts b/types/express-mongo-sanitize/express-mongo-sanitize-tests.ts index 21a5028b27..03074593ca 100644 --- a/types/express-mongo-sanitize/express-mongo-sanitize-tests.ts +++ b/types/express-mongo-sanitize/express-mongo-sanitize-tests.ts @@ -1,5 +1,5 @@ -import * as express from 'express'; -import * as mongoSanitize from 'express-mongo-sanitize'; +import express = require('express'); +import mongoSanitize = require('express-mongo-sanitize'); const app: express.Express = express(); diff --git a/types/express-mongo-sanitize/tsconfig.json b/types/express-mongo-sanitize/tsconfig.json index 0834820a85..52dd3131cd 100644 --- a/types/express-mongo-sanitize/tsconfig.json +++ b/types/express-mongo-sanitize/tsconfig.json @@ -14,10 +14,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ "index.d.ts", "express-mongo-sanitize-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/express-mung/tsconfig.json b/types/express-mung/tsconfig.json index 9dd04b84e6..2a2d18d7be 100644 --- a/types/express-mung/tsconfig.json +++ b/types/express-mung/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-myconnection/tsconfig.json b/types/express-myconnection/tsconfig.json index b68ca7cb51..a4a0b3ee3c 100644 --- a/types/express-myconnection/tsconfig.json +++ b/types/express-myconnection/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-mysql-session/tsconfig.json b/types/express-mysql-session/tsconfig.json index f6d45a934d..ea0fe2693f 100644 --- a/types/express-mysql-session/tsconfig.json +++ b/types/express-mysql-session/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-oauth-server/express-oauth-server-tests.ts b/types/express-oauth-server/express-oauth-server-tests.ts index 436763b9b8..1aea48c256 100644 --- a/types/express-oauth-server/express-oauth-server-tests.ts +++ b/types/express-oauth-server/express-oauth-server-tests.ts @@ -1,6 +1,6 @@ import ExpressOAuthServer = require("express-oauth-server"); import * as OAuth2Server from "oauth2-server"; -import * as express from "express"; +import express = require("express"); const oauth2Model: OAuth2Server.AuthorizationCodeModel = { getClient: async (clientId: string, clientSecret: string): Promise => { diff --git a/types/express-oauth-server/tsconfig.json b/types/express-oauth-server/tsconfig.json index 197ec65f00..b694bb7d6d 100644 --- a/types/express-oauth-server/tsconfig.json +++ b/types/express-oauth-server/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "express-oauth-server-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/express-openapi/tsconfig.json b/types/express-openapi/tsconfig.json index a6cf4f3530..f4a2f9f9f5 100644 --- a/types/express-openapi/tsconfig.json +++ b/types/express-openapi/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-partials/tsconfig.json b/types/express-partials/tsconfig.json index 72e02dcdee..191459d746 100644 --- a/types/express-partials/tsconfig.json +++ b/types/express-partials/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-promise-router/tsconfig.json b/types/express-promise-router/tsconfig.json index 1f33dd7104..8e2b57d951 100644 --- a/types/express-promise-router/tsconfig.json +++ b/types/express-promise-router/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "express-promise-router-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/express-rate-limit/tsconfig.json b/types/express-rate-limit/tsconfig.json index 7dfb99a1d4..f3029afb95 100644 --- a/types/express-rate-limit/tsconfig.json +++ b/types/express-rate-limit/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-route-fs/tsconfig.json b/types/express-route-fs/tsconfig.json index 550f0d3b31..5b4456a483 100644 --- a/types/express-route-fs/tsconfig.json +++ b/types/express-route-fs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-sanitized/express-sanitized-tests.ts b/types/express-sanitized/express-sanitized-tests.ts index 1610ef6c91..4ff8cce13b 100644 --- a/types/express-sanitized/express-sanitized-tests.ts +++ b/types/express-sanitized/express-sanitized-tests.ts @@ -1,5 +1,5 @@ -import * as express from "express"; -import * as expressSanitized from "express-sanitized"; +import express = require("express"); +import expressSanitized = require("express-sanitized"); const RoutingServer: express.Express = express(); diff --git a/types/express-sanitized/tsconfig.json b/types/express-sanitized/tsconfig.json index 9924f49f46..0c6bcf3836 100644 --- a/types/express-sanitized/tsconfig.json +++ b/types/express-sanitized/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-serve-static-core/tsconfig.json b/types/express-serve-static-core/tsconfig.json index 73c2b38c7d..40b2ef2060 100644 --- a/types/express-serve-static-core/tsconfig.json +++ b/types/express-serve-static-core/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-session/express-session-tests.ts b/types/express-session/express-session-tests.ts index fdb77caedb..6a619f162c 100644 --- a/types/express-session/express-session-tests.ts +++ b/types/express-session/express-session-tests.ts @@ -37,3 +37,34 @@ app.use((req, res, next) => { res.end('welcome to the session demo. refresh!'); } }); + +// Custom Session Store + +class MyStore extends session.Store { + private sessions: { [sid: string]: string }; + + constructor() { + super(); + this.sessions = {}; + } + + get = (sid: string, callback: (err: any, session: Express.SessionData) => void): void => { + callback(null, JSON.parse(this.sessions[sid])); + } + + set = (sid: string, session: Express.Session, callback: (err: any) => void): void => { + this.sessions[sid] = JSON.stringify(session); + callback(null); + } + + destroy = (sid: string, callback: (err: any) => void): void => { + this.sessions[sid] = undefined; + this.sessions = JSON.parse(JSON.stringify(this.sessions)); + callback(null); + } +} + +app.use(session({ + secret: 'keyboard cat', + store: new MyStore() +})); diff --git a/types/express-session/index.d.ts b/types/express-session/index.d.ts index 13ce6ab8b2..6b59efc925 100644 --- a/types/express-session/index.d.ts +++ b/types/express-session/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for express-session 1.15 // Project: https://www.npmjs.org/package/express-session -// Definitions by: Hiroki Horiuchi , Jacob Bogers +// Definitions by: Hiroki Horiuchi , Jacob Bogers , Naoto Yokoyama // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -64,7 +64,7 @@ declare namespace session { } interface BaseMemoryStore { - get: (sid: string, callback: (err: any, session: Express.Session) => void) => void; + get: (sid: string, callback: (err: any, session: Express.SessionData) => void) => void; set: (sid: string, session: Express.Session, callback: (err: any) => void) => void; destroy: (sid: string, callback: (err: any) => void) => void; length?: (callback: (err: any, length: number) => void) => void; @@ -78,7 +78,7 @@ declare namespace session { load: (sid: string, fn: (err: any, session: Express.Session) => any) => void; createSession: (req: express.Request, sess: Express.SessionData) => void; - get: (sid: string, callback: (err: any, session: Express.Session) => void) => void; + get: (sid: string, callback: (err: any, session: Express.SessionData) => void) => void; set: (sid: string, session: Express.Session, callback: (err: any) => void) => void; destroy: (sid: string, callback: (err: any) => void) => void; all: (callback: (err: any, obj: { [sid: string]: Express.SessionData; }) => void) => void; @@ -87,7 +87,7 @@ declare namespace session { } class MemoryStore implements BaseMemoryStore { - get: (sid: string, callback: (err: any, session: Express.Session) => void) => void; + get: (sid: string, callback: (err: any, session: Express.SessionData) => void) => void; set: (sid: string, session: Express.Session, callback: (err: any) => void) => void; destroy: (sid: string, callback: (err: any) => void) => void; all: (callback: (err: any, obj: { [sid: string]: Express.Session; }) => void) => void; diff --git a/types/express-session/tsconfig.json b/types/express-session/tsconfig.json index 14c2e75bd5..190564ac5e 100644 --- a/types/express-session/tsconfig.json +++ b/types/express-session/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-to-koa/express-to-koa-tests.ts b/types/express-to-koa/express-to-koa-tests.ts index 73b6ae480a..1329a15851 100644 --- a/types/express-to-koa/express-to-koa-tests.ts +++ b/types/express-to-koa/express-to-koa-tests.ts @@ -1,4 +1,4 @@ -import * as Koa from 'koa'; +import Koa = require('koa'); import * as connect from 'connect'; import expressToKoa = require('express-to-koa'); diff --git a/types/express-to-koa/tsconfig.json b/types/express-to-koa/tsconfig.json index 9c27ef439f..5b33c7ac55 100644 --- a/types/express-to-koa/tsconfig.json +++ b/types/express-to-koa/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "express-to-koa-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/express-unless/tsconfig.json b/types/express-unless/tsconfig.json index 44038c38d3..5cb90389b5 100644 --- a/types/express-unless/tsconfig.json +++ b/types/express-unless/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-useragent/tsconfig.json b/types/express-useragent/tsconfig.json index 3bbc5c5520..0cf85a5a95 100644 --- a/types/express-useragent/tsconfig.json +++ b/types/express-useragent/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/express-winston/express-winston-tests.ts b/types/express-winston/express-winston-tests.ts index 7ce00c479e..297b7afc49 100644 --- a/types/express-winston/express-winston-tests.ts +++ b/types/express-winston/express-winston-tests.ts @@ -1,6 +1,6 @@ import expressWinston = require('express-winston'); import * as winston from 'winston'; -import * as express from 'express'; +import express = require('express'); const app = express(); diff --git a/types/express-winston/tsconfig.json b/types/express-winston/tsconfig.json index dcebd7fafb..7ec0a4eff8 100644 --- a/types/express-winston/tsconfig.json +++ b/types/express-winston/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "express-winston-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/express/express-tests.ts b/types/express/express-tests.ts index 1c9220a8b5..137c70c8e8 100644 --- a/types/express/express-tests.ts +++ b/types/express/express-tests.ts @@ -1,4 +1,4 @@ -import * as express from 'express'; +import express = require('express'); namespace express_tests { const app = express(); diff --git a/types/express/index.d.ts b/types/express/index.d.ts index 18231dcfbc..4e6ed8fcc1 100644 --- a/types/express/index.d.ts +++ b/types/express/index.d.ts @@ -15,7 +15,7 @@ /// import * as bodyParser from "body-parser"; -import * as serveStatic from "serve-static"; +import serveStatic = require("serve-static"); import * as core from "express-serve-static-core"; /** diff --git a/types/express/tsconfig.json b/types/express/tsconfig.json index b38c24658e..999dd53a3e 100644 --- a/types/express/tsconfig.json +++ b/types/express/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/extend/extend-tests.ts b/types/extend/extend-tests.ts index 0bf977e6e8..5ff62322b1 100644 --- a/types/extend/extend-tests.ts +++ b/types/extend/extend-tests.ts @@ -1,6 +1,4 @@ -/// -import * as assert from 'assert'; -import * as extend from 'extend'; +import extend = require('extend'); const objectBase = { test: 'base' @@ -25,19 +23,19 @@ const objectThree = { type ExtendedType = typeof objectBase & typeof objectOne; const extended: ExtendedType = extend(objectBase, objectOne); -assert(extended.test === 'one'); -assert(extended.iamone); +extended.test === 'one'; +extended.iamone; type MoreExtendedType = typeof objectBase & typeof objectOne & typeof objectTwo; const moreExtended: MoreExtendedType = extend(objectBase, objectOne, objectTwo); -assert(moreExtended.test === 2); -assert(moreExtended.iamone); -assert(moreExtended.iamtwo); +moreExtended.test === 2; +moreExtended.iamone; +moreExtended.iamtwo; type DeepExtendedType = typeof objectBase & typeof objectOne & typeof objectTwo & typeof objectThree; const deepExtended = extend(true, objectBase, objectOne, objectTwo, objectThree); -assert(deepExtended.iamone); -assert(deepExtended.iamtwo); -assert(deepExtended.iamthree); -assert(deepExtended.depth.innerType === 'deep'); +deepExtended.iamone; +deepExtended.iamtwo; +deepExtended.iamthree; +deepExtended.depth.innerType === 'deep'; diff --git a/types/extend/tsconfig.json b/types/extend/tsconfig.json index dce058009d..19ed5928ee 100644 --- a/types/extend/tsconfig.json +++ b/types/extend/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/extjs/tsconfig.json b/types/extjs/tsconfig.json index 16cf9bcee6..20138aaa88 100644 --- a/types/extjs/tsconfig.json +++ b/types/extjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/extract-stack/tsconfig.json b/types/extract-stack/tsconfig.json index 26f0c50479..2779df149a 100644 --- a/types/extract-stack/tsconfig.json +++ b/types/extract-stack/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/extract-text-webpack-plugin/tsconfig.json b/types/extract-text-webpack-plugin/tsconfig.json index dc6516b37e..9a503d773a 100644 --- a/types/extract-text-webpack-plugin/tsconfig.json +++ b/types/extract-text-webpack-plugin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/extract-zip/tsconfig.json b/types/extract-zip/tsconfig.json index 821ad3b5b3..db692aa262 100644 --- a/types/extract-zip/tsconfig.json +++ b/types/extract-zip/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/eyes/tsconfig.json b/types/eyes/tsconfig.json index e0effcdb85..cca90d6857 100644 --- a/types/eyes/tsconfig.json +++ b/types/eyes/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/f1/tsconfig.json b/types/f1/tsconfig.json index e54cd01b58..45e94b199c 100644 --- a/types/f1/tsconfig.json +++ b/types/f1/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fabric/tsconfig.json b/types/fabric/tsconfig.json index fc7ce8ddc9..93924ce83d 100644 --- a/types/fabric/tsconfig.json +++ b/types/fabric/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/facebook-js-sdk/tsconfig.json b/types/facebook-js-sdk/tsconfig.json index 2ac8efade5..ed029f3557 100644 --- a/types/facebook-js-sdk/tsconfig.json +++ b/types/facebook-js-sdk/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/facebook-pixel/tsconfig.json b/types/facebook-pixel/tsconfig.json index c4cc9bd7fa..487b76e1e4 100644 --- a/types/facebook-pixel/tsconfig.json +++ b/types/facebook-pixel/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/faker/tsconfig.json b/types/faker/tsconfig.json index 33d32cb266..cbf9fdad1c 100644 --- a/types/faker/tsconfig.json +++ b/types/faker/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/faker/v3/tsconfig.json b/types/faker/v3/tsconfig.json index 5cfa258457..53f848d0dc 100644 --- a/types/faker/v3/tsconfig.json +++ b/types/faker/v3/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/falcor-express/tsconfig.json b/types/falcor-express/tsconfig.json index 0f4a36624a..1ba6e4c5c7 100644 --- a/types/falcor-express/tsconfig.json +++ b/types/falcor-express/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/falcor-http-datasource/tsconfig.json b/types/falcor-http-datasource/tsconfig.json index 114a1e5046..948a3c2ffa 100644 --- a/types/falcor-http-datasource/tsconfig.json +++ b/types/falcor-http-datasource/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/falcor-json-graph/tsconfig.json b/types/falcor-json-graph/tsconfig.json index 2753b64668..7ae61b9563 100644 --- a/types/falcor-json-graph/tsconfig.json +++ b/types/falcor-json-graph/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/falcor-router/tsconfig.json b/types/falcor-router/tsconfig.json index 4f37ee59be..4ca1b54a8b 100644 --- a/types/falcor-router/tsconfig.json +++ b/types/falcor-router/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/falcor/tsconfig.json b/types/falcor/tsconfig.json index 94084a9884..3444c09530 100644 --- a/types/falcor/tsconfig.json +++ b/types/falcor/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/famous/tsconfig.json b/types/famous/tsconfig.json index e2760ecc02..37897f899c 100644 --- a/types/famous/tsconfig.json +++ b/types/famous/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fancy-log/tsconfig.json b/types/fancy-log/tsconfig.json index 0ef3d95d9e..ec3b2f25de 100644 --- a/types/fancy-log/tsconfig.json +++ b/types/fancy-log/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "fancy-log-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/fancybox/tsconfig.json b/types/fancybox/tsconfig.json index e8011cdd21..87689cdc4f 100644 --- a/types/fancybox/tsconfig.json +++ b/types/fancybox/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/farbtastic/tsconfig.json b/types/farbtastic/tsconfig.json index 91f8048ddb..8b812fadc8 100644 --- a/types/farbtastic/tsconfig.json +++ b/types/farbtastic/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fast-diff/tsconfig.json b/types/fast-diff/tsconfig.json index 0c6f0c4ae2..6be0492a01 100644 --- a/types/fast-diff/tsconfig.json +++ b/types/fast-diff/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fast-levenshtein/tsconfig.json b/types/fast-levenshtein/tsconfig.json index 1cb0e8b022..6f108c6f06 100644 --- a/types/fast-levenshtein/tsconfig.json +++ b/types/fast-levenshtein/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/fast-list/tsconfig.json b/types/fast-list/tsconfig.json index ce90acb3cd..94d28d10ba 100644 --- a/types/fast-list/tsconfig.json +++ b/types/fast-list/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fast-stats/tsconfig.json b/types/fast-stats/tsconfig.json index c845c63f47..9439a56f37 100644 --- a/types/fast-stats/tsconfig.json +++ b/types/fast-stats/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fastclick/tsconfig.json b/types/fastclick/tsconfig.json index 494a7b78d7..31d363d25c 100644 --- a/types/fastclick/tsconfig.json +++ b/types/fastclick/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/favico.js/tsconfig.json b/types/favico.js/tsconfig.json index 15047d8dbf..185be44519 100644 --- a/types/favico.js/tsconfig.json +++ b/types/favico.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fb/tsconfig.json b/types/fb/tsconfig.json index 9e8582a781..e38dd69198 100644 --- a/types/fb/tsconfig.json +++ b/types/fb/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fbemitter/tsconfig.json b/types/fbemitter/tsconfig.json index 8032d97e7f..9ebe492c70 100644 --- a/types/fbemitter/tsconfig.json +++ b/types/fbemitter/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/featherlight/tsconfig.json b/types/featherlight/tsconfig.json index 32c72beb9f..aa6c592a74 100644 --- a/types/featherlight/tsconfig.json +++ b/types/featherlight/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/feathersjs__authentication-client/tsconfig.json b/types/feathersjs__authentication-client/tsconfig.json index 62adef4864..77f8c05aef 100644 --- a/types/feathersjs__authentication-client/tsconfig.json +++ b/types/feathersjs__authentication-client/tsconfig.json @@ -16,12 +16,18 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/authentication-client": ["feathersjs__authentication-client"], - "@feathersjs/feathers": ["feathersjs__feathers"] + "@feathersjs/authentication-client": [ + "feathersjs__authentication-client" + ], + "@feathersjs/feathers": [ + "feathersjs__feathers" + ] } }, "files": [ - "index.d.ts", "feathersjs__authentication-client-tests.ts" + "index.d.ts", + "feathersjs__authentication-client-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__authentication-jwt/tsconfig.json b/types/feathersjs__authentication-jwt/tsconfig.json index 9845c047e6..6d4d54675f 100644 --- a/types/feathersjs__authentication-jwt/tsconfig.json +++ b/types/feathersjs__authentication-jwt/tsconfig.json @@ -15,12 +15,18 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/authentication-jwt": ["feathersjs__authentication-jwt"], - "@feathersjs/feathers": ["feathersjs__feathers"] + "@feathersjs/authentication-jwt": [ + "feathersjs__authentication-jwt" + ], + "@feathersjs/feathers": [ + "feathersjs__feathers" + ] } }, "files": [ - "index.d.ts", "feathersjs__authentication-jwt-tests.ts" + "index.d.ts", + "feathersjs__authentication-jwt-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__authentication-local/tsconfig.json b/types/feathersjs__authentication-local/tsconfig.json index 1972b0a171..b68a9d954c 100644 --- a/types/feathersjs__authentication-local/tsconfig.json +++ b/types/feathersjs__authentication-local/tsconfig.json @@ -15,12 +15,18 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/authentication-local": ["feathersjs__authentication-local"], - "@feathersjs/feathers": ["feathersjs__feathers"] + "@feathersjs/authentication-local": [ + "feathersjs__authentication-local" + ], + "@feathersjs/feathers": [ + "feathersjs__feathers" + ] } }, "files": [ - "index.d.ts", "feathersjs__authentication-local-tests.ts" + "index.d.ts", + "feathersjs__authentication-local-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__authentication-oauth1/tsconfig.json b/types/feathersjs__authentication-oauth1/tsconfig.json index 0a57818109..1e7967d274 100644 --- a/types/feathersjs__authentication-oauth1/tsconfig.json +++ b/types/feathersjs__authentication-oauth1/tsconfig.json @@ -15,12 +15,18 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/authentication-oauth1": ["feathersjs__authentication-oauth1"], - "@feathersjs/feathers": ["feathersjs__feathers"] + "@feathersjs/authentication-oauth1": [ + "feathersjs__authentication-oauth1" + ], + "@feathersjs/feathers": [ + "feathersjs__feathers" + ] } }, "files": [ - "index.d.ts", "feathersjs__authentication-oauth1-tests.ts" + "index.d.ts", + "feathersjs__authentication-oauth1-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__authentication-oauth2/tsconfig.json b/types/feathersjs__authentication-oauth2/tsconfig.json index 6c347cef78..6fdc874a04 100644 --- a/types/feathersjs__authentication-oauth2/tsconfig.json +++ b/types/feathersjs__authentication-oauth2/tsconfig.json @@ -15,12 +15,18 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/authentication-oauth2": ["feathersjs__authentication-oauth2"], - "@feathersjs/feathers": ["feathersjs__feathers"] + "@feathersjs/authentication-oauth2": [ + "feathersjs__authentication-oauth2" + ], + "@feathersjs/feathers": [ + "feathersjs__feathers" + ] } }, "files": [ - "index.d.ts", "feathersjs__authentication-oauth2-tests.ts" + "index.d.ts", + "feathersjs__authentication-oauth2-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__authentication/tsconfig.json b/types/feathersjs__authentication/tsconfig.json index 8cb6f348ed..6a7bb9fd07 100644 --- a/types/feathersjs__authentication/tsconfig.json +++ b/types/feathersjs__authentication/tsconfig.json @@ -15,12 +15,18 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/authentication": ["feathersjs__authentication"], - "@feathersjs/feathers": ["feathersjs__feathers"] + "@feathersjs/authentication": [ + "feathersjs__authentication" + ], + "@feathersjs/feathers": [ + "feathersjs__feathers" + ] } }, "files": [ - "index.d.ts", "feathersjs__authentication-tests.ts" + "index.d.ts", + "feathersjs__authentication-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__configuration/tsconfig.json b/types/feathersjs__configuration/tsconfig.json index 4ff80d4bea..9d6cd3ea8f 100644 --- a/types/feathersjs__configuration/tsconfig.json +++ b/types/feathersjs__configuration/tsconfig.json @@ -15,12 +15,18 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/configuration": ["feathersjs__configuration"], - "@feathersjs/feathers": ["feathersjs__feathers"] + "@feathersjs/configuration": [ + "feathersjs__configuration" + ], + "@feathersjs/feathers": [ + "feathersjs__feathers" + ] } }, "files": [ - "index.d.ts", "feathersjs__configuration-tests.ts" + "index.d.ts", + "feathersjs__configuration-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__errors/tsconfig.json b/types/feathersjs__errors/tsconfig.json index f07ee484aa..112341f970 100644 --- a/types/feathersjs__errors/tsconfig.json +++ b/types/feathersjs__errors/tsconfig.json @@ -15,13 +15,23 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/errors": ["feathersjs__errors"], - "@feathersjs/errors/handler": ["feathersjs__errors/handler"], - "@feathersjs/errors/not-found": ["feathersjs__errors/not-found"] + "@feathersjs/errors": [ + "feathersjs__errors" + ], + "@feathersjs/errors/handler": [ + "feathersjs__errors/handler" + ], + "@feathersjs/errors/not-found": [ + "feathersjs__errors/not-found" + ] } }, "files": [ - "index.d.ts", "feathersjs__errors-tests.ts", "handler.d.ts", "not-found.d.ts" + "index.d.ts", + "feathersjs__errors-tests.ts", + "handler.d.ts", + "not-found.d.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__express/index.d.ts b/types/feathersjs__express/index.d.ts index 26e58ae565..eb49f00a78 100644 --- a/types/feathersjs__express/index.d.ts +++ b/types/feathersjs__express/index.d.ts @@ -7,7 +7,8 @@ import { Application as FeathersApplication } from '@feathersjs/feathers'; import * as express from 'express'; -export default function feathersExpress(app: FeathersApplication): express.Application & FeathersApplication; +export default function feathersExpress(app: FeathersApplication): Application; +export type Application = express.Application & FeathersApplication; export function errorHandler(options?: any): express.ErrorRequestHandler; export function notFound(): express.RequestHandler; @@ -17,6 +18,31 @@ export const rest: { }; /* - * Re-export of the express package. Can't be typed properly without just copying everything. + * Re-export of the express package. **/ -export const original: any; + +export { + CookieOptions, + Errback, + ErrorRequestHandler, + Express, + Handler, + IRoute, + IRouter, + IRouterHandler, + IRouterMatcher, + json, + MediaType, + NextFunction, + Request, + RequestHandler, + RequestParamHandler, + Response, + Router, + RouterOptions, + Send, + static, + urlencoded +} from 'express'; + +export const original: typeof express; diff --git a/types/feathersjs__express/tsconfig.json b/types/feathersjs__express/tsconfig.json index 8489861fc9..11bee295a0 100644 --- a/types/feathersjs__express/tsconfig.json +++ b/types/feathersjs__express/tsconfig.json @@ -15,12 +15,18 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/express": ["feathersjs__express"], - "@feathersjs/feathers": ["feathersjs__feathers"] + "@feathersjs/express": [ + "feathersjs__express" + ], + "@feathersjs/feathers": [ + "feathersjs__feathers" + ] } }, "files": [ - "index.d.ts", "feathersjs__express-tests.ts" + "index.d.ts", + "feathersjs__express-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__feathers/tsconfig.json b/types/feathersjs__feathers/tsconfig.json index b4eeb705cc..883aecabb3 100644 --- a/types/feathersjs__feathers/tsconfig.json +++ b/types/feathersjs__feathers/tsconfig.json @@ -15,11 +15,15 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/feathers": ["feathersjs__feathers"] + "@feathersjs/feathers": [ + "feathersjs__feathers" + ] } }, "files": [ - "index.d.ts", "feathersjs__feathers-tests.ts" + "index.d.ts", + "feathersjs__feathers-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__primus-client/tsconfig.json b/types/feathersjs__primus-client/tsconfig.json index 2c798b2f88..504dce34d1 100644 --- a/types/feathersjs__primus-client/tsconfig.json +++ b/types/feathersjs__primus-client/tsconfig.json @@ -15,12 +15,18 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/primus-client": ["feathersjs__primus-client"], - "@feathersjs/feathers": ["feathersjs__feathers"] + "@feathersjs/primus-client": [ + "feathersjs__primus-client" + ], + "@feathersjs/feathers": [ + "feathersjs__feathers" + ] } }, "files": [ - "index.d.ts", "feathersjs__primus-client-tests.ts" + "index.d.ts", + "feathersjs__primus-client-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__primus/index.d.ts b/types/feathersjs__primus/index.d.ts index 9218a6a40e..5d93843822 100644 --- a/types/feathersjs__primus/index.d.ts +++ b/types/feathersjs__primus/index.d.ts @@ -2,6 +2,9 @@ // Project: http://feathersjs.com/ // Definitions by: Jan Lohage // Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript +// TypeScript Version: 2.3 + +/// // primus removed its typings from the repo https://github.com/primus/primus/pull/623, as of 01/2018 there are none on DT export default function feathersPrimus(options: any, callback?: (primus: any) => void): () => void; diff --git a/types/feathersjs__primus/tsconfig.json b/types/feathersjs__primus/tsconfig.json index ca7b8a3077..b7815424ec 100644 --- a/types/feathersjs__primus/tsconfig.json +++ b/types/feathersjs__primus/tsconfig.json @@ -15,12 +15,18 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/primus": ["feathersjs__primus"], - "@feathersjs/feathers": ["feathersjs__feathers"] + "@feathersjs/primus": [ + "feathersjs__primus" + ], + "@feathersjs/feathers": [ + "feathersjs__feathers" + ] } }, "files": [ - "index.d.ts", "feathersjs__primus-tests.ts" + "index.d.ts", + "feathersjs__primus-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__rest-client/tsconfig.json b/types/feathersjs__rest-client/tsconfig.json index f63a18a220..7a4207ff11 100644 --- a/types/feathersjs__rest-client/tsconfig.json +++ b/types/feathersjs__rest-client/tsconfig.json @@ -15,11 +15,15 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/rest-client": ["feathersjs__rest-client"] + "@feathersjs/rest-client": [ + "feathersjs__rest-client" + ] } }, "files": [ - "index.d.ts", "feathersjs__rest-client-tests.ts" + "index.d.ts", + "feathersjs__rest-client-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__socket-commons/tsconfig.json b/types/feathersjs__socket-commons/tsconfig.json index 6532818264..8e63744a7f 100644 --- a/types/feathersjs__socket-commons/tsconfig.json +++ b/types/feathersjs__socket-commons/tsconfig.json @@ -15,12 +15,18 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/socket-commons": ["feathersjs__socket-commons"], - "@feathersjs/feathers": ["feathersjs__feathers"] + "@feathersjs/socket-commons": [ + "feathersjs__socket-commons" + ], + "@feathersjs/feathers": [ + "feathersjs__feathers" + ] } }, "files": [ - "index.d.ts", "feathersjs__socket-commons-tests.ts" + "index.d.ts", + "feathersjs__socket-commons-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__socketio-client/tsconfig.json b/types/feathersjs__socketio-client/tsconfig.json index ffea4d4f91..c526cdcb5c 100644 --- a/types/feathersjs__socketio-client/tsconfig.json +++ b/types/feathersjs__socketio-client/tsconfig.json @@ -15,13 +15,18 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/socketio-client": ["feathersjs__socketio-client"], - "@feathersjs/feathers": ["feathersjs__feathers"] - + "@feathersjs/socketio-client": [ + "feathersjs__socketio-client" + ], + "@feathersjs/feathers": [ + "feathersjs__feathers" + ] } }, "files": [ - "index.d.ts", "feathersjs__socketio-client-tests.ts" + "index.d.ts", + "feathersjs__socketio-client-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feathersjs__socketio/index.d.ts b/types/feathersjs__socketio/index.d.ts index 3994f73537..34b78eb749 100644 --- a/types/feathersjs__socketio/index.d.ts +++ b/types/feathersjs__socketio/index.d.ts @@ -2,8 +2,10 @@ // Project: http://feathersjs.com/ // Definitions by: Jan Lohage // Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript +// TypeScript Version: 2.3 /// +/// export default function feathersSocketIO(callback: (io: SocketIO.Server) => void): () => void; export default function feathersSocketIO(options: number | SocketIO.ServerOptions, callback?: (io: SocketIO.Server) => void): () => void; diff --git a/types/feathersjs__socketio/tsconfig.json b/types/feathersjs__socketio/tsconfig.json index 2b3cc51adc..69a3f5c66f 100644 --- a/types/feathersjs__socketio/tsconfig.json +++ b/types/feathersjs__socketio/tsconfig.json @@ -15,12 +15,18 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { - "@feathersjs/socketio": ["feathersjs__socketio"], - "@feathersjs/feathers": ["feathersjs__feathers"] + "@feathersjs/socketio": [ + "feathersjs__socketio" + ], + "@feathersjs/feathers": [ + "feathersjs__feathers" + ] } }, "files": [ - "index.d.ts", "feathersjs__socketio-tests.ts" + "index.d.ts", + "feathersjs__socketio-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/feedme/tsconfig.json b/types/feedme/tsconfig.json index aa5f186309..cdd8460fac 100644 --- a/types/feedme/tsconfig.json +++ b/types/feedme/tsconfig.json @@ -14,7 +14,8 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, - "strictFunctionTypes" : false + "esModuleInterop": true, + "strictFunctionTypes": false }, "files": [ "index.d.ts", diff --git a/types/feedparser/feedparser-tests.ts b/types/feedparser/feedparser-tests.ts index 25d652de8c..1b35498a5e 100644 --- a/types/feedparser/feedparser-tests.ts +++ b/types/feedparser/feedparser-tests.ts @@ -1,5 +1,5 @@ import request = require('request'); -import * as FeedParser from "feedparser"; +import FeedParser = require("feedparser"); const req = request('https://news.google.com/news?cf=all&hl=en&pz=1&ned=us&output=rss'); const feedparser = new FeedParser({}); diff --git a/types/feedparser/tsconfig.json b/types/feedparser/tsconfig.json index 683adf9415..d60dcdde12 100644 --- a/types/feedparser/tsconfig.json +++ b/types/feedparser/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "feedparser-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/fetch-jsonp/tsconfig.json b/types/fetch-jsonp/tsconfig.json index 885a787152..2a4c7fd15f 100644 --- a/types/fetch-jsonp/tsconfig.json +++ b/types/fetch-jsonp/tsconfig.json @@ -17,6 +17,7 @@ "noImplicitAny": true, "noImplicitThis": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noEmit": true }, "files": [ diff --git a/types/fetch-mock/tsconfig.json b/types/fetch-mock/tsconfig.json index 0c410ec0ae..b43553f18a 100644 --- a/types/fetch-mock/tsconfig.json +++ b/types/fetch-mock/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fetch.io/tsconfig.json b/types/fetch.io/tsconfig.json index b47cf8f3bf..caccfa9ed6 100644 --- a/types/fetch.io/tsconfig.json +++ b/types/fetch.io/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ffi/tsconfig.json b/types/ffi/tsconfig.json index db74f21b0e..2802ced44b 100644 --- a/types/ffi/tsconfig.json +++ b/types/ffi/tsconfig.json @@ -14,11 +14,12 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "node-ffi-buffer.d.ts", "ffi-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/ffmpeg-static/tsconfig.json b/types/ffmpeg-static/tsconfig.json index 8a1635e82c..1dcc13635e 100644 --- a/types/ffmpeg-static/tsconfig.json +++ b/types/ffmpeg-static/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ffprobe-static/tsconfig.json b/types/ffprobe-static/tsconfig.json index fab3495614..fe2dcc110e 100644 --- a/types/ffprobe-static/tsconfig.json +++ b/types/ffprobe-static/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fhir/tsconfig.json b/types/fhir/tsconfig.json index 8b4970200f..f8f2b46903 100644 --- a/types/fhir/tsconfig.json +++ b/types/fhir/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fibers/tsconfig.json b/types/fibers/tsconfig.json index 99e4865e3c..9e73063f35 100644 --- a/types/fibers/tsconfig.json +++ b/types/fibers/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/field/tsconfig.json b/types/field/tsconfig.json index 219fa4963d..f4ee4fe059 100644 --- a/types/field/tsconfig.json +++ b/types/field/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/figures/tsconfig.json b/types/figures/tsconfig.json index 720529ea45..34cd5b28e7 100644 --- a/types/figures/tsconfig.json +++ b/types/figures/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/file-exists/tsconfig.json b/types/file-exists/tsconfig.json index ffdee8351c..a1029d7f76 100644 --- a/types/file-exists/tsconfig.json +++ b/types/file-exists/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/file-saver/tsconfig.json b/types/file-saver/tsconfig.json index 803ff5f510..dcffa809ea 100644 --- a/types/file-saver/tsconfig.json +++ b/types/file-saver/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "file-saver-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/file-type/tsconfig.json b/types/file-type/tsconfig.json index 499b81459c..ab07d788b2 100644 --- a/types/file-type/tsconfig.json +++ b/types/file-type/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/file-url/tsconfig.json b/types/file-url/tsconfig.json index 4a6e413ce0..d42d45f1a9 100644 --- a/types/file-url/tsconfig.json +++ b/types/file-url/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/filenamify/tsconfig.json b/types/filenamify/tsconfig.json index 0d41b23a0d..1cd1fae6ab 100644 --- a/types/filenamify/tsconfig.json +++ b/types/filenamify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/filesize/tsconfig.json b/types/filesize/tsconfig.json index 350e88d4ad..885c875de6 100644 --- a/types/filesize/tsconfig.json +++ b/types/filesize/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/filesystem/tsconfig.json b/types/filesystem/tsconfig.json index 6512ab1028..f9366bd879 100644 --- a/types/filesystem/tsconfig.json +++ b/types/filesystem/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/filewriter/tsconfig.json b/types/filewriter/tsconfig.json index 7cba1a1289..c1ce1dcc0a 100644 --- a/types/filewriter/tsconfig.json +++ b/types/filewriter/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fill-pdf/tsconfig.json b/types/fill-pdf/tsconfig.json index 4cbe1dad24..7caa55c8f6 100644 --- a/types/fill-pdf/tsconfig.json +++ b/types/fill-pdf/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/finalhandler/finalhandler-tests.ts b/types/finalhandler/finalhandler-tests.ts index 81b9565404..3b40b217d0 100644 --- a/types/finalhandler/finalhandler-tests.ts +++ b/types/finalhandler/finalhandler-tests.ts @@ -1,6 +1,5 @@ - import { ServerRequest, ServerResponse } from "http"; -import * as finalHandler from "finalhandler"; +import finalHandler = require("finalhandler"); let req: ServerRequest; let res: ServerResponse; diff --git a/types/finalhandler/tsconfig.json b/types/finalhandler/tsconfig.json index dd03198a83..dece053e4f 100644 --- a/types/finalhandler/tsconfig.json +++ b/types/finalhandler/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/finch/tsconfig.json b/types/finch/tsconfig.json index dfb658a6b2..1f581e19fa 100644 --- a/types/finch/tsconfig.json +++ b/types/finch/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/find-root/tsconfig.json b/types/find-root/tsconfig.json index 72d7b324a3..d4589574b0 100644 --- a/types/find-root/tsconfig.json +++ b/types/find-root/tsconfig.json @@ -1,23 +1,24 @@ { "compilerOptions": { - "module": "commonjs", - "lib": [ + "module": "commonjs", + "lib": [ "es6" ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ "../" ], - "types": [], - "noEmit": true, + "types": [], + "noEmit": true, "forceConsistentCasingInFileNames": true, - "strictFunctionTypes": true + "esModuleInterop": true, + "strictFunctionTypes": true }, - "files": [ + "files": [ "index.d.ts", "find-root-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/find-up/tsconfig.json b/types/find-up/tsconfig.json index ea6bf9d1ad..4940987639 100644 --- a/types/find-up/tsconfig.json +++ b/types/find-up/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/find/tsconfig.json b/types/find/tsconfig.json index e231e78ff5..219a8c1831 100644 --- a/types/find/tsconfig.json +++ b/types/find/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "find-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/findup-sync/tsconfig.json b/types/findup-sync/tsconfig.json index fd44ee7c99..9afac34cac 100644 --- a/types/findup-sync/tsconfig.json +++ b/types/findup-sync/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fingerprintjs/tsconfig.json b/types/fingerprintjs/tsconfig.json index 35166934d4..1443b165be 100644 --- a/types/fingerprintjs/tsconfig.json +++ b/types/fingerprintjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fingerprintjs2/tsconfig.json b/types/fingerprintjs2/tsconfig.json index b274c3c488..1137ce7a3b 100644 --- a/types/fingerprintjs2/tsconfig.json +++ b/types/fingerprintjs2/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/firebase-client/tsconfig.json b/types/firebase-client/tsconfig.json index 4510d3f56d..674b6d8e11 100644 --- a/types/firebase-client/tsconfig.json +++ b/types/firebase-client/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/firebase-token-generator/tsconfig.json b/types/firebase-token-generator/tsconfig.json index e6620557a2..8b11cf18fb 100644 --- a/types/firebase-token-generator/tsconfig.json +++ b/types/firebase-token-generator/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/firebird/tsconfig.json b/types/firebird/tsconfig.json index e5e2d1b6ac..b21033b4ae 100644 --- a/types/firebird/tsconfig.json +++ b/types/firebird/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/firefox-webext-browser/tsconfig.json b/types/firefox-webext-browser/tsconfig.json index 202f6824d1..b3c2877928 100644 --- a/types/firefox-webext-browser/tsconfig.json +++ b/types/firefox-webext-browser/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "firefox-webext-browser-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/firefox/tsconfig.json b/types/firefox/tsconfig.json index 44ef93219e..53908aec19 100644 --- a/types/firefox/tsconfig.json +++ b/types/firefox/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/firmata/firmata-tests.ts b/types/firmata/firmata-tests.ts index d50160e2dd..9a3137ea39 100644 --- a/types/firmata/firmata-tests.ts +++ b/types/firmata/firmata-tests.ts @@ -1,4 +1,4 @@ -import * as Board from 'firmata'; +import Board = require('firmata'); function test_basic_board() { const board = new Board(''); diff --git a/types/firmata/tsconfig.json b/types/firmata/tsconfig.json index d843e1300d..8a684319aa 100644 --- a/types/firmata/tsconfig.json +++ b/types/firmata/tsconfig.json @@ -13,11 +13,14 @@ "../" ], "paths": { - "serialport": ["serialport/v4"] + "serialport": [ + "serialport/v4" + ] }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/first-mate/tsconfig.json b/types/first-mate/tsconfig.json index 3c11f8dbb2..7df84484f9 100644 --- a/types/first-mate/tsconfig.json +++ b/types/first-mate/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "first-mate-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/fixed-data-table-2/tsconfig.json b/types/fixed-data-table-2/tsconfig.json index c548d5c369..5cd1ad16ef 100644 --- a/types/fixed-data-table-2/tsconfig.json +++ b/types/fixed-data-table-2/tsconfig.json @@ -5,8 +5,11 @@ ], "compilerOptions": { "module": "commonjs", - "lib": ["es6", "dom"], - "jsx":"preserve", + "lib": [ + "es6", + "dom" + ], + "jsx": "preserve", "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,6 +20,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } -} +} \ No newline at end of file diff --git a/types/fixed-data-table/tsconfig.json b/types/fixed-data-table/tsconfig.json index 02ba840d0b..73c385c8b6 100644 --- a/types/fixed-data-table/tsconfig.json +++ b/types/fixed-data-table/tsconfig.json @@ -20,6 +20,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/flake-idgen/tsconfig.json b/types/flake-idgen/tsconfig.json index 0275fb0c23..5f6690f284 100644 --- a/types/flake-idgen/tsconfig.json +++ b/types/flake-idgen/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/flat/tsconfig.json b/types/flat/tsconfig.json index 7cc1467b3f..5641722c8a 100644 --- a/types/flat/tsconfig.json +++ b/types/flat/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/flatbuffers/tsconfig.json b/types/flatbuffers/tsconfig.json index fe3421fa5b..9ec0f4dba5 100644 --- a/types/flatbuffers/tsconfig.json +++ b/types/flatbuffers/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/flexslider/tsconfig.json b/types/flexslider/tsconfig.json index 4ced617dd6..0339ecf2bf 100644 --- a/types/flexslider/tsconfig.json +++ b/types/flexslider/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/flickity/tsconfig.json b/types/flickity/tsconfig.json index e6d8dcef00..387c655e41 100644 --- a/types/flickity/tsconfig.json +++ b/types/flickity/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/flight/tsconfig.json b/types/flight/tsconfig.json index 18060e6903..36bfff03c9 100644 --- a/types/flight/tsconfig.json +++ b/types/flight/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/flightplan/tsconfig.json b/types/flightplan/tsconfig.json index be4eb41ec5..24de7ee0b1 100644 --- a/types/flightplan/tsconfig.json +++ b/types/flightplan/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/flipsnap/tsconfig.json b/types/flipsnap/tsconfig.json index 435b186eb4..8712fa1972 100644 --- a/types/flipsnap/tsconfig.json +++ b/types/flipsnap/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/flot/tsconfig.json b/types/flot/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/flot/tsconfig.json +++ b/types/flot/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/flowjs/tsconfig.json b/types/flowjs/tsconfig.json index e797332c13..6cb7be27d6 100644 --- a/types/flowjs/tsconfig.json +++ b/types/flowjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fluent-ffmpeg/tsconfig.json b/types/fluent-ffmpeg/tsconfig.json index 657e97adf6..91b742fb17 100644 --- a/types/fluent-ffmpeg/tsconfig.json +++ b/types/fluent-ffmpeg/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/flux/index.d.ts b/types/flux/index.d.ts index 9a95368afb..ae63f1349b 100644 --- a/types/flux/index.d.ts +++ b/types/flux/index.d.ts @@ -5,7 +5,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import * as Dispatcher from "./lib/Dispatcher"; +import Dispatcher = require("./lib/Dispatcher"); export { Dispatcher diff --git a/types/flux/lib/FluxReduceStore.d.ts b/types/flux/lib/FluxReduceStore.d.ts index 71a7968812..cda93a54e9 100644 --- a/types/flux/lib/FluxReduceStore.d.ts +++ b/types/flux/lib/FluxReduceStore.d.ts @@ -1,4 +1,4 @@ -import * as Store from "./FluxStore"; +import Store = require("./FluxStore"); declare namespace FluxReduceStore { } diff --git a/types/flux/tsconfig.json b/types/flux/tsconfig.json index dd78eff24c..60191d3789 100644 --- a/types/flux/tsconfig.json +++ b/types/flux/tsconfig.json @@ -16,6 +16,7 @@ "strictNullChecks": false, "strictFunctionTypes": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noEmit": true }, "files": [ diff --git a/types/flux/utils.d.ts b/types/flux/utils.d.ts index 4eb3d96e99..d9ced309db 100644 --- a/types/flux/utils.d.ts +++ b/types/flux/utils.d.ts @@ -1,7 +1,7 @@ -import * as Container from "./lib/FluxContainer"; -import * as Mixin from "./lib/FluxMixinLegacy"; -import * as ReduceStore from "./lib/FluxReduceStore"; -import * as Store from "./lib/FluxStore"; +import Container = require("./lib/FluxContainer"); +import Mixin = require("./lib/FluxMixinLegacy"); +import ReduceStore = require("./lib/FluxReduceStore"); +import Store = require("./lib/FluxStore"); export { Container, diff --git a/types/fluxxor/tsconfig.json b/types/fluxxor/tsconfig.json index 7bc0068190..bd6b27cda1 100644 --- a/types/fluxxor/tsconfig.json +++ b/types/fluxxor/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fm-websync/tsconfig.json b/types/fm-websync/tsconfig.json index c0b2f14445..746eea4553 100644 --- a/types/fm-websync/tsconfig.json +++ b/types/fm-websync/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fontfaceobserver/tsconfig.json b/types/fontfaceobserver/tsconfig.json index 3695935f67..68e75c4b62 100644 --- a/types/fontfaceobserver/tsconfig.json +++ b/types/fontfaceobserver/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fontoxml/tsconfig.json b/types/fontoxml/tsconfig.json index 6d62b697a0..f90f6bb073 100644 --- a/types/fontoxml/tsconfig.json +++ b/types/fontoxml/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/forever-monitor/tsconfig.json b/types/forever-monitor/tsconfig.json index 30bf59fa63..52bc473a2b 100644 --- a/types/forever-monitor/tsconfig.json +++ b/types/forever-monitor/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/forge-di/tsconfig.json b/types/forge-di/tsconfig.json index 14aa632323..1936a2e5a4 100644 --- a/types/forge-di/tsconfig.json +++ b/types/forge-di/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/form-data/tsconfig.json b/types/form-data/tsconfig.json index d1cdfefaf0..2d98b9d238 100644 --- a/types/form-data/tsconfig.json +++ b/types/form-data/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/form-serializer/tsconfig.json b/types/form-serializer/tsconfig.json index 0e7f5bba79..2a1a008cbf 100644 --- a/types/form-serializer/tsconfig.json +++ b/types/form-serializer/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/form-urlencoded/tsconfig.json b/types/form-urlencoded/tsconfig.json index 4eefbe0a12..5dd924ceb9 100644 --- a/types/form-urlencoded/tsconfig.json +++ b/types/form-urlencoded/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "form-urlencoded-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/format-duration/tsconfig.json b/types/format-duration/tsconfig.json index f17a4f7c6c..453b0def6d 100644 --- a/types/format-duration/tsconfig.json +++ b/types/format-duration/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "format-duration-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/format-io/tsconfig.json b/types/format-io/tsconfig.json index 29333d35cf..af99cdb3b1 100644 --- a/types/format-io/tsconfig.json +++ b/types/format-io/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "format-io-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/format-unicorn/tsconfig.json b/types/format-unicorn/tsconfig.json index 84864d0f7e..a14223efb4 100644 --- a/types/format-unicorn/tsconfig.json +++ b/types/format-unicorn/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/formidable/tsconfig.json b/types/formidable/tsconfig.json index e5b9877247..cca3f74f31 100644 --- a/types/formidable/tsconfig.json +++ b/types/formidable/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/forms/tsconfig.json b/types/forms/tsconfig.json index 1185c1ffbb..aad7419eea 100644 --- a/types/forms/tsconfig.json +++ b/types/forms/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "forms-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/forwarded/tsconfig.json b/types/forwarded/tsconfig.json index 58cbcdee21..5fd0798e3f 100644 --- a/types/forwarded/tsconfig.json +++ b/types/forwarded/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fossil-delta/tsconfig.json b/types/fossil-delta/tsconfig.json index 29b7c7e933..01a233092c 100644 --- a/types/fossil-delta/tsconfig.json +++ b/types/fossil-delta/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/foundation/tsconfig.json b/types/foundation/tsconfig.json index 5ddb587b52..a8fd93f7b1 100644 --- a/types/foundation/tsconfig.json +++ b/types/foundation/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fpsmeter/tsconfig.json b/types/fpsmeter/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/fpsmeter/tsconfig.json +++ b/types/fpsmeter/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/framebus/tsconfig.json b/types/framebus/tsconfig.json index eec501f70b..aac56ce964 100644 --- a/types/framebus/tsconfig.json +++ b/types/framebus/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/freedom/tsconfig.json b/types/freedom/tsconfig.json index dd0bd2e13c..6377018113 100644 --- a/types/freedom/tsconfig.json +++ b/types/freedom/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/freeport/tsconfig.json b/types/freeport/tsconfig.json index f6b6ef7b66..ccd3f7b895 100644 --- a/types/freeport/tsconfig.json +++ b/types/freeport/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fresh/tsconfig.json b/types/fresh/tsconfig.json index 298a5c3fae..75aa6f7dbb 100644 --- a/types/fresh/tsconfig.json +++ b/types/fresh/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/friendly-errors-webpack-plugin/friendly-errors-webpack-plugin-tests.ts b/types/friendly-errors-webpack-plugin/friendly-errors-webpack-plugin-tests.ts index 4ce3828f3f..11f9395974 100644 --- a/types/friendly-errors-webpack-plugin/friendly-errors-webpack-plugin-tests.ts +++ b/types/friendly-errors-webpack-plugin/friendly-errors-webpack-plugin-tests.ts @@ -1,5 +1,5 @@ -import * as webpack from 'webpack'; -import * as FriendlyErrorsPlugin from 'friendly-errors-webpack-plugin'; +import webpack = require('webpack'); +import FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin'); const compiler = webpack({ plugins: [ diff --git a/types/friendly-errors-webpack-plugin/tsconfig.json b/types/friendly-errors-webpack-plugin/tsconfig.json index f519c3b954..4dc4ac0262 100644 --- a/types/friendly-errors-webpack-plugin/tsconfig.json +++ b/types/friendly-errors-webpack-plugin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/frisby/tsconfig.json b/types/frisby/tsconfig.json index 725ebf48f1..f126fc2232 100644 --- a/types/frisby/tsconfig.json +++ b/types/frisby/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/from/tsconfig.json b/types/from/tsconfig.json index 649c0d1866..7f153fba36 100644 --- a/types/from/tsconfig.json +++ b/types/from/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/from2/tsconfig.json b/types/from2/tsconfig.json index 641eda4cf5..b5ef31433c 100644 --- a/types/from2/tsconfig.json +++ b/types/from2/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fromjs/tsconfig.json b/types/fromjs/tsconfig.json index 4c5e05b65a..7166dc031c 100644 --- a/types/fromjs/tsconfig.json +++ b/types/fromjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fromnow/tsconfig.json b/types/fromnow/tsconfig.json index 56e959f305..52471d205f 100644 --- a/types/fromnow/tsconfig.json +++ b/types/fromnow/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fs-cson/tsconfig.json b/types/fs-cson/tsconfig.json index fcd9242b1d..88fa1daf3c 100644 --- a/types/fs-cson/tsconfig.json +++ b/types/fs-cson/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "fs-cson-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/fs-ext/tsconfig.json b/types/fs-ext/tsconfig.json index 18df84572d..40fd47fbd8 100644 --- a/types/fs-ext/tsconfig.json +++ b/types/fs-ext/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fs-extra-promise-es6/tsconfig.json b/types/fs-extra-promise-es6/tsconfig.json index b7e6f664f2..7a94f2f204 100644 --- a/types/fs-extra-promise-es6/tsconfig.json +++ b/types/fs-extra-promise-es6/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fs-extra-promise/tsconfig.json b/types/fs-extra-promise/tsconfig.json index 4a4fc0f60b..412ab9c171 100644 --- a/types/fs-extra-promise/tsconfig.json +++ b/types/fs-extra-promise/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fs-extra/tsconfig.json b/types/fs-extra/tsconfig.json index d43823dee8..6441117056 100644 --- a/types/fs-extra/tsconfig.json +++ b/types/fs-extra/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fs-extra/v4/tsconfig.json b/types/fs-extra/v4/tsconfig.json index 80435f4ede..053ba23f12 100644 --- a/types/fs-extra/v4/tsconfig.json +++ b/types/fs-extra/v4/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fs-finder/tsconfig.json b/types/fs-finder/tsconfig.json index 300e950feb..8df4e87cd3 100644 --- a/types/fs-finder/tsconfig.json +++ b/types/fs-finder/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fs-mock/tsconfig.json b/types/fs-mock/tsconfig.json index f468b62a55..8967149914 100644 --- a/types/fs-mock/tsconfig.json +++ b/types/fs-mock/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fs-plus/tsconfig.json b/types/fs-plus/tsconfig.json index 1ab0098d52..ae0059f221 100644 --- a/types/fs-plus/tsconfig.json +++ b/types/fs-plus/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "fs-plus-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/fs-promise/tsconfig.json b/types/fs-promise/tsconfig.json index 377d4623d9..9a5d721107 100644 --- a/types/fs-promise/tsconfig.json +++ b/types/fs-promise/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fs-readdir-recursive/tsconfig.json b/types/fs-readdir-recursive/tsconfig.json index d33141f321..142c4bd90f 100644 --- a/types/fs-readdir-recursive/tsconfig.json +++ b/types/fs-readdir-recursive/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fs-readfile-promise/fs-readfile-promise-tests.ts b/types/fs-readfile-promise/fs-readfile-promise-tests.ts index 9bd1ac070c..1871207710 100644 --- a/types/fs-readfile-promise/fs-readfile-promise-tests.ts +++ b/types/fs-readfile-promise/fs-readfile-promise-tests.ts @@ -1,4 +1,4 @@ -import * as readFile from "fs-readfile-promise"; +import readFile = require("fs-readfile-promise"); declare const path: string; declare const encoding: string; diff --git a/types/fs-readfile-promise/tsconfig.json b/types/fs-readfile-promise/tsconfig.json index 3496c329e5..9b890c41f3 100644 --- a/types/fs-readfile-promise/tsconfig.json +++ b/types/fs-readfile-promise/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fscreen/tsconfig.json b/types/fscreen/tsconfig.json index e352d9fd2e..7243196e30 100644 --- a/types/fscreen/tsconfig.json +++ b/types/fscreen/tsconfig.json @@ -16,10 +16,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "fscreen-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/fsevents/tsconfig.json b/types/fsevents/tsconfig.json index 2937460740..003cbb5bd5 100644 --- a/types/fsevents/tsconfig.json +++ b/types/fsevents/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ftdomdelegate/tsconfig.json b/types/ftdomdelegate/tsconfig.json index 0220e74665..ea2d05abf2 100644 --- a/types/ftdomdelegate/tsconfig.json +++ b/types/ftdomdelegate/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ftp/tsconfig.json b/types/ftp/tsconfig.json index 6a0f57a1fc..e8e843855e 100644 --- a/types/ftp/tsconfig.json +++ b/types/ftp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ftpd/tsconfig.json b/types/ftpd/tsconfig.json index 24702aad8b..c1b9a8fa8f 100644 --- a/types/ftpd/tsconfig.json +++ b/types/ftpd/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fullname/tsconfig.json b/types/fullname/tsconfig.json index a086692e32..8fb03b2727 100644 --- a/types/fullname/tsconfig.json +++ b/types/fullname/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fullpage.js/tsconfig.json b/types/fullpage.js/tsconfig.json index d20953732c..615d06bafa 100644 --- a/types/fullpage.js/tsconfig.json +++ b/types/fullpage.js/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "fullpage.js-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/fuse/tsconfig.json b/types/fuse/tsconfig.json index 8f6b34f5d3..da4e30c7a2 100644 --- a/types/fuse/tsconfig.json +++ b/types/fuse/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fusioncharts/tsconfig.json b/types/fusioncharts/tsconfig.json index f41f53056a..a48802a4d4 100644 --- a/types/fusioncharts/tsconfig.json +++ b/types/fusioncharts/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fuzzaldrin-plus/tsconfig.json b/types/fuzzaldrin-plus/tsconfig.json index 02e987df6d..ce5b104868 100644 --- a/types/fuzzaldrin-plus/tsconfig.json +++ b/types/fuzzaldrin-plus/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fuzzaldrin/tsconfig.json b/types/fuzzaldrin/tsconfig.json index 2e1263faf8..b62c85debf 100644 --- a/types/fuzzaldrin/tsconfig.json +++ b/types/fuzzaldrin/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "fuzzaldrin-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/fuzzyset.js/tsconfig.json b/types/fuzzyset.js/tsconfig.json index a1eeb06b97..fc659fa22e 100644 --- a/types/fuzzyset.js/tsconfig.json +++ b/types/fuzzyset.js/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "fuzzyset.js-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/fuzzyset/tsconfig.json b/types/fuzzyset/tsconfig.json index 4ccf3898d4..f17bb2e723 100644 --- a/types/fuzzyset/tsconfig.json +++ b/types/fuzzyset/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/fxn/tsconfig.json b/types/fxn/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/fxn/tsconfig.json +++ b/types/fxn/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/gae.channel.api/tsconfig.json b/types/gae.channel.api/tsconfig.json index 37424f5ae4..12057a214d 100644 --- a/types/gae.channel.api/tsconfig.json +++ b/types/gae.channel.api/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gamepad/tsconfig.json b/types/gamepad/tsconfig.json index 4cb63f3d80..6189bd3866 100644 --- a/types/gamepad/tsconfig.json +++ b/types/gamepad/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gamequery/tsconfig.json b/types/gamequery/tsconfig.json index 9acbbdf6ea..bf4707af6f 100644 --- a/types/gamequery/tsconfig.json +++ b/types/gamequery/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gandi-livedns/tsconfig.json b/types/gandi-livedns/tsconfig.json index 709af92138..1b8ab220e1 100644 --- a/types/gandi-livedns/tsconfig.json +++ b/types/gandi-livedns/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gapi.analytics/tsconfig.json b/types/gapi.analytics/tsconfig.json index 7ea23b6882..2f420134d3 100644 --- a/types/gapi.analytics/tsconfig.json +++ b/types/gapi.analytics/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gapi.auth2/tsconfig.json b/types/gapi.auth2/tsconfig.json index 8757ec8333..594913d8b0 100644 --- a/types/gapi.auth2/tsconfig.json +++ b/types/gapi.auth2/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gapi.calendar/tsconfig.json b/types/gapi.calendar/tsconfig.json index 2d138f7ac9..78c7e4a32e 100644 --- a/types/gapi.calendar/tsconfig.json +++ b/types/gapi.calendar/tsconfig.json @@ -15,6 +15,7 @@ "noImplicitAny": true, "noImplicitThis": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noEmit": true }, "files": [ diff --git a/types/gapi.client.acceleratedmobilepageurl/tsconfig.json b/types/gapi.client.acceleratedmobilepageurl/tsconfig.json index 60d81925fe..7ca46199d1 100644 --- a/types/gapi.client.acceleratedmobilepageurl/tsconfig.json +++ b/types/gapi.client.acceleratedmobilepageurl/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.adexchangebuyer/tsconfig.json b/types/gapi.client.adexchangebuyer/tsconfig.json index a6ddc40ec7..ecef1dc650 100644 --- a/types/gapi.client.adexchangebuyer/tsconfig.json +++ b/types/gapi.client.adexchangebuyer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.adexchangebuyer2/tsconfig.json b/types/gapi.client.adexchangebuyer2/tsconfig.json index 453ca167ee..6885a64bc3 100644 --- a/types/gapi.client.adexchangebuyer2/tsconfig.json +++ b/types/gapi.client.adexchangebuyer2/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.adexchangeseller/tsconfig.json b/types/gapi.client.adexchangeseller/tsconfig.json index a38d57f5b8..b5c5e81e25 100644 --- a/types/gapi.client.adexchangeseller/tsconfig.json +++ b/types/gapi.client.adexchangeseller/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.adexperiencereport/tsconfig.json b/types/gapi.client.adexperiencereport/tsconfig.json index 968c080cf9..b0049ec537 100644 --- a/types/gapi.client.adexperiencereport/tsconfig.json +++ b/types/gapi.client.adexperiencereport/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.admin/tsconfig.json b/types/gapi.client.admin/tsconfig.json index 840f1feb2d..339a673cf6 100644 --- a/types/gapi.client.admin/tsconfig.json +++ b/types/gapi.client.admin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.adsense/tsconfig.json b/types/gapi.client.adsense/tsconfig.json index 49b1e08a5a..ee48e54b1f 100644 --- a/types/gapi.client.adsense/tsconfig.json +++ b/types/gapi.client.adsense/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.adsensehost/tsconfig.json b/types/gapi.client.adsensehost/tsconfig.json index 5cee9dc200..1bc4586345 100644 --- a/types/gapi.client.adsensehost/tsconfig.json +++ b/types/gapi.client.adsensehost/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.analytics/tsconfig.json b/types/gapi.client.analytics/tsconfig.json index 24b9a3e308..bf021b2158 100644 --- a/types/gapi.client.analytics/tsconfig.json +++ b/types/gapi.client.analytics/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.analyticsreporting/tsconfig.json b/types/gapi.client.analyticsreporting/tsconfig.json index 2f65484898..4f15864f1a 100644 --- a/types/gapi.client.analyticsreporting/tsconfig.json +++ b/types/gapi.client.analyticsreporting/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.androiddeviceprovisioning/tsconfig.json b/types/gapi.client.androiddeviceprovisioning/tsconfig.json index 953923be00..0bf5432081 100644 --- a/types/gapi.client.androiddeviceprovisioning/tsconfig.json +++ b/types/gapi.client.androiddeviceprovisioning/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.androidenterprise/tsconfig.json b/types/gapi.client.androidenterprise/tsconfig.json index d641db9824..aa914d683d 100644 --- a/types/gapi.client.androidenterprise/tsconfig.json +++ b/types/gapi.client.androidenterprise/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.androidmanagement/tsconfig.json b/types/gapi.client.androidmanagement/tsconfig.json index 3cfbad08e0..800f1fb763 100644 --- a/types/gapi.client.androidmanagement/tsconfig.json +++ b/types/gapi.client.androidmanagement/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.androidpublisher/tsconfig.json b/types/gapi.client.androidpublisher/tsconfig.json index 6f724fe172..141590dbbf 100644 --- a/types/gapi.client.androidpublisher/tsconfig.json +++ b/types/gapi.client.androidpublisher/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.appengine/tsconfig.json b/types/gapi.client.appengine/tsconfig.json index 0af2b9eade..b8ec56c5d7 100644 --- a/types/gapi.client.appengine/tsconfig.json +++ b/types/gapi.client.appengine/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.appsactivity/tsconfig.json b/types/gapi.client.appsactivity/tsconfig.json index 0afc87f3ad..afcfd4b989 100644 --- a/types/gapi.client.appsactivity/tsconfig.json +++ b/types/gapi.client.appsactivity/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.appstate/tsconfig.json b/types/gapi.client.appstate/tsconfig.json index e9b5b7a850..a751adc9f9 100644 --- a/types/gapi.client.appstate/tsconfig.json +++ b/types/gapi.client.appstate/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.bigquery/tsconfig.json b/types/gapi.client.bigquery/tsconfig.json index 23f55a96a4..f96f22a938 100644 --- a/types/gapi.client.bigquery/tsconfig.json +++ b/types/gapi.client.bigquery/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.bigquerydatatransfer/tsconfig.json b/types/gapi.client.bigquerydatatransfer/tsconfig.json index 312df37f3f..dc90ae3640 100644 --- a/types/gapi.client.bigquerydatatransfer/tsconfig.json +++ b/types/gapi.client.bigquerydatatransfer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.blogger/tsconfig.json b/types/gapi.client.blogger/tsconfig.json index 1b5be0ad2b..14c778be8f 100644 --- a/types/gapi.client.blogger/tsconfig.json +++ b/types/gapi.client.blogger/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.books/tsconfig.json b/types/gapi.client.books/tsconfig.json index d011bdcf5c..d5b6f224fd 100644 --- a/types/gapi.client.books/tsconfig.json +++ b/types/gapi.client.books/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.calendar/tsconfig.json b/types/gapi.client.calendar/tsconfig.json index 5d44c3d92a..4a3cc57200 100644 --- a/types/gapi.client.calendar/tsconfig.json +++ b/types/gapi.client.calendar/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.civicinfo/tsconfig.json b/types/gapi.client.civicinfo/tsconfig.json index 6c3ced88c9..c144ad988f 100644 --- a/types/gapi.client.civicinfo/tsconfig.json +++ b/types/gapi.client.civicinfo/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.classroom/tsconfig.json b/types/gapi.client.classroom/tsconfig.json index 4e1a97323a..1c09dcba49 100644 --- a/types/gapi.client.classroom/tsconfig.json +++ b/types/gapi.client.classroom/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.cloudbilling/tsconfig.json b/types/gapi.client.cloudbilling/tsconfig.json index 66cfdbefe4..bf15149044 100644 --- a/types/gapi.client.cloudbilling/tsconfig.json +++ b/types/gapi.client.cloudbilling/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.cloudbuild/tsconfig.json b/types/gapi.client.cloudbuild/tsconfig.json index 22d8d6d390..193b0bb7bc 100644 --- a/types/gapi.client.cloudbuild/tsconfig.json +++ b/types/gapi.client.cloudbuild/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.clouddebugger/tsconfig.json b/types/gapi.client.clouddebugger/tsconfig.json index de9d4c94bc..773cb6f623 100644 --- a/types/gapi.client.clouddebugger/tsconfig.json +++ b/types/gapi.client.clouddebugger/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.clouderrorreporting/tsconfig.json b/types/gapi.client.clouderrorreporting/tsconfig.json index cc1296f8ee..5a0a7e1605 100644 --- a/types/gapi.client.clouderrorreporting/tsconfig.json +++ b/types/gapi.client.clouderrorreporting/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.cloudfunctions/tsconfig.json b/types/gapi.client.cloudfunctions/tsconfig.json index 720b272f2e..d0ad0ec792 100644 --- a/types/gapi.client.cloudfunctions/tsconfig.json +++ b/types/gapi.client.cloudfunctions/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.cloudiot/tsconfig.json b/types/gapi.client.cloudiot/tsconfig.json index 03ed93c76d..6619e1273b 100644 --- a/types/gapi.client.cloudiot/tsconfig.json +++ b/types/gapi.client.cloudiot/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.cloudkms/tsconfig.json b/types/gapi.client.cloudkms/tsconfig.json index ff982b97d1..30e1a47d30 100644 --- a/types/gapi.client.cloudkms/tsconfig.json +++ b/types/gapi.client.cloudkms/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.cloudmonitoring/tsconfig.json b/types/gapi.client.cloudmonitoring/tsconfig.json index e007418ca9..aa98b060a4 100644 --- a/types/gapi.client.cloudmonitoring/tsconfig.json +++ b/types/gapi.client.cloudmonitoring/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.cloudresourcemanager/tsconfig.json b/types/gapi.client.cloudresourcemanager/tsconfig.json index c82cbc16f6..bf64d30483 100644 --- a/types/gapi.client.cloudresourcemanager/tsconfig.json +++ b/types/gapi.client.cloudresourcemanager/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.cloudtasks/tsconfig.json b/types/gapi.client.cloudtasks/tsconfig.json index d4240ab7d4..a2d8c58245 100644 --- a/types/gapi.client.cloudtasks/tsconfig.json +++ b/types/gapi.client.cloudtasks/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.cloudtrace/tsconfig.json b/types/gapi.client.cloudtrace/tsconfig.json index 977a1fd91f..deb00da08f 100644 --- a/types/gapi.client.cloudtrace/tsconfig.json +++ b/types/gapi.client.cloudtrace/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.clouduseraccounts/tsconfig.json b/types/gapi.client.clouduseraccounts/tsconfig.json index a6e3b9ffec..7ef79a3b37 100644 --- a/types/gapi.client.clouduseraccounts/tsconfig.json +++ b/types/gapi.client.clouduseraccounts/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.compute/tsconfig.json b/types/gapi.client.compute/tsconfig.json index 496204435b..f0d8a0d986 100644 --- a/types/gapi.client.compute/tsconfig.json +++ b/types/gapi.client.compute/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.consumersurveys/tsconfig.json b/types/gapi.client.consumersurveys/tsconfig.json index e8c3646083..cd7fe30013 100644 --- a/types/gapi.client.consumersurveys/tsconfig.json +++ b/types/gapi.client.consumersurveys/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.container/tsconfig.json b/types/gapi.client.container/tsconfig.json index 51ff6c98bb..119d6c3ba5 100644 --- a/types/gapi.client.container/tsconfig.json +++ b/types/gapi.client.container/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.content/tsconfig.json b/types/gapi.client.content/tsconfig.json index 566c98a224..032eaa64a4 100644 --- a/types/gapi.client.content/tsconfig.json +++ b/types/gapi.client.content/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.customsearch/tsconfig.json b/types/gapi.client.customsearch/tsconfig.json index 9b5c4f447d..c59bef0b1a 100644 --- a/types/gapi.client.customsearch/tsconfig.json +++ b/types/gapi.client.customsearch/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.dataflow/tsconfig.json b/types/gapi.client.dataflow/tsconfig.json index 08c1fced14..8e23104a37 100644 --- a/types/gapi.client.dataflow/tsconfig.json +++ b/types/gapi.client.dataflow/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.dataproc/tsconfig.json b/types/gapi.client.dataproc/tsconfig.json index 83a765706a..31c48ab1f7 100644 --- a/types/gapi.client.dataproc/tsconfig.json +++ b/types/gapi.client.dataproc/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.datastore/tsconfig.json b/types/gapi.client.datastore/tsconfig.json index a84cddd73f..7fce15fad9 100644 --- a/types/gapi.client.datastore/tsconfig.json +++ b/types/gapi.client.datastore/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.deploymentmanager/tsconfig.json b/types/gapi.client.deploymentmanager/tsconfig.json index 76527cf87c..f2b606045e 100644 --- a/types/gapi.client.deploymentmanager/tsconfig.json +++ b/types/gapi.client.deploymentmanager/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.dfareporting/tsconfig.json b/types/gapi.client.dfareporting/tsconfig.json index 78bcd11678..f5a5e85bff 100644 --- a/types/gapi.client.dfareporting/tsconfig.json +++ b/types/gapi.client.dfareporting/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.discovery/tsconfig.json b/types/gapi.client.discovery/tsconfig.json index b597d1b278..8bdae68cac 100644 --- a/types/gapi.client.discovery/tsconfig.json +++ b/types/gapi.client.discovery/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.dlp/tsconfig.json b/types/gapi.client.dlp/tsconfig.json index b7ab822674..28654dd0d1 100644 --- a/types/gapi.client.dlp/tsconfig.json +++ b/types/gapi.client.dlp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.dns/tsconfig.json b/types/gapi.client.dns/tsconfig.json index 93f3858c6c..032a207928 100644 --- a/types/gapi.client.dns/tsconfig.json +++ b/types/gapi.client.dns/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.doubleclickbidmanager/tsconfig.json b/types/gapi.client.doubleclickbidmanager/tsconfig.json index 1e00b8c904..081c1f2e74 100644 --- a/types/gapi.client.doubleclickbidmanager/tsconfig.json +++ b/types/gapi.client.doubleclickbidmanager/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.doubleclicksearch/tsconfig.json b/types/gapi.client.doubleclicksearch/tsconfig.json index fb0d0a44bd..a76616840d 100644 --- a/types/gapi.client.doubleclicksearch/tsconfig.json +++ b/types/gapi.client.doubleclicksearch/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.drive/tsconfig.json b/types/gapi.client.drive/tsconfig.json index 6d5901b410..05060ca3af 100644 --- a/types/gapi.client.drive/tsconfig.json +++ b/types/gapi.client.drive/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.firebasedynamiclinks/tsconfig.json b/types/gapi.client.firebasedynamiclinks/tsconfig.json index e43d9944a4..9ad2b5eac8 100644 --- a/types/gapi.client.firebasedynamiclinks/tsconfig.json +++ b/types/gapi.client.firebasedynamiclinks/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.firebaseremoteconfig/tsconfig.json b/types/gapi.client.firebaseremoteconfig/tsconfig.json index 9366ffa276..40ed96539d 100644 --- a/types/gapi.client.firebaseremoteconfig/tsconfig.json +++ b/types/gapi.client.firebaseremoteconfig/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.firebaserules/tsconfig.json b/types/gapi.client.firebaserules/tsconfig.json index fe476614b8..981e890c45 100644 --- a/types/gapi.client.firebaserules/tsconfig.json +++ b/types/gapi.client.firebaserules/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.firestore/tsconfig.json b/types/gapi.client.firestore/tsconfig.json index c15195612c..4973b52381 100644 --- a/types/gapi.client.firestore/tsconfig.json +++ b/types/gapi.client.firestore/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.fitness/tsconfig.json b/types/gapi.client.fitness/tsconfig.json index d165e53085..38f88be095 100644 --- a/types/gapi.client.fitness/tsconfig.json +++ b/types/gapi.client.fitness/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.fusiontables/tsconfig.json b/types/gapi.client.fusiontables/tsconfig.json index 74936cb7a6..ccc96c9ba0 100644 --- a/types/gapi.client.fusiontables/tsconfig.json +++ b/types/gapi.client.fusiontables/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.games/tsconfig.json b/types/gapi.client.games/tsconfig.json index d2bbd017e2..c166ca72a7 100644 --- a/types/gapi.client.games/tsconfig.json +++ b/types/gapi.client.games/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.gamesconfiguration/tsconfig.json b/types/gapi.client.gamesconfiguration/tsconfig.json index 66a95276f8..815cced1eb 100644 --- a/types/gapi.client.gamesconfiguration/tsconfig.json +++ b/types/gapi.client.gamesconfiguration/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.gamesmanagement/tsconfig.json b/types/gapi.client.gamesmanagement/tsconfig.json index 91d2485de8..0a7c716384 100644 --- a/types/gapi.client.gamesmanagement/tsconfig.json +++ b/types/gapi.client.gamesmanagement/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.genomics/tsconfig.json b/types/gapi.client.genomics/tsconfig.json index f3814992d0..5ce49ae151 100644 --- a/types/gapi.client.genomics/tsconfig.json +++ b/types/gapi.client.genomics/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.gmail/tsconfig.json b/types/gapi.client.gmail/tsconfig.json index f0a8989f4f..993382c1a5 100644 --- a/types/gapi.client.gmail/tsconfig.json +++ b/types/gapi.client.gmail/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.groupsmigration/tsconfig.json b/types/gapi.client.groupsmigration/tsconfig.json index e790df35fc..f911d8b0d0 100644 --- a/types/gapi.client.groupsmigration/tsconfig.json +++ b/types/gapi.client.groupsmigration/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.groupssettings/tsconfig.json b/types/gapi.client.groupssettings/tsconfig.json index 855b1f2828..cfc7f790d6 100644 --- a/types/gapi.client.groupssettings/tsconfig.json +++ b/types/gapi.client.groupssettings/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.iam/tsconfig.json b/types/gapi.client.iam/tsconfig.json index 4cfc571a22..16013cf2d4 100644 --- a/types/gapi.client.iam/tsconfig.json +++ b/types/gapi.client.iam/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.identitytoolkit/tsconfig.json b/types/gapi.client.identitytoolkit/tsconfig.json index 558805120e..665942fe98 100644 --- a/types/gapi.client.identitytoolkit/tsconfig.json +++ b/types/gapi.client.identitytoolkit/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.kgsearch/tsconfig.json b/types/gapi.client.kgsearch/tsconfig.json index 3dc92ba79b..ea233a6419 100644 --- a/types/gapi.client.kgsearch/tsconfig.json +++ b/types/gapi.client.kgsearch/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.language/tsconfig.json b/types/gapi.client.language/tsconfig.json index 12044b7569..2b9df43adb 100644 --- a/types/gapi.client.language/tsconfig.json +++ b/types/gapi.client.language/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.licensing/tsconfig.json b/types/gapi.client.licensing/tsconfig.json index 2cde1d0a5f..2062e11df6 100644 --- a/types/gapi.client.licensing/tsconfig.json +++ b/types/gapi.client.licensing/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.logging/tsconfig.json b/types/gapi.client.logging/tsconfig.json index 315ea3a5e0..30c1d9cd1c 100644 --- a/types/gapi.client.logging/tsconfig.json +++ b/types/gapi.client.logging/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.manufacturers/tsconfig.json b/types/gapi.client.manufacturers/tsconfig.json index 143de33ad9..a0f3dcb6be 100644 --- a/types/gapi.client.manufacturers/tsconfig.json +++ b/types/gapi.client.manufacturers/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.mirror/tsconfig.json b/types/gapi.client.mirror/tsconfig.json index 3404622c43..52ff31962a 100644 --- a/types/gapi.client.mirror/tsconfig.json +++ b/types/gapi.client.mirror/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.ml/tsconfig.json b/types/gapi.client.ml/tsconfig.json index e665f45a5b..3f8f98f9d3 100644 --- a/types/gapi.client.ml/tsconfig.json +++ b/types/gapi.client.ml/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.monitoring/tsconfig.json b/types/gapi.client.monitoring/tsconfig.json index 4c5c8d9129..0f40410ea1 100644 --- a/types/gapi.client.monitoring/tsconfig.json +++ b/types/gapi.client.monitoring/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.oauth2/tsconfig.json b/types/gapi.client.oauth2/tsconfig.json index 593137d956..e0db730e80 100644 --- a/types/gapi.client.oauth2/tsconfig.json +++ b/types/gapi.client.oauth2/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.oslogin/tsconfig.json b/types/gapi.client.oslogin/tsconfig.json index bcf0faa3cb..d0512f2a9b 100644 --- a/types/gapi.client.oslogin/tsconfig.json +++ b/types/gapi.client.oslogin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.pagespeedonline/tsconfig.json b/types/gapi.client.pagespeedonline/tsconfig.json index 38b680e5ae..a56ae8eb21 100644 --- a/types/gapi.client.pagespeedonline/tsconfig.json +++ b/types/gapi.client.pagespeedonline/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.partners/tsconfig.json b/types/gapi.client.partners/tsconfig.json index cbecfb7e6e..ffcef1527d 100644 --- a/types/gapi.client.partners/tsconfig.json +++ b/types/gapi.client.partners/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.people/tsconfig.json b/types/gapi.client.people/tsconfig.json index 4a64b3a83d..65c26e2e37 100644 --- a/types/gapi.client.people/tsconfig.json +++ b/types/gapi.client.people/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.playcustomapp/tsconfig.json b/types/gapi.client.playcustomapp/tsconfig.json index 432fd7ebe4..933673854d 100644 --- a/types/gapi.client.playcustomapp/tsconfig.json +++ b/types/gapi.client.playcustomapp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.playmoviespartner/tsconfig.json b/types/gapi.client.playmoviespartner/tsconfig.json index 9751ed88eb..3ef754e191 100644 --- a/types/gapi.client.playmoviespartner/tsconfig.json +++ b/types/gapi.client.playmoviespartner/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.plus/tsconfig.json b/types/gapi.client.plus/tsconfig.json index 933d6c865a..576c937104 100644 --- a/types/gapi.client.plus/tsconfig.json +++ b/types/gapi.client.plus/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.plusdomains/tsconfig.json b/types/gapi.client.plusdomains/tsconfig.json index aad16ba9c1..56557f1fe0 100644 --- a/types/gapi.client.plusdomains/tsconfig.json +++ b/types/gapi.client.plusdomains/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.prediction/tsconfig.json b/types/gapi.client.prediction/tsconfig.json index 15c0255ef0..3077afc226 100644 --- a/types/gapi.client.prediction/tsconfig.json +++ b/types/gapi.client.prediction/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.proximitybeacon/tsconfig.json b/types/gapi.client.proximitybeacon/tsconfig.json index 8f240f1352..0615652a78 100644 --- a/types/gapi.client.proximitybeacon/tsconfig.json +++ b/types/gapi.client.proximitybeacon/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.pubsub/tsconfig.json b/types/gapi.client.pubsub/tsconfig.json index c5b386832c..50798418ff 100644 --- a/types/gapi.client.pubsub/tsconfig.json +++ b/types/gapi.client.pubsub/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.qpxexpress/tsconfig.json b/types/gapi.client.qpxexpress/tsconfig.json index 759fd511d6..8d0bc8414b 100644 --- a/types/gapi.client.qpxexpress/tsconfig.json +++ b/types/gapi.client.qpxexpress/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.reseller/tsconfig.json b/types/gapi.client.reseller/tsconfig.json index 62660a16cc..fc68d23c53 100644 --- a/types/gapi.client.reseller/tsconfig.json +++ b/types/gapi.client.reseller/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.resourceviews/tsconfig.json b/types/gapi.client.resourceviews/tsconfig.json index d910ac6b45..1954aa9170 100644 --- a/types/gapi.client.resourceviews/tsconfig.json +++ b/types/gapi.client.resourceviews/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.runtimeconfig/tsconfig.json b/types/gapi.client.runtimeconfig/tsconfig.json index 5e27079b43..f306447ecb 100644 --- a/types/gapi.client.runtimeconfig/tsconfig.json +++ b/types/gapi.client.runtimeconfig/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.safebrowsing/tsconfig.json b/types/gapi.client.safebrowsing/tsconfig.json index 3545ceeab3..d4fef368c8 100644 --- a/types/gapi.client.safebrowsing/tsconfig.json +++ b/types/gapi.client.safebrowsing/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.script/tsconfig.json b/types/gapi.client.script/tsconfig.json index 2ee2653a1f..7d36f916b1 100644 --- a/types/gapi.client.script/tsconfig.json +++ b/types/gapi.client.script/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.searchconsole/tsconfig.json b/types/gapi.client.searchconsole/tsconfig.json index f2e33ebce6..b7e6c12490 100644 --- a/types/gapi.client.searchconsole/tsconfig.json +++ b/types/gapi.client.searchconsole/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.servicecontrol/tsconfig.json b/types/gapi.client.servicecontrol/tsconfig.json index 14d7667280..d49010f92f 100644 --- a/types/gapi.client.servicecontrol/tsconfig.json +++ b/types/gapi.client.servicecontrol/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.servicemanagement/tsconfig.json b/types/gapi.client.servicemanagement/tsconfig.json index c1ec19c789..bf2babb733 100644 --- a/types/gapi.client.servicemanagement/tsconfig.json +++ b/types/gapi.client.servicemanagement/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.serviceuser/tsconfig.json b/types/gapi.client.serviceuser/tsconfig.json index 3213e6fbe7..ca53c7b183 100644 --- a/types/gapi.client.serviceuser/tsconfig.json +++ b/types/gapi.client.serviceuser/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.sheets/tsconfig.json b/types/gapi.client.sheets/tsconfig.json index 23b7d8ecf0..1d3e881b9d 100644 --- a/types/gapi.client.sheets/tsconfig.json +++ b/types/gapi.client.sheets/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.siteverification/tsconfig.json b/types/gapi.client.siteverification/tsconfig.json index a32d7d01b6..a8a7d2ca1a 100644 --- a/types/gapi.client.siteverification/tsconfig.json +++ b/types/gapi.client.siteverification/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.slides/tsconfig.json b/types/gapi.client.slides/tsconfig.json index 94b7cd8068..67cef5659a 100644 --- a/types/gapi.client.slides/tsconfig.json +++ b/types/gapi.client.slides/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.sourcerepo/tsconfig.json b/types/gapi.client.sourcerepo/tsconfig.json index 1b6a4b8191..95662d947f 100644 --- a/types/gapi.client.sourcerepo/tsconfig.json +++ b/types/gapi.client.sourcerepo/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.spanner/tsconfig.json b/types/gapi.client.spanner/tsconfig.json index a4fcfe1835..1a1ff65ad6 100644 --- a/types/gapi.client.spanner/tsconfig.json +++ b/types/gapi.client.spanner/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.spectrum/tsconfig.json b/types/gapi.client.spectrum/tsconfig.json index 6dcfe9f1ea..d011e50d68 100644 --- a/types/gapi.client.spectrum/tsconfig.json +++ b/types/gapi.client.spectrum/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.speech/tsconfig.json b/types/gapi.client.speech/tsconfig.json index 694c7824cb..40c1c0386d 100644 --- a/types/gapi.client.speech/tsconfig.json +++ b/types/gapi.client.speech/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.sqladmin/tsconfig.json b/types/gapi.client.sqladmin/tsconfig.json index a8bd3bb164..3ecdc24928 100644 --- a/types/gapi.client.sqladmin/tsconfig.json +++ b/types/gapi.client.sqladmin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.storage/tsconfig.json b/types/gapi.client.storage/tsconfig.json index 761e1e8caa..c7bea50dd7 100644 --- a/types/gapi.client.storage/tsconfig.json +++ b/types/gapi.client.storage/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.storagetransfer/tsconfig.json b/types/gapi.client.storagetransfer/tsconfig.json index 4eb74edeea..a6fcdaa7fe 100644 --- a/types/gapi.client.storagetransfer/tsconfig.json +++ b/types/gapi.client.storagetransfer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.streetviewpublish/tsconfig.json b/types/gapi.client.streetviewpublish/tsconfig.json index 1e2afe51e0..780af27cc9 100644 --- a/types/gapi.client.streetviewpublish/tsconfig.json +++ b/types/gapi.client.streetviewpublish/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.surveys/tsconfig.json b/types/gapi.client.surveys/tsconfig.json index c0230c586d..75ad3c18bd 100644 --- a/types/gapi.client.surveys/tsconfig.json +++ b/types/gapi.client.surveys/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.tagmanager/tsconfig.json b/types/gapi.client.tagmanager/tsconfig.json index 92a3d1732b..9b9e86b11a 100644 --- a/types/gapi.client.tagmanager/tsconfig.json +++ b/types/gapi.client.tagmanager/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.taskqueue/tsconfig.json b/types/gapi.client.taskqueue/tsconfig.json index 95db41d7b6..ee54bf18cb 100644 --- a/types/gapi.client.taskqueue/tsconfig.json +++ b/types/gapi.client.taskqueue/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.tasks/tsconfig.json b/types/gapi.client.tasks/tsconfig.json index a8ac77689b..7d9fb8a32d 100644 --- a/types/gapi.client.tasks/tsconfig.json +++ b/types/gapi.client.tasks/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.testing/tsconfig.json b/types/gapi.client.testing/tsconfig.json index 88e8341cfb..ab82eee9be 100644 --- a/types/gapi.client.testing/tsconfig.json +++ b/types/gapi.client.testing/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.toolresults/tsconfig.json b/types/gapi.client.toolresults/tsconfig.json index 2e0b9eee8b..7eac8dd678 100644 --- a/types/gapi.client.toolresults/tsconfig.json +++ b/types/gapi.client.toolresults/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.translate/tsconfig.json b/types/gapi.client.translate/tsconfig.json index 6f75322a8d..c677c65b30 100644 --- a/types/gapi.client.translate/tsconfig.json +++ b/types/gapi.client.translate/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.urlshortener/tsconfig.json b/types/gapi.client.urlshortener/tsconfig.json index d66d384a36..91e231c6ae 100644 --- a/types/gapi.client.urlshortener/tsconfig.json +++ b/types/gapi.client.urlshortener/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.vault/tsconfig.json b/types/gapi.client.vault/tsconfig.json index f6f0c61f24..c57aa9ac5e 100644 --- a/types/gapi.client.vault/tsconfig.json +++ b/types/gapi.client.vault/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.videointelligence/tsconfig.json b/types/gapi.client.videointelligence/tsconfig.json index 5db40cf349..4274056d08 100644 --- a/types/gapi.client.videointelligence/tsconfig.json +++ b/types/gapi.client.videointelligence/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.vision/tsconfig.json b/types/gapi.client.vision/tsconfig.json index 300f812220..3db7a9f0ae 100644 --- a/types/gapi.client.vision/tsconfig.json +++ b/types/gapi.client.vision/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.webfonts/tsconfig.json b/types/gapi.client.webfonts/tsconfig.json index 99419f718b..35eb4f3573 100644 --- a/types/gapi.client.webfonts/tsconfig.json +++ b/types/gapi.client.webfonts/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.webmasters/tsconfig.json b/types/gapi.client.webmasters/tsconfig.json index f542550a2f..ed4d12edf2 100644 --- a/types/gapi.client.webmasters/tsconfig.json +++ b/types/gapi.client.webmasters/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.youtube/tsconfig.json b/types/gapi.client.youtube/tsconfig.json index 727bee6a41..69c7503ec1 100644 --- a/types/gapi.client.youtube/tsconfig.json +++ b/types/gapi.client.youtube/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.youtubeanalytics/tsconfig.json b/types/gapi.client.youtubeanalytics/tsconfig.json index 84b8975062..455e3dc970 100644 --- a/types/gapi.client.youtubeanalytics/tsconfig.json +++ b/types/gapi.client.youtubeanalytics/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client.youtubereporting/tsconfig.json b/types/gapi.client.youtubereporting/tsconfig.json index 05e2060796..20524d4d05 100644 --- a/types/gapi.client.youtubereporting/tsconfig.json +++ b/types/gapi.client.youtubereporting/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.client/tsconfig.json b/types/gapi.client/tsconfig.json index 09471da3d2..b0836a651d 100644 --- a/types/gapi.client/tsconfig.json +++ b/types/gapi.client/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/gapi.drive/tsconfig.json b/types/gapi.drive/tsconfig.json index 4e5f340f58..6c3650f3d6 100644 --- a/types/gapi.drive/tsconfig.json +++ b/types/gapi.drive/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gapi.pagespeedonline/tsconfig.json b/types/gapi.pagespeedonline/tsconfig.json index 02963e3afd..352332b6c7 100644 --- a/types/gapi.pagespeedonline/tsconfig.json +++ b/types/gapi.pagespeedonline/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/gapi.people/tsconfig.json b/types/gapi.people/tsconfig.json index 1fbbd65218..371c13635b 100644 --- a/types/gapi.people/tsconfig.json +++ b/types/gapi.people/tsconfig.json @@ -15,6 +15,7 @@ "noImplicitAny": true, "noImplicitThis": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noEmit": true }, "files": [ diff --git a/types/gapi.plus/tsconfig.json b/types/gapi.plus/tsconfig.json index 1ecc447591..90258a43c7 100644 --- a/types/gapi.plus/tsconfig.json +++ b/types/gapi.plus/tsconfig.json @@ -15,6 +15,7 @@ "noImplicitAny": true, "noImplicitThis": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noEmit": true }, "files": [ diff --git a/types/gapi.translate/tsconfig.json b/types/gapi.translate/tsconfig.json index 02963e3afd..352332b6c7 100644 --- a/types/gapi.translate/tsconfig.json +++ b/types/gapi.translate/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/gapi.urlshortener/tsconfig.json b/types/gapi.urlshortener/tsconfig.json index 02963e3afd..352332b6c7 100644 --- a/types/gapi.urlshortener/tsconfig.json +++ b/types/gapi.urlshortener/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/gapi.youtube/tsconfig.json b/types/gapi.youtube/tsconfig.json index 02963e3afd..352332b6c7 100644 --- a/types/gapi.youtube/tsconfig.json +++ b/types/gapi.youtube/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/gapi.youtubeanalytics/tsconfig.json b/types/gapi.youtubeanalytics/tsconfig.json index 02963e3afd..352332b6c7 100644 --- a/types/gapi.youtubeanalytics/tsconfig.json +++ b/types/gapi.youtubeanalytics/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/gapi/tsconfig.json b/types/gapi/tsconfig.json index 18f0162c51..c0518c28b2 100644 --- a/types/gapi/tsconfig.json +++ b/types/gapi/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gaussian/tsconfig.json b/types/gaussian/tsconfig.json index 30e363a435..125874fdd0 100644 --- a/types/gaussian/tsconfig.json +++ b/types/gaussian/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/geetest/tsconfig.json b/types/geetest/tsconfig.json index e1eabe6427..d77714c750 100644 --- a/types/geetest/tsconfig.json +++ b/types/geetest/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "geetest-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/gen-readlines/tsconfig.json b/types/gen-readlines/tsconfig.json index 18d185012c..e33972871a 100644 --- a/types/gen-readlines/tsconfig.json +++ b/types/gen-readlines/tsconfig.json @@ -15,10 +15,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, - "strictFunctionTypes" : true + "esModuleInterop": true, + "strictFunctionTypes": true }, "files": [ "index.d.ts", "gen-readlines-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/generic-functions/tsconfig.json b/types/generic-functions/tsconfig.json index 7476e09445..8194acf8f1 100644 --- a/types/generic-functions/tsconfig.json +++ b/types/generic-functions/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/generic-pool/tsconfig.json b/types/generic-pool/tsconfig.json index 070951dc15..f7814076e4 100644 --- a/types/generic-pool/tsconfig.json +++ b/types/generic-pool/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gently/tsconfig.json b/types/gently/tsconfig.json index 0bb239c702..a204c2dbe2 100644 --- a/types/gently/tsconfig.json +++ b/types/gently/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/geodesy/tsconfig.json b/types/geodesy/tsconfig.json index 3b785b83fb..44f04c33a8 100644 --- a/types/geodesy/tsconfig.json +++ b/types/geodesy/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/geoip-lite/tsconfig.json b/types/geoip-lite/tsconfig.json index 28668d80f3..2048399bfd 100644 --- a/types/geoip-lite/tsconfig.json +++ b/types/geoip-lite/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/geojson/index.d.ts b/types/geojson/index.d.ts index e6783255eb..85f02aaad0 100644 --- a/types/geojson/index.d.ts +++ b/types/geojson/index.d.ts @@ -161,5 +161,6 @@ export interface Feature extend * https://tools.ietf.org/html/rfc7946#section-3.3 */ export interface FeatureCollection extends GeoJsonObject { + type: "FeatureCollection"; features: Array>; } diff --git a/types/geojson/tsconfig.json b/types/geojson/tsconfig.json index 071f17c65d..18526751b5 100644 --- a/types/geojson/tsconfig.json +++ b/types/geojson/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/geojson2osm/tsconfig.json b/types/geojson2osm/tsconfig.json index 98f1b66e4e..b6301a0296 100644 --- a/types/geojson2osm/tsconfig.json +++ b/types/geojson2osm/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/geokdbush/tsconfig.json b/types/geokdbush/tsconfig.json index 655591f4e8..29ef327d5b 100644 --- a/types/geokdbush/tsconfig.json +++ b/types/geokdbush/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/geometry-dom/tsconfig.json b/types/geometry-dom/tsconfig.json index f845e8f11a..ed33cabecd 100644 --- a/types/geometry-dom/tsconfig.json +++ b/types/geometry-dom/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/geopattern/tsconfig.json b/types/geopattern/tsconfig.json index 6804c9374d..ffde596485 100644 --- a/types/geopattern/tsconfig.json +++ b/types/geopattern/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/get-node-dimensions/tsconfig.json b/types/get-node-dimensions/tsconfig.json index 63d26048ed..04ee74158c 100644 --- a/types/get-node-dimensions/tsconfig.json +++ b/types/get-node-dimensions/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/get-port/tsconfig.json b/types/get-port/tsconfig.json index c221d4e9fd..459facdfa8 100644 --- a/types/get-port/tsconfig.json +++ b/types/get-port/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/get-stdin/tsconfig.json b/types/get-stdin/tsconfig.json index 1052b48f11..6c25eedcf8 100644 --- a/types/get-stdin/tsconfig.json +++ b/types/get-stdin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/get-stream/tsconfig.json b/types/get-stream/tsconfig.json index 7d3b35d42d..9c36478bae 100644 --- a/types/get-stream/tsconfig.json +++ b/types/get-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/getos/tsconfig.json b/types/getos/tsconfig.json index fbcc09cf87..7d14fec0fc 100644 --- a/types/getos/tsconfig.json +++ b/types/getos/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gettext.js/tsconfig.json b/types/gettext.js/tsconfig.json index 3812c6244c..87273714e2 100644 --- a/types/gettext.js/tsconfig.json +++ b/types/gettext.js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gifffer/tsconfig.json b/types/gifffer/tsconfig.json index 273e998048..e5d099d008 100644 --- a/types/gifffer/tsconfig.json +++ b/types/gifffer/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "gifffer-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/gijgo/tsconfig.json b/types/gijgo/tsconfig.json index 36530a70b9..6bb0ae1403 100644 --- a/types/gijgo/tsconfig.json +++ b/types/gijgo/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/giraffe/tsconfig.json b/types/giraffe/tsconfig.json index 0602e0fbb5..a469396dd4 100644 --- a/types/giraffe/tsconfig.json +++ b/types/giraffe/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/git-config/tsconfig.json b/types/git-config/tsconfig.json index 48e528d1cc..605c7505c3 100644 --- a/types/git-config/tsconfig.json +++ b/types/git-config/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/git-remote-origin-url/tsconfig.json b/types/git-remote-origin-url/tsconfig.json index 063c49bfe3..9d83cc0c47 100644 --- a/types/git-remote-origin-url/tsconfig.json +++ b/types/git-remote-origin-url/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/git-rev/tsconfig.json b/types/git-rev/tsconfig.json index 95396b43c2..7a8cbf36cf 100644 --- a/types/git-rev/tsconfig.json +++ b/types/git-rev/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/git/tsconfig.json b/types/git/tsconfig.json index 397dfc4ac3..959a2ac25e 100644 --- a/types/git/tsconfig.json +++ b/types/git/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/github-username-regex/tsconfig.json b/types/github-username-regex/tsconfig.json index 4a30cf07ad..4564596c08 100644 --- a/types/github-username-regex/tsconfig.json +++ b/types/github-username-regex/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "github-username-regex-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/gl-matrix/tsconfig.json b/types/gl-matrix/tsconfig.json index ec26405a08..fd83be79a8 100644 --- a/types/gl-matrix/tsconfig.json +++ b/types/gl-matrix/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gldatepicker/tsconfig.json b/types/gldatepicker/tsconfig.json index 93ae16bff0..8d80a4c096 100644 --- a/types/gldatepicker/tsconfig.json +++ b/types/gldatepicker/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/glidejs/tsconfig.json b/types/glidejs/tsconfig.json index 5659d4d355..5d075c7637 100644 --- a/types/glidejs/tsconfig.json +++ b/types/glidejs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/glob-base/tsconfig.json b/types/glob-base/tsconfig.json index b5cd160770..2013ef4332 100644 --- a/types/glob-base/tsconfig.json +++ b/types/glob-base/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/glob-expand/glob-expand-tests.ts b/types/glob-expand/glob-expand-tests.ts index 70275ea0cf..1e61bc0c49 100644 --- a/types/glob-expand/glob-expand-tests.ts +++ b/types/glob-expand/glob-expand-tests.ts @@ -1,5 +1,4 @@ - -import * as expand from "glob-expand"; +import expand = require("glob-expand"); expand({ filter: 'isFile', cwd: '../' }, ['**/*.*', '!exclude/these/**/*.*']); // returns all files in cwd ['file1', 'file2',...] but excluding diff --git a/types/glob-expand/tsconfig.json b/types/glob-expand/tsconfig.json index 4c028e61f8..670f966d8f 100644 --- a/types/glob-expand/tsconfig.json +++ b/types/glob-expand/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/glob-parent/tsconfig.json b/types/glob-parent/tsconfig.json index 1e74b9bc82..ee2853601f 100644 --- a/types/glob-parent/tsconfig.json +++ b/types/glob-parent/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "glob-parent-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/glob-stream/tsconfig.json b/types/glob-stream/tsconfig.json index 06d8e7ca71..c199b4c07c 100644 --- a/types/glob-stream/tsconfig.json +++ b/types/glob-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/glob/tsconfig.json b/types/glob/tsconfig.json index 46faaf718d..8e1cef6b05 100644 --- a/types/glob/tsconfig.json +++ b/types/glob/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/global-tunnel-ng/tsconfig.json b/types/global-tunnel-ng/tsconfig.json index e36f343474..362aca1f3f 100644 --- a/types/global-tunnel-ng/tsconfig.json +++ b/types/global-tunnel-ng/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/globalize-compiler/tsconfig.json b/types/globalize-compiler/tsconfig.json index 7c4ac18956..6c21504dec 100644 --- a/types/globalize-compiler/tsconfig.json +++ b/types/globalize-compiler/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/globalize/tsconfig.json b/types/globalize/tsconfig.json index b83bbf7b09..a05e92e969 100644 --- a/types/globalize/tsconfig.json +++ b/types/globalize/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/globby/globby-tests.ts b/types/globby/globby-tests.ts index 68acb7cde8..1c3c1842d4 100644 --- a/types/globby/globby-tests.ts +++ b/types/globby/globby-tests.ts @@ -1,6 +1,6 @@ import { IOptions } from 'glob'; -import * as globby from "globby"; +import globby = require("globby"); (async () => { let result: string[]; diff --git a/types/globby/tsconfig.json b/types/globby/tsconfig.json index 5cc0a3fe62..3992324f85 100644 --- a/types/globby/tsconfig.json +++ b/types/globby/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/globule/tsconfig.json b/types/globule/tsconfig.json index 9e410fc88b..973d69a02d 100644 --- a/types/globule/tsconfig.json +++ b/types/globule/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gm/tsconfig.json b/types/gm/tsconfig.json index 234c57dbf5..e7b6667e75 100644 --- a/types/gm/tsconfig.json +++ b/types/gm/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/go/tsconfig.json b/types/go/tsconfig.json index 3c8880bab1..02839eea7b 100644 --- a/types/go/tsconfig.json +++ b/types/go/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google-adwords-scripts/tsconfig.json b/types/google-adwords-scripts/tsconfig.json index 748cf4a694..a515e74b27 100644 --- a/types/google-adwords-scripts/tsconfig.json +++ b/types/google-adwords-scripts/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google-apps-script-oauth2/tsconfig.json b/types/google-apps-script-oauth2/tsconfig.json index bc09dd70b9..db6e6d4421 100644 --- a/types/google-apps-script-oauth2/tsconfig.json +++ b/types/google-apps-script-oauth2/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "google-apps-script-oauth2-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/google-apps-script/tsconfig.json b/types/google-apps-script/tsconfig.json index d61786dd17..483cc8d9d7 100644 --- a/types/google-apps-script/tsconfig.json +++ b/types/google-apps-script/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google-closure-compiler/tsconfig.json b/types/google-closure-compiler/tsconfig.json index a4c312936e..5e74e98a7e 100644 --- a/types/google-closure-compiler/tsconfig.json +++ b/types/google-closure-compiler/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google-cloud__datastore/tsconfig.json b/types/google-cloud__datastore/tsconfig.json index a65f9d3218..1fb6feb9ab 100644 --- a/types/google-cloud__datastore/tsconfig.json +++ b/types/google-cloud__datastore/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google-cloud__pubsub/google-cloud__pubsub-tests.ts b/types/google-cloud__pubsub/google-cloud__pubsub-tests.ts index 7a9b9905c2..3d31dd7291 100644 --- a/types/google-cloud__pubsub/google-cloud__pubsub-tests.ts +++ b/types/google-cloud__pubsub/google-cloud__pubsub-tests.ts @@ -1,4 +1,4 @@ -import * as PubSub from '@google-cloud/pubsub'; +import PubSub = require('@google-cloud/pubsub'); // AUTHOR NOTES: We use the examples directly from the library documentation // where possible. If there is a problem with a given example (e.g. undocumented diff --git a/types/google-cloud__pubsub/tsconfig.json b/types/google-cloud__pubsub/tsconfig.json index f71eb2a331..0d2fd84b97 100644 --- a/types/google-cloud__pubsub/tsconfig.json +++ b/types/google-cloud__pubsub/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google-cloud__storage/google-cloud__storage-tests.ts b/types/google-cloud__storage/google-cloud__storage-tests.ts index 24d300b8e6..dec2846f26 100644 --- a/types/google-cloud__storage/google-cloud__storage-tests.ts +++ b/types/google-cloud__storage/google-cloud__storage-tests.ts @@ -26,7 +26,7 @@ import { WriteStreamOptions, UploadOptions } from "@google-cloud/storage"; -import * as CloudStorage from "@google-cloud/storage"; +import CloudStorage = require("@google-cloud/storage"); /** * Test the storage service. diff --git a/types/google-cloud__storage/tsconfig.json b/types/google-cloud__storage/tsconfig.json index fe05cce995..bc37173f6e 100644 --- a/types/google-cloud__storage/tsconfig.json +++ b/types/google-cloud__storage/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google-drive-realtime-api/tsconfig.json b/types/google-drive-realtime-api/tsconfig.json index 17d47ba0dc..0cc6a81613 100644 --- a/types/google-drive-realtime-api/tsconfig.json +++ b/types/google-drive-realtime-api/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google-earth/tsconfig.json b/types/google-earth/tsconfig.json index 1ed0784589..d59ac2953b 100644 --- a/types/google-earth/tsconfig.json +++ b/types/google-earth/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google-images/tsconfig.json b/types/google-images/tsconfig.json index 017e9116b8..9f12194366 100644 --- a/types/google-images/tsconfig.json +++ b/types/google-images/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google-libphonenumber/tsconfig.json b/types/google-libphonenumber/tsconfig.json index e6e1f550b1..39c07d5ffb 100644 --- a/types/google-libphonenumber/tsconfig.json +++ b/types/google-libphonenumber/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google-map-react/index.d.ts b/types/google-map-react/index.d.ts index 037ebb5f13..ec2f08d2ab 100644 --- a/types/google-map-react/index.d.ts +++ b/types/google-map-react/index.d.ts @@ -84,6 +84,7 @@ export interface Props { options?: Options | ((maps: Maps) => Options); margin?: any[]; debounced?: boolean; + draggable?: boolean; layerTypes?: string[]; onClick?(value: ClickEventValue): any; onChange?(value: ChangeEventValue): any; diff --git a/types/google-map-react/tsconfig.json b/types/google-map-react/tsconfig.json index 0fc3a3107f..4f02fa811b 100644 --- a/types/google-map-react/tsconfig.json +++ b/types/google-map-react/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google-maps/tsconfig.json b/types/google-maps/tsconfig.json index e43916774d..606c1d115c 100644 --- a/types/google-maps/tsconfig.json +++ b/types/google-maps/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google-protobuf/tsconfig.json b/types/google-protobuf/tsconfig.json index b20bd4433e..958728f6a6 100644 --- a/types/google-protobuf/tsconfig.json +++ b/types/google-protobuf/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google.analytics/index.d.ts b/types/google.analytics/index.d.ts index b0412a362f..b7d4a8a6f4 100644 --- a/types/google.analytics/index.d.ts +++ b/types/google.analytics/index.d.ts @@ -39,9 +39,8 @@ interface GoogleAnalytics { declare namespace UniversalAnalytics { // https://developers.google.com/analytics/devguides/collection/analyticsjs/method-reference - enum HitType { - 'pageview', 'screenview', 'event', 'transaction', 'item', 'social', 'exception', 'timing' - } + // https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#hitType + type HitType = 'pageview' | 'screenview' | 'event' | 'transaction' | 'item' | 'social' | 'exception' | 'timing'; // https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference @@ -294,7 +293,7 @@ declare namespace UniversalAnalytics { flashVersion?: string; forceSSL?: boolean; hitCallback?(): void; - hitType?: string; + hitType?: HitType; hostname?: string; id?: string; javaEnabled?: boolean; diff --git a/types/google.analytics/tsconfig.json b/types/google.analytics/tsconfig.json index 45e71871b6..a678b0c7e3 100644 --- a/types/google.analytics/tsconfig.json +++ b/types/google.analytics/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google.feeds/tsconfig.json b/types/google.feeds/tsconfig.json index 02963e3afd..352332b6c7 100644 --- a/types/google.feeds/tsconfig.json +++ b/types/google.feeds/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/google.fonts/tsconfig.json b/types/google.fonts/tsconfig.json index c4aa4943d3..4177da42c1 100644 --- a/types/google.fonts/tsconfig.json +++ b/types/google.fonts/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google.geolocation/tsconfig.json b/types/google.geolocation/tsconfig.json index 71c8196435..360cecb0c9 100644 --- a/types/google.geolocation/tsconfig.json +++ b/types/google.geolocation/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google.picker/tsconfig.json b/types/google.picker/tsconfig.json index 33502e21db..ddb1723be6 100644 --- a/types/google.picker/tsconfig.json +++ b/types/google.picker/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/google.visualization/tsconfig.json b/types/google.visualization/tsconfig.json index ad7ea5ef90..4dc584c1d4 100644 --- a/types/google.visualization/tsconfig.json +++ b/types/google.visualization/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/googlemaps.infobubble/tsconfig.json b/types/googlemaps.infobubble/tsconfig.json index 12fd60b566..d1bc655d54 100644 --- a/types/googlemaps.infobubble/tsconfig.json +++ b/types/googlemaps.infobubble/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/googlemaps/tsconfig.json b/types/googlemaps/tsconfig.json index 7cd79e5d79..024177069c 100644 --- a/types/googlemaps/tsconfig.json +++ b/types/googlemaps/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/got/tsconfig.json b/types/got/tsconfig.json index 743441a0b9..f13cc4607a 100644 --- a/types/got/tsconfig.json +++ b/types/got/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/graceful-fs/tsconfig.json b/types/graceful-fs/tsconfig.json index 6c2ec1116e..c3fa569830 100644 --- a/types/graceful-fs/tsconfig.json +++ b/types/graceful-fs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/graceful-fs/v2/tsconfig.json b/types/graceful-fs/v2/tsconfig.json index d22f218ed4..6eb67ef820 100644 --- a/types/graceful-fs/v2/tsconfig.json +++ b/types/graceful-fs/v2/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/graham_scan/tsconfig.json b/types/graham_scan/tsconfig.json index 3a7a6efef0..3cf0c64668 100644 --- a/types/graham_scan/tsconfig.json +++ b/types/graham_scan/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/graphite-udp/tsconfig.json b/types/graphite-udp/tsconfig.json index 936a1657f4..f0804cdc58 100644 --- a/types/graphite-udp/tsconfig.json +++ b/types/graphite-udp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/graphlib/tsconfig.json b/types/graphlib/tsconfig.json index 994651b021..389baac591 100644 --- a/types/graphlib/tsconfig.json +++ b/types/graphlib/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/graphql-date/tsconfig.json b/types/graphql-date/tsconfig.json index c55674e246..603ec788c9 100644 --- a/types/graphql-date/tsconfig.json +++ b/types/graphql-date/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/graphql-iso-date/tsconfig.json b/types/graphql-iso-date/tsconfig.json index 6feabb1388..57320b7caa 100644 --- a/types/graphql-iso-date/tsconfig.json +++ b/types/graphql-iso-date/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "graphql-iso-date-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/graphql-relay/tsconfig.json b/types/graphql-relay/tsconfig.json index bf5b3ba6b6..b94d59db9d 100644 --- a/types/graphql-relay/tsconfig.json +++ b/types/graphql-relay/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/graphql-type-json/tsconfig.json b/types/graphql-type-json/tsconfig.json index 479196f574..5eac54c86a 100644 --- a/types/graphql-type-json/tsconfig.json +++ b/types/graphql-type-json/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/graphql/tsconfig.json b/types/graphql/tsconfig.json index 72f0de0665..29525d3350 100644 --- a/types/graphql/tsconfig.json +++ b/types/graphql/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/graphviz/tsconfig.json b/types/graphviz/tsconfig.json index ec9897523b..74188c2437 100644 --- a/types/graphviz/tsconfig.json +++ b/types/graphviz/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/grasp/grasp-tests.ts b/types/grasp/grasp-tests.ts index 647f57d8fd..87da0b8d45 100644 --- a/types/grasp/grasp-tests.ts +++ b/types/grasp/grasp-tests.ts @@ -1,5 +1,5 @@ import fs = require("fs"); -import * as grasp from "grasp"; +import grasp = require("grasp"); grasp(); // $ExpectError grasp({ args: [] }); // $ExpectType void diff --git a/types/grasp/tsconfig.json b/types/grasp/tsconfig.json index e0996e4408..2a87034f8c 100644 --- a/types/grasp/tsconfig.json +++ b/types/grasp/tsconfig.json @@ -1,16 +1,24 @@ { "compilerOptions": { "module": "commonjs", - "lib": ["es6"], + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, - "files": ["index.d.ts", "grasp-tests.ts"] -} + "files": [ + "index.d.ts", + "grasp-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gravatar-url/tsconfig.json b/types/gravatar-url/tsconfig.json index 8e61e09590..7dc0c7a0d6 100644 --- a/types/gravatar-url/tsconfig.json +++ b/types/gravatar-url/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gravatar/tsconfig.json b/types/gravatar/tsconfig.json index d90f933a40..eade609d2e 100644 --- a/types/gravatar/tsconfig.json +++ b/types/gravatar/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/greasemonkey/tsconfig.json b/types/greasemonkey/tsconfig.json index f051af1bc4..84c32d764f 100644 --- a/types/greasemonkey/tsconfig.json +++ b/types/greasemonkey/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/grecaptcha/tsconfig.json b/types/grecaptcha/tsconfig.json index 0265247984..485acc7e0f 100644 --- a/types/grecaptcha/tsconfig.json +++ b/types/grecaptcha/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/grecaptcha/v0/tsconfig.json b/types/grecaptcha/v0/tsconfig.json index b75ce228e8..af6bc27262 100644 --- a/types/grecaptcha/v0/tsconfig.json +++ b/types/grecaptcha/v0/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gregorian-calendar/tsconfig.json b/types/gregorian-calendar/tsconfig.json index 2cad93c35f..a80ec039b1 100644 --- a/types/gregorian-calendar/tsconfig.json +++ b/types/gregorian-calendar/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gridfs-stream/tsconfig.json b/types/gridfs-stream/tsconfig.json index c6d9bffb02..e3b113310a 100644 --- a/types/gridfs-stream/tsconfig.json +++ b/types/gridfs-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gridstack/tsconfig.json b/types/gridstack/tsconfig.json index 1e4548ab3a..9350c8721c 100644 --- a/types/gridstack/tsconfig.json +++ b/types/gridstack/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/grunt/tsconfig.json b/types/grunt/tsconfig.json index af329ced3c..53469dd2a1 100644 --- a/types/grunt/tsconfig.json +++ b/types/grunt/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gsap/TweenConfig.d.ts b/types/gsap/TweenConfig.d.ts index 59c472bea2..33cde9c6ae 100644 --- a/types/gsap/TweenConfig.d.ts +++ b/types/gsap/TweenConfig.d.ts @@ -1,6 +1,9 @@ declare namespace gsap { export interface TweenConfig { + /** Any tweenable property */ + [p: string]: any; + /** Amount of delay in seconds (or frames for frames-based tweens) before the animation should begin.*/ delay?: number; diff --git a/types/gsap/gsap-tests.ts b/types/gsap/gsap-tests.ts index 048a9d522e..36192141be 100644 --- a/types/gsap/gsap-tests.ts +++ b/types/gsap/gsap-tests.ts @@ -1,8 +1,19 @@ -import { TweenLite } from 'gsap'; +import { TweenLite, TweenMax } from 'gsap'; -const tween = TweenLite +const tweenLiteExample = TweenLite .to(document.getElementById('some-div'), 1, { width: '200px', - height: '200px' + height: '200px', + x: '100px', + y: '200px' }) .seek(0.5); + +const tweenMaxExample = TweenMax + .to(document.getElementById('some-div'), 1, { + width: '200px', + height: '200px', + x: '100px', + y: '200px' + }) + .seek(0.5); diff --git a/types/gsap/index.d.ts b/types/gsap/index.d.ts index cebefcf1c9..77d589603a 100644 --- a/types/gsap/index.d.ts +++ b/types/gsap/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for GSAP 1.19 // Project: http://greensock.com/ -// Definitions by: VILIC VANE , Robert S , Richard Fox +// Definitions by: VILIC VANE , Robert S , Richard Fox , Philip Bulley // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// diff --git a/types/gsap/tsconfig.json b/types/gsap/tsconfig.json index 85301a0877..ee453d0872 100644 --- a/types/gsap/tsconfig.json +++ b/types/gsap/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/guid/tsconfig.json b/types/guid/tsconfig.json index 17563577fd..20c94adc76 100644 --- a/types/guid/tsconfig.json +++ b/types/guid/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "guid-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts b/types/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts index 559dd4f609..706b3acaff 100644 --- a/types/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts +++ b/types/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts @@ -1,5 +1,5 @@ import * as gulp from 'gulp'; -import * as templateCache from 'gulp-angular-templatecache'; +import templateCache = require('gulp-angular-templatecache'); gulp.task('templatecache:no-arguments', function () { return gulp.src('templates/**/*.html') diff --git a/types/gulp-angular-templatecache/tsconfig.json b/types/gulp-angular-templatecache/tsconfig.json index 3971eae080..f5590d4937 100644 --- a/types/gulp-angular-templatecache/tsconfig.json +++ b/types/gulp-angular-templatecache/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-autoprefixer/gulp-autoprefixer-tests.ts b/types/gulp-autoprefixer/gulp-autoprefixer-tests.ts index 386e1a882a..c2d87223b8 100644 --- a/types/gulp-autoprefixer/gulp-autoprefixer-tests.ts +++ b/types/gulp-autoprefixer/gulp-autoprefixer-tests.ts @@ -1,5 +1,5 @@ import * as gulp from "gulp"; -import * as autoprefixer from "gulp-autoprefixer"; +import autoprefixer = require("gulp-autoprefixer"); gulp.src("test.css") .pipe(autoprefixer()) diff --git a/types/gulp-autoprefixer/tsconfig.json b/types/gulp-autoprefixer/tsconfig.json index 52fd74103c..de7d30ff47 100644 --- a/types/gulp-autoprefixer/tsconfig.json +++ b/types/gulp-autoprefixer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-babel/tsconfig.json b/types/gulp-babel/tsconfig.json index e177253e87..8a7d7b25a8 100644 --- a/types/gulp-babel/tsconfig.json +++ b/types/gulp-babel/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-batch/gulp-batch-tests.ts b/types/gulp-batch/gulp-batch-tests.ts index c5936eb031..da0c67e84c 100644 --- a/types/gulp-batch/gulp-batch-tests.ts +++ b/types/gulp-batch/gulp-batch-tests.ts @@ -1,5 +1,5 @@ import * as gulp from "gulp"; -import * as batch from "gulp-batch"; +import batch = require("gulp-batch"); gulp.task('default', () => { gulp.watch([ 'lib/**', 'test/**' ], batch((events: any, cb: any) => { diff --git a/types/gulp-batch/tsconfig.json b/types/gulp-batch/tsconfig.json index 8b5bce2f98..00e877c977 100644 --- a/types/gulp-batch/tsconfig.json +++ b/types/gulp-batch/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/gulp-bump/gulp-bump-tests.ts b/types/gulp-bump/gulp-bump-tests.ts index b15e800a5e..caf5aecf6b 100644 --- a/types/gulp-bump/gulp-bump-tests.ts +++ b/types/gulp-bump/gulp-bump-tests.ts @@ -1,5 +1,5 @@ import * as gulp from 'gulp'; -import * as GulpBump from 'gulp-bump'; +import GulpBump = require('gulp-bump'); gulp .src('package.json') diff --git a/types/gulp-bump/tsconfig.json b/types/gulp-bump/tsconfig.json index 003c952709..cb385de9a7 100644 --- a/types/gulp-bump/tsconfig.json +++ b/types/gulp-bump/tsconfig.json @@ -15,10 +15,11 @@ "strictNullChecks": true, "strictFunctionTypes": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noEmit": true }, "files": [ "index.d.ts", "gulp-bump-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/gulp-cache/gulp-cache-tests.ts b/types/gulp-cache/gulp-cache-tests.ts index 31df7b0259..cc02e95119 100644 --- a/types/gulp-cache/gulp-cache-tests.ts +++ b/types/gulp-cache/gulp-cache-tests.ts @@ -1,6 +1,6 @@ import * as fs from "fs"; import * as gulp from "gulp"; -import * as cache from "gulp-cache"; +import cache = require("gulp-cache"); import File = require("vinyl"); // Some gulp plugin diff --git a/types/gulp-cache/tsconfig.json b/types/gulp-cache/tsconfig.json index e947f63db5..cee084a998 100644 --- a/types/gulp-cache/tsconfig.json +++ b/types/gulp-cache/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-cached/tsconfig.json b/types/gulp-cached/tsconfig.json index cdec085a2b..f7b99d2469 100644 --- a/types/gulp-cached/tsconfig.json +++ b/types/gulp-cached/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-changed/tsconfig.json b/types/gulp-changed/tsconfig.json index d04c43b32e..80c8583bbf 100644 --- a/types/gulp-changed/tsconfig.json +++ b/types/gulp-changed/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-cheerio/tsconfig.json b/types/gulp-cheerio/tsconfig.json index be78d9969c..9d1f810c6c 100644 --- a/types/gulp-cheerio/tsconfig.json +++ b/types/gulp-cheerio/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-clean-dest/tsconfig.json b/types/gulp-clean-dest/tsconfig.json index 777c860568..518b39f91d 100644 --- a/types/gulp-clean-dest/tsconfig.json +++ b/types/gulp-clean-dest/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "gulp-clean-dest-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/gulp-coffeeify/tsconfig.json b/types/gulp-coffeeify/tsconfig.json index 241ff2e5f8..1b5f540107 100644 --- a/types/gulp-coffeeify/tsconfig.json +++ b/types/gulp-coffeeify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-coffeelint/gulp-coffeelint-tests.ts b/types/gulp-coffeelint/gulp-coffeelint-tests.ts index 5d18b98862..0acc0fb9e4 100644 --- a/types/gulp-coffeelint/gulp-coffeelint-tests.ts +++ b/types/gulp-coffeelint/gulp-coffeelint-tests.ts @@ -1,10 +1,6 @@ - - - import coffeelint = require('gulp-coffeelint'); import gulp = require('gulp'); - gulp.task('lint', function () { gulp.src('./src/*.coffee') .pipe(coffeelint()) @@ -52,6 +48,3 @@ gulp.task('lint', function() { .pipe(coffeelint()) .pipe(coffeelint.reporter(myReporter)); }); - - - diff --git a/types/gulp-coffeelint/tsconfig.json b/types/gulp-coffeelint/tsconfig.json index 94e2edb626..695aa2525d 100644 --- a/types/gulp-coffeelint/tsconfig.json +++ b/types/gulp-coffeelint/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-concat/gulp-concat-tests.ts b/types/gulp-concat/gulp-concat-tests.ts index 172aa61451..d1d0ebd1ad 100644 --- a/types/gulp-concat/gulp-concat-tests.ts +++ b/types/gulp-concat/gulp-concat-tests.ts @@ -1,8 +1,5 @@ - - - import gulp = require("gulp"); -import * as concat from "gulp-concat"; +import concat = require("gulp-concat"); gulp.task("concat:simple", () => { gulp.src(["file*.txt"]) diff --git a/types/gulp-concat/tsconfig.json b/types/gulp-concat/tsconfig.json index b28024194c..62d0e3f55f 100644 --- a/types/gulp-concat/tsconfig.json +++ b/types/gulp-concat/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-connect/gulp-connect-tests.ts b/types/gulp-connect/gulp-connect-tests.ts index f1767701b0..ea29d2337d 100644 --- a/types/gulp-connect/gulp-connect-tests.ts +++ b/types/gulp-connect/gulp-connect-tests.ts @@ -89,7 +89,7 @@ gulp.task('connect', () => { // The following tests are custom tests to validate the more complicated APIs // Validate gulp-connect typings allow express apps to be passed in as middleware -import * as express from "express"; +import express = require("express"); gulp.task('connect', () => { const middleware = [ diff --git a/types/gulp-connect/tsconfig.json b/types/gulp-connect/tsconfig.json index fca451bd85..2ec8e07735 100644 --- a/types/gulp-connect/tsconfig.json +++ b/types/gulp-connect/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-copy/gulp-copy-tests.ts b/types/gulp-copy/gulp-copy-tests.ts index f4bc3ac023..0b5d71f646 100644 --- a/types/gulp-copy/gulp-copy-tests.ts +++ b/types/gulp-copy/gulp-copy-tests.ts @@ -1,5 +1,5 @@ import * as gulp from "gulp"; -import * as gulpCopy from "gulp-copy"; +import gulpCopy = require("gulp-copy"); gulp.task("copy-files", () => { gulp.src("*.nonexistent") diff --git a/types/gulp-copy/tsconfig.json b/types/gulp-copy/tsconfig.json index 0c92078d28..69b46a3185 100644 --- a/types/gulp-copy/tsconfig.json +++ b/types/gulp-copy/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-csso/gulp-csso-tests.ts b/types/gulp-csso/gulp-csso-tests.ts index 8595a92ce8..30f693d24d 100644 --- a/types/gulp-csso/gulp-csso-tests.ts +++ b/types/gulp-csso/gulp-csso-tests.ts @@ -1,8 +1,5 @@ - - - import * as gulp from 'gulp'; -import * as csso from 'gulp-csso'; +import csso = require('gulp-csso'); gulp.task('default', () => gulp.src('./main.css') diff --git a/types/gulp-csso/tsconfig.json b/types/gulp-csso/tsconfig.json index d0e22a2035..0f0b1e02fc 100644 --- a/types/gulp-csso/tsconfig.json +++ b/types/gulp-csso/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-debug/gulp-debug-tests.ts b/types/gulp-debug/gulp-debug-tests.ts index d5c8a6d52b..f9ffce748d 100644 --- a/types/gulp-debug/gulp-debug-tests.ts +++ b/types/gulp-debug/gulp-debug-tests.ts @@ -1,8 +1,5 @@ - - - import * as gulp from 'gulp'; -import * as debug from 'gulp-debug'; +import debug = require('gulp-debug'); gulp.task('default', () => gulp.src('foo.js') @@ -10,5 +7,4 @@ gulp.task('default', () => .pipe(gulp.dest('dist')) ); - debug(); diff --git a/types/gulp-debug/tsconfig.json b/types/gulp-debug/tsconfig.json index 3dbd5e8109..1a862e6e1e 100644 --- a/types/gulp-debug/tsconfig.json +++ b/types/gulp-debug/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-diff/gulp-diff-tests.ts b/types/gulp-diff/gulp-diff-tests.ts index 23748d11e8..7c17e5235a 100644 --- a/types/gulp-diff/gulp-diff-tests.ts +++ b/types/gulp-diff/gulp-diff-tests.ts @@ -1,5 +1,5 @@ import * as gulp from 'gulp'; -import * as diff from 'gulp-diff'; +import diff = require('gulp-diff'); gulp.task('task', () => { return gulp.src('src') diff --git a/types/gulp-diff/tsconfig.json b/types/gulp-diff/tsconfig.json index 9e4474532a..82c8e71fb3 100644 --- a/types/gulp-diff/tsconfig.json +++ b/types/gulp-diff/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-dtsm/gulp-dtsm-tests.ts b/types/gulp-dtsm/gulp-dtsm-tests.ts index dafc6b3468..1262a57210 100644 --- a/types/gulp-dtsm/gulp-dtsm-tests.ts +++ b/types/gulp-dtsm/gulp-dtsm-tests.ts @@ -1,4 +1,4 @@ -import * as dtsm from 'gulp-dtsm'; +import dtsm = require('gulp-dtsm'); import * as gulp from 'gulp'; var stream: NodeJS.WritableStream = dtsm(); diff --git a/types/gulp-dtsm/tsconfig.json b/types/gulp-dtsm/tsconfig.json index dd1ca59de4..4e8ddf667c 100644 --- a/types/gulp-dtsm/tsconfig.json +++ b/types/gulp-dtsm/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-espower/gulp-espower-tests.ts b/types/gulp-espower/gulp-espower-tests.ts index 9c04e1d3a0..e06cdda2e8 100644 --- a/types/gulp-espower/gulp-espower-tests.ts +++ b/types/gulp-espower/gulp-espower-tests.ts @@ -1,7 +1,3 @@ - - - - import espower = require('gulp-espower'); import * as gulp from 'gulp'; @@ -9,7 +5,6 @@ gulp.src('src/*.coffee') .pipe(espower()) .pipe(gulp.dest('out')); - gulp.src('src/*.coffee') .pipe(espower({ patterns: ['assert(value, [message])'] })) .pipe(gulp.dest('out')); diff --git a/types/gulp-espower/tsconfig.json b/types/gulp-espower/tsconfig.json index cf469c3b13..720f5897c2 100644 --- a/types/gulp-espower/tsconfig.json +++ b/types/gulp-espower/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-file-include/tsconfig.json b/types/gulp-file-include/tsconfig.json index ab226efcb3..4f8200bc86 100644 --- a/types/gulp-file-include/tsconfig.json +++ b/types/gulp-file-include/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-filter/gulp-filter-tests.ts b/types/gulp-filter/gulp-filter-tests.ts index 903f4083f7..730e6f0ae4 100644 --- a/types/gulp-filter/gulp-filter-tests.ts +++ b/types/gulp-filter/gulp-filter-tests.ts @@ -1,8 +1,8 @@ import * as gulp from 'gulp'; -import * as uglify from 'gulp-uglify'; -import * as less from 'gulp-less'; -import * as concat from 'gulp-concat'; -import * as filter from 'gulp-filter'; +import uglify = require('gulp-uglify'); +import less = require('gulp-less'); +import concat = require('gulp-concat'); +import filter = require('gulp-filter'); // Filter only gulp.task('default', () => { diff --git a/types/gulp-filter/tsconfig.json b/types/gulp-filter/tsconfig.json index f4f7d56d52..6120629011 100644 --- a/types/gulp-filter/tsconfig.json +++ b/types/gulp-filter/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-flatten/gulp-flatten-tests.ts b/types/gulp-flatten/gulp-flatten-tests.ts index 8c89236d61..431b7819a9 100644 --- a/types/gulp-flatten/gulp-flatten-tests.ts +++ b/types/gulp-flatten/gulp-flatten-tests.ts @@ -1,8 +1,5 @@ - - - import * as gulp from "gulp"; -import * as flatten from "gulp-flatten"; +import flatten = require("gulp-flatten"); gulp.task("flatten:simple", () => { gulp.src(["files/**/*.txt"]) diff --git a/types/gulp-flatten/tsconfig.json b/types/gulp-flatten/tsconfig.json index ab4f9a894a..2adbc5747c 100644 --- a/types/gulp-flatten/tsconfig.json +++ b/types/gulp-flatten/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-gh-pages/gulp-gh-pages-tests.ts b/types/gulp-gh-pages/gulp-gh-pages-tests.ts index df527b0023..e541f18508 100644 --- a/types/gulp-gh-pages/gulp-gh-pages-tests.ts +++ b/types/gulp-gh-pages/gulp-gh-pages-tests.ts @@ -1,5 +1,5 @@ import * as gulp from "gulp"; -import * as ghPages from "gulp-gh-pages"; +import ghPages = require("gulp-gh-pages"); gulp.src("test.css") .pipe(ghPages()); diff --git a/types/gulp-gh-pages/tsconfig.json b/types/gulp-gh-pages/tsconfig.json index 1ea7bf2217..3a8f402c8d 100644 --- a/types/gulp-gh-pages/tsconfig.json +++ b/types/gulp-gh-pages/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-gzip/gulp-gzip-tests.ts b/types/gulp-gzip/gulp-gzip-tests.ts index 0a4d125d43..20648e38e1 100644 --- a/types/gulp-gzip/gulp-gzip-tests.ts +++ b/types/gulp-gzip/gulp-gzip-tests.ts @@ -1,6 +1,3 @@ - - - import gulp = require('gulp'); import gzip = require('gulp-gzip'); diff --git a/types/gulp-gzip/tsconfig.json b/types/gulp-gzip/tsconfig.json index 4f3f5f8d77..0bdb09cd02 100644 --- a/types/gulp-gzip/tsconfig.json +++ b/types/gulp-gzip/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-help-doc/tsconfig.json b/types/gulp-help-doc/tsconfig.json index b6f16b60a9..997b774603 100644 --- a/types/gulp-help-doc/tsconfig.json +++ b/types/gulp-help-doc/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-help/tsconfig.json b/types/gulp-help/tsconfig.json index a174bbab6e..a525512784 100644 --- a/types/gulp-help/tsconfig.json +++ b/types/gulp-help/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-html-replace/gulp-html-replace-tests.ts b/types/gulp-html-replace/gulp-html-replace-tests.ts index 9a21a53b84..ca1e66c680 100644 --- a/types/gulp-html-replace/gulp-html-replace-tests.ts +++ b/types/gulp-html-replace/gulp-html-replace-tests.ts @@ -1,5 +1,5 @@ import * as gulp from 'gulp'; -import * as htmlreplace from 'gulp-html-replace'; +import htmlreplace = require('gulp-html-replace'); // Examples taken from README.md of the gulp-html-replace project: // https://www.npmjs.com/package/gulp-html-replace diff --git a/types/gulp-html-replace/tsconfig.json b/types/gulp-html-replace/tsconfig.json index fcf17ed178..f21adbe57d 100644 --- a/types/gulp-html-replace/tsconfig.json +++ b/types/gulp-html-replace/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-htmlmin/gulp-htmlmin-tests.ts b/types/gulp-htmlmin/gulp-htmlmin-tests.ts index 29c3bcd4fe..e0ca8be7cd 100644 --- a/types/gulp-htmlmin/gulp-htmlmin-tests.ts +++ b/types/gulp-htmlmin/gulp-htmlmin-tests.ts @@ -1,8 +1,5 @@ - - - import * as gulp from 'gulp'; -import * as htmlmin from 'gulp-htmlmin'; +import htmlmin = require('gulp-htmlmin'); gulp.task('minify', function() { return gulp.src('src/*.html') diff --git a/types/gulp-htmlmin/tsconfig.json b/types/gulp-htmlmin/tsconfig.json index 022acde96e..e426cd715f 100644 --- a/types/gulp-htmlmin/tsconfig.json +++ b/types/gulp-htmlmin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-if/tsconfig.json b/types/gulp-if/tsconfig.json index bb2544820b..777df7124c 100644 --- a/types/gulp-if/tsconfig.json +++ b/types/gulp-if/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-inject/gulp-inject-tests.ts b/types/gulp-inject/gulp-inject-tests.ts index ef29ebc343..d57756ccfa 100644 --- a/types/gulp-inject/gulp-inject-tests.ts +++ b/types/gulp-inject/gulp-inject-tests.ts @@ -1,8 +1,5 @@ - - - import * as gulp from "gulp"; -import * as inject from "gulp-inject"; +import inject = require("gulp-inject"); gulp.task("inject:simple", () => { gulp.src("src/index.html") diff --git a/types/gulp-inject/tsconfig.json b/types/gulp-inject/tsconfig.json index aacadf6415..2af1ab9827 100644 --- a/types/gulp-inject/tsconfig.json +++ b/types/gulp-inject/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-insert/tsconfig.json b/types/gulp-insert/tsconfig.json index 6feda660ed..89c69015ed 100644 --- a/types/gulp-insert/tsconfig.json +++ b/types/gulp-insert/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-install/gulp-install-tests.ts b/types/gulp-install/gulp-install-tests.ts index b822b42706..85b1f6ee1b 100644 --- a/types/gulp-install/gulp-install-tests.ts +++ b/types/gulp-install/gulp-install-tests.ts @@ -1,8 +1,5 @@ - - - import * as gulp from 'gulp'; -import * as install from 'gulp-install'; +import install = require('gulp-install'); // Examples taken from https://www.npmjs.com/package/gulp-install diff --git a/types/gulp-install/tsconfig.json b/types/gulp-install/tsconfig.json index e1b6063ac9..5576cb02ae 100644 --- a/types/gulp-install/tsconfig.json +++ b/types/gulp-install/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-istanbul/tsconfig.json b/types/gulp-istanbul/tsconfig.json index 133f0cd935..a73367da09 100644 --- a/types/gulp-istanbul/tsconfig.json +++ b/types/gulp-istanbul/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-jade/gulp-jade-tests.ts b/types/gulp-jade/gulp-jade-tests.ts index f184184573..e43917f597 100644 --- a/types/gulp-jade/gulp-jade-tests.ts +++ b/types/gulp-jade/gulp-jade-tests.ts @@ -1,5 +1,5 @@ import * as gulp from 'gulp'; -import * as jade from 'gulp-jade'; +import jade = require('gulp-jade'); gulp.task('jade', () => { gulp.src('src/**/*.jade') diff --git a/types/gulp-jade/tsconfig.json b/types/gulp-jade/tsconfig.json index 7e924cb11b..aa9260a7c4 100644 --- a/types/gulp-jade/tsconfig.json +++ b/types/gulp-jade/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-jasmine-browser/gulp-jasmine-browser-tests.ts b/types/gulp-jasmine-browser/gulp-jasmine-browser-tests.ts index db219148d3..ba2584a2a0 100644 --- a/types/gulp-jasmine-browser/gulp-jasmine-browser-tests.ts +++ b/types/gulp-jasmine-browser/gulp-jasmine-browser-tests.ts @@ -1,6 +1,3 @@ - - - import gulp = require('gulp'); import jasmineBrowser = require('gulp-jasmine-browser'); @@ -10,21 +7,18 @@ gulp.task('jasmine', () => .pipe(jasmineBrowser.server({port: 8888})) ); - gulp.task('jasmine-phantom', () => gulp.src(['src/**/*.js', 'spec/**/*_spec.js']) .pipe(jasmineBrowser.specRunner({console: true})) .pipe(jasmineBrowser.headless()) ); - gulp.task('jasmine-slimerjs', () => gulp.src(['src/**/*.js', 'spec/**/*_spec.js']) .pipe(jasmineBrowser.specRunner({console: true})) .pipe(jasmineBrowser.headless({driver: 'slimerjs'})) ); - gulp.task('jasmine', () => gulp.src('spec/**/*_spec.js') .pipe(jasmineBrowser.specRunner()) diff --git a/types/gulp-jasmine-browser/tsconfig.json b/types/gulp-jasmine-browser/tsconfig.json index 55990f3261..3e09f9571f 100644 --- a/types/gulp-jasmine-browser/tsconfig.json +++ b/types/gulp-jasmine-browser/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-jasmine/tsconfig.json b/types/gulp-jasmine/tsconfig.json index d44751f20b..4fc991e2ef 100644 --- a/types/gulp-jasmine/tsconfig.json +++ b/types/gulp-jasmine/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "gulp-jasmine-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/gulp-json-editor/gulp-json-editor-tests.ts b/types/gulp-json-editor/gulp-json-editor-tests.ts index 67176063de..c4fc082360 100644 --- a/types/gulp-json-editor/gulp-json-editor-tests.ts +++ b/types/gulp-json-editor/gulp-json-editor-tests.ts @@ -1,8 +1,5 @@ - - - import * as gulp from 'gulp'; -import * as jeditor from 'gulp-json-editor'; +import jeditor = require('gulp-json-editor'); // Samples taken from https://www.npmjs.com/package/gulp-json-editor diff --git a/types/gulp-json-editor/tsconfig.json b/types/gulp-json-editor/tsconfig.json index 4f224b2a01..612fbf802c 100644 --- a/types/gulp-json-editor/tsconfig.json +++ b/types/gulp-json-editor/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-jsonminify/gulp-jsonminify-tests.ts b/types/gulp-jsonminify/gulp-jsonminify-tests.ts index 23008bad7e..c158f83627 100644 --- a/types/gulp-jsonminify/gulp-jsonminify-tests.ts +++ b/types/gulp-jsonminify/gulp-jsonminify-tests.ts @@ -1,5 +1,5 @@ import * as gulp from 'gulp'; -import * as jsonminify from 'gulp-jsonminify'; +import jsonminify = require('gulp-jsonminify'); gulp.task('minify', () => { return gulp.src('src/*.json') diff --git a/types/gulp-jsonminify/tsconfig.json b/types/gulp-jsonminify/tsconfig.json index 0b6036c600..956c8eab43 100644 --- a/types/gulp-jsonminify/tsconfig.json +++ b/types/gulp-jsonminify/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "gulp-jsonminify-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/gulp-jspm/gulp-jspm-tests.ts b/types/gulp-jspm/gulp-jspm-tests.ts index 5f3e0812f1..f2c5c4d4e9 100644 --- a/types/gulp-jspm/gulp-jspm-tests.ts +++ b/types/gulp-jspm/gulp-jspm-tests.ts @@ -1,8 +1,5 @@ - - - import * as gulp from 'gulp'; -import * as gulpJspm from 'gulp-jspm'; +import gulpJspm = require('gulp-jspm'); // Examples taken from https://www.npmjs.com/package/gulp-jspm gulp.task('default', function(){ @@ -26,7 +23,7 @@ gulp.src('src/main.jsx') gulp.src('src/main.jsx') .pipe(gulpJspm({plugin: 'jsx'})) // `jspm bundle main.jsx!jsx` .pipe(gulp.dest('build/')); - + // all other options given to gulp-jspm are passed on to jspm, e.g. gulp.src('src/main.js') .pipe(gulpJspm({inject: true})) // `jspm bundle main --inject` diff --git a/types/gulp-jspm/tsconfig.json b/types/gulp-jspm/tsconfig.json index b612a0a146..c5e89286e7 100644 --- a/types/gulp-jspm/tsconfig.json +++ b/types/gulp-jspm/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-less/gulp-less-tests.ts b/types/gulp-less/gulp-less-tests.ts index bd5335d80e..a5ac36c508 100644 --- a/types/gulp-less/gulp-less-tests.ts +++ b/types/gulp-less/gulp-less-tests.ts @@ -1,8 +1,5 @@ - - - import * as gulp from "gulp"; -import * as less from "gulp-less"; +import less = require("gulp-less"); // Without options gulp.task("less", () => { diff --git a/types/gulp-less/tsconfig.json b/types/gulp-less/tsconfig.json index e4c00666f5..24266e4482 100644 --- a/types/gulp-less/tsconfig.json +++ b/types/gulp-less/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-load-plugins/gulp-load-plugins-tests.ts b/types/gulp-load-plugins/gulp-load-plugins-tests.ts index a0cff649ec..4f118a0688 100644 --- a/types/gulp-load-plugins/gulp-load-plugins-tests.ts +++ b/types/gulp-load-plugins/gulp-load-plugins-tests.ts @@ -1,6 +1,6 @@ import * as gulp from 'gulp'; -import * as gulpConcat from 'gulp-concat'; -import * as gulpLoadPlugins from 'gulp-load-plugins'; +import gulpConcat = require('gulp-concat'); +import gulpLoadPlugins = require('gulp-load-plugins'); interface GulpPlugins extends IGulpPlugins { concat: typeof gulpConcat; diff --git a/types/gulp-load-plugins/tsconfig.json b/types/gulp-load-plugins/tsconfig.json index 880ad1acd1..44c98dfb1d 100644 --- a/types/gulp-load-plugins/tsconfig.json +++ b/types/gulp-load-plugins/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-minify-css/gulp-minify-css-tests.ts b/types/gulp-minify-css/gulp-minify-css-tests.ts index 597111d30c..9de00a3ae8 100644 --- a/types/gulp-minify-css/gulp-minify-css-tests.ts +++ b/types/gulp-minify-css/gulp-minify-css-tests.ts @@ -1,8 +1,5 @@ - - - import * as gulp from "gulp"; -import * as minifyCSS from "gulp-minify-css"; +import minifyCSS = require("gulp-minify-css"); gulp.task("minify-css", () => { gulp.src("css/**/*.css") diff --git a/types/gulp-minify-css/tsconfig.json b/types/gulp-minify-css/tsconfig.json index ccb2e4b319..08ddc4b6de 100644 --- a/types/gulp-minify-css/tsconfig.json +++ b/types/gulp-minify-css/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-minify-html/gulp-minify-html-tests.ts b/types/gulp-minify-html/gulp-minify-html-tests.ts index fd27474de2..5071348899 100644 --- a/types/gulp-minify-html/gulp-minify-html-tests.ts +++ b/types/gulp-minify-html/gulp-minify-html-tests.ts @@ -1,8 +1,5 @@ - - - import * as gulp from 'gulp'; -import * as minifyHtml from 'gulp-minify-html'; +import minifyHtml = require('gulp-minify-html'); // This package has been deprecated in favor of gulp-htmlmin, which should be faster and more comprehensive. diff --git a/types/gulp-minify-html/tsconfig.json b/types/gulp-minify-html/tsconfig.json index 80ef59bff4..5594b9006d 100644 --- a/types/gulp-minify-html/tsconfig.json +++ b/types/gulp-minify-html/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-mocha/gulp-mocha-tests.ts b/types/gulp-mocha/gulp-mocha-tests.ts index c84d710380..d007900825 100644 --- a/types/gulp-mocha/gulp-mocha-tests.ts +++ b/types/gulp-mocha/gulp-mocha-tests.ts @@ -1,5 +1,5 @@ import * as gulp from "gulp"; -import * as mocha from "gulp-mocha"; +import mocha = require("gulp-mocha"); gulp.task('default', function () { return gulp.src('test.js', {read: false}) diff --git a/types/gulp-mocha/tsconfig.json b/types/gulp-mocha/tsconfig.json index 52b200e921..0e919fbac5 100644 --- a/types/gulp-mocha/tsconfig.json +++ b/types/gulp-mocha/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-modernizr/gulp-modernizr-tests.ts b/types/gulp-modernizr/gulp-modernizr-tests.ts index a29f642d7f..8c5b4c0e31 100644 --- a/types/gulp-modernizr/gulp-modernizr-tests.ts +++ b/types/gulp-modernizr/gulp-modernizr-tests.ts @@ -1,5 +1,5 @@ import { src, dest } from 'gulp'; -import * as gulpModernizr from 'gulp-modernizr'; +import gulpModernizr = require('gulp-modernizr'); const s1 = gulpModernizr(); const s2 = gulpModernizr('filename.js', {}); diff --git a/types/gulp-modernizr/tsconfig.json b/types/gulp-modernizr/tsconfig.json index a2f50619a3..4c28752668 100644 --- a/types/gulp-modernizr/tsconfig.json +++ b/types/gulp-modernizr/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-msbuild/gulp-msbuild-tests.ts b/types/gulp-msbuild/gulp-msbuild-tests.ts index f9e5ce053b..386746c0de 100644 --- a/types/gulp-msbuild/gulp-msbuild-tests.ts +++ b/types/gulp-msbuild/gulp-msbuild-tests.ts @@ -1,4 +1,4 @@ -import * as msbuild from "gulp-msbuild"; +import msbuild = require("gulp-msbuild"); const stream = msbuild({ stdout: false, diff --git a/types/gulp-msbuild/tsconfig.json b/types/gulp-msbuild/tsconfig.json index e999f3b231..560d597b85 100644 --- a/types/gulp-msbuild/tsconfig.json +++ b/types/gulp-msbuild/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-mustache/gulp-mustache-tests.ts b/types/gulp-mustache/gulp-mustache-tests.ts index c069a1dd02..d8285370e7 100644 --- a/types/gulp-mustache/gulp-mustache-tests.ts +++ b/types/gulp-mustache/gulp-mustache-tests.ts @@ -1,5 +1,4 @@ -import * as mustache from "gulp-mustache"; -// noinspection ES6UnusedImports +import mustache = require("gulp-mustache"); import { Transform } from "stream"; mustache({ // $ExpectType Transform diff --git a/types/gulp-mustache/tsconfig.json b/types/gulp-mustache/tsconfig.json index f461c5d525..4ebb11f698 100644 --- a/types/gulp-mustache/tsconfig.json +++ b/types/gulp-mustache/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-newer/tsconfig.json b/types/gulp-newer/tsconfig.json index c139e12412..c5d2ed8894 100644 --- a/types/gulp-newer/tsconfig.json +++ b/types/gulp-newer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-ng-annotate/gulp-ng-annotate-tests.ts b/types/gulp-ng-annotate/gulp-ng-annotate-tests.ts index ea48672fb0..6116b87ad2 100644 --- a/types/gulp-ng-annotate/gulp-ng-annotate-tests.ts +++ b/types/gulp-ng-annotate/gulp-ng-annotate-tests.ts @@ -1,6 +1,3 @@ - - - import ngAnnotate = require('gulp-ng-annotate'); import gulp = require('gulp'); diff --git a/types/gulp-ng-annotate/tsconfig.json b/types/gulp-ng-annotate/tsconfig.json index 1b7db8f980..7a35fde2b9 100644 --- a/types/gulp-ng-annotate/tsconfig.json +++ b/types/gulp-ng-annotate/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-nodemon/gulp-nodemon-tests.ts b/types/gulp-nodemon/gulp-nodemon-tests.ts index 364536f778..85e90a667b 100644 --- a/types/gulp-nodemon/gulp-nodemon-tests.ts +++ b/types/gulp-nodemon/gulp-nodemon-tests.ts @@ -1,6 +1,3 @@ - - - import gulp = require('gulp'); import path = require('path'); import nodemon = require('gulp-nodemon'); @@ -29,6 +26,8 @@ nodemon({ }); return tasks } + , nodeArgs: ['--trace-warnings'] + , args: ['-t'] }); diff --git a/types/gulp-nodemon/index.d.ts b/types/gulp-nodemon/index.d.ts index 7c5491f596..de08560463 100644 --- a/types/gulp-nodemon/index.d.ts +++ b/types/gulp-nodemon/index.d.ts @@ -69,6 +69,9 @@ declare namespace nodemon { execMap?: { [key: string]: string | boolean | number; }; events?: { [key: string]: string; }; restartable?: string; + args?: string[]; + nodeArgs?: string[]; + scriptPosition?: number; } interface EventEmitter extends NodeJS.EventEmitter { diff --git a/types/gulp-nodemon/tsconfig.json b/types/gulp-nodemon/tsconfig.json index af6e7a7991..5ff166eae3 100644 --- a/types/gulp-nodemon/tsconfig.json +++ b/types/gulp-nodemon/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-nunit-runner/gulp-nunit-runner-tests.ts b/types/gulp-nunit-runner/gulp-nunit-runner-tests.ts index 0e55fef37a..ea571c3cf8 100644 --- a/types/gulp-nunit-runner/gulp-nunit-runner-tests.ts +++ b/types/gulp-nunit-runner/gulp-nunit-runner-tests.ts @@ -1,4 +1,4 @@ -import * as nunit from "gulp-nunit-runner"; +import nunit = require("gulp-nunit-runner"); const stream = nunit({ executable: 'c:/Program Files/NUnit/bin', diff --git a/types/gulp-nunit-runner/tsconfig.json b/types/gulp-nunit-runner/tsconfig.json index 97a0a7a8cb..e7daea0b13 100644 --- a/types/gulp-nunit-runner/tsconfig.json +++ b/types/gulp-nunit-runner/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-plumber/tsconfig.json b/types/gulp-plumber/tsconfig.json index ad53d6fde5..a483c3197e 100644 --- a/types/gulp-plumber/tsconfig.json +++ b/types/gulp-plumber/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-protractor/gulp-protractor-tests.ts b/types/gulp-protractor/gulp-protractor-tests.ts index 77d31e2bea..c79ac9220c 100644 --- a/types/gulp-protractor/gulp-protractor-tests.ts +++ b/types/gulp-protractor/gulp-protractor-tests.ts @@ -1,6 +1,3 @@ - - - import gulp = require('gulp'); import protractor = require('gulp-protractor'); diff --git a/types/gulp-protractor/tsconfig.json b/types/gulp-protractor/tsconfig.json index bb39acdbdc..758e915a22 100644 --- a/types/gulp-protractor/tsconfig.json +++ b/types/gulp-protractor/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-pug/gulp-pug-tests.ts b/types/gulp-pug/gulp-pug-tests.ts index 0ec83a248f..1ba56b91e4 100644 --- a/types/gulp-pug/gulp-pug-tests.ts +++ b/types/gulp-pug/gulp-pug-tests.ts @@ -1,5 +1,5 @@ import { src, dest } from 'gulp'; -import * as gulpPug from 'gulp-pug'; +import gulpPug = require('gulp-pug'); const s1 = gulpPug(); const s2 = gulpPug({}); diff --git a/types/gulp-pug/tsconfig.json b/types/gulp-pug/tsconfig.json index b3b2597c1e..c52e2c9cf0 100644 --- a/types/gulp-pug/tsconfig.json +++ b/types/gulp-pug/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-remember/tsconfig.json b/types/gulp-remember/tsconfig.json index 02070e1b82..c3b4e15c77 100644 --- a/types/gulp-remember/tsconfig.json +++ b/types/gulp-remember/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-rename/tsconfig.json b/types/gulp-rename/tsconfig.json index b9b34366ee..3c33e8adf4 100644 --- a/types/gulp-rename/tsconfig.json +++ b/types/gulp-rename/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-replace/gulp-replace-tests.ts b/types/gulp-replace/gulp-replace-tests.ts index 6a17057495..79f77b93a9 100644 --- a/types/gulp-replace/gulp-replace-tests.ts +++ b/types/gulp-replace/gulp-replace-tests.ts @@ -1,5 +1,5 @@ import * as gulp from "gulp"; -import * as replace from "gulp-replace"; +import replace = require("gulp-replace"); gulp.task('templates', function(){ gulp.src(['file.txt']) diff --git a/types/gulp-replace/tsconfig.json b/types/gulp-replace/tsconfig.json index 5d188a1919..81dc6799cb 100644 --- a/types/gulp-replace/tsconfig.json +++ b/types/gulp-replace/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-rev-replace/gulp-rev-replace-tests.ts b/types/gulp-rev-replace/gulp-rev-replace-tests.ts index 2d7e5a3580..3d191811bb 100644 --- a/types/gulp-rev-replace/gulp-rev-replace-tests.ts +++ b/types/gulp-rev-replace/gulp-rev-replace-tests.ts @@ -1,7 +1,7 @@ import * as gulp from 'gulp'; -import * as revReplace from 'gulp-rev-replace'; -import * as rev from 'gulp-rev'; -import * as useref from 'gulp-useref'; +import revReplace = require('gulp-rev-replace'); +import rev = require('gulp-rev'); +import useref = require('gulp-useref'); gulp.task("index", () => { return gulp.src("src/index.html") diff --git a/types/gulp-rev-replace/tsconfig.json b/types/gulp-rev-replace/tsconfig.json index c9a020605c..54babfcd8a 100644 --- a/types/gulp-rev-replace/tsconfig.json +++ b/types/gulp-rev-replace/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-rev/gulp-rev-tests.ts b/types/gulp-rev/gulp-rev-tests.ts index c13b23fc71..c19616de11 100644 --- a/types/gulp-rev/gulp-rev-tests.ts +++ b/types/gulp-rev/gulp-rev-tests.ts @@ -1,6 +1,3 @@ - - - import gulp = require('gulp'); import rev = require('gulp-rev'); diff --git a/types/gulp-rev/tsconfig.json b/types/gulp-rev/tsconfig.json index fac8396ef8..c5ca988faa 100644 --- a/types/gulp-rev/tsconfig.json +++ b/types/gulp-rev/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-ruby-sass/gulp-ruby-sass-tests.ts b/types/gulp-ruby-sass/gulp-ruby-sass-tests.ts index 69346a16d8..70a034bd68 100644 --- a/types/gulp-ruby-sass/gulp-ruby-sass-tests.ts +++ b/types/gulp-ruby-sass/gulp-ruby-sass-tests.ts @@ -1,5 +1,5 @@ import * as gulp from "gulp"; -import * as sass from "gulp-ruby-sass"; +import sass = require("gulp-ruby-sass"); gulp.task('sass', function () { sass('./scss/*.scss') diff --git a/types/gulp-ruby-sass/tsconfig.json b/types/gulp-ruby-sass/tsconfig.json index 947482e45c..562b5e91b4 100644 --- a/types/gulp-ruby-sass/tsconfig.json +++ b/types/gulp-ruby-sass/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-sass/gulp-sass-tests.ts b/types/gulp-sass/gulp-sass-tests.ts index 72192512a7..5bed46d938 100644 --- a/types/gulp-sass/gulp-sass-tests.ts +++ b/types/gulp-sass/gulp-sass-tests.ts @@ -1,5 +1,5 @@ import gulp = require("gulp"); -import * as sass from "gulp-sass"; +import sass = require("gulp-sass"); gulp.task('sass', function () { gulp.src('./scss/*.scss') diff --git a/types/gulp-sass/tsconfig.json b/types/gulp-sass/tsconfig.json index 311d0e2615..62e7bfb40f 100644 --- a/types/gulp-sass/tsconfig.json +++ b/types/gulp-sass/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-shell/tsconfig.json b/types/gulp-shell/tsconfig.json index d9797a8f28..4d73d765dd 100644 --- a/types/gulp-shell/tsconfig.json +++ b/types/gulp-shell/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-size/gulp-size-tests.ts b/types/gulp-size/gulp-size-tests.ts index bd53018d6a..f978842201 100644 --- a/types/gulp-size/gulp-size-tests.ts +++ b/types/gulp-size/gulp-size-tests.ts @@ -1,6 +1,6 @@ import * as gulp from 'gulp'; -import * as size from 'gulp-size'; -import * as debug from 'gulp-debug'; +import size = require('gulp-size'); +import debug = require('gulp-debug'); gulp.task('default', () => gulp.src('fixture.js') diff --git a/types/gulp-size/tsconfig.json b/types/gulp-size/tsconfig.json index 2d84cb001c..ee2d5f0bc9 100644 --- a/types/gulp-size/tsconfig.json +++ b/types/gulp-size/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-sort/gulp-sort-tests.ts b/types/gulp-sort/gulp-sort-tests.ts index 62e17d27a2..e3cf64f429 100644 --- a/types/gulp-sort/gulp-sort-tests.ts +++ b/types/gulp-sort/gulp-sort-tests.ts @@ -1,7 +1,7 @@ /** Tests taken from https://github.com/pgilad/gulp-sort#usage */ import * as gulp from 'gulp'; -import * as sort from 'gulp-sort'; +import sort = require('gulp-sort'); import * as gulpUtil from 'gulp-util'; // default sort diff --git a/types/gulp-sort/tsconfig.json b/types/gulp-sort/tsconfig.json index df1ddc44e4..19cd0ffa81 100644 --- a/types/gulp-sort/tsconfig.json +++ b/types/gulp-sort/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-sourcemaps/tsconfig.json b/types/gulp-sourcemaps/tsconfig.json index 198b428937..fd79ffc3b1 100644 --- a/types/gulp-sourcemaps/tsconfig.json +++ b/types/gulp-sourcemaps/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-strip-debug/gulp-strip-debug-tests.ts b/types/gulp-strip-debug/gulp-strip-debug-tests.ts index 9a0b04e48a..0e8b6c1a8b 100644 --- a/types/gulp-strip-debug/gulp-strip-debug-tests.ts +++ b/types/gulp-strip-debug/gulp-strip-debug-tests.ts @@ -1,8 +1,5 @@ - - - import * as gulp from 'gulp'; -import * as stripDebug from 'gulp-strip-debug'; +import stripDebug = require('gulp-strip-debug'); // Example taken from https://www.npmjs.com/package/gulp-strip-debug gulp.task('default', function () { diff --git a/types/gulp-strip-debug/tsconfig.json b/types/gulp-strip-debug/tsconfig.json index ad5d90ca69..6e8ef33fc2 100644 --- a/types/gulp-strip-debug/tsconfig.json +++ b/types/gulp-strip-debug/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-svg-sprite/tsconfig.json b/types/gulp-svg-sprite/tsconfig.json index ed703e4c09..edfff724d1 100644 --- a/types/gulp-svg-sprite/tsconfig.json +++ b/types/gulp-svg-sprite/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-task-listing/tsconfig.json b/types/gulp-task-listing/tsconfig.json index 6d99b2f3f2..2b580f1f5f 100644 --- a/types/gulp-task-listing/tsconfig.json +++ b/types/gulp-task-listing/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-tsd/gulp-tsd-tests.ts b/types/gulp-tsd/gulp-tsd-tests.ts index 0b7a1dadea..e593ec2634 100644 --- a/types/gulp-tsd/gulp-tsd-tests.ts +++ b/types/gulp-tsd/gulp-tsd-tests.ts @@ -1,8 +1,5 @@ - - - import * as gulp from "gulp"; -import * as tsd from "gulp-tsd"; +import tsd = require("gulp-tsd"); gulp.task("tsd", () => { gulp.src("gulp_tsd.json") diff --git a/types/gulp-tsd/tsconfig.json b/types/gulp-tsd/tsconfig.json index 692c21e642..3ede2690c5 100644 --- a/types/gulp-tsd/tsconfig.json +++ b/types/gulp-tsd/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-uglify/composer.d.ts b/types/gulp-uglify/composer.d.ts index bb3f04f134..0584a72fc0 100644 --- a/types/gulp-uglify/composer.d.ts +++ b/types/gulp-uglify/composer.d.ts @@ -1,5 +1,5 @@ import * as UglifyJS from 'uglify-js'; -import * as GulpUglify from '.'; +import GulpUglify = require('.'); interface Composer { (uglify: Uglify, log: Logger): typeof GulpUglify; diff --git a/types/gulp-uglify/gulp-uglify-tests.ts b/types/gulp-uglify/gulp-uglify-tests.ts index 172d7cae0b..1a23580e8c 100644 --- a/types/gulp-uglify/gulp-uglify-tests.ts +++ b/types/gulp-uglify/gulp-uglify-tests.ts @@ -1,5 +1,5 @@ import * as gulp from 'gulp'; -import * as uglify from 'gulp-uglify'; +import uglify = require('gulp-uglify'); import pump = require('pump'); import uglifyjs = require('uglify-js'); import composer = require('gulp-uglify/composer'); diff --git a/types/gulp-uglify/tsconfig.json b/types/gulp-uglify/tsconfig.json index 72fd35c65e..282b6c138b 100644 --- a/types/gulp-uglify/tsconfig.json +++ b/types/gulp-uglify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-useref/gulp-useref-tests.ts b/types/gulp-useref/gulp-useref-tests.ts index 5d777fd6e6..91cc7919e7 100644 --- a/types/gulp-useref/gulp-useref-tests.ts +++ b/types/gulp-useref/gulp-useref-tests.ts @@ -1,5 +1,5 @@ import * as gulp from 'gulp'; -import * as useref from 'gulp-useref'; +import useref = require('gulp-useref'); // Usage gulp.task('default', function () { @@ -14,7 +14,7 @@ gulp.task('default', function () { .pipe(gulp.dest('dist')); }); -import * as gulpif from 'gulp-if'; +import gulpif = require('gulp-if'); import uglify = require('gulp-uglify'); import minifyCss = require('gulp-minify-css'); diff --git a/types/gulp-useref/tsconfig.json b/types/gulp-useref/tsconfig.json index cdb7922c57..b12ffbcda7 100644 --- a/types/gulp-useref/tsconfig.json +++ b/types/gulp-useref/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-util/tsconfig.json b/types/gulp-util/tsconfig.json index f383866019..d3286da30b 100644 --- a/types/gulp-util/tsconfig.json +++ b/types/gulp-util/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-watch/gulp-watch-tests.ts b/types/gulp-watch/gulp-watch-tests.ts index b273662824..360c53dd19 100644 --- a/types/gulp-watch/gulp-watch-tests.ts +++ b/types/gulp-watch/gulp-watch-tests.ts @@ -1,5 +1,5 @@ import * as gulp from 'gulp'; -import * as watch from 'gulp-watch'; +import watch = require('gulp-watch'); gulp.task('stream', () => gulp.src('css/**/*.css') diff --git a/types/gulp-watch/tsconfig.json b/types/gulp-watch/tsconfig.json index 079cb9d569..b1937b173a 100644 --- a/types/gulp-watch/tsconfig.json +++ b/types/gulp-watch/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp-zip/gulp-zip-tests.ts b/types/gulp-zip/gulp-zip-tests.ts index 983a4263ce..428ce81ebd 100644 --- a/types/gulp-zip/gulp-zip-tests.ts +++ b/types/gulp-zip/gulp-zip-tests.ts @@ -1,4 +1,4 @@ -import * as GulpZip from 'gulp-zip'; +import GulpZip = require('gulp-zip'); GulpZip('file.zip').on('end', () => {}); GulpZip('file.zip', {compress: false}).on('end', () => {}); diff --git a/types/gulp-zip/tsconfig.json b/types/gulp-zip/tsconfig.json index a5f75d75fa..8b43507914 100644 --- a/types/gulp-zip/tsconfig.json +++ b/types/gulp-zip/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gulp/test/index.ts b/types/gulp/test/index.ts index 853799d8c4..f5ca436450 100644 --- a/types/gulp/test/index.ts +++ b/types/gulp/test/index.ts @@ -1,7 +1,7 @@ import * as gulp from 'gulp'; import * as undertaker from 'undertaker'; import * as registry from 'undertaker-registry'; -import * as del from "del"; +import del = require("del"); const minify: () => any = () => { }; const jade: () => any = () => { }; diff --git a/types/gulp/tsconfig.json b/types/gulp/tsconfig.json index b0ca843318..dfba44bd86 100644 --- a/types/gulp/tsconfig.json +++ b/types/gulp/tsconfig.json @@ -16,6 +16,7 @@ "strictNullChecks": true, "strictFunctionTypes": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noEmit": true }, "files": [ diff --git a/types/gulp/v3/tsconfig.json b/types/gulp/v3/tsconfig.json index 2948f23682..d1a56e0a01 100644 --- a/types/gulp/v3/tsconfig.json +++ b/types/gulp/v3/tsconfig.json @@ -22,7 +22,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gzip-js/tsconfig.json b/types/gzip-js/tsconfig.json index a8138e1de9..978dc916bd 100644 --- a/types/gzip-js/tsconfig.json +++ b/types/gzip-js/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "gzip-js-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/gzip-size/tsconfig.json b/types/gzip-size/tsconfig.json index 6d244facf6..9779d93536 100644 --- a/types/gzip-size/tsconfig.json +++ b/types/gzip-size/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/gzip-size/v3/tsconfig.json b/types/gzip-size/v3/tsconfig.json index 88a695711b..1e806cb7bc 100644 --- a/types/gzip-size/v3/tsconfig.json +++ b/types/gzip-size/v3/tsconfig.json @@ -19,10 +19,11 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "gzip-size-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/h2o2/tsconfig.json b/types/h2o2/tsconfig.json index 30a156a786..b0d5bbf160 100644 --- a/types/h2o2/tsconfig.json +++ b/types/h2o2/tsconfig.json @@ -14,13 +14,16 @@ ], "types": [], "paths": { - "boom": ["boom/v4"] + "boom": [ + "boom/v4" + ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "h2o2-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/halfred/tsconfig.json b/types/halfred/tsconfig.json index 7d75a822cb..2e09cffd82 100644 --- a/types/halfred/tsconfig.json +++ b/types/halfred/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/halogen/tsconfig.json b/types/halogen/tsconfig.json index f234a05b87..caaa6505d4 100644 --- a/types/halogen/tsconfig.json +++ b/types/halogen/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/hammerjs/tsconfig.json b/types/hammerjs/tsconfig.json index c0ba95885c..e159cc1fe0 100644 --- a/types/hammerjs/tsconfig.json +++ b/types/hammerjs/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/hammerjs/v1/tsconfig.json b/types/hammerjs/v1/tsconfig.json index aeabf7ff07..665a768e1d 100644 --- a/types/hammerjs/v1/tsconfig.json +++ b/types/hammerjs/v1/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/handlebars/tsconfig.json b/types/handlebars/tsconfig.json index 5f874f3996..3fdef52d13 100644 --- a/types/handlebars/tsconfig.json +++ b/types/handlebars/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/handlebars/v1/tsconfig.json b/types/handlebars/v1/tsconfig.json index 96818b903b..7b246f2c3a 100644 --- a/types/handlebars/v1/tsconfig.json +++ b/types/handlebars/v1/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/hapi-auth-basic/tsconfig.json b/types/hapi-auth-basic/tsconfig.json index 56ac44dbdd..7448e829c4 100644 --- a/types/hapi-auth-basic/tsconfig.json +++ b/types/hapi-auth-basic/tsconfig.json @@ -14,13 +14,16 @@ ], "types": [], "paths": { - "boom": ["boom/v4"] + "boom": [ + "boom/v4" + ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "hapi-auth-basic-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/hapi-auth-jwt2/tsconfig.json b/types/hapi-auth-jwt2/tsconfig.json index 78a8423cc4..7d06e7c818 100644 --- a/types/hapi-auth-jwt2/tsconfig.json +++ b/types/hapi-auth-jwt2/tsconfig.json @@ -14,13 +14,16 @@ ], "types": [], "paths": { - "boom": ["boom/v4"] + "boom": [ + "boom/v4" + ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "hapi-auth-jwt2-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/hapi-decorators/tsconfig.json b/types/hapi-decorators/tsconfig.json index 80aa56a21e..645122114e 100644 --- a/types/hapi-decorators/tsconfig.json +++ b/types/hapi-decorators/tsconfig.json @@ -16,13 +16,16 @@ ], "types": [], "paths": { - "boom": ["boom/v4"] + "boom": [ + "boom/v4" + ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "hapi-decorators-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/hapi/tsconfig.json b/types/hapi/tsconfig.json index 96790b3bff..53f8f2ece6 100644 --- a/types/hapi/tsconfig.json +++ b/types/hapi/tsconfig.json @@ -14,10 +14,13 @@ ], "types": [], "paths": { - "boom": ["boom/v4"] + "boom": [ + "boom/v4" + ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -97,4 +100,4 @@ "test/server/table.ts", "test/server/version.ts" ] -} +} \ No newline at end of file diff --git a/types/hapi/v12/tsconfig.json b/types/hapi/v12/tsconfig.json index c461c7d288..527a25a6be 100644 --- a/types/hapi/v12/tsconfig.json +++ b/types/hapi/v12/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hapi/v15/tsconfig.json b/types/hapi/v15/tsconfig.json index 154b6a8f0e..f3eea23e6b 100644 --- a/types/hapi/v15/tsconfig.json +++ b/types/hapi/v15/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hapi/v8/tsconfig.json b/types/hapi/v8/tsconfig.json index 7eb82005fd..e56e64ba1e 100644 --- a/types/hapi/v8/tsconfig.json +++ b/types/hapi/v8/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/har-format/tsconfig.json b/types/har-format/tsconfig.json index f5029a7c18..e30aa982b8 100644 --- a/types/har-format/tsconfig.json +++ b/types/har-format/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hard-rejection/tsconfig.json b/types/hard-rejection/tsconfig.json index 6c83946da7..1521f9e327 100644 --- a/types/hard-rejection/tsconfig.json +++ b/types/hard-rejection/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/harmony-proxy/tsconfig.json b/types/harmony-proxy/tsconfig.json index 2190dd8e23..5225c0854d 100644 --- a/types/harmony-proxy/tsconfig.json +++ b/types/harmony-proxy/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/has-ansi/tsconfig.json b/types/has-ansi/tsconfig.json index d5b52a8974..e80018a785 100644 --- a/types/has-ansi/tsconfig.json +++ b/types/has-ansi/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hash-file/tsconfig.json b/types/hash-file/tsconfig.json index 67f8cfcf8c..c300cccbda 100644 --- a/types/hash-file/tsconfig.json +++ b/types/hash-file/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hash-stream/tsconfig.json b/types/hash-stream/tsconfig.json index e1846bd608..61d4d3c12e 100644 --- a/types/hash-stream/tsconfig.json +++ b/types/hash-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hasha/tsconfig.json b/types/hasha/tsconfig.json index fe359d64a5..ebef98b818 100644 --- a/types/hasha/tsconfig.json +++ b/types/hasha/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hasher/tsconfig.json b/types/hasher/tsconfig.json index dae70f6dc4..b05767e01b 100644 --- a/types/hasher/tsconfig.json +++ b/types/hasher/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hashids/tsconfig.json b/types/hashids/tsconfig.json index 4d118acf1b..7d308003bb 100644 --- a/types/hashids/tsconfig.json +++ b/types/hashids/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hashmap/tsconfig.json b/types/hashmap/tsconfig.json index f2d00e0999..700a72e832 100644 --- a/types/hashmap/tsconfig.json +++ b/types/hashmap/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/hashmap/v1/tsconfig.json b/types/hashmap/v1/tsconfig.json index a085a1d89d..6537d23b5d 100644 --- a/types/hashmap/v1/tsconfig.json +++ b/types/hashmap/v1/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hashset/tsconfig.json b/types/hashset/tsconfig.json index 7bf84fd5f1..9ac81f5b45 100644 --- a/types/hashset/tsconfig.json +++ b/types/hashset/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hashtable/tsconfig.json b/types/hashtable/tsconfig.json index 497a9448bf..eac4d4b6c8 100644 --- a/types/hashtable/tsconfig.json +++ b/types/hashtable/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/haversine/tsconfig.json b/types/haversine/tsconfig.json index 6b8c2dfaf6..ed00b23d2c 100644 --- a/types/haversine/tsconfig.json +++ b/types/haversine/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hbs/hbs-tests.ts b/types/hbs/hbs-tests.ts index a1baa73ca7..c1d355daea 100644 --- a/types/hbs/hbs-tests.ts +++ b/types/hbs/hbs-tests.ts @@ -1,4 +1,4 @@ -import * as express from 'express'; +import express = require('express'); const app = express(); diff --git a/types/hbs/tsconfig.json b/types/hbs/tsconfig.json index f16c9e251f..4ed61e005d 100644 --- a/types/hbs/tsconfig.json +++ b/types/hbs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/he/tsconfig.json b/types/he/tsconfig.json index 6e02234def..21526db543 100644 --- a/types/he/tsconfig.json +++ b/types/he/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/headroom/tsconfig.json b/types/headroom/tsconfig.json index eb03738511..5184b6b443 100644 --- a/types/headroom/tsconfig.json +++ b/types/headroom/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/heap/tsconfig.json b/types/heap/tsconfig.json index ed8f269f6e..a5dc20174d 100644 --- a/types/heap/tsconfig.json +++ b/types/heap/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/heapdump/tsconfig.json b/types/heapdump/tsconfig.json index a15a306b41..703a603ae1 100644 --- a/types/heapdump/tsconfig.json +++ b/types/heapdump/tsconfig.json @@ -16,10 +16,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "heapdump-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/heatmap.js/tsconfig.json b/types/heatmap.js/tsconfig.json index 2e22853a34..d1e87ffb3d 100644 --- a/types/heatmap.js/tsconfig.json +++ b/types/heatmap.js/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hedron/tsconfig.json b/types/hedron/tsconfig.json index bed62b30c6..647d1d6a30 100644 --- a/types/hedron/tsconfig.json +++ b/types/hedron/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "preserve" }, "files": [ diff --git a/types/hellojs/tsconfig.json b/types/hellojs/tsconfig.json index c3baa66581..755aefce72 100644 --- a/types/hellojs/tsconfig.json +++ b/types/hellojs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hellosign-embedded/tsconfig.json b/types/hellosign-embedded/tsconfig.json index 4712a41816..74d8ec66b4 100644 --- a/types/hellosign-embedded/tsconfig.json +++ b/types/hellosign-embedded/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/helmet/tsconfig.json b/types/helmet/tsconfig.json index 0a85e89659..f85a86b1c8 100644 --- a/types/helmet/tsconfig.json +++ b/types/helmet/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/heredatalens/tsconfig.json b/types/heredatalens/tsconfig.json index 5a2650b93f..4e2e0cd1a3 100644 --- a/types/heredatalens/tsconfig.json +++ b/types/heredatalens/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/heremaps/tsconfig.json b/types/heremaps/tsconfig.json index 7f83e9f79c..4ccebfba90 100644 --- a/types/heremaps/tsconfig.json +++ b/types/heremaps/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/heroku-logger/tsconfig.json b/types/heroku-logger/tsconfig.json index 802ac41a2a..ebd7c0041c 100644 --- a/types/heroku-logger/tsconfig.json +++ b/types/heroku-logger/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hex-rgba/tsconfig.json b/types/hex-rgba/tsconfig.json index 82f2e3808e..2f0ff73e60 100644 --- a/types/hex-rgba/tsconfig.json +++ b/types/hex-rgba/tsconfig.json @@ -14,10 +14,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ "index.d.ts", "hex-rgba-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/hexo-bunyan/tsconfig.json b/types/hexo-bunyan/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/hexo-bunyan/tsconfig.json +++ b/types/hexo-bunyan/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/hexo-fs/tsconfig.json b/types/hexo-fs/tsconfig.json index 4d8c00b74e..b3014c52df 100644 --- a/types/hexo-fs/tsconfig.json +++ b/types/hexo-fs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hexo-log/tsconfig.json b/types/hexo-log/tsconfig.json index b0af5da25b..906e609902 100644 --- a/types/hexo-log/tsconfig.json +++ b/types/hexo-log/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/highcharts-ng/tsconfig.json b/types/highcharts-ng/tsconfig.json index 6f313e502a..f1f180976f 100644 --- a/types/highcharts-ng/tsconfig.json +++ b/types/highcharts-ng/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/highcharts/tsconfig.json b/types/highcharts/tsconfig.json index ed1e69ef0c..18d37382e5 100644 --- a/types/highcharts/tsconfig.json +++ b/types/highcharts/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/highland/tsconfig.json b/types/highland/tsconfig.json index 369326fd9f..43fea750ce 100644 --- a/types/highland/tsconfig.json +++ b/types/highland/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/highlight.js/tsconfig.json b/types/highlight.js/tsconfig.json index e3627e99ca..d13fff15ba 100644 --- a/types/highlight.js/tsconfig.json +++ b/types/highlight.js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/highlight.js/v7/tsconfig.json b/types/highlight.js/v7/tsconfig.json index 10570c9f69..2c89b93acb 100644 --- a/types/highlight.js/v7/tsconfig.json +++ b/types/highlight.js/v7/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/hiredis/tsconfig.json b/types/hiredis/tsconfig.json index 927fdef018..8bc77b8339 100644 --- a/types/hiredis/tsconfig.json +++ b/types/hiredis/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/history.js/tsconfig.json b/types/history.js/tsconfig.json index 4834d24b35..1972e4113e 100644 --- a/types/history.js/tsconfig.json +++ b/types/history.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/history/tsconfig.json b/types/history/tsconfig.json index f5638c9603..2be65a13ed 100644 --- a/types/history/tsconfig.json +++ b/types/history/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/history/v2/tsconfig.json b/types/history/v2/tsconfig.json index 4ee5476d05..94e2605881 100644 --- a/types/history/v2/tsconfig.json +++ b/types/history/v2/tsconfig.json @@ -23,7 +23,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/history/v3/tsconfig.json b/types/history/v3/tsconfig.json index 2075f25a15..17f7dc237f 100644 --- a/types/history/v3/tsconfig.json +++ b/types/history/v3/tsconfig.json @@ -23,7 +23,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hjson/tsconfig.json b/types/hjson/tsconfig.json index 5e6692a9bd..e2004c8716 100644 --- a/types/hjson/tsconfig.json +++ b/types/hjson/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hls.js/tsconfig.json b/types/hls.js/tsconfig.json index ed68ee32f3..f879abb0ef 100644 --- a/types/hls.js/tsconfig.json +++ b/types/hls.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hoek/tsconfig.json b/types/hoek/tsconfig.json index 06617f251f..9cc6965f8f 100644 --- a/types/hoek/tsconfig.json +++ b/types/hoek/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/holderjs/tsconfig.json b/types/holderjs/tsconfig.json index 6cf9415ee2..b33ee1cfdb 100644 --- a/types/holderjs/tsconfig.json +++ b/types/holderjs/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "holderjs-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/hooker/tsconfig.json b/types/hooker/tsconfig.json index 446825fb97..38bc5b093c 100644 --- a/types/hooker/tsconfig.json +++ b/types/hooker/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hopscotch/tsconfig.json b/types/hopscotch/tsconfig.json index d9fb810610..c192e75957 100644 --- a/types/hopscotch/tsconfig.json +++ b/types/hopscotch/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/howler/tsconfig.json b/types/howler/tsconfig.json index 00ec7b93d7..d9f51622a8 100644 --- a/types/howler/tsconfig.json +++ b/types/howler/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hpp/hpp-tests.ts b/types/hpp/hpp-tests.ts index 21432f3d3f..8786ab702d 100644 --- a/types/hpp/hpp-tests.ts +++ b/types/hpp/hpp-tests.ts @@ -1,5 +1,5 @@ -import * as express from 'express'; -import * as hpp from 'hpp'; +import express = require('express'); +import hpp = require('hpp'); const app = express(); diff --git a/types/hpp/tsconfig.json b/types/hpp/tsconfig.json index 0193bd22d2..cbc4490a4e 100644 --- a/types/hpp/tsconfig.json +++ b/types/hpp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/html-entities/tsconfig.json b/types/html-entities/tsconfig.json index ad38016e35..57a35f13e7 100644 --- a/types/html-entities/tsconfig.json +++ b/types/html-entities/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/html-minifier/tsconfig.json b/types/html-minifier/tsconfig.json index 129a20c71f..c8f5ba70d1 100644 --- a/types/html-minifier/tsconfig.json +++ b/types/html-minifier/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/html-minifier/v1/tsconfig.json b/types/html-minifier/v1/tsconfig.json index 8def52b67d..df85608048 100644 --- a/types/html-minifier/v1/tsconfig.json +++ b/types/html-minifier/v1/tsconfig.json @@ -13,12 +13,17 @@ "../../" ], "paths": { - "html-minifier": ["html-minifier/v1"], - "html-minifier/*": ["html-minifier/v1/*"] + "html-minifier": [ + "html-minifier/v1" + ], + "html-minifier/*": [ + "html-minifier/v1/*" + ] }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/html-pdf/tsconfig.json b/types/html-pdf/tsconfig.json index e6936f2588..225bb52929 100644 --- a/types/html-pdf/tsconfig.json +++ b/types/html-pdf/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/html-to-text/tsconfig.json b/types/html-to-text/tsconfig.json index 089a8e128e..fe209a615d 100644 --- a/types/html-to-text/tsconfig.json +++ b/types/html-to-text/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/html-webpack-plugin/html-webpack-plugin-tests.ts b/types/html-webpack-plugin/html-webpack-plugin-tests.ts index 7a1e5f20bc..b80ea9e6b0 100644 --- a/types/html-webpack-plugin/html-webpack-plugin-tests.ts +++ b/types/html-webpack-plugin/html-webpack-plugin-tests.ts @@ -1,4 +1,4 @@ -import * as HtmlWebpackPlugin from 'html-webpack-plugin'; +import HtmlWebpackPlugin = require('html-webpack-plugin'); new HtmlWebpackPlugin(); diff --git a/types/html-webpack-plugin/tsconfig.json b/types/html-webpack-plugin/tsconfig.json index 61d842ab9c..289455c231 100644 --- a/types/html-webpack-plugin/tsconfig.json +++ b/types/html-webpack-plugin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/html-webpack-template/html-webpack-template-tests.ts b/types/html-webpack-template/html-webpack-template-tests.ts index 4407af69eb..0108aa39d8 100644 --- a/types/html-webpack-template/html-webpack-template-tests.ts +++ b/types/html-webpack-template/html-webpack-template-tests.ts @@ -1,4 +1,4 @@ -import * as HtmlWebpackPlugin from 'html-webpack-plugin'; +import HtmlWebpackPlugin = require('html-webpack-plugin'); import * as template from 'html-webpack-template'; const optionsArray: template.Options[] = [ diff --git a/types/html-webpack-template/tsconfig.json b/types/html-webpack-template/tsconfig.json index 7b0b56e459..ddc0447c74 100644 --- a/types/html-webpack-template/tsconfig.json +++ b/types/html-webpack-template/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/html2canvas/tsconfig.json b/types/html2canvas/tsconfig.json index 0fcf24b6f8..9cf08eb266 100644 --- a/types/html2canvas/tsconfig.json +++ b/types/html2canvas/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/htmlbars-inline-precompile/tsconfig.json b/types/htmlbars-inline-precompile/tsconfig.json index fd03f6a476..c3eb8ef11f 100644 --- a/types/htmlbars-inline-precompile/tsconfig.json +++ b/types/htmlbars-inline-precompile/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/htmlescape/tsconfig.json b/types/htmlescape/tsconfig.json index 581a713fff..abe0efa243 100644 --- a/types/htmlescape/tsconfig.json +++ b/types/htmlescape/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/htmlhint/tsconfig.json b/types/htmlhint/tsconfig.json index b8472efbda..c2b3078f68 100644 --- a/types/htmlhint/tsconfig.json +++ b/types/htmlhint/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/htmlparser2/tsconfig.json b/types/htmlparser2/tsconfig.json index c6ccfee7cc..c19c42d22b 100644 --- a/types/htmlparser2/tsconfig.json +++ b/types/htmlparser2/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/htmltojsx/tsconfig.json b/types/htmltojsx/tsconfig.json index 5b0fc81735..b505e65bd9 100644 --- a/types/htmltojsx/tsconfig.json +++ b/types/htmltojsx/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/http-assert/http-assert-tests.ts b/types/http-assert/http-assert-tests.ts index bfb12e650a..a0e159aeed 100644 --- a/types/http-assert/http-assert-tests.ts +++ b/types/http-assert/http-assert-tests.ts @@ -1,4 +1,4 @@ -import * as httpAssert from 'http-assert'; +import httpAssert = require('http-assert'); import { HttpError } from 'http-errors'; try { diff --git a/types/http-assert/tsconfig.json b/types/http-assert/tsconfig.json index 711327f38b..a1be51026d 100644 --- a/types/http-assert/tsconfig.json +++ b/types/http-assert/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/http-aws-es/tsconfig.json b/types/http-aws-es/tsconfig.json index 5d248f0375..44140847bb 100644 --- a/types/http-aws-es/tsconfig.json +++ b/types/http-aws-es/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/http-codes/tsconfig.json b/types/http-codes/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/http-codes/tsconfig.json +++ b/types/http-codes/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/http-context/tsconfig.json b/types/http-context/tsconfig.json index 51422e3199..ade1021328 100644 --- a/types/http-context/tsconfig.json +++ b/types/http-context/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "http-context-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/http-errors/http-errors-tests.ts b/types/http-errors/http-errors-tests.ts index c3677fd5f9..583223d6a4 100644 --- a/types/http-errors/http-errors-tests.ts +++ b/types/http-errors/http-errors-tests.ts @@ -1,5 +1,5 @@ -import * as create from 'http-errors'; -import * as express from 'express'; +import create = require('http-errors'); +import express = require('express'); import * as util from 'util'; const app = express(); diff --git a/types/http-errors/tsconfig.json b/types/http-errors/tsconfig.json index 430bec9565..62465b68e8 100644 --- a/types/http-errors/tsconfig.json +++ b/types/http-errors/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/http-link-header/tsconfig.json b/types/http-link-header/tsconfig.json index 3acfe11a33..3094403bb9 100644 --- a/types/http-link-header/tsconfig.json +++ b/types/http-link-header/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/http-proxy-agent/tsconfig.json b/types/http-proxy-agent/tsconfig.json index 626d4eaa4c..f0e1f42aee 100644 --- a/types/http-proxy-agent/tsconfig.json +++ b/types/http-proxy-agent/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "http-proxy-agent-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/http-proxy-middleware/tsconfig.json b/types/http-proxy-middleware/tsconfig.json index 459138e584..714fe3ca42 100644 --- a/types/http-proxy-middleware/tsconfig.json +++ b/types/http-proxy-middleware/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/http-proxy/http-proxy-tests.ts b/types/http-proxy/http-proxy-tests.ts index e691b48ed0..70ea803da6 100644 --- a/types/http-proxy/http-proxy-tests.ts +++ b/types/http-proxy/http-proxy-tests.ts @@ -1,5 +1,5 @@ import * as http from "http"; -import * as HttpProxy from "http-proxy"; +import HttpProxy = require("http-proxy"); const proxy = new HttpProxy({ changeOrigin: true diff --git a/types/http-proxy/index.d.ts b/types/http-proxy/index.d.ts index 962a9ecdb6..811789af33 100644 --- a/types/http-proxy/index.d.ts +++ b/types/http-proxy/index.d.ts @@ -197,6 +197,8 @@ declare namespace Server { autoRewrite?: boolean; /** Rewrites the location protocol on (301 / 302 / 307 / 308) redirects to 'http' or 'https'.Default: null. */ protocolRewrite?: string; + /** Timeout (in milliseconds) when proxy receives no response from target. Default: 120000 (2 minutes) */ + proxyTimeout?: number; } } diff --git a/types/http-proxy/tsconfig.json b/types/http-proxy/tsconfig.json index 24a9ed6c48..e8895667f5 100644 --- a/types/http-proxy/tsconfig.json +++ b/types/http-proxy/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/http-server/tsconfig.json b/types/http-server/tsconfig.json index 98f006389c..1b90c09fa0 100644 --- a/types/http-server/tsconfig.json +++ b/types/http-server/tsconfig.json @@ -14,10 +14,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ "index.d.ts", "http-server-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/http-status/tsconfig.json b/types/http-status/tsconfig.json index acb7f89cde..2a9f60f0c2 100644 --- a/types/http-status/tsconfig.json +++ b/types/http-status/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/http-string-parser/tsconfig.json b/types/http-string-parser/tsconfig.json index 80f7cd176a..82cb0405e7 100644 --- a/types/http-string-parser/tsconfig.json +++ b/types/http-string-parser/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/httperr/tsconfig.json b/types/httperr/tsconfig.json index 85505edbc8..ef117164fb 100644 --- a/types/httperr/tsconfig.json +++ b/types/httperr/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hubot/tsconfig.json b/types/hubot/tsconfig.json index 9354cf926c..8dbed319d9 100644 --- a/types/hubot/tsconfig.json +++ b/types/hubot/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hubspot-pace/tsconfig.json b/types/hubspot-pace/tsconfig.json index 1d2a2ec99e..f2c9f738e6 100644 --- a/types/hubspot-pace/tsconfig.json +++ b/types/hubspot-pace/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/humane/tsconfig.json b/types/humane/tsconfig.json index 7b2fc3e81b..02cee5bec2 100644 --- a/types/humane/tsconfig.json +++ b/types/humane/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/humanize-plus/tsconfig.json b/types/humanize-plus/tsconfig.json index 37b195e2cd..674bdb64f5 100644 --- a/types/humanize-plus/tsconfig.json +++ b/types/humanize-plus/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/humanize-string/humanize-string-tests.ts b/types/humanize-string/humanize-string-tests.ts new file mode 100644 index 0000000000..851746f088 --- /dev/null +++ b/types/humanize-string/humanize-string-tests.ts @@ -0,0 +1,4 @@ +import humanizeString = require('humanize-string'); + +humanizeString('UnicornsAndRainbows'); +humanizeString('unicorns_and-Rainbows_andPonies '); diff --git a/types/humanize-string/index.d.ts b/types/humanize-string/index.d.ts new file mode 100644 index 0000000000..ba8bc4e867 --- /dev/null +++ b/types/humanize-string/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for humanize-string 1.0 +// Project: https://github.com/sindresorhus/humanize-string/ +// Definitions by: Kevin Nacios +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function humanizeString(text: string): string; + +export = humanizeString; diff --git a/types/humanize-string/tsconfig.json b/types/humanize-string/tsconfig.json new file mode 100644 index 0000000000..2b97ea796b --- /dev/null +++ b/types/humanize-string/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "humanize-string-tests.ts" + ] +} \ No newline at end of file diff --git a/types/humanize-string/tslint.json b/types/humanize-string/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/humanize-string/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/humanparser/tsconfig.json b/types/humanparser/tsconfig.json index 1e12c171d0..3b7ed6be21 100644 --- a/types/humanparser/tsconfig.json +++ b/types/humanparser/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/humps/tsconfig.json b/types/humps/tsconfig.json index ec1866d58c..79c40ebc87 100644 --- a/types/humps/tsconfig.json +++ b/types/humps/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hyco-ws/tsconfig.json b/types/hyco-ws/tsconfig.json index cc21647f01..468a3e9c69 100644 --- a/types/hyco-ws/tsconfig.json +++ b/types/hyco-ws/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hyperscript/tsconfig.json b/types/hyperscript/tsconfig.json index dcd78c9f85..733e14bcda 100644 --- a/types/hyperscript/tsconfig.json +++ b/types/hyperscript/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hypertext-application-language/tsconfig.json b/types/hypertext-application-language/tsconfig.json index 15621fa9c2..9c01e0594f 100644 --- a/types/hypertext-application-language/tsconfig.json +++ b/types/hypertext-application-language/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/hystrixjs/tsconfig.json b/types/hystrixjs/tsconfig.json index 480476e8d1..d534470204 100644 --- a/types/hystrixjs/tsconfig.json +++ b/types/hystrixjs/tsconfig.json @@ -16,10 +16,11 @@ "paths": {}, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "hystrixjs-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/i18n-js/tsconfig.json b/types/i18n-js/tsconfig.json index 4a9e4d110b..128a7ad06d 100644 --- a/types/i18n-js/tsconfig.json +++ b/types/i18n-js/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "i18n-js-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/i18n/tsconfig.json b/types/i18n/tsconfig.json index 4429a81fe6..4d7bacf4d0 100644 --- a/types/i18n/tsconfig.json +++ b/types/i18n/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/i18next-browser-languagedetector/tsconfig.json b/types/i18next-browser-languagedetector/tsconfig.json index 32755315aa..879c1d7ac7 100644 --- a/types/i18next-browser-languagedetector/tsconfig.json +++ b/types/i18next-browser-languagedetector/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/i18next-browser-languagedetector/v0/tsconfig.json b/types/i18next-browser-languagedetector/v0/tsconfig.json index 9873c74134..5396feadd6 100644 --- a/types/i18next-browser-languagedetector/v0/tsconfig.json +++ b/types/i18next-browser-languagedetector/v0/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/i18next-express-middleware/i18next-express-middleware-tests.ts b/types/i18next-express-middleware/i18next-express-middleware-tests.ts index d56f7a9207..9959cf9dad 100644 --- a/types/i18next-express-middleware/i18next-express-middleware-tests.ts +++ b/types/i18next-express-middleware/i18next-express-middleware-tests.ts @@ -1,4 +1,4 @@ -import * as express from "express"; +import express = require("express"); import * as i18next from "i18next"; import middleware = require("i18next-express-middleware"); diff --git a/types/i18next-express-middleware/tsconfig.json b/types/i18next-express-middleware/tsconfig.json index 5a13f1733d..43460aefe2 100644 --- a/types/i18next-express-middleware/tsconfig.json +++ b/types/i18next-express-middleware/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/i18next-node-fs-backend/tsconfig.json b/types/i18next-node-fs-backend/tsconfig.json index 03b3347068..f0f6ba8147 100644 --- a/types/i18next-node-fs-backend/tsconfig.json +++ b/types/i18next-node-fs-backend/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/i18next-sprintf-postprocessor/tsconfig.json b/types/i18next-sprintf-postprocessor/tsconfig.json index 9a52882abe..af3f004099 100644 --- a/types/i18next-sprintf-postprocessor/tsconfig.json +++ b/types/i18next-sprintf-postprocessor/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/i18next-xhr-backend/tsconfig.json b/types/i18next-xhr-backend/tsconfig.json index a7ca4c2adb..7c48abd709 100644 --- a/types/i18next-xhr-backend/tsconfig.json +++ b/types/i18next-xhr-backend/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/i18next/index.d.ts b/types/i18next/index.d.ts index c510d824eb..61b59b32e1 100644 --- a/types/i18next/index.d.ts +++ b/types/i18next/index.d.ts @@ -103,6 +103,11 @@ declare namespace i18next { * set it to fallback to let passed namespaces to translated hoc act as fallbacks */ nsMode?: string; + /** + * set it to the default parent element created by the Trans component. + * @default div + */ + defaultTransParent?: string; } interface InitOptions { diff --git a/types/i18next/tsconfig.json b/types/i18next/tsconfig.json index 9eadf37b0f..b37ad92b9d 100644 --- a/types/i18next/tsconfig.json +++ b/types/i18next/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/i18next/v2/tsconfig.json b/types/i18next/v2/tsconfig.json index 00464c1701..1533066fbb 100644 --- a/types/i18next/v2/tsconfig.json +++ b/types/i18next/v2/tsconfig.json @@ -24,6 +24,7 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/i2c-bus/tsconfig.json b/types/i2c-bus/tsconfig.json index 8407ea3efd..081ba2a5a6 100644 --- a/types/i2c-bus/tsconfig.json +++ b/types/i2c-bus/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "../async/index.d.ts", diff --git a/types/iban/tsconfig.json b/types/iban/tsconfig.json index 352470aa0d..2e7f860867 100644 --- a/types/iban/tsconfig.json +++ b/types/iban/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ibm-mobilefirst/tsconfig.json b/types/ibm-mobilefirst/tsconfig.json index eabcd34447..83ab44c9d5 100644 --- a/types/ibm-mobilefirst/tsconfig.json +++ b/types/ibm-mobilefirst/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ibm_db/tsconfig.json b/types/ibm_db/tsconfig.json index f92b637034..4b69bc8c6b 100644 --- a/types/ibm_db/tsconfig.json +++ b/types/ibm_db/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/icepick/tsconfig.json b/types/icepick/tsconfig.json index 530031866b..93540a1c5f 100644 --- a/types/icepick/tsconfig.json +++ b/types/icepick/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/icheck/tsconfig.json b/types/icheck/tsconfig.json index b700077c47..0ec895d526 100644 --- a/types/icheck/tsconfig.json +++ b/types/icheck/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/iconv/tsconfig.json b/types/iconv/tsconfig.json index b97ea1a7f3..78bd76e835 100644 --- a/types/iconv/tsconfig.json +++ b/types/iconv/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ids/tsconfig.json b/types/ids/tsconfig.json index 1c739774db..c9e212f3ee 100644 --- a/types/ids/tsconfig.json +++ b/types/ids/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/iframe-resizer/tsconfig.json b/types/iframe-resizer/tsconfig.json index e8a87f1302..7962a0d413 100644 --- a/types/iframe-resizer/tsconfig.json +++ b/types/iframe-resizer/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "exclude": [ "node_modules" diff --git a/types/ignite-ui/tsconfig.json b/types/ignite-ui/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/ignite-ui/tsconfig.json +++ b/types/ignite-ui/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/ignore-styles/tsconfig.json b/types/ignore-styles/tsconfig.json index aed3487cf4..36263af6ad 100644 --- a/types/ignore-styles/tsconfig.json +++ b/types/ignore-styles/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "ignore-styles-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/iltorb/tsconfig.json b/types/iltorb/tsconfig.json index c12ff988ba..0c553243a8 100644 --- a/types/iltorb/tsconfig.json +++ b/types/iltorb/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "iltorb-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/image-size/image-size-tests.ts b/types/image-size/image-size-tests.ts index 983389091e..058ed7934f 100644 --- a/types/image-size/image-size-tests.ts +++ b/types/image-size/image-size-tests.ts @@ -1,7 +1,6 @@ - import * as url from "url"; import * as http from "http"; -import * as sizeOf from "image-size"; +import sizeOf = require("image-size"); // Synchronous const dimensions = sizeOf("images/funny-cats.png"); diff --git a/types/image-size/tsconfig.json b/types/image-size/tsconfig.json index 7a864603b7..009a4c9175 100644 --- a/types/image-size/tsconfig.json +++ b/types/image-size/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/imagemagick-native/tsconfig.json b/types/imagemagick-native/tsconfig.json index bfd2f88451..c96e9d4a44 100644 --- a/types/imagemagick-native/tsconfig.json +++ b/types/imagemagick-native/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/imagemagick/tsconfig.json b/types/imagemagick/tsconfig.json index 3a28cb5c59..cbbc1c0d83 100644 --- a/types/imagemagick/tsconfig.json +++ b/types/imagemagick/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/imagemapster/tsconfig.json b/types/imagemapster/tsconfig.json index cb5e3bdff8..3198a00bc4 100644 --- a/types/imagemapster/tsconfig.json +++ b/types/imagemapster/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/images/images-tests.ts b/types/images/images-tests.ts index f7ba58d68d..9b6db2d1b2 100644 --- a/types/images/images-tests.ts +++ b/types/images/images-tests.ts @@ -1,4 +1,4 @@ -import * as images from "images"; +import images = require("images"); // from https://github.com/zhangyuanwei/node-images/blob/master/demo/uploadServer.js const tmp_path = "tmp_path"; diff --git a/types/images/tsconfig.json b/types/images/tsconfig.json index 75c7b85340..368e3b87b5 100644 --- a/types/images/tsconfig.json +++ b/types/images/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/imagesloaded/tsconfig.json b/types/imagesloaded/tsconfig.json index 0673d1eaa2..a9ae36e077 100644 --- a/types/imagesloaded/tsconfig.json +++ b/types/imagesloaded/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/imap-simple/tsconfig.json b/types/imap-simple/tsconfig.json index 859835549a..257a2ee006 100644 --- a/types/imap-simple/tsconfig.json +++ b/types/imap-simple/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/imap/tsconfig.json b/types/imap/tsconfig.json index 987167daf3..655a1f4c54 100644 --- a/types/imap/tsconfig.json +++ b/types/imap/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/imgur-rest-api/tsconfig.json b/types/imgur-rest-api/tsconfig.json index f2803640de..4835091ddb 100644 --- a/types/imgur-rest-api/tsconfig.json +++ b/types/imgur-rest-api/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/impress/tsconfig.json b/types/impress/tsconfig.json index a278db24c9..82aafbc612 100644 --- a/types/impress/tsconfig.json +++ b/types/impress/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/in-range/tsconfig.json b/types/in-range/tsconfig.json index 7d5182a929..0261e63a92 100644 --- a/types/in-range/tsconfig.json +++ b/types/in-range/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/incremental-dom/tsconfig.json b/types/incremental-dom/tsconfig.json index 8ba7d824d5..d5ffa268df 100644 --- a/types/incremental-dom/tsconfig.json +++ b/types/incremental-dom/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/indent-string/tsconfig.json b/types/indent-string/tsconfig.json index 4f2e008801..d9d3db42a6 100644 --- a/types/indent-string/tsconfig.json +++ b/types/indent-string/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/inert/tsconfig.json b/types/inert/tsconfig.json index da982b9122..feda976404 100644 --- a/types/inert/tsconfig.json +++ b/types/inert/tsconfig.json @@ -14,13 +14,16 @@ ], "types": [], "paths": { - "boom": ["boom/v4"] + "boom": [ + "boom/v4" + ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "inert-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/inflected/tsconfig.json b/types/inflected/tsconfig.json index b0a3a1d8b5..ce1b449bd6 100644 --- a/types/inflected/tsconfig.json +++ b/types/inflected/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/inflection/tsconfig.json b/types/inflection/tsconfig.json index e77c4028fc..097bf72f01 100644 --- a/types/inflection/tsconfig.json +++ b/types/inflection/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/inherits/tsconfig.json b/types/inherits/tsconfig.json index bdb4c4d873..f0bc28d26b 100644 --- a/types/inherits/tsconfig.json +++ b/types/inherits/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ini/tsconfig.json b/types/ini/tsconfig.json index ccc924b3fc..a2d9575bec 100644 --- a/types/ini/tsconfig.json +++ b/types/ini/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/iniparser/tsconfig.json b/types/iniparser/tsconfig.json index 0d7970f93a..2dbbf3ac60 100644 --- a/types/iniparser/tsconfig.json +++ b/types/iniparser/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/inline-css/tsconfig.json b/types/inline-css/tsconfig.json index 4a13506061..83f7ce2a21 100644 --- a/types/inline-css/tsconfig.json +++ b/types/inline-css/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/inline-style-prefixer/tsconfig.json b/types/inline-style-prefixer/tsconfig.json index 7d6d4209bc..7ed78cd882 100644 --- a/types/inline-style-prefixer/tsconfig.json +++ b/types/inline-style-prefixer/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/inquirer/tsconfig.json b/types/inquirer/tsconfig.json index 59793a86a1..132e52a694 100644 --- a/types/inquirer/tsconfig.json +++ b/types/inquirer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/insert-module-globals/tsconfig.json b/types/insert-module-globals/tsconfig.json index a9b4f218da..4f6dc79b6c 100644 --- a/types/insert-module-globals/tsconfig.json +++ b/types/insert-module-globals/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/insight/tsconfig.json b/types/insight/tsconfig.json index 7efb108eae..c90e8883c8 100644 --- a/types/insight/tsconfig.json +++ b/types/insight/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/integer/tsconfig.json b/types/integer/tsconfig.json index 60e0921a42..d8ff5490d1 100644 --- a/types/integer/tsconfig.json +++ b/types/integer/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/interact.js/tsconfig.json b/types/interact.js/tsconfig.json index 6d4887d0f1..ec69c04168 100644 --- a/types/interact.js/tsconfig.json +++ b/types/interact.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/intercom-web/tsconfig.json b/types/intercom-web/tsconfig.json index d77c89a53f..a6dafc828c 100755 --- a/types/intercom-web/tsconfig.json +++ b/types/intercom-web/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/intercomjs/tsconfig.json b/types/intercomjs/tsconfig.json index a74351a03a..e04592b241 100644 --- a/types/intercomjs/tsconfig.json +++ b/types/intercomjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/internal-ip/tsconfig.json b/types/internal-ip/tsconfig.json index 746718e07c..68e01ce09d 100644 --- a/types/internal-ip/tsconfig.json +++ b/types/internal-ip/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/intl-messageformat/tsconfig.json b/types/intl-messageformat/tsconfig.json index 61f9873265..5fa45ea6b4 100644 --- a/types/intl-messageformat/tsconfig.json +++ b/types/intl-messageformat/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/intl-tel-input/tsconfig.json b/types/intl-tel-input/tsconfig.json index 380d60229d..47bfb5d532 100644 --- a/types/intl-tel-input/tsconfig.json +++ b/types/intl-tel-input/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/intl/tsconfig.json b/types/intl/tsconfig.json index 30370fd405..e387d699b0 100644 --- a/types/intl/tsconfig.json +++ b/types/intl/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/into-stream/tsconfig.json b/types/into-stream/tsconfig.json index cc8a2cfa00..78424ed386 100644 --- a/types/into-stream/tsconfig.json +++ b/types/into-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/intro.js/tsconfig.json b/types/intro.js/tsconfig.json index c86cbffec5..6f17df93d2 100644 --- a/types/intro.js/tsconfig.json +++ b/types/intro.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/invariant/tsconfig.json b/types/invariant/tsconfig.json index 1cd411b7f4..b9835c8ee2 100644 --- a/types/invariant/tsconfig.json +++ b/types/invariant/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/inversify-devtools/tsconfig.json b/types/inversify-devtools/tsconfig.json index 4883fdc99e..43d9c7f198 100644 --- a/types/inversify-devtools/tsconfig.json +++ b/types/inversify-devtools/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ion.rangeslider/tsconfig.json b/types/ion.rangeslider/tsconfig.json index 1affa9f527..8fa4b00b02 100644 --- a/types/ion.rangeslider/tsconfig.json +++ b/types/ion.rangeslider/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ion.rangeslider/v1/tsconfig.json b/types/ion.rangeslider/v1/tsconfig.json index c63da8c0e1..d567b18c5d 100644 --- a/types/ion.rangeslider/v1/tsconfig.json +++ b/types/ion.rangeslider/v1/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ioredis/ioredis-tests.ts b/types/ioredis/ioredis-tests.ts index 2e80cd80e4..d8106ecdea 100644 --- a/types/ioredis/ioredis-tests.ts +++ b/types/ioredis/ioredis-tests.ts @@ -1,4 +1,4 @@ -import * as Redis from "ioredis"; +import Redis = require("ioredis"); const redis = new Redis(); redis.set('foo', 'bar'); diff --git a/types/ioredis/tsconfig.json b/types/ioredis/tsconfig.json index f073160729..7b17a6e338 100644 --- a/types/ioredis/tsconfig.json +++ b/types/ioredis/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/iota.lib.js/tsconfig.json b/types/iota.lib.js/tsconfig.json index b206b83455..5bb248e6c2 100644 --- a/types/iota.lib.js/tsconfig.json +++ b/types/iota.lib.js/tsconfig.json @@ -1,23 +1,24 @@ { - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "iota.lib.js-tests.ts" - ] + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "iota.lib.js-tests.ts" + ] } \ No newline at end of file diff --git a/types/ip-regex/tsconfig.json b/types/ip-regex/tsconfig.json index e09382966a..e3c27d39a7 100644 --- a/types/ip-regex/tsconfig.json +++ b/types/ip-regex/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ip/tsconfig.json b/types/ip/tsconfig.json index a445ebefe8..f6610d99f5 100644 --- a/types/ip/tsconfig.json +++ b/types/ip/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/irc/tsconfig.json b/types/irc/tsconfig.json index ac224646a3..ba8bd73ab1 100644 --- a/types/irc/tsconfig.json +++ b/types/irc/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/iron/tsconfig.json b/types/iron/tsconfig.json index bddeeac5c0..e0ee70fb95 100644 --- a/types/iron/tsconfig.json +++ b/types/iron/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "iron-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/is-absolute-url/tsconfig.json b/types/is-absolute-url/tsconfig.json index 57c46bb32b..b53f33f8d0 100644 --- a/types/is-absolute-url/tsconfig.json +++ b/types/is-absolute-url/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-alphanumerical/tsconfig.json b/types/is-alphanumerical/tsconfig.json index 90b83f80fb..a0e28cd6c8 100644 --- a/types/is-alphanumerical/tsconfig.json +++ b/types/is-alphanumerical/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-archive/tsconfig.json b/types/is-archive/tsconfig.json index ce2b001789..992c7f96ab 100644 --- a/types/is-archive/tsconfig.json +++ b/types/is-archive/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-array/tsconfig.json b/types/is-array/tsconfig.json index 022fbc852e..32aaeff9f4 100644 --- a/types/is-array/tsconfig.json +++ b/types/is-array/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-binary-path/tsconfig.json b/types/is-binary-path/tsconfig.json index e0fd45ed1e..e497433304 100644 --- a/types/is-binary-path/tsconfig.json +++ b/types/is-binary-path/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-compressed/tsconfig.json b/types/is-compressed/tsconfig.json index b44edb3059..b90ecf1883 100644 --- a/types/is-compressed/tsconfig.json +++ b/types/is-compressed/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-finite/tsconfig.json b/types/is-finite/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/is-finite/tsconfig.json +++ b/types/is-finite/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/is-glob/tsconfig.json b/types/is-glob/tsconfig.json index 1a408fe456..5fc85d6db2 100644 --- a/types/is-glob/tsconfig.json +++ b/types/is-glob/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "is-glob-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/is-ip/tsconfig.json b/types/is-ip/tsconfig.json index ea49885cbb..32c6d2baf7 100644 --- a/types/is-ip/tsconfig.json +++ b/types/is-ip/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-my-json-valid/tsconfig.json b/types/is-my-json-valid/tsconfig.json index 687e2a6c57..13eedc22b1 100644 --- a/types/is-my-json-valid/tsconfig.json +++ b/types/is-my-json-valid/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-negated-glob/tsconfig.json b/types/is-negated-glob/tsconfig.json index 9f8db73020..1083f6370c 100644 --- a/types/is-negated-glob/tsconfig.json +++ b/types/is-negated-glob/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "is-negated-glob-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/is-number/tsconfig.json b/types/is-number/tsconfig.json index 930df6698f..4eda636727 100644 --- a/types/is-number/tsconfig.json +++ b/types/is-number/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-object/tsconfig.json b/types/is-object/tsconfig.json index b3aae5340b..319385646a 100644 --- a/types/is-object/tsconfig.json +++ b/types/is-object/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "is-object-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/is-path-cwd/tsconfig.json b/types/is-path-cwd/tsconfig.json index 6f5a83c33d..0857fc254c 100644 --- a/types/is-path-cwd/tsconfig.json +++ b/types/is-path-cwd/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-path-in-cwd/tsconfig.json b/types/is-path-in-cwd/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/is-path-in-cwd/tsconfig.json +++ b/types/is-path-in-cwd/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/is-promise/tsconfig.json b/types/is-promise/tsconfig.json index fbc17a9140..62f75e7230 100644 --- a/types/is-promise/tsconfig.json +++ b/types/is-promise/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/is-relative-url/tsconfig.json b/types/is-relative-url/tsconfig.json index 1a85dcf51a..3304129cf5 100644 --- a/types/is-relative-url/tsconfig.json +++ b/types/is-relative-url/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-root-path/tsconfig.json b/types/is-root-path/tsconfig.json index 28d7f23893..32de5659e2 100644 --- a/types/is-root-path/tsconfig.json +++ b/types/is-root-path/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-root/tsconfig.json b/types/is-root/tsconfig.json index a92ff73369..2ec96b7950 100644 --- a/types/is-root/tsconfig.json +++ b/types/is-root/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-scoped/tsconfig.json b/types/is-scoped/tsconfig.json index e6ffa2ab86..e7cd6d168f 100644 --- a/types/is-scoped/tsconfig.json +++ b/types/is-scoped/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "is-scoped-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/is-stream/tsconfig.json b/types/is-stream/tsconfig.json index 061e555f72..711f3e885b 100644 --- a/types/is-stream/tsconfig.json +++ b/types/is-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-svg/tsconfig.json b/types/is-svg/tsconfig.json index 2621a88907..ee19bf61d4 100644 --- a/types/is-svg/tsconfig.json +++ b/types/is-svg/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-text-path/tsconfig.json b/types/is-text-path/tsconfig.json index e6587abf96..f68781ca5a 100644 --- a/types/is-text-path/tsconfig.json +++ b/types/is-text-path/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-url-superb/tsconfig.json b/types/is-url-superb/tsconfig.json index 3450e58a06..5af295cadb 100644 --- a/types/is-url-superb/tsconfig.json +++ b/types/is-url-superb/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-url/tsconfig.json b/types/is-url/tsconfig.json index 56f15b7e2f..a7c0ef487f 100644 --- a/types/is-url/tsconfig.json +++ b/types/is-url/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is-windows/tsconfig.json b/types/is-windows/tsconfig.json index 8696d92fe0..36ec2df909 100644 --- a/types/is-windows/tsconfig.json +++ b/types/is-windows/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/is/tsconfig.json b/types/is/tsconfig.json index 9abe3bbe43..90cdd21fd2 100644 --- a/types/is/tsconfig.json +++ b/types/is/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/isbn-utils/tsconfig.json b/types/isbn-utils/tsconfig.json index 9414c7c040..0077524e45 100644 --- a/types/isbn-utils/tsconfig.json +++ b/types/isbn-utils/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/iscroll/tsconfig.json b/types/iscroll/tsconfig.json index 7a1ec2a51b..b7dad3520e 100644 --- a/types/iscroll/tsconfig.json +++ b/types/iscroll/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/iscroll/v4/tsconfig.json b/types/iscroll/v4/tsconfig.json index 2b09269531..4e6115127e 100644 --- a/types/iscroll/v4/tsconfig.json +++ b/types/iscroll/v4/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ismobilejs/tsconfig.json b/types/ismobilejs/tsconfig.json index ae9975d94e..748e1fff6f 100644 --- a/types/ismobilejs/tsconfig.json +++ b/types/ismobilejs/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "ismobilejs-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/iso-3166-2/tsconfig.json b/types/iso-3166-2/tsconfig.json index 0e374a83fc..2cdbb59c54 100644 --- a/types/iso-3166-2/tsconfig.json +++ b/types/iso-3166-2/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/iso8601-localizer/tsconfig.json b/types/iso8601-localizer/tsconfig.json index e245ca21c0..01a65dcdc4 100644 --- a/types/iso8601-localizer/tsconfig.json +++ b/types/iso8601-localizer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/isomorphic-fetch/tsconfig.json b/types/isomorphic-fetch/tsconfig.json index f3cc715548..08c197c40f 100644 --- a/types/isomorphic-fetch/tsconfig.json +++ b/types/isomorphic-fetch/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/isotope-layout/tsconfig.json b/types/isotope-layout/tsconfig.json index 8afefdbd01..50c41ebda1 100644 --- a/types/isotope-layout/tsconfig.json +++ b/types/isotope-layout/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/istanbul-lib-coverage/tsconfig.json b/types/istanbul-lib-coverage/tsconfig.json index 433ba89644..76754f3471 100644 --- a/types/istanbul-lib-coverage/tsconfig.json +++ b/types/istanbul-lib-coverage/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/istanbul-lib-hook/tsconfig.json b/types/istanbul-lib-hook/tsconfig.json index c010a0879b..45ad7e8ff7 100644 --- a/types/istanbul-lib-hook/tsconfig.json +++ b/types/istanbul-lib-hook/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/istanbul-lib-instrument/tsconfig.json b/types/istanbul-lib-instrument/tsconfig.json index 60629254a0..751abe74b0 100644 --- a/types/istanbul-lib-instrument/tsconfig.json +++ b/types/istanbul-lib-instrument/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/istanbul-lib-report/tsconfig.json b/types/istanbul-lib-report/tsconfig.json index 782aa1860c..644e91130d 100644 --- a/types/istanbul-lib-report/tsconfig.json +++ b/types/istanbul-lib-report/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/istanbul-lib-source-maps/tsconfig.json b/types/istanbul-lib-source-maps/tsconfig.json index ca94b106d7..9f1c37f7d7 100644 --- a/types/istanbul-lib-source-maps/tsconfig.json +++ b/types/istanbul-lib-source-maps/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/istanbul-middleware/tsconfig.json b/types/istanbul-middleware/tsconfig.json index 3bba961c04..153ab73a0e 100644 --- a/types/istanbul-middleware/tsconfig.json +++ b/types/istanbul-middleware/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/istanbul-reports/tsconfig.json b/types/istanbul-reports/tsconfig.json index 1f43d5038d..51c7eb3d46 100644 --- a/types/istanbul-reports/tsconfig.json +++ b/types/istanbul-reports/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/istanbul/tsconfig.json b/types/istanbul/tsconfig.json index 723eb394c5..ab009bb79a 100644 --- a/types/istanbul/tsconfig.json +++ b/types/istanbul/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ityped/tsconfig.json b/types/ityped/tsconfig.json index 2f2ceabe67..5530043548 100644 --- a/types/ityped/tsconfig.json +++ b/types/ityped/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ix.js/tsconfig.json b/types/ix.js/tsconfig.json index c840c77d73..3196f7e1c3 100644 --- a/types/ix.js/tsconfig.json +++ b/types/ix.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jade/tsconfig.json b/types/jade/tsconfig.json index f1c2b94f05..b7a356ca2f 100644 --- a/types/jade/tsconfig.json +++ b/types/jade/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jake/tsconfig.json b/types/jake/tsconfig.json index 5a5e5fcbd8..0f6b6131c4 100644 --- a/types/jake/tsconfig.json +++ b/types/jake/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jalaali-js/tsconfig.json b/types/jalaali-js/tsconfig.json index 995b501496..baf80ea66d 100644 --- a/types/jalaali-js/tsconfig.json +++ b/types/jalaali-js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/japanese-holidays/tsconfig.json b/types/japanese-holidays/tsconfig.json index 1d8aeb27d0..44daea5b5c 100644 --- a/types/japanese-holidays/tsconfig.json +++ b/types/japanese-holidays/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jasmine-ajax/tsconfig.json b/types/jasmine-ajax/tsconfig.json index 01c73a745d..a0fc138c79 100644 --- a/types/jasmine-ajax/tsconfig.json +++ b/types/jasmine-ajax/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jasmine-data_driven_tests/tsconfig.json b/types/jasmine-data_driven_tests/tsconfig.json index 232e012191..1e82970117 100644 --- a/types/jasmine-data_driven_tests/tsconfig.json +++ b/types/jasmine-data_driven_tests/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jasmine-enzyme/tsconfig.json b/types/jasmine-enzyme/tsconfig.json index 6b63fe9694..bf83f1b6f4 100644 --- a/types/jasmine-enzyme/tsconfig.json +++ b/types/jasmine-enzyme/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jasmine-es6-promise-matchers/tsconfig.json b/types/jasmine-es6-promise-matchers/tsconfig.json index 98d8f03e42..876eee95ac 100644 --- a/types/jasmine-es6-promise-matchers/tsconfig.json +++ b/types/jasmine-es6-promise-matchers/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jasmine-fixture/tsconfig.json b/types/jasmine-fixture/tsconfig.json index 149810b10a..ca506e5adb 100644 --- a/types/jasmine-fixture/tsconfig.json +++ b/types/jasmine-fixture/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jasmine-given/tsconfig.json b/types/jasmine-given/tsconfig.json index d1b9541f2c..57bd58c328 100644 --- a/types/jasmine-given/tsconfig.json +++ b/types/jasmine-given/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jasmine-jquery/tsconfig.json b/types/jasmine-jquery/tsconfig.json index ac43f3d18c..dc5f7f00d7 100644 --- a/types/jasmine-jquery/tsconfig.json +++ b/types/jasmine-jquery/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jasmine-matchers/tsconfig.json b/types/jasmine-matchers/tsconfig.json index 943271914e..fb7d43b96b 100644 --- a/types/jasmine-matchers/tsconfig.json +++ b/types/jasmine-matchers/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jasmine-node/tsconfig.json b/types/jasmine-node/tsconfig.json index 2b68e61c60..2cc45d7d2a 100644 --- a/types/jasmine-node/tsconfig.json +++ b/types/jasmine-node/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jasmine-promise-matchers/tsconfig.json b/types/jasmine-promise-matchers/tsconfig.json index 0b264e6527..66af9a8c08 100644 --- a/types/jasmine-promise-matchers/tsconfig.json +++ b/types/jasmine-promise-matchers/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jasmine/tsconfig.json b/types/jasmine/tsconfig.json index 55b83c6d3a..8cf9b9c42b 100644 --- a/types/jasmine/tsconfig.json +++ b/types/jasmine/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } -} +} \ No newline at end of file diff --git a/types/jasmine/v1/tsconfig.json b/types/jasmine/v1/tsconfig.json index 99a9fb48b4..35dd7f72b3 100644 --- a/types/jasmine/v1/tsconfig.json +++ b/types/jasmine/v1/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jasmine_dom_matchers/tsconfig.json b/types/jasmine_dom_matchers/tsconfig.json index 4b09a5d93a..c806488fe6 100644 --- a/types/jasmine_dom_matchers/tsconfig.json +++ b/types/jasmine_dom_matchers/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jasminewd2/tsconfig.json b/types/jasminewd2/tsconfig.json index 2267f75819..595a34e1b8 100644 --- a/types/jasminewd2/tsconfig.json +++ b/types/jasminewd2/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/java-applet/tsconfig.json b/types/java-applet/tsconfig.json index 776886e3f1..ae0ec396fd 100644 --- a/types/java-applet/tsconfig.json +++ b/types/java-applet/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/java/tsconfig.json b/types/java/tsconfig.json index 9f5ed2d241..6c47c1241c 100644 --- a/types/java/tsconfig.json +++ b/types/java/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/javascript-astar/tsconfig.json b/types/javascript-astar/tsconfig.json index 6ca80fa293..8c40ff7635 100644 --- a/types/javascript-astar/tsconfig.json +++ b/types/javascript-astar/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/javascript-bignum/tsconfig.json b/types/javascript-bignum/tsconfig.json index d6a0961172..af86ab51b2 100644 --- a/types/javascript-bignum/tsconfig.json +++ b/types/javascript-bignum/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/javascript-obfuscator/tsconfig.json b/types/javascript-obfuscator/tsconfig.json index 5b53fa94db..8c5281c864 100644 --- a/types/javascript-obfuscator/tsconfig.json +++ b/types/javascript-obfuscator/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/javascript-state-machine/tsconfig.json b/types/javascript-state-machine/tsconfig.json index 75ccb2b212..44662c9100 100644 --- a/types/javascript-state-machine/tsconfig.json +++ b/types/javascript-state-machine/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jbinary/tsconfig.json b/types/jbinary/tsconfig.json index d272b54223..6c9f35a340 100644 --- a/types/jbinary/tsconfig.json +++ b/types/jbinary/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jcanvas/tsconfig.json b/types/jcanvas/tsconfig.json index 9c6aa5edbe..4bd7257d69 100644 --- a/types/jcanvas/tsconfig.json +++ b/types/jcanvas/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jdataview/tsconfig.json b/types/jdataview/tsconfig.json index 230f748dfe..67864c6551 100644 --- a/types/jdataview/tsconfig.json +++ b/types/jdataview/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jdenticon/tsconfig.json b/types/jdenticon/tsconfig.json index cb462ee4d6..1ae5237495 100644 --- a/types/jdenticon/tsconfig.json +++ b/types/jdenticon/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jee-jsf/tsconfig.json b/types/jee-jsf/tsconfig.json index 36364a83fa..3742e2c21b 100644 --- a/types/jee-jsf/tsconfig.json +++ b/types/jee-jsf/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jenkins/jenkins-tests.ts b/types/jenkins/jenkins-tests.ts index 98b30d4b73..9f45c7053b 100644 --- a/types/jenkins/jenkins-tests.ts +++ b/types/jenkins/jenkins-tests.ts @@ -1,4 +1,4 @@ -import * as J from 'jenkins'; +import J = require('jenkins'); const jenkins = J({ baseUrl: 'http://user:pass@localhost:8080', crumbIssuer: true }); diff --git a/types/jenkins/tsconfig.json b/types/jenkins/tsconfig.json index 08dc07dbe9..44e042dc79 100644 --- a/types/jenkins/tsconfig.json +++ b/types/jenkins/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jest-diff/tsconfig.json b/types/jest-diff/tsconfig.json index 3624e1778b..8c945026ff 100644 --- a/types/jest-diff/tsconfig.json +++ b/types/jest-diff/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "jest-diff-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/jest-docblock/tsconfig.json b/types/jest-docblock/tsconfig.json index 4b1181bdad..e33cc9e573 100644 --- a/types/jest-docblock/tsconfig.json +++ b/types/jest-docblock/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jest-get-type/tsconfig.json b/types/jest-get-type/tsconfig.json index d1e6fac5ee..9827885143 100644 --- a/types/jest-get-type/tsconfig.json +++ b/types/jest-get-type/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "jest-get-type-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/jest-in-case/tsconfig.json b/types/jest-in-case/tsconfig.json index a561ae813a..c84b4c71cd 100644 --- a/types/jest-in-case/tsconfig.json +++ b/types/jest-in-case/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "jest-in-case-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/jest-json-schema/tsconfig.json b/types/jest-json-schema/tsconfig.json index e8d55cbd89..72a4cfb23c 100644 --- a/types/jest-json-schema/tsconfig.json +++ b/types/jest-json-schema/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "jest-json-schema-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/jest-matcher-utils/tsconfig.json b/types/jest-matcher-utils/tsconfig.json index 115b762386..3a647a09a9 100644 --- a/types/jest-matcher-utils/tsconfig.json +++ b/types/jest-matcher-utils/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "jest-matcher-utils-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/jest-matchers/tsconfig.json b/types/jest-matchers/tsconfig.json index 123b605779..b3c1b8d9b8 100644 --- a/types/jest-matchers/tsconfig.json +++ b/types/jest-matchers/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jest-validate/tsconfig.json b/types/jest-validate/tsconfig.json index 5b8abec385..0851710463 100644 --- a/types/jest-validate/tsconfig.json +++ b/types/jest-validate/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jest/tsconfig.json b/types/jest/tsconfig.json index 8a02004840..fe92564343 100644 --- a/types/jest/tsconfig.json +++ b/types/jest/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jest/v16/tsconfig.json b/types/jest/v16/tsconfig.json index faf67cd73a..61038de4d6 100644 --- a/types/jest/v16/tsconfig.json +++ b/types/jest/v16/tsconfig.json @@ -23,7 +23,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jfp/tsconfig.json b/types/jfp/tsconfig.json index 81402f37d4..c75ebb5e7a 100644 --- a/types/jfp/tsconfig.json +++ b/types/jfp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jfs/tsconfig.json b/types/jfs/tsconfig.json index 2fd6c9f41b..8206817563 100644 --- a/types/jfs/tsconfig.json +++ b/types/jfs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jjv/tsconfig.json b/types/jjv/tsconfig.json index ce2a0343d8..0f6e9fe75f 100644 --- a/types/jjv/tsconfig.json +++ b/types/jjv/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jjve/tsconfig.json b/types/jjve/tsconfig.json index 12f97579f7..823b7b8df1 100644 --- a/types/jjve/tsconfig.json +++ b/types/jjve/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jmespath/tsconfig.json b/types/jmespath/tsconfig.json index 1b416d36d1..6b4bfc2810 100644 --- a/types/jmespath/tsconfig.json +++ b/types/jmespath/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/johnny-five/index.d.ts b/types/johnny-five/index.d.ts index 95a348429d..a1ff5d3f59 100644 --- a/types/johnny-five/index.d.ts +++ b/types/johnny-five/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/rwaldron/johnny-five // Definitions by: Toshiya Nakakura // Zoltan Ujvary +// Simon Colmer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -290,30 +291,6 @@ export declare class IMU { } export declare module IR { - export interface MotionOption { - pin: number | string; - } - - export class Motion { - constructor(option: number | MotionOption); - on(event: string, cb: () => void): this; - on(event: "data", cb: (data: any) => void): this; - on(event: "motionstart", cb: () => void): this; - on(event: "motionend", cb: () => void): this; - on(event: "calibrated", cb: () => void): this; - } - - export interface PloximityOption { - pin: number | string; - controller: string; - } - - export class Proximity { - constructor(option: number | PloximityOption); - on(event: string, cb: () => void): this; - on(event: "data", cb: (data: any) => void): this; - on(event: "change", cb: () => void): this; - } export interface ArrayOption { pins: Array | Array; @@ -521,6 +498,19 @@ export declare module Led { } } +export interface MotionOption { + pin: number | string; +} + +export class Motion { + constructor(option: number | MotionOption); + on(event: string, cb: () => void): this; + on(event: "data", cb: (data: any) => void): this; + on(event: "motionstart", cb: () => void): this; + on(event: "motionend", cb: () => void): this; + on(event: "calibrated", cb: () => void): this; +} + export interface MotorOption { pins: any; current?: any; @@ -629,6 +619,23 @@ export declare class Ping { constructor(option: number | PingOption); } +export declare interface ProximityOption { + pin: number | string; + controller: string; +} + +export declare interface ProximityData { + cm: number; + in: number; +} + +export declare class Proximity { + constructor(option: number | ProximityOption); + on(event: string, cb: () => void): this; + on(event: "data", cb: (data: ProximityData) => void): this; + on(event: "change", cb: () => void): this; +} + export interface RelayOption { pin: number | string; type?: string; diff --git a/types/johnny-five/johnny-five-tests.ts b/types/johnny-five/johnny-five-tests.ts index 72e7d04b07..b2dd24904e 100644 --- a/types/johnny-five/johnny-five-tests.ts +++ b/types/johnny-five/johnny-five-tests.ts @@ -71,14 +71,14 @@ board.on('ready', function(){ freq: 100 // optional }); - var motion = new five.IR.Motion(7); + var motion = new five.Motion(7); // Options object with pin property - var motion = new five.IR.Motion({ + var motion = new five.Motion({ pin: 7 }); - var proximity = new five.IR.Proximity({ + var proximity = new five.Proximity({ controller: "GP2Y0A21YK", pin: "A0" }); diff --git a/types/johnny-five/tsconfig.json b/types/johnny-five/tsconfig.json index 5218cc5e2b..f58cec6814 100644 --- a/types/johnny-five/tsconfig.json +++ b/types/johnny-five/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/joi/tsconfig.json b/types/joi/tsconfig.json index 57e6c47881..1229f9503e 100644 --- a/types/joi/tsconfig.json +++ b/types/joi/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "joi-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/joi/v10/tsconfig.json b/types/joi/v10/tsconfig.json index 1bd530aff0..52855d5713 100644 --- a/types/joi/v10/tsconfig.json +++ b/types/joi/v10/tsconfig.json @@ -19,10 +19,11 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "joi-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/joi/v6/tsconfig.json b/types/joi/v6/tsconfig.json index 75aacbeeea..13d053b4d4 100644 --- a/types/joi/v6/tsconfig.json +++ b/types/joi/v6/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/joigoose/joigoose-tests.ts b/types/joigoose/joigoose-tests.ts index 91e36d827c..50cb29deef 100644 --- a/types/joigoose/joigoose-tests.ts +++ b/types/joigoose/joigoose-tests.ts @@ -1,4 +1,4 @@ -import * as Joigoose from "joigoose"; +import Joigoose = require("joigoose"); import * as Mongoose from "mongoose"; import * as Joi from "joi"; diff --git a/types/joigoose/tsconfig.json b/types/joigoose/tsconfig.json index 05aa2fd1c2..172e39fae9 100644 --- a/types/joigoose/tsconfig.json +++ b/types/joigoose/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/josa/tsconfig.json b/types/josa/tsconfig.json index 0c56aa9a72..98786984f3 100644 --- a/types/josa/tsconfig.json +++ b/types/josa/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "josa-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/jpeg-js/tsconfig.json b/types/jpeg-js/tsconfig.json index 20d7ba3d8d..09b8b89141 100644 --- a/types/jpeg-js/tsconfig.json +++ b/types/jpeg-js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jpm/tsconfig.json b/types/jpm/tsconfig.json index 257f95eafa..7934ed544d 100644 --- a/types/jpm/tsconfig.json +++ b/types/jpm/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jqgrid/tsconfig.json b/types/jqgrid/tsconfig.json index fd6e8c36a2..4872ce6ec3 100644 --- a/types/jqgrid/tsconfig.json +++ b/types/jqgrid/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jqrangeslider/tsconfig.json b/types/jqrangeslider/tsconfig.json index 9c8eabeb88..e7b62c7c06 100644 --- a/types/jqrangeslider/tsconfig.json +++ b/types/jqrangeslider/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-ajax-chain/tsconfig.json b/types/jquery-ajax-chain/tsconfig.json index 58a43cc65e..b7f9b3ac86 100644 --- a/types/jquery-ajax-chain/tsconfig.json +++ b/types/jquery-ajax-chain/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-alertable/tsconfig.json b/types/jquery-alertable/tsconfig.json index ca545d4a12..026ddd56c1 100644 --- a/types/jquery-alertable/tsconfig.json +++ b/types/jquery-alertable/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-awesome-cursor/index.d.ts b/types/jquery-awesome-cursor/index.d.ts new file mode 100644 index 0000000000..1137b16b75 --- /dev/null +++ b/types/jquery-awesome-cursor/index.d.ts @@ -0,0 +1,34 @@ +// Type definitions for jquery-awesome-cursor 0.3 +// Project: https://jwarby.github.io/jquery-awesome-cursor +// Definitions by: Zsolt Kovács +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// +declare namespace JQueryAwesomeCursor { + type flip = "horizontal" | "vertical" | "both"; + type cssHandler = (name: string) => void; + + interface Options { + color?: string; + size?: number; + hotspot?: number[] | string; + flip?: flip; + rotate?: number; + outline?: string; + font?: Font; + } + + interface Font { + family: string; + cssClass: string | cssHandler; + } +} + +interface JQueryStatic { + awesomeCursor(icon: string, options?: JQueryAwesomeCursor.Options): JQuery; +} + +interface JQuery { + awesomeCursor(icon: string, options?: JQueryAwesomeCursor.Options): JQuery; +} diff --git a/types/jquery-awesome-cursor/jquery-awesome-cursor-tests.ts b/types/jquery-awesome-cursor/jquery-awesome-cursor-tests.ts new file mode 100644 index 0000000000..cd47f56ff9 --- /dev/null +++ b/types/jquery-awesome-cursor/jquery-awesome-cursor-tests.ts @@ -0,0 +1,64 @@ +// Default +jQuery.awesomeCursor('pencil'); + +// Color +jQuery.awesomeCursor('pencil', { + color: '#ff0000' +}); + +// Size +jQuery.awesomeCursor('pencil', { + size: 32 +}); + +// Hotspot +jQuery.awesomeCursor('pencil', { + hotspot: [0, 17] +}); +jQuery.awesomeCursor('pencil', { + hotspot: 'bottom left' +}); + +// Flip +jQuery.awesomeCursor('pencil', { + flip: 'horizontal' +}); +jQuery.awesomeCursor('pencil', { + flip: 'vertical' +}); +jQuery.awesomeCursor('pencil', { + flip: 'both' +}); + +// Rotate +jQuery.awesomeCursor('pencil', { + rotate: 45 +}); + +// Outline +jQuery.awesomeCursor('pencil', { + outline: 'red' +}); + +// Different font +jQuery.awesomeCursor('brush', { + font: { + family: 'typicons', + cssClass: 'typcn typcn-%s' + } +}); +jQuery.awesomeCursor('brush', { + font: { + family: 'typicons', + cssClass: (name) => { + return 'typcn typcn-' + name; + } + } +}); + +// Mixed +jQuery.awesomeCursor('long-arrow-left', { + color: 'red', + hotspot: 'top left', + rotate: 45, +}); diff --git a/types/jquery-awesome-cursor/tsconfig.json b/types/jquery-awesome-cursor/tsconfig.json new file mode 100644 index 0000000000..b2e301a8b8 --- /dev/null +++ b/types/jquery-awesome-cursor/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "jquery-awesome-cursor-tests.ts" + ] +} \ No newline at end of file diff --git a/types/jquery-awesome-cursor/tslint.json b/types/jquery-awesome-cursor/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jquery-awesome-cursor/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jquery-backstretch/tsconfig.json b/types/jquery-backstretch/tsconfig.json index c2fb9bc82f..586b25464e 100644 --- a/types/jquery-backstretch/tsconfig.json +++ b/types/jquery-backstretch/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-cropbox/tsconfig.json b/types/jquery-cropbox/tsconfig.json index 8ff494d309..3434909492 100644 --- a/types/jquery-cropbox/tsconfig.json +++ b/types/jquery-cropbox/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-deparam/tsconfig.json b/types/jquery-deparam/tsconfig.json index b7d9a9d091..9f1b087687 100644 --- a/types/jquery-deparam/tsconfig.json +++ b/types/jquery-deparam/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-easy-loading/tsconfig.json b/types/jquery-easy-loading/tsconfig.json index c6c8a6a160..7e12f37ffe 100644 --- a/types/jquery-easy-loading/tsconfig.json +++ b/types/jquery-easy-loading/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-editable-select/tsconfig.json b/types/jquery-editable-select/tsconfig.json index a284c442fa..fc9904fdb8 100644 --- a/types/jquery-editable-select/tsconfig.json +++ b/types/jquery-editable-select/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-fullscreen/tsconfig.json b/types/jquery-fullscreen/tsconfig.json index 81b275bff5..dc4e20c177 100644 --- a/types/jquery-fullscreen/tsconfig.json +++ b/types/jquery-fullscreen/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-galleria/tsconfig.json b/types/jquery-galleria/tsconfig.json index c082643a87..96c948f924 100644 --- a/types/jquery-galleria/tsconfig.json +++ b/types/jquery-galleria/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-handsontable/tsconfig.json b/types/jquery-handsontable/tsconfig.json index fac1311bb7..aa39ff119c 100644 --- a/types/jquery-handsontable/tsconfig.json +++ b/types/jquery-handsontable/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-jcrop/tsconfig.json b/types/jquery-jcrop/tsconfig.json index add23691c0..895906f145 100644 --- a/types/jquery-jcrop/tsconfig.json +++ b/types/jquery-jcrop/tsconfig.json @@ -1,24 +1,25 @@ { - "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", - "jquery-jcrop-tests.ts" - ] + "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-jcrop-tests.ts" + ] } \ No newline at end of file diff --git a/types/jquery-jsonrpcclient/tsconfig.json b/types/jquery-jsonrpcclient/tsconfig.json index 812781d6cc..b410a68acf 100644 --- a/types/jquery-jsonrpcclient/tsconfig.json +++ b/types/jquery-jsonrpcclient/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-knob/tsconfig.json b/types/jquery-knob/tsconfig.json index c177f5a019..d5913373b8 100644 --- a/types/jquery-knob/tsconfig.json +++ b/types/jquery-knob/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-mask-plugin/index.d.ts b/types/jquery-mask-plugin/index.d.ts index a142d0a97e..342045a204 100644 --- a/types/jquery-mask-plugin/index.d.ts +++ b/types/jquery-mask-plugin/index.d.ts @@ -1,6 +1,8 @@ // Type definitions for jQuery Mask Plugin 1.14 // Project: https://igorescobar.github.io/jQuery-Mask-Plugin/ -// Definitions by: Anže Videnič , Igor Escobar +// Definitions by: Anže Videnič +// Igor Escobar +// Anderson Friaça // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -25,6 +27,7 @@ declare namespace jQueryMask { selectOnFocus?: boolean; reverse?: boolean; clearIfNotMatch?: boolean; + placeholder?: string; onComplete?(value: string, e: Event, $element: JQuery, options: Options): void; onKeyPress?(value: string, e: Event, $element: JQuery, options: Options): void; onChange?(value: string, e: Event, $element: JQuery, options: Options): void; diff --git a/types/jquery-mask-plugin/jquery-mask-plugin-tests.ts b/types/jquery-mask-plugin/jquery-mask-plugin-tests.ts index 310cec421b..90ac9f7a00 100644 --- a/types/jquery-mask-plugin/jquery-mask-plugin-tests.ts +++ b/types/jquery-mask-plugin/jquery-mask-plugin-tests.ts @@ -27,6 +27,9 @@ $(document).ready(() => { placeholder: "__/__/____" } }); + $('.placeholder2').mask("00/00/0000", { + placeholder: "__/__/____" + }); $('.fallback').mask("00r00r0000", { translation: { r: { diff --git a/types/jquery-mask-plugin/tsconfig.json b/types/jquery-mask-plugin/tsconfig.json index 21be524f87..98c8d3d4e3 100644 --- a/types/jquery-mask-plugin/tsconfig.json +++ b/types/jquery-mask-plugin/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-match-height/tsconfig.json b/types/jquery-match-height/tsconfig.json index 103ae84843..9c83d33574 100644 --- a/types/jquery-match-height/tsconfig.json +++ b/types/jquery-match-height/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-mockjax/tsconfig.json b/types/jquery-mockjax/tsconfig.json index 42505b57a0..3f3116e2e7 100644 --- a/types/jquery-mockjax/tsconfig.json +++ b/types/jquery-mockjax/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-mousewheel/tsconfig.json b/types/jquery-mousewheel/tsconfig.json index 7fe74c814f..bae05cac1a 100644 --- a/types/jquery-mousewheel/tsconfig.json +++ b/types/jquery-mousewheel/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-notifier/tsconfig.json b/types/jquery-notifier/tsconfig.json index b2178bf718..40548bb50d 100644 --- a/types/jquery-notifier/tsconfig.json +++ b/types/jquery-notifier/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "jquery-notifier-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/jquery-param/tsconfig.json b/types/jquery-param/tsconfig.json index 65999b18ff..ab66910efe 100644 --- a/types/jquery-param/tsconfig.json +++ b/types/jquery-param/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-sortable/tsconfig.json b/types/jquery-sortable/tsconfig.json index 2a77692104..1e6c616f02 100644 --- a/types/jquery-sortable/tsconfig.json +++ b/types/jquery-sortable/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-steps/tsconfig.json b/types/jquery-steps/tsconfig.json index 5af8c482b0..e1a0b04e2b 100644 --- a/types/jquery-steps/tsconfig.json +++ b/types/jquery-steps/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-sticky/tsconfig.json b/types/jquery-sticky/tsconfig.json index 1981e2e74c..fd83e8263c 100644 --- a/types/jquery-sticky/tsconfig.json +++ b/types/jquery-sticky/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-tags-input/index.d.ts b/types/jquery-tags-input/index.d.ts new file mode 100644 index 0000000000..612d57da52 --- /dev/null +++ b/types/jquery-tags-input/index.d.ts @@ -0,0 +1,112 @@ +// Type definitions for jQuery Tags Input Plugin 1.3 +// Project: https://github.com/xoxco/jQuery-Tags-Input +// Definitions by: Anderson Friaça +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +declare namespace jQueryTagsInput { + interface Options { + /** + * Url for autocomplete + */ + autocomplete_url?: string; + + /** + * Autocomplete options + */ + autocomplete?: object; + + /** + * Height of tag + */ + height?: string; + + /** + * Width of tag + */ + width?: string; + + /** + * Interactive tags + */ + interactive?: boolean; + + /** + * Placeholder of field when tags is empty + */ + defaultText?: string; + + /** + * Callback function on add tag + */ + onAddTag?: (addedValue: string) => void; + + /** + * Callback function on remove tag + */ + onRemoveTag?: (removedValue: string) => void; + + /** + * Callback function on change list of tags + */ + onChange?: (element: JQuery, changedValue: string) => void; + + /** + * Delimiters on tags creation + */ + delimiter?: string[]|string; + + /** + * Remove with tag backspace + */ + removeWithBackspace ?: boolean; + + /** + * Minimun char length for tag + */ + minChars?: number; + + /** + * Max char length for tag + */ + maxChars?: number; + + /** + * Placeholder color of tags + */ + placeholderColor?: string; + } + } + interface JQuery { + /** + * Transform input field to work with tags + * @param options for creation + */ + tagsInput(options?: jQueryTagsInput.Options): JQuery; + + /** + * Add a new tag to list + * @param tag value + */ + addTag(tag: string): boolean; + + /** + * Remove tag with value from list + * @param tag to be removed + */ + removeTag(tag: string): boolean; + + /** + * Add a new tags + * @param tags string separated by delimiter + */ + importTags(tags: string): void; + + /** + * Verify if tag exists + * @param tag value + */ + tagExist(tag: string): boolean; + } diff --git a/types/jquery-tags-input/jquery-tags-input-tests.ts b/types/jquery-tags-input/jquery-tags-input-tests.ts new file mode 100644 index 0000000000..559a47a698 --- /dev/null +++ b/types/jquery-tags-input/jquery-tags-input-tests.ts @@ -0,0 +1,20 @@ +// basic usage +$(document).ready(() => { + $('#inputTag').tagsInput(); + $('#inputTag').addTag('new tag'); + $('#inputTag').tagExist('new tag'); + $('inputTag').removeTag('new tag'); + $('#inputTag').importTags('tag1, tag2, tag3'); + + // with options + const options: jQueryTagsInput.Options = { + height: '100px', + width: '300px', + minChars: 3, + maxChars: 0, + onAddTag: (value: string) => { + alert('Tag added: ' + value); + } + }; + $('#inputTag').tagsInput(options); +}); diff --git a/types/jquery-tags-input/tsconfig.json b/types/jquery-tags-input/tsconfig.json new file mode 100644 index 0000000000..09fd291b0f --- /dev/null +++ b/types/jquery-tags-input/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-tags-input-tests.ts" + ] +} \ No newline at end of file diff --git a/types/jquery-tags-input/tslint.json b/types/jquery-tags-input/tslint.json new file mode 100644 index 0000000000..d04fe2e1fa --- /dev/null +++ b/types/jquery-tags-input/tslint.json @@ -0,0 +1 @@ +{"extends": "dtslint/dt.json"} \ No newline at end of file diff --git a/types/jquery-timeentry/tsconfig.json b/types/jquery-timeentry/tsconfig.json index 0869745caf..6993709bad 100644 --- a/types/jquery-timeentry/tsconfig.json +++ b/types/jquery-timeentry/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-toastmessage-plugin/tsconfig.json b/types/jquery-toastmessage-plugin/tsconfig.json index 79e81125ce..7073dd1b27 100644 --- a/types/jquery-toastmessage-plugin/tsconfig.json +++ b/types/jquery-toastmessage-plugin/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-truncate-html/tsconfig.json b/types/jquery-truncate-html/tsconfig.json index c4ea956cac..cfe4235e9a 100644 --- a/types/jquery-truncate-html/tsconfig.json +++ b/types/jquery-truncate-html/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-urlparam/tsconfig.json b/types/jquery-urlparam/tsconfig.json index bdcb0ffebe..26820466ab 100644 --- a/types/jquery-urlparam/tsconfig.json +++ b/types/jquery-urlparam/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery-validation-unobtrusive/tsconfig.json b/types/jquery-validation-unobtrusive/tsconfig.json index 7cf39e48e0..9b3eee130c 100644 --- a/types/jquery-validation-unobtrusive/tsconfig.json +++ b/types/jquery-validation-unobtrusive/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.address/tsconfig.json b/types/jquery.address/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/jquery.address/tsconfig.json +++ b/types/jquery.address/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/jquery.are-you-sure/tsconfig.json b/types/jquery.are-you-sure/tsconfig.json index 165728a00e..1daf8cb533 100644 --- a/types/jquery.are-you-sure/tsconfig.json +++ b/types/jquery.are-you-sure/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.autosize/tsconfig.json b/types/jquery.autosize/tsconfig.json index 6cb415b04c..53f7cc67c8 100644 --- a/types/jquery.autosize/tsconfig.json +++ b/types/jquery.autosize/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.base64/tsconfig.json b/types/jquery.base64/tsconfig.json index 157bbd92d9..170b1338d6 100644 --- a/types/jquery.base64/tsconfig.json +++ b/types/jquery.base64/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.bbq/tsconfig.json b/types/jquery.bbq/tsconfig.json index 48e78a892d..24233f0897 100644 --- a/types/jquery.bbq/tsconfig.json +++ b/types/jquery.bbq/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.blockui/tsconfig.json b/types/jquery.blockui/tsconfig.json index e46b2e83ec..6a0de89f04 100644 --- a/types/jquery.blockui/tsconfig.json +++ b/types/jquery.blockui/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.bootstrap.wizard/tsconfig.json b/types/jquery.bootstrap.wizard/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/jquery.bootstrap.wizard/tsconfig.json +++ b/types/jquery.bootstrap.wizard/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/jquery.cleditor/tsconfig.json b/types/jquery.cleditor/tsconfig.json index 70f33953ab..5fedcfc36e 100644 --- a/types/jquery.cleditor/tsconfig.json +++ b/types/jquery.cleditor/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.clientsidelogging/tsconfig.json b/types/jquery.clientsidelogging/tsconfig.json index 80a2b6dbf4..fd8abca37d 100644 --- a/types/jquery.clientsidelogging/tsconfig.json +++ b/types/jquery.clientsidelogging/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.color/tsconfig.json b/types/jquery.color/tsconfig.json index 35da9bb381..16b6c64b5e 100644 --- a/types/jquery.color/tsconfig.json +++ b/types/jquery.color/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.colorbox/tsconfig.json b/types/jquery.colorbox/tsconfig.json index decbdf5578..ebd35bce20 100644 --- a/types/jquery.colorbox/tsconfig.json +++ b/types/jquery.colorbox/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.colorpicker/index.d.ts b/types/jquery.colorpicker/index.d.ts index a2098e1ef9..1ece8a3c66 100644 --- a/types/jquery.colorpicker/index.d.ts +++ b/types/jquery.colorpicker/index.d.ts @@ -31,6 +31,7 @@ interface JQueryColorpickerOptions { closeOnOutside?: boolean; color?: string; colorFormat?: string; + disabled?: boolean; draggable?: boolean; duration?: string; format?: string; @@ -38,7 +39,7 @@ interface JQueryColorpickerOptions { hsv?: boolean; inline?: boolean; inlineFrame?: boolean; - layout?: {[part: string]: number[];}; + layout?: { [part: string]: number[]; }; limit?: string; modal?: boolean; mode?: string; @@ -67,7 +68,7 @@ interface JQueryColorpickerStatic { regional: { [key: string]: string; }; swatches: { [swatch: string]: { [name: string]: JQueryColorpickerStatic.RGB; }; }; writers: { [name: string]: (color: any, that: any) => any; }; - Color: { new (r?: number, g?: number, b?: number, a?: number): JQueryColorpickerStatic.Color; }; + Color: { new(r?: number, g?: number, b?: number, a?: number): JQueryColorpickerStatic.Color; }; } declare namespace JQueryColorpickerStatic { @@ -162,6 +163,6 @@ interface JQuery { colorpicker(method: "open"): JQuery; colorpicker(method: string): JQuery; colorpicker(method: "setColor", color: any): JQuery; - colorpicker(method: string, param: any): JQuery; + colorpicker(method: string, ...params: any[]): JQuery; colorpicker(options?: JQueryColorpickerOptions): JQuery; } diff --git a/types/jquery.colorpicker/jquery.colorpicker-tests.ts b/types/jquery.colorpicker/jquery.colorpicker-tests.ts index 707e2dd7f9..7d6e5c7ce3 100644 --- a/types/jquery.colorpicker/jquery.colorpicker-tests.ts +++ b/types/jquery.colorpicker/jquery.colorpicker-tests.ts @@ -17,6 +17,7 @@ var colorpicker = $("").colorpicker({ closeOnOutside: true, // Close the dialog when clicking outside the dialog (not for inline) color: '#00FF00', // Initial color (for inline only) colorFormat: 'HEX', // Format string for output color format + disabled: false, draggable: true, // Make popup dialog draggable if header is visible. duration: 'fast', hsv: true, // Show HSV controls and modes @@ -67,6 +68,10 @@ colorpicker.colorpicker("open"); colorpicker.colorpicker("close"); colorpicker.colorpicker("destroy"); colorpicker.colorpicker("setColor", "#deadbeef"); +colorpicker.colorpicker("option", "disabled", true); + +// check if all options are optional +let defaultColorpicker = $("").colorpicker({}); // example plugins provided @@ -94,23 +99,23 @@ $.colorpicker.parts["memory"] = function (inst) { break; } }).bind('contextmenu', function (e) { - e.preventDefault(); - }); + e.preventDefault(); + }); container.append($node); }, getMemory = function () { return ((document.cookie.match(/\bcolorpicker-memory=([^;]*)/) || [0, ''])[1]).split(','); }, - setMemory = function () { - var colors = []; - $('> *', container).each(function () { - colors.push(encodeURIComponent($(this).css('backgroundColor'))); - }); - var expdate = new Date(); - expdate.setDate(expdate.getDate() + (365 * 10)); - document.cookie = 'colorpicker-memory=' + colors.join() + ";expires=" + expdate.toUTCString(); - }; + setMemory = function () { + var colors = []; + $('> *', container).each(function () { + colors.push(encodeURIComponent($(this).css('backgroundColor'))); + }); + var expdate = new Date(); + expdate.setDate(expdate.getDate() + (365 * 10)); + document.cookie = 'colorpicker-memory=' + colors.join() + ";expires=" + expdate.toUTCString(); + }; this.init = function () { container = $('
') @@ -195,7 +200,7 @@ $.colorpicker.parsers['CMYK'] = function (color) { parseInt(m[2], 10) / 255, parseInt(m[3], 10) / 255, parseInt(m[4], 10) / 255 - ); + ); } }; @@ -206,7 +211,7 @@ $.colorpicker.parsers["#HEX8"] = function (color) { parseInt(m[2], 16) / 255, parseInt(m[3], 16) / 255, parseInt(m[4], 16) / 255 - ).setAlpha(parseInt(m[1], 16) / 255); + ).setAlpha(parseInt(m[1], 16) / 255); } }; diff --git a/types/jquery.colorpicker/tsconfig.json b/types/jquery.colorpicker/tsconfig.json index f0edccd4d6..5912d60570 100644 --- a/types/jquery.colorpicker/tsconfig.json +++ b/types/jquery.colorpicker/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.contextmenu/tsconfig.json b/types/jquery.contextmenu/tsconfig.json index 2de43ba64f..4ac31577f9 100644 --- a/types/jquery.contextmenu/tsconfig.json +++ b/types/jquery.contextmenu/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.cookie/tsconfig.json b/types/jquery.cookie/tsconfig.json index 0b4c16e92a..2b976c3bb2 100644 --- a/types/jquery.cookie/tsconfig.json +++ b/types/jquery.cookie/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.customselect/tsconfig.json b/types/jquery.customselect/tsconfig.json index ce71c3244f..55a534bc45 100644 --- a/types/jquery.customselect/tsconfig.json +++ b/types/jquery.customselect/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.cycle/tsconfig.json b/types/jquery.cycle/tsconfig.json index b807c05700..3bb6527980 100644 --- a/types/jquery.cycle/tsconfig.json +++ b/types/jquery.cycle/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.cycle2/tsconfig.json b/types/jquery.cycle2/tsconfig.json index 8fe54da959..1c845b031f 100644 --- a/types/jquery.cycle2/tsconfig.json +++ b/types/jquery.cycle2/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.dropotron/tsconfig.json b/types/jquery.dropotron/tsconfig.json index c811e857c6..3df7005b1a 100644 --- a/types/jquery.dropotron/tsconfig.json +++ b/types/jquery.dropotron/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.dynatree/tsconfig.json b/types/jquery.dynatree/tsconfig.json index 1963c75cb1..6373d266c0 100644 --- a/types/jquery.dynatree/tsconfig.json +++ b/types/jquery.dynatree/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.elang/tsconfig.json b/types/jquery.elang/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/jquery.elang/tsconfig.json +++ b/types/jquery.elang/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/jquery.fancytree/tsconfig.json b/types/jquery.fancytree/tsconfig.json index bd2d2932ca..5e301086b7 100644 --- a/types/jquery.fancytree/tsconfig.json +++ b/types/jquery.fancytree/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.fileupload/tsconfig.json b/types/jquery.fileupload/tsconfig.json index ddefea0e79..ac9c3306dd 100644 --- a/types/jquery.fileupload/tsconfig.json +++ b/types/jquery.fileupload/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.filtertable/tsconfig.json b/types/jquery.filtertable/tsconfig.json index a0166c7d6b..1208bc4f98 100644 --- a/types/jquery.filtertable/tsconfig.json +++ b/types/jquery.filtertable/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.finger/tsconfig.json b/types/jquery.finger/tsconfig.json index 55be70767e..b60410ab16 100644 --- a/types/jquery.finger/tsconfig.json +++ b/types/jquery.finger/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.flagstrap/tsconfig.json b/types/jquery.flagstrap/tsconfig.json index c4bf7e1a72..25bf48af93 100644 --- a/types/jquery.flagstrap/tsconfig.json +++ b/types/jquery.flagstrap/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.form/tsconfig.json b/types/jquery.form/tsconfig.json index 02b4195224..9ea3a8c19e 100644 --- a/types/jquery.form/tsconfig.json +++ b/types/jquery.form/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.fullscreen/tsconfig.json b/types/jquery.fullscreen/tsconfig.json index bc666dcb90..46a640c552 100644 --- a/types/jquery.fullscreen/tsconfig.json +++ b/types/jquery.fullscreen/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.gridster/tsconfig.json b/types/jquery.gridster/tsconfig.json index b1e75c13e7..72f940b715 100644 --- a/types/jquery.gridster/tsconfig.json +++ b/types/jquery.gridster/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.growl/tsconfig.json b/types/jquery.growl/tsconfig.json index 8416f143a7..e28ff8e1cf 100644 --- a/types/jquery.growl/tsconfig.json +++ b/types/jquery.growl/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.highlight-bartaz/tsconfig.json b/types/jquery.highlight-bartaz/tsconfig.json index 4cbe9ddf76..c8ae44427c 100644 --- a/types/jquery.highlight-bartaz/tsconfig.json +++ b/types/jquery.highlight-bartaz/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.jnotify/tsconfig.json b/types/jquery.jnotify/tsconfig.json index abfa7d2782..d73b2d21b9 100644 --- a/types/jquery.jnotify/tsconfig.json +++ b/types/jquery.jnotify/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.joyride/tsconfig.json b/types/jquery.joyride/tsconfig.json index cf307a3611..c1e0a54e00 100644 --- a/types/jquery.joyride/tsconfig.json +++ b/types/jquery.joyride/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.jsignature/tsconfig.json b/types/jquery.jsignature/tsconfig.json index c802539b0a..e0a05e7e70 100644 --- a/types/jquery.jsignature/tsconfig.json +++ b/types/jquery.jsignature/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.leanmodal/tsconfig.json b/types/jquery.leanmodal/tsconfig.json index 3625769dde..91fbecca25 100644 --- a/types/jquery.leanmodal/tsconfig.json +++ b/types/jquery.leanmodal/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.livestampjs/tsconfig.json b/types/jquery.livestampjs/tsconfig.json index 4042cffe68..6f8e48e2c5 100644 --- a/types/jquery.livestampjs/tsconfig.json +++ b/types/jquery.livestampjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.menuaim/tsconfig.json b/types/jquery.menuaim/tsconfig.json index c63cface62..937edcefb8 100644 --- a/types/jquery.menuaim/tsconfig.json +++ b/types/jquery.menuaim/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.mmenu/tsconfig.json b/types/jquery.mmenu/tsconfig.json index f95d7a3e93..c7f027625c 100644 --- a/types/jquery.mmenu/tsconfig.json +++ b/types/jquery.mmenu/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.notify/tsconfig.json b/types/jquery.notify/tsconfig.json index e703d61e37..07f6bf60ae 100644 --- a/types/jquery.notify/tsconfig.json +++ b/types/jquery.notify/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.notifybar/tsconfig.json b/types/jquery.notifybar/tsconfig.json index 7541f17487..88ec6786be 100644 --- a/types/jquery.notifybar/tsconfig.json +++ b/types/jquery.notifybar/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.noty/tsconfig.json b/types/jquery.noty/tsconfig.json index fa1c069762..b4076b50e2 100644 --- a/types/jquery.noty/tsconfig.json +++ b/types/jquery.noty/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/jquery.payment/tsconfig.json b/types/jquery.payment/tsconfig.json index 84e6f1c89a..e73add9f7c 100644 --- a/types/jquery.payment/tsconfig.json +++ b/types/jquery.payment/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.pjax/tsconfig.json b/types/jquery.pjax/tsconfig.json index 5d692dbfe4..7081f4c0fe 100644 --- a/types/jquery.pjax/tsconfig.json +++ b/types/jquery.pjax/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.placeholder/tsconfig.json b/types/jquery.placeholder/tsconfig.json index 40c034b33b..2f77fd3f6e 100644 --- a/types/jquery.placeholder/tsconfig.json +++ b/types/jquery.placeholder/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.pnotify/tsconfig.json b/types/jquery.pnotify/tsconfig.json index a7ad412326..be462cb2a5 100644 --- a/types/jquery.pnotify/tsconfig.json +++ b/types/jquery.pnotify/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.postmessage/tsconfig.json b/types/jquery.postmessage/tsconfig.json index dffccae0cd..a3f5056acf 100644 --- a/types/jquery.postmessage/tsconfig.json +++ b/types/jquery.postmessage/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.prettyphoto/tsconfig.json b/types/jquery.prettyphoto/tsconfig.json index c35b1d3718..5417cd1ec3 100644 --- a/types/jquery.prettyphoto/tsconfig.json +++ b/types/jquery.prettyphoto/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.qrcode/tsconfig.json b/types/jquery.qrcode/tsconfig.json index bfa114d23a..0b29ab63bc 100644 --- a/types/jquery.qrcode/tsconfig.json +++ b/types/jquery.qrcode/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.rateit/tsconfig.json b/types/jquery.rateit/tsconfig.json index a2ab54ec3b..95c69f6aaa 100644 --- a/types/jquery.rateit/tsconfig.json +++ b/types/jquery.rateit/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.rowgrid/tsconfig.json b/types/jquery.rowgrid/tsconfig.json index 452aaeee8b..5022e720a4 100644 --- a/types/jquery.rowgrid/tsconfig.json +++ b/types/jquery.rowgrid/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.scrollto/tsconfig.json b/types/jquery.scrollto/tsconfig.json index 587136c6c3..e87036509d 100644 --- a/types/jquery.scrollto/tsconfig.json +++ b/types/jquery.scrollto/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.simplemodal/tsconfig.json b/types/jquery.simplemodal/tsconfig.json index 24b60b0f81..f494541240 100644 --- a/types/jquery.simplemodal/tsconfig.json +++ b/types/jquery.simplemodal/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.simplepagination/tsconfig.json b/types/jquery.simplepagination/tsconfig.json index fa188d40ae..424e397b5a 100644 --- a/types/jquery.simplepagination/tsconfig.json +++ b/types/jquery.simplepagination/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.simulate/tsconfig.json b/types/jquery.simulate/tsconfig.json index c1586267bc..09236d4a4d 100644 --- a/types/jquery.simulate/tsconfig.json +++ b/types/jquery.simulate/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.slimscroll/tsconfig.json b/types/jquery.slimscroll/tsconfig.json index d6acf16f4e..2a510b3ab0 100644 --- a/types/jquery.slimscroll/tsconfig.json +++ b/types/jquery.slimscroll/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.soap/tsconfig.json b/types/jquery.soap/tsconfig.json index 30c25fedd2..bd14eab5f7 100644 --- a/types/jquery.soap/tsconfig.json +++ b/types/jquery.soap/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.sortelements/tsconfig.json b/types/jquery.sortelements/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/jquery.sortelements/tsconfig.json +++ b/types/jquery.sortelements/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/jquery.superlink/tsconfig.json b/types/jquery.superlink/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/jquery.superlink/tsconfig.json +++ b/types/jquery.superlink/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/jquery.tagsmanager/tsconfig.json b/types/jquery.tagsmanager/tsconfig.json index 26ae59c2ef..f392a0fa22 100644 --- a/types/jquery.tagsmanager/tsconfig.json +++ b/types/jquery.tagsmanager/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.tile/tsconfig.json b/types/jquery.tile/tsconfig.json index 4dd9e0f2ed..00e7676d4a 100644 --- a/types/jquery.tile/tsconfig.json +++ b/types/jquery.tile/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.timeago/tsconfig.json b/types/jquery.timeago/tsconfig.json index 9d61fbd512..417dc84d46 100644 --- a/types/jquery.timeago/tsconfig.json +++ b/types/jquery.timeago/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.timepicker/tsconfig.json b/types/jquery.timepicker/tsconfig.json index 6536dcca3b..05a7466732 100644 --- a/types/jquery.timepicker/tsconfig.json +++ b/types/jquery.timepicker/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.timer/tsconfig.json b/types/jquery.timer/tsconfig.json index 166eec6bc1..86bfbd69e7 100644 --- a/types/jquery.timer/tsconfig.json +++ b/types/jquery.timer/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.tinycarousel/tsconfig.json b/types/jquery.tinycarousel/tsconfig.json index f8b4040854..fd0744014b 100644 --- a/types/jquery.tinycarousel/tsconfig.json +++ b/types/jquery.tinycarousel/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.tinyscrollbar/tsconfig.json b/types/jquery.tinyscrollbar/tsconfig.json index f318eedaa4..782a29b264 100644 --- a/types/jquery.tinyscrollbar/tsconfig.json +++ b/types/jquery.tinyscrollbar/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.tipsy/tsconfig.json b/types/jquery.tipsy/tsconfig.json index fc95477a54..5107f06d04 100644 --- a/types/jquery.tipsy/tsconfig.json +++ b/types/jquery.tipsy/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.tools/tsconfig.json b/types/jquery.tools/tsconfig.json index 3b99d33c86..ef601e0e3a 100644 --- a/types/jquery.tools/tsconfig.json +++ b/types/jquery.tools/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.total-storage/tsconfig.json b/types/jquery.total-storage/tsconfig.json index ab78e13671..3c62edadfa 100644 --- a/types/jquery.total-storage/tsconfig.json +++ b/types/jquery.total-storage/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.transit/tsconfig.json b/types/jquery.transit/tsconfig.json index ba68e939c7..628d53a263 100644 --- a/types/jquery.transit/tsconfig.json +++ b/types/jquery.transit/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.ui.datetimepicker/tsconfig.json b/types/jquery.ui.datetimepicker/tsconfig.json index 6d28673765..55a456ad6b 100644 --- a/types/jquery.ui.datetimepicker/tsconfig.json +++ b/types/jquery.ui.datetimepicker/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.ui.layout/tsconfig.json b/types/jquery.ui.layout/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/jquery.ui.layout/tsconfig.json +++ b/types/jquery.ui.layout/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/jquery.uniform/tsconfig.json b/types/jquery.uniform/tsconfig.json index 0cd374ab15..eae4f481cb 100644 --- a/types/jquery.uniform/tsconfig.json +++ b/types/jquery.uniform/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.validation/tsconfig.json b/types/jquery.validation/tsconfig.json index 83b1ac2d52..8f70b517be 100644 --- a/types/jquery.validation/tsconfig.json +++ b/types/jquery.validation/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.watermark/tsconfig.json b/types/jquery.watermark/tsconfig.json index 9543996936..59413b5d3b 100644 --- a/types/jquery.watermark/tsconfig.json +++ b/types/jquery.watermark/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery.window/tsconfig.json b/types/jquery.window/tsconfig.json index d8608684d5..5ef472acc0 100644 --- a/types/jquery.window/tsconfig.json +++ b/types/jquery.window/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery/tsconfig.json b/types/jquery/tsconfig.json index e481dc63c6..4b70421330 100644 --- a/types/jquery/tsconfig.json +++ b/types/jquery/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery/v1/tsconfig.json b/types/jquery/v1/tsconfig.json index 02855a9f8e..eb53f56f94 100644 --- a/types/jquery/v1/tsconfig.json +++ b/types/jquery/v1/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquery/v2/tsconfig.json b/types/jquery/v2/tsconfig.json index 03ea2df8de..35c2a9007d 100644 --- a/types/jquery/v2/tsconfig.json +++ b/types/jquery/v2/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jquerymobile/tsconfig.json b/types/jquerymobile/tsconfig.json index fbbd8cb739..47fb771e9e 100644 --- a/types/jquerymobile/tsconfig.json +++ b/types/jquerymobile/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jqueryui/tsconfig.json b/types/jqueryui/tsconfig.json index ea7c9385c3..2b018f0062 100644 --- a/types/jqueryui/tsconfig.json +++ b/types/jqueryui/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-base64/tsconfig.json b/types/js-base64/tsconfig.json index 2e325222f7..3380190f21 100644 --- a/types/js-base64/tsconfig.json +++ b/types/js-base64/tsconfig.json @@ -1,20 +1,25 @@ { "compilerOptions": { "module": "commonjs", - "lib": ["es6"], + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "test/js-base64-module.test.ts", "test/js-base64-global.test.ts" ] -} +} \ No newline at end of file diff --git a/types/js-beautify/tsconfig.json b/types/js-beautify/tsconfig.json index 28b0a603af..cc2c018f82 100644 --- a/types/js-beautify/tsconfig.json +++ b/types/js-beautify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-clipper/tsconfig.json b/types/js-clipper/tsconfig.json index b4074f17c1..c9858c90d5 100644 --- a/types/js-clipper/tsconfig.json +++ b/types/js-clipper/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-combinatorics/tsconfig.json b/types/js-combinatorics/tsconfig.json index ff2a188dcb..fbba418acc 100644 --- a/types/js-combinatorics/tsconfig.json +++ b/types/js-combinatorics/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-cookie/tsconfig.json b/types/js-cookie/tsconfig.json index 63cd342137..a560d75efb 100644 --- a/types/js-cookie/tsconfig.json +++ b/types/js-cookie/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-data-angular/tsconfig.json b/types/js-data-angular/tsconfig.json index e5117ff27a..11abc585bf 100644 --- a/types/js-data-angular/tsconfig.json +++ b/types/js-data-angular/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-fixtures/tsconfig.json b/types/js-fixtures/tsconfig.json index 2f4cb02c4b..4a4c40a440 100644 --- a/types/js-fixtures/tsconfig.json +++ b/types/js-fixtures/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-git/tsconfig.json b/types/js-git/tsconfig.json index e53cf4f6d8..4c79ddd5b9 100644 --- a/types/js-git/tsconfig.json +++ b/types/js-git/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-md5/tsconfig.json b/types/js-md5/tsconfig.json index 6348210a6b..6a77ef18a2 100644 --- a/types/js-md5/tsconfig.json +++ b/types/js-md5/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-priority-queue/tsconfig.json b/types/js-priority-queue/tsconfig.json index 12e9d7f000..c9efddc5ca 100644 --- a/types/js-priority-queue/tsconfig.json +++ b/types/js-priority-queue/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-quantities/tsconfig.json b/types/js-quantities/tsconfig.json index 1866fc5155..1d1f7f7a20 100644 --- a/types/js-quantities/tsconfig.json +++ b/types/js-quantities/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-schema/tsconfig.json b/types/js-schema/tsconfig.json index 1c26cda396..2fccac00c6 100644 --- a/types/js-schema/tsconfig.json +++ b/types/js-schema/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-search/tsconfig.json b/types/js-search/tsconfig.json index eb6253aec9..c940fa5db5 100644 --- a/types/js-search/tsconfig.json +++ b/types/js-search/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-to-java/tsconfig.json b/types/js-to-java/tsconfig.json index 6a927d9578..2aac508ed8 100644 --- a/types/js-to-java/tsconfig.json +++ b/types/js-to-java/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-url/tsconfig.json b/types/js-url/tsconfig.json index 117bf43420..a2cc751fb6 100644 --- a/types/js-url/tsconfig.json +++ b/types/js-url/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/js-yaml/tsconfig.json b/types/js-yaml/tsconfig.json index c36931fa61..8626455989 100644 --- a/types/js-yaml/tsconfig.json +++ b/types/js-yaml/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "js-yaml-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/js.spec/tsconfig.json b/types/js.spec/tsconfig.json index c7a1d13a57..063bbacc55 100644 --- a/types/js.spec/tsconfig.json +++ b/types/js.spec/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsbn/tsconfig.json b/types/jsbn/tsconfig.json index 68fb5fc2d5..a6c95282f7 100644 --- a/types/jsbn/tsconfig.json +++ b/types/jsbn/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jschannel/tsconfig.json b/types/jschannel/tsconfig.json index 83727a281c..4ba367418e 100644 --- a/types/jschannel/tsconfig.json +++ b/types/jschannel/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "jschannel-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/jscrollpane/tsconfig.json b/types/jscrollpane/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/jscrollpane/tsconfig.json +++ b/types/jscrollpane/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/jsdeferred/tsconfig.json b/types/jsdeferred/tsconfig.json index 7b6fbf8171..1cbd4c6293 100644 --- a/types/jsdeferred/tsconfig.json +++ b/types/jsdeferred/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsdom/tsconfig.json b/types/jsdom/tsconfig.json index fe7f9dd41f..ef95267a70 100644 --- a/types/jsdom/tsconfig.json +++ b/types/jsdom/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsdom/v2/tsconfig.json b/types/jsdom/v2/tsconfig.json index 3027a13385..32ce5274b0 100644 --- a/types/jsdom/v2/tsconfig.json +++ b/types/jsdom/v2/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsen/tsconfig.json b/types/jsen/tsconfig.json index cf32dd60a8..fb95888bdb 100644 --- a/types/jsen/tsconfig.json +++ b/types/jsen/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsend/tsconfig.json b/types/jsend/tsconfig.json index 13a1b84a23..2aa1162a01 100644 --- a/types/jsend/tsconfig.json +++ b/types/jsend/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsesc/tsconfig.json b/types/jsesc/tsconfig.json index d9f4194987..656652f612 100644 --- a/types/jsesc/tsconfig.json +++ b/types/jsesc/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsfl/tsconfig.json b/types/jsfl/tsconfig.json index 581bbb4199..6c907b4e28 100644 --- a/types/jsfl/tsconfig.json +++ b/types/jsfl/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsforce/tsconfig.json b/types/jsforce/tsconfig.json index 0d480d799f..73623d7e99 100644 --- a/types/jsforce/tsconfig.json +++ b/types/jsforce/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jshamcrest/tsconfig.json b/types/jshamcrest/tsconfig.json index dd54b4d553..8972d0fa35 100644 --- a/types/jshamcrest/tsconfig.json +++ b/types/jshamcrest/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsmockito/tsconfig.json b/types/jsmockito/tsconfig.json index 3b81da0df0..85db6db99b 100644 --- a/types/jsmockito/tsconfig.json +++ b/types/jsmockito/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsnox/jsnox-tests.ts b/types/jsnox/jsnox-tests.ts index d545581591..f03c33e917 100644 --- a/types/jsnox/jsnox-tests.ts +++ b/types/jsnox/jsnox-tests.ts @@ -1,5 +1,5 @@ import * as React from "react"; -import * as jsnox from "jsnox"; +import jsnox = require("jsnox"); const $ = jsnox(React); interface PersonProps { diff --git a/types/jsnox/tsconfig.json b/types/jsnox/tsconfig.json index 03450f596c..2d6ef33c2f 100644 --- a/types/jsnox/tsconfig.json +++ b/types/jsnox/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/json-editor/tsconfig.json b/types/json-editor/tsconfig.json index accf3485bf..9bdce0acb6 100644 --- a/types/json-editor/tsconfig.json +++ b/types/json-editor/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/json-js/tsconfig.json b/types/json-js/tsconfig.json index 0bac144d32..1ca12a9cee 100644 --- a/types/json-js/tsconfig.json +++ b/types/json-js/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/json-merge-patch/tsconfig.json b/types/json-merge-patch/tsconfig.json index 2c3683dc41..f3a8a23907 100644 --- a/types/json-merge-patch/tsconfig.json +++ b/types/json-merge-patch/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/json-patch/tsconfig.json b/types/json-patch/tsconfig.json index bcd1d84d36..ef71692ebc 100644 --- a/types/json-patch/tsconfig.json +++ b/types/json-patch/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/json-pointer/tsconfig.json b/types/json-pointer/tsconfig.json index f5b746e548..1f38a08c46 100644 --- a/types/json-pointer/tsconfig.json +++ b/types/json-pointer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/json-query/tsconfig.json b/types/json-query/tsconfig.json index 9a317f4d83..85f1dfd7f7 100644 --- a/types/json-query/tsconfig.json +++ b/types/json-query/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/json-rpc-ws/tsconfig.json b/types/json-rpc-ws/tsconfig.json index d062401159..9ee376affa 100644 --- a/types/json-rpc-ws/tsconfig.json +++ b/types/json-rpc-ws/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/json-schema/tsconfig.json b/types/json-schema/tsconfig.json index 443caf8239..dabf0dd1ee 100644 --- a/types/json-schema/tsconfig.json +++ b/types/json-schema/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/json-socket/tsconfig.json b/types/json-socket/tsconfig.json index 5901e0b745..a173dc8fb8 100644 --- a/types/json-socket/tsconfig.json +++ b/types/json-socket/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/json-stable-stringify/tsconfig.json b/types/json-stable-stringify/tsconfig.json index bb605781c5..4b8cd49f28 100644 --- a/types/json-stable-stringify/tsconfig.json +++ b/types/json-stable-stringify/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/json-stringify-safe/tsconfig.json b/types/json-stringify-safe/tsconfig.json index f4ca1b5e30..f86443faca 100644 --- a/types/json-stringify-safe/tsconfig.json +++ b/types/json-stringify-safe/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/json2md/tsconfig.json b/types/json2md/tsconfig.json index e0fd95f150..44162d1678 100644 --- a/types/json2md/tsconfig.json +++ b/types/json2md/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/json5/tsconfig.json b/types/json5/tsconfig.json index bf318f8b10..5bafbb80e7 100644 --- a/types/json5/tsconfig.json +++ b/types/json5/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsonata/tsconfig.json b/types/jsonata/tsconfig.json index c047ca52bf..38ed068b63 100644 --- a/types/jsonata/tsconfig.json +++ b/types/jsonata/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsoneditor/tsconfig.json b/types/jsoneditor/tsconfig.json index 299abd4f68..7afee352a9 100644 --- a/types/jsoneditor/tsconfig.json +++ b/types/jsoneditor/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsoneditoronline/tsconfig.json b/types/jsoneditoronline/tsconfig.json index 25ef8ae26a..134dd22ef9 100644 --- a/types/jsoneditoronline/tsconfig.json +++ b/types/jsoneditoronline/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsonfile/tsconfig.json b/types/jsonfile/tsconfig.json index 287f9558c5..268bc6f4d0 100644 --- a/types/jsonfile/tsconfig.json +++ b/types/jsonfile/tsconfig.json @@ -14,10 +14,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ "index.d.ts", "jsonfile-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/jsonminify/tsconfig.json b/types/jsonminify/tsconfig.json index 0df74ef465..bc333f1dd1 100644 --- a/types/jsonminify/tsconfig.json +++ b/types/jsonminify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsonnet/tsconfig.json b/types/jsonnet/tsconfig.json index c30a5a2ffb..e10b49c8ac 100644 --- a/types/jsonnet/tsconfig.json +++ b/types/jsonnet/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsonp/tsconfig.json b/types/jsonp/tsconfig.json index 760822ff6b..988ca90c56 100644 --- a/types/jsonp/tsconfig.json +++ b/types/jsonp/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsonpath/tsconfig.json b/types/jsonpath/tsconfig.json index 04b06d5baf..853c26cb04 100644 --- a/types/jsonpath/tsconfig.json +++ b/types/jsonpath/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsonrpc-serializer/tsconfig.json b/types/jsonrpc-serializer/tsconfig.json index f3a91d58c1..7558589d7b 100644 --- a/types/jsonrpc-serializer/tsconfig.json +++ b/types/jsonrpc-serializer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsonstream/tsconfig.json b/types/jsonstream/tsconfig.json index 9fe19a4c05..5ebb03c9dc 100644 --- a/types/jsonstream/tsconfig.json +++ b/types/jsonstream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsonwebtoken/tsconfig.json b/types/jsonwebtoken/tsconfig.json index c16a931577..fcc3affcaf 100644 --- a/types/jsonwebtoken/tsconfig.json +++ b/types/jsonwebtoken/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jspdf/tsconfig.json b/types/jspdf/tsconfig.json index 697de6db64..6e5edabf45 100644 --- a/types/jspdf/tsconfig.json +++ b/types/jspdf/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsqrcode/tsconfig.json b/types/jsqrcode/tsconfig.json index dcc6bf63a2..487b814e24 100644 --- a/types/jsqrcode/tsconfig.json +++ b/types/jsqrcode/tsconfig.json @@ -11,6 +11,7 @@ "strictFunctionTypes": true, "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/jsrender/tsconfig.json b/types/jsrender/tsconfig.json index 71bcce3848..70dc2d65fe 100644 --- a/types/jsrender/tsconfig.json +++ b/types/jsrender/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsreport-core/tsconfig.json b/types/jsreport-core/tsconfig.json index 1602790a14..b10a124791 100644 --- a/types/jsreport-core/tsconfig.json +++ b/types/jsreport-core/tsconfig.json @@ -1,23 +1,24 @@ { - "compilerOptions": { - "module": "commonjs", - "lib": [ - "esnext" - ], - "strictFunctionTypes": true, - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "jsreport-core-tests.ts" - ] + "compilerOptions": { + "module": "commonjs", + "lib": [ + "esnext" + ], + "strictFunctionTypes": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "jsreport-core-tests.ts" + ] } \ No newline at end of file diff --git a/types/jsrp/tsconfig.json b/types/jsrp/tsconfig.json index eee1ca1391..373b2161c7 100644 --- a/types/jsrp/tsconfig.json +++ b/types/jsrp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jss/tsconfig.json b/types/jss/tsconfig.json index f34791192c..c04079a405 100644 --- a/types/jss/tsconfig.json +++ b/types/jss/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "jss-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/jssha/tsconfig.json b/types/jssha/tsconfig.json index 9e54d3c27a..d510b70414 100644 --- a/types/jssha/tsconfig.json +++ b/types/jssha/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/jstimezonedetect/tsconfig.json b/types/jstimezonedetect/tsconfig.json index b774b2f27b..df242a4ba3 100644 --- a/types/jstimezonedetect/tsconfig.json +++ b/types/jstimezonedetect/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jstorage/tsconfig.json b/types/jstorage/tsconfig.json index 7d03130196..80858e1d65 100644 --- a/types/jstorage/tsconfig.json +++ b/types/jstorage/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jstree/tsconfig.json b/types/jstree/tsconfig.json index 235aef261c..6552fc878b 100644 --- a/types/jstree/tsconfig.json +++ b/types/jstree/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsts/tsconfig.json b/types/jsts/tsconfig.json index ac8ce72682..66fe8f3951 100644 --- a/types/jsts/tsconfig.json +++ b/types/jsts/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsuite/tsconfig.json b/types/jsuite/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/jsuite/tsconfig.json +++ b/types/jsuite/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/jsuri/tsconfig.json b/types/jsuri/tsconfig.json index aa5a702117..afbfd8a324 100644 --- a/types/jsuri/tsconfig.json +++ b/types/jsuri/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsurl/tsconfig.json b/types/jsurl/tsconfig.json index 3b795be015..2423c10630 100644 --- a/types/jsurl/tsconfig.json +++ b/types/jsurl/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jsx-chai/tsconfig.json b/types/jsx-chai/tsconfig.json index 5ff33d9bec..834397a636 100644 --- a/types/jsx-chai/tsconfig.json +++ b/types/jsx-chai/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jszip/jszip-tests.ts b/types/jszip/jszip-tests.ts index 81ccda09db..5d332a8070 100644 --- a/types/jszip/jszip-tests.ts +++ b/types/jszip/jszip-tests.ts @@ -1,4 +1,4 @@ -import * as JSZip from 'jszip'; +import JSZip = require('jszip'); const SEVERITY = { DEBUG: 0, diff --git a/types/jszip/tsconfig.json b/types/jszip/tsconfig.json index c5a1abf752..41412a6a91 100644 --- a/types/jszip/tsconfig.json +++ b/types/jszip/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jug/tsconfig.json b/types/jug/tsconfig.json index ceaf8a8e0a..22b58e92cd 100644 --- a/types/jug/tsconfig.json +++ b/types/jug/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jui-core/tsconfig.json b/types/jui-core/tsconfig.json index 67f1eb8560..74b17d0023 100644 --- a/types/jui-core/tsconfig.json +++ b/types/jui-core/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jui-grid/tsconfig.json b/types/jui-grid/tsconfig.json index 44d9c93211..27e8059449 100644 --- a/types/jui-grid/tsconfig.json +++ b/types/jui-grid/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jui/tsconfig.json b/types/jui/tsconfig.json index 6ea9a2ea6b..c3a1433f50 100644 --- a/types/jui/tsconfig.json +++ b/types/jui/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jump.js/tsconfig.json b/types/jump.js/tsconfig.json index 58186807e9..3ee1305fa6 100644 --- a/types/jump.js/tsconfig.json +++ b/types/jump.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jweixin/tsconfig.json b/types/jweixin/tsconfig.json index d2740833c5..c4bb5b925b 100644 --- a/types/jweixin/tsconfig.json +++ b/types/jweixin/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jwplayer/index.d.ts b/types/jwplayer/index.d.ts index 32c3521f22..87a7526267 100644 --- a/types/jwplayer/index.d.ts +++ b/types/jwplayer/index.d.ts @@ -2,6 +2,7 @@ // Project: http://developer.longtailvideo.com/trac/ // Definitions by: Martin Duparc // Tomer Kruvi +// Philipp Gürtler // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // JW Player is the leading HTML5 & Flash video player, optimized for mobile and the desktop. Easy enough for beginners, advanced enough for pros. @@ -224,6 +225,13 @@ interface EventCallback { (param: T): void; } +interface Region { + x: 0; // x and y will always be 0 according to https://developer.jwplayer.com/jw-player/docs/javascript-api-reference/#jwplayergetsaferegion + y: 0; + width: number; + height: number; +} + interface JWPlayer { addButton(icon: string, label: string, handler: () => void, id: string): void; getAudioTracks(): any[]; @@ -243,7 +251,7 @@ interface JWPlayer { getPosition(): number; getQualityLevels(): any[]; getRenderingMode(): string; - getSafeRegion(): any[]; + getSafeRegion(): Region; getState(): string; getVolume(): number; getEnvironment(): Environment; diff --git a/types/jwplayer/tsconfig.json b/types/jwplayer/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/jwplayer/tsconfig.json +++ b/types/jwplayer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/jws/tsconfig.json b/types/jws/tsconfig.json index a8a2f625d3..e9dbaeac09 100644 --- a/types/jws/tsconfig.json +++ b/types/jws/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "jws-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/jwt-client/tsconfig.json b/types/jwt-client/tsconfig.json index 3611c59237..b8ddbc0257 100644 --- a/types/jwt-client/tsconfig.json +++ b/types/jwt-client/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jwt-decode/tsconfig.json b/types/jwt-decode/tsconfig.json index f53a16f5a6..3cc921989b 100644 --- a/types/jwt-decode/tsconfig.json +++ b/types/jwt-decode/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jwt-decode/v1/tsconfig.json b/types/jwt-decode/v1/tsconfig.json index 261fdece08..73afba4a58 100644 --- a/types/jwt-decode/v1/tsconfig.json +++ b/types/jwt-decode/v1/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/jwt-simple/tsconfig.json b/types/jwt-simple/tsconfig.json index 52f84f6e77..9a3c56cf3e 100644 --- a/types/jwt-simple/tsconfig.json +++ b/types/jwt-simple/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/kafka-node/index.d.ts b/types/kafka-node/index.d.ts index e5aa9cf0a8..71d1fd6728 100644 --- a/types/kafka-node/index.d.ts +++ b/types/kafka-node/index.d.ts @@ -3,6 +3,8 @@ // Definitions by: Daniel Imrie-Situnayake , Bill , Michael Haan , Amiram Korach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + // # Classes export class Client { constructor(connectionString: string, clientId?: string, options?: ZKOptions, noBatchOptions?: AckBatchOptions, sslOptions?: any); @@ -88,24 +90,24 @@ export class Offset { } export class KeyedMessage { - constructor(key: string, message: string); + constructor(key: string, value: string | Buffer); } // # Interfaces export interface Message { - topic: string; - value: string; - offset?: number; - partition?: number; - highWaterOffset?: number; - key?: string; -} + topic: string; + value: string | Buffer; + offset?: number; + partition?: number; + highWaterOffset?: number; + key?: string; + } export interface ProducerOptions { - requireAcks?: number; - ackTimeoutMs?: number; - partitionerType?: number; + requireAcks?: number; + ackTimeoutMs?: number; + partitionerType?: number; } export interface KafkaClientOptions { diff --git a/types/kafka-node/tsconfig.json b/types/kafka-node/tsconfig.json index 154c35e191..97ce936047 100644 --- a/types/kafka-node/tsconfig.json +++ b/types/kafka-node/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/karma-chai-sinon/tsconfig.json b/types/karma-chai-sinon/tsconfig.json index 86c4fa3299..aa4d11fa60 100644 --- a/types/karma-chai-sinon/tsconfig.json +++ b/types/karma-chai-sinon/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/karma-chai/tsconfig.json b/types/karma-chai/tsconfig.json index 726bb90e80..775b764e40 100644 --- a/types/karma-chai/tsconfig.json +++ b/types/karma-chai/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/karma-coverage/tsconfig.json b/types/karma-coverage/tsconfig.json index fe130be15a..492678b674 100644 --- a/types/karma-coverage/tsconfig.json +++ b/types/karma-coverage/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/karma-fixture/tsconfig.json b/types/karma-fixture/tsconfig.json index 0b39c302b4..9376aa9424 100644 --- a/types/karma-fixture/tsconfig.json +++ b/types/karma-fixture/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/karma-jasmine/tsconfig.json b/types/karma-jasmine/tsconfig.json index 54f70b6c45..6de5629a75 100644 --- a/types/karma-jasmine/tsconfig.json +++ b/types/karma-jasmine/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/karma-webpack/tsconfig.json b/types/karma-webpack/tsconfig.json index 86996cdcfa..e019bd4bdf 100644 --- a/types/karma-webpack/tsconfig.json +++ b/types/karma-webpack/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/karma/tsconfig.json b/types/karma/tsconfig.json index 23c81534d2..157092c790 100644 --- a/types/karma/tsconfig.json +++ b/types/karma/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/katex/tsconfig.json b/types/katex/tsconfig.json index 2cf3297aca..3bad4a0cd9 100644 --- a/types/katex/tsconfig.json +++ b/types/katex/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/kcors/tsconfig.json b/types/kcors/tsconfig.json index 3322dc4921..4eb388863a 100644 --- a/types/kcors/tsconfig.json +++ b/types/kcors/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/kdbush/tsconfig.json b/types/kdbush/tsconfig.json index 11107837a0..79fe884afe 100644 --- a/types/kdbush/tsconfig.json +++ b/types/kdbush/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/kefir/tsconfig.json b/types/kefir/tsconfig.json index e1d57fe2e3..7fc74e6713 100644 --- a/types/kefir/tsconfig.json +++ b/types/kefir/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/kendo-ui/index.d.ts b/types/kendo-ui/index.d.ts index 97b840e2cf..6ea7fea725 100644 --- a/types/kendo-ui/index.d.ts +++ b/types/kendo-ui/index.d.ts @@ -3810,7 +3810,7 @@ declare namespace kendo.ui { aggregates?: any; attributes?: any; columns?: any; - command?: GridColumnCommandItem[]; + command?: string|(string|GridColumnCommandItem)[]; editable?: Function; encoded?: boolean; field?: string; @@ -20341,4 +20341,4 @@ interface JQuery { kendoWindow(options: kendo.ui.WindowOptions): JQuery; data(key: "kendoWindow"): kendo.ui.Window; -} \ No newline at end of file +} diff --git a/types/kendo-ui/tsconfig.json b/types/kendo-ui/tsconfig.json index e6e296e3ee..285d942999 100644 --- a/types/kendo-ui/tsconfig.json +++ b/types/kendo-ui/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/keyboardjs/tsconfig.json b/types/keyboardjs/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/keyboardjs/tsconfig.json +++ b/types/keyboardjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/keygrip/tsconfig.json b/types/keygrip/tsconfig.json index 6a68ad8ba2..7c096ed3b4 100644 --- a/types/keygrip/tsconfig.json +++ b/types/keygrip/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/keymaster/tsconfig.json b/types/keymaster/tsconfig.json index c35aaa1b01..9fb59df1bc 100644 --- a/types/keymaster/tsconfig.json +++ b/types/keymaster/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/keymirror/tsconfig.json b/types/keymirror/tsconfig.json index 4d6365bc4c..a237e2396d 100644 --- a/types/keymirror/tsconfig.json +++ b/types/keymirror/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/keypress.js/tsconfig.json b/types/keypress.js/tsconfig.json index 1643b0a002..00a88fbf72 100644 --- a/types/keypress.js/tsconfig.json +++ b/types/keypress.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/keysym/tsconfig.json b/types/keysym/tsconfig.json index b2daaa6d31..0a853aa126 100644 --- a/types/keysym/tsconfig.json +++ b/types/keysym/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/keytar/tsconfig.json b/types/keytar/tsconfig.json index 5a2fe428ff..43efd1ec43 100644 --- a/types/keytar/tsconfig.json +++ b/types/keytar/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/kii-cloud-sdk/tsconfig.json b/types/kii-cloud-sdk/tsconfig.json index fd1b84aab9..69b251f247 100644 --- a/types/kii-cloud-sdk/tsconfig.json +++ b/types/kii-cloud-sdk/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/kik-browser/tsconfig.json b/types/kik-browser/tsconfig.json index d832795617..0a59996f8c 100644 --- a/types/kik-browser/tsconfig.json +++ b/types/kik-browser/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/kineticjs/tsconfig.json b/types/kineticjs/tsconfig.json index cee48ec061..976f2dc3d3 100644 --- a/types/kineticjs/tsconfig.json +++ b/types/kineticjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/klaw-sync/tsconfig.json b/types/klaw-sync/tsconfig.json index f6fe9eb8bd..fbca4d319c 100644 --- a/types/klaw-sync/tsconfig.json +++ b/types/klaw-sync/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/klaw/klaw-tests.ts b/types/klaw/klaw-tests.ts index 2487aafd85..69406f73e8 100644 --- a/types/klaw/klaw-tests.ts +++ b/types/klaw/klaw-tests.ts @@ -1,4 +1,4 @@ -import * as klaw from "klaw"; +import klaw = require("klaw"); const path = require('path'); // README.md: Streams 1 (push) example: diff --git a/types/klaw/tsconfig.json b/types/klaw/tsconfig.json index 1d3db09e05..afa97d598d 100644 --- a/types/klaw/tsconfig.json +++ b/types/klaw/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/klaw/v1/klaw-tests.ts b/types/klaw/v1/klaw-tests.ts index 5e425a714a..7bfd79ee50 100644 --- a/types/klaw/v1/klaw-tests.ts +++ b/types/klaw/v1/klaw-tests.ts @@ -1,4 +1,4 @@ -import * as klaw from "klaw"; +import klaw = require("klaw"); import * as path from "path"; // README.md: Streams 1 (push) example: diff --git a/types/klaw/v1/tsconfig.json b/types/klaw/v1/tsconfig.json index 35caa3f9ea..8af7f84870 100644 --- a/types/klaw/v1/tsconfig.json +++ b/types/klaw/v1/tsconfig.json @@ -19,7 +19,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/kms-json/tsconfig.json b/types/kms-json/tsconfig.json index f8ac8d1921..ed29ab5a4d 100644 --- a/types/kms-json/tsconfig.json +++ b/types/kms-json/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "kms-json-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/knex-postgis/knex-postgis-tests.ts b/types/knex-postgis/knex-postgis-tests.ts index 43a6c2f58b..99eb1382fc 100644 --- a/types/knex-postgis/knex-postgis-tests.ts +++ b/types/knex-postgis/knex-postgis-tests.ts @@ -1,6 +1,6 @@ import * as GeoJSON from 'geojson'; -import * as Knex from 'knex'; -import * as KPG from 'knex-postgis'; +import Knex = require('knex'); +import KPG = require('knex-postgis'); const knex: Knex = Knex({ dialect: 'pg' }); const st: KPG.KnexPostgis = KPG(knex); diff --git a/types/knex-postgis/tsconfig.json b/types/knex-postgis/tsconfig.json index 7d088da2f2..a3172fd1a1 100644 --- a/types/knex-postgis/tsconfig.json +++ b/types/knex-postgis/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/knex/index.d.ts b/types/knex/index.d.ts index 7531082758..99b6a10476 100644 --- a/types/knex/index.d.ts +++ b/types/knex/index.d.ts @@ -183,12 +183,12 @@ declare namespace Knex { interface Join { (raw: Raw): QueryBuilder; - (tableName: TableName, clause: (this: JoinClause, join: JoinClause) => void): QueryBuilder; - (tableName: TableName, columns: { [key: string]: string | number | Raw }): QueryBuilder; - (tableName: TableName, raw: Raw): QueryBuilder; - (tableName: TableName, column1: string, column2: string): QueryBuilder; - (tableName: TableName, column1: string, raw: Raw): QueryBuilder; - (tableName: TableName, column1: string, operator: string, column2: string): QueryBuilder; + (tableName: TableName | QueryCallback, clause: (this: JoinClause, join: JoinClause) => void): QueryBuilder; + (tableName: TableName | QueryCallback, columns: { [key: string]: string | number | Raw }): QueryBuilder; + (tableName: TableName | QueryCallback, raw: Raw): QueryBuilder; + (tableName: TableName | QueryCallback, column1: string, column2: string): QueryBuilder; + (tableName: TableName | QueryCallback, column1: string, raw: Raw): QueryBuilder; + (tableName: TableName | QueryCallback, column1: string, operator: string, column2: string): QueryBuilder; } interface JoinClause { diff --git a/types/knex/knex-tests.ts b/types/knex/knex-tests.ts index d861db3c05..3aaefb6909 100644 --- a/types/knex/knex-tests.ts +++ b/types/knex/knex-tests.ts @@ -459,6 +459,44 @@ knex.select('*').from('accounts').joinRaw('natural full join table1').where('id' knex.select('*').from('accounts').join(knex.raw('natural full join table1')).where('id', 1); +knex.select('*').from('accounts') + .join(function() { + this.select('*').from('accounts').as('special_accounts'); + }, 'special_accounts.a', '=', 'accounts.b'); +knex.select('*').from('accounts') + .leftJoin(function() { + this.select('*').from('accounts').as('special_accounts'); + }, 'special_accounts.a', '=', 'accounts.b'); +knex.select('*').from('accounts') + .leftOuterJoin(function() { + this.select('*').from('accounts').as('special_accounts'); + }, 'special_accounts.a', '=', 'accounts.b'); +knex.select('*').from('accounts') + .rightJoin(function() { + this.select('*').from('accounts').as('special_accounts'); + }, 'special_accounts.a', '=', 'accounts.b'); +knex.select('*').from('accounts') + .rightOuterJoin(function() { + this.select('*').from('accounts').as('special_accounts'); + }, 'special_accounts.a', '=', 'accounts.b'); +knex.select('*').from('accounts') + .innerJoin(function() { + this.select('*').from('accounts').as('special_accounts'); + }, 'special_accounts.a', '=', 'accounts.b'); +knex.select('*').from('accounts') + .crossJoin(function() { + this.select('*').from('accounts').as('special_accounts'); + }, 'special_accounts.a', '=', 'accounts.b'); +knex.select('*').from('accounts') + .fullOuterJoin(function() { + this.select('*').from('accounts').as('special_accounts'); + }, 'special_accounts.a', '=', 'accounts.b'); +knex.select('*').from('accounts') + .outerJoin(function() { + this.select('*').from('accounts').as('special_accounts'); + }, 'special_accounts.a', '=', 'accounts.b'); + + knex('customers') .distinct('first_name', 'last_name') .select(); diff --git a/types/knex/tsconfig.json b/types/knex/tsconfig.json index 41e9ae905e..ceb9258104 100644 --- a/types/knex/tsconfig.json +++ b/types/knex/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "knex-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/knockback/tsconfig.json b/types/knockback/tsconfig.json index fa1c069762..b4076b50e2 100644 --- a/types/knockback/tsconfig.json +++ b/types/knockback/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/knockout-amd-helpers/tsconfig.json b/types/knockout-amd-helpers/tsconfig.json index b79c6d90d2..45078709f1 100644 --- a/types/knockout-amd-helpers/tsconfig.json +++ b/types/knockout-amd-helpers/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/knockout-secure-binding/tsconfig.json b/types/knockout-secure-binding/tsconfig.json index 111b6eeeee..379ad7d39b 100644 --- a/types/knockout-secure-binding/tsconfig.json +++ b/types/knockout-secure-binding/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/knockout-transformations/tsconfig.json b/types/knockout-transformations/tsconfig.json index 4e5e456ef6..b15f7bf06b 100644 --- a/types/knockout-transformations/tsconfig.json +++ b/types/knockout-transformations/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/knockout.deferred.updates/tsconfig.json b/types/knockout.deferred.updates/tsconfig.json index e454e60d07..d01b404ad5 100644 --- a/types/knockout.deferred.updates/tsconfig.json +++ b/types/knockout.deferred.updates/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/knockout.editables/tsconfig.json b/types/knockout.editables/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/knockout.editables/tsconfig.json +++ b/types/knockout.editables/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/knockout.es5/tsconfig.json b/types/knockout.es5/tsconfig.json index 794ea97505..5df65298d6 100644 --- a/types/knockout.es5/tsconfig.json +++ b/types/knockout.es5/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/knockout.kogrid/tsconfig.json b/types/knockout.kogrid/tsconfig.json index 005a8c6eb1..d410f0d355 100644 --- a/types/knockout.kogrid/tsconfig.json +++ b/types/knockout.kogrid/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/knockout.mapper/tsconfig.json b/types/knockout.mapper/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/knockout.mapper/tsconfig.json +++ b/types/knockout.mapper/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/knockout.mapping/tsconfig.json b/types/knockout.mapping/tsconfig.json index 1ae87d442f..abc93c70b5 100644 --- a/types/knockout.mapping/tsconfig.json +++ b/types/knockout.mapping/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/knockout.postbox/tsconfig.json b/types/knockout.postbox/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/knockout.postbox/tsconfig.json +++ b/types/knockout.postbox/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/knockout.projections/tsconfig.json b/types/knockout.projections/tsconfig.json index 97fa4bbc5e..963e6eed90 100644 --- a/types/knockout.projections/tsconfig.json +++ b/types/knockout.projections/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/knockout.punches/tsconfig.json b/types/knockout.punches/tsconfig.json index 6851149d09..e0388f01e2 100644 --- a/types/knockout.punches/tsconfig.json +++ b/types/knockout.punches/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/knockout.rx/tsconfig.json b/types/knockout.rx/tsconfig.json index 3a2a3fdb73..737007087d 100644 --- a/types/knockout.rx/tsconfig.json +++ b/types/knockout.rx/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/knockout.validation/tsconfig.json b/types/knockout.validation/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/knockout.validation/tsconfig.json +++ b/types/knockout.validation/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/knockout.viewmodel/tsconfig.json b/types/knockout.viewmodel/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/knockout.viewmodel/tsconfig.json +++ b/types/knockout.viewmodel/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/knockout/index.d.ts b/types/knockout/index.d.ts index 570f61d80b..ade040f441 100644 --- a/types/knockout/index.d.ts +++ b/types/knockout/index.d.ts @@ -314,6 +314,7 @@ interface KnockoutUtils { triggerEvent(element: any, eventType: any): void; unwrapObservable(value: KnockoutObservable | T): T; + unwrapObservable(value: KnockoutObservableArray | T[]): T[]; // NOT PART OF THE MINIFIED API SURFACE (ONLY IN knockout-{version}.debug.js) https://github.com/SteveSanderson/knockout/issues/670 // forceRefresh(node: any): void; @@ -454,6 +455,7 @@ interface KnockoutStatic { renderTemplate(template: Function, viewModel: any, options?: any, target?: any, renderMode?: any): any; renderTemplate(template: string, viewModel: any, options?: any, target?: any, renderMode?: any): any; unwrap(value: KnockoutObservable | T): T; + unwrap(value: KnockoutObservableArray | T[]): T[]; computedContext: KnockoutComputedContext; diff --git a/types/knockout/tsconfig.json b/types/knockout/tsconfig.json index 1a314f7b0e..a37a6a6079 100644 --- a/types/knockout/tsconfig.json +++ b/types/knockout/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/knockstrap/tsconfig.json b/types/knockstrap/tsconfig.json index 4d09924e6d..4572dcd8c4 100644 --- a/types/knockstrap/tsconfig.json +++ b/types/knockstrap/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/knuddels-userapps-api/tsconfig.json b/types/knuddels-userapps-api/tsconfig.json index 96c3a04cc9..967fe5f571 100644 --- a/types/knuddels-userapps-api/tsconfig.json +++ b/types/knuddels-userapps-api/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ko.plus/tsconfig.json b/types/ko.plus/tsconfig.json index 7dbc42737f..6395dd819f 100644 --- a/types/ko.plus/tsconfig.json +++ b/types/ko.plus/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-basic-auth/koa-basic-auth-tests.ts b/types/koa-basic-auth/koa-basic-auth-tests.ts index 43cc5ab833..a1a8e8c3c2 100644 --- a/types/koa-basic-auth/koa-basic-auth-tests.ts +++ b/types/koa-basic-auth/koa-basic-auth-tests.ts @@ -1,4 +1,4 @@ -import * as Koa from "koa"; +import Koa = require("koa"); import auth = require("koa-basic-auth"); const app = new Koa(); diff --git a/types/koa-basic-auth/tsconfig.json b/types/koa-basic-auth/tsconfig.json index 26e8260665..c6f340afe1 100644 --- a/types/koa-basic-auth/tsconfig.json +++ b/types/koa-basic-auth/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-bodyparser/koa-bodyparser-tests.ts b/types/koa-bodyparser/koa-bodyparser-tests.ts index 7e972e12be..e38eb112dd 100644 --- a/types/koa-bodyparser/koa-bodyparser-tests.ts +++ b/types/koa-bodyparser/koa-bodyparser-tests.ts @@ -1,5 +1,5 @@ -import * as Koa from "koa"; -import * as bodyParser from "koa-bodyparser"; +import Koa = require("koa"); +import bodyParser = require("koa-bodyparser"); const app = new Koa(); diff --git a/types/koa-bodyparser/tsconfig.json b/types/koa-bodyparser/tsconfig.json index 1e7b5ee33e..e2af3dd2e0 100644 --- a/types/koa-bodyparser/tsconfig.json +++ b/types/koa-bodyparser/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-cache-control/koa-cache-control-tests.ts b/types/koa-cache-control/koa-cache-control-tests.ts index c99f4fe862..9135551e7c 100644 --- a/types/koa-cache-control/koa-cache-control-tests.ts +++ b/types/koa-cache-control/koa-cache-control-tests.ts @@ -1,5 +1,5 @@ -import * as Koa from "koa"; -import * as cacheControl from "koa-cache-control"; +import Koa = require("koa"); +import cacheControl = require("koa-cache-control"); const app = new Koa(); diff --git a/types/koa-cache-control/tsconfig.json b/types/koa-cache-control/tsconfig.json index 3ecc5fd497..6c5cd8ce2b 100644 --- a/types/koa-cache-control/tsconfig.json +++ b/types/koa-cache-control/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-compose/tsconfig.json b/types/koa-compose/tsconfig.json index 59b13908a4..dcb5315c10 100644 --- a/types/koa-compose/tsconfig.json +++ b/types/koa-compose/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/koa-compress/koa-compress-tests.ts b/types/koa-compress/koa-compress-tests.ts index 30195cd30c..e24bc53b27 100644 --- a/types/koa-compress/koa-compress-tests.ts +++ b/types/koa-compress/koa-compress-tests.ts @@ -1,4 +1,4 @@ -import * as Koa from "koa"; +import Koa = require("koa"); import compress = require("koa-compress"); const app = new Koa(); diff --git a/types/koa-compress/tsconfig.json b/types/koa-compress/tsconfig.json index 332dd960c4..f52f464f96 100644 --- a/types/koa-compress/tsconfig.json +++ b/types/koa-compress/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/koa-conditional-get/tsconfig.json b/types/koa-conditional-get/tsconfig.json index 111408f39b..36380b9cc4 100644 --- a/types/koa-conditional-get/tsconfig.json +++ b/types/koa-conditional-get/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "koa-conditional-get-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/koa-csrf/koa-csrf-tests.ts b/types/koa-csrf/koa-csrf-tests.ts index d0bb211b01..8886e8b0cf 100644 --- a/types/koa-csrf/koa-csrf-tests.ts +++ b/types/koa-csrf/koa-csrf-tests.ts @@ -1,5 +1,5 @@ import koaCsrf = require("koa-csrf"); -import * as Koa from "koa"; +import Koa = require("koa"); const app = new Koa(); app.use(new koaCsrf({ diff --git a/types/koa-csrf/tsconfig.json b/types/koa-csrf/tsconfig.json index 56e1cf81a8..ff82d8c580 100644 --- a/types/koa-csrf/tsconfig.json +++ b/types/koa-csrf/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "koa-csrf-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/koa-etag/koa-etag-tests.ts b/types/koa-etag/koa-etag-tests.ts index fa2d5515d6..a5cac4b870 100644 --- a/types/koa-etag/koa-etag-tests.ts +++ b/types/koa-etag/koa-etag-tests.ts @@ -1,5 +1,5 @@ import koaEtag = require('koa-etag'); -import * as Koa from 'koa'; +import Koa = require('koa'); new Koa().use(koaEtag()); diff --git a/types/koa-etag/tsconfig.json b/types/koa-etag/tsconfig.json index d6b1feb52c..511623a09e 100644 --- a/types/koa-etag/tsconfig.json +++ b/types/koa-etag/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "koa-etag-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/koa-favicon/koa-favicon-tests.ts b/types/koa-favicon/koa-favicon-tests.ts index 72dfdb5aaa..755c38ff58 100644 --- a/types/koa-favicon/koa-favicon-tests.ts +++ b/types/koa-favicon/koa-favicon-tests.ts @@ -1,4 +1,4 @@ -import * as Koa from "koa"; +import Koa = require("koa"); import favicon = require("koa-favicon"); const app = new Koa(); diff --git a/types/koa-favicon/tsconfig.json b/types/koa-favicon/tsconfig.json index 15566de398..bab1d261b3 100644 --- a/types/koa-favicon/tsconfig.json +++ b/types/koa-favicon/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-generic-session/koa-generic-session-tests.ts b/types/koa-generic-session/koa-generic-session-tests.ts index e48d4dbef6..be10c1e04f 100644 --- a/types/koa-generic-session/koa-generic-session-tests.ts +++ b/types/koa-generic-session/koa-generic-session-tests.ts @@ -1,4 +1,4 @@ -import * as Koa from "koa"; +import Koa = require("koa"); import { MemoryStore, Session } from "koa-generic-session"; import session = require("koa-generic-session"); diff --git a/types/koa-generic-session/tsconfig.json b/types/koa-generic-session/tsconfig.json index d16c12ef15..5b694a7245 100644 --- a/types/koa-generic-session/tsconfig.json +++ b/types/koa-generic-session/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-hbs/koa-hbs-tests.ts b/types/koa-hbs/koa-hbs-tests.ts index 14a113e816..0090f446c1 100644 --- a/types/koa-hbs/koa-hbs-tests.ts +++ b/types/koa-hbs/koa-hbs-tests.ts @@ -1,4 +1,4 @@ -import * as Koa from 'koa'; +import Koa = require('koa'); import hbs = require("koa-hbs"); import * as Path from 'path'; diff --git a/types/koa-hbs/tsconfig.json b/types/koa-hbs/tsconfig.json index b286334455..e2651e411b 100644 --- a/types/koa-hbs/tsconfig.json +++ b/types/koa-hbs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-helmet/koa-helmet-tests.ts b/types/koa-helmet/koa-helmet-tests.ts index 1f50ea5c6b..2290ab07fa 100644 --- a/types/koa-helmet/koa-helmet-tests.ts +++ b/types/koa-helmet/koa-helmet-tests.ts @@ -1,4 +1,4 @@ -import * as Koa from 'koa'; +import Koa = require('koa'); import helmet = require('koa-helmet'); const app = new Koa(); diff --git a/types/koa-helmet/tsconfig.json b/types/koa-helmet/tsconfig.json index 1024081843..8f895a44bf 100644 --- a/types/koa-helmet/tsconfig.json +++ b/types/koa-helmet/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-joi-router/tsconfig.json b/types/koa-joi-router/tsconfig.json index a872570270..d5d1b300ec 100644 --- a/types/koa-joi-router/tsconfig.json +++ b/types/koa-joi-router/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/koa-json-error/koa-json-error-tests.ts b/types/koa-json-error/koa-json-error-tests.ts index 9b2ab3c8de..be76a08cb3 100644 --- a/types/koa-json-error/koa-json-error-tests.ts +++ b/types/koa-json-error/koa-json-error-tests.ts @@ -1,5 +1,5 @@ -import * as Koa from "koa"; -import * as error from "koa-json-error"; +import Koa = require("koa"); +import error = require("koa-json-error"); const app = new Koa(); diff --git a/types/koa-json-error/tsconfig.json b/types/koa-json-error/tsconfig.json index 7aa60a506f..620700358d 100644 --- a/types/koa-json-error/tsconfig.json +++ b/types/koa-json-error/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-json/koa-json-tests.ts b/types/koa-json/koa-json-tests.ts index deb3aa8e0d..bce89d95eb 100644 --- a/types/koa-json/koa-json-tests.ts +++ b/types/koa-json/koa-json-tests.ts @@ -1,5 +1,5 @@ -import * as Koa from "koa"; -import * as json from 'koa-json'; +import Koa = require("koa"); +import json = require('koa-json'); const app = new Koa(); diff --git a/types/koa-json/tsconfig.json b/types/koa-json/tsconfig.json index 914c85a096..a9350d68de 100644 --- a/types/koa-json/tsconfig.json +++ b/types/koa-json/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-logger-winston/koa-logger-winston-tests.ts b/types/koa-logger-winston/koa-logger-winston-tests.ts index 44b9047b86..7bec5877f4 100644 --- a/types/koa-logger-winston/koa-logger-winston-tests.ts +++ b/types/koa-logger-winston/koa-logger-winston-tests.ts @@ -1,5 +1,5 @@ -import * as koa from 'koa'; -import * as logger from 'koa-logger-winston'; +import koa = require('koa'); +import logger = require('koa-logger-winston'); import * as winston from 'winston'; const app = new koa(); diff --git a/types/koa-logger-winston/tsconfig.json b/types/koa-logger-winston/tsconfig.json index 2f3ccb79ee..43a0fb6611 100644 --- a/types/koa-logger-winston/tsconfig.json +++ b/types/koa-logger-winston/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-logger/koa-logger-tests.ts b/types/koa-logger/koa-logger-tests.ts index 502c33255d..bd4a32213b 100644 --- a/types/koa-logger/koa-logger-tests.ts +++ b/types/koa-logger/koa-logger-tests.ts @@ -1,5 +1,5 @@ -import * as koa from 'koa'; -import * as logger from 'koa-logger'; +import koa = require('koa'); +import logger = require('koa-logger'); const app = new koa(); app.use(logger()); diff --git a/types/koa-logger/tsconfig.json b/types/koa-logger/tsconfig.json index 28110f20ac..a82734e6f3 100644 --- a/types/koa-logger/tsconfig.json +++ b/types/koa-logger/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-morgan/koa-morgan-tests.ts b/types/koa-morgan/koa-morgan-tests.ts index 0a0e51cd95..8d4936a78a 100644 --- a/types/koa-morgan/koa-morgan-tests.ts +++ b/types/koa-morgan/koa-morgan-tests.ts @@ -1,6 +1,6 @@ import { IncomingMessage, ServerResponse } from 'http'; -import * as Koa from 'koa'; -import * as morgan from 'koa-morgan'; +import Koa = require('koa'); +import morgan = require('koa-morgan'); const app = new Koa(); diff --git a/types/koa-morgan/tsconfig.json b/types/koa-morgan/tsconfig.json index ecf170e923..a2b3ae7c8d 100644 --- a/types/koa-morgan/tsconfig.json +++ b/types/koa-morgan/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-mount/index.d.ts b/types/koa-mount/index.d.ts index d05036d83b..138d4f6f36 100644 --- a/types/koa-mount/index.d.ts +++ b/types/koa-mount/index.d.ts @@ -5,7 +5,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import * as Koa from "koa"; +import Koa = require("koa"); declare function mount(app: Koa.Middleware | Koa): Koa.Middleware; diff --git a/types/koa-mount/koa-mount-tests.ts b/types/koa-mount/koa-mount-tests.ts index 9a7702935f..139e08a3d8 100644 --- a/types/koa-mount/koa-mount-tests.ts +++ b/types/koa-mount/koa-mount-tests.ts @@ -1,5 +1,5 @@ -import * as Koa from "koa"; -import * as mount from "koa-mount"; +import Koa = require("koa"); +import mount = require("koa-mount"); const a = new Koa(); diff --git a/types/koa-mount/tsconfig.json b/types/koa-mount/tsconfig.json index d19516145b..ba31b0009f 100644 --- a/types/koa-mount/tsconfig.json +++ b/types/koa-mount/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-multer/index.d.ts b/types/koa-multer/index.d.ts new file mode 100644 index 0000000000..1c518bdd61 --- /dev/null +++ b/types/koa-multer/index.d.ts @@ -0,0 +1,134 @@ +// Type definitions for koa-multer 1.0 +// Project: https://github.com/koa-modules/multer +// Definitions by: benstevens48 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * @file + * These definitions are based on the type definitions for multer - https://github.com/expressjs/multer - found on DefinitelyTyped. + * + * Note that it is necessary to explicitly cast the `Context.req` object to type `multer.MulterIncomingMessage` + * to get the correct type for the patched `Context.req` object, as in the following example. + * ```ts + * import * as Koa from 'koa'; + * import * as Router from 'koa-router'; + * import * as multer from 'koa-multer'; + * + * async function uploadFile(ctx: Koa.Context){ + * let multerReq = ctx.req; + * let files = multerReq.files; + * let baseFilePath: string = ctx.params.path || ''; + * //... + * } + * + * let router = new Router(); + * router.put('/uploads/:path?', upload.array('files'), uploadFile); + * ``` + * The type cast is necessary since the type definitions for Koa do not allow for the `Context.req` property to be extended. + */ + +import * as Koa from 'koa'; +import { IncomingMessage } from 'http'; + +declare namespace multer { + interface File { + /** Field name specified in the form */ + fieldname: string; + /** Name of the file on the user's computer */ + originalname: string; + /** Encoding type of the file */ + encoding: string; + /** Mime type of the file */ + mimetype: string; + /** Size of the file in bytes */ + size: number; + /** The folder to which the file has been saved (DiskStorage) */ + destination: string; + /** The name of the file within the destination (DiskStorage) */ + filename: string; + /** Location of the uploaded file (DiskStorage) */ + path: string; + /** A Buffer of the entire file (MemoryStorage) */ + buffer: Buffer; + } + + interface MulterIncomingMessage extends IncomingMessage { + body: any; + file: File; + files: { + [fieldname: string]: File[]; + } | File[]; + } + + interface Field { + /** The field name. */ + name: string; + /** Optional maximum number of files per field to accept. */ + maxCount?: number; + } + + interface Options { + /** The destination directory for the uploaded files. */ + dest?: string; + /** The storage engine to use for uploaded files. */ + storage?: StorageEngine; + /** + * An object specifying the size limits of the following optional properties. This object is passed to busboy + * directly, and the details of properties can be found on https://github.com/mscdex/busboy#busboy-methods + */ + limits?: { + /** Max field name size (Default: 100 bytes) */ + fieldNameSize?: number; + /** Max field value size (Default: 1MB) */ + fieldSize?: number; + /** Max number of non- file fields (Default: Infinity) */ + fields?: number; + /** For multipart forms, the max file size (in bytes)(Default: Infinity) */ + fileSize?: number; + /** For multipart forms, the max number of file fields (Default: Infinity) */ + files?: number; + /** For multipart forms, the max number of parts (fields + files)(Default: Infinity) */ + parts?: number; + /** For multipart forms, the max number of header key=> value pairs to parse Default: 2000(same as node's http). */ + headerPairs?: number; + /** Keep the full path of files instead of just the base name (Default: false) */ + preservePath?: boolean; + }; + /** A function to control which files to upload and which to skip. */ + fileFilter?(req: IncomingMessage, file: File, callback: (error: Error | null, acceptFile: boolean) => void): void; + } + + interface StorageEngine { + _handleFile(req: IncomingMessage, file: File, callback: (error?: any, info?: File) => void): void; + _removeFile(req: IncomingMessage, file: File, callback: (error: Error) => void): void; + } + + interface DiskStorageOptions { + /** A function used to determine within which folder the uploaded files should be stored. Defaults to the system's default temporary directory. */ + destination?: string | ((req: IncomingMessage, file: File, callback: (error: Error | null, destination: string) => void) => void); + /** A function used to determine what the file should be named inside the folder. Defaults to a random name with no file extension. */ + filename?(req: IncomingMessage, file: File, callback: (error: Error | null, filename: string) => void): void; + } + + interface Instance { + /** In case you need to handle a text-only multipart form, you can use any of the multer methods (.single(), .array(), fields()), req.body contains the text fields */ + /** Accept a single file with the name fieldName. The single file will be stored in req.file. */ + single(fieldName?: string): Koa.Middleware; + /** Accept an array of files, all with the name fieldName. Optionally error out if more than maxCount files are uploaded. The array of files will be stored in req.files. */ + array(fieldName: string, maxCount?: number): Koa.Middleware; + /** Accept a mix of files, specified by fields. An object with arrays of files will be stored in req.files. */ + fields(fields: Field[]): Koa.Middleware; + /** Accepts all files that comes over the wire. An array of files will be stored in req.files. */ + any(): Koa.Middleware; + } + + /* The disk storage engine gives you full control on storing files to disk. */ + function diskStorage(options: DiskStorageOptions): StorageEngine; + /* The memory storage engine stores the files in memory as Buffer objects. */ + function memoryStorage(): StorageEngine; +} + +declare function multer(options?: multer.Options): multer.Instance; + +export = multer; diff --git a/types/koa-multer/koa-multer-tests.ts b/types/koa-multer/koa-multer-tests.ts new file mode 100644 index 0000000000..617e08c853 --- /dev/null +++ b/types/koa-multer/koa-multer-tests.ts @@ -0,0 +1,32 @@ +import Koa = require('koa'); +import multer = require('koa-multer'); + +const upload = multer({ + dest: 'uploads/', + fileFilter: (req, file, cb) => { + cb(null, true); + } +}); + +const app = new Koa(); + +app.use(upload.single('avatar')); + +app.use(upload.array('photos', 12)); + +const cpUpload = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }]); +app.use(cpUpload); + +const diskStorage = multer.diskStorage({ + destination(req, file, cb) { + cb(null, '/tmp/my-uploads'); + }, + filename(req, file, cb) { + cb(null, `${file.fieldname}-${Date.now()}`); + } +}); + +const diskUpload = multer({ storage: diskStorage }); + +const memoryStorage = multer.memoryStorage(); +const memoryUpload = multer({ storage: memoryStorage }); diff --git a/types/koa-multer/tsconfig.json b/types/koa-multer/tsconfig.json new file mode 100644 index 0000000000..64394ca142 --- /dev/null +++ b/types/koa-multer/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "koa-multer-tests.ts" + ] +} \ No newline at end of file diff --git a/types/koa-multer/tslint.json b/types/koa-multer/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/koa-multer/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/koa-passport/koa-passport-tests.ts b/types/koa-passport/koa-passport-tests.ts index 42827a85ba..afc07b956e 100644 --- a/types/koa-passport/koa-passport-tests.ts +++ b/types/koa-passport/koa-passport-tests.ts @@ -1,4 +1,4 @@ -import * as Koa from 'koa'; +import Koa = require('koa'); import * as passport from 'koa-passport'; const app = new Koa(); diff --git a/types/koa-passport/tsconfig.json b/types/koa-passport/tsconfig.json index fcd51d7953..0e27ba922a 100644 --- a/types/koa-passport/tsconfig.json +++ b/types/koa-passport/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-pino-logger/koa-pino-logger-tests.ts b/types/koa-pino-logger/koa-pino-logger-tests.ts index 68f5dd1331..bec6f887d2 100644 --- a/types/koa-pino-logger/koa-pino-logger-tests.ts +++ b/types/koa-pino-logger/koa-pino-logger-tests.ts @@ -1,5 +1,5 @@ -import * as koa from 'koa'; -import * as logger from 'koa-pino-logger'; +import koa = require('koa'); +import logger = require('koa-pino-logger'); const app = new koa(); app.use(logger()); diff --git a/types/koa-pino-logger/tsconfig.json b/types/koa-pino-logger/tsconfig.json index 13810e891e..beb0397ac8 100644 --- a/types/koa-pino-logger/tsconfig.json +++ b/types/koa-pino-logger/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-pug/tsconfig.json b/types/koa-pug/tsconfig.json index ac317cd48f..c3faadb87c 100644 --- a/types/koa-pug/tsconfig.json +++ b/types/koa-pug/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-range/koa-range-tests.ts b/types/koa-range/koa-range-tests.ts index c489bf4a6b..29982f9b04 100644 --- a/types/koa-range/koa-range-tests.ts +++ b/types/koa-range/koa-range-tests.ts @@ -1,5 +1,5 @@ -import * as range from "koa-range"; -import * as Koa from "koa"; +import range = require("koa-range"); +import Koa = require("koa"); const app = new Koa(); app.use(range); diff --git a/types/koa-range/tsconfig.json b/types/koa-range/tsconfig.json index 37c1c00f19..bbd6674449 100644 --- a/types/koa-range/tsconfig.json +++ b/types/koa-range/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-redis/koa-redis-tests.ts b/types/koa-redis/koa-redis-tests.ts index 21c8e010b0..2cf4ca2ddb 100644 --- a/types/koa-redis/koa-redis-tests.ts +++ b/types/koa-redis/koa-redis-tests.ts @@ -1,4 +1,4 @@ -import * as Koa from "koa"; +import Koa = require("koa"); import { MemoryStore, Session } from "koa-generic-session"; import session = require("koa-generic-session"); import redisStore = require("koa-redis"); diff --git a/types/koa-redis/tsconfig.json b/types/koa-redis/tsconfig.json index a49a3a13c1..5aa71b8c46 100644 --- a/types/koa-redis/tsconfig.json +++ b/types/koa-redis/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-route/koa-route-tests.ts b/types/koa-route/koa-route-tests.ts index 331c7d6b53..3b26266434 100644 --- a/types/koa-route/koa-route-tests.ts +++ b/types/koa-route/koa-route-tests.ts @@ -1,4 +1,4 @@ -import * as Koa from 'koa'; +import Koa = require('koa'); import * as route from 'koa-route'; const app = new Koa(); diff --git a/types/koa-route/tsconfig.json b/types/koa-route/tsconfig.json index 97dff8158a..d9025db325 100644 --- a/types/koa-route/tsconfig.json +++ b/types/koa-route/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-router/koa-router-tests.ts b/types/koa-router/koa-router-tests.ts index 32f041bbc7..bbd525897c 100644 --- a/types/koa-router/koa-router-tests.ts +++ b/types/koa-router/koa-router-tests.ts @@ -1,5 +1,5 @@ -import * as Koa from "koa"; -import * as Router from "koa-router"; +import Koa = require("koa"); +import Router = require("koa-router"); const app = new Koa(); diff --git a/types/koa-router/tsconfig.json b/types/koa-router/tsconfig.json index 76f07fef64..22eb9a6790 100644 --- a/types/koa-router/tsconfig.json +++ b/types/koa-router/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-send/koa-send-tests.ts b/types/koa-send/koa-send-tests.ts index a3b136ea9a..33c8cdaa18 100644 --- a/types/koa-send/koa-send-tests.ts +++ b/types/koa-send/koa-send-tests.ts @@ -1,5 +1,5 @@ -import * as Koa from 'koa'; -import * as send from 'koa-send'; +import Koa = require('koa'); +import send = require('koa-send'); const app = new Koa(); diff --git a/types/koa-send/tsconfig.json b/types/koa-send/tsconfig.json index 202d12546a..b43b7d491e 100644 --- a/types/koa-send/tsconfig.json +++ b/types/koa-send/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-session-minimal/koa-session-minimal-tests.ts b/types/koa-session-minimal/koa-session-minimal-tests.ts index b58f441d8e..6ea0ef7cf5 100644 --- a/types/koa-session-minimal/koa-session-minimal-tests.ts +++ b/types/koa-session-minimal/koa-session-minimal-tests.ts @@ -1,5 +1,5 @@ -import * as Koa from "koa"; -import * as session from "koa-session-minimal"; +import Koa = require("koa"); +import session = require("koa-session-minimal"); const app = new Koa(); diff --git a/types/koa-session-minimal/tsconfig.json b/types/koa-session-minimal/tsconfig.json index 42cafb4d4a..1ce6059819 100644 --- a/types/koa-session-minimal/tsconfig.json +++ b/types/koa-session-minimal/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-session/index.d.ts b/types/koa-session/index.d.ts index d05ce7055e..8650a07d91 100644 --- a/types/koa-session/index.d.ts +++ b/types/koa-session/index.d.ts @@ -15,7 +15,7 @@ =============================================== */ -import * as Koa from "koa"; +import Koa = require("koa"); declare namespace session { /** diff --git a/types/koa-session/koa-session-tests.ts b/types/koa-session/koa-session-tests.ts index 02f944ae66..2844767240 100644 --- a/types/koa-session/koa-session-tests.ts +++ b/types/koa-session/koa-session-tests.ts @@ -1,5 +1,5 @@ -import * as Koa from 'koa'; -import * as session from 'koa-session'; +import Koa = require('koa'); +import session = require('koa-session'); import * as ContextSession from "koa-session/lib/context"; import { diff --git a/types/koa-session/tsconfig.json b/types/koa-session/tsconfig.json index df47800012..21efde4293 100644 --- a/types/koa-session/tsconfig.json +++ b/types/koa-session/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -23,4 +24,4 @@ "lib/util.d.ts", "koa-session-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/koa-sslify/tsconfig.json b/types/koa-sslify/tsconfig.json index 64615e2ab9..c41803dcde 100644 --- a/types/koa-sslify/tsconfig.json +++ b/types/koa-sslify/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "koa-sslify-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/koa-static/koa-static-tests.ts b/types/koa-static/koa-static-tests.ts index 9b0d756f7d..c81b81483c 100644 --- a/types/koa-static/koa-static-tests.ts +++ b/types/koa-static/koa-static-tests.ts @@ -1,4 +1,4 @@ -import * as Koa from "koa"; +import Koa = require("koa"); import serve = require("koa-static"); const app = new Koa(); diff --git a/types/koa-static/tsconfig.json b/types/koa-static/tsconfig.json index ce89a3c21f..339209d9de 100644 --- a/types/koa-static/tsconfig.json +++ b/types/koa-static/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-views/koa-views-tests.ts b/types/koa-views/koa-views-tests.ts index 65d6be7e1f..3453b156de 100644 --- a/types/koa-views/koa-views-tests.ts +++ b/types/koa-views/koa-views-tests.ts @@ -1,5 +1,5 @@ -import * as Koa from "koa"; -import * as views from "koa-views"; +import Koa = require("koa"); +import views = require("koa-views"); const app = new Koa(); diff --git a/types/koa-views/tsconfig.json b/types/koa-views/tsconfig.json index 95d7a74d53..31b4ec33f0 100644 --- a/types/koa-views/tsconfig.json +++ b/types/koa-views/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa-webpack/tsconfig.json b/types/koa-webpack/tsconfig.json index d3cef374db..7ff0f551fe 100644 --- a/types/koa-webpack/tsconfig.json +++ b/types/koa-webpack/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "koa-webpack-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/koa-websocket/index.d.ts b/types/koa-websocket/index.d.ts index 326f098ae5..e7a6c39a7d 100644 --- a/types/koa-websocket/index.d.ts +++ b/types/koa-websocket/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import * as Koa from 'koa'; +import Koa = require('koa'); import * as ws from 'ws'; import * as http from 'http'; import * as https from 'https'; @@ -30,7 +30,5 @@ interface KoaWebsocketApp extends Koa { ws: KoaWebsocketServer; } -type KoaWebsockets = (app: Koa) => KoaWebsocketApp; - -declare const websockets: KoaWebsockets; +declare function websockets(app: Koa): KoaWebsocketApp; export = websockets; diff --git a/types/koa-websocket/koa-websocket-tests.ts b/types/koa-websocket/koa-websocket-tests.ts index 66bd4bf4d2..bd99c3d17e 100644 --- a/types/koa-websocket/koa-websocket-tests.ts +++ b/types/koa-websocket/koa-websocket-tests.ts @@ -1,5 +1,5 @@ -import * as Koa from 'koa'; -import * as websocket from 'koa-websocket'; +import Koa = require('koa'); +import websocket = require('koa-websocket'); const app = websocket(new Koa()); diff --git a/types/koa-websocket/tsconfig.json b/types/koa-websocket/tsconfig.json index 87c9225d08..4a0daa327f 100644 --- a/types/koa-websocket/tsconfig.json +++ b/types/koa-websocket/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa/index.d.ts b/types/koa/index.d.ts index 1203864c8c..2a5c49f110 100644 --- a/types/koa/index.d.ts +++ b/types/koa/index.d.ts @@ -21,7 +21,7 @@ import * as accepts from "accepts"; import * as Cookies from "cookies"; import { EventEmitter } from "events"; import { IncomingMessage, ServerResponse, Server } from "http"; -import * as httpAssert from "http-assert"; +import httpAssert = require("http-assert"); import * as Keygrip from "keygrip"; import * as compose from "koa-compose"; import { Socket, ListenOptions } from "net"; diff --git a/types/koa/koa-tests.ts b/types/koa/koa-tests.ts index 6dbc073bea..ea0a4a18b8 100644 --- a/types/koa/koa-tests.ts +++ b/types/koa/koa-tests.ts @@ -1,4 +1,4 @@ -import * as Koa from "koa"; +import Koa = require("koa"); const app = new Koa(); diff --git a/types/koa/tsconfig.json b/types/koa/tsconfig.json index 5c4ba0f656..730ff1452f 100644 --- a/types/koa/tsconfig.json +++ b/types/koa/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/koa2-cors/koa2-cors-tests.ts b/types/koa2-cors/koa2-cors-tests.ts index 820722d635..228fa4242e 100644 --- a/types/koa2-cors/koa2-cors-tests.ts +++ b/types/koa2-cors/koa2-cors-tests.ts @@ -1,5 +1,5 @@ -import * as Koa from 'koa'; -import * as cors from 'koa2-cors'; +import Koa = require('koa'); +import cors = require('koa2-cors'); const app = new Koa(); app.use(cors({ diff --git a/types/koa2-cors/tsconfig.json b/types/koa2-cors/tsconfig.json index 6c1a4b2374..9266fd9244 100644 --- a/types/koa2-cors/tsconfig.json +++ b/types/koa2-cors/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/koa__cors/tsconfig.json b/types/koa__cors/tsconfig.json index 220bebc26a..38bf5b7cc1 100644 --- a/types/koa__cors/tsconfig.json +++ b/types/koa__cors/tsconfig.json @@ -15,6 +15,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { "@koa/cors": [ "koa__cors" diff --git a/types/kolite/tsconfig.json b/types/kolite/tsconfig.json index 1dc7da3187..b353af59cf 100644 --- a/types/kolite/tsconfig.json +++ b/types/kolite/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/konami.js/tsconfig.json b/types/konami.js/tsconfig.json index b802a3109c..0d91607c95 100644 --- a/types/konami.js/tsconfig.json +++ b/types/konami.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/kraken-js/tsconfig.json b/types/kraken-js/tsconfig.json index 2fce7a799d..15fd480c05 100644 --- a/types/kraken-js/tsconfig.json +++ b/types/kraken-js/tsconfig.json @@ -9,13 +9,16 @@ "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "kraken-js-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/kramed/tsconfig.json b/types/kramed/tsconfig.json index b816669307..95206a5b55 100644 --- a/types/kramed/tsconfig.json +++ b/types/kramed/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/kss/tsconfig.json b/types/kss/tsconfig.json index 987701f0bb..c5edb7df62 100644 --- a/types/kss/tsconfig.json +++ b/types/kss/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/kue/tsconfig.json b/types/kue/tsconfig.json index dab7ca300b..1fb275fc79 100644 --- a/types/kue/tsconfig.json +++ b/types/kue/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/kurento-utils/tsconfig.json b/types/kurento-utils/tsconfig.json index 8920df3604..023939e6a2 100644 --- a/types/kurento-utils/tsconfig.json +++ b/types/kurento-utils/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/kuromoji/tsconfig.json b/types/kuromoji/tsconfig.json index f74ea439af..442773f5e9 100644 --- a/types/kuromoji/tsconfig.json +++ b/types/kuromoji/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lab/tsconfig.json b/types/lab/tsconfig.json index 8e0ad06d10..7ddd8d3048 100644 --- a/types/lab/tsconfig.json +++ b/types/lab/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ladda/tsconfig.json b/types/ladda/tsconfig.json index 2d878b6f9d..e14f07795b 100644 --- a/types/ladda/tsconfig.json +++ b/types/ladda/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lasso/tsconfig.json b/types/lasso/tsconfig.json index 210de56a0d..197a5bede9 100644 --- a/types/lasso/tsconfig.json +++ b/types/lasso/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "lasso-tests.ts", @@ -29,4 +30,4 @@ "lib/writers/Writer.d.ts", "middleware/index.d.ts" ] -} +} \ No newline at end of file diff --git a/types/later/tsconfig.json b/types/later/tsconfig.json index 5b74d9d144..338433890b 100644 --- a/types/later/tsconfig.json +++ b/types/later/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/latinize/tsconfig.json b/types/latinize/tsconfig.json index 90b98478aa..2e3c34b548 100644 --- a/types/latinize/tsconfig.json +++ b/types/latinize/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/latlon-geohash/tsconfig.json b/types/latlon-geohash/tsconfig.json index 10d9c00791..d34a297b36 100644 --- a/types/latlon-geohash/tsconfig.json +++ b/types/latlon-geohash/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "latlon-geohash-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/launchpad/tsconfig.json b/types/launchpad/tsconfig.json index 01333e0ca2..348675bca2 100644 --- a/types/launchpad/tsconfig.json +++ b/types/launchpad/tsconfig.json @@ -11,6 +11,7 @@ "strictFunctionTypes": true, "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "types": [], "baseUrl": "../", "typeRoots": [ diff --git a/types/lazy.js/tsconfig.json b/types/lazy.js/tsconfig.json index 0f2d64001d..4faba72fe2 100644 --- a/types/lazy.js/tsconfig.json +++ b/types/lazy.js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lazypipe/tsconfig.json b/types/lazypipe/tsconfig.json index 7eb8c93b6a..f9a761bb01 100644 --- a/types/lazypipe/tsconfig.json +++ b/types/lazypipe/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ldapjs/tsconfig.json b/types/ldapjs/tsconfig.json index a0df7615fd..860c7deb89 100644 --- a/types/ldapjs/tsconfig.json +++ b/types/ldapjs/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "ldapjs-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/leadfoot/tsconfig.json b/types/leadfoot/tsconfig.json index 5672c5bf4d..7390c30f18 100644 --- a/types/leadfoot/tsconfig.json +++ b/types/leadfoot/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/leaflet-areaselect/tsconfig.json b/types/leaflet-areaselect/tsconfig.json index 98aceb4b21..54aa992c34 100644 --- a/types/leaflet-areaselect/tsconfig.json +++ b/types/leaflet-areaselect/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet-curve/tsconfig.json b/types/leaflet-curve/tsconfig.json index 6ca509b566..17abbb6dd6 100644 --- a/types/leaflet-curve/tsconfig.json +++ b/types/leaflet-curve/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet-draw/tsconfig.json b/types/leaflet-draw/tsconfig.json index 5db4feb624..d27f42eebf 100644 --- a/types/leaflet-draw/tsconfig.json +++ b/types/leaflet-draw/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet-editable/tsconfig.json b/types/leaflet-editable/tsconfig.json index d03e43670e..9565df6304 100644 --- a/types/leaflet-editable/tsconfig.json +++ b/types/leaflet-editable/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet-fullscreen/tsconfig.json b/types/leaflet-fullscreen/tsconfig.json index 102331a4af..4273a23910 100644 --- a/types/leaflet-fullscreen/tsconfig.json +++ b/types/leaflet-fullscreen/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet-geocoder-mapzen/tsconfig.json b/types/leaflet-geocoder-mapzen/tsconfig.json index 9bf4ee0bfb..197f88ad4f 100644 --- a/types/leaflet-geocoder-mapzen/tsconfig.json +++ b/types/leaflet-geocoder-mapzen/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet-gpx/tsconfig.json b/types/leaflet-gpx/tsconfig.json index 08f5612820..475ac13cda 100644 --- a/types/leaflet-gpx/tsconfig.json +++ b/types/leaflet-gpx/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet-imageoverlay-rotated/tsconfig.json b/types/leaflet-imageoverlay-rotated/tsconfig.json index 440971024d..4796b0511a 100644 --- a/types/leaflet-imageoverlay-rotated/tsconfig.json +++ b/types/leaflet-imageoverlay-rotated/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet-label/tsconfig.json b/types/leaflet-label/tsconfig.json index bf2cfa0f43..ba2680e88c 100644 --- a/types/leaflet-label/tsconfig.json +++ b/types/leaflet-label/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet-mouse-position/tsconfig.json b/types/leaflet-mouse-position/tsconfig.json index a853ad3c56..8322b38776 100644 --- a/types/leaflet-mouse-position/tsconfig.json +++ b/types/leaflet-mouse-position/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "leaflet-mouse-position-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/leaflet-polylinedecorator/tsconfig.json b/types/leaflet-polylinedecorator/tsconfig.json index f84b2a3913..7f81263acb 100644 --- a/types/leaflet-polylinedecorator/tsconfig.json +++ b/types/leaflet-polylinedecorator/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet-providers/tsconfig.json b/types/leaflet-providers/tsconfig.json index bb2349b7d5..b36bd5c2c4 100644 --- a/types/leaflet-providers/tsconfig.json +++ b/types/leaflet-providers/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet-rotatedmarker/tsconfig.json b/types/leaflet-rotatedmarker/tsconfig.json index 18bf544889..195a3ec8ad 100644 --- a/types/leaflet-rotatedmarker/tsconfig.json +++ b/types/leaflet-rotatedmarker/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "leaflet-rotatedmarker-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/leaflet.awesome-markers/tsconfig.json b/types/leaflet.awesome-markers/tsconfig.json index 079cf577d2..6d25407162 100644 --- a/types/leaflet.awesome-markers/tsconfig.json +++ b/types/leaflet.awesome-markers/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet.awesome-markers/v0/tsconfig.json b/types/leaflet.awesome-markers/v0/tsconfig.json index 549076e43b..db5190d1ca 100644 --- a/types/leaflet.awesome-markers/v0/tsconfig.json +++ b/types/leaflet.awesome-markers/v0/tsconfig.json @@ -23,7 +23,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet.fullscreen/tsconfig.json b/types/leaflet.fullscreen/tsconfig.json index bb2cf83e37..29a6ea1ec7 100644 --- a/types/leaflet.fullscreen/tsconfig.json +++ b/types/leaflet.fullscreen/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet.gridlayer.googlemutant/tsconfig.json b/types/leaflet.gridlayer.googlemutant/tsconfig.json index d739a04322..73164f18ca 100644 --- a/types/leaflet.gridlayer.googlemutant/tsconfig.json +++ b/types/leaflet.gridlayer.googlemutant/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet.heat/tsconfig.json b/types/leaflet.heat/tsconfig.json index 482c984b8c..cc206c4e7f 100644 --- a/types/leaflet.heat/tsconfig.json +++ b/types/leaflet.heat/tsconfig.json @@ -1,24 +1,25 @@ { - "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", - "leaflet.heat-tests.ts" - ] -} + "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", + "leaflet.heat-tests.ts" + ] +} \ No newline at end of file diff --git a/types/leaflet.locatecontrol/tsconfig.json b/types/leaflet.locatecontrol/tsconfig.json index 22ab0179b2..6da0fdda3b 100644 --- a/types/leaflet.locatecontrol/tsconfig.json +++ b/types/leaflet.locatecontrol/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet.markercluster.layersupport/tsconfig.json b/types/leaflet.markercluster.layersupport/tsconfig.json index 13ba48e6f4..47502f355b 100644 --- a/types/leaflet.markercluster.layersupport/tsconfig.json +++ b/types/leaflet.markercluster.layersupport/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet.markercluster/tsconfig.json b/types/leaflet.markercluster/tsconfig.json index b1f7f8c1af..67efe9169e 100644 --- a/types/leaflet.markercluster/tsconfig.json +++ b/types/leaflet.markercluster/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet.pancontrol/tsconfig.json b/types/leaflet.pancontrol/tsconfig.json index ec286c0305..8341a27f73 100644 --- a/types/leaflet.pancontrol/tsconfig.json +++ b/types/leaflet.pancontrol/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "leaflet.pancontrol-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/leaflet.pm/tsconfig.json b/types/leaflet.pm/tsconfig.json index b2313b93ee..ffe46ff393 100644 --- a/types/leaflet.pm/tsconfig.json +++ b/types/leaflet.pm/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet.polylinemeasure/tsconfig.json b/types/leaflet.polylinemeasure/tsconfig.json index b1db5e086d..2a4070495c 100644 --- a/types/leaflet.polylinemeasure/tsconfig.json +++ b/types/leaflet.polylinemeasure/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "leaflet.polylinemeasure-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/leaflet/tsconfig.json b/types/leaflet/tsconfig.json index 55862abef1..ab1f202443 100644 --- a/types/leaflet/tsconfig.json +++ b/types/leaflet/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leaflet/v0/tsconfig.json b/types/leaflet/v0/tsconfig.json index c8003b67d8..a2d29bb367 100644 --- a/types/leaflet/v0/tsconfig.json +++ b/types/leaflet/v0/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leapmotionts/tsconfig.json b/types/leapmotionts/tsconfig.json index 7ac842a053..b5fc5f85b4 100644 --- a/types/leapmotionts/tsconfig.json +++ b/types/leapmotionts/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/legal-eagle/tsconfig.json b/types/legal-eagle/tsconfig.json index 380eaaed72..d41814f483 100644 --- a/types/legal-eagle/tsconfig.json +++ b/types/legal-eagle/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "legal-eagle-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/less-middleware/tsconfig.json b/types/less-middleware/tsconfig.json index 8a807955b0..fe169cfb2f 100644 --- a/types/less-middleware/tsconfig.json +++ b/types/less-middleware/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/less/tsconfig.json b/types/less/tsconfig.json index 635134c330..002ef68ece 100644 --- a/types/less/tsconfig.json +++ b/types/less/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/less2sass/tsconfig.json b/types/less2sass/tsconfig.json index e70848dca8..fef36e8edd 100644 --- a/types/less2sass/tsconfig.json +++ b/types/less2sass/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "less2sass-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/lestate/tsconfig.json b/types/lestate/tsconfig.json index 152bf946a6..8b6cfd98c1 100644 --- a/types/lestate/tsconfig.json +++ b/types/lestate/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/level-sublevel/tsconfig.json b/types/level-sublevel/tsconfig.json index 4dad69a329..b9253b7772 100644 --- a/types/level-sublevel/tsconfig.json +++ b/types/level-sublevel/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leveldown/leveldown-tests.ts b/types/leveldown/leveldown-tests.ts index 94d852d204..0aa9b3625e 100644 --- a/types/leveldown/leveldown-tests.ts +++ b/types/leveldown/leveldown-tests.ts @@ -1,4 +1,4 @@ -import * as leveldown from "leveldown"; +import leveldown = require("leveldown"); const db = leveldown("db1"); diff --git a/types/leveldown/tsconfig.json b/types/leveldown/tsconfig.json index 68b5638f5b..5c30c34f2f 100644 --- a/types/leveldown/tsconfig.json +++ b/types/leveldown/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/levelup/levelup-tests.ts b/types/levelup/levelup-tests.ts index 8827512437..2d3867cdd3 100644 --- a/types/levelup/levelup-tests.ts +++ b/types/levelup/levelup-tests.ts @@ -1,4 +1,4 @@ -import * as levelup from "levelup"; +import levelup = require("levelup"); interface BufferEncoding { encode(val: any): Buffer; @@ -68,7 +68,7 @@ db.batch() .write(function () { console.log('Done!') }) var open:boolean = db.isOpen(); -var closed:boolean = db.isClosed(); +var closed:boolean = db.isClosed(); db.createReadStream() .on('data', function (data: any) { console.log(data.key, '=', data.value) diff --git a/types/levelup/tsconfig.json b/types/levelup/tsconfig.json index 8825ba9b79..ac406bd9b2 100644 --- a/types/levelup/tsconfig.json +++ b/types/levelup/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/leven/tsconfig.json b/types/leven/tsconfig.json index 14d505d892..bcdc4add35 100644 --- a/types/leven/tsconfig.json +++ b/types/leven/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/levenshtein/tsconfig.json b/types/levenshtein/tsconfig.json index da44f54a3e..a02655c66d 100644 --- a/types/levenshtein/tsconfig.json +++ b/types/levenshtein/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/libpq/libpq-tests.ts b/types/libpq/libpq-tests.ts index fee968dabc..f1ae6cc1e3 100644 --- a/types/libpq/libpq-tests.ts +++ b/types/libpq/libpq-tests.ts @@ -1,9 +1,9 @@ /// import { Buffer } from 'buffer'; -import * as assert from 'assert'; +import assert = require('assert'); import * as async from 'async'; -import * as PQ from 'libpq'; +import PQ = require('libpq'); declare const _: { times(n: number, f: () => T): T[] }; diff --git a/types/libpq/tsconfig.json b/types/libpq/tsconfig.json index c2179c6020..859660d83b 100644 --- a/types/libpq/tsconfig.json +++ b/types/libpq/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/libxmljs/tsconfig.json b/types/libxmljs/tsconfig.json index 7201fffe81..e44e2461e1 100644 --- a/types/libxmljs/tsconfig.json +++ b/types/libxmljs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/libxslt/tsconfig.json b/types/libxslt/tsconfig.json index a7f7f94ffc..85f9f9b81d 100644 --- a/types/libxslt/tsconfig.json +++ b/types/libxslt/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/license-checker/tsconfig.json b/types/license-checker/tsconfig.json index 3cfded1e87..f5b303f669 100644 --- a/types/license-checker/tsconfig.json +++ b/types/license-checker/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lil-uuid/tsconfig.json b/types/lil-uuid/tsconfig.json index 889bd07cca..a1a661c82a 100644 --- a/types/lil-uuid/tsconfig.json +++ b/types/lil-uuid/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "lil-uuid-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/lime-js/tsconfig.json b/types/lime-js/tsconfig.json index fb352deb87..4345d000d2 100644 --- a/types/lime-js/tsconfig.json +++ b/types/lime-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/line-by-line/line-by-line-tests.ts b/types/line-by-line/line-by-line-tests.ts index 9181e91a98..c97d02ca58 100644 --- a/types/line-by-line/line-by-line-tests.ts +++ b/types/line-by-line/line-by-line-tests.ts @@ -1,4 +1,4 @@ -import * as LineByLineReader from "line-by-line"; +import LineByLineReader = require("line-by-line"); const reader: LineByLineReader = new LineByLineReader("index.d.ts"); reader.on("line", (line: any) => { diff --git a/types/line-by-line/tsconfig.json b/types/line-by-line/tsconfig.json index c92dc43aac..43e95d3ed0 100644 --- a/types/line-by-line/tsconfig.json +++ b/types/line-by-line/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/line-reader/tsconfig.json b/types/line-reader/tsconfig.json index 0bf05161de..824b195e26 100644 --- a/types/line-reader/tsconfig.json +++ b/types/line-reader/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/linkify-it/tsconfig.json b/types/linkify-it/tsconfig.json index 53501188a6..bfc6f13f86 100644 --- a/types/linkify-it/tsconfig.json +++ b/types/linkify-it/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lls/tsconfig.json b/types/lls/tsconfig.json index 41aa184116..91a2928fd8 100644 --- a/types/lls/tsconfig.json +++ b/types/lls/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/load-json-file/tsconfig.json b/types/load-json-file/tsconfig.json index 9cbafc8746..0c3ea42200 100644 --- a/types/load-json-file/tsconfig.json +++ b/types/load-json-file/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/loader-runner/tsconfig.json b/types/loader-runner/tsconfig.json index 9a8894c61b..72472c0eb3 100644 --- a/types/loader-runner/tsconfig.json +++ b/types/loader-runner/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/loader-utils/tsconfig.json b/types/loader-utils/tsconfig.json index 91aa5704c4..aed67fbc1b 100644 --- a/types/loader-utils/tsconfig.json +++ b/types/loader-utils/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/loadware/tsconfig.json b/types/loadware/tsconfig.json index 5921615bf8..07bc5a8c23 100644 --- a/types/loadware/tsconfig.json +++ b/types/loadware/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lobibox/tsconfig.json b/types/lobibox/tsconfig.json index ef1a1c2f64..ee14a0056b 100644 --- a/types/lobibox/tsconfig.json +++ b/types/lobibox/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/local-dynamo/tsconfig.json b/types/local-dynamo/tsconfig.json index fe3803ac8c..d99efd9ac3 100644 --- a/types/local-dynamo/tsconfig.json +++ b/types/local-dynamo/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "local-dynamo-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/localized-countries/tsconfig.json b/types/localized-countries/tsconfig.json index 61ec539732..bea6b3f1e4 100644 --- a/types/localized-countries/tsconfig.json +++ b/types/localized-countries/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/localizejs-library/tsconfig.json b/types/localizejs-library/tsconfig.json index a297d28148..b0d9382afe 100644 --- a/types/localizejs-library/tsconfig.json +++ b/types/localizejs-library/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/locate-path/tsconfig.json b/types/locate-path/tsconfig.json index 355b51b851..06d40b6727 100644 --- a/types/locate-path/tsconfig.json +++ b/types/locate-path/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lockfile/tsconfig.json b/types/lockfile/tsconfig.json index 83b6126099..86b31141a7 100644 --- a/types/lockfile/tsconfig.json +++ b/types/lockfile/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lockfile/v0/tsconfig.json b/types/lockfile/v0/tsconfig.json index a5f99334c4..2cfa991fab 100644 --- a/types/lockfile/v0/tsconfig.json +++ b/types/lockfile/v0/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lockr/tsconfig.json b/types/lockr/tsconfig.json index 391de2fb03..c693013904 100644 --- a/types/lockr/tsconfig.json +++ b/types/lockr/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/locutus/tsconfig.json b/types/locutus/tsconfig.json index 2a54cd1721..4a1db4fa50 100644 --- a/types/locutus/tsconfig.json +++ b/types/locutus/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lodash-es/tsconfig.json b/types/lodash-es/tsconfig.json index 7f69811c3c..192ee5b0af 100644 --- a/types/lodash-es/tsconfig.json +++ b/types/lodash-es/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -341,4 +342,4 @@ "zipObjectDeep.d.ts", "zipWith.d.ts" ] -} +} \ No newline at end of file diff --git a/types/lodash-webpack-plugin/lodash-webpack-plugin-tests.ts b/types/lodash-webpack-plugin/lodash-webpack-plugin-tests.ts index d6483e3d03..6d0163faf6 100644 --- a/types/lodash-webpack-plugin/lodash-webpack-plugin-tests.ts +++ b/types/lodash-webpack-plugin/lodash-webpack-plugin-tests.ts @@ -1,4 +1,4 @@ -import * as LodashModuleReplacementPlugin from 'lodash-webpack-plugin'; +import LodashModuleReplacementPlugin = require('lodash-webpack-plugin'); new LodashModuleReplacementPlugin(); diff --git a/types/lodash-webpack-plugin/tsconfig.json b/types/lodash-webpack-plugin/tsconfig.json index 5a4f35d31e..fd54c3b249 100644 --- a/types/lodash-webpack-plugin/tsconfig.json +++ b/types/lodash-webpack-plugin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lodash.add/tsconfig.json b/types/lodash.add/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.add/tsconfig.json +++ b/types/lodash.add/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.after/tsconfig.json b/types/lodash.after/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.after/tsconfig.json +++ b/types/lodash.after/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.ary/tsconfig.json b/types/lodash.ary/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.ary/tsconfig.json +++ b/types/lodash.ary/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.assign/tsconfig.json b/types/lodash.assign/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.assign/tsconfig.json +++ b/types/lodash.assign/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.assignin/tsconfig.json b/types/lodash.assignin/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.assignin/tsconfig.json +++ b/types/lodash.assignin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.assigninwith/tsconfig.json b/types/lodash.assigninwith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.assigninwith/tsconfig.json +++ b/types/lodash.assigninwith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.assignwith/tsconfig.json b/types/lodash.assignwith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.assignwith/tsconfig.json +++ b/types/lodash.assignwith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.at/tsconfig.json b/types/lodash.at/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.at/tsconfig.json +++ b/types/lodash.at/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.attempt/tsconfig.json b/types/lodash.attempt/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.attempt/tsconfig.json +++ b/types/lodash.attempt/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.before/tsconfig.json b/types/lodash.before/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.before/tsconfig.json +++ b/types/lodash.before/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.bind/tsconfig.json b/types/lodash.bind/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.bind/tsconfig.json +++ b/types/lodash.bind/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.bindall/tsconfig.json b/types/lodash.bindall/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.bindall/tsconfig.json +++ b/types/lodash.bindall/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.bindkey/tsconfig.json b/types/lodash.bindkey/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.bindkey/tsconfig.json +++ b/types/lodash.bindkey/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.camelcase/tsconfig.json b/types/lodash.camelcase/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.camelcase/tsconfig.json +++ b/types/lodash.camelcase/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.capitalize/tsconfig.json b/types/lodash.capitalize/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.capitalize/tsconfig.json +++ b/types/lodash.capitalize/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.castarray/tsconfig.json b/types/lodash.castarray/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.castarray/tsconfig.json +++ b/types/lodash.castarray/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.ceil/tsconfig.json b/types/lodash.ceil/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.ceil/tsconfig.json +++ b/types/lodash.ceil/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.chunk/tsconfig.json b/types/lodash.chunk/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.chunk/tsconfig.json +++ b/types/lodash.chunk/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.clamp/tsconfig.json b/types/lodash.clamp/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.clamp/tsconfig.json +++ b/types/lodash.clamp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.clone/tsconfig.json b/types/lodash.clone/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.clone/tsconfig.json +++ b/types/lodash.clone/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.clonedeep/tsconfig.json b/types/lodash.clonedeep/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.clonedeep/tsconfig.json +++ b/types/lodash.clonedeep/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.clonedeepwith/tsconfig.json b/types/lodash.clonedeepwith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.clonedeepwith/tsconfig.json +++ b/types/lodash.clonedeepwith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.clonewith/tsconfig.json b/types/lodash.clonewith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.clonewith/tsconfig.json +++ b/types/lodash.clonewith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.compact/tsconfig.json b/types/lodash.compact/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.compact/tsconfig.json +++ b/types/lodash.compact/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.concat/tsconfig.json b/types/lodash.concat/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.concat/tsconfig.json +++ b/types/lodash.concat/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.cond/tsconfig.json b/types/lodash.cond/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.cond/tsconfig.json +++ b/types/lodash.cond/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.constant/tsconfig.json b/types/lodash.constant/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.constant/tsconfig.json +++ b/types/lodash.constant/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.countby/tsconfig.json b/types/lodash.countby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.countby/tsconfig.json +++ b/types/lodash.countby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.create/tsconfig.json b/types/lodash.create/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.create/tsconfig.json +++ b/types/lodash.create/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.curry/tsconfig.json b/types/lodash.curry/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.curry/tsconfig.json +++ b/types/lodash.curry/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.curryright/tsconfig.json b/types/lodash.curryright/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.curryright/tsconfig.json +++ b/types/lodash.curryright/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.debounce/tsconfig.json b/types/lodash.debounce/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.debounce/tsconfig.json +++ b/types/lodash.debounce/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.deburr/tsconfig.json b/types/lodash.deburr/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.deburr/tsconfig.json +++ b/types/lodash.deburr/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.defaults/tsconfig.json b/types/lodash.defaults/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.defaults/tsconfig.json +++ b/types/lodash.defaults/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.defaultsdeep/tsconfig.json b/types/lodash.defaultsdeep/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.defaultsdeep/tsconfig.json +++ b/types/lodash.defaultsdeep/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.defer/tsconfig.json b/types/lodash.defer/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.defer/tsconfig.json +++ b/types/lodash.defer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.delay/tsconfig.json b/types/lodash.delay/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.delay/tsconfig.json +++ b/types/lodash.delay/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.difference/tsconfig.json b/types/lodash.difference/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.difference/tsconfig.json +++ b/types/lodash.difference/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.differenceby/tsconfig.json b/types/lodash.differenceby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.differenceby/tsconfig.json +++ b/types/lodash.differenceby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.differencewith/tsconfig.json b/types/lodash.differencewith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.differencewith/tsconfig.json +++ b/types/lodash.differencewith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.divide/tsconfig.json b/types/lodash.divide/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.divide/tsconfig.json +++ b/types/lodash.divide/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.drop/tsconfig.json b/types/lodash.drop/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.drop/tsconfig.json +++ b/types/lodash.drop/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.dropright/tsconfig.json b/types/lodash.dropright/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.dropright/tsconfig.json +++ b/types/lodash.dropright/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.droprightwhile/tsconfig.json b/types/lodash.droprightwhile/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.droprightwhile/tsconfig.json +++ b/types/lodash.droprightwhile/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.dropwhile/tsconfig.json b/types/lodash.dropwhile/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.dropwhile/tsconfig.json +++ b/types/lodash.dropwhile/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.endswith/tsconfig.json b/types/lodash.endswith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.endswith/tsconfig.json +++ b/types/lodash.endswith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.eq/tsconfig.json b/types/lodash.eq/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.eq/tsconfig.json +++ b/types/lodash.eq/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.escape/tsconfig.json b/types/lodash.escape/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.escape/tsconfig.json +++ b/types/lodash.escape/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.escaperegexp/tsconfig.json b/types/lodash.escaperegexp/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.escaperegexp/tsconfig.json +++ b/types/lodash.escaperegexp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.every/tsconfig.json b/types/lodash.every/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.every/tsconfig.json +++ b/types/lodash.every/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.fill/tsconfig.json b/types/lodash.fill/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.fill/tsconfig.json +++ b/types/lodash.fill/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.filter/tsconfig.json b/types/lodash.filter/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.filter/tsconfig.json +++ b/types/lodash.filter/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.find/tsconfig.json b/types/lodash.find/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.find/tsconfig.json +++ b/types/lodash.find/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.findindex/tsconfig.json b/types/lodash.findindex/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.findindex/tsconfig.json +++ b/types/lodash.findindex/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.findkey/tsconfig.json b/types/lodash.findkey/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.findkey/tsconfig.json +++ b/types/lodash.findkey/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.findlast/tsconfig.json b/types/lodash.findlast/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.findlast/tsconfig.json +++ b/types/lodash.findlast/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.findlastindex/tsconfig.json b/types/lodash.findlastindex/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.findlastindex/tsconfig.json +++ b/types/lodash.findlastindex/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.findlastkey/tsconfig.json b/types/lodash.findlastkey/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.findlastkey/tsconfig.json +++ b/types/lodash.findlastkey/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.first/tsconfig.json b/types/lodash.first/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.first/tsconfig.json +++ b/types/lodash.first/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.flatmap/tsconfig.json b/types/lodash.flatmap/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.flatmap/tsconfig.json +++ b/types/lodash.flatmap/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.flatmapdeep/tsconfig.json b/types/lodash.flatmapdeep/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.flatmapdeep/tsconfig.json +++ b/types/lodash.flatmapdeep/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.flatmapdepth/tsconfig.json b/types/lodash.flatmapdepth/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.flatmapdepth/tsconfig.json +++ b/types/lodash.flatmapdepth/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.flatten/tsconfig.json b/types/lodash.flatten/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.flatten/tsconfig.json +++ b/types/lodash.flatten/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.flattendeep/tsconfig.json b/types/lodash.flattendeep/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.flattendeep/tsconfig.json +++ b/types/lodash.flattendeep/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.flattendepth/tsconfig.json b/types/lodash.flattendepth/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.flattendepth/tsconfig.json +++ b/types/lodash.flattendepth/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.flip/tsconfig.json b/types/lodash.flip/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.flip/tsconfig.json +++ b/types/lodash.flip/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.floor/tsconfig.json b/types/lodash.floor/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.floor/tsconfig.json +++ b/types/lodash.floor/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.flow/tsconfig.json b/types/lodash.flow/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.flow/tsconfig.json +++ b/types/lodash.flow/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.flowright/tsconfig.json b/types/lodash.flowright/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.flowright/tsconfig.json +++ b/types/lodash.flowright/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.foreach/tsconfig.json b/types/lodash.foreach/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.foreach/tsconfig.json +++ b/types/lodash.foreach/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.foreachright/tsconfig.json b/types/lodash.foreachright/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.foreachright/tsconfig.json +++ b/types/lodash.foreachright/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.forin/tsconfig.json b/types/lodash.forin/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.forin/tsconfig.json +++ b/types/lodash.forin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.forinright/tsconfig.json b/types/lodash.forinright/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.forinright/tsconfig.json +++ b/types/lodash.forinright/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.forown/tsconfig.json b/types/lodash.forown/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.forown/tsconfig.json +++ b/types/lodash.forown/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.forownright/tsconfig.json b/types/lodash.forownright/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.forownright/tsconfig.json +++ b/types/lodash.forownright/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.frompairs/tsconfig.json b/types/lodash.frompairs/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.frompairs/tsconfig.json +++ b/types/lodash.frompairs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.functions/tsconfig.json b/types/lodash.functions/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.functions/tsconfig.json +++ b/types/lodash.functions/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.functionsin/tsconfig.json b/types/lodash.functionsin/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.functionsin/tsconfig.json +++ b/types/lodash.functionsin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.get/tsconfig.json b/types/lodash.get/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.get/tsconfig.json +++ b/types/lodash.get/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.groupby/tsconfig.json b/types/lodash.groupby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.groupby/tsconfig.json +++ b/types/lodash.groupby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.gt/tsconfig.json b/types/lodash.gt/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.gt/tsconfig.json +++ b/types/lodash.gt/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.gte/tsconfig.json b/types/lodash.gte/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.gte/tsconfig.json +++ b/types/lodash.gte/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.has/tsconfig.json b/types/lodash.has/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.has/tsconfig.json +++ b/types/lodash.has/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.hasin/tsconfig.json b/types/lodash.hasin/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.hasin/tsconfig.json +++ b/types/lodash.hasin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.head/tsconfig.json b/types/lodash.head/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.head/tsconfig.json +++ b/types/lodash.head/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.identity/tsconfig.json b/types/lodash.identity/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.identity/tsconfig.json +++ b/types/lodash.identity/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.includes/tsconfig.json b/types/lodash.includes/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.includes/tsconfig.json +++ b/types/lodash.includes/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.indexof/tsconfig.json b/types/lodash.indexof/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.indexof/tsconfig.json +++ b/types/lodash.indexof/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.initial/tsconfig.json b/types/lodash.initial/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.initial/tsconfig.json +++ b/types/lodash.initial/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.inrange/tsconfig.json b/types/lodash.inrange/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.inrange/tsconfig.json +++ b/types/lodash.inrange/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.intersection/tsconfig.json b/types/lodash.intersection/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.intersection/tsconfig.json +++ b/types/lodash.intersection/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.intersectionby/tsconfig.json b/types/lodash.intersectionby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.intersectionby/tsconfig.json +++ b/types/lodash.intersectionby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.intersectionwith/tsconfig.json b/types/lodash.intersectionwith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.intersectionwith/tsconfig.json +++ b/types/lodash.intersectionwith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.invert/tsconfig.json b/types/lodash.invert/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.invert/tsconfig.json +++ b/types/lodash.invert/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.invertby/tsconfig.json b/types/lodash.invertby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.invertby/tsconfig.json +++ b/types/lodash.invertby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.invoke/tsconfig.json b/types/lodash.invoke/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.invoke/tsconfig.json +++ b/types/lodash.invoke/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.invokemap/tsconfig.json b/types/lodash.invokemap/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.invokemap/tsconfig.json +++ b/types/lodash.invokemap/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isarguments/tsconfig.json b/types/lodash.isarguments/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isarguments/tsconfig.json +++ b/types/lodash.isarguments/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isarray/tsconfig.json b/types/lodash.isarray/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isarray/tsconfig.json +++ b/types/lodash.isarray/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isarraybuffer/tsconfig.json b/types/lodash.isarraybuffer/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isarraybuffer/tsconfig.json +++ b/types/lodash.isarraybuffer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isarraylike/tsconfig.json b/types/lodash.isarraylike/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isarraylike/tsconfig.json +++ b/types/lodash.isarraylike/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isarraylikeobject/tsconfig.json b/types/lodash.isarraylikeobject/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isarraylikeobject/tsconfig.json +++ b/types/lodash.isarraylikeobject/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isboolean/tsconfig.json b/types/lodash.isboolean/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isboolean/tsconfig.json +++ b/types/lodash.isboolean/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isbuffer/tsconfig.json b/types/lodash.isbuffer/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isbuffer/tsconfig.json +++ b/types/lodash.isbuffer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isdate/tsconfig.json b/types/lodash.isdate/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isdate/tsconfig.json +++ b/types/lodash.isdate/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.iselement/tsconfig.json b/types/lodash.iselement/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.iselement/tsconfig.json +++ b/types/lodash.iselement/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isempty/tsconfig.json b/types/lodash.isempty/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isempty/tsconfig.json +++ b/types/lodash.isempty/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isequal/tsconfig.json b/types/lodash.isequal/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isequal/tsconfig.json +++ b/types/lodash.isequal/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isequalwith/tsconfig.json b/types/lodash.isequalwith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isequalwith/tsconfig.json +++ b/types/lodash.isequalwith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.iserror/tsconfig.json b/types/lodash.iserror/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.iserror/tsconfig.json +++ b/types/lodash.iserror/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isfinite/tsconfig.json b/types/lodash.isfinite/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isfinite/tsconfig.json +++ b/types/lodash.isfinite/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isfunction/tsconfig.json b/types/lodash.isfunction/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isfunction/tsconfig.json +++ b/types/lodash.isfunction/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isinteger/tsconfig.json b/types/lodash.isinteger/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isinteger/tsconfig.json +++ b/types/lodash.isinteger/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.islength/tsconfig.json b/types/lodash.islength/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.islength/tsconfig.json +++ b/types/lodash.islength/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.ismap/tsconfig.json b/types/lodash.ismap/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.ismap/tsconfig.json +++ b/types/lodash.ismap/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.ismatch/tsconfig.json b/types/lodash.ismatch/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.ismatch/tsconfig.json +++ b/types/lodash.ismatch/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.ismatchwith/tsconfig.json b/types/lodash.ismatchwith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.ismatchwith/tsconfig.json +++ b/types/lodash.ismatchwith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isnan/tsconfig.json b/types/lodash.isnan/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isnan/tsconfig.json +++ b/types/lodash.isnan/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isnative/tsconfig.json b/types/lodash.isnative/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isnative/tsconfig.json +++ b/types/lodash.isnative/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isnil/tsconfig.json b/types/lodash.isnil/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isnil/tsconfig.json +++ b/types/lodash.isnil/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isnull/tsconfig.json b/types/lodash.isnull/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isnull/tsconfig.json +++ b/types/lodash.isnull/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isnumber/tsconfig.json b/types/lodash.isnumber/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isnumber/tsconfig.json +++ b/types/lodash.isnumber/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isobject/tsconfig.json b/types/lodash.isobject/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isobject/tsconfig.json +++ b/types/lodash.isobject/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isobjectlike/tsconfig.json b/types/lodash.isobjectlike/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isobjectlike/tsconfig.json +++ b/types/lodash.isobjectlike/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isplainobject/tsconfig.json b/types/lodash.isplainobject/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isplainobject/tsconfig.json +++ b/types/lodash.isplainobject/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isregexp/tsconfig.json b/types/lodash.isregexp/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isregexp/tsconfig.json +++ b/types/lodash.isregexp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.issafeinteger/tsconfig.json b/types/lodash.issafeinteger/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.issafeinteger/tsconfig.json +++ b/types/lodash.issafeinteger/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isset/tsconfig.json b/types/lodash.isset/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isset/tsconfig.json +++ b/types/lodash.isset/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isstring/tsconfig.json b/types/lodash.isstring/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isstring/tsconfig.json +++ b/types/lodash.isstring/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.issymbol/tsconfig.json b/types/lodash.issymbol/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.issymbol/tsconfig.json +++ b/types/lodash.issymbol/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.istypedarray/tsconfig.json b/types/lodash.istypedarray/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.istypedarray/tsconfig.json +++ b/types/lodash.istypedarray/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isundefined/tsconfig.json b/types/lodash.isundefined/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isundefined/tsconfig.json +++ b/types/lodash.isundefined/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isweakmap/tsconfig.json b/types/lodash.isweakmap/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isweakmap/tsconfig.json +++ b/types/lodash.isweakmap/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.isweakset/tsconfig.json b/types/lodash.isweakset/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.isweakset/tsconfig.json +++ b/types/lodash.isweakset/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.iteratee/tsconfig.json b/types/lodash.iteratee/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.iteratee/tsconfig.json +++ b/types/lodash.iteratee/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.join/tsconfig.json b/types/lodash.join/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.join/tsconfig.json +++ b/types/lodash.join/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.kebabcase/tsconfig.json b/types/lodash.kebabcase/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.kebabcase/tsconfig.json +++ b/types/lodash.kebabcase/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.keyby/tsconfig.json b/types/lodash.keyby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.keyby/tsconfig.json +++ b/types/lodash.keyby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.keys/tsconfig.json b/types/lodash.keys/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.keys/tsconfig.json +++ b/types/lodash.keys/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.keysin/tsconfig.json b/types/lodash.keysin/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.keysin/tsconfig.json +++ b/types/lodash.keysin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.last/tsconfig.json b/types/lodash.last/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.last/tsconfig.json +++ b/types/lodash.last/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.lastindexof/tsconfig.json b/types/lodash.lastindexof/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.lastindexof/tsconfig.json +++ b/types/lodash.lastindexof/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.lowercase/tsconfig.json b/types/lodash.lowercase/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.lowercase/tsconfig.json +++ b/types/lodash.lowercase/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.lowerfirst/tsconfig.json b/types/lodash.lowerfirst/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.lowerfirst/tsconfig.json +++ b/types/lodash.lowerfirst/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.lt/tsconfig.json b/types/lodash.lt/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.lt/tsconfig.json +++ b/types/lodash.lt/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.lte/tsconfig.json b/types/lodash.lte/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.lte/tsconfig.json +++ b/types/lodash.lte/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.mapkeys/tsconfig.json b/types/lodash.mapkeys/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.mapkeys/tsconfig.json +++ b/types/lodash.mapkeys/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.mapvalues/tsconfig.json b/types/lodash.mapvalues/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.mapvalues/tsconfig.json +++ b/types/lodash.mapvalues/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.matches/tsconfig.json b/types/lodash.matches/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.matches/tsconfig.json +++ b/types/lodash.matches/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.matchesproperty/tsconfig.json b/types/lodash.matchesproperty/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.matchesproperty/tsconfig.json +++ b/types/lodash.matchesproperty/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.max/tsconfig.json b/types/lodash.max/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.max/tsconfig.json +++ b/types/lodash.max/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.maxby/tsconfig.json b/types/lodash.maxby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.maxby/tsconfig.json +++ b/types/lodash.maxby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.mean/tsconfig.json b/types/lodash.mean/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.mean/tsconfig.json +++ b/types/lodash.mean/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.meanby/tsconfig.json b/types/lodash.meanby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.meanby/tsconfig.json +++ b/types/lodash.meanby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.memoize/tsconfig.json b/types/lodash.memoize/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.memoize/tsconfig.json +++ b/types/lodash.memoize/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.merge/tsconfig.json b/types/lodash.merge/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.merge/tsconfig.json +++ b/types/lodash.merge/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.mergewith/tsconfig.json b/types/lodash.mergewith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.mergewith/tsconfig.json +++ b/types/lodash.mergewith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.method/tsconfig.json b/types/lodash.method/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.method/tsconfig.json +++ b/types/lodash.method/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.methodof/tsconfig.json b/types/lodash.methodof/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.methodof/tsconfig.json +++ b/types/lodash.methodof/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.min/tsconfig.json b/types/lodash.min/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.min/tsconfig.json +++ b/types/lodash.min/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.minby/tsconfig.json b/types/lodash.minby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.minby/tsconfig.json +++ b/types/lodash.minby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.mixin/tsconfig.json b/types/lodash.mixin/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.mixin/tsconfig.json +++ b/types/lodash.mixin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.negate/tsconfig.json b/types/lodash.negate/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.negate/tsconfig.json +++ b/types/lodash.negate/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.noop/tsconfig.json b/types/lodash.noop/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.noop/tsconfig.json +++ b/types/lodash.noop/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.now/tsconfig.json b/types/lodash.now/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.now/tsconfig.json +++ b/types/lodash.now/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.nth/tsconfig.json b/types/lodash.nth/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.nth/tsconfig.json +++ b/types/lodash.nth/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.ntharg/tsconfig.json b/types/lodash.ntharg/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.ntharg/tsconfig.json +++ b/types/lodash.ntharg/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.omit/tsconfig.json b/types/lodash.omit/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.omit/tsconfig.json +++ b/types/lodash.omit/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.omitby/tsconfig.json b/types/lodash.omitby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.omitby/tsconfig.json +++ b/types/lodash.omitby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.once/tsconfig.json b/types/lodash.once/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.once/tsconfig.json +++ b/types/lodash.once/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.orderby/tsconfig.json b/types/lodash.orderby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.orderby/tsconfig.json +++ b/types/lodash.orderby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.over/tsconfig.json b/types/lodash.over/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.over/tsconfig.json +++ b/types/lodash.over/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.overargs/tsconfig.json b/types/lodash.overargs/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.overargs/tsconfig.json +++ b/types/lodash.overargs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.overevery/tsconfig.json b/types/lodash.overevery/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.overevery/tsconfig.json +++ b/types/lodash.overevery/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.oversome/tsconfig.json b/types/lodash.oversome/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.oversome/tsconfig.json +++ b/types/lodash.oversome/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.pad/tsconfig.json b/types/lodash.pad/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.pad/tsconfig.json +++ b/types/lodash.pad/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.padend/tsconfig.json b/types/lodash.padend/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.padend/tsconfig.json +++ b/types/lodash.padend/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.padstart/tsconfig.json b/types/lodash.padstart/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.padstart/tsconfig.json +++ b/types/lodash.padstart/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.parseint/tsconfig.json b/types/lodash.parseint/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.parseint/tsconfig.json +++ b/types/lodash.parseint/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.partial/tsconfig.json b/types/lodash.partial/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.partial/tsconfig.json +++ b/types/lodash.partial/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.partialright/tsconfig.json b/types/lodash.partialright/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.partialright/tsconfig.json +++ b/types/lodash.partialright/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.partition/tsconfig.json b/types/lodash.partition/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.partition/tsconfig.json +++ b/types/lodash.partition/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.pick/tsconfig.json b/types/lodash.pick/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.pick/tsconfig.json +++ b/types/lodash.pick/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.pickby/tsconfig.json b/types/lodash.pickby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.pickby/tsconfig.json +++ b/types/lodash.pickby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.property/tsconfig.json b/types/lodash.property/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.property/tsconfig.json +++ b/types/lodash.property/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.propertyof/tsconfig.json b/types/lodash.propertyof/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.propertyof/tsconfig.json +++ b/types/lodash.propertyof/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.pull/tsconfig.json b/types/lodash.pull/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.pull/tsconfig.json +++ b/types/lodash.pull/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.pullall/tsconfig.json b/types/lodash.pullall/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.pullall/tsconfig.json +++ b/types/lodash.pullall/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.pullallby/tsconfig.json b/types/lodash.pullallby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.pullallby/tsconfig.json +++ b/types/lodash.pullallby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.pullallwith/tsconfig.json b/types/lodash.pullallwith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.pullallwith/tsconfig.json +++ b/types/lodash.pullallwith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.pullat/tsconfig.json b/types/lodash.pullat/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.pullat/tsconfig.json +++ b/types/lodash.pullat/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.random/tsconfig.json b/types/lodash.random/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.random/tsconfig.json +++ b/types/lodash.random/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.range/tsconfig.json b/types/lodash.range/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.range/tsconfig.json +++ b/types/lodash.range/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.rangeright/tsconfig.json b/types/lodash.rangeright/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.rangeright/tsconfig.json +++ b/types/lodash.rangeright/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.rearg/tsconfig.json b/types/lodash.rearg/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.rearg/tsconfig.json +++ b/types/lodash.rearg/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.reduce/tsconfig.json b/types/lodash.reduce/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.reduce/tsconfig.json +++ b/types/lodash.reduce/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.reduceright/tsconfig.json b/types/lodash.reduceright/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.reduceright/tsconfig.json +++ b/types/lodash.reduceright/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.reject/tsconfig.json b/types/lodash.reject/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.reject/tsconfig.json +++ b/types/lodash.reject/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.remove/tsconfig.json b/types/lodash.remove/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.remove/tsconfig.json +++ b/types/lodash.remove/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.repeat/tsconfig.json b/types/lodash.repeat/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.repeat/tsconfig.json +++ b/types/lodash.repeat/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.replace/tsconfig.json b/types/lodash.replace/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.replace/tsconfig.json +++ b/types/lodash.replace/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.rest/tsconfig.json b/types/lodash.rest/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.rest/tsconfig.json +++ b/types/lodash.rest/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.result/tsconfig.json b/types/lodash.result/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.result/tsconfig.json +++ b/types/lodash.result/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.reverse/tsconfig.json b/types/lodash.reverse/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.reverse/tsconfig.json +++ b/types/lodash.reverse/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.round/tsconfig.json b/types/lodash.round/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.round/tsconfig.json +++ b/types/lodash.round/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.sample/tsconfig.json b/types/lodash.sample/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.sample/tsconfig.json +++ b/types/lodash.sample/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.samplesize/tsconfig.json b/types/lodash.samplesize/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.samplesize/tsconfig.json +++ b/types/lodash.samplesize/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.set/tsconfig.json b/types/lodash.set/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.set/tsconfig.json +++ b/types/lodash.set/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.setwith/tsconfig.json b/types/lodash.setwith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.setwith/tsconfig.json +++ b/types/lodash.setwith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.shuffle/tsconfig.json b/types/lodash.shuffle/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.shuffle/tsconfig.json +++ b/types/lodash.shuffle/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.size/tsconfig.json b/types/lodash.size/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.size/tsconfig.json +++ b/types/lodash.size/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.slice/tsconfig.json b/types/lodash.slice/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.slice/tsconfig.json +++ b/types/lodash.slice/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.snakecase/tsconfig.json b/types/lodash.snakecase/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.snakecase/tsconfig.json +++ b/types/lodash.snakecase/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.some/tsconfig.json b/types/lodash.some/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.some/tsconfig.json +++ b/types/lodash.some/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.sortby/tsconfig.json b/types/lodash.sortby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.sortby/tsconfig.json +++ b/types/lodash.sortby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.sortedindex/tsconfig.json b/types/lodash.sortedindex/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.sortedindex/tsconfig.json +++ b/types/lodash.sortedindex/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.sortedindexby/tsconfig.json b/types/lodash.sortedindexby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.sortedindexby/tsconfig.json +++ b/types/lodash.sortedindexby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.sortedindexof/tsconfig.json b/types/lodash.sortedindexof/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.sortedindexof/tsconfig.json +++ b/types/lodash.sortedindexof/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.sortedlastindex/tsconfig.json b/types/lodash.sortedlastindex/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.sortedlastindex/tsconfig.json +++ b/types/lodash.sortedlastindex/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.sortedlastindexby/tsconfig.json b/types/lodash.sortedlastindexby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.sortedlastindexby/tsconfig.json +++ b/types/lodash.sortedlastindexby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.sortedlastindexof/tsconfig.json b/types/lodash.sortedlastindexof/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.sortedlastindexof/tsconfig.json +++ b/types/lodash.sortedlastindexof/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.sorteduniq/tsconfig.json b/types/lodash.sorteduniq/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.sorteduniq/tsconfig.json +++ b/types/lodash.sorteduniq/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.sorteduniqby/tsconfig.json b/types/lodash.sorteduniqby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.sorteduniqby/tsconfig.json +++ b/types/lodash.sorteduniqby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.split/tsconfig.json b/types/lodash.split/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.split/tsconfig.json +++ b/types/lodash.split/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.spread/tsconfig.json b/types/lodash.spread/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.spread/tsconfig.json +++ b/types/lodash.spread/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.startcase/tsconfig.json b/types/lodash.startcase/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.startcase/tsconfig.json +++ b/types/lodash.startcase/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.startswith/tsconfig.json b/types/lodash.startswith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.startswith/tsconfig.json +++ b/types/lodash.startswith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.subtract/tsconfig.json b/types/lodash.subtract/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.subtract/tsconfig.json +++ b/types/lodash.subtract/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.sum/tsconfig.json b/types/lodash.sum/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.sum/tsconfig.json +++ b/types/lodash.sum/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.sumby/tsconfig.json b/types/lodash.sumby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.sumby/tsconfig.json +++ b/types/lodash.sumby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.tail/tsconfig.json b/types/lodash.tail/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.tail/tsconfig.json +++ b/types/lodash.tail/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.take/tsconfig.json b/types/lodash.take/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.take/tsconfig.json +++ b/types/lodash.take/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.takeright/tsconfig.json b/types/lodash.takeright/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.takeright/tsconfig.json +++ b/types/lodash.takeright/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.takerightwhile/tsconfig.json b/types/lodash.takerightwhile/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.takerightwhile/tsconfig.json +++ b/types/lodash.takerightwhile/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.takewhile/tsconfig.json b/types/lodash.takewhile/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.takewhile/tsconfig.json +++ b/types/lodash.takewhile/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.template/tsconfig.json b/types/lodash.template/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.template/tsconfig.json +++ b/types/lodash.template/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.throttle/tsconfig.json b/types/lodash.throttle/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.throttle/tsconfig.json +++ b/types/lodash.throttle/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.times/tsconfig.json b/types/lodash.times/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.times/tsconfig.json +++ b/types/lodash.times/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.toarray/tsconfig.json b/types/lodash.toarray/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.toarray/tsconfig.json +++ b/types/lodash.toarray/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.tofinite/tsconfig.json b/types/lodash.tofinite/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.tofinite/tsconfig.json +++ b/types/lodash.tofinite/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.tointeger/tsconfig.json b/types/lodash.tointeger/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.tointeger/tsconfig.json +++ b/types/lodash.tointeger/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.tolength/tsconfig.json b/types/lodash.tolength/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.tolength/tsconfig.json +++ b/types/lodash.tolength/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.tolower/tsconfig.json b/types/lodash.tolower/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.tolower/tsconfig.json +++ b/types/lodash.tolower/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.tonumber/tsconfig.json b/types/lodash.tonumber/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.tonumber/tsconfig.json +++ b/types/lodash.tonumber/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.topairs/tsconfig.json b/types/lodash.topairs/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.topairs/tsconfig.json +++ b/types/lodash.topairs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.topairsin/tsconfig.json b/types/lodash.topairsin/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.topairsin/tsconfig.json +++ b/types/lodash.topairsin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.topath/tsconfig.json b/types/lodash.topath/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.topath/tsconfig.json +++ b/types/lodash.topath/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.toplainobject/tsconfig.json b/types/lodash.toplainobject/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.toplainobject/tsconfig.json +++ b/types/lodash.toplainobject/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.tosafeinteger/tsconfig.json b/types/lodash.tosafeinteger/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.tosafeinteger/tsconfig.json +++ b/types/lodash.tosafeinteger/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.tostring/tsconfig.json b/types/lodash.tostring/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.tostring/tsconfig.json +++ b/types/lodash.tostring/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.toupper/tsconfig.json b/types/lodash.toupper/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.toupper/tsconfig.json +++ b/types/lodash.toupper/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.transform/tsconfig.json b/types/lodash.transform/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.transform/tsconfig.json +++ b/types/lodash.transform/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.trim/tsconfig.json b/types/lodash.trim/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.trim/tsconfig.json +++ b/types/lodash.trim/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.trimend/tsconfig.json b/types/lodash.trimend/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.trimend/tsconfig.json +++ b/types/lodash.trimend/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.trimstart/tsconfig.json b/types/lodash.trimstart/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.trimstart/tsconfig.json +++ b/types/lodash.trimstart/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.truncate/tsconfig.json b/types/lodash.truncate/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.truncate/tsconfig.json +++ b/types/lodash.truncate/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.unary/tsconfig.json b/types/lodash.unary/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.unary/tsconfig.json +++ b/types/lodash.unary/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.unescape/tsconfig.json b/types/lodash.unescape/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.unescape/tsconfig.json +++ b/types/lodash.unescape/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.union/tsconfig.json b/types/lodash.union/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.union/tsconfig.json +++ b/types/lodash.union/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.unionby/tsconfig.json b/types/lodash.unionby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.unionby/tsconfig.json +++ b/types/lodash.unionby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.unionwith/tsconfig.json b/types/lodash.unionwith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.unionwith/tsconfig.json +++ b/types/lodash.unionwith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.uniq/tsconfig.json b/types/lodash.uniq/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.uniq/tsconfig.json +++ b/types/lodash.uniq/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.uniqby/tsconfig.json b/types/lodash.uniqby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.uniqby/tsconfig.json +++ b/types/lodash.uniqby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.uniqueid/tsconfig.json b/types/lodash.uniqueid/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.uniqueid/tsconfig.json +++ b/types/lodash.uniqueid/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.uniqwith/tsconfig.json b/types/lodash.uniqwith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.uniqwith/tsconfig.json +++ b/types/lodash.uniqwith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.unset/tsconfig.json b/types/lodash.unset/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.unset/tsconfig.json +++ b/types/lodash.unset/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.unzip/tsconfig.json b/types/lodash.unzip/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.unzip/tsconfig.json +++ b/types/lodash.unzip/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.unzipwith/tsconfig.json b/types/lodash.unzipwith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.unzipwith/tsconfig.json +++ b/types/lodash.unzipwith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.update/tsconfig.json b/types/lodash.update/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.update/tsconfig.json +++ b/types/lodash.update/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.updatewith/tsconfig.json b/types/lodash.updatewith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.updatewith/tsconfig.json +++ b/types/lodash.updatewith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.uppercase/tsconfig.json b/types/lodash.uppercase/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.uppercase/tsconfig.json +++ b/types/lodash.uppercase/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.upperfirst/tsconfig.json b/types/lodash.upperfirst/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.upperfirst/tsconfig.json +++ b/types/lodash.upperfirst/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.values/tsconfig.json b/types/lodash.values/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.values/tsconfig.json +++ b/types/lodash.values/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.valuesin/tsconfig.json b/types/lodash.valuesin/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.valuesin/tsconfig.json +++ b/types/lodash.valuesin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.without/tsconfig.json b/types/lodash.without/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.without/tsconfig.json +++ b/types/lodash.without/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.words/tsconfig.json b/types/lodash.words/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.words/tsconfig.json +++ b/types/lodash.words/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.wrap/tsconfig.json b/types/lodash.wrap/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.wrap/tsconfig.json +++ b/types/lodash.wrap/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.xor/tsconfig.json b/types/lodash.xor/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.xor/tsconfig.json +++ b/types/lodash.xor/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.xorby/tsconfig.json b/types/lodash.xorby/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.xorby/tsconfig.json +++ b/types/lodash.xorby/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.xorwith/tsconfig.json b/types/lodash.xorwith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.xorwith/tsconfig.json +++ b/types/lodash.xorwith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.zip/tsconfig.json b/types/lodash.zip/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.zip/tsconfig.json +++ b/types/lodash.zip/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.zipobject/tsconfig.json b/types/lodash.zipobject/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.zipobject/tsconfig.json +++ b/types/lodash.zipobject/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.zipobjectdeep/tsconfig.json b/types/lodash.zipobjectdeep/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.zipobjectdeep/tsconfig.json +++ b/types/lodash.zipobjectdeep/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash.zipwith/tsconfig.json b/types/lodash.zipwith/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/lodash.zipwith/tsconfig.json +++ b/types/lodash.zipwith/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/lodash/array/chunk.d.ts b/types/lodash/array/chunk.d.ts index a1fe16cc02..16e4f8beb9 100644 --- a/types/lodash/array/chunk.d.ts +++ b/types/lodash/array/chunk.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/compact.d.ts b/types/lodash/array/compact.d.ts index 4240c7d329..7bf05df7e3 100644 --- a/types/lodash/array/compact.d.ts +++ b/types/lodash/array/compact.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/concat.d.ts b/types/lodash/array/concat.d.ts index acd381f393..3b1bac32aa 100644 --- a/types/lodash/array/concat.d.ts +++ b/types/lodash/array/concat.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/difference.d.ts b/types/lodash/array/difference.d.ts index 16e2c5317c..5c237eccea 100644 --- a/types/lodash/array/difference.d.ts +++ b/types/lodash/array/difference.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/differenceBy.d.ts b/types/lodash/array/differenceBy.d.ts index ab6fb9d732..da8e928097 100644 --- a/types/lodash/array/differenceBy.d.ts +++ b/types/lodash/array/differenceBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/differenceWith.d.ts b/types/lodash/array/differenceWith.d.ts index 70b3e9bc83..39eca3314f 100644 --- a/types/lodash/array/differenceWith.d.ts +++ b/types/lodash/array/differenceWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/drop.d.ts b/types/lodash/array/drop.d.ts index cff9e9fe2b..6df72adcb6 100644 --- a/types/lodash/array/drop.d.ts +++ b/types/lodash/array/drop.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/dropRight.d.ts b/types/lodash/array/dropRight.d.ts index e2a0b52077..4e08a213b9 100644 --- a/types/lodash/array/dropRight.d.ts +++ b/types/lodash/array/dropRight.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/dropRightWhile.d.ts b/types/lodash/array/dropRightWhile.d.ts index f565512a2c..efce8161d2 100644 --- a/types/lodash/array/dropRightWhile.d.ts +++ b/types/lodash/array/dropRightWhile.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/dropWhile.d.ts b/types/lodash/array/dropWhile.d.ts index 54324ff8ee..f6f68fb191 100644 --- a/types/lodash/array/dropWhile.d.ts +++ b/types/lodash/array/dropWhile.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/fill.d.ts b/types/lodash/array/fill.d.ts index 7d729dc27a..651a19a830 100644 --- a/types/lodash/array/fill.d.ts +++ b/types/lodash/array/fill.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/findIndex.d.ts b/types/lodash/array/findIndex.d.ts index 5993462151..13f314ee82 100644 --- a/types/lodash/array/findIndex.d.ts +++ b/types/lodash/array/findIndex.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/findLastIndex.d.ts b/types/lodash/array/findLastIndex.d.ts index 46399aab51..db28988a4a 100644 --- a/types/lodash/array/findLastIndex.d.ts +++ b/types/lodash/array/findLastIndex.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/first.d.ts b/types/lodash/array/first.d.ts index 3b17d66ebe..ec88a9b5b2 100644 --- a/types/lodash/array/first.d.ts +++ b/types/lodash/array/first.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { first: typeof _.head; // tslint:disable-line:no-unnecessary-qualifier diff --git a/types/lodash/array/flatten.d.ts b/types/lodash/array/flatten.d.ts index 8d78592bb4..8453624756 100644 --- a/types/lodash/array/flatten.d.ts +++ b/types/lodash/array/flatten.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/flattenDeep.d.ts b/types/lodash/array/flattenDeep.d.ts index 6b676f474f..0c604f2571 100644 --- a/types/lodash/array/flattenDeep.d.ts +++ b/types/lodash/array/flattenDeep.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/flattenDepth.d.ts b/types/lodash/array/flattenDepth.d.ts index 65bd6c161e..0efd206f9e 100644 --- a/types/lodash/array/flattenDepth.d.ts +++ b/types/lodash/array/flattenDepth.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/fromPairs.d.ts b/types/lodash/array/fromPairs.d.ts index bc6264448c..92a8e4d168 100644 --- a/types/lodash/array/fromPairs.d.ts +++ b/types/lodash/array/fromPairs.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/head.d.ts b/types/lodash/array/head.d.ts index cc9a0ec697..476e5b2b07 100644 --- a/types/lodash/array/head.d.ts +++ b/types/lodash/array/head.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/indexOf.d.ts b/types/lodash/array/indexOf.d.ts index d957c852db..f2f01c2e5c 100644 --- a/types/lodash/array/indexOf.d.ts +++ b/types/lodash/array/indexOf.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/initial.d.ts b/types/lodash/array/initial.d.ts index 3e09fbc4d4..fca86bcfa0 100644 --- a/types/lodash/array/initial.d.ts +++ b/types/lodash/array/initial.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/intersection.d.ts b/types/lodash/array/intersection.d.ts index a562d6f306..444e0b23f1 100644 --- a/types/lodash/array/intersection.d.ts +++ b/types/lodash/array/intersection.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/intersectionBy.d.ts b/types/lodash/array/intersectionBy.d.ts index 3572367f4d..4148043afe 100644 --- a/types/lodash/array/intersectionBy.d.ts +++ b/types/lodash/array/intersectionBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/intersectionWith.d.ts b/types/lodash/array/intersectionWith.d.ts index 9214da8652..9fa2198c9b 100644 --- a/types/lodash/array/intersectionWith.d.ts +++ b/types/lodash/array/intersectionWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/join.d.ts b/types/lodash/array/join.d.ts index 01ee4c1e3b..2fd74dab4a 100644 --- a/types/lodash/array/join.d.ts +++ b/types/lodash/array/join.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/last.d.ts b/types/lodash/array/last.d.ts index 5e018dd8d6..4dcdb30423 100644 --- a/types/lodash/array/last.d.ts +++ b/types/lodash/array/last.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/lastIndexOf.d.ts b/types/lodash/array/lastIndexOf.d.ts index bcec4239cd..4bcc38c947 100644 --- a/types/lodash/array/lastIndexOf.d.ts +++ b/types/lodash/array/lastIndexOf.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/nth.d.ts b/types/lodash/array/nth.d.ts index bc6846d047..50e5b209a3 100644 --- a/types/lodash/array/nth.d.ts +++ b/types/lodash/array/nth.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/pull.d.ts b/types/lodash/array/pull.d.ts index 00e4ea87f4..44ebc855c6 100644 --- a/types/lodash/array/pull.d.ts +++ b/types/lodash/array/pull.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/pullAll.d.ts b/types/lodash/array/pullAll.d.ts index 0b01b938e0..ce926b9bb3 100644 --- a/types/lodash/array/pullAll.d.ts +++ b/types/lodash/array/pullAll.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/pullAllBy.d.ts b/types/lodash/array/pullAllBy.d.ts index c9eda04ee6..3524aeae5e 100644 --- a/types/lodash/array/pullAllBy.d.ts +++ b/types/lodash/array/pullAllBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/pullAllWith.d.ts b/types/lodash/array/pullAllWith.d.ts index 931c58363a..345187daad 100644 --- a/types/lodash/array/pullAllWith.d.ts +++ b/types/lodash/array/pullAllWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/pullAt.d.ts b/types/lodash/array/pullAt.d.ts index 27633413e1..a9d56f23ef 100644 --- a/types/lodash/array/pullAt.d.ts +++ b/types/lodash/array/pullAt.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/remove.d.ts b/types/lodash/array/remove.d.ts index 4aa873cb51..3ec0636972 100644 --- a/types/lodash/array/remove.d.ts +++ b/types/lodash/array/remove.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/reverse.d.ts b/types/lodash/array/reverse.d.ts index b5e0e7df2b..0cf2112e24 100644 --- a/types/lodash/array/reverse.d.ts +++ b/types/lodash/array/reverse.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/slice.d.ts b/types/lodash/array/slice.d.ts index 68140b77c2..7744c4b334 100644 --- a/types/lodash/array/slice.d.ts +++ b/types/lodash/array/slice.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/sortedIndex.d.ts b/types/lodash/array/sortedIndex.d.ts index c772692e1c..5f8df282e6 100644 --- a/types/lodash/array/sortedIndex.d.ts +++ b/types/lodash/array/sortedIndex.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/sortedIndexBy.d.ts b/types/lodash/array/sortedIndexBy.d.ts index 216cb9564b..c4184868ca 100644 --- a/types/lodash/array/sortedIndexBy.d.ts +++ b/types/lodash/array/sortedIndexBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/sortedIndexOf.d.ts b/types/lodash/array/sortedIndexOf.d.ts index d0bd2da2f2..b391186178 100644 --- a/types/lodash/array/sortedIndexOf.d.ts +++ b/types/lodash/array/sortedIndexOf.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/sortedLastIndex.d.ts b/types/lodash/array/sortedLastIndex.d.ts index a218e16097..33b466ea5f 100644 --- a/types/lodash/array/sortedLastIndex.d.ts +++ b/types/lodash/array/sortedLastIndex.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/sortedLastIndexBy.d.ts b/types/lodash/array/sortedLastIndexBy.d.ts index 8db2dd2002..c0f8344292 100644 --- a/types/lodash/array/sortedLastIndexBy.d.ts +++ b/types/lodash/array/sortedLastIndexBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/sortedLastIndexOf.d.ts b/types/lodash/array/sortedLastIndexOf.d.ts index 9ae49e52f4..09f8099d1f 100644 --- a/types/lodash/array/sortedLastIndexOf.d.ts +++ b/types/lodash/array/sortedLastIndexOf.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/sortedUniq.d.ts b/types/lodash/array/sortedUniq.d.ts index 5771155512..df0487d626 100644 --- a/types/lodash/array/sortedUniq.d.ts +++ b/types/lodash/array/sortedUniq.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/sortedUniqBy.d.ts b/types/lodash/array/sortedUniqBy.d.ts index 3f25ac1e70..054d4e38c9 100644 --- a/types/lodash/array/sortedUniqBy.d.ts +++ b/types/lodash/array/sortedUniqBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/tail.d.ts b/types/lodash/array/tail.d.ts index 6f0366d4e3..8716c9a2f8 100644 --- a/types/lodash/array/tail.d.ts +++ b/types/lodash/array/tail.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/take.d.ts b/types/lodash/array/take.d.ts index 13f9706a86..a97ff6b4ef 100644 --- a/types/lodash/array/take.d.ts +++ b/types/lodash/array/take.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/takeRight.d.ts b/types/lodash/array/takeRight.d.ts index aa3debabb1..c786ab40c0 100644 --- a/types/lodash/array/takeRight.d.ts +++ b/types/lodash/array/takeRight.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/takeRightWhile.d.ts b/types/lodash/array/takeRightWhile.d.ts index 6152aeac3f..471c0a03f3 100644 --- a/types/lodash/array/takeRightWhile.d.ts +++ b/types/lodash/array/takeRightWhile.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/takeWhile.d.ts b/types/lodash/array/takeWhile.d.ts index 1988e9e6b9..05e6adc2a4 100644 --- a/types/lodash/array/takeWhile.d.ts +++ b/types/lodash/array/takeWhile.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/union.d.ts b/types/lodash/array/union.d.ts index c4dff47929..f747a97da0 100644 --- a/types/lodash/array/union.d.ts +++ b/types/lodash/array/union.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/unionBy.d.ts b/types/lodash/array/unionBy.d.ts index 62546c75f0..5e5cd40647 100644 --- a/types/lodash/array/unionBy.d.ts +++ b/types/lodash/array/unionBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/unionWith.d.ts b/types/lodash/array/unionWith.d.ts index 55ed7a3630..4778a4a6c7 100644 --- a/types/lodash/array/unionWith.d.ts +++ b/types/lodash/array/unionWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/uniq.d.ts b/types/lodash/array/uniq.d.ts index 57a5226989..5dacb3b37b 100644 --- a/types/lodash/array/uniq.d.ts +++ b/types/lodash/array/uniq.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/uniqBy.d.ts b/types/lodash/array/uniqBy.d.ts index 86fe09323d..13df8cb7db 100644 --- a/types/lodash/array/uniqBy.d.ts +++ b/types/lodash/array/uniqBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/uniqWith.d.ts b/types/lodash/array/uniqWith.d.ts index cbf93a5313..3d4d24334f 100644 --- a/types/lodash/array/uniqWith.d.ts +++ b/types/lodash/array/uniqWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/unzip.d.ts b/types/lodash/array/unzip.d.ts index ec261d4b81..ca96290da5 100644 --- a/types/lodash/array/unzip.d.ts +++ b/types/lodash/array/unzip.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/unzipWith.d.ts b/types/lodash/array/unzipWith.d.ts index 601b58869c..0608c97bd9 100644 --- a/types/lodash/array/unzipWith.d.ts +++ b/types/lodash/array/unzipWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/without.d.ts b/types/lodash/array/without.d.ts index a134f2047b..ced52397ee 100644 --- a/types/lodash/array/without.d.ts +++ b/types/lodash/array/without.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/xor.d.ts b/types/lodash/array/xor.d.ts index 7db9f8aec9..5369888326 100644 --- a/types/lodash/array/xor.d.ts +++ b/types/lodash/array/xor.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/xorBy.d.ts b/types/lodash/array/xorBy.d.ts index b3aa53c3c6..1be5c1284b 100644 --- a/types/lodash/array/xorBy.d.ts +++ b/types/lodash/array/xorBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/xorWith.d.ts b/types/lodash/array/xorWith.d.ts index 811fa0bb69..0963a31da7 100644 --- a/types/lodash/array/xorWith.d.ts +++ b/types/lodash/array/xorWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/zip.d.ts b/types/lodash/array/zip.d.ts index 70b50c88ca..bf4e436dbf 100644 --- a/types/lodash/array/zip.d.ts +++ b/types/lodash/array/zip.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** @@ -8,26 +8,122 @@ declare module "../index" { * @param arrays The arrays to process. * @return Returns the new array of grouped elements. */ - zip(...arrays: Array | null | undefined>): T[][]; + zip(arrays1: List, arrays2: List): Array<[T1 | undefined, T2 | undefined]>; + + /** + * @see _.zip + */ + zip(arrays1: List, arrays2: List, arrays3: List): Array<[T1 | undefined, T2 | undefined, T3 | undefined]>; + + /** + * @see _.zip + */ + zip(arrays1: List, arrays2: List, arrays3: List, arrays4: List): Array<[T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined]>; + + /** + * @see _.zip + */ + zip(arrays1: List, arrays2: List, arrays3: List, arrays4: List, arrays5: List): Array<[T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined, T5 | undefined]>; + + /** + * @see _.zip + */ + zip(...arrays: Array | null | undefined>): (T | undefined)[][]; } interface LoDashImplicitWrapper { + /** + * @see _.zip + */ + zip( + this: LoDashImplicitWrapper>, + arrays2: List, + ): LoDashImplicitWrapper>; + + /** + * @see _.zip + */ + zip( + this: LoDashImplicitWrapper>, + arrays2: List, + arrays3: List, + ): LoDashImplicitWrapper>; + + /** + * @see _.zip + */ + zip( + this: LoDashImplicitWrapper>, + arrays2: List, + arrays3: List, + arrays4: List, + ): LoDashImplicitWrapper>; + + /** + * @see _.zip + */ + zip( + this: LoDashImplicitWrapper>, + arrays2: List, + arrays3: List, + arrays4: List, + arrays5: List, + ): LoDashImplicitWrapper>; + /** * @see _.zip */ zip( this: LoDashImplicitWrapper | null | undefined>, ...arrays: Array | null | undefined> - ): LoDashImplicitWrapper; + ): LoDashImplicitWrapper>>; } interface LoDashExplicitWrapper { + /** + * @see _.zip + */ + zip( + this: LoDashExplicitWrapper>, + arrays2: List, + ): LoDashExplicitWrapper>; + + /** + * @see _.zip + */ + zip( + this: LoDashExplicitWrapper>, + arrays2: List, + arrays3: List, + ): LoDashExplicitWrapper>; + + /** + * @see _.zip + */ + zip( + this: LoDashExplicitWrapper>, + arrays2: List, + arrays3: List, + arrays4: List, + ): LoDashExplicitWrapper>; + + /** + * @see _.zip + */ + zip( + this: LoDashExplicitWrapper>, + arrays2: List, + arrays3: List, + arrays4: List, + arrays5: List, + ): LoDashExplicitWrapper>; + /** * @see _.zip */ zip( this: LoDashExplicitWrapper | null | undefined>, ...arrays: Array | null | undefined> - ): LoDashExplicitWrapper; + ): LoDashExplicitWrapper>>; } -} \ No newline at end of file +} diff --git a/types/lodash/array/zipObject.d.ts b/types/lodash/array/zipObject.d.ts index 5178fe4b56..cf7c35e96a 100644 --- a/types/lodash/array/zipObject.d.ts +++ b/types/lodash/array/zipObject.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/zipObjectDeep.d.ts b/types/lodash/array/zipObjectDeep.d.ts index d4f4ace14a..a91117e705 100644 --- a/types/lodash/array/zipObjectDeep.d.ts +++ b/types/lodash/array/zipObjectDeep.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/array/zipWith.d.ts b/types/lodash/array/zipWith.d.ts index 4db19f5d85..31e080b056 100644 --- a/types/lodash/array/zipWith.d.ts +++ b/types/lodash/array/zipWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** @@ -10,89 +10,110 @@ declare module "../index" { * @param [thisArg] The `this` binding of `iteratee`. * @return Returns the new array of grouped elements. */ - zipWith( - ...arrays: Array | null | undefined> - ): T[][]; - - /** - * @see _.zipWith - */ zipWith( - arrays: List | null | undefined, + arrays: List, iteratee: (value1: T) => TResult ): TResult[]; /** * @see _.zipWith */ - zipWith( - arrays: List | null | undefined, - arrays2: List | null | undefined, - iteratee: (value1: T, value2: T) => TResult + zipWith( + arrays1: List, + arrays2: List, + iteratee: (value1: T1, value2: T2) => TResult ): TResult[]; /** * @see _.zipWith */ - zipWith( - arrays: List | null | undefined, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - iteratee: (value1: T, value2: T, value3: T) => TResult + zipWith( + arrays1: List, + arrays2: List, + arrays3: List, + iteratee: (value1: T1, value2: T2, value3: T3) => TResult ): TResult[]; /** * @see _.zipWith */ - zipWith( - arrays: List | null | undefined, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - iteratee: (value1: T, value2: T, value3: T, value4: T) => TResult + zipWith( + arrays1: List, + arrays2: List, + arrays3: List, + arrays4: List, + iteratee: (value1: T1, value2: T2, value3: T3, value4: T4) => TResult ): TResult[]; /** * @see _.zipWith */ - zipWith( - arrays: List | null | undefined, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - arrays5: List | null | undefined, - iteratee: (value1: T, value2: T, value3: T, value4: T, value5: T) => TResult + zipWith( + arrays1: List, + arrays2: List, + arrays3: List, + arrays4: List, + arrays5: List, + iteratee: (value1: T1, value2: T2, value3: T3, value4: T4, value5: T5) => TResult ): TResult[]; + /** + * @see _.zipWith + */ zipWith( ...iteratee: Array<((...group: T[]) => TResult) | List | null | undefined> ): TResult[]; } interface LoDashImplicitWrapper { - /** - * @see _.zipWith - */ - zipWith( - this: LoDashImplicitWrapper | null | undefined>, - ...arrays: Array | null | undefined> - ): LoDashImplicitWrapper; - /** * @see _.zipWith */ zipWith( - this: LoDashImplicitWrapper | null | undefined>, + this: LoDashImplicitWrapper>, iteratee: (value1: T) => TResult ): LoDashImplicitWrapper; /** * @see _.zipWith */ - zipWith( - this: LoDashImplicitWrapper | null | undefined>, - arrays2: List | null | undefined, - iteratee: (value1: T, value2: T) => TResult + zipWith( + this: LoDashImplicitWrapper>, + arrays2: List, + iteratee: (value1: T1, value2: T2) => TResult + ): LoDashImplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashImplicitWrapper>, + arrays2: List, + arrays3: List, + iteratee: (value1: T1, value2: T2, value3: T3) => TResult + ): LoDashImplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashImplicitWrapper>, + arrays2: List, + arrays3: List, + arrays4: List, + iteratee: (value1: T1, value2: T2, value3: T3, value4: T4) => TResult + ): LoDashImplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashImplicitWrapper>, + arrays2: List, + arrays3: List, + arrays4: List, + arrays5: List, + iteratee: (value1: T1, value2: T2, value3: T3, value4: T4, value5: T5) => TResult ): LoDashImplicitWrapper; /** @@ -100,59 +121,59 @@ declare module "../index" { */ zipWith( this: LoDashImplicitWrapper | null | undefined>, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - iteratee: (value1: T, value2: T, value3: T) => TResult - ): LoDashImplicitWrapper; - - /** - * @see _.zipWith - */ - zipWith( - this: LoDashImplicitWrapper | null | undefined>, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - iteratee: (value1: T, value2: T, value3: T, value4: T) => TResult - ): LoDashImplicitWrapper; - - /** - * @see _.zipWith - */ - zipWith( - this: LoDashImplicitWrapper | null | undefined>, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - arrays5: List | null | undefined, ...iteratee: Array<((...group: T[]) => TResult) | List | null | undefined> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { - /** - * @see _.zipWith - */ - zipWith( - this: LoDashExplicitWrapper | null | undefined>, - ...arrays: Array | null | undefined> - ): LoDashExplicitWrapper; - /** * @see _.zipWith */ zipWith( - this: LoDashExplicitWrapper | null | undefined>, + this: LoDashExplicitWrapper>, iteratee: (value1: T) => TResult ): LoDashExplicitWrapper; /** * @see _.zipWith */ - zipWith( - this: LoDashExplicitWrapper | null | undefined>, - arrays2: List | null | undefined, - iteratee: (value1: T, value2: T) => TResult + zipWith( + this: LoDashExplicitWrapper>, + arrays2: List, + iteratee: (value1: T1, value2: T2) => TResult + ): LoDashExplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashExplicitWrapper>, + arrays2: List, + arrays3: List, + iteratee: (value1: T1, value2: T2, value3: T3) => TResult + ): LoDashExplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashExplicitWrapper>, + arrays2: List, + arrays3: List, + arrays4: List, + iteratee: (value1: T1, value2: T2, value3: T3, value4: T4) => TResult + ): LoDashExplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashExplicitWrapper>, + arrays2: List, + arrays3: List, + arrays4: List, + arrays5: List, + iteratee: (value1: T1, value2: T2, value3: T3, value4: T4, value5: T5) => TResult ): LoDashExplicitWrapper; /** @@ -160,31 +181,6 @@ declare module "../index" { */ zipWith( this: LoDashExplicitWrapper | null | undefined>, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - iteratee: (value1: T, value2: T, value3: T) => TResult - ): LoDashExplicitWrapper; - - /** - * @see _.zipWith - */ - zipWith( - this: LoDashExplicitWrapper | null | undefined>, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - iteratee: (value1: T, value2: T, value3: T, value4: T) => TResult - ): LoDashExplicitWrapper; - - /** - * @see _.zipWith - */ - zipWith( - this: LoDashExplicitWrapper | null | undefined>, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - arrays5: List | null | undefined, ...iteratee: Array<((...group: T[]) => TResult) | List | null | undefined> ): LoDashExplicitWrapper; } diff --git a/types/lodash/collection/countBy.d.ts b/types/lodash/collection/countBy.d.ts index 05318138f6..7c7ca9e03a 100644 --- a/types/lodash/collection/countBy.d.ts +++ b/types/lodash/collection/countBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/each.d.ts b/types/lodash/collection/each.d.ts index 7455dbbe9b..9777780edc 100644 --- a/types/lodash/collection/each.d.ts +++ b/types/lodash/collection/each.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { each: typeof _.forEach; // tslint:disable-line:no-unnecessary-qualifier diff --git a/types/lodash/collection/eachRight.d.ts b/types/lodash/collection/eachRight.d.ts index cbc847670a..15e3007af5 100644 --- a/types/lodash/collection/eachRight.d.ts +++ b/types/lodash/collection/eachRight.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { eachRight: typeof _.forEachRight; // tslint:disable-line:no-unnecessary-qualifier diff --git a/types/lodash/collection/every.d.ts b/types/lodash/collection/every.d.ts index fbf6734802..42062a74ad 100644 --- a/types/lodash/collection/every.d.ts +++ b/types/lodash/collection/every.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/filter.d.ts b/types/lodash/collection/filter.d.ts index 58640ecd9e..0f60654127 100644 --- a/types/lodash/collection/filter.d.ts +++ b/types/lodash/collection/filter.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/find.d.ts b/types/lodash/collection/find.d.ts index 612a337355..25bfc77efc 100644 --- a/types/lodash/collection/find.d.ts +++ b/types/lodash/collection/find.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/findLast.d.ts b/types/lodash/collection/findLast.d.ts index c18f28265d..edbcf971e4 100644 --- a/types/lodash/collection/findLast.d.ts +++ b/types/lodash/collection/findLast.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/flatMap.d.ts b/types/lodash/collection/flatMap.d.ts index 453abf37f2..1917e691dc 100644 --- a/types/lodash/collection/flatMap.d.ts +++ b/types/lodash/collection/flatMap.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/flatMapDeep.d.ts b/types/lodash/collection/flatMapDeep.d.ts index 63d1750b0e..02a81ed5ab 100644 --- a/types/lodash/collection/flatMapDeep.d.ts +++ b/types/lodash/collection/flatMapDeep.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/flatMapDepth.d.ts b/types/lodash/collection/flatMapDepth.d.ts index b7b8abba4e..6790a8e0f2 100644 --- a/types/lodash/collection/flatMapDepth.d.ts +++ b/types/lodash/collection/flatMapDepth.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/forEach.d.ts b/types/lodash/collection/forEach.d.ts index 847f95ad58..74c0b38cde 100644 --- a/types/lodash/collection/forEach.d.ts +++ b/types/lodash/collection/forEach.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/forEachRight.d.ts b/types/lodash/collection/forEachRight.d.ts index e6820d743c..dd01aa969a 100644 --- a/types/lodash/collection/forEachRight.d.ts +++ b/types/lodash/collection/forEachRight.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/groupBy.d.ts b/types/lodash/collection/groupBy.d.ts index 4bd1da4674..714729181b 100644 --- a/types/lodash/collection/groupBy.d.ts +++ b/types/lodash/collection/groupBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/includes.d.ts b/types/lodash/collection/includes.d.ts index 94eae4491a..87eda4e44a 100644 --- a/types/lodash/collection/includes.d.ts +++ b/types/lodash/collection/includes.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/invokeMap.d.ts b/types/lodash/collection/invokeMap.d.ts index d780e5b944..99711b4e5f 100644 --- a/types/lodash/collection/invokeMap.d.ts +++ b/types/lodash/collection/invokeMap.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/keyBy.d.ts b/types/lodash/collection/keyBy.d.ts index 7214537a68..f9ba2e24b5 100644 --- a/types/lodash/collection/keyBy.d.ts +++ b/types/lodash/collection/keyBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/map.d.ts b/types/lodash/collection/map.d.ts index 798cec1dd8..4a90aaf95d 100644 --- a/types/lodash/collection/map.d.ts +++ b/types/lodash/collection/map.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/orderBy.d.ts b/types/lodash/collection/orderBy.d.ts index fea3d82755..a8950959de 100644 --- a/types/lodash/collection/orderBy.d.ts +++ b/types/lodash/collection/orderBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/partition.d.ts b/types/lodash/collection/partition.d.ts index cf9f69d954..f372f0708d 100644 --- a/types/lodash/collection/partition.d.ts +++ b/types/lodash/collection/partition.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/reduce.d.ts b/types/lodash/collection/reduce.d.ts index 31d7661c2e..2346225d60 100644 --- a/types/lodash/collection/reduce.d.ts +++ b/types/lodash/collection/reduce.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/reduceRight.d.ts b/types/lodash/collection/reduceRight.d.ts index fb2b74da16..a183708d45 100644 --- a/types/lodash/collection/reduceRight.d.ts +++ b/types/lodash/collection/reduceRight.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/reject.d.ts b/types/lodash/collection/reject.d.ts index 4e051b9504..d832f1ba14 100644 --- a/types/lodash/collection/reject.d.ts +++ b/types/lodash/collection/reject.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/sample.d.ts b/types/lodash/collection/sample.d.ts index 48b0aac49b..ccaa4e118b 100644 --- a/types/lodash/collection/sample.d.ts +++ b/types/lodash/collection/sample.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/sampleSize.d.ts b/types/lodash/collection/sampleSize.d.ts index fb9b7fb97a..bf620987d5 100644 --- a/types/lodash/collection/sampleSize.d.ts +++ b/types/lodash/collection/sampleSize.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/shuffle.d.ts b/types/lodash/collection/shuffle.d.ts index 070d2923a6..8209ece654 100644 --- a/types/lodash/collection/shuffle.d.ts +++ b/types/lodash/collection/shuffle.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/size.d.ts b/types/lodash/collection/size.d.ts index 52c78ee3a9..f1c393a7b7 100644 --- a/types/lodash/collection/size.d.ts +++ b/types/lodash/collection/size.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/some.d.ts b/types/lodash/collection/some.d.ts index c7a90b1c9b..fff03751d1 100644 --- a/types/lodash/collection/some.d.ts +++ b/types/lodash/collection/some.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/collection/sortBy.d.ts b/types/lodash/collection/sortBy.d.ts index a192254250..d20877f512 100644 --- a/types/lodash/collection/sortBy.d.ts +++ b/types/lodash/collection/sortBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/common/common.d.ts b/types/lodash/common/common.d.ts index 88a5741ae1..5af72d2440 100644 --- a/types/lodash/common/common.d.ts +++ b/types/lodash/common/common.d.ts @@ -1,8 +1,8 @@ -import * as _ from "../index"; +import _ = require("../index"); type GlobalPartial = Partial; declare module "../index" { type PartialObject = GlobalPartial; - type Many = T | T[]; + type Many = T | ReadonlyArray; interface LoDashStatic { /** * Creates a lodash object which wraps value to enable implicit method chain sequences. @@ -252,4 +252,4 @@ declare module "../index" { type LoDashExplicitNillableObjectWrapper = LoDashExplicitWrapper; type LoDashExplicitNumberArrayWrapper = LoDashExplicitWrapper; type LoDashExplicitStringWrapper = LoDashExplicitWrapper; -} \ No newline at end of file +} diff --git a/types/lodash/date/now.d.ts b/types/lodash/date/now.d.ts index 39a01dd654..480326dd3d 100644 --- a/types/lodash/date/now.d.ts +++ b/types/lodash/date/now.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/after.d.ts b/types/lodash/function/after.d.ts index b86f417556..94b60497e1 100644 --- a/types/lodash/function/after.d.ts +++ b/types/lodash/function/after.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/ary.d.ts b/types/lodash/function/ary.d.ts index de384c8026..94bcc7f25e 100644 --- a/types/lodash/function/ary.d.ts +++ b/types/lodash/function/ary.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/before.d.ts b/types/lodash/function/before.d.ts index 5d67a70be1..2a3b840e8e 100644 --- a/types/lodash/function/before.d.ts +++ b/types/lodash/function/before.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/bind.d.ts b/types/lodash/function/bind.d.ts index 3f708a1f91..28034aec12 100644 --- a/types/lodash/function/bind.d.ts +++ b/types/lodash/function/bind.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface FunctionBind { placeholder: any; diff --git a/types/lodash/function/bindKey.d.ts b/types/lodash/function/bindKey.d.ts index 9e3e547c7f..bab46527c9 100644 --- a/types/lodash/function/bindKey.d.ts +++ b/types/lodash/function/bindKey.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface FunctionBindKey { placeholder: any; diff --git a/types/lodash/function/curry.d.ts b/types/lodash/function/curry.d.ts index 523cdee399..03ff949438 100644 --- a/types/lodash/function/curry.d.ts +++ b/types/lodash/function/curry.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/curryRight.d.ts b/types/lodash/function/curryRight.d.ts index 473a9e039b..044e98d5a2 100644 --- a/types/lodash/function/curryRight.d.ts +++ b/types/lodash/function/curryRight.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/debounce.d.ts b/types/lodash/function/debounce.d.ts index 286c516ddd..9ff85bd972 100644 --- a/types/lodash/function/debounce.d.ts +++ b/types/lodash/function/debounce.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface DebounceSettings { /** diff --git a/types/lodash/function/defer.d.ts b/types/lodash/function/defer.d.ts index 5bf02bf1b8..1968749ecd 100644 --- a/types/lodash/function/defer.d.ts +++ b/types/lodash/function/defer.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/delay.d.ts b/types/lodash/function/delay.d.ts index 8ccf40d12c..72e2b4151e 100644 --- a/types/lodash/function/delay.d.ts +++ b/types/lodash/function/delay.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** @@ -35,30 +35,4 @@ declare module "../index" { ...args: any[] ): LoDashExplicitWrapper; } - - interface LoDashStatic { - /** - * Creates a function that invokes `func` with arguments reversed. - * - * @category Function - * @param func The function to flip arguments for. - * @returns Returns the new function. - * @example - * - * var flipped = _.flip(function() { - * return _.toArray(arguments); - * }); - * - * flipped('a', 'b', 'c', 'd'); - * // => ['d', 'c', 'b', 'a'] - */ - flip any>(func: T): T; - } - - interface LoDashWrapper { - /** - * @see _.flip - */ - flip(): this; - } -} \ No newline at end of file +} diff --git a/types/lodash/function/flip.d.ts b/types/lodash/function/flip.d.ts index bad49a2022..e2699e3fd7 100644 --- a/types/lodash/function/flip.d.ts +++ b/types/lodash/function/flip.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/memoize.d.ts b/types/lodash/function/memoize.d.ts index eb7be00430..c74cf2a32c 100644 --- a/types/lodash/function/memoize.d.ts +++ b/types/lodash/function/memoize.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface MemoizedFunction { cache: MapCache; diff --git a/types/lodash/function/negate.d.ts b/types/lodash/function/negate.d.ts index b826db7368..c4e3b7bea4 100644 --- a/types/lodash/function/negate.d.ts +++ b/types/lodash/function/negate.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/once.d.ts b/types/lodash/function/once.d.ts index cd1d0e8554..b64562ac16 100644 --- a/types/lodash/function/once.d.ts +++ b/types/lodash/function/once.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/overArgs.d.ts b/types/lodash/function/overArgs.d.ts index 7267540ce4..265f79981b 100644 --- a/types/lodash/function/overArgs.d.ts +++ b/types/lodash/function/overArgs.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/partial.d.ts b/types/lodash/function/partial.d.ts index 047c5ce724..6e729971a6 100644 --- a/types/lodash/function/partial.d.ts +++ b/types/lodash/function/partial.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/partialRight.d.ts b/types/lodash/function/partialRight.d.ts index bacbd88440..24b4c47d20 100644 --- a/types/lodash/function/partialRight.d.ts +++ b/types/lodash/function/partialRight.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/rearg.d.ts b/types/lodash/function/rearg.d.ts index 829dbebf5e..bff0a45b0c 100644 --- a/types/lodash/function/rearg.d.ts +++ b/types/lodash/function/rearg.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/rest.d.ts b/types/lodash/function/rest.d.ts index d3d7689f63..c05349f0f9 100644 --- a/types/lodash/function/rest.d.ts +++ b/types/lodash/function/rest.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/spread.d.ts b/types/lodash/function/spread.d.ts index 2828089805..29c8b5e8cf 100644 --- a/types/lodash/function/spread.d.ts +++ b/types/lodash/function/spread.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/throttle.d.ts b/types/lodash/function/throttle.d.ts index c2661ec0e3..0b0fc10039 100644 --- a/types/lodash/function/throttle.d.ts +++ b/types/lodash/function/throttle.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface ThrottleSettings { /** diff --git a/types/lodash/function/unary.d.ts b/types/lodash/function/unary.d.ts index 145dbefba2..8714529b10 100644 --- a/types/lodash/function/unary.d.ts +++ b/types/lodash/function/unary.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/function/wrap.d.ts b/types/lodash/function/wrap.d.ts index b5636b1c25..f0bb2693ff 100644 --- a/types/lodash/function/wrap.d.ts +++ b/types/lodash/function/wrap.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/index.d.ts b/types/lodash/index.d.ts index fd421681c1..578bfacd21 100644 --- a/types/lodash/index.d.ts +++ b/types/lodash/index.d.ts @@ -3,7 +3,6 @@ // Definitions by: Brian Zengel , // Ilya Mochalov , // Stepan Mikhaylyuk , -// Eric L Anderson , // AJ Richardson , // Junyoung Clare Jang , // e-cloud , diff --git a/types/lodash/lang/castArray.d.ts b/types/lodash/lang/castArray.d.ts index 8e79155940..5f385c5ed5 100644 --- a/types/lodash/lang/castArray.d.ts +++ b/types/lodash/lang/castArray.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/clone.d.ts b/types/lodash/lang/clone.d.ts index 9bfd32f5c7..794e2383fb 100644 --- a/types/lodash/lang/clone.d.ts +++ b/types/lodash/lang/clone.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/cloneDeep.d.ts b/types/lodash/lang/cloneDeep.d.ts index 9390ece09e..0a49e67ea9 100644 --- a/types/lodash/lang/cloneDeep.d.ts +++ b/types/lodash/lang/cloneDeep.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/cloneDeepWith.d.ts b/types/lodash/lang/cloneDeepWith.d.ts index 1cd2339889..b46fc766ac 100644 --- a/types/lodash/lang/cloneDeepWith.d.ts +++ b/types/lodash/lang/cloneDeepWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { type CloneDeepWithCustomizer = (value: any, key: number | string | undefined, object: TObject | undefined, stack: any) => any; diff --git a/types/lodash/lang/cloneWith.d.ts b/types/lodash/lang/cloneWith.d.ts index f091ba7710..22c00be038 100644 --- a/types/lodash/lang/cloneWith.d.ts +++ b/types/lodash/lang/cloneWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { type CloneWithCustomizer = (value: TValue, key: number | string | undefined, object: any, stack: any) => TResult; diff --git a/types/lodash/lang/conformsTo.d.ts b/types/lodash/lang/conformsTo.d.ts index 15e11ddf34..f069e15e73 100644 --- a/types/lodash/lang/conformsTo.d.ts +++ b/types/lodash/lang/conformsTo.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { diff --git a/types/lodash/lang/eq.d.ts b/types/lodash/lang/eq.d.ts index f70867eb97..808ec0cf39 100644 --- a/types/lodash/lang/eq.d.ts +++ b/types/lodash/lang/eq.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/gt.d.ts b/types/lodash/lang/gt.d.ts index 0f5e0cf20e..3ae27eaccf 100644 --- a/types/lodash/lang/gt.d.ts +++ b/types/lodash/lang/gt.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/gte.d.ts b/types/lodash/lang/gte.d.ts index 24e9938aa2..b68cc05c7d 100644 --- a/types/lodash/lang/gte.d.ts +++ b/types/lodash/lang/gte.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isArguments.d.ts b/types/lodash/lang/isArguments.d.ts index 3d4be77f98..20c90752bf 100644 --- a/types/lodash/lang/isArguments.d.ts +++ b/types/lodash/lang/isArguments.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isArray.d.ts b/types/lodash/lang/isArray.d.ts index 7949e6adf5..3d0676791c 100644 --- a/types/lodash/lang/isArray.d.ts +++ b/types/lodash/lang/isArray.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isArrayBuffer.d.ts b/types/lodash/lang/isArrayBuffer.d.ts index a7033110c1..b22e954086 100644 --- a/types/lodash/lang/isArrayBuffer.d.ts +++ b/types/lodash/lang/isArrayBuffer.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isArrayLike.d.ts b/types/lodash/lang/isArrayLike.d.ts index 0f3a924b52..59c75a70b7 100644 --- a/types/lodash/lang/isArrayLike.d.ts +++ b/types/lodash/lang/isArrayLike.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isArrayLikeObject.d.ts b/types/lodash/lang/isArrayLikeObject.d.ts index d53566feeb..6613d7d410 100644 --- a/types/lodash/lang/isArrayLikeObject.d.ts +++ b/types/lodash/lang/isArrayLikeObject.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isBoolean.d.ts b/types/lodash/lang/isBoolean.d.ts index db2d2230b7..060d3eae5e 100644 --- a/types/lodash/lang/isBoolean.d.ts +++ b/types/lodash/lang/isBoolean.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isBuffer.d.ts b/types/lodash/lang/isBuffer.d.ts index 79fe9f479d..971cd4cc42 100644 --- a/types/lodash/lang/isBuffer.d.ts +++ b/types/lodash/lang/isBuffer.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isDate.d.ts b/types/lodash/lang/isDate.d.ts index e02811097a..ac6dc058f8 100644 --- a/types/lodash/lang/isDate.d.ts +++ b/types/lodash/lang/isDate.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isElement.d.ts b/types/lodash/lang/isElement.d.ts index 049435dace..9b818bc1cf 100644 --- a/types/lodash/lang/isElement.d.ts +++ b/types/lodash/lang/isElement.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isEmpty.d.ts b/types/lodash/lang/isEmpty.d.ts index e8c44dec8f..b84fd2e125 100644 --- a/types/lodash/lang/isEmpty.d.ts +++ b/types/lodash/lang/isEmpty.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isEqual.d.ts b/types/lodash/lang/isEqual.d.ts index 9741781d08..ae7b0eedd8 100644 --- a/types/lodash/lang/isEqual.d.ts +++ b/types/lodash/lang/isEqual.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isEqualWith.d.ts b/types/lodash/lang/isEqualWith.d.ts index a87919d3c4..44ab134546 100644 --- a/types/lodash/lang/isEqualWith.d.ts +++ b/types/lodash/lang/isEqualWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { type IsEqualCustomizer = (value: any, other: any, indexOrKey: PropertyName | undefined, parent: any, otherParent: any, stack: any) => boolean|undefined; diff --git a/types/lodash/lang/isError.d.ts b/types/lodash/lang/isError.d.ts index 0b04dc63b7..a5bd5d378b 100644 --- a/types/lodash/lang/isError.d.ts +++ b/types/lodash/lang/isError.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isFinite.d.ts b/types/lodash/lang/isFinite.d.ts index 023eed061e..e5015e8d49 100644 --- a/types/lodash/lang/isFinite.d.ts +++ b/types/lodash/lang/isFinite.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isFunction.d.ts b/types/lodash/lang/isFunction.d.ts index 0b4c539721..7f6ae1feea 100644 --- a/types/lodash/lang/isFunction.d.ts +++ b/types/lodash/lang/isFunction.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isInteger.d.ts b/types/lodash/lang/isInteger.d.ts index 6c1c85a4b5..a1919bf21d 100644 --- a/types/lodash/lang/isInteger.d.ts +++ b/types/lodash/lang/isInteger.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isLength.d.ts b/types/lodash/lang/isLength.d.ts index 2045c8642b..b8c012460e 100644 --- a/types/lodash/lang/isLength.d.ts +++ b/types/lodash/lang/isLength.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isMap.d.ts b/types/lodash/lang/isMap.d.ts index 7ff700592f..b71a3d750f 100644 --- a/types/lodash/lang/isMap.d.ts +++ b/types/lodash/lang/isMap.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isMatch.d.ts b/types/lodash/lang/isMatch.d.ts index 4ec05e5651..dfb072c59b 100644 --- a/types/lodash/lang/isMatch.d.ts +++ b/types/lodash/lang/isMatch.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { type isMatchCustomizer = (value: any, other: any, indexOrKey?: PropertyName) => boolean; diff --git a/types/lodash/lang/isMatchWith.d.ts b/types/lodash/lang/isMatchWith.d.ts index 8ed28e0ca9..fb47f327b4 100644 --- a/types/lodash/lang/isMatchWith.d.ts +++ b/types/lodash/lang/isMatchWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { type isMatchWithCustomizer = (value: any, other: any, indexOrKey: PropertyName) => boolean; diff --git a/types/lodash/lang/isNaN.d.ts b/types/lodash/lang/isNaN.d.ts index cfc6466d89..b016c91c74 100644 --- a/types/lodash/lang/isNaN.d.ts +++ b/types/lodash/lang/isNaN.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isNative.d.ts b/types/lodash/lang/isNative.d.ts index 8cc7682e08..72f74e7148 100644 --- a/types/lodash/lang/isNative.d.ts +++ b/types/lodash/lang/isNative.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isNil.d.ts b/types/lodash/lang/isNil.d.ts index 19f0d0510d..2b0cb04fbc 100644 --- a/types/lodash/lang/isNil.d.ts +++ b/types/lodash/lang/isNil.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isNull.d.ts b/types/lodash/lang/isNull.d.ts index d75bc31dbe..04dfb18cea 100644 --- a/types/lodash/lang/isNull.d.ts +++ b/types/lodash/lang/isNull.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isNumber.d.ts b/types/lodash/lang/isNumber.d.ts index b149f779e9..81479cb4c9 100644 --- a/types/lodash/lang/isNumber.d.ts +++ b/types/lodash/lang/isNumber.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isObject.d.ts b/types/lodash/lang/isObject.d.ts index 760d08bcf5..e014fd9620 100644 --- a/types/lodash/lang/isObject.d.ts +++ b/types/lodash/lang/isObject.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isObjectLike.d.ts b/types/lodash/lang/isObjectLike.d.ts index 1f59f71035..1665ec8a69 100644 --- a/types/lodash/lang/isObjectLike.d.ts +++ b/types/lodash/lang/isObjectLike.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isPlainObject.d.ts b/types/lodash/lang/isPlainObject.d.ts index 48031c8aeb..bb5070f535 100644 --- a/types/lodash/lang/isPlainObject.d.ts +++ b/types/lodash/lang/isPlainObject.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isRegExp.d.ts b/types/lodash/lang/isRegExp.d.ts index 5d63d6bed1..4199940091 100644 --- a/types/lodash/lang/isRegExp.d.ts +++ b/types/lodash/lang/isRegExp.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isSafeInteger.d.ts b/types/lodash/lang/isSafeInteger.d.ts index c1ba912c76..0ca1b4809a 100644 --- a/types/lodash/lang/isSafeInteger.d.ts +++ b/types/lodash/lang/isSafeInteger.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isSet.d.ts b/types/lodash/lang/isSet.d.ts index 173f8aa8b8..af7f4ad9e9 100644 --- a/types/lodash/lang/isSet.d.ts +++ b/types/lodash/lang/isSet.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isString.d.ts b/types/lodash/lang/isString.d.ts index 739f8730a8..d39917345e 100644 --- a/types/lodash/lang/isString.d.ts +++ b/types/lodash/lang/isString.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isSymbol.d.ts b/types/lodash/lang/isSymbol.d.ts index 7831c3d4b2..2f0a6aa4f5 100644 --- a/types/lodash/lang/isSymbol.d.ts +++ b/types/lodash/lang/isSymbol.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isTypedArray.d.ts b/types/lodash/lang/isTypedArray.d.ts index fc55e1b06a..dffc9e43d0 100644 --- a/types/lodash/lang/isTypedArray.d.ts +++ b/types/lodash/lang/isTypedArray.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isUndefined.d.ts b/types/lodash/lang/isUndefined.d.ts index 1803b36c29..dad9ed7cc3 100644 --- a/types/lodash/lang/isUndefined.d.ts +++ b/types/lodash/lang/isUndefined.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isWeakMap.d.ts b/types/lodash/lang/isWeakMap.d.ts index 36251720a9..8dae9d20f5 100644 --- a/types/lodash/lang/isWeakMap.d.ts +++ b/types/lodash/lang/isWeakMap.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/isWeakSet.d.ts b/types/lodash/lang/isWeakSet.d.ts index ce523a098d..2c08c521aa 100644 --- a/types/lodash/lang/isWeakSet.d.ts +++ b/types/lodash/lang/isWeakSet.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/lt.d.ts b/types/lodash/lang/lt.d.ts index ff991eb9a7..434b1476d0 100644 --- a/types/lodash/lang/lt.d.ts +++ b/types/lodash/lang/lt.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/lte.d.ts b/types/lodash/lang/lte.d.ts index 21a1710da3..84cc6b22fe 100644 --- a/types/lodash/lang/lte.d.ts +++ b/types/lodash/lang/lte.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/toArray.d.ts b/types/lodash/lang/toArray.d.ts index be11eecb6d..d0fd0b93f2 100644 --- a/types/lodash/lang/toArray.d.ts +++ b/types/lodash/lang/toArray.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/toFinite.d.ts b/types/lodash/lang/toFinite.d.ts index 53a913e212..3007bf3674 100644 --- a/types/lodash/lang/toFinite.d.ts +++ b/types/lodash/lang/toFinite.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/toInteger.d.ts b/types/lodash/lang/toInteger.d.ts index 2fe3f91f5d..2f4c2f217c 100644 --- a/types/lodash/lang/toInteger.d.ts +++ b/types/lodash/lang/toInteger.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/toLength.d.ts b/types/lodash/lang/toLength.d.ts index 4b3629eccd..62e9b059fe 100644 --- a/types/lodash/lang/toLength.d.ts +++ b/types/lodash/lang/toLength.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/toNumber.d.ts b/types/lodash/lang/toNumber.d.ts index 5632b018f1..5099f7ad89 100644 --- a/types/lodash/lang/toNumber.d.ts +++ b/types/lodash/lang/toNumber.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/toPlainObject.d.ts b/types/lodash/lang/toPlainObject.d.ts index 74ede5011d..60b9c1a7b1 100644 --- a/types/lodash/lang/toPlainObject.d.ts +++ b/types/lodash/lang/toPlainObject.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/toSafeInteger.d.ts b/types/lodash/lang/toSafeInteger.d.ts index 774492cbe0..a4e1729dbb 100644 --- a/types/lodash/lang/toSafeInteger.d.ts +++ b/types/lodash/lang/toSafeInteger.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lang/toString.d.ts b/types/lodash/lang/toString.d.ts index 2a0de1e865..559f05f66f 100644 --- a/types/lodash/lang/toString.d.ts +++ b/types/lodash/lang/toString.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index 77cc1984eb..ca33017323 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -20,9 +20,9 @@ const stoogesAges: StoogesAge[] = [ let result: any; -let any: any; +let anything: any; -interface TResult { +interface AbcObject { a: number; b: string; c: boolean; @@ -70,13 +70,13 @@ namespace TestWrapper { } { - let a: TResult[] = []; - _(a); // $ExpectType LoDashImplicitWrapper + let a: AbcObject[] = []; + _(a); // $ExpectType LoDashImplicitWrapper } { - let a: TResult[] | null | undefined = any; - _(a); // $ExpectType LoDashImplicitWrapper + let a: AbcObject[] | null | undefined = anything; + _(a); // $ExpectType LoDashImplicitWrapper } } @@ -103,81 +103,81 @@ _.chain([1, 2, 3, 4]).unshift(5, 6); // $ExpectType LoDashExplicitWrapper | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; { - let result: TResult[][]; + let result: AbcObject[][]; - result = _.chunk(array); - result = _.chunk(array, 42); + result = _.chunk(array); + result = _.chunk(array, 42); - result = _.chunk(list); - result = _.chunk(list, 42); + result = _.chunk(list); + result = _.chunk(list, 42); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).chunk(); result = _(array).chunk(42); - result = _(list).chunk(); - result = _(list).chunk(42); + result = _(list).chunk(); + result = _(list).chunk(42); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _.chain(array).chunk(); result = _(array).chain().chunk(); result = _(array).chain().chunk(42); - result = _(list).chain().chunk(); - result = _(list).chain().chunk(42); + result = _(list).chain().chunk(); + result = _(list).chain().chunk(42); } } // _.compact namespace TestCompact { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let array2: Array | null | undefined = any; - let list2: _.List | null | undefined = any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; + let array2: Array | null | undefined = anything; + let list2: _.List | null | undefined = anything; { - let result: TResult[]; + let result: AbcObject[]; - result = _.compact(array); - result = _.compact(list); + result = _.compact(array); + result = _.compact(list); result = _.compact(array2); result = _.compact(list2); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).compact(); - result = _(list).compact(); + result = _(list).compact(); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().compact(); - result = _(list).chain().compact(); + result = _(list).chain().compact(); } } // _.difference namespace TestDifference { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let arrayParam: TResult[] = []; - let listParam: _.List = []; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; + let arrayParam: AbcObject[] = []; + let listParam: _.List = []; { - let result: TResult[]; + let result: AbcObject[]; result = _.difference(array); result = _.difference(array, arrayParam); @@ -191,222 +191,222 @@ namespace TestDifference { } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).difference(); result = _(array).difference(arrayParam); result = _(array).difference(listParam, arrayParam); result = _(array).difference(arrayParam, listParam, arrayParam); - result = _(list).difference(); - result = _(list).difference(listParam); - result = _(list).difference(arrayParam, listParam); - result = _(list).difference(listParam, arrayParam, listParam); + result = _(list).difference(); + result = _(list).difference(listParam); + result = _(list).difference(arrayParam, listParam); + result = _(list).difference(listParam, arrayParam, listParam); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().difference(); result = _(array).chain().difference(arrayParam); result = _(array).chain().difference(listParam, arrayParam); result = _(array).chain().difference(arrayParam, listParam, arrayParam); - result = _(list).chain().difference(); - result = _(list).chain().difference(listParam); - result = _(list).chain().difference(arrayParam, listParam); - result = _(list).chain().difference(listParam, arrayParam, listParam); + result = _(list).chain().difference(); + result = _(list).chain().difference(listParam); + result = _(list).chain().difference(arrayParam, listParam); + result = _(list).chain().difference(listParam, arrayParam, listParam); } } // _.differenceBy namespace TestDifferenceBy { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let arrayParam: TResult[] = []; - let listParam: _.List = []; - let iteratee: (value: TResult) => any = (value: TResult) => 1; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; + let arrayParam: AbcObject[] = []; + let listParam: _.List = []; + let iteratee: (value: AbcObject) => any = (value: AbcObject) => 1; { - let result: TResult[]; + let result: AbcObject[]; result = _.differenceBy(array); - result = _.differenceBy(array, arrayParam); - result = _.differenceBy(array, listParam, arrayParam); - result = _.differenceBy(array, arrayParam, listParam, arrayParam); - result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam); - result = _.differenceBy(array, arrayParam, listParam, arrayParam, listParam, arrayParam); - result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); + result = _.differenceBy(array, arrayParam); + result = _.differenceBy(array, listParam, arrayParam); + result = _.differenceBy(array, arrayParam, listParam, arrayParam); + result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam); + result = _.differenceBy(array, arrayParam, listParam, arrayParam, listParam, arrayParam); + result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); result = _.differenceBy(array, arrayParam, iteratee); result = _.differenceBy(array, listParam, arrayParam, iteratee); result = _.differenceBy(array, arrayParam, listParam, arrayParam, iteratee); result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, iteratee); result = _.differenceBy(array, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); - result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); + result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); result = _.differenceBy(array, arrayParam, 'a'); result = _.differenceBy(array, listParam, arrayParam, 'a'); result = _.differenceBy(array, arrayParam, listParam, arrayParam, 'a'); result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, 'a'); result = _.differenceBy(array, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); - result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); + result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); result = _.differenceBy(array, arrayParam, {a: 1}); result = _.differenceBy(array, listParam, arrayParam, {a: 1}); result = _.differenceBy(array, arrayParam, listParam, arrayParam, {a: 1}); result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, {a: 1}); result = _.differenceBy(array, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); + result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); result = _.differenceBy(list); - result = _.differenceBy(list, listParam); - result = _.differenceBy(list, arrayParam, listParam); - result = _.differenceBy(list, listParam, arrayParam, listParam); - result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam); - result = _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam); - result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam); + result = _.differenceBy(list, listParam); + result = _.differenceBy(list, arrayParam, listParam); + result = _.differenceBy(list, listParam, arrayParam, listParam); + result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam); + result = _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam); + result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam); result = _.differenceBy(list, listParam, iteratee); result = _.differenceBy(list, arrayParam, listParam, iteratee); result = _.differenceBy(list, listParam, arrayParam, listParam, iteratee); result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, iteratee); result = _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); - result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); + result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); result = _.differenceBy(list, listParam, 'a'); result = _.differenceBy(list, arrayParam, listParam, 'a'); result = _.differenceBy(list, listParam, arrayParam, listParam, 'a'); result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, 'a'); result = _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); - result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); + result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); result = _.differenceBy(list, listParam, {a: 1}); result = _.differenceBy(list, arrayParam, listParam, {a: 1}); result = _.differenceBy(list, listParam, arrayParam, listParam, {a: 1}); result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, {a: 1}); result = _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); + result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); } { - let result: _.LoDashImplicitWrapper; + let result: _.LoDashImplicitWrapper; - result = _(array).differenceBy(arrayParam); - result = _(array).differenceBy(listParam, arrayParam); - result = _(array).differenceBy(arrayParam, listParam, arrayParam); - result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam); - result = _(array).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam); - result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); + result = _(array).differenceBy(arrayParam); + result = _(array).differenceBy(listParam, arrayParam); + result = _(array).differenceBy(arrayParam, listParam, arrayParam); + result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam); + result = _(array).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam); + result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); result = _(array).differenceBy(arrayParam, iteratee); result = _(array).differenceBy(listParam, arrayParam, iteratee); result = _(array).differenceBy(arrayParam, listParam, arrayParam, iteratee); result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, iteratee); result = _(array).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); - result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); + result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); result = _(array).differenceBy(arrayParam, 'a'); result = _(array).differenceBy(listParam, arrayParam, 'a'); result = _(array).differenceBy(arrayParam, listParam, arrayParam, 'a'); result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, 'a'); result = _(array).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); - result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); + result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); result = _(array).differenceBy(arrayParam, {a: 1}); result = _(array).differenceBy(listParam, arrayParam, {a: 1}); result = _(array).differenceBy(arrayParam, listParam, arrayParam, {a: 1}); result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, {a: 1}); result = _(array).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); + result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(list).differenceBy(listParam); - result = _(list).differenceBy(arrayParam, listParam); - result = _(list).differenceBy(listParam, arrayParam, listParam); - result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam); - result = _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam); - result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam); + result = _(list).differenceBy(listParam); + result = _(list).differenceBy(arrayParam, listParam); + result = _(list).differenceBy(listParam, arrayParam, listParam); + result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam); + result = _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam); + result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam); result = _(list).differenceBy(listParam, iteratee); result = _(list).differenceBy(arrayParam, listParam, iteratee); result = _(list).differenceBy(listParam, arrayParam, listParam, iteratee); result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, iteratee); result = _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, iteratee); - result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); + result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); result = _(list).differenceBy(listParam, 'a'); result = _(list).differenceBy(arrayParam, listParam, 'a'); result = _(list).differenceBy(listParam, arrayParam, listParam, 'a'); result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, 'a'); result = _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, 'a'); - result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); + result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); result = _(list).differenceBy(listParam, {a: 1}); result = _(list).differenceBy(arrayParam, listParam, {a: 1}); result = _(list).differenceBy(listParam, arrayParam, listParam, {a: 1}); result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, {a: 1}); result = _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); + result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); } { - let result: _.LoDashExplicitWrapper; + let result: _.LoDashExplicitWrapper; - result = _(array).chain().differenceBy(arrayParam); - result = _(array).chain().differenceBy(listParam, arrayParam); - result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam); - result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam); - result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam); - result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); + result = _(array).chain().differenceBy(arrayParam); + result = _(array).chain().differenceBy(listParam, arrayParam); + result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam); + result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam); + result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam); + result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); result = _(array).chain().differenceBy(arrayParam, iteratee); result = _(array).chain().differenceBy(listParam, arrayParam, iteratee); result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, iteratee); result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, iteratee); result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); - result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); + result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); result = _(array).chain().differenceBy(arrayParam, 'a'); result = _(array).chain().differenceBy(listParam, arrayParam, 'a'); result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, 'a'); result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, 'a'); result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); - result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); + result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); result = _(array).chain().differenceBy(arrayParam, {a: 1}); result = _(array).chain().differenceBy(listParam, arrayParam, {a: 1}); result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, {a: 1}); result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, {a: 1}); result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); + result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(list).chain().differenceBy(listParam); - result = _(list).chain().differenceBy(arrayParam, listParam); - result = _(list).chain().differenceBy(listParam, arrayParam, listParam); - result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam); - result = _(list).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam); - result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam); + result = _(list).chain().differenceBy(listParam); + result = _(list).chain().differenceBy(arrayParam, listParam); + result = _(list).chain().differenceBy(listParam, arrayParam, listParam); + result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam); + result = _(list).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam); + result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam); result = _(list).chain().differenceBy(listParam, iteratee); result = _(list).chain().differenceBy(arrayParam, listParam, iteratee); result = _(list).chain().differenceBy(listParam, arrayParam, listParam, iteratee); result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, iteratee); result = _(list).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, iteratee); - result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); + result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); result = _(list).chain().differenceBy(listParam, 'a'); result = _(list).chain().differenceBy(arrayParam, listParam, 'a'); result = _(list).chain().differenceBy(listParam, arrayParam, listParam, 'a'); result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, 'a'); result = _(list).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, 'a'); - result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); + result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); result = _(list).chain().differenceBy(listParam, {a: 1}); result = _(list).chain().differenceBy(arrayParam, listParam, {a: 1}); result = _(list).chain().differenceBy(listParam, arrayParam, listParam, {a: 1}); result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, {a: 1}); result = _(list).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); + result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); } { @@ -550,63 +550,63 @@ namespace TestDifferenceBy { // _.differenceWith { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let arrayParam: TResult[] = []; - let listParam: _.List = []; - let comparator = (a: TResult, b: TResult) => true; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; + let arrayParam: AbcObject[] = []; + let listParam: _.List = []; + let comparator = (a: AbcObject, b: AbcObject) => true; { - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.differenceWith(array); - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.differenceWith(array, arrayParam); - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.differenceWith(array, listParam, arrayParam); - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.differenceWith(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.differenceWith(array, arrayParam, comparator); - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.differenceWith(array, listParam, arrayParam, comparator); - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.differenceWith(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, comparator); } { - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).differenceWith(arrayParam); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).differenceWith(listParam, arrayParam); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).differenceWith(arrayParam, listParam, arrayParam); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).differenceWith(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).differenceWith(arrayParam, comparator); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).differenceWith(listParam, arrayParam, comparator); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).differenceWith(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, comparator); } { - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).differenceWith(arrayParam); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).differenceWith(listParam, arrayParam); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).differenceWith(arrayParam, listParam, arrayParam); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).differenceWith(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).differenceWith(arrayParam, comparator); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).differenceWith(listParam, arrayParam, comparator); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).differenceWith(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, comparator); } @@ -621,7 +621,7 @@ namespace TestDifferenceBy { } const t1: T1 = { a: 'a', b: 'b' }; - const t2: T2 | undefined = any; + const t2: T2 | undefined = anything; // $ExpectType T1[] _.differenceWith([t1], [t2], (a, b) => { @@ -648,169 +648,169 @@ namespace TestDifferenceBy { // _.drop { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; { - let result: TResult[]; - result = _.drop(array); - result = _.drop(array, 42); + let result: AbcObject[]; + result = _.drop(array); + result = _.drop(array, 42); - result = _.drop(list); - result = _.drop(list, 42); + result = _.drop(list); + result = _.drop(list, 42); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).drop(); result = _(array).drop(42); - result = _(list).drop(); - result = _(list).drop(42); + result = _(list).drop(); + result = _(list).drop(42); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().drop(); result = _(array).chain().drop(42); - result = _(list).chain().drop(); - result = _(list).chain().drop(42); + result = _(list).chain().drop(); + result = _(list).chain().drop(42); } } // _.dropRight namespace TestDropRight { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; { - let result: TResult[]; + let result: AbcObject[]; - result = _.dropRight(array); - result = _.dropRight(array, 42); + result = _.dropRight(array); + result = _.dropRight(array, 42); - result = _.dropRight(list); - result = _.dropRight(list, 42); + result = _.dropRight(list); + result = _.dropRight(list, 42); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).dropRight(); result = _(array).dropRight(42); - result = _(list).dropRight(); - result = _(list).dropRight(42); + result = _(list).dropRight(); + result = _(list).dropRight(42); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().dropRight(); result = _(array).chain().dropRight(42); - result = _(list).chain().dropRight(); - result = _(list).chain().dropRight(42); + result = _(list).chain().dropRight(); + result = _(list).chain().dropRight(42); } } // _.dropRightWhile namespace TestDropRightWhile { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let predicateFn = (value: TResult, index: number, collection: _.List) => true; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; + let predicateFn = (value: AbcObject, index: number, collection: _.List) => true; { - let result: TResult[]; + let result: AbcObject[]; - result = _.dropRightWhile(array); - result = _.dropRightWhile(array, predicateFn); - result = _.dropRightWhile(array, ''); + result = _.dropRightWhile(array); + result = _.dropRightWhile(array, predicateFn); + result = _.dropRightWhile(array, ''); result = _.dropRightWhile(array, {a: 42}); - result = _.dropRightWhile(list); - result = _.dropRightWhile(list, predicateFn); - result = _.dropRightWhile(list, ''); + result = _.dropRightWhile(list); + result = _.dropRightWhile(list, predicateFn); + result = _.dropRightWhile(list, ''); result = _.dropRightWhile(list, {a: 42}); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).dropRightWhile(); result = _(array).dropRightWhile(predicateFn); result = _(array).dropRightWhile(''); result = _(array).dropRightWhile({a: 42}); - result = _(list).dropRightWhile(); - result = _(list).dropRightWhile(predicateFn); - result = _(list).dropRightWhile(''); + result = _(list).dropRightWhile(); + result = _(list).dropRightWhile(predicateFn); + result = _(list).dropRightWhile(''); result = _(list).dropRightWhile({a: 42}); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().dropRightWhile(); result = _(array).chain().dropRightWhile(predicateFn); result = _(array).chain().dropRightWhile(''); result = _(array).chain().dropRightWhile({a: 42}); - result = _(list).chain().dropRightWhile(); - result = _(list).chain().dropRightWhile(predicateFn); - result = _(list).chain().dropRightWhile(''); + result = _(list).chain().dropRightWhile(); + result = _(list).chain().dropRightWhile(predicateFn); + result = _(list).chain().dropRightWhile(''); result = _(list).chain().dropRightWhile({a: 42}); } } // _.dropWhile namespace TestDropWhile { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let predicateFn = (value: TResult, index: number, collection: _.List) => true; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; + let predicateFn = (value: AbcObject, index: number, collection: _.List) => true; { - let result: TResult[]; + let result: AbcObject[]; - result = _.dropWhile(array); - result = _.dropWhile(array, predicateFn); - result = _.dropWhile(array, ''); + result = _.dropWhile(array); + result = _.dropWhile(array, predicateFn); + result = _.dropWhile(array, ''); result = _.dropWhile(array, {a: 42}); - result = _.dropWhile(list); - result = _.dropWhile(list, predicateFn); - result = _.dropWhile(list, ''); + result = _.dropWhile(list); + result = _.dropWhile(list, predicateFn); + result = _.dropWhile(list, ''); result = _.dropWhile(list, {a: 42}); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).dropWhile(); result = _(array).dropWhile(predicateFn); result = _(array).dropWhile(''); result = _(array).dropWhile({a: 42}); - result = _(list).dropWhile(); - result = _(list).dropWhile(predicateFn); - result = _(list).dropWhile(''); + result = _(list).dropWhile(); + result = _(list).dropWhile(predicateFn); + result = _(list).dropWhile(''); result = _(list).dropWhile({a: 42}); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().dropWhile(); result = _(array).chain().dropWhile(predicateFn); result = _(array).chain().dropWhile(''); result = _(array).chain().dropWhile({a: 42}); - result = _(list).chain().dropWhile(); - result = _(list).chain().dropWhile(predicateFn); - result = _(list).chain().dropWhile(''); + result = _(list).chain().dropWhile(); + result = _(list).chain().dropWhile(predicateFn); + result = _(list).chain().dropWhile(''); result = _(list).chain().dropWhile({a: 42}); } } @@ -871,25 +871,25 @@ namespace TestFill { // _.findIndex namespace TestFindIndex { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let predicateFn = (value: TResult, index: number, collection: _.List) => true; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; + let predicateFn = (value: AbcObject, index: number, collection: _.List) => true; let fromIndex = 0; { let result: number; - result = _.findIndex(array); - result = _.findIndex(array, predicateFn); - result = _.findIndex(array, ''); + result = _.findIndex(array); + result = _.findIndex(array, predicateFn); + result = _.findIndex(array, ''); result = _.findIndex(array, {a: 42}); - result = _.findIndex(array, predicateFn, fromIndex); + result = _.findIndex(array, predicateFn, fromIndex); - result = _.findIndex(list); - result = _.findIndex(list, predicateFn); - result = _.findIndex(list, ''); + result = _.findIndex(list); + result = _.findIndex(list, predicateFn); + result = _.findIndex(list, ''); result = _.findIndex(list, {a: 42}); - result = _.findIndex(list, predicateFn, fromIndex); + result = _.findIndex(list, predicateFn, fromIndex); result = _.findIndex([{ b: 5 }], ['b', 5]); result = _(array).findIndex(); @@ -899,10 +899,10 @@ namespace TestFindIndex { result = _(array).findIndex(predicateFn, fromIndex); result = _(list).findIndex(); - result = _(list).findIndex(predicateFn); + result = _(list).findIndex(predicateFn); result = _(list).findIndex(''); result = _(list).findIndex<{a: number}>({a: 42}); - result = _(list).findIndex(predicateFn, fromIndex); + result = _(list).findIndex(predicateFn, fromIndex); } { @@ -915,35 +915,35 @@ namespace TestFindIndex { result = _(array).chain().findIndex(predicateFn, fromIndex); result = _(list).chain().findIndex(); - result = _(list).chain().findIndex(predicateFn); + result = _(list).chain().findIndex(predicateFn); result = _(list).chain().findIndex(''); result = _(list).chain().findIndex<{a: number}>({a: 42}); - result = _(list).chain().findIndex(predicateFn, fromIndex); + result = _(list).chain().findIndex(predicateFn, fromIndex); } } // _.findLastIndex namespace TestFindLastIndex { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; - let predicateFn = (value: TResult, index: number, collection: _.List) => true; + let predicateFn = (value: AbcObject, index: number, collection: _.List) => true; let fromIndex = 0; { let result: number; - result = _.findLastIndex(array); - result = _.findLastIndex(array, predicateFn); - result = _.findLastIndex(array, ''); + result = _.findLastIndex(array); + result = _.findLastIndex(array, predicateFn); + result = _.findLastIndex(array, ''); result = _.findLastIndex(array, {a: 42}); - result = _.findLastIndex(array, predicateFn, fromIndex); + result = _.findLastIndex(array, predicateFn, fromIndex); - result = _.findLastIndex(list); - result = _.findLastIndex(list, predicateFn); - result = _.findLastIndex(list, ''); + result = _.findLastIndex(list); + result = _.findLastIndex(list, predicateFn); + result = _.findLastIndex(list, ''); result = _.findLastIndex(list, {a: 42}); - result = _.findLastIndex(list, predicateFn, fromIndex); + result = _.findLastIndex(list, predicateFn, fromIndex); result = _.findLastIndex([{ b: 5 }], ['b', 5]); result = _(array).findLastIndex(); @@ -953,10 +953,10 @@ namespace TestFindLastIndex { result = _(array).findLastIndex(predicateFn, fromIndex); result = _(list).findLastIndex(); - result = _(list).findLastIndex(predicateFn); + result = _(list).findLastIndex(predicateFn); result = _(list).findLastIndex(''); result = _(list).findLastIndex<{a: number}>({a: 42}); - result = _(list).findLastIndex(predicateFn, fromIndex); + result = _(list).findLastIndex(predicateFn, fromIndex); } { @@ -969,17 +969,17 @@ namespace TestFindLastIndex { result = _(array).chain().findLastIndex(predicateFn, fromIndex); result = _(list).chain().findLastIndex(); - result = _(list).chain().findLastIndex(predicateFn); + result = _(list).chain().findLastIndex(predicateFn); result = _(list).chain().findLastIndex(''); result = _(list).chain().findLastIndex<{a: number}>({a: 42}); - result = _(list).chain().findLastIndex(predicateFn, fromIndex); + result = _(list).chain().findLastIndex(predicateFn, fromIndex); } } // _.first namespace TestFirst { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; { let result: string | undefined; @@ -989,13 +989,13 @@ namespace TestFirst { } { - let result: TResult | undefined; + let result: AbcObject | undefined; - result = _.first(array); - result = _.first(list); + result = _.first(array); + result = _.first(list); result = _(array).first(); - result = _(list).first(); + result = _(list).first(); } { @@ -1005,7 +1005,7 @@ namespace TestFirst { } { - let result: _.LoDashExplicitWrapper; + let result: _.LoDashExplicitWrapper; result = _(array).chain().first(); result = _(list).chain().first(); @@ -1227,8 +1227,8 @@ namespace TestFromPairs { // _.head namespace TestHead { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; { let result: string | undefined; @@ -1238,13 +1238,13 @@ namespace TestHead { } { - let result: TResult | undefined; + let result: AbcObject | undefined; - result = _.head(array); - result = _.head(list); + result = _.head(array); + result = _.head(list); result = _(array).head(); - result = _(list).head(); + result = _(list).head(); } { @@ -1254,7 +1254,7 @@ namespace TestHead { } { - let result: _.LoDashExplicitWrapper; + let result: _.LoDashExplicitWrapper; result = _(array).chain().head(); result = _(list).chain().head(); @@ -1263,28 +1263,28 @@ namespace TestHead { // _.indexOf namespace TestIndexOf { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let value: TResult = { a: 1, b: "", c: true }; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; + let value: AbcObject = { a: 1, b: "", c: true }; { let result: number; - result = _.indexOf(array, value); - result = _.indexOf(array, value, true); - result = _.indexOf(array, value, 42); + result = _.indexOf(array, value); + result = _.indexOf(array, value, true); + result = _.indexOf(array, value, 42); - result = _.indexOf(list, value); - result = _.indexOf(list, value, true); - result = _.indexOf(list, value, 42); + result = _.indexOf(list, value); + result = _.indexOf(list, value, true); + result = _.indexOf(list, value, 42); result = _(array).indexOf(value); result = _(array).indexOf(value, true); result = _(array).indexOf(value, 42); - result = _(list).indexOf(value); - result = _(list).indexOf(value, true); - result = _(list).indexOf(value, 42); + result = _(list).indexOf(value); + result = _(list).indexOf(value, true); + result = _(list).indexOf(value, 42); } { @@ -1294,170 +1294,170 @@ namespace TestIndexOf { result = _(array).chain().indexOf(value, true); result = _(array).chain().indexOf(value, 42); - result = _(list).chain().indexOf(value); - result = _(list).chain().indexOf(value, true); - result = _(list).chain().indexOf(value, 42); + result = _(list).chain().indexOf(value); + result = _(list).chain().indexOf(value, true); + result = _(list).chain().indexOf(value, 42); } } // _.sortedIndexOf { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let value: TResult = { a: 1, b: "", c: true }; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; + let value: AbcObject = { a: 1, b: "", c: true }; { let result: number; - result = _.sortedIndexOf(array, value); - result = _.sortedIndexOf(list, value); + result = _.sortedIndexOf(array, value); + result = _.sortedIndexOf(list, value); result = _(array).sortedIndexOf(value); - result = _(list).sortedIndexOf(value); + result = _(list).sortedIndexOf(value); } { let result: _.LoDashExplicitWrapper; result = _(array).chain().sortedIndexOf(value); - result = _(list).chain().sortedIndexOf(value); + result = _(list).chain().sortedIndexOf(value); } } //_.initial namespace TestInitial { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; { - let result: TResult[]; + let result: AbcObject[]; - result = _.initial(array); - result = _.initial(list); + result = _.initial(array); + result = _.initial(list); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).initial(); - result = _(list).initial(); + result = _(list).initial(); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().initial(); - result = _(list).chain().initial(); + result = _(list).chain().initial(); } } // _.intersection namespace TestIntersection { - let array: TResult[] = [] as any; - let list: _.List = [] as any; - let arrayParam: TResult[] = [] as any; - let listParam: _.List = [] as any; + let array: AbcObject[] = [] as any; + let list: _.List = [] as any; + let arrayParam: AbcObject[] = [] as any; + let listParam: _.List = [] as any; { - let result: TResult[]; + let result: AbcObject[]; - result = _.intersection(array, list); - result = _.intersection(list, array, list); + result = _.intersection(array, list); + result = _.intersection(list, array, list); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; - result = _(array).intersection(arrayParam); - result = _(array).intersection(listParam, arrayParam); + result = _(array).intersection(arrayParam); + result = _(array).intersection(listParam, arrayParam); - result = _(list).intersection(arrayParam); - result = _(list).intersection(listParam, arrayParam); + result = _(list).intersection(arrayParam); + result = _(list).intersection(listParam, arrayParam); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; - result = _(array).chain().intersection(arrayParam); - result = _(array).chain().intersection(listParam, arrayParam); + result = _(array).chain().intersection(arrayParam); + result = _(array).chain().intersection(listParam, arrayParam); - result = _(list).chain().intersection(arrayParam); - result = _(list).chain().intersection(listParam, arrayParam); + result = _(list).chain().intersection(arrayParam); + result = _(list).chain().intersection(listParam, arrayParam); } } // _.intersectionBy { - let array: TResult[] = [] as any; - let list: _.List = [] as any; - let arrayParam: TResult[] = [] as any; - let listParam: _.List = [] as any; + let array: AbcObject[] = [] as any; + let list: _.List = [] as any; + let arrayParam: AbcObject[] = [] as any; + let listParam: _.List = [] as any; - // $ExpectType TResult[] + // $ExpectType AbcObject[] result = _.intersectionBy(array, list); - // $ExpectType TResult[] + // $ExpectType AbcObject[] result = _.intersectionBy(list, array, list); - // $ExpectType TResult[] + // $ExpectType AbcObject[] result = _.intersectionBy(array, list, 'a'); - // $ExpectType TResult[] + // $ExpectType AbcObject[] result = _.intersectionBy(array, list, { a: 42 }); - // $ExpectType TResult[] + // $ExpectType AbcObject[] result = _.intersectionBy(list, array, list, { a: 42 }); - // $ExpectType TResult[] + // $ExpectType AbcObject[] result = _.intersectionBy(array, list, ['a', 42]); - // $ExpectType TResult[] + // $ExpectType AbcObject[] result = _.intersectionBy(array, list, (value) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject return 0; }); - // $ExpectType TResult[] + // $ExpectType AbcObject[] result = _.intersectionBy(list, array, list, (value) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject return 0; }); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper result = _(array).intersectionBy(arrayParam); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper result = _(array).intersectionBy(listParam, arrayParam); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper result = _(array).intersectionBy(list, 'a'); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper result = _(array).intersectionBy(list, { a: 42 }); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper result = _(list).intersectionBy(array, list, { a: 42 }); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper result = _(array).intersectionBy(list, ['a', 42]); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper result = _(array).intersectionBy(list, (value) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject return ""; }); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper result = _(list).intersectionBy(array, list, (value) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject return 1; }); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper result = _.chain(array).intersectionBy(arrayParam); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper result = _.chain(array).intersectionBy(listParam, arrayParam); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper result = _.chain(array).intersectionBy(list, 'a'); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper result = _.chain(array).intersectionBy(list, { a: 42 }); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper result = _.chain(list).intersectionBy(array, list, { a: 42 }); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper result = _.chain(array).intersectionBy(list, ['a', 42]); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper result = _.chain(array).intersectionBy(list, (value) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject return false; }); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper result = _.chain(list).intersectionBy(array, list, (value) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject return null; }); @@ -1490,59 +1490,59 @@ namespace TestIntersection { // _.intersectionWith { - let array: TResult[] = [] as any; - let list: _.List = [] as any; - let arrayParam: TResult[] = [] as any; - let listParam: _.List = [] as any; + let array: AbcObject[] = [] as any; + let list: _.List = [] as any; + let arrayParam: AbcObject[] = [] as any; + let listParam: _.List = [] as any; - // $ExpectType TResult[] + // $ExpectType AbcObject[] result = _.intersectionWith(array, list); - // $ExpectType TResult[] + // $ExpectType AbcObject[] result = _.intersectionWith(list, array, list); - // $ExpectType TResult[] + // $ExpectType AbcObject[] result = _.intersectionWith(array, list, (a, b) => { - a; // $ExpectType TResult - b; // $ExpectType TResult + a; // $ExpectType AbcObject + b; // $ExpectType AbcObject return true; }); - // $ExpectType TResult[] + // $ExpectType AbcObject[] result = _.intersectionWith(list, array, list, (a, b) => { - a; // $ExpectType TResult - b; // $ExpectType TResult + a; // $ExpectType AbcObject + b; // $ExpectType AbcObject return true; }); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper result = _(array).intersectionWith(arrayParam); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper result = _(array).intersectionWith(listParam, arrayParam); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper result = _(array).intersectionWith(list, (a, b) => { - a; // $ExpectType TResult - b; // $ExpectType TResult + a; // $ExpectType AbcObject + b; // $ExpectType AbcObject return true; }); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper result = _(list).intersectionWith(array, list, (a, b) => { - a; // $ExpectType TResult - b; // $ExpectType TResult + a; // $ExpectType AbcObject + b; // $ExpectType AbcObject return true; }); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper result = _.chain(array).intersectionWith(arrayParam); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper result = _.chain(array).intersectionWith(listParam, arrayParam); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper result = _.chain(array).intersectionWith(list, (a, b) => { - a; // $ExpectType TResult - b; // $ExpectType TResult + a; // $ExpectType AbcObject + b; // $ExpectType AbcObject return true; }); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper result = _.chain(list).intersectionWith(array, list, (a, b) => { - a; // $ExpectType TResult - b; // $ExpectType TResult + a; // $ExpectType AbcObject + b; // $ExpectType AbcObject return true; }); @@ -1619,8 +1619,8 @@ namespace TestJoin { // _.last namespace TestLast { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; { let result: string | undefined; @@ -1630,13 +1630,13 @@ namespace TestLast { } { - let result: TResult | undefined; + let result: AbcObject | undefined; - result = _.last(array); - result = _.last(list); + result = _.last(array); + result = _.last(list); result = _(array).last(); - result = _(list).last(); + result = _(list).last(); } { @@ -1646,13 +1646,13 @@ namespace TestLast { } { - let result: _.LoDashExplicitWrapper; + let result: _.LoDashExplicitWrapper; result = _(array).chain().last(); } { - let result: _.LoDashExplicitWrapper; + let result: _.LoDashExplicitWrapper; result = _(list).chain().last(); } @@ -1660,28 +1660,28 @@ namespace TestLast { // _.lastIndexOf namespace TestLastIndexOf { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let value: TResult = { a: 1, b: "", c: true }; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; + let value: AbcObject = { a: 1, b: "", c: true }; { let result: number; - result = _.lastIndexOf(array, value); - result = _.lastIndexOf(array, value, true); - result = _.lastIndexOf(array, value, 42); + result = _.lastIndexOf(array, value); + result = _.lastIndexOf(array, value, true); + result = _.lastIndexOf(array, value, 42); - result = _.lastIndexOf(list, value); - result = _.lastIndexOf(list, value, true); - result = _.lastIndexOf(list, value, 42); + result = _.lastIndexOf(list, value); + result = _.lastIndexOf(list, value, true); + result = _.lastIndexOf(list, value, 42); result = _(array).lastIndexOf(value); result = _(array).lastIndexOf(value, true); result = _(array).lastIndexOf(value, 42); - result = _(list).lastIndexOf(value); - result = _(list).lastIndexOf(value, true); - result = _(list).lastIndexOf(value, 42); + result = _(list).lastIndexOf(value); + result = _(list).lastIndexOf(value, true); + result = _(list).lastIndexOf(value, 42); } { @@ -1691,69 +1691,69 @@ namespace TestLastIndexOf { result = _(array).chain().lastIndexOf(value, true); result = _(array).chain().lastIndexOf(value, 42); - result = _(list).chain().lastIndexOf(value); - result = _(list).chain().lastIndexOf(value, true); - result = _(list).chain().lastIndexOf(value, 42); + result = _(list).chain().lastIndexOf(value); + result = _(list).chain().lastIndexOf(value, true); + result = _(list).chain().lastIndexOf(value, 42); } } // _.nth namespace TestNth { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; let value = 0; { - let result: TResult | undefined; + let result: AbcObject | undefined; - result = _.nth(array); + result = _.nth(array); - result = _.nth(array, 42); + result = _.nth(array, 42); result = _(array).nth(); result = _(array).nth(42); - result = _(list).nth(); - result = _(list).nth(42); + result = _(list).nth(); + result = _(list).nth(42); } { - let result: _.LoDashExplicitWrapper; + let result: _.LoDashExplicitWrapper; result = _(array).chain().nth(); result = _(array).chain().nth(42); - result = _(list).chain().nth(); - result = _(list).chain().nth(42); + result = _(list).chain().nth(); + result = _(list).chain().nth(42); } } // _.pull namespace TestPull { - let array: TResult[] = []; - let list: _.List = []; - let value: TResult = { a: 1, b: "", c: true }; + let array: AbcObject[] = []; + let list: _.List = []; + let value: AbcObject = { a: 1, b: "", c: true }; { - let result: TResult[]; + let result: AbcObject[]; - result = _.pull(array); - result = _.pull(array, value); - result = _.pull(array, value, value); - result = _.pull(array, value, value, value); + result = _.pull(array); + result = _.pull(array, value); + result = _.pull(array, value, value); + result = _.pull(array, value, value, value); } { - let result: _.List; + let result: _.List; - result = _.pull(list); - result = _.pull(list, value); - result = _.pull(list, value, value); - result = _.pull(list, value, value, value); + result = _.pull(list); + result = _.pull(list, value); + result = _.pull(list, value, value); + result = _.pull(list, value, value, value); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).pull(); result = _(array).pull(value); @@ -1762,16 +1762,16 @@ namespace TestPull { } { - let result: _.LoDashImplicitObjectWrapper<_.List>; + let result: _.LoDashImplicitObjectWrapper<_.List>; - result = _(list).pull(); - result = _(list).pull(value); - result = _(list).pull(value, value); - result = _(list).pull(value, value, value); + result = _(list).pull(); + result = _(list).pull(value); + result = _(list).pull(value, value); + result = _(list).pull(value, value, value); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().pull(); result = _(array).chain().pull(value); @@ -1780,40 +1780,40 @@ namespace TestPull { } { - let result: _.LoDashExplicitObjectWrapper<_.List>; + let result: _.LoDashExplicitObjectWrapper<_.List>; - result = _(list).chain().pull(); - result = _(list).chain().pull(value); - result = _(list).chain().pull(value, value); - result = _(list).chain().pull(value, value, value); + result = _(list).chain().pull(); + result = _(list).chain().pull(value); + result = _(list).chain().pull(value, value); + result = _(list).chain().pull(value, value, value); } } // _.pullAt namespace TestPullAt { - let array: TResult[] = []; - let list: _.List = []; + let array: AbcObject[] = []; + let list: _.List = []; { - let result: TResult[]; + let result: AbcObject[]; - result = _.pullAt(array); - result = _.pullAt(array, 1); - result = _.pullAt(array, [2, 3], 1); - result = _.pullAt(array, 4, [2, 3], 1); + result = _.pullAt(array); + result = _.pullAt(array, 1); + result = _.pullAt(array, [2, 3], 1); + result = _.pullAt(array, 4, [2, 3], 1); } { - let result: ArrayLike; + let result: ArrayLike; - result = _.pullAt(list); - result = _.pullAt(list, 1); - result = _.pullAt(list, [2, 3], 1); - result = _.pullAt(list, 4, [2, 3], 1); + result = _.pullAt(list); + result = _.pullAt(list, 1); + result = _.pullAt(list, [2, 3], 1); + result = _.pullAt(list, 4, [2, 3], 1); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).pullAt(); result = _(array).pullAt(1); @@ -1822,7 +1822,7 @@ namespace TestPullAt { } { - let result: _.LoDashImplicitWrapper>; + let result: _.LoDashImplicitWrapper>; result = _(list).pullAt(); result = _(list).pullAt(1); @@ -1831,7 +1831,7 @@ namespace TestPullAt { } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().pullAt(); result = _(array).chain().pullAt(1); @@ -1840,7 +1840,7 @@ namespace TestPullAt { } { - let result: _.LoDashExplicitWrapper>; + let result: _.LoDashExplicitWrapper>; result = _(list).chain().pullAt(); result = _(list).chain().pullAt(1); @@ -1851,134 +1851,134 @@ namespace TestPullAt { // _.pullAll { - let array: TResult[] = any; - let list: _.List = any; - let values: _.List = any; + let array: AbcObject[] = anything; + let list: _.List = anything; + let values: _.List = anything; - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.pullAll(array); - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.pullAll(array, values); - // $ExpectType ArrayLike + // $ExpectType ArrayLike _.pullAll(list); - // $ExpectType ArrayLike + // $ExpectType ArrayLike _.pullAll(list, values); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).pullAll(); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).pullAll(values); - // $ExpectType LoDashImplicitWrapper> + // $ExpectType LoDashImplicitWrapper> _(list).pullAll(); - // $ExpectType LoDashImplicitWrapper> + // $ExpectType LoDashImplicitWrapper> _(list).pullAll(values); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).pullAll(); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).pullAll(values); - // $ExpectType LoDashExplicitWrapper> + // $ExpectType LoDashExplicitWrapper> _.chain(list).pullAll(); - // $ExpectType LoDashExplicitWrapper> + // $ExpectType LoDashExplicitWrapper> _.chain(list).pullAll(values); } // _.pullAllBy { - let array: TResult[] = any; - let list: _.List = any; - let values: _.List = any; + let array: AbcObject[] = anything; + let list: _.List = anything; + let values: _.List = anything; - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.pullAllBy(array); - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.pullAllBy(array, values); - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.pullAllBy(array, values, 'a'); - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.pullAllBy(array, values, { a: 42 }); - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.pullAllBy(array, values, ['a', 42]); - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.pullAllBy(array, values, (value) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject return []; }); - // $ExpectType ArrayLike + // $ExpectType ArrayLike _.pullAllBy(list); - // $ExpectType ArrayLike + // $ExpectType ArrayLike _.pullAllBy(list, values); - // $ExpectType ArrayLike + // $ExpectType ArrayLike _.pullAllBy(list, values, 'a'); - // $ExpectType ArrayLike + // $ExpectType ArrayLike _.pullAllBy(list, values, { a: 42 }); - // $ExpectType ArrayLike + // $ExpectType ArrayLike _.pullAllBy(list, values, ['a', 42]); - // $ExpectType ArrayLike + // $ExpectType ArrayLike _.pullAllBy(list, values, (value) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject return () => {}; }); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).pullAllBy(); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).pullAllBy(values); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).pullAllBy(values, 'a'); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).pullAllBy(values, { a: 42 }); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).pullAllBy(values, ['a', 42]); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).pullAllBy(values, (value) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject return 0; }); - // $ExpectType LoDashImplicitWrapper> + // $ExpectType LoDashImplicitWrapper> _(list).pullAllBy(); - // $ExpectType LoDashImplicitWrapper> + // $ExpectType LoDashImplicitWrapper> _(list).pullAllBy(values); - // $ExpectType LoDashImplicitWrapper> + // $ExpectType LoDashImplicitWrapper> _(list).pullAllBy(values, 'a'); - // $ExpectType LoDashImplicitWrapper> + // $ExpectType LoDashImplicitWrapper> _(list).pullAllBy(values, { a: 42 }); - // $ExpectType LoDashImplicitWrapper> + // $ExpectType LoDashImplicitWrapper> _(list).pullAllBy(values, ['a', 42]); - // $ExpectType LoDashImplicitWrapper> + // $ExpectType LoDashImplicitWrapper> _(list).pullAllBy(values, (value) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject return 0; }); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).pullAllBy(); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).pullAllBy(values); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).pullAllBy(values, 'a'); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).pullAllBy(values, { a: 42 }); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).pullAllBy(values, ['a', 42]); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).pullAllBy(values, (value) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject return 0; }); - // $ExpectType LoDashExplicitWrapper> + // $ExpectType LoDashExplicitWrapper> _.chain(list).pullAllBy(); - // $ExpectType LoDashExplicitWrapper> + // $ExpectType LoDashExplicitWrapper> _.chain(list).pullAllBy(values); - // $ExpectType LoDashExplicitWrapper> + // $ExpectType LoDashExplicitWrapper> _.chain(list).pullAllBy(values, 'a'); - // $ExpectType LoDashExplicitWrapper> + // $ExpectType LoDashExplicitWrapper> _.chain(list).pullAllBy(values, { a: 42 }); - // $ExpectType LoDashExplicitWrapper> + // $ExpectType LoDashExplicitWrapper> _.chain(list).pullAllBy(values, ['a', 42]); - // $ExpectType LoDashExplicitWrapper> + // $ExpectType LoDashExplicitWrapper> _.chain(list).pullAllBy(values, (value) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject return 0; }); @@ -2011,70 +2011,70 @@ namespace TestPullAt { // _.pullAllWith { - let array: TResult[] = any; - let list: _.List = any; - let values: _.List = any; + let array: AbcObject[] = anything; + let list: _.List = anything; + let values: _.List = anything; - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.pullAllWith(array); - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.pullAllWith(array, values); - // $ExpectType TResult[] + // $ExpectType AbcObject[] _.pullAllWith(array, values, (a, b) => { - a; // $ExpectType TResult - b; // $ExpectType TResult + a; // $ExpectType AbcObject + b; // $ExpectType AbcObject return true; }); - // $ExpectType ArrayLike + // $ExpectType ArrayLike _.pullAllWith(list); - // $ExpectType ArrayLike + // $ExpectType ArrayLike _.pullAllWith(list, values); - // $ExpectType ArrayLike + // $ExpectType ArrayLike _.pullAllWith(list, values, (a, b) => { - a; // $ExpectType TResult - b; // $ExpectType TResult + a; // $ExpectType AbcObject + b; // $ExpectType AbcObject return true; }); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).pullAllWith(); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).pullAllWith(values); - // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper _(array).pullAllWith(values, (a, b) => { - a; // $ExpectType TResult - b; // $ExpectType TResult + a; // $ExpectType AbcObject + b; // $ExpectType AbcObject return true; }); - // $ExpectType LoDashImplicitWrapper> + // $ExpectType LoDashImplicitWrapper> _(list).pullAllWith(); - // $ExpectType LoDashImplicitWrapper> + // $ExpectType LoDashImplicitWrapper> _(list).pullAllWith(values); - // $ExpectType LoDashImplicitWrapper> + // $ExpectType LoDashImplicitWrapper> _(list).pullAllWith(values, (a, b) => { - a; // $ExpectType TResult - b; // $ExpectType TResult + a; // $ExpectType AbcObject + b; // $ExpectType AbcObject return true; }); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).pullAllWith(); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).pullAllWith(values); - // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper _.chain(array).pullAllWith(values, (a, b) => { - a; // $ExpectType TResult - b; // $ExpectType TResult + a; // $ExpectType AbcObject + b; // $ExpectType AbcObject return true; }); - // $ExpectType LoDashExplicitWrapper> + // $ExpectType LoDashExplicitWrapper> _.chain(list).pullAllWith(); - // $ExpectType LoDashExplicitWrapper> + // $ExpectType LoDashExplicitWrapper> _.chain(list).pullAllWith(values); - // $ExpectType LoDashExplicitWrapper> + // $ExpectType LoDashExplicitWrapper> _.chain(list).pullAllWith(values, (a, b) => { - a; // $ExpectType TResult - b; // $ExpectType TResult + a; // $ExpectType AbcObject + b; // $ExpectType AbcObject return true; }); @@ -2110,94 +2110,94 @@ namespace TestPullAt { // _.remove namespace TestRemove { - let array: TResult[] = []; - let list: _.List = []; - let predicateFn = (value: TResult, index: number, collection: _.List) => true; + let array: AbcObject[] = []; + let list: _.List = []; + let predicateFn = (value: AbcObject, index: number, collection: _.List) => true; { - let result: TResult[]; + let result: AbcObject[]; - result = _.remove(array); - result = _.remove(array, predicateFn); - result = _.remove(array, ''); + result = _.remove(array); + result = _.remove(array, predicateFn); + result = _.remove(array, ''); result = _.remove(array, {a: 42}); - result = _.remove(list); - result = _.remove(list, predicateFn); - result = _.remove(list, ''); + result = _.remove(list); + result = _.remove(list, predicateFn); + result = _.remove(list, ''); result = _.remove(list, {a: 42}); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).remove(); result = _(array).remove(predicateFn); result = _(array).remove(''); result = _(array).remove({a: 42}); - result = _(list).remove(); - result = _(list).remove(predicateFn); - result = _(list).remove(''); + result = _(list).remove(); + result = _(list).remove(predicateFn); + result = _(list).remove(''); result = _(list).remove({a: 42}); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().remove(); result = _(array).chain().remove(predicateFn); result = _(array).chain().remove(''); result = _(array).chain().remove({a: 42}); - result = _(list).chain().remove(); - result = _(list).chain().remove(predicateFn); - result = _(list).chain().remove(''); + result = _(list).chain().remove(); + result = _(list).chain().remove(predicateFn); + result = _(list).chain().remove(''); result = _(list).chain().remove({a: 42}); } } // _.tail namespace TestTail { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; { - let result: TResult[]; + let result: AbcObject[]; - result = _.tail(array); - result = _.tail(list); + result = _.tail(array); + result = _.tail(list); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).tail(); - result = _(list).tail(); + result = _(list).tail(); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().tail(); - result = _(list).chain().tail(); + result = _(list).chain().tail(); } } // _.slice namespace TestSlice { - let array: TResult[] | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; { - let result: TResult[]; + let result: AbcObject[]; - result = _.slice(array); + result = _.slice(array); result = _.slice(array, 42); result = _.slice(array, 42, 42); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).slice(); result = _(array).slice(42); @@ -2205,7 +2205,7 @@ namespace TestSlice { } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().slice(); result = _(array).chain().slice(42); @@ -2399,386 +2399,386 @@ namespace TestSortedLastIndexBy { // _.take namespace TestTake { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; { - let result: TResult[]; + let result: AbcObject[]; - result = _.take(array); - result = _.take(array, 42); + result = _.take(array); + result = _.take(array, 42); - result = _.take(list); - result = _.take(list, 42); + result = _.take(list); + result = _.take(list, 42); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).take(); result = _(array).take(42); - result = _(list).take(); - result = _(list).take(42); + result = _(list).take(); + result = _(list).take(42); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().take(); result = _(array).chain().take(42); - result = _(list).chain().take(); - result = _(list).chain().take(42); + result = _(list).chain().take(); + result = _(list).chain().take(42); } } // _.takeRight namespace TestTakeRight { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; { - let result: TResult[]; + let result: AbcObject[]; - result = _.takeRight(array); - result = _.takeRight(array, 42); + result = _.takeRight(array); + result = _.takeRight(array, 42); - result = _.takeRight(list); - result = _.takeRight(list, 42); + result = _.takeRight(list); + result = _.takeRight(list, 42); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).takeRight(); result = _(array).takeRight(42); - result = _(list).takeRight(); - result = _(list).takeRight(42); + result = _(list).takeRight(); + result = _(list).takeRight(42); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().takeRight(); result = _(array).chain().takeRight(42); - result = _(list).chain().takeRight(); - result = _(list).chain().takeRight(42); + result = _(list).chain().takeRight(); + result = _(list).chain().takeRight(42); } } // _.takeRightWhile namespace TestTakeRightWhile { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let predicateFn = (value: TResult, index: number, collection: _.List) => true; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; + let predicateFn = (value: AbcObject, index: number, collection: _.List) => true; { - let result: TResult[]; + let result: AbcObject[]; - result = _.takeRightWhile(array); - result = _.takeRightWhile(array, predicateFn); - result = _.takeRightWhile(array, ''); + result = _.takeRightWhile(array); + result = _.takeRightWhile(array, predicateFn); + result = _.takeRightWhile(array, ''); result = _.takeRightWhile(array, {a: 42}); - result = _.takeRightWhile(list); - result = _.takeRightWhile(list, predicateFn); - result = _.takeRightWhile(list, ''); + result = _.takeRightWhile(list); + result = _.takeRightWhile(list, predicateFn); + result = _.takeRightWhile(list, ''); result = _.takeRightWhile(list, {a: 42}); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).takeRightWhile(); result = _(array).takeRightWhile(predicateFn); result = _(array).takeRightWhile(''); result = _(array).takeRightWhile({a: 42}); - result = _(list).takeRightWhile(); - result = _(list).takeRightWhile(predicateFn); - result = _(list).takeRightWhile(''); + result = _(list).takeRightWhile(); + result = _(list).takeRightWhile(predicateFn); + result = _(list).takeRightWhile(''); result = _(list).takeRightWhile({a: 42}); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().takeRightWhile(); result = _(array).chain().takeRightWhile(predicateFn); result = _(array).chain().takeRightWhile(''); result = _(array).chain().takeRightWhile({a: 42}); - result = _(list).chain().takeRightWhile(); - result = _(list).chain().takeRightWhile(predicateFn); - result = _(list).chain().takeRightWhile(''); + result = _(list).chain().takeRightWhile(); + result = _(list).chain().takeRightWhile(predicateFn); + result = _(list).chain().takeRightWhile(''); result = _(list).chain().takeRightWhile({a: 42}); } } // _.takeWhile namespace TestTakeWhile { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let predicateFn = (value: TResult, index: number, collection: _.List) => true; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; + let predicateFn = (value: AbcObject, index: number, collection: _.List) => true; { - let result: TResult[]; + let result: AbcObject[]; - result = _.takeWhile(array); - result = _.takeWhile(array, predicateFn); - result = _.takeWhile(array, ''); + result = _.takeWhile(array); + result = _.takeWhile(array, predicateFn); + result = _.takeWhile(array, ''); result = _.takeWhile(array, {a: 42}); - result = _.takeWhile(list); - result = _.takeWhile(list, predicateFn); - result = _.takeWhile(list, ''); + result = _.takeWhile(list); + result = _.takeWhile(list, predicateFn); + result = _.takeWhile(list, ''); result = _.takeWhile(list, {a: 42}); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).takeWhile(); result = _(array).takeWhile(predicateFn); result = _(array).takeWhile(''); result = _(array).takeWhile({a: 42}); - result = _(list).takeWhile(); - result = _(list).takeWhile(predicateFn); - result = _(list).takeWhile(''); + result = _(list).takeWhile(); + result = _(list).takeWhile(predicateFn); + result = _(list).takeWhile(''); result = _(list).takeWhile({a: 42}); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().takeWhile(); result = _(array).chain().takeWhile(predicateFn); result = _(array).chain().takeWhile(''); result = _(array).chain().takeWhile({a: 42}); - result = _(list).chain().takeWhile(); - result = _(list).chain().takeWhile(predicateFn); - result = _(list).chain().takeWhile(''); + result = _(list).chain().takeWhile(); + result = _(list).chain().takeWhile(predicateFn); + result = _(list).chain().takeWhile(''); result = _(list).chain().takeWhile({a: 42}); } } // _.union namespace TestUnion { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; { - let result: TResult[]; + let result: AbcObject[]; - result = _.union(); + result = _.union(); - result = _.union(array); - result = _.union(array, list); - result = _.union(array, list, array); + result = _.union(array); + result = _.union(array, list); + result = _.union(array, list, array); - result = _.union(list); - result = _.union(list, array); - result = _.union(list, array, list); + result = _.union(list); + result = _.union(list, array); + result = _.union(list, array, list); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).union(); result = _(array).union(list); result = _(array).union(list, array); - result = _(array).union(); - result = _(array).union(list); - result = _(array).union(list, array); + result = _(array).union(); + result = _(array).union(list); + result = _(array).union(list, array); - result = _(list).union(); - result = _(list).union(array); - result = _(list).union(array, list); + result = _(list).union(); + result = _(list).union(array); + result = _(list).union(array, list); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().union(); result = _(array).chain().union(list); result = _(array).chain().union(list, array); - result = _(array).chain().union(); - result = _(array).chain().union(list); - result = _(array).chain().union(list, array); + result = _(array).chain().union(); + result = _(array).chain().union(list); + result = _(array).chain().union(list, array); - result = _(list).chain().union(); - result = _(list).chain().union(array); - result = _(list).chain().union(array, list); + result = _(list).chain().union(); + result = _(list).chain().union(array); + result = _(list).chain().union(array, list); } } // _.unionBy namespace TestUnionBy { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let iteratee: (value: TResult) => any = (value: TResult) => 1; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; + let iteratee: (value: AbcObject) => any = (value: AbcObject) => 1; { - let result: TResult[]; + let result: AbcObject[]; - result = _.unionBy(array, array); - result = _.unionBy(array, list, array); - result = _.unionBy(array, array, list, array); - result = _.unionBy(array, list, array, list, array); - result = _.unionBy(array, array, list, array, list, array); + result = _.unionBy(array, array); + result = _.unionBy(array, list, array); + result = _.unionBy(array, array, list, array); + result = _.unionBy(array, list, array, list, array); + result = _.unionBy(array, array, list, array, list, array); - result = _.unionBy(array, array, iteratee); - result = _.unionBy(array, list, array, iteratee); - result = _.unionBy(array, array, list, array, iteratee); - result = _.unionBy(array, list, array, list, array, iteratee); - result = _.unionBy(array, array, list, array, list, array, iteratee); + result = _.unionBy(array, array, iteratee); + result = _.unionBy(array, list, array, iteratee); + result = _.unionBy(array, array, list, array, iteratee); + result = _.unionBy(array, list, array, list, array, iteratee); + result = _.unionBy(array, array, list, array, list, array, iteratee); - result = _.unionBy(array, array, 'a'); - result = _.unionBy(array, list, array, 'a'); - result = _.unionBy(array, array, list, array, 'a'); - result = _.unionBy(array, list, array, list, array, 'a'); - result = _.unionBy(array, array, list, array, list, array, 'a'); + result = _.unionBy(array, array, 'a'); + result = _.unionBy(array, list, array, 'a'); + result = _.unionBy(array, array, list, array, 'a'); + result = _.unionBy(array, list, array, list, array, 'a'); + result = _.unionBy(array, array, list, array, list, array, 'a'); result = _.unionBy(array, array, {a: 1}); result = _.unionBy(array, list, array, {a: 1}); result = _.unionBy(array, array, list, array, {a: 1}); result = _.unionBy(array, list, array, list, array, {a: 1}); - result = _.unionBy(array, list, array, list, array, list, {a: 1}); + result = _.unionBy(array, list, array, list, array, list, {a: 1}); - result = _.unionBy(list, list); - result = _.unionBy(list, array, list); - result = _.unionBy(list, list, array, list); - result = _.unionBy(list, array, list, array, list); - result = _.unionBy(list, list, array, list, array, list); + result = _.unionBy(list, list); + result = _.unionBy(list, array, list); + result = _.unionBy(list, list, array, list); + result = _.unionBy(list, array, list, array, list); + result = _.unionBy(list, list, array, list, array, list); - result = _.unionBy(list, list, iteratee); - result = _.unionBy(list, array, list, iteratee); - result = _.unionBy(list, list, array, list, iteratee); - result = _.unionBy(list, array, list, array, list, iteratee); - result = _.unionBy(list, list, array, list, array, list, iteratee); + result = _.unionBy(list, list, iteratee); + result = _.unionBy(list, array, list, iteratee); + result = _.unionBy(list, list, array, list, iteratee); + result = _.unionBy(list, array, list, array, list, iteratee); + result = _.unionBy(list, list, array, list, array, list, iteratee); - result = _.unionBy(list, list, 'a'); - result = _.unionBy(list, array, list, 'a'); - result = _.unionBy(list, list, array, list, 'a'); - result = _.unionBy(list, array, list, array, list, 'a'); - result = _.unionBy(list, list, array, list, array, list, 'a'); + result = _.unionBy(list, list, 'a'); + result = _.unionBy(list, array, list, 'a'); + result = _.unionBy(list, list, array, list, 'a'); + result = _.unionBy(list, array, list, array, list, 'a'); + result = _.unionBy(list, list, array, list, array, list, 'a'); result = _.unionBy(list, list, {a: 1}); result = _.unionBy(list, array, list, {a: 1}); result = _.unionBy(list, list, array, list, {a: 1}); result = _.unionBy(list, array, list, array, list, {a: 1}); - result = _.unionBy(list, array, list, array, list, array, {a: 1}); + result = _.unionBy(list, array, list, array, list, array, {a: 1}); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; - result = _(array).unionBy(array); - result = _(array).unionBy(list, array); - result = _(array).unionBy(array, list, array); - result = _(array).unionBy(list, array, list, array); - result = _(array).unionBy(array, list, array, list, array); + result = _(array).unionBy(array); + result = _(array).unionBy(list, array); + result = _(array).unionBy(array, list, array); + result = _(array).unionBy(list, array, list, array); + result = _(array).unionBy(array, list, array, list, array); - result = _(array).unionBy(array, iteratee); - result = _(array).unionBy(list, array, iteratee); - result = _(array).unionBy(array, list, array, iteratee); - result = _(array).unionBy(list, array, list, array, iteratee); - result = _(array).unionBy(array, list, array, list, array, iteratee); + result = _(array).unionBy(array, iteratee); + result = _(array).unionBy(list, array, iteratee); + result = _(array).unionBy(array, list, array, iteratee); + result = _(array).unionBy(list, array, list, array, iteratee); + result = _(array).unionBy(array, list, array, list, array, iteratee); - result = _(array).unionBy(array, 'a'); - result = _(array).unionBy(list, array, 'a'); - result = _(array).unionBy(array, list, array, 'a'); - result = _(array).unionBy(list, array, list, array, 'a'); - result = _(array).unionBy(array, list, array, list, array, 'a'); + result = _(array).unionBy(array, 'a'); + result = _(array).unionBy(list, array, 'a'); + result = _(array).unionBy(array, list, array, 'a'); + result = _(array).unionBy(list, array, list, array, 'a'); + result = _(array).unionBy(array, list, array, list, array, 'a'); result = _(array).unionBy(array, {a: 1}); result = _(array).unionBy(list, array, {a: 1}); result = _(array).unionBy(array, list, array, {a: 1}); result = _(array).unionBy(list, array, list, array, {a: 1}); - result = _(array).unionBy(list, array, list, array, list, {a: 1}); + result = _(array).unionBy(list, array, list, array, list, {a: 1}); - result = _(list).unionBy(list); - result = _(list).unionBy(array, list); - result = _(list).unionBy(list, array, list); - result = _(list).unionBy(array, list, array, list); - result = _(list).unionBy(list, array, list, array, list); + result = _(list).unionBy(list); + result = _(list).unionBy(array, list); + result = _(list).unionBy(list, array, list); + result = _(list).unionBy(array, list, array, list); + result = _(list).unionBy(list, array, list, array, list); - result = _(list).unionBy(list, iteratee); - result = _(list).unionBy(array, list, iteratee); - result = _(list).unionBy(list, array, list, iteratee); - result = _(list).unionBy(array, list, array, list, iteratee); - result = _(list).unionBy(list, array, list, array, list, iteratee); + result = _(list).unionBy(list, iteratee); + result = _(list).unionBy(array, list, iteratee); + result = _(list).unionBy(list, array, list, iteratee); + result = _(list).unionBy(array, list, array, list, iteratee); + result = _(list).unionBy(list, array, list, array, list, iteratee); - result = _(list).unionBy(list, 'a'); - result = _(list).unionBy(array, list, 'a'); - result = _(list).unionBy(list, array, list, 'a'); - result = _(list).unionBy(array, list, array, list, 'a'); - result = _(list).unionBy(list, array, list, array, list, 'a'); + result = _(list).unionBy(list, 'a'); + result = _(list).unionBy(array, list, 'a'); + result = _(list).unionBy(list, array, list, 'a'); + result = _(list).unionBy(array, list, array, list, 'a'); + result = _(list).unionBy(list, array, list, array, list, 'a'); result = _(list).unionBy(list, {a: 1}); result = _(list).unionBy(array, list, {a: 1}); result = _(list).unionBy(list, array, list, {a: 1}); result = _(list).unionBy(array, list, array, list, {a: 1}); - result = _(list).unionBy(array, list, array, list, array, {a: 1}); + result = _(list).unionBy(array, list, array, list, array, {a: 1}); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; - result = _(array).chain().unionBy(array); - result = _(array).chain().unionBy(list, array); - result = _(array).chain().unionBy(array, list, array); - result = _(array).chain().unionBy(list, array, list, array); - result = _(array).chain().unionBy(array, list, array, list, array); + result = _(array).chain().unionBy(array); + result = _(array).chain().unionBy(list, array); + result = _(array).chain().unionBy(array, list, array); + result = _(array).chain().unionBy(list, array, list, array); + result = _(array).chain().unionBy(array, list, array, list, array); - result = _(array).chain().unionBy(array, iteratee); - result = _(array).chain().unionBy(list, array, iteratee); - result = _(array).chain().unionBy(array, list, array, iteratee); - result = _(array).chain().unionBy(list, array, list, array, iteratee); - result = _(array).chain().unionBy(array, list, array, list, array, iteratee); + result = _(array).chain().unionBy(array, iteratee); + result = _(array).chain().unionBy(list, array, iteratee); + result = _(array).chain().unionBy(array, list, array, iteratee); + result = _(array).chain().unionBy(list, array, list, array, iteratee); + result = _(array).chain().unionBy(array, list, array, list, array, iteratee); - result = _(array).chain().unionBy(array, 'a'); - result = _(array).chain().unionBy(list, array, 'a'); - result = _(array).chain().unionBy(array, list, array, 'a'); - result = _(array).chain().unionBy(list, array, list, array, 'a'); - result = _(array).chain().unionBy(array, list, array, list, array, 'a'); + result = _(array).chain().unionBy(array, 'a'); + result = _(array).chain().unionBy(list, array, 'a'); + result = _(array).chain().unionBy(array, list, array, 'a'); + result = _(array).chain().unionBy(list, array, list, array, 'a'); + result = _(array).chain().unionBy(array, list, array, list, array, 'a'); result = _(array).chain().unionBy(array, {a: 1}); result = _(array).chain().unionBy(list, array, {a: 1}); result = _(array).chain().unionBy(array, list, array, {a: 1}); result = _(array).chain().unionBy(list, array, list, array, {a: 1}); - result = _(array).chain().unionBy(list, array, list, array, list, {a: 1}); + result = _(array).chain().unionBy(list, array, list, array, list, {a: 1}); - result = _(list).chain().unionBy(list); - result = _(list).chain().unionBy(array, list); - result = _(list).chain().unionBy(list, array, list); - result = _(list).chain().unionBy(array, list, array, list); - result = _(list).chain().unionBy(list, array, list, array, list); + result = _(list).chain().unionBy(list); + result = _(list).chain().unionBy(array, list); + result = _(list).chain().unionBy(list, array, list); + result = _(list).chain().unionBy(array, list, array, list); + result = _(list).chain().unionBy(list, array, list, array, list); - result = _(list).chain().unionBy(list, iteratee); - result = _(list).chain().unionBy(array, list, iteratee); - result = _(list).chain().unionBy(list, array, list, iteratee); - result = _(list).chain().unionBy(array, list, array, list, iteratee); - result = _(list).chain().unionBy(list, array, list, array, list, iteratee); + result = _(list).chain().unionBy(list, iteratee); + result = _(list).chain().unionBy(array, list, iteratee); + result = _(list).chain().unionBy(list, array, list, iteratee); + result = _(list).chain().unionBy(array, list, array, list, iteratee); + result = _(list).chain().unionBy(list, array, list, array, list, iteratee); - result = _(list).chain().unionBy(list, 'a'); - result = _(list).chain().unionBy(array, list, 'a'); - result = _(list).chain().unionBy(list, array, list, 'a'); - result = _(list).chain().unionBy(array, list, array, list, 'a'); - result = _(list).chain().unionBy(list, array, list, array, list, 'a'); + result = _(list).chain().unionBy(list, 'a'); + result = _(list).chain().unionBy(array, list, 'a'); + result = _(list).chain().unionBy(list, array, list, 'a'); + result = _(list).chain().unionBy(array, list, array, list, 'a'); + result = _(list).chain().unionBy(list, array, list, array, list, 'a'); result = _(list).chain().unionBy(list, {a: 1}); result = _(list).chain().unionBy(array, list, {a: 1}); result = _(list).chain().unionBy(list, array, list, {a: 1}); result = _(list).chain().unionBy(array, list, array, list, {a: 1}); - result = _(list).chain().unionBy(array, list, array, list, array, {a: 1}); + result = _(list).chain().unionBy(array, list, array, list, array, {a: 1}); } } @@ -3008,11 +3008,11 @@ namespace TestUnzip { 2: {0: true, 1: false, length: 2}, length: 3 }; - let nilArray: TResult[][] | null | undefined = [] as any; - let nilList: _.List<_.List> | null | undefined = [] as any; + let nilArray: AbcObject[][] | null | undefined = [] as any; + let nilList: _.List<_.List> | null | undefined = [] as any; { - let result: TResult[][]; + let result: AbcObject[][]; result = _.unzip(nilArray); result = _.unzip(nilList); @@ -3055,47 +3055,47 @@ namespace TestUnzip { } { - let result: TResult[]; + let result: AbcObject[]; result = _.unzipWith(testUnzipWithArray, (...group) => { group; // $ExpectType number[] - return any as TResult; + return anything as AbcObject; }); result = _.unzipWith(testUnzipWithArray, (value1, value2, value3) => { value1; // $ExpectType number value2; // $ExpectType number value3; // $ExpectType number - return any as TResult; + return anything as AbcObject; }); result = _.unzipWith(testUnzipWithList, (...group) => { group; // $ExpectType number[] - return any as TResult; + return anything as AbcObject; }); result = _.unzipWith(testUnzipWithList, (value1, value2, value3) => { value1; // $ExpectType number value2; // $ExpectType number value3; // $ExpectType number - return any as TResult; + return anything as AbcObject; }); - result = _(testUnzipWithArray).unzipWith((...group): TResult => { + result = _(testUnzipWithArray).unzipWith((...group): AbcObject => { group; // $ExpectType number[] - return any as TResult; + return anything as AbcObject; }).value(); result = _(testUnzipWithArray).unzipWith((value1, value2, value3) => { value1; // $ExpectType number value2; // $ExpectType number value3; // $ExpectType number - return any as TResult; + return anything as AbcObject; }).value(); - result = _(testUnzipWithList).unzipWith((...group): TResult => { + result = _(testUnzipWithList).unzipWith((...group): AbcObject => { group; // $ExpectType number[] - return any as TResult; + return anything as AbcObject; }).value(); result = _(testUnzipWithList).unzipWith((value1, value2, value3) => { value1; // $ExpectType number value2; // $ExpectType number value3; // $ExpectType number - return any as TResult; + return anything as AbcObject; }).value(); } } @@ -3149,83 +3149,100 @@ namespace TestWithout { // _.xor namespace TestXor { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; { - let result: TResult[]; + let result: AbcObject[]; - result = _.xor(); + result = _.xor(); - result = _.xor(array); - result = _.xor(array, list); - result = _.xor(array, list, array); + result = _.xor(array); + result = _.xor(array, list); + result = _.xor(array, list, array); - result = _.xor(list); - result = _.xor(list, array); - result = _.xor(list, array, list); + result = _.xor(list); + result = _.xor(list, array); + result = _.xor(list, array, list); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).xor(); result = _(array).xor(list); result = _(array).xor(list, array); - result = _(list).xor(); - result = _(list).xor(array); - result = _(list).xor(array, list); + result = _(list).xor(); + result = _(list).xor(array); + result = _(list).xor(array, list); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().xor(); result = _(array).chain().xor(list); result = _(array).chain().xor(list, array); - result = _(list).chain().xor(); - result = _(list).chain().xor(array); - result = _(list).chain().xor(array, list); + result = _(list).chain().xor(); + result = _(list).chain().xor(array); + result = _(list).chain().xor(array, list); } } // _.zip -namespace TestZip { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +{ + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; { - let result: TResult[][]; + // $ExpectType (AbcObject | undefined)[][] + _.zip(array); + // $ExpectType (AbcObject | undefined)[][] + _.zip(array, list); + // $ExpectType (AbcObject | undefined)[][] + _.zip(array, list, array); - result = _.zip(array); - result = _.zip(array, list); - result = _.zip(array, list, array); + // $ExpectType (AbcObject | undefined)[][] + _.zip(list); + // $ExpectType (AbcObject | undefined)[][] + _.zip(list, array); + // $ExpectType (AbcObject | undefined)[][] + _.zip(list, array, list); - result = _.zip(list); - result = _.zip(list, array); - result = _.zip(list, array, list); + // $ExpectType (AbcObject | undefined)[][] + _.zip(list, array, list, array, list, array); } { - let result: _.LoDashImplicitArrayWrapper; + // $ExpectType LoDashImplicitWrapper<(AbcObject | undefined)[][]> + _(array).zip(list); + // $ExpectType LoDashImplicitWrapper<(AbcObject | undefined)[][]> + _(array).zip(list, array); - result = _(array).zip(list); - result = _(array).zip(list, array); - - result = _(list).zip(array); - result = _(list).zip(array, list); + // $ExpectType LoDashImplicitWrapper<(AbcObject | undefined)[][]> + _(list).zip(array); + // $ExpectType LoDashImplicitWrapper<(AbcObject | undefined)[][]> + _(list).zip(array, list); } { - let result: _.LoDashExplicitArrayWrapper; + // $ExpectType LoDashExplicitWrapper<(AbcObject | undefined)[][]> + _(array).chain().zip(list); + // $ExpectType LoDashExplicitWrapper<(AbcObject | undefined)[][]> + _(array).chain().zip(list, array); - result = _(array).chain().zip(list); - result = _(array).chain().zip(list, array); + // $ExpectType LoDashExplicitWrapper<(AbcObject | undefined)[][]> + _(list).chain().zip(array); + // $ExpectType LoDashExplicitWrapper<(AbcObject | undefined)[][]> + _(list).chain().zip(array, list); + } - result = _(list).chain().zip(array); - result = _(list).chain().zip(array, list); + { + _.zip([1, 2], [3, 4]); // $ExpectType [number | undefined, number | undefined][] + _.zip([1, 2], ["a", "b"]); // $ExpectType [number | undefined, string | undefined][] + _.zip([1, 2], ["a", "b"], [true, false]); // $ExpectType [number | undefined, string | undefined, boolean | undefined][] } } @@ -3359,18 +3376,9 @@ namespace TestZipObject { } // _.zipWith -namespace TestZipWith { +{ type TestZipWithFn = (a1: number, a2: number) => number; - { - let result: number[][]; - result = _.zipWith([1, 2]); - result = _.zipWith([1, 2], [3, 4], [5, 6]); - result = _([1, 2]).zipWith().value(); - result = _([1, 2]).zipWith([3, 4], [5, 6]).value(); - result = _.chain([1, 2]).zipWith().value(); - result = _.chain([1, 2]).zipWith([3, 4], [5, 6]).value(); - } { let result: number[]; @@ -3511,6 +3519,19 @@ namespace TestZipWith { group; // $ExpectType number[] return 1; }).value(); + + result = _([1, 2]).zipWith(["a", "b"], (value1, value2) => { + value1; // $ExpectType number + value2; // $ExpectType string + return 1; + }).value(); + + result = _([1, 2]).zipWith(["a", "b"], [true, false], (value1, value2, value3) => { + value1; // $ExpectType number + value2; // $ExpectType string + value3; // $ExpectType boolean + return 1; + }).value(); } } @@ -3754,139 +3775,137 @@ namespace TestCommit { // _.prototype.concat namespace TestConcat { - { - let result: _.LoDashImplicitArrayWrapper; + const numberROA: ReadonlyArray = [0]; - result = _(1).concat(2); - result = _(1).concat(2, 3); - result = _(1).concat(2, 3, 4); + _.concat(1); // $ExpectType number[] + _.concat([1]); // $ExpectType number[] + _.concat(numberROA); // $ExpectType number[] + _.concat(1, 2); // $ExpectType number[] + _.concat(1, [1]); // $ExpectType number[] + _.concat(1, [1], numberROA); // $ExpectType number[] - result = _(1).concat(2); - result = _(1).concat(2, 3); - result = _(1).concat(2, 3, 4); - } + _(1).concat(2); // $ExpectType LoDashImplicitWrapper + _(1).concat([1]); // $ExpectType LoDashImplicitWrapper + _(1).concat([2], numberROA); // $ExpectType LoDashImplicitWrapper + _([1]).concat(2); // $ExpectType LoDashImplicitWrapper + _(numberROA).concat(numberROA); // $ExpectType LoDashImplicitWrapper + _(numberROA).concat(numberROA, numberROA); // $ExpectType LoDashImplicitWrapper - { - let result: _.LoDashImplicitArrayWrapper; + _.chain(1).concat(2); // $ExpectType LoDashExplicitWrapper + _.chain(1).concat([1]); // $ExpectType LoDashExplicitWrapper + _.chain(1).concat([2], numberROA); // $ExpectType LoDashExplicitWrapper + _.chain([1]).concat(2); // $ExpectType LoDashExplicitWrapper + _.chain(numberROA).concat(numberROA); // $ExpectType LoDashExplicitWrapper + _.chain(numberROA).concat(numberROA, numberROA); // $ExpectType LoDashExplicitWrapper - result = _(['']).concat(['']); - result = _(['']).concat([''], ['']); - result = _(['']).concat([''], [''], ['']); + const stringROA: ReadonlyArray = ['']; - result = _(['']).concat(['']); - result = _(['']).concat([''], ['']); - result = _(['']).concat([''], [''], ['']); - } + _.concat('a'); // $ExpectType string[] + _.concat(['a']); // $ExpectType string[] + _.concat(stringROA); // $ExpectType string[] + _.concat('a', 'b'); // $ExpectType string[] + _.concat('a', ['a']); // $ExpectType string[] + _.concat('a', ['a'], stringROA); // $ExpectType string[] - { - let result: _.LoDashImplicitArrayWrapper<{a: string}>; + _('a').concat('b'); // $ExpectType LoDashImplicitWrapper + _('a').concat(['a']); // $ExpectType LoDashImplicitWrapper + _('a').concat(['b'], stringROA); // $ExpectType LoDashImplicitWrapper + _(['a']).concat('b'); // $ExpectType LoDashImplicitWrapper + _(stringROA).concat(stringROA); // $ExpectType LoDashImplicitWrapper + _(stringROA).concat(stringROA, stringROA); // $ExpectType LoDashImplicitWrapper - result = _({a: ''}).concat<{a: string}>({a: ''}); - result = _({a: ''}).concat<{a: string}>({a: ''}, {a: ''}); - result = _({a: ''}).concat<{a: string}>({a: ''}, {a: ''}, {a: ''}); + _.chain('a').concat('b'); // $ExpectType LoDashExplicitWrapper + _.chain('a').concat(['a']); // $ExpectType LoDashExplicitWrapper + _.chain('a').concat(['b'], stringROA); // $ExpectType LoDashExplicitWrapper + _.chain(['a']).concat('b'); // $ExpectType LoDashExplicitWrapper + _.chain(stringROA).concat(stringROA); // $ExpectType LoDashExplicitWrapper + _.chain(stringROA).concat(stringROA, stringROA); // $ExpectType LoDashExplicitWrapper - result = _({a: ''}).concat({a: ''}); - result = _({a: ''}).concat({a: ''}, {a: ''}); - result = _({a: ''}).concat({a: ''}, {a: ''}, {a: ''}); - } + const abcObject: AbcObject = { a: 1, b: 'foo', c: true }; + const objectROA: ReadonlyArray = [{ a: 1, b: 'foo', c: true }]; - { - let result: _.LoDashExplicitArrayWrapper; + _.concat(abcObject); // $ExpectType AbcObject[] + _.concat([abcObject]); // $ExpectType AbcObject[] + _.concat(objectROA); // $ExpectType AbcObject[] + _.concat(abcObject, abcObject); // $ExpectType AbcObject[] + _.concat(abcObject, [abcObject]); // $ExpectType AbcObject[] + _.concat(abcObject, [abcObject], objectROA); // $ExpectType AbcObject[] - result = _(1).chain().concat(2); - result = _(1).chain().concat(2, 3); - result = _(1).chain().concat(2, 3, 4); + _(abcObject).concat(abcObject); // $ExpectType LoDashImplicitWrapper + _(abcObject).concat([abcObject]); // $ExpectType LoDashImplicitWrapper + _(abcObject).concat([abcObject], objectROA); // $ExpectType LoDashImplicitWrapper + _([abcObject]).concat(abcObject); // $ExpectType LoDashImplicitWrapper + _(objectROA).concat(objectROA); // $ExpectType LoDashImplicitWrapper + _(objectROA).concat(objectROA, objectROA); // $ExpectType LoDashImplicitWrapper - result = _(1).chain().concat(2); - result = _(1).chain().concat(2, 3); - result = _(1).chain().concat(2, 3, 4); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(['']).chain().concat(['']); - result = _(['']).chain().concat([''], ['']); - result = _(['']).chain().concat([''], [''], ['']); - - result = _(['']).chain().concat(['']); - result = _(['']).chain().concat([''], ['']); - result = _(['']).chain().concat([''], [''], ['']); - } - - { - let result: _.LoDashExplicitArrayWrapper<{a: string}>; - - result = _({a: ''}).chain().concat<{a: string}>({a: ''}); - result = _({a: ''}).chain().concat<{a: string}>({a: ''}, {a: ''}); - result = _({a: ''}).chain().concat<{a: string}>({a: ''}, {a: ''}, {a: ''}); - - result = _({a: ''}).chain().concat({a: ''}); - result = _({a: ''}).chain().concat({a: ''}, {a: ''}); - result = _({a: ''}).chain().concat({a: ''}, {a: ''}, {a: ''}); - } + _.chain(abcObject).concat(abcObject); // $ExpectType LoDashExplicitWrapper + _.chain(abcObject).concat([abcObject]); // $ExpectType LoDashExplicitWrapper + _.chain(abcObject).concat([abcObject], objectROA); // $ExpectType LoDashExplicitWrapper + _.chain([abcObject]).concat(abcObject); // $ExpectType LoDashExplicitWrapper + _.chain(objectROA).concat(objectROA); // $ExpectType LoDashExplicitWrapper + _.chain(objectROA).concat(objectROA, objectROA); // $ExpectType LoDashExplicitWrapper } // _.prototype.plant namespace TestPlant { { let result: _.LoDashImplicitWrapper; - result = _(any).plant(42); + result = _(anything).plant(42); } { let result: _.LoDashImplicitStringWrapper; - result = _(any).plant(''); + result = _(anything).plant(''); } { let result: _.LoDashImplicitWrapper; - result = _(any).plant(true); + result = _(anything).plant(true); } { let result: _.LoDashImplicitNumberArrayWrapper; - result = _(any).plant([42]); + result = _(anything).plant([42]); } { let result: _.LoDashImplicitArrayWrapper; - result = _(any).plant([]); + result = _(anything).plant([]); } { let result: _.LoDashImplicitWrapper<{}>; - result = _(any).plant<{}>({}); + result = _(anything).plant<{}>({}); } { let result: _.LoDashExplicitWrapper; - result = _(any).chain().plant(42); + result = _(anything).chain().plant(42); } { let result: _.LoDashExplicitStringWrapper; - result = _(any).chain().plant(''); + result = _(anything).chain().plant(''); } { let result: _.LoDashExplicitWrapper; - result = _(any).chain().plant(true); + result = _(anything).chain().plant(true); } { let result: _.LoDashExplicitNumberArrayWrapper; - result = _(any).chain().plant([42]); + result = _(anything).chain().plant([42]); } { let result: _.LoDashExplicitArrayWrapper; - result = _(any).chain().plant([]); + result = _(anything).chain().plant([]); } { let result: _.LoDashExplicitWrapper<{}>; - result = _(any).chain().plant<{}>({}); + result = _(anything).chain().plant<{}>({}); } } @@ -4040,47 +4059,47 @@ namespace TestValueOf { // _.at namespace TestAt { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let dictionary: _.Dictionary | null | undefined = any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; + let dictionary: _.Dictionary | null | undefined = anything; { - let result: TResult[]; + let result: AbcObject[]; - result = _.at(array, 0, '1', [2], ['3'], [4, '5']); - result = _.at(list, 0, '1', [2], ['3'], [4, '5']); - result = _.at(dictionary, 0, '1', [2], ['3'], [4, '5']); + result = _.at(array, 0, '1', [2], ['3'], [4, '5']); + result = _.at(list, 0, '1', [2], ['3'], [4, '5']); + result = _.at(dictionary, 0, '1', [2], ['3'], [4, '5']); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).at(0, '1', [2], ['3'], [4, '5']); - result = _(list).at(0, '1', [2], ['3'], [4, '5']); - result = _(dictionary).at(0, '1', [2], ['3'], [4, '5']); + result = _(list).at(0, '1', [2], ['3'], [4, '5']); + result = _(dictionary).at(0, '1', [2], ['3'], [4, '5']); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().at(0, '1', [2], ['3'], [4, '5']); - result = _(list).chain().at(0, '1', [2], ['3'], [4, '5']); - result = _(dictionary).chain().at(0, '1', [2], ['3'], [4, '5']); + result = _(list).chain().at(0, '1', [2], ['3'], [4, '5']); + result = _(dictionary).chain().at(0, '1', [2], ['3'], [4, '5']); } } // _.countBy namespace TestCountBy { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - let numericDictionary: _.NumericDictionary | null | undefined = obj; + let dictionary: _.Dictionary | null | undefined = obj; + let numericDictionary: _.NumericDictionary | null | undefined = obj; let stringIterator: (value: string, index: number, collection: string) => any = (value: string, index: number, collection: string) => 1; - let listIterator: (value: TResult, index: number, collection: _.List) => any = (value: TResult, index: number, collection: _.List) => 1; - let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary) => any = (value: TResult, key: string, collection: _.Dictionary) => 1; - let numericDictionaryIterator: (value: TResult, key: number, collection: _.NumericDictionary) => any = (value: TResult, key: number, collection: _.NumericDictionary) => 1; + let listIterator: (value: AbcObject, index: number, collection: _.List) => any = (value: AbcObject, index: number, collection: _.List) => 1; + let dictionaryIterator: (value: AbcObject, key: string, collection: _.Dictionary) => any = (value: AbcObject, key: string, collection: _.Dictionary) => 1; + let numericDictionaryIterator: (value: AbcObject, key: number, collection: _.NumericDictionary) => any = (value: AbcObject, key: number, collection: _.NumericDictionary) => 1; { let result: _.Dictionary; @@ -4088,29 +4107,29 @@ namespace TestCountBy { result = _.countBy(''); result = _.countBy('', stringIterator); - result = _.countBy(array); - result = _.countBy(array, listIterator); - result = _.countBy(array, ''); + result = _.countBy(array); + result = _.countBy(array, listIterator); + result = _.countBy(array, ''); result = _.countBy(array, {a: 42}); - result = _.countBy(array, {a: 42}); + result = _.countBy(array, {a: 42}); - result = _.countBy(list); - result = _.countBy(list, listIterator); - result = _.countBy(list, ''); + result = _.countBy(list); + result = _.countBy(list, listIterator); + result = _.countBy(list, ''); result = _.countBy(list, {a: 42}); - result = _.countBy(list, {a: 42}); + result = _.countBy(list, {a: 42}); - result = _.countBy(dictionary); + result = _.countBy(dictionary); result = _.countBy(dictionary, dictionaryIterator); - result = _.countBy(dictionary, ''); + result = _.countBy(dictionary, ''); result = _.countBy(dictionary, {a: 42}); - result = _.countBy(dictionary, {a: 42}); + result = _.countBy(dictionary, {a: 42}); - result = _.countBy(numericDictionary); - result = _.countBy(numericDictionary, numericDictionaryIterator); - result = _.countBy(numericDictionary, ''); + result = _.countBy(numericDictionary); + result = _.countBy(numericDictionary, numericDictionaryIterator); + result = _.countBy(numericDictionary, ''); result = _.countBy(numericDictionary, {a: 42}); - result = _.countBy(numericDictionary, {a: 42}); + result = _.countBy(numericDictionary, {a: 42}); } { @@ -4126,7 +4145,7 @@ namespace TestCountBy { result = _(array).countBy({a: 42}); result = _(list).countBy(); - result = _(list).countBy(listIterator); + result = _(list).countBy(listIterator); result = _(list).countBy(''); result = _(list).countBy<{a: number}>({a: 42}); result = _(list).countBy({a: 42}); @@ -4138,7 +4157,7 @@ namespace TestCountBy { result = _(dictionary).countBy({a: 42}); result = _(numericDictionary).countBy(); - result = _(numericDictionary).countBy(numericDictionaryIterator); + result = _(numericDictionary).countBy(numericDictionaryIterator); result = _(numericDictionary).countBy(''); result = _(numericDictionary).countBy<{a: number}>({a: 42}); result = _(numericDictionary).countBy({a: 42}); @@ -4157,7 +4176,7 @@ namespace TestCountBy { result = _(array).chain().countBy({a: 42}); result = _(list).chain().countBy(); - result = _(list).chain().countBy(listIterator); + result = _(list).chain().countBy(listIterator); result = _(list).chain().countBy(''); result = _(list).chain().countBy<{a: number}>({a: 42}); result = _(list).chain().countBy({a: 42}); @@ -4169,7 +4188,7 @@ namespace TestCountBy { result = _(dictionary).chain().countBy({a: 42}); result = _(numericDictionary).chain().countBy(); - result = _(numericDictionary).chain().countBy(numericDictionaryIterator); + result = _(numericDictionary).chain().countBy(numericDictionaryIterator); result = _(numericDictionary).chain().countBy(''); result = _(numericDictionary).chain().countBy<{a: number}>({a: 42}); result = _(numericDictionary).chain().countBy({a: 42}); @@ -4178,16 +4197,16 @@ namespace TestCountBy { // _.each namespace TestEach { - let array: TResult[] = []; - let list: _.List = []; - let dictionary: _.Dictionary = {}; - let nilArray: TResult[] | null | undefined = [] as any; - let nilList: _.List | null | undefined = [] as any; - let nilDictionary: _.Dictionary | null | undefined = any; + let array: AbcObject[] = []; + let list: _.List = []; + let dictionary: _.Dictionary = {}; + let nilArray: AbcObject[] | null | undefined = [] as any; + let nilList: _.List | null | undefined = [] as any; + let nilDictionary: _.Dictionary | null | undefined = anything; let stringIterator: (char: string, index: number, string: string) => any = (char: string, index: number, string: string) => 1; - let listIterator: (value: TResult, index: number, collection: _.List) => any = (value: TResult, index: number, collection: _.List) => 1; - let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary) => any = (value: TResult, key: string, collection: _.Dictionary) => 1; + let listIterator: (value: AbcObject, index: number, collection: _.List) => any = (value: AbcObject, index: number, collection: _.List) => 1; + let dictionaryIterator: (value: AbcObject, key: string, collection: _.Dictionary) => any = (value: AbcObject, key: string, collection: _.Dictionary) => 1; { let result: string; @@ -4202,37 +4221,37 @@ namespace TestEach { } { - let result: TResult[]; + let result: AbcObject[]; result = _.each(array, listIterator); } { - let result: TResult[] | null | undefined; + let result: AbcObject[] | null | undefined; result = _.each(nilArray, listIterator); } { - let result: _.List; + let result: _.List; result = _.each(list, listIterator); } { - let result: _.List | null | undefined; + let result: _.List | null | undefined; result = _.each(nilList, listIterator); } { - let result: _.Dictionary; + let result: _.Dictionary; result = _.each(dictionary, dictionaryIterator); } { - let result: _.Dictionary | null | undefined; + let result: _.Dictionary | null | undefined; result = _.each(nilDictionary, dictionaryIterator); } @@ -4244,19 +4263,19 @@ namespace TestEach { } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).each(listIterator); } { - let result: _.LoDashImplicitObjectWrapper<_.List>; + let result: _.LoDashImplicitObjectWrapper<_.List>; - result = _(list).each(listIterator); + result = _(list).each(listIterator); } { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; result = _(dictionary).each(dictionaryIterator); } @@ -4268,19 +4287,19 @@ namespace TestEach { } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().each(listIterator); } { - let result: _.LoDashExplicitObjectWrapper<_.List>; + let result: _.LoDashExplicitObjectWrapper<_.List>; - result = _(list).chain().each(listIterator); + result = _(list).chain().each(listIterator); } { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; result = _(dictionary).chain().each(dictionaryIterator); } @@ -4288,16 +4307,16 @@ namespace TestEach { // _.eachRight namespace TestEachRight { - let array: TResult[] = []; - let list: _.List = []; - let dictionary: _.Dictionary = {}; - let nilArray: TResult[] | null | undefined = [] as any; - let nilList: _.List | null | undefined = [] as any; - let nilDictionary: _.Dictionary | null | undefined = any; + let array: AbcObject[] = []; + let list: _.List = []; + let dictionary: _.Dictionary = {}; + let nilArray: AbcObject[] | null | undefined = [] as any; + let nilList: _.List | null | undefined = [] as any; + let nilDictionary: _.Dictionary | null | undefined = anything; let stringIterator: (char: string, index: number, string: string) => any = (char: string, index: number, string: string) => 1; - let listIterator: (value: TResult, index: number, collection: _.List) => any = (value: TResult, index: number, collection: _.List) => 1; - let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary) => any = (value: TResult, key: string, collection: _.Dictionary) => 1; + let listIterator: (value: AbcObject, index: number, collection: _.List) => any = (value: AbcObject, index: number, collection: _.List) => 1; + let dictionaryIterator: (value: AbcObject, key: string, collection: _.Dictionary) => any = (value: AbcObject, key: string, collection: _.Dictionary) => 1; { let result: string; @@ -4312,37 +4331,37 @@ namespace TestEachRight { } { - let result: TResult[]; + let result: AbcObject[]; result = _.eachRight(array, listIterator); } { - let result: TResult[] | null | undefined; + let result: AbcObject[] | null | undefined; result = _.eachRight(nilArray, listIterator); } { - let result: _.List; + let result: _.List; result = _.eachRight(list, listIterator); } { - let result: _.List | null | undefined; + let result: _.List | null | undefined; result = _.eachRight(nilList, listIterator); } { - let result: _.Dictionary; + let result: _.Dictionary; result = _.eachRight(dictionary, dictionaryIterator); } { - let result: _.Dictionary | null | undefined; + let result: _.Dictionary | null | undefined; result = _.eachRight(nilDictionary, dictionaryIterator); } @@ -4354,19 +4373,19 @@ namespace TestEachRight { } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).eachRight(listIterator); } { - let result: _.LoDashImplicitObjectWrapper<_.List>; + let result: _.LoDashImplicitObjectWrapper<_.List>; - result = _(list).eachRight(listIterator); + result = _(list).eachRight(listIterator); } { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; result = _(dictionary).eachRight(dictionaryIterator); } @@ -4378,19 +4397,19 @@ namespace TestEachRight { } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().eachRight(listIterator); } { - let result: _.LoDashExplicitObjectWrapper<_.List>; + let result: _.LoDashExplicitObjectWrapper<_.List>; - result = _(list).chain().eachRight(listIterator); + result = _(list).chain().eachRight(listIterator); } { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; result = _(dictionary).chain().eachRight(dictionaryIterator); } @@ -4493,14 +4512,14 @@ namespace TestEvery { // _.filter namespace TestFilter { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; + let dictionary: _.Dictionary | null | undefined = obj; let stringIterator = (char: string, index: number, string: string) => true; - let listIterator = (value: TResult, index: number, collection: _.List) => true; - let dictionaryIterator = (value: TResult, key: string, collection: _.Dictionary) => true; + let listIterator = (value: AbcObject, index: number, collection: _.List) => true; + let dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => true; { let result: string[]; @@ -4509,17 +4528,17 @@ namespace TestFilter { } { - let result: TResult[]; + let result: AbcObject[]; - result = _.filter(array, listIterator); - result = _.filter(array, ''); - result = _.filter(array, {a: 42}); - result = _.filter(array, ["a", 42]); + result = _.filter(array, listIterator); + result = _.filter(array, ''); + result = _.filter(array, {a: 42}); + result = _.filter(array, ["a", 42]); - result = _.filter(list, listIterator); - result = _.filter(list, ''); - result = _.filter(list, {a: 42}); - result = _.filter(list, ["a", 42]); + result = _.filter(list, listIterator); + result = _.filter(list, ''); + result = _.filter(list, {a: 42}); + result = _.filter(list, ["a", 42]); result = _.filter(dictionary, dictionaryIterator); result = _.filter(dictionary, ''); @@ -4534,17 +4553,17 @@ namespace TestFilter { } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).filter(listIterator); result = _(array).filter(''); result = _(array).filter({a: 42}); result = _(array).filter(["a", 42]); - result = _(list).filter(listIterator); - result = _(list).filter(''); - result = _(list).filter({a: 42}); - result = _(list).filter(["a", 42]); + result = _(list).filter(listIterator); + result = _(list).filter(''); + result = _(list).filter({a: 42}); + result = _(list).filter(["a", 42]); result = _(dictionary).filter(dictionaryIterator); result = _(dictionary).filter(''); @@ -4559,17 +4578,17 @@ namespace TestFilter { } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().filter(listIterator); result = _(array).chain().filter(''); result = _(array).chain().filter({a: 42}); result = _(array).chain().filter(["a", 42]); - result = _(list).chain().filter(listIterator); - result = _(list).chain().filter(''); - result = _(list).chain().filter({a: 42}); - result = _(list).chain().filter(["a", 42]); + result = _(list).chain().filter(listIterator); + result = _(list).chain().filter(''); + result = _(list).chain().filter({a: 42}); + result = _(list).chain().filter(["a", 42]); result = _(dictionary).chain().filter(dictionaryIterator); result = _(dictionary).chain().filter(''); @@ -4579,8 +4598,8 @@ namespace TestFilter { { // Test filtering with type guard - let a2: Array | null | undefined = any; - let d2: _.Dictionary | null | undefined = any; + let a2: Array | null | undefined = anything; + let d2: _.Dictionary | null | undefined = anything; _.filter(a2, (item: string | number): item is number => typeof item === "number"); // $ExpectType number[] _.filter(d2, (item: string | number): item is number => typeof item === "number"); // $ExpectType number[] @@ -4593,35 +4612,35 @@ namespace TestFilter { // _.find namespace TestFind { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; + let dictionary: _.Dictionary | null | undefined = obj; - let listIterator = (value: TResult, index: number, collection: _.List) => true; - let dictionaryIterator = (value: TResult, key: string, collection: _.Dictionary) => true; + let listIterator = (value: AbcObject, index: number, collection: _.List) => true; + let dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => true; - let result: TResult | undefined; + let result: AbcObject | undefined; result = _.find(array); - result = _.find(array); - result = _.find(array, listIterator); - result = _.find(array, listIterator, 1); - result = _.find(array, ''); - result = _.find(array, '', 1); - result = _.find(array, {a: 42}); - result = _.find(array, {a: 42}, 1); + result = _.find(array); + result = _.find(array, listIterator); + result = _.find(array, listIterator, 1); + result = _.find(array, ''); + result = _.find(array, '', 1); + result = _.find(array, {a: 42}); + result = _.find(array, {a: 42}, 1); result = _.find(array, ['a', 5]); result = _.find(array, ['a', 5], 1); result = _.find(list); - result = _.find(list); - result = _.find(list, listIterator); - result = _.find(list, listIterator, 1); - result = _.find(list, ''); - result = _.find(list, '', 1); - result = _.find(list, {a: 42}); - result = _.find(list, {a: 42}, 1); + result = _.find(list); + result = _.find(list, listIterator); + result = _.find(list, listIterator, 1); + result = _.find(list, ''); + result = _.find(list, '', 1); + result = _.find(list, {a: 42}); + result = _.find(list, {a: 42}, 1); result = _.find(list, ['a', 5]); result = _.find(list, ['a', 5], 1); @@ -4646,15 +4665,15 @@ namespace TestFind { result = _(array).find(['a', 5]); result = _(array).find(['a', 5], 1); - result = _(list).find(); - result = _(list).find(listIterator); - result = _(list).find(listIterator, 1); - result = _(list).find(''); - result = _(list).find('', 1); - result = _(list).find({a: 42}); - result = _(list).find({a: 42}, 1); - result = _(list).find(['a', 5]); - result = _(list).find(['a', 5], 1); + result = _(list).find(); + result = _(list).find(listIterator); + result = _(list).find(listIterator, 1); + result = _(list).find(''); + result = _(list).find('', 1); + result = _(list).find({a: 42}); + result = _(list).find({a: 42}, 1); + result = _(list).find(['a', 5]); + result = _(list).find(['a', 5], 1); result = _(dictionary).find(); result = _(dictionary).find(dictionaryIterator); @@ -4666,41 +4685,41 @@ namespace TestFind { result = _(dictionary).find(['a', 5]); result = _(dictionary).find(['a', 5], 1); - result = _.find([any as TResult, null, undefined], (value: TResult | null | undefined): value is TResult | undefined => value !== null); - result = _([any as TResult, null, undefined]).find((value: TResult | null | undefined): value is TResult | undefined => value !== null); + result = _.find([anything as AbcObject, null, undefined], (value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null); + result = _([anything as AbcObject, null, undefined]).find((value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null); } // _.findLast namespace TestFindLast { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; + let dictionary: _.Dictionary | null | undefined = obj; - let listIterator = (value: TResult, index: number, collection: _.List) => true; - let dictionaryIterator = (value: TResult, key: string, collection: _.Dictionary) => true; + let listIterator = (value: AbcObject, index: number, collection: _.List) => true; + let dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => true; - let result: TResult | undefined; + let result: AbcObject | undefined; result = _.findLast(array); - result = _.findLast(array); - result = _.findLast(array, listIterator); - result = _.findLast(array, listIterator, 1); - result = _.findLast(array, ''); - result = _.findLast(array, '', 1); - result = _.findLast(array, {a: 42}); - result = _.findLast(array, {a: 42}, 1); + result = _.findLast(array); + result = _.findLast(array, listIterator); + result = _.findLast(array, listIterator, 1); + result = _.findLast(array, ''); + result = _.findLast(array, '', 1); + result = _.findLast(array, {a: 42}); + result = _.findLast(array, {a: 42}, 1); result = _.findLast(array, ['a', 5]); result = _.findLast(array, ['a', 5], 1); result = _.findLast(list); - result = _.findLast(list); - result = _.findLast(list, listIterator); - result = _.findLast(list, listIterator, 1); - result = _.findLast(list, ''); - result = _.findLast(list, '', 1); - result = _.findLast(list, {a: 42}); - result = _.findLast(list, {a: 42}, 1); + result = _.findLast(list); + result = _.findLast(list, listIterator); + result = _.findLast(list, listIterator, 1); + result = _.findLast(list, ''); + result = _.findLast(list, '', 1); + result = _.findLast(list, {a: 42}); + result = _.findLast(list, {a: 42}, 1); result = _.findLast(list, ['a', 5]); result = _.findLast(list, ['a', 5], 1); @@ -4725,15 +4744,15 @@ namespace TestFindLast { result = _(array).findLast(['a', 5]); result = _(array).findLast(['a', 5], 1); - result = _(list).findLast(); - result = _(list).findLast(listIterator); - result = _(list).findLast(listIterator, 1); - result = _(list).findLast(''); - result = _(list).findLast('', 1); - result = _(list).findLast({a: 42}); - result = _(list).findLast({a: 42}, 1); - result = _(list).findLast(['a', 5]); - result = _(list).findLast(['a', 5], 1); + result = _(list).findLast(); + result = _(list).findLast(listIterator); + result = _(list).findLast(listIterator, 1); + result = _(list).findLast(''); + result = _(list).findLast('', 1); + result = _(list).findLast({a: 42}); + result = _(list).findLast({a: 42}, 1); + result = _(list).findLast(['a', 5]); + result = _(list).findLast(['a', 5], 1); result = _(dictionary).findLast(); result = _(dictionary).findLast(dictionaryIterator); @@ -4745,8 +4764,8 @@ namespace TestFindLast { result = _(dictionary).findLast(['a', 5]); result = _(dictionary).findLast(['a', 5], 1); - result = _.findLast([any as TResult, null, undefined], (value: TResult | null | undefined): value is TResult | undefined => value !== null); - result = _([any as TResult, null, undefined]).findLast((value: TResult | null | undefined): value is TResult | undefined => value !== null); + result = _.findLast([anything as AbcObject, null, undefined], (value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null); + result = _([anything as AbcObject, null, undefined]).findLast((value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null); } // _.flatMap @@ -4938,14 +4957,14 @@ namespace TestFlatMapDeep { let numArray: Array | null | undefined = [1, [2, 3]] as any; let objArray: Array<{a: number}|Array<{a: number}>> | null | undefined = [{a: 1}, [{a: 2}, {a: 3}]] as any; - let numList: _.List | null | undefined = any; - let objList: _.List<{a: number}|Array<{a: number}>> | null | undefined = any; + let numList: _.List | null | undefined = anything; + let objList: _.List<{a: number}|Array<{a: number}>> | null | undefined = anything; - let numDictionary: _.Dictionary | null | undefined = any; - let objDictionary: _.Dictionary<{a: number}|Array<{a: number}>> | null | undefined = any; + let numDictionary: _.Dictionary | null | undefined = anything; + let objDictionary: _.Dictionary<{a: number}|Array<{a: number}>> | null | undefined = anything; - let numNumericDictionary: _.NumericDictionary | null | undefined = any; - let objNumericDictionary: _.NumericDictionary<{a: number}|Array<{a: number}>> | null | undefined = any; + let numNumericDictionary: _.NumericDictionary | null | undefined = anything; + let objNumericDictionary: _.NumericDictionary<{a: number}|Array<{a: number}>> | null | undefined = anything; let stringIterator: (value: string, index: number, collection: _.List) => _.ListOfRecursiveArraysOrValues = (a, b, c) => ['a', 'b', 'c']; @@ -5099,14 +5118,14 @@ namespace TestFlatMapDepth { let numArray: Array | null | undefined = [1, [2, 3]] as any; let objArray: Array<{a: number}|Array<{a: number}>> | null | undefined = [{a: 1}, [{a: 2}, {a: 3}]] as any; - let numList: _.List | null | undefined = any; - let objList: _.List<{a: number}|Array<{a: number}>> | null | undefined = any; + let numList: _.List | null | undefined = anything; + let objList: _.List<{a: number}|Array<{a: number}>> | null | undefined = anything; - let numDictionary: _.Dictionary | null | undefined = any; - let objDictionary: _.Dictionary<{a: number}|Array<{a: number}>> | null | undefined = any; + let numDictionary: _.Dictionary | null | undefined = anything; + let objDictionary: _.Dictionary<{a: number}|Array<{a: number}>> | null | undefined = anything; - let numNumericDictionary: _.NumericDictionary | null | undefined = any; - let objNumericDictionary: _.NumericDictionary<{a: number}|Array<{a: number}>> | null | undefined = any; + let numNumericDictionary: _.NumericDictionary | null | undefined = anything; + let objNumericDictionary: _.NumericDictionary<{a: number}|Array<{a: number}>> | null | undefined = anything; let stringIterator: (value: string, index: number, collection: _.List) => _.ListOfRecursiveArraysOrValues = (a, b, c) => ""; @@ -5257,16 +5276,16 @@ namespace TestFlatMapDepth { // _.forEach namespace TestForEach { - let array: TResult[] = []; - let list: _.List = []; - let dictionary: _.Dictionary = {}; - let nilArray: TResult[] | null | undefined = [] as any; - let nilList: _.List | null | undefined = [] as any; - let nilDictionary: _.Dictionary | null | undefined = any; + let array: AbcObject[] = []; + let list: _.List = []; + let dictionary: _.Dictionary = {}; + let nilArray: AbcObject[] | null | undefined = [] as any; + let nilList: _.List | null | undefined = [] as any; + let nilDictionary: _.Dictionary | null | undefined = anything; - let listIterator: (value: TResult, index: number, collection: _.List) => any = (value, index, collection) => 1; - let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary) => any = (value, key, collection) => 1; - let objectIterator: (value: number | string | boolean, key: string, collection: TResult) => any = (value, key, collection) => 1; + let listIterator: (value: AbcObject, index: number, collection: _.List) => any = (value, index, collection) => 1; + let dictionaryIterator: (value: AbcObject, key: string, collection: _.Dictionary) => any = (value, key, collection) => 1; + let objectIterator: (value: number | string | boolean, key: string, collection: AbcObject) => any = (value, key, collection) => 1; { let result: string; @@ -5289,77 +5308,77 @@ namespace TestForEach { } { - let result: TResult[]; - result = _.forEach(array, (value, index, collection: ArrayLike) => { - value; // $ExpectType TResult + let result: AbcObject[]; + result = _.forEach(array, (value, index, collection: ArrayLike) => { + value; // $ExpectType AbcObject index; // $ExpectType number }); result = _.forEach(array, (value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType number - collection; // $ExpectType TResult[] + collection; // $ExpectType AbcObject[] }); } { - let result: TResult[] | null | undefined; + let result: AbcObject[] | null | undefined; - result = _.forEach(array, (value, index, collection: ArrayLike) => { - value; // $ExpectType TResult + result = _.forEach(array, (value, index, collection: ArrayLike) => { + value; // $ExpectType AbcObject index; // $ExpectType number }); result = _.forEach(nilArray, (value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType number - collection; // $ExpectType TResult[] + collection; // $ExpectType AbcObject[] }); } { - let result: _.List; + let result: _.List; result = _.forEach(list, (value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType number - collection; // $ExpectType ArrayLike + collection; // $ExpectType ArrayLike }); } { - let result: _.List | null | undefined; + let result: _.List | null | undefined; result = _.forEach(nilList, (value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType number - collection; // $ExpectType ArrayLike + collection; // $ExpectType ArrayLike }); } { - let result: _.Dictionary; + let result: _.Dictionary; result = _.forEach(dictionary, (value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType string - collection; // $ExpectType Dictionary + collection; // $ExpectType Dictionary }); } { - let result: _.Dictionary | null | undefined; + let result: _.Dictionary | null | undefined; result = _.forEach(nilDictionary, (value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType string - collection; // $ExpectType Dictionary + collection; // $ExpectType Dictionary }); } { - let sample1: TResult = any; + let sample1: AbcObject = anything; sample1 = _.forEach(sample1, objectIterator); - let sample2: TResult | null | undefined = any; + let sample2: AbcObject | null | undefined = anything; sample2 = _.forEach(sample2, objectIterator); } @@ -5374,45 +5393,45 @@ namespace TestForEach { } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).forEach((value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType number - collection; // $ExpectType TResult[] + collection; // $ExpectType AbcObject[] }); } { - let result: _.LoDashImplicitNillableArrayWrapper; + let result: _.LoDashImplicitNillableArrayWrapper; result = _(nilArray).forEach((value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType number - collection; // $ExpectType TResult[] + collection; // $ExpectType AbcObject[] }); } { - let result: _.LoDashImplicitObjectWrapper<_.List>; + let result: _.LoDashImplicitObjectWrapper<_.List>; - result = _(list).forEach(listIterator); + result = _(list).forEach(listIterator); } { - let result: _.LoDashImplicitNillableObjectWrapper<_.List>; + let result: _.LoDashImplicitNillableObjectWrapper<_.List>; - result = _(nilList).forEach(listIterator); + result = _(nilList).forEach(listIterator); } { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; result = _(dictionary).forEach(dictionaryIterator); } { - let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; + let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; result = _(nilDictionary).forEach(dictionaryIterator); } @@ -5428,45 +5447,45 @@ namespace TestForEach { } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().forEach((value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType number - collection; // $ExpectType TResult[] + collection; // $ExpectType AbcObject[] }); } { - let result: _.LoDashExplicitNillableArrayWrapper; + let result: _.LoDashExplicitNillableArrayWrapper; result = _(nilArray).chain().forEach((value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType number - collection; // $ExpectType TResult[] + collection; // $ExpectType AbcObject[] }); } { - let result: _.LoDashExplicitObjectWrapper<_.List>; + let result: _.LoDashExplicitObjectWrapper<_.List>; - result = _(list).chain().forEach(listIterator); + result = _(list).chain().forEach(listIterator); } { - let result: _.LoDashExplicitNillableObjectWrapper<_.List>; + let result: _.LoDashExplicitNillableObjectWrapper<_.List>; - result = _(nilList).chain().forEach(listIterator); + result = _(nilList).chain().forEach(listIterator); } { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; result = _(dictionary).chain().forEach(dictionaryIterator); } { - let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; + let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; result = _(nilDictionary).chain().forEach(dictionaryIterator); } @@ -5474,15 +5493,15 @@ namespace TestForEach { // _.forEachRight namespace TestForEachRight { - let array: TResult[] = []; - let list: _.List = []; - let dictionary: _.Dictionary = {}; - let nilArray: TResult[] | null | undefined = [] as any; - let nilList: _.List | null | undefined = [] as any; - let nilDictionary: _.Dictionary | null | undefined = any; + let array: AbcObject[] = []; + let list: _.List = []; + let dictionary: _.Dictionary = {}; + let nilArray: AbcObject[] | null | undefined = [] as any; + let nilList: _.List | null | undefined = [] as any; + let nilDictionary: _.Dictionary | null | undefined = anything; - let listIterator: (value: TResult, index: number, collection: _.List) => any = (value: TResult, index: number, collection: _.List) => 1; - let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary) => any = (value: TResult, key: string, collection: _.Dictionary) => 1; + let listIterator: (value: AbcObject, index: number, collection: _.List) => any = (value: AbcObject, index: number, collection: _.List) => 1; + let dictionaryIterator: (value: AbcObject, key: string, collection: _.Dictionary) => any = (value: AbcObject, key: string, collection: _.Dictionary) => 1; { let result: string; @@ -5505,62 +5524,62 @@ namespace TestForEachRight { } { - let result: TResult[]; + let result: AbcObject[]; result = _.forEachRight(array, (value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType number - collection; // $ExpectType TResult[] + collection; // $ExpectType AbcObject[] }); } { - let result: TResult[] | null | undefined; + let result: AbcObject[] | null | undefined; result = _.forEachRight(nilArray, (value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType number - collection; // $ExpectType TResult[] + collection; // $ExpectType AbcObject[] }); } { - let result: _.List; + let result: _.List; result = _.forEachRight(list, (value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType number - collection; // $ExpectType ArrayLike + collection; // $ExpectType ArrayLike }); } { - let result: _.List | null | undefined; + let result: _.List | null | undefined; result = _.forEachRight(nilList, (value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType number - collection; // $ExpectType ArrayLike + collection; // $ExpectType ArrayLike }); } { - let result: _.Dictionary; + let result: _.Dictionary; result = _.forEachRight(dictionary, (value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType string - collection; // $ExpectType Dictionary + collection; // $ExpectType Dictionary }); } { - let result: _.Dictionary | null | undefined; + let result: _.Dictionary | null | undefined; result = _.forEachRight(nilDictionary, (value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType string - collection; // $ExpectType Dictionary + collection; // $ExpectType Dictionary }); } @@ -5575,37 +5594,37 @@ namespace TestForEachRight { } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).forEachRight(listIterator); } { - let result: _.LoDashImplicitNillableArrayWrapper; + let result: _.LoDashImplicitNillableArrayWrapper; result = _(nilArray).forEachRight(listIterator); } { - let result: _.LoDashImplicitObjectWrapper<_.List>; + let result: _.LoDashImplicitObjectWrapper<_.List>; - result = _(list).forEachRight(listIterator); + result = _(list).forEachRight(listIterator); } { - let result: _.LoDashImplicitNillableObjectWrapper<_.List>; + let result: _.LoDashImplicitNillableObjectWrapper<_.List>; - result = _(nilList).forEachRight(listIterator); + result = _(nilList).forEachRight(listIterator); } { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; result = _(dictionary).forEachRight(dictionaryIterator); } { - let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; + let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; result = _(nilDictionary).forEachRight(dictionaryIterator); } @@ -5621,45 +5640,45 @@ namespace TestForEachRight { } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().forEachRight((value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType number - collection; // $ExpectType TResult[] + collection; // $ExpectType AbcObject[] }); } { - let result: _.LoDashExplicitNillableArrayWrapper; + let result: _.LoDashExplicitNillableArrayWrapper; result = _(nilArray).chain().forEachRight((value, index, collection) => { - value; // $ExpectType TResult + value; // $ExpectType AbcObject index; // $ExpectType number - collection; // $ExpectType TResult[] + collection; // $ExpectType AbcObject[] }); } { - let result: _.LoDashExplicitObjectWrapper<_.List>; + let result: _.LoDashExplicitObjectWrapper<_.List>; result = _(list).chain().forEachRight(listIterator); } { - let result: _.LoDashExplicitNillableObjectWrapper<_.List>; + let result: _.LoDashExplicitNillableObjectWrapper<_.List>; - result = _(nilList).chain().forEachRight(listIterator); + result = _(nilList).chain().forEachRight(listIterator); } { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; result = _(dictionary).chain().forEachRight(dictionaryIterator); } { - let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; + let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; result = _(nilDictionary).chain().forEachRight(dictionaryIterator); } @@ -6051,18 +6070,18 @@ namespace TestMap { let obj: any = {}; let dictionary: _.Dictionary | null | undefined = obj; - let listIterator: (value: number, index: number, collection: _.List) => TResult = (value: number, index: number, collection: _.List) => ({ a: 1, b: "", c: true }); - let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => TResult = (value: number, key: string, collection: _.Dictionary) => ({ a: 1, b: "", c: true }); + let listIterator: (value: number, index: number, collection: _.List) => AbcObject = (value: number, index: number, collection: _.List) => ({ a: 1, b: "", c: true }); + let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => AbcObject = (value: number, key: string, collection: _.Dictionary) => ({ a: 1, b: "", c: true }); { _.map(array); // $ExpectType number[] - _.map(array, listIterator); // $ExpectType TResult[] + _.map(array, listIterator); // $ExpectType AbcObject[] _.map(list); // $ExpectType number[] - _.map(list, listIterator); // $ExpectType TResult[] + _.map(list, listIterator); // $ExpectType AbcObject[] _.map(dictionary); // $ExpectType number[] - _.map(dictionary, dictionaryIterator); // $ExpectType TResult[] + _.map(dictionary, dictionaryIterator); // $ExpectType AbcObject[] } { @@ -6074,13 +6093,13 @@ namespace TestMap { { _(array).map().value(); // $ExpectType number[] - _(array).map(listIterator).value(); // $ExpectType TResult[] + _(array).map(listIterator).value(); // $ExpectType AbcObject[] _(list).map().value(); // $ExpectType number[] - _(list).map(listIterator).value(); // $ExpectType TResult[] + _(list).map(listIterator).value(); // $ExpectType AbcObject[] _(dictionary).map().value(); // $ExpectType number[] - _(dictionary).map(dictionaryIterator).value(); // $ExpectType TResult[] + _(dictionary).map(dictionaryIterator).value(); // $ExpectType AbcObject[] } { @@ -6091,13 +6110,13 @@ namespace TestMap { { _(array).chain().map().value(); // $ExpectType number[] - _(array).chain().map(listIterator).value(); // $ExpectType TResult[] + _(array).chain().map(listIterator).value(); // $ExpectType AbcObject[] _(list).chain().map().value(); // $ExpectType number[] - _(list).chain().map(listIterator).value(); // $ExpectType TResult[] + _(list).chain().map(listIterator).value(); // $ExpectType AbcObject[] _(dictionary).chain().map().value(); // $ExpectType number[] - _(dictionary).chain().map(dictionaryIterator).value(); // $ExpectType TResult[] + _(dictionary).chain().map(dictionaryIterator).value(); // $ExpectType AbcObject[] } { @@ -6132,7 +6151,7 @@ namespace TestPartition { { let result: any[][]; - result = _.partition(any, (n) => { + result = _.partition(anything, (n) => { n; // $ExpectType any return n < 'c'; }); @@ -6183,7 +6202,7 @@ namespace TestPartition { { let result: _.LoDashImplicitWrapper; - result = _(any).partition((n) => { + result = _(anything).partition((n) => { n; // $ExpectType any return n < 'c'; }); @@ -6228,7 +6247,7 @@ namespace TestPartition { { let result: _.LoDashExplicitWrapper; - result = _.chain(any).partition((n) => { + result = _.chain(anything).partition((n) => { n; // $ExpectType any return n < 'c'; }); @@ -6275,7 +6294,7 @@ namespace TestPartition { // _.map with iteratee shorthand // module TestMapInsteadOfPluck { // interface SampleObject { -// d: {b: TResult}[]; +// d: {b: AbcObject}[]; // } // // let array: SampleObject[] = []; @@ -6296,42 +6315,42 @@ namespace TestPartition { // } // // { -// let result: TResult[]; +// let result: AbcObject[]; // -// result = _.map(array, 'd.0.b'); -// result = _.map(array, ['d', 0, 'b']); +// result = _.map(array, 'd.0.b'); +// result = _.map(array, ['d', 0, 'b']); // -// result = _.map(list, 'd.0.b'); -// result = _.map(list, ['d', 0, 'b']); +// result = _.map(list, 'd.0.b'); +// result = _.map(list, ['d', 0, 'b']); // -// result = _.map(dictionary, 'd.0.b'); -// result = _.map(dictionary, ['d', 0, 'b']); +// result = _.map(dictionary, 'd.0.b'); +// result = _.map(dictionary, ['d', 0, 'b']); // } // // { -// let result: _.LoDashImplicitArrayWrapper; +// let result: _.LoDashImplicitArrayWrapper; // -// result = _(array).map('d.0.b'); -// result = _(array).map(['d', 0, 'b']); +// result = _(array).map('d.0.b'); +// result = _(array).map(['d', 0, 'b']); // -// result = _(list).map('d.0.b'); -// result = _(list).map(['d', 0, 'b']); +// result = _(list).map('d.0.b'); +// result = _(list).map(['d', 0, 'b']); // -// result = _(dictionary).map('d.0.b'); -// result = _(dictionary).map(['d', 0, 'b']); +// result = _(dictionary).map('d.0.b'); +// result = _(dictionary).map(['d', 0, 'b']); // } // // { -// let result: _.LoDashExplicitArrayWrapper; +// let result: _.LoDashExplicitArrayWrapper; // -// result = _(array).chain().map('d.0.b'); -// result = _(array).chain().map(['d', 0, 'b']); +// result = _(array).chain().map('d.0.b'); +// result = _(array).chain().map(['d', 0, 'b']); // -// result = _(list).chain().map('d.0.b'); -// result = _(list).chain().map(['d', 0, 'b']); +// result = _(list).chain().map('d.0.b'); +// result = _(list).chain().map(['d', 0, 'b']); // -// result = _(dictionary).chain().map('d.0.b'); -// result = _(dictionary).chain().map(['d', 0, 'b']); +// result = _(dictionary).chain().map('d.0.b'); +// result = _(dictionary).chain().map(['d', 0, 'b']); // } // } namespace TestReduce { @@ -6375,14 +6394,14 @@ namespace TestReduce { // _.reject namespace TestReject { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; + let dictionary: _.Dictionary | null | undefined = obj; let stringIterator = (char: string, index: number, string: string) => true; - let listIterator = (value: TResult, index: number, collection: _.List) => true; - let dictionaryIterator = (value: TResult, key: string, collection: _.Dictionary) => true; + let listIterator = (value: AbcObject, index: number, collection: _.List) => true; + let dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => true; { let result: string[]; @@ -6391,14 +6410,14 @@ namespace TestReject { } { - let result: TResult[]; + let result: AbcObject[]; - result = _.reject(array, listIterator); - result = _.reject(array, ''); + result = _.reject(array, listIterator); + result = _.reject(array, ''); result = _.reject(array, {a: 42}); - result = _.reject(list, listIterator); - result = _.reject(list, ''); + result = _.reject(list, listIterator); + result = _.reject(list, ''); result = _.reject(list, {a: 42}); result = _.reject(dictionary, dictionaryIterator); @@ -6413,14 +6432,14 @@ namespace TestReject { } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).reject(listIterator); result = _(array).reject(''); result = _(array).reject({a: 42}); - result = _(list).reject(listIterator); - result = _(list).reject(''); + result = _(list).reject(listIterator); + result = _(list).reject(''); result = _(list).reject({a: 42}); result = _(dictionary).reject(dictionaryIterator); @@ -6435,14 +6454,14 @@ namespace TestReject { } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().reject(listIterator); result = _(array).chain().reject(''); result = _(array).chain().reject({a: 42}); - result = _(list).chain().reject(listIterator); - result = _(list).chain().reject(''); + result = _(list).chain().reject(listIterator); + result = _(list).chain().reject(''); result = _(list).chain().reject({a: 42}); result = _(dictionary).chain().reject(dictionaryIterator); @@ -6554,10 +6573,10 @@ namespace TestSampleSize { // _.shuffle namespace TestShuffle { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; + let dictionary: _.Dictionary | null | undefined = obj; { let result: string[]; @@ -6566,10 +6585,10 @@ namespace TestShuffle { } { - let result: TResult[]; + let result: AbcObject[]; - result = _.shuffle(array); - result = _.shuffle(list); + result = _.shuffle(array); + result = _.shuffle(list); result = _.shuffle(dictionary); } @@ -6580,10 +6599,10 @@ namespace TestShuffle { } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).shuffle(); - result = _(list).shuffle(); + result = _(list).shuffle(); result = _(dictionary).shuffle(); } @@ -6594,10 +6613,10 @@ namespace TestShuffle { } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().shuffle(); - result = _(list).chain().shuffle(); + result = _(list).chain().shuffle(); result = _(dictionary).chain().shuffle(); } } @@ -6752,22 +6771,22 @@ namespace TestSome { result = _(sampleObject).chain().some(objectIterator); result = _(sampleObject).chain().some('a'); result = _(sampleObject).chain().some(['a', 42]); - result = _(sampleObject).chain().some({a: 42}); + result = _(sampleObject).chain().some({a: 42}); } } // _.sortBy namespace TestSortBy { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; + let dictionary: _.Dictionary | null | undefined = obj; - let listIterator = (value: TResult, index: number, collection: _.List) => 0; - let dictionaryIterator = (value: TResult, key: string, collection: _.Dictionary) => 0; + let listIterator = (value: AbcObject, index: number, collection: _.List) => 0; + let dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => 0; { - let result: TResult[]; + let result: AbcObject[]; result = _.sortBy(array); result = _.sortBy(array, listIterator); @@ -6786,7 +6805,7 @@ namespace TestSortBy { } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).sortBy(); result = _(array).sortBy(listIterator); @@ -6805,7 +6824,7 @@ namespace TestSortBy { } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().sortBy(); result = _(array).chain().sortBy(listIterator); @@ -6834,14 +6853,14 @@ _(foodsOrganic).sortBy('organic', (food) => food.name, { organic: true }).value( namespace TestorderBy { type SampleObject = {a: number; b: string; c: boolean}; - const array: SampleObject[] | null | undefined = any; - const list: _.List | null | undefined = any; - const numericDictionary: _.NumericDictionary | null | undefined = any; - const dictionary: _.Dictionary | null | undefined = any; - const orders: boolean|string|Array = any; + const array: SampleObject[] | null | undefined = anything; + const list: _.List | null | undefined = anything; + const numericDictionary: _.NumericDictionary | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + const orders: boolean|string|Array = anything; { - let iteratees: ((value: string) => any)|Array<(value: string) => any> = any; + let iteratees: ((value: string) => any)|Array<(value: string) => any> = anything; let result: string[]; result = _.orderBy('acbd', iteratees); @@ -6849,7 +6868,7 @@ namespace TestorderBy { } { - const iteratees: ((value: SampleObject) => _.NotVoid)|string|_.PartialDeep|Array<((value: SampleObject) => _.NotVoid)|string|_.PartialDeep> = any; + const iteratees: ((value: SampleObject) => _.NotVoid)|string|_.PartialDeep|Array<((value: SampleObject) => _.NotVoid)|string|_.PartialDeep> = anything; let result: SampleObject[]; result = _.orderBy(array, iteratees); @@ -6874,7 +6893,7 @@ namespace TestorderBy { } { - const iteratees: ((value: SampleObject) => _.NotVoid)|string|_.PartialDeep|Array<((value: SampleObject) => _.NotVoid)|string|_.PartialDeep> = any; + const iteratees: ((value: SampleObject) => _.NotVoid)|string|_.PartialDeep|Array<((value: SampleObject) => _.NotVoid)|string|_.PartialDeep> = anything; let result: _.LoDashImplicitArrayWrapper; result = _(array).orderBy(iteratees); @@ -6897,7 +6916,7 @@ namespace TestorderBy { } { - const iteratees: ((value: SampleObject) => _.NotVoid)|string|_.PartialDeep|Array<((value: SampleObject) => _.NotVoid)|string|_.PartialDeep> = any; + const iteratees: ((value: SampleObject) => _.NotVoid)|string|_.PartialDeep|Array<((value: SampleObject) => _.NotVoid)|string|_.PartialDeep> = anything; let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().orderBy(iteratees); @@ -7037,8 +7056,8 @@ namespace TestBind { let result: SampleResult; - result = _.bind(func, any); - result = _.bind(func, any); + result = _.bind(func, anything); + result = _.bind(func, anything); } { @@ -7046,8 +7065,8 @@ namespace TestBind { let result: SampleResult; - result = _.bind(func, any, 42); - result = _.bind(func, any, 42); + result = _.bind(func, anything, 42); + result = _.bind(func, anything, 42); } { @@ -7055,8 +7074,8 @@ namespace TestBind { let result: SampleResult; - result = _.bind(func, any, 42, ''); - result = _.bind(func, any, 42, ''); + result = _.bind(func, anything, 42, ''); + result = _.bind(func, anything, 42, ''); } { @@ -7064,7 +7083,7 @@ namespace TestBind { let result: _.LoDashImplicitObjectWrapper; - result = _(func).bind(any); + result = _(func).bind(anything); } { @@ -7072,7 +7091,7 @@ namespace TestBind { let result: _.LoDashImplicitObjectWrapper; - result = _(func).bind(any, 42); + result = _(func).bind(anything, 42); } { @@ -7080,7 +7099,7 @@ namespace TestBind { let result: _.LoDashImplicitObjectWrapper; - result = _(func).bind(any, 42, ''); + result = _(func).bind(anything, 42, ''); } { @@ -7088,7 +7107,7 @@ namespace TestBind { let result: _.LoDashExplicitObjectWrapper; - result = _(func).chain().bind(any); + result = _(func).chain().bind(anything); } { @@ -7096,7 +7115,7 @@ namespace TestBind { let result: _.LoDashExplicitWrapper; - result = _(func).chain().bind(any, 42); + result = _(func).chain().bind(anything, 42); } { @@ -7104,7 +7123,7 @@ namespace TestBind { let result: _.LoDashExplicitWrapper; - result = _(func).chain().bind(any, 42, ''); + result = _(func).chain().bind(anything, 42, ''); } } @@ -7328,27 +7347,27 @@ namespace TestDefer { let result: number; result = _.defer(func); - result = _.defer(func, any); - result = _.defer(func, any, any); - result = _.defer(func, any, any, any); + result = _.defer(func, anything); + result = _.defer(func, anything, anything); + result = _.defer(func, anything, anything, anything); } { let result: _.LoDashImplicitWrapper; result = _(func).defer(); - result = _(func).defer(any); - result = _(func).defer(any, any); - result = _(func).defer(any, any, any); + result = _(func).defer(anything); + result = _(func).defer(anything, anything); + result = _(func).defer(anything, anything, anything); } { let result: _.LoDashExplicitWrapper; result = _(func).chain().defer(); - result = _(func).chain().defer(any); - result = _(func).chain().defer(any, any); - result = _(func).chain().defer(any, any, any); + result = _(func).chain().defer(anything); + result = _(func).chain().defer(anything, anything); + result = _(func).chain().defer(anything, anything, anything); } } @@ -8115,15 +8134,15 @@ namespace TestEq { { let result: boolean; - result = _.eq(any, any); + result = _.eq(anything, anything); - result = _(any).eq(any); + result = _(anything).eq(anything); } { let result: _.LoDashExplicitWrapper; - result = _(any).chain().eq(any); + result = _(anything).chain().eq(anything); } } @@ -8132,18 +8151,18 @@ namespace TestGt { { let result: boolean; - result = _.gt(any, any); - result = _(1).gt(any); - result = _([]).gt(any); - result = _({}).gt(any); + result = _.gt(anything, anything); + result = _(1).gt(anything); + result = _([]).gt(anything); + result = _({}).gt(anything); } { let result: _.LoDashExplicitWrapper; - result = _(1).chain().gt(any); - result = _([]).chain().gt(any); - result = _({}).chain().gt(any); + result = _(1).chain().gt(anything); + result = _([]).chain().gt(anything); + result = _({}).chain().gt(anything); } } @@ -8152,18 +8171,18 @@ namespace TestGte { { let result: boolean; - result = _.gte(any, any); - result = _(1).gte(any); - result = _([]).gte(any); - result = _({}).gte(any); + result = _.gte(anything, anything); + result = _(1).gte(anything); + result = _([]).gte(anything); + result = _({}).gte(anything); } { let result: _.LoDashExplicitWrapper; - result = _(1).chain().gte(any); - result = _([]).chain().gte(any); - result = _({}).chain().gte(any); + result = _(1).chain().gte(anything); + result = _([]).chain().gte(anything); + result = _({}).chain().gte(anything); } } @@ -8183,7 +8202,7 @@ namespace TestisArguments { { let result: boolean; - result = _.isArguments(any); + result = _.isArguments(anything); result = _(1).isArguments(); result = _([]).isArguments(); result = _({}).isArguments(); @@ -8201,7 +8220,7 @@ namespace TestisArguments { // _.isArray namespace TestIsArray { { - let value: number|string[]|boolean[] = any; + let value: number|string[]|boolean[] = anything; if (_.isArray(value)) { value; // $ExpectType string[] | boolean[] @@ -8214,7 +8233,7 @@ namespace TestIsArray { { let result: boolean; - result = _.isArray(any); + result = _.isArray(anything); result = _(1).isArray(); result = _([]).isArray(); result = _({}).isArray(); @@ -8232,7 +8251,7 @@ namespace TestIsArray { // _.isArrayBuffer namespace TestIsArrayBuffer { { - let value: ArrayBuffer|number = any; + let value: ArrayBuffer|number = anything; if (_.isArrayBuffer(value)) { value; // $ExpectType ArrayBuffer @@ -8245,7 +8264,7 @@ namespace TestIsArrayBuffer { { let result: boolean; - result = _.isArrayBuffer(any); + result = _.isArrayBuffer(anything); result = _(1).isArrayBuffer(); result = _([]).isArrayBuffer(); result = _({}).isArrayBuffer(); @@ -8265,7 +8284,7 @@ namespace TestIsArrayLike { { let value: string | string[] | { [index: number]: boolean, length: number } | [number, boolean] | number | { length: string } | { a: string } | null | undefined - = any; + = anything; if (_.isArrayLike(value)) { let result: string | string[] | { [index: number]: boolean, length: number } | [number, boolean] = value; @@ -8275,7 +8294,7 @@ namespace TestIsArrayLike { } { - let value: boolean[] = any; + let value: boolean[] = anything; if (_.isArrayLike(value)) { let result: boolean[] = value; @@ -8286,7 +8305,7 @@ namespace TestIsArrayLike { } { - let value: () => number = any; + let value: () => number = anything; if (_.isArrayLike(value)) { value; // $ExpectType never @@ -8296,7 +8315,7 @@ namespace TestIsArrayLike { } { - let value: { a: string } = any; + let value: { a: string } = anything; if (_.isArrayLike(value)) { let result: { a: string, length: number } = value; @@ -8307,7 +8326,7 @@ namespace TestIsArrayLike { } { - let value: any = any; + let value: any = anything; if (_.isArrayLike(value)) { value; // $ExpectType any @@ -8320,7 +8339,7 @@ namespace TestIsArrayLike { { let result: boolean; - result = _.isArrayLike(any); + result = _.isArrayLike(anything); result = _(1).isArrayLike(); result = _([]).isArrayLike(); result = _({}).isArrayLike(); @@ -8340,7 +8359,7 @@ namespace TestIsArrayLikeObject { { let value: string[] | { [index: number]: boolean, length: number } | [number, boolean] | number | string | { length: string } | { a: string } | null | undefined - = any; + = anything; if (_.isArrayLikeObject(value)) { let result: string[] | { [index: number]: boolean, length: number } | [number, boolean] = value; @@ -8350,7 +8369,7 @@ namespace TestIsArrayLikeObject { } { - let value: boolean[] = any; + let value: boolean[] = anything; if (_.isArrayLikeObject(value)) { let result: boolean[] = value; @@ -8361,7 +8380,7 @@ namespace TestIsArrayLikeObject { } { - let value: (a: string) => boolean = any; + let value: (a: string) => boolean = anything; if (_.isArrayLikeObject(value)) { value; // $ExpectType never @@ -8371,7 +8390,7 @@ namespace TestIsArrayLikeObject { } { - let value: { a: string } = any; + let value: { a: string } = anything; if (_.isArrayLikeObject(value)) { let result: { a: string, length: number } = value; @@ -8382,7 +8401,7 @@ namespace TestIsArrayLikeObject { } { - let value: any = any; + let value: any = anything; if (_.isArrayLikeObject(value)) { value; // $ExpectType any @@ -8395,7 +8414,7 @@ namespace TestIsArrayLikeObject { { let result: boolean; - result = _.isArrayLikeObject(any); + result = _.isArrayLikeObject(anything); result = _(1).isArrayLikeObject(); result = _([]).isArrayLikeObject(); result = _({}).isArrayLikeObject(); @@ -8426,7 +8445,7 @@ namespace TestIsBoolean { { let result: boolean; - result = _.isBoolean(any); + result = _.isBoolean(anything); result = _(1).isBoolean(); result = _([]).isBoolean(); result = _({}).isBoolean(); @@ -8446,7 +8465,7 @@ namespace TestIsBuffer { { let result: boolean; - result = _.isBuffer(any); + result = _.isBuffer(anything); result = _(1).isBuffer(); result = _([]).isBuffer(); result = _({}).isBuffer(); @@ -8477,7 +8496,7 @@ namespace TestIsBuffer { { let result: boolean; - result = _.isDate(any); + result = _.isDate(anything); result = _(42).isDate(); result = _([]).isDate(); result = _({}).isDate(); @@ -8497,7 +8516,7 @@ namespace TestIsElement { { let result: boolean; - result = _.isElement(any); + result = _.isElement(anything); result = _(42).isElement(); result = _([]).isElement(); @@ -8518,7 +8537,7 @@ namespace TestIsEmpty { { let result: boolean; - result = _.isEmpty(any); + result = _.isEmpty(anything); result = _(1).isEmpty(); result = _('').isEmpty(); result = _([]).isEmpty(); @@ -8542,15 +8561,15 @@ namespace TestIsEqual { { let result: boolean; - result = _.isEqual(any, any); + result = _.isEqual(anything, anything); - result = _(any).isEqual(any); + result = _(anything).isEqual(anything); } { let result: _.LoDashExplicitWrapper; - result = _(any).chain().isEqual(any); + result = _(anything).chain().isEqual(anything); } } @@ -8561,15 +8580,15 @@ namespace TestIsEqualWith { { let result: boolean; - result = _.isEqualWith(any, any, customizer); + result = _.isEqualWith(anything, anything, customizer); - result = _(any).isEqualWith(any, customizer); + result = _(anything).isEqualWith(anything, customizer); } { let result: _.LoDashExplicitWrapper; - result = _(any).chain().isEqualWith(any, customizer); + result = _(anything).chain().isEqualWith(anything, customizer); } } @@ -8605,7 +8624,7 @@ namespace TestIsError { { let result: boolean; - result = _.isError(any); + result = _.isError(anything); result = _(1).isError(); result = _([]).isError(); result = _({}).isError(); @@ -8625,7 +8644,7 @@ namespace TestIsFinite { { let result: boolean; - result = _.isFinite(any); + result = _.isFinite(anything); result = _(1).isFinite(); result = _([]).isFinite(); result = _({}).isFinite(); @@ -8643,7 +8662,7 @@ namespace TestIsFinite { // _.isFunction namespace TestIsFunction { { - let value: number|(() => void) = any; + let value: number|(() => void) = anything; if (_.isFunction(value)) { value; // $ExpectType () => void @@ -8652,15 +8671,15 @@ namespace TestIsFunction { value; // $ExpectType number } - if (_.isFunction(any)) { - any(); + if (_.isFunction(anything)) { + anything(); } } { let result: boolean; - result = _.isFunction(any); + result = _.isFunction(anything); result = _(1).isFunction(); result = _([]).isFunction(); result = _({}).isFunction(); @@ -8680,7 +8699,7 @@ namespace TestIsInteger { { let result: boolean; - result = _.isInteger(any); + result = _.isInteger(anything); result = _(1).isInteger(); result = _([]).isInteger(); @@ -8701,7 +8720,7 @@ namespace TestIsLength { { let result: boolean; - result = _.isLength(any); + result = _.isLength(anything); result = _(1).isLength(); result = _([]).isLength(); @@ -8733,7 +8752,7 @@ namespace TestIsMap { { let result: boolean; - result = _.isMap(any); + result = _.isMap(anything); result = _(1).isMap(); result = _([]).isMap(); result = _({}).isMap(); @@ -8769,7 +8788,7 @@ namespace TestIsNaN { { let result: boolean; - result = _.isNaN(any); + result = _.isNaN(anything); result = _(1).isNaN(); result = _([]).isNaN(); @@ -8788,7 +8807,7 @@ namespace TestIsNaN { // _.isNative namespace TestIsNative { { - let value: number|(() => void) = any; + let value: number|(() => void) = anything; if (_.isNative(value)) { value; // $ExpectType () => void @@ -8801,7 +8820,7 @@ namespace TestIsNative { { let result: boolean; - result = _.isNative(any); + result = _.isNative(anything); result = _(1).isNative(); result = _([]).isNative(); @@ -8822,7 +8841,7 @@ namespace TestIsNil { { let result: boolean; - result = _.isNil(any); + result = _.isNil(anything); result = _(1).isNil(); result = _([]).isNil(); @@ -8843,7 +8862,7 @@ namespace TestIsNull { { let result: boolean; - result = _.isNull(any); + result = _.isNull(anything); result = _(1).isNull(); result = _([]).isNull(); @@ -8875,7 +8894,7 @@ namespace TestIsNumber { { let result: boolean; - result = _.isNumber(any); + result = _.isNumber(anything); result = _(1).isNumber(); result = _([]).isNumber(); @@ -8896,7 +8915,7 @@ namespace TestIsObject { { let result: boolean; - result = _.isObject(any); + result = _.isObject(anything); result = _(1).isObject(); result = _([]).isObject(); result = _({}).isObject(); @@ -8916,7 +8935,7 @@ namespace TestIsObjectLike { { let result: boolean; - result = _.isObjectLike(any); + result = _.isObjectLike(anything); result = _(1).isObjectLike(); result = _([]).isObjectLike(); result = _({}).isObjectLike(); @@ -8936,7 +8955,7 @@ namespace TestIsPlainObject { { let result: boolean; - result = _.isPlainObject(any); + result = _.isPlainObject(anything); result = _(1).isPlainObject(); result = _([]).isPlainObject(); result = _({}).isPlainObject(); @@ -8967,7 +8986,7 @@ namespace TestIsRegExp { { let result: boolean; - result = _.isRegExp(any); + result = _.isRegExp(anything); result = _(1).isRegExp(); result = _([]).isRegExp(); result = _({}).isRegExp(); @@ -8987,7 +9006,7 @@ namespace TestIsSafeInteger { { let result: boolean; - result = _.isSafeInteger(any); + result = _.isSafeInteger(anything); result = _(1).isSafeInteger(); result = _([]).isSafeInteger(); @@ -9019,7 +9038,7 @@ namespace TestIsSet { { let result: boolean; - result = _.isSet(any); + result = _.isSet(anything); result = _(1).isSet(); result = _([]).isSet(); result = _({}).isSet(); @@ -9050,7 +9069,7 @@ namespace TestIsString { { let result: boolean; - result = _.isString(any); + result = _.isString(anything); result = _(1).isString(); result = _([]).isString(); result = _({}).isString(); @@ -9070,7 +9089,7 @@ namespace TestIsSymbol { { let result: boolean; - result = _.isSymbol(any); + result = _.isSymbol(anything); result = _(1).isSymbol(); result = _([]).isSymbol(); @@ -9107,7 +9126,7 @@ namespace TestIsUndefined { { let result: boolean; - result = _.isUndefined(any); + result = _.isUndefined(anything); result = _(1).isUndefined(); result = _([]).isUndefined(); @@ -9139,7 +9158,7 @@ namespace TestIsWeakMap { { let result: boolean; - result = _.isWeakMap(any); + result = _.isWeakMap(anything); result = _(1).isWeakMap(); result = _([]).isWeakMap(); result = _({}).isWeakMap(); @@ -9170,7 +9189,7 @@ namespace TestIsWeakSet { { let result: boolean; - result = _.isWeakSet(any); + result = _.isWeakSet(anything); result = _(1).isWeakSet(); result = _([]).isWeakSet(); result = _({}).isWeakSet(); @@ -9190,18 +9209,18 @@ namespace TestLt { { let result: boolean; - result = _.lt(any, any); - result = _(1).lt(any); - result = _([]).lt(any); - result = _({}).lt(any); + result = _.lt(anything, anything); + result = _(1).lt(anything); + result = _([]).lt(anything); + result = _({}).lt(anything); } { let result: _.LoDashExplicitWrapper; - result = _(1).chain().lt(any); - result = _([]).chain().lt(any); - result = _({}).chain().lt(any); + result = _(1).chain().lt(anything); + result = _([]).chain().lt(anything); + result = _({}).chain().lt(anything); } } @@ -9210,27 +9229,27 @@ namespace TestLte { { let result: boolean; - result = _.lte(any, any); - result = _(1).lte(any); - result = _([]).lte(any); - result = _({}).lte(any); + result = _.lte(anything, anything); + result = _(1).lte(anything); + result = _([]).lte(anything); + result = _({}).lte(anything); } { let result: _.LoDashExplicitWrapper; - result = _(1).chain().lte(any); - result = _([]).chain().lte(any); - result = _({}).chain().lte(any); + result = _(1).chain().lte(anything); + result = _([]).chain().lte(anything); + result = _({}).chain().lte(anything); } } // _.toArray namespace TestToArray { - let array: TResult[] = []; - let list: _.List = []; - let dictionary: _.Dictionary = {}; - let numericDictionary: _.NumericDictionary = {}; + let array: AbcObject[] = []; + let list: _.List = []; + let dictionary: _.Dictionary = {}; + let numericDictionary: _.NumericDictionary = {}; { let result: string[]; @@ -9240,12 +9259,12 @@ namespace TestToArray { } { - let result: TResult[]; + let result: AbcObject[]; - result = _.toArray(array); - result = _.toArray(list); - result = _.toArray(dictionary); - result = _.toArray(numericDictionary); + result = _.toArray(array); + result = _.toArray(list); + result = _.toArray(dictionary); + result = _.toArray(numericDictionary); result = _.toArray(array); result = _.toArray(list); @@ -9262,28 +9281,28 @@ namespace TestToArray { } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; result = _(array).toArray(); - result = _(list).toArray(); - result = _(dictionary).toArray(); - result = _(numericDictionary).toArray(); + result = _(list).toArray(); + result = _(dictionary).toArray(); + result = _(numericDictionary).toArray(); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().toArray(); - result = _(list).chain().toArray(); - result = _(dictionary).chain().toArray(); - result = _(numericDictionary).chain().toArray(); + result = _(list).chain().toArray(); + result = _(dictionary).chain().toArray(); + result = _(numericDictionary).chain().toArray(); } } // _.toPlainObject namespace TestToPlainObject { { - let result: TResult; + let result: AbcObject; result = _.toPlainObject(); result = _.toPlainObject(true); result = _.toPlainObject(1); @@ -9293,7 +9312,7 @@ namespace TestToPlainObject { } { - let result: _.LoDashImplicitObjectWrapper; + let result: _.LoDashImplicitObjectWrapper; result = _(true).toPlainObject(); result = _(1).toPlainObject(); @@ -9517,13 +9536,13 @@ namespace TestMax { namespace TestMaxBy { let array: number[] = []; let list: _.List = []; - let array2: TResult[] = []; - let list2: _.List = []; + let array2: AbcObject[] = []; + let list2: _.List = []; let listIterator = (value: number, index: number, collection: _.List) => 0; let result: number | undefined; - let result2: TResult | undefined; + let result2: AbcObject | undefined; result = _.maxBy(array); result = _.maxBy(array, listIterator); @@ -9559,7 +9578,7 @@ namespace TestMean { // _.meanBy { - let array: TResult[] = []; + let array: AbcObject[] = []; let result: number; @@ -9587,13 +9606,13 @@ namespace TestMin { namespace TestMinBy { let array: number[] = []; let list: _.List = []; - let array2: TResult[] = []; - let list2: _.List = []; + let array2: AbcObject[] = []; + let list2: _.List = []; let listIterator = (value: number, index: number, collection: _.List) => 0; let result: number | undefined; - let result2: TResult | undefined; + let result2: AbcObject | undefined; result = _.minBy(array); result = _.minBy(array, listIterator); @@ -10889,11 +10908,11 @@ namespace TestForIn { type SampleObject = {a: number; b: string; c: boolean;}; let dictionary: _.Dictionary = {}; - let nilDictionary: _.Dictionary | null | undefined = any; + let nilDictionary: _.Dictionary | null | undefined = anything; let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => any = (value: number, key: string, collection: _.Dictionary) => 1; let object: SampleObject = { a: 1, b: "", c: true }; - let nilObject: SampleObject | null | undefined = any; + let nilObject: SampleObject | null | undefined = anything; let objectIterator: (element: any, key?: string, collection?: any) => any = (element: any, key?: string, collection?: any) => 1; { @@ -10958,11 +10977,11 @@ namespace TestForInRight { type SampleObject = {a: number; b: string; c: boolean;}; let dictionary: _.Dictionary = {}; - let nilDictionary: _.Dictionary | null | undefined = any; + let nilDictionary: _.Dictionary | null | undefined = anything; let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => any = (value: number, key: string, collection: _.Dictionary) => 1; let object: SampleObject = { a: 1, b: "", c: true }; - let nilObject: SampleObject | null | undefined = any; + let nilObject: SampleObject | null | undefined = anything; let objectIterator: (element: any, key?: string, collection?: any) => any = (element: any, key?: string, collection?: any) => 1; { @@ -11027,11 +11046,11 @@ namespace TestForOwn { type SampleObject = {a: number; b: string; c: boolean;}; let dictionary: _.Dictionary = {}; - let nilDictionary: _.Dictionary | null | undefined = any; + let nilDictionary: _.Dictionary | null | undefined = anything; let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => any = (value: number, key: string, collection: _.Dictionary) => 1; let object: SampleObject = { a: 1, b: "", c: true }; - let nilObject: SampleObject | null | undefined = any; + let nilObject: SampleObject | null | undefined = anything; let objectIterator: (element: any, key?: string, collection?: any) => any = (element: any, key?: string, collection?: any) => 1; { @@ -11096,11 +11115,11 @@ namespace TestForOwnRight { type SampleObject = {a: number; b: string; c: boolean;}; let dictionary: _.Dictionary = {}; - let nilDictionary: _.Dictionary | null | undefined = any; + let nilDictionary: _.Dictionary | null | undefined = anything; let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => any = (value: number, key: string, collection: _.Dictionary) => 1; let object: SampleObject = { a: 1, b: "", c: true }; - let nilObject: SampleObject | null | undefined = any; + let nilObject: SampleObject | null | undefined = anything; let objectIterator: (element: any, key?: string, collection?: any) => any = (element: any, key?: string, collection?: any) => 1; { @@ -11488,7 +11507,7 @@ namespace TestInvertBy { // _.keys namespace TestKeys { - let object: _.Dictionary | null | undefined = any; + let object: _.Dictionary | null | undefined = anything; { let result: string[]; @@ -11511,7 +11530,7 @@ namespace TestKeys { // _.keysIn namespace TestKeysIn { - let object: _.Dictionary | null | undefined = any; + let object: _.Dictionary | null | undefined = anything; { let result: string[]; @@ -11534,15 +11553,15 @@ namespace TestKeysIn { // _.mapKeys namespace TestMapKeys { - let array: TResult[] | null | undefined = [] as any; - let list: _.List| null | undefined = [] as any; - let dictionary: _.Dictionary | null | undefined = any; + let array: AbcObject[] | null | undefined = [] as any; + let list: _.List| null | undefined = [] as any; + let dictionary: _.Dictionary | null | undefined = anything; - let listIterator = (value: TResult, index: number, collection: _.List) => ""; - let dictionaryIterator = (value: TResult, key: string, collection: _.Dictionary) => ""; + let listIterator = (value: AbcObject, index: number, collection: _.List) => ""; + let dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => ""; { - let result: _.Dictionary; + let result: _.Dictionary; result = _.mapKeys(array); result = _.mapKeys(array, listIterator); @@ -11561,7 +11580,7 @@ namespace TestMapKeys { } { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; result = _(array).mapKeys(); result = _(array).mapKeys(listIterator); @@ -11580,7 +11599,7 @@ namespace TestMapKeys { } { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; result = _(array).chain().mapKeys(); result = _(array).chain().mapKeys(listIterator); @@ -11721,11 +11740,11 @@ namespace TestMergeWith { // _.omit namespace TestOmit { - let obj: TResult | null | undefined = any; - let dict: { [key: string]: TResult } = { }; + let obj: AbcObject | null | undefined = anything; + let dict: { [key: string]: AbcObject } = { }; { - let result: Partial; + let result: Partial; result = _.omit(obj, 'a'); result = _.omit(obj, 0, 'a'); @@ -11735,7 +11754,7 @@ namespace TestOmit { } { - let result: _.LoDashImplicitWrapper>; + let result: _.LoDashImplicitWrapper>; result = _(obj).omit('a'); result = _(obj).omit(0, 'a'); @@ -11745,7 +11764,7 @@ namespace TestOmit { } { - let result: _.LoDashExplicitWrapper>; + let result: _.LoDashExplicitWrapper>; result = _(obj).chain().omit('a'); result = _(obj).chain().omit(0, 'a'); @@ -11757,99 +11776,82 @@ namespace TestOmit { // _.omitBy namespace TestOmitBy { - let obj: TResult | null | undefined = any; + let obj: AbcObject | null | undefined = anything; let predicate = (element: any, key: string) => true; { - let result: Partial; + let result: Partial; result = _.omitBy(obj, predicate); } { - let result: _.LoDashImplicitWrapper>; + let result: _.LoDashImplicitWrapper>; - result = _(obj).omitBy(predicate); + result = _(obj).omitBy(predicate); } { - let result: _.LoDashExplicitWrapper>; + let result: _.LoDashExplicitWrapper>; - result = _(obj).chain().omitBy(predicate); + result = _(obj).chain().omitBy(predicate); } } // _.pick namespace TestPick { - let obj1: TResult | null | undefined = any; - let obj2: TResult = any; + const obj1: AbcObject | null | undefined = anything; + const obj2: AbcObject = anything; + const readonlyArray: ReadonlyArray = ['a', 'b']; + const literalsArray = ['a' as 'a', 'b' as 'b']; + const roLiteralsArray: ReadonlyArray<'a' | 'b'> = literalsArray; - { - let result: Partial; + _.pick(obj1, 'a'); // $ExpectType PartialDeep + _.pick(obj1, 0, 'a'); // $ExpectType PartialDeep + _.pick(obj1, ['b', 1], 0, 'a'); // $ExpectType PartialDeep + _.pick(obj1, readonlyArray); // $ExpectType PartialDeep + _.pick(obj2, 'a', 'b'); // $ExpectType Pick + _.pick(obj2, literalsArray); // $ExpectType Pick + _.pick(obj2, roLiteralsArray); // $ExpectType Pick - result = _.pick(obj1, 'a'); - result = _.pick(obj1, 0, 'a'); - result = _.pick(obj1, ['b', 1], 0, 'a'); - } + _(obj1).pick('a'); // $ExpectType LoDashImplicitWrapper> + _(obj1).pick(0, 'a'); // $ExpectType LoDashImplicitWrapper> + _(obj1).pick(['b', 1], 0, 'a'); // $ExpectType LoDashImplicitWrapper> + _(obj1).pick(readonlyArray); // $ExpectType LoDashImplicitWrapper> + _(obj2).pick('a', 'b'); // $ExpectType LoDashImplicitWrapper> + _(obj2).pick(literalsArray); // $ExpectType LoDashImplicitWrapper> + _(obj2).pick(roLiteralsArray); // $ExpectType LoDashImplicitWrapper> - { - let result: Pick; - result = _.pick(obj2, 'a', 'b'); - result = _.pick(obj2, ['a' as 'a', 'b' as 'b']); - } - - { - let result: _.LoDashImplicitWrapper>; - - result = _(obj1).pick('a'); - result = _(obj1).pick(0, 'a'); - result = _(obj1).pick(['b', 1], 0, 'a'); - } - - { - let result: _.LoDashImplicitWrapper>; - - result = _(obj2).pick('a', 'b'); - result = _(obj2).pick(['a' as 'a', 'b' as 'b']); - } - - { - let result: _.LoDashExplicitWrapper>; - - result = _(obj1).chain().pick('a'); - result = _(obj1).chain().pick(0, 'a'); - result = _(obj1).chain().pick(['b', 1], 0, 'a'); - } - - { - let result: _.LoDashExplicitWrapper>; - - result = _(obj2).chain().pick('a', 'b'); - result = _(obj2).chain().pick(['a' as 'a', 'b' as 'b']); - } + _.chain(obj1).pick('a'); // $ExpectType LoDashExplicitWrapper> + _.chain(obj1).pick(0, 'a'); // $ExpectType LoDashExplicitWrapper> + _.chain(obj1).pick(['b', 1], 0, 'a'); // $ExpectType LoDashExplicitWrapper> + _.chain(obj1).pick(readonlyArray); // $ExpectType LoDashExplicitWrapper> + _.chain(obj2).pick('a', 'b'); // $ExpectType LoDashExplicitWrapper> + _.chain(obj2).pick(literalsArray); // $ExpectType LoDashExplicitWrapper> + _.chain(obj2).pick(roLiteralsArray); // $ExpectType LoDashExplicitWrapper> } // _.pickBy namespace TestPickBy { - let obj: TResult | null | undefined = any; + let obj: AbcObject | null | undefined = anything; let predicate = (element: any, key: string) => true; { - let result: Partial; + let result: Partial; result = _.pickBy(obj, predicate); } { - let result: _.LoDashImplicitWrapper>; + let result: _.LoDashImplicitWrapper>; - result = _(obj).pickBy(predicate); + result = _(obj).pickBy(predicate); } { - let result: _.LoDashExplicitWrapper>; + let result: _.LoDashExplicitWrapper>; - result = _(obj).chain().pickBy(predicate); + result = _(obj).chain().pickBy(predicate); } } @@ -12067,13 +12069,13 @@ namespace TestTransform { let dictionary: _.Dictionary = {}; { - let iterator = (acc: TResult[], curr: number, index?: number, arr?: number[]) => {}; - let accumulator: TResult[] = []; - let result: TResult[]; + let iterator = (acc: AbcObject[], curr: number, index?: number, arr?: number[]) => {}; + let accumulator: AbcObject[] = []; + let result: AbcObject[]; result = _.transform(array); - result = _.transform(array, iterator); - result = _.transform(array, iterator, accumulator); + result = _.transform(array, iterator); + result = _.transform(array, iterator, accumulator); result = _(array).transform().value(); result = _(array).transform(iterator).value(); @@ -12081,37 +12083,37 @@ namespace TestTransform { } { - let iterator = (acc: _.Dictionary, curr: number, index?: number, arr?: number[]) => {}; - let accumulator: _.Dictionary = {}; - let result: _.Dictionary; + let iterator = (acc: _.Dictionary, curr: number, index?: number, arr?: number[]) => {}; + let accumulator: _.Dictionary = {}; + let result: _.Dictionary; - result = _.transform(array, iterator, accumulator); + result = _.transform(array, iterator, accumulator); result = _(array).transform(iterator, accumulator).value(); } { - let iterator = (acc: _.Dictionary, curr: number, key?: string, dict?: _.Dictionary) => {}; - let accumulator: _.Dictionary = {}; - let result: _.Dictionary; + let iterator = (acc: _.Dictionary, curr: number, key?: string, dict?: _.Dictionary) => {}; + let accumulator: _.Dictionary = {}; + let result: _.Dictionary; result = _.transform(dictionary); - result = _.transform(dictionary, iterator); - result = _.transform(dictionary, iterator, accumulator); + result = _.transform(dictionary, iterator); + result = _.transform(dictionary, iterator, accumulator); result = _(dictionary).transform().value(); - result = _(dictionary).transform(iterator).value(); - result = _(dictionary).transform(iterator, accumulator).value(); + result = _(dictionary).transform(iterator).value(); + result = _(dictionary).transform(iterator, accumulator).value(); } { - let iterator = (acc: TResult[], curr: number, key?: string, dict?: _.Dictionary) => {}; - let accumulator: TResult[] = []; - let result: TResult[]; + let iterator = (acc: AbcObject[], curr: number, key?: string, dict?: _.Dictionary) => {}; + let accumulator: AbcObject[] = []; + let result: AbcObject[]; - result = _.transform(dictionary, iterator, accumulator); + result = _.transform(dictionary, iterator, accumulator); - result = _(dictionary).transform(iterator, accumulator).value(); + result = _(dictionary).transform(iterator, accumulator).value(); } } @@ -12344,37 +12346,37 @@ namespace TestValues { // _.valuesIn namespace TestValuesIn { - let object: _.Dictionary = {}; + let object: _.Dictionary = {}; { - let result: TResult[]; + let result: AbcObject[]; result = _.valuesIn(object); } { - let result: TResult[]; + let result: AbcObject[]; // Without this type hint, this will fail to compile, as expected. - result = _.valuesIn({}); + result = _.valuesIn({}); } { - let result: TResult[]; + let result: AbcObject[]; result = _.values(object); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper; - result = _(object).valuesIn(); + result = _(object).valuesIn(); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; - result = _(object).chain().valuesIn(); + result = _(object).chain().valuesIn(); } } @@ -13267,7 +13269,7 @@ namespace TestIdentity { } { - let input: { a: number; } | null | undefined = any; + let input: { a: number; } | null | undefined = anything; _.identity(input); // $ExpectType { a: number; } | null | undefined _.identity(); // $ExpectType undefined } @@ -13276,13 +13278,13 @@ namespace TestIdentity { // _.iteratee namespace TestIteratee { { - _.iteratee((...args: any[]): TResult => any); // $ExpectType (...args: any[]) => TResult - _.iteratee((a: TResult): boolean => any); // $ExpectType (a: TResult) => boolean - _.iteratee((a: TResult | undefined): a is undefined => any); // $ExpectType (a: TResult | undefined) => a is undefined + _.iteratee((...args: any[]): AbcObject => anything); // $ExpectType (...args: any[]) => AbcObject + _.iteratee((a: AbcObject): boolean => anything); // $ExpectType (a: AbcObject) => boolean + _.iteratee((a: AbcObject | undefined): a is undefined => anything); // $ExpectType (a: AbcObject | undefined) => a is undefined } { - let result: (object: any) => TResult; + let result: (object: any) => AbcObject; result = _.iteratee(''); } @@ -13294,14 +13296,14 @@ namespace TestIteratee { } { - let result: _.LoDashImplicitObjectWrapper<(...args: any[]) => TResult>; + let result: _.LoDashImplicitObjectWrapper<(...args: any[]) => AbcObject>; - let func: (...args: any[]) => TResult = any; + let func: (...args: any[]) => AbcObject = anything; result = _(func).iteratee(); } { - let result: _.LoDashImplicitObjectWrapper<(object: any) => TResult>; + let result: _.LoDashImplicitObjectWrapper<(object: any) => AbcObject>; result = _('').iteratee(); } @@ -13313,14 +13315,14 @@ namespace TestIteratee { } { - let result: _.LoDashExplicitObjectWrapper<(...args: any[]) => TResult>; + let result: _.LoDashExplicitObjectWrapper<(...args: any[]) => AbcObject>; - let func: (...args: any[]) => TResult = any; + let func: (...args: any[]) => AbcObject = anything; result = _(func).chain().iteratee(); } { - let result: _.LoDashExplicitObjectWrapper<(object: any) => TResult>; + let result: _.LoDashExplicitObjectWrapper<(object: any) => AbcObject>; result = _('').chain().iteratee(); } @@ -13334,68 +13336,68 @@ namespace TestIteratee { // _.matches namespace TestMatches { - let source: TResult = { a: 1, b: "", c: true }; + let source: AbcObject = { a: 1, b: "", c: true }; { let result: (value: any) => boolean; - result = _.matches(source); + result = _.matches(source); } { - let result: (value: TResult) => boolean; - result = _.matches(source); + let result: (value: AbcObject) => boolean; + result = _.matches(source); } { - let result: _.LoDashImplicitObjectWrapper<(value: TResult) => boolean>; - result = _(source).matches(); + let result: _.LoDashImplicitObjectWrapper<(value: AbcObject) => boolean>; + result = _(source).matches(); } { - let result: _.LoDashExplicitObjectWrapper<(value: TResult) => boolean>; - result = _(source).chain().matches(); + let result: _.LoDashExplicitObjectWrapper<(value: AbcObject) => boolean>; + result = _(source).chain().matches(); } } // _.matchesProperty { let path: string | string[] = []; - let source: TResult = { a: 1, b: "", c: true }; + let source: AbcObject = { a: 1, b: "", c: true }; { let result: (value: any) => boolean; - result = _.matchesProperty(path, source); + result = _.matchesProperty(path, source); } { - let result: (value: TResult) => boolean; + let result: (value: AbcObject) => boolean; - result = _.matchesProperty(path, source); + result = _.matchesProperty(path, source); } { let result: _.LoDashImplicitObjectWrapper<(value: any) => boolean>; - result = _(path).matchesProperty(source); + result = _(path).matchesProperty(source); } { - let result: _.LoDashImplicitObjectWrapper<(value: TResult) => boolean>; + let result: _.LoDashImplicitObjectWrapper<(value: AbcObject) => boolean>; - result = _(path).matchesProperty(source); + result = _(path).matchesProperty(source); } { let result: _.LoDashExplicitObjectWrapper<(value: any) => boolean>; - result = _(path).chain().matchesProperty(source); + result = _(path).chain().matchesProperty(source); } { - let result: _.LoDashExplicitObjectWrapper<(value: TResult) => boolean>; + let result: _.LoDashExplicitObjectWrapper<(value: AbcObject) => boolean>; - result = _(path).chain().matchesProperty(source); + result = _(path).chain().matchesProperty(source); } } @@ -13405,89 +13407,89 @@ namespace TestMethod { let result: (object: any) => {a: string}; result = _.method('a.0'); - result = _.method('a.0', any, any); - result = _.method('a.0', any, any, any); + result = _.method('a.0', anything, anything); + result = _.method('a.0', anything, anything, anything); result = _.method(['a', 0]); - result = _.method(['a', 0], any); - result = _.method(['a', 0], any, any); - result = _.method(['a', 0], any, any, any); + result = _.method(['a', 0], anything); + result = _.method(['a', 0], anything, anything); + result = _.method(['a', 0], anything, anything, anything); } { let result: (object: {a: string}) => {b: string}; result = _.method('a.0'); - result = _.method('a.0', any, any); - result = _.method('a.0', any, any, any); + result = _.method('a.0', anything, anything); + result = _.method('a.0', anything, anything, anything); result = _.method(['a', 0]); - result = _.method(['a', 0], any); - result = _.method(['a', 0], any, any); - result = _.method(['a', 0], any, any, any); + result = _.method(['a', 0], anything); + result = _.method(['a', 0], anything, anything); + result = _.method(['a', 0], anything, anything, anything); } { let result: _.LoDashImplicitObjectWrapper<(object: any) => {a: string}>; result = _('a.0').method(); - result = _('a.0').method(any); - result = _('a.0').method(any, any); - result = _('a.0').method(any, any, any); + result = _('a.0').method(anything); + result = _('a.0').method(anything, anything); + result = _('a.0').method(anything, anything, anything); result = _(['a', 0]).method(); - result = _(['a', 0]).method(any); - result = _(['a', 0]).method(any, any); - result = _(['a', 0]).method(any, any, any); + result = _(['a', 0]).method(anything); + result = _(['a', 0]).method(anything, anything); + result = _(['a', 0]).method(anything, anything, anything); } { let result: _.LoDashImplicitObjectWrapper<(object: {a: string}) => {b: string}>; result = _('a.0').method(); - result = _('a.0').method(any); - result = _('a.0').method(any, any); - result = _('a.0').method(any, any, any); + result = _('a.0').method(anything); + result = _('a.0').method(anything, anything); + result = _('a.0').method(anything, anything, anything); result = _(['a', 0]).method(); - result = _(['a', 0]).method(any); - result = _(['a', 0]).method(any, any); - result = _(['a', 0]).method(any, any, any); + result = _(['a', 0]).method(anything); + result = _(['a', 0]).method(anything, anything); + result = _(['a', 0]).method(anything, anything, anything); } { let result: _.LoDashExplicitObjectWrapper<(object: any) => {a: string}>; result = _('a.0').chain().method(); - result = _('a.0').chain().method(any); - result = _('a.0').chain().method(any, any); - result = _('a.0').chain().method(any, any, any); + result = _('a.0').chain().method(anything); + result = _('a.0').chain().method(anything, anything); + result = _('a.0').chain().method(anything, anything, anything); result = _(['a', 0]).chain().method(); - result = _(['a', 0]).chain().method(any); - result = _(['a', 0]).chain().method(any, any); - result = _(['a', 0]).chain().method(any, any, any); + result = _(['a', 0]).chain().method(anything); + result = _(['a', 0]).chain().method(anything, anything); + result = _(['a', 0]).chain().method(anything, anything, anything); } { let result: _.LoDashExplicitObjectWrapper<(object: {a: string}) => {b: string}>; result = _('a.0').chain().method(); - result = _('a.0').chain().method(any); - result = _('a.0').chain().method(any, any); - result = _('a.0').chain().method(any, any, any); + result = _('a.0').chain().method(anything); + result = _('a.0').chain().method(anything, anything); + result = _('a.0').chain().method(anything, anything, anything); result = _(['a', 0]).chain().method(); - result = _(['a', 0]).chain().method(any); - result = _(['a', 0]).chain().method(any, any); - result = _(['a', 0]).chain().method(any, any, any); + result = _(['a', 0]).chain().method(anything); + result = _(['a', 0]).chain().method(anything, anything); + result = _(['a', 0]).chain().method(anything, anything, anything); } } // _.methodOf namespace TestMethodOf { - type SampleObject = { a: Array<{ b(): TResult }> }; - type ResultFn = (path: string | string[]) => TResult; + type SampleObject = { a: Array<{ b(): AbcObject }> }; + type ResultFn = (path: string | string[]) => AbcObject; let object: SampleObject = { a: [] }; @@ -13495,34 +13497,34 @@ namespace TestMethodOf { let result: ResultFn; result = _.methodOf(object); - result = _.methodOf(object, any); - result = _.methodOf(object, any, any); - result = _.methodOf(object, any, any, any); + result = _.methodOf(object, anything); + result = _.methodOf(object, anything, anything); + result = _.methodOf(object, anything, anything, anything); } { let result: _.LoDashImplicitObjectWrapper; result = _(object).methodOf(); - result = _(object).methodOf(any); - result = _(object).methodOf(any, any); - result = _(object).methodOf(any, any, any); + result = _(object).methodOf(anything); + result = _(object).methodOf(anything, anything); + result = _(object).methodOf(anything, anything, anything); } { let result: _.LoDashExplicitObjectWrapper; result = _(object).chain().methodOf(); - result = _(object).chain().methodOf(any); - result = _(object).chain().methodOf(any, any); - result = _(object).chain().methodOf(any, any, any); + result = _(object).chain().methodOf(anything); + result = _(object).chain().methodOf(anything, anything); + result = _(object).chain().methodOf(anything, anything, anything); } } // _.mixin namespace TestMixin { let source: _.Dictionary<(...args: any[]) => any> = {}; - let dest: TResult = any; + let dest: AbcObject = anything; let options: {chain?: boolean} = {}; { @@ -13533,7 +13535,7 @@ namespace TestMixin { } { - let result: TResult; + let result: AbcObject; result = _.mixin(dest, source); result = _.mixin(dest, source, options); @@ -13547,7 +13549,7 @@ namespace TestMixin { } { - let result: _.LoDashImplicitWrapper; + let result: _.LoDashImplicitWrapper; result = _(dest).mixin(source); result = _(dest).mixin(source, options); @@ -13561,7 +13563,7 @@ namespace TestMixin { } { - let result: _.LoDashExplicitWrapper; + let result: _.LoDashExplicitWrapper; result = _(dest).chain().mixin(source); result = _(dest).chain().mixin(source, options); @@ -13602,7 +13604,7 @@ namespace TestNoop { result = _([1]).noop(true, 'a', 1); result = _(['']).noop(true, 'a', 1); result = _({}).noop(true, 'a', 1); - result = _(any).noop(true, 'a', 1); + result = _(anything).noop(true, 'a', 1); } { @@ -13612,7 +13614,7 @@ namespace TestNoop { result = _([1]).chain().noop(true, 'a', 1); result = _(['']).chain().noop(true, 'a', 1); result = _({}).chain().noop(true, 'a', 1); - result = _(any).chain().noop(true, 'a', 1); + result = _(anything).chain().noop(true, 'a', 1); } } @@ -13863,7 +13865,7 @@ namespace TestRangeRight { let result: any[]; result = _.stubArray(); - result = _(any).stubArray(); + result = _(anything).stubArray(); } { @@ -13873,7 +13875,7 @@ namespace TestRangeRight { result = _([1]).chain().stubArray(); result = _(['']).chain().stubArray(); result = _({}).chain().stubArray(); - result = _(any).chain().stubArray(); + result = _(anything).chain().stubArray(); } } @@ -13883,7 +13885,7 @@ namespace TestRangeRight { let result: boolean; result = _.stubFalse(); - result = _(any).stubFalse(); + result = _(anything).stubFalse(); } { @@ -13893,7 +13895,7 @@ namespace TestRangeRight { result = _([1]).chain().stubFalse(); result = _(['']).chain().stubFalse(); result = _({}).chain().stubFalse(); - result = _(any).chain().stubFalse(); + result = _(anything).chain().stubFalse(); } } @@ -13903,7 +13905,7 @@ namespace TestRangeRight { let result: object; result = _.stubObject(); - result = _(any).stubObject(); + result = _(anything).stubObject(); } { @@ -13913,7 +13915,7 @@ namespace TestRangeRight { result = _([1]).chain().stubObject(); result = _(['']).chain().stubObject(); result = _({}).chain().stubObject(); - result = _(any).chain().stubObject(); + result = _(anything).chain().stubObject(); } } @@ -13923,7 +13925,7 @@ namespace TestRangeRight { let result: string; result = _.stubString(); - result = _(any).stubString(); + result = _(anything).stubString(); } { @@ -13933,7 +13935,7 @@ namespace TestRangeRight { result = _([1]).chain().stubString(); result = _(['']).chain().stubString(); result = _({}).chain().stubString(); - result = _(any).chain().stubString(); + result = _(anything).chain().stubString(); } } @@ -13943,7 +13945,7 @@ namespace TestRangeRight { let result: boolean; result = _.stubTrue(); - result = _(any).stubTrue(); + result = _(anything).stubTrue(); } { @@ -13953,13 +13955,13 @@ namespace TestRangeRight { result = _([1]).chain().stubTrue(); result = _(['']).chain().stubTrue(); result = _({}).chain().stubTrue(); - result = _(any).chain().stubTrue(); + result = _(anything).chain().stubTrue(); } } // _.times namespace TestTimes { - let iteratee: (num: number) => TResult = (num: number) => ({ a: 1, b: "", c: true }); + let iteratee: (num: number) => AbcObject = (num: number) => ({ a: 1, b: "", c: true }); { let result: number[]; @@ -13969,7 +13971,7 @@ namespace TestTimes { } { - let result: TResult[]; + let result: AbcObject[]; result = _.times(42, iteratee); result = _(42).times(iteratee); @@ -13982,7 +13984,7 @@ namespace TestTimes { } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper; result = _(42).chain().times(iteratee); } diff --git a/types/lodash/math/add.d.ts b/types/lodash/math/add.d.ts index bed1f749f4..573178e0f4 100644 --- a/types/lodash/math/add.d.ts +++ b/types/lodash/math/add.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/math/ceil.d.ts b/types/lodash/math/ceil.d.ts index 4fcca60b3f..a51048c2f2 100644 --- a/types/lodash/math/ceil.d.ts +++ b/types/lodash/math/ceil.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/math/divide.d.ts b/types/lodash/math/divide.d.ts index 7a301014a4..be6bc0abbd 100644 --- a/types/lodash/math/divide.d.ts +++ b/types/lodash/math/divide.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/math/floor.d.ts b/types/lodash/math/floor.d.ts index edd71c16d4..81b490af1d 100644 --- a/types/lodash/math/floor.d.ts +++ b/types/lodash/math/floor.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/math/max.d.ts b/types/lodash/math/max.d.ts index 426c4c0fb7..20efcebef6 100644 --- a/types/lodash/math/max.d.ts +++ b/types/lodash/math/max.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/math/maxBy.d.ts b/types/lodash/math/maxBy.d.ts index 03be231888..adc787a911 100644 --- a/types/lodash/math/maxBy.d.ts +++ b/types/lodash/math/maxBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/math/mean.d.ts b/types/lodash/math/mean.d.ts index a67a1d7c33..ebaa42ce32 100644 --- a/types/lodash/math/mean.d.ts +++ b/types/lodash/math/mean.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/math/meanBy.d.ts b/types/lodash/math/meanBy.d.ts index 03bca381b8..a6bf558754 100644 --- a/types/lodash/math/meanBy.d.ts +++ b/types/lodash/math/meanBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/math/min.d.ts b/types/lodash/math/min.d.ts index be8e1c7caa..ac441afa83 100644 --- a/types/lodash/math/min.d.ts +++ b/types/lodash/math/min.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/math/minBy.d.ts b/types/lodash/math/minBy.d.ts index 1ddbe31c3a..fad6e5a284 100644 --- a/types/lodash/math/minBy.d.ts +++ b/types/lodash/math/minBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/math/multiply.d.ts b/types/lodash/math/multiply.d.ts index c86a73ec98..0767ee1154 100644 --- a/types/lodash/math/multiply.d.ts +++ b/types/lodash/math/multiply.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/math/round.d.ts b/types/lodash/math/round.d.ts index b4e0397220..59f97c3144 100644 --- a/types/lodash/math/round.d.ts +++ b/types/lodash/math/round.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/math/subtract.d.ts b/types/lodash/math/subtract.d.ts index 653b07a586..5b627db982 100644 --- a/types/lodash/math/subtract.d.ts +++ b/types/lodash/math/subtract.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/math/sum.d.ts b/types/lodash/math/sum.d.ts index 5b4499f0f5..ab9222900d 100644 --- a/types/lodash/math/sum.d.ts +++ b/types/lodash/math/sum.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/math/sumBy.d.ts b/types/lodash/math/sumBy.d.ts index dbb537283c..240dca6919 100644 --- a/types/lodash/math/sumBy.d.ts +++ b/types/lodash/math/sumBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/number/clamp.d.ts b/types/lodash/number/clamp.d.ts index 1ef3321b09..af2b47c995 100644 --- a/types/lodash/number/clamp.d.ts +++ b/types/lodash/number/clamp.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/number/inRange.d.ts b/types/lodash/number/inRange.d.ts index 499d71e8de..c3215a1c0f 100644 --- a/types/lodash/number/inRange.d.ts +++ b/types/lodash/number/inRange.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/number/random.d.ts b/types/lodash/number/random.d.ts index 621f29ffe9..a6522326f6 100644 --- a/types/lodash/number/random.d.ts +++ b/types/lodash/number/random.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/assign.d.ts b/types/lodash/object/assign.d.ts index e4a03fb995..17d282a8ec 100644 --- a/types/lodash/object/assign.d.ts +++ b/types/lodash/object/assign.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/assignIn.d.ts b/types/lodash/object/assignIn.d.ts index 1f877fb8af..01b38f7efa 100644 --- a/types/lodash/object/assignIn.d.ts +++ b/types/lodash/object/assignIn.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/assignInWith.d.ts b/types/lodash/object/assignInWith.d.ts index 10a4c7297d..776a81b580 100644 --- a/types/lodash/object/assignInWith.d.ts +++ b/types/lodash/object/assignInWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { type AssignCustomizer = (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any; diff --git a/types/lodash/object/assignWith.d.ts b/types/lodash/object/assignWith.d.ts index e26494a3d6..4b98ad5e53 100644 --- a/types/lodash/object/assignWith.d.ts +++ b/types/lodash/object/assignWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/at.d.ts b/types/lodash/object/at.d.ts index a2b0bb926a..c95f8c9600 100644 --- a/types/lodash/object/at.d.ts +++ b/types/lodash/object/at.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/create.d.ts b/types/lodash/object/create.d.ts index f743b15022..836cc05425 100644 --- a/types/lodash/object/create.d.ts +++ b/types/lodash/object/create.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/defaults.d.ts b/types/lodash/object/defaults.d.ts index 908d44f364..956d5b4022 100644 --- a/types/lodash/object/defaults.d.ts +++ b/types/lodash/object/defaults.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/defaultsDeep.d.ts b/types/lodash/object/defaultsDeep.d.ts index 72985f8fe7..a9aa5d6b53 100644 --- a/types/lodash/object/defaultsDeep.d.ts +++ b/types/lodash/object/defaultsDeep.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/entries.d.ts b/types/lodash/object/entries.d.ts index 11925694c4..786b2a7abd 100644 --- a/types/lodash/object/entries.d.ts +++ b/types/lodash/object/entries.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/entriesIn.d.ts b/types/lodash/object/entriesIn.d.ts index d4a91f50bb..fcd378032e 100644 --- a/types/lodash/object/entriesIn.d.ts +++ b/types/lodash/object/entriesIn.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/extend.d.ts b/types/lodash/object/extend.d.ts index d2a7a55200..3bdace2de1 100644 --- a/types/lodash/object/extend.d.ts +++ b/types/lodash/object/extend.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/extendWith.d.ts b/types/lodash/object/extendWith.d.ts index 9a6b1d1767..191c69dd8b 100644 --- a/types/lodash/object/extendWith.d.ts +++ b/types/lodash/object/extendWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/findKey.d.ts b/types/lodash/object/findKey.d.ts index f6fe55a2bd..2e35165e24 100644 --- a/types/lodash/object/findKey.d.ts +++ b/types/lodash/object/findKey.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/findLastKey.d.ts b/types/lodash/object/findLastKey.d.ts index 53f224d943..6a43330138 100644 --- a/types/lodash/object/findLastKey.d.ts +++ b/types/lodash/object/findLastKey.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/forIn.d.ts b/types/lodash/object/forIn.d.ts index a6f92dd690..7fa7e14a33 100644 --- a/types/lodash/object/forIn.d.ts +++ b/types/lodash/object/forIn.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/forInRight.d.ts b/types/lodash/object/forInRight.d.ts index 72edd3a538..0364db0403 100644 --- a/types/lodash/object/forInRight.d.ts +++ b/types/lodash/object/forInRight.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/forOwn.d.ts b/types/lodash/object/forOwn.d.ts index 06d0c9e370..eeeb4adef6 100644 --- a/types/lodash/object/forOwn.d.ts +++ b/types/lodash/object/forOwn.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/forOwnRight.d.ts b/types/lodash/object/forOwnRight.d.ts index d0526721fb..e760dfa78f 100644 --- a/types/lodash/object/forOwnRight.d.ts +++ b/types/lodash/object/forOwnRight.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/functions.d.ts b/types/lodash/object/functions.d.ts index 7226972151..bcc15d01e8 100644 --- a/types/lodash/object/functions.d.ts +++ b/types/lodash/object/functions.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/functionsIn.d.ts b/types/lodash/object/functionsIn.d.ts index e07972f0c0..84b8e88959 100644 --- a/types/lodash/object/functionsIn.d.ts +++ b/types/lodash/object/functionsIn.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/get.d.ts b/types/lodash/object/get.d.ts index 04b66860d1..ff793192fb 100644 --- a/types/lodash/object/get.d.ts +++ b/types/lodash/object/get.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/has.d.ts b/types/lodash/object/has.d.ts index ddd762ad2e..53026153d1 100644 --- a/types/lodash/object/has.d.ts +++ b/types/lodash/object/has.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/hasIn.d.ts b/types/lodash/object/hasIn.d.ts index 05924d1c9d..5da20394b2 100644 --- a/types/lodash/object/hasIn.d.ts +++ b/types/lodash/object/hasIn.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/invert.d.ts b/types/lodash/object/invert.d.ts index ebb0f2ebdf..d5c62aa9af 100644 --- a/types/lodash/object/invert.d.ts +++ b/types/lodash/object/invert.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/invertBy.d.ts b/types/lodash/object/invertBy.d.ts index 48b1fe6179..12b90969e1 100644 --- a/types/lodash/object/invertBy.d.ts +++ b/types/lodash/object/invertBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/invoke.d.ts b/types/lodash/object/invoke.d.ts index f51f6e35fb..9405c4fa6c 100644 --- a/types/lodash/object/invoke.d.ts +++ b/types/lodash/object/invoke.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/keys.d.ts b/types/lodash/object/keys.d.ts index af84fdab93..374e64ad2c 100644 --- a/types/lodash/object/keys.d.ts +++ b/types/lodash/object/keys.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/keysIn.d.ts b/types/lodash/object/keysIn.d.ts index 60efebf88a..fe05763414 100644 --- a/types/lodash/object/keysIn.d.ts +++ b/types/lodash/object/keysIn.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/mapKeys.d.ts b/types/lodash/object/mapKeys.d.ts index dda3eecc9a..620977cdb1 100644 --- a/types/lodash/object/mapKeys.d.ts +++ b/types/lodash/object/mapKeys.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/mapValues.d.ts b/types/lodash/object/mapValues.d.ts index 9f30b1774b..e71e1c7f3e 100644 --- a/types/lodash/object/mapValues.d.ts +++ b/types/lodash/object/mapValues.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/merge.d.ts b/types/lodash/object/merge.d.ts index 70bcf5c5c2..0c18e6cfe5 100644 --- a/types/lodash/object/merge.d.ts +++ b/types/lodash/object/merge.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/mergeWith.d.ts b/types/lodash/object/mergeWith.d.ts index 42148ed3a8..01fb9264e6 100644 --- a/types/lodash/object/mergeWith.d.ts +++ b/types/lodash/object/mergeWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { type MergeWithCustomizer = { bivariantHack(value: any, srcValue: any, key: string, object: any, source: any): any; }["bivariantHack"] diff --git a/types/lodash/object/omit.d.ts b/types/lodash/object/omit.d.ts index 6692221fc8..8684b37b61 100644 --- a/types/lodash/object/omit.d.ts +++ b/types/lodash/object/omit.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/omitBy.d.ts b/types/lodash/object/omitBy.d.ts index cf123af47a..d6c762e496 100644 --- a/types/lodash/object/omitBy.d.ts +++ b/types/lodash/object/omitBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/pick.d.ts b/types/lodash/object/pick.d.ts index d84e655efe..0561c58630 100644 --- a/types/lodash/object/pick.d.ts +++ b/types/lodash/object/pick.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/pickBy.d.ts b/types/lodash/object/pickBy.d.ts index dfe9023ba5..98b3c717dc 100644 --- a/types/lodash/object/pickBy.d.ts +++ b/types/lodash/object/pickBy.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/result.d.ts b/types/lodash/object/result.d.ts index 58814bb2a1..ea06014ae5 100644 --- a/types/lodash/object/result.d.ts +++ b/types/lodash/object/result.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/set.d.ts b/types/lodash/object/set.d.ts index 1d621b64d1..fe406347e7 100644 --- a/types/lodash/object/set.d.ts +++ b/types/lodash/object/set.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/setWith.d.ts b/types/lodash/object/setWith.d.ts index e347569709..63f470180b 100644 --- a/types/lodash/object/setWith.d.ts +++ b/types/lodash/object/setWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { type SetWithCustomizer = (nsValue: any, key: string, nsObject: T) => any; diff --git a/types/lodash/object/toPairs.d.ts b/types/lodash/object/toPairs.d.ts index 12945f7941..42c4edab2f 100644 --- a/types/lodash/object/toPairs.d.ts +++ b/types/lodash/object/toPairs.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/toPairsIn.d.ts b/types/lodash/object/toPairsIn.d.ts index b9d1318cd6..ee6818c212 100644 --- a/types/lodash/object/toPairsIn.d.ts +++ b/types/lodash/object/toPairsIn.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/transform.d.ts b/types/lodash/object/transform.d.ts index 67e16c4b86..817f51a4b2 100644 --- a/types/lodash/object/transform.d.ts +++ b/types/lodash/object/transform.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/unset.d.ts b/types/lodash/object/unset.d.ts index 8b473e48ba..0cf4b56f92 100644 --- a/types/lodash/object/unset.d.ts +++ b/types/lodash/object/unset.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/update.d.ts b/types/lodash/object/update.d.ts index 23db9431c4..4289efca72 100644 --- a/types/lodash/object/update.d.ts +++ b/types/lodash/object/update.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/updateWith.d.ts b/types/lodash/object/updateWith.d.ts index fc0b96ec35..4da0be8ce5 100644 --- a/types/lodash/object/updateWith.d.ts +++ b/types/lodash/object/updateWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/values.d.ts b/types/lodash/object/values.d.ts index 808335f9bc..d1dfa1177b 100644 --- a/types/lodash/object/values.d.ts +++ b/types/lodash/object/values.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/object/valuesIn.d.ts b/types/lodash/object/valuesIn.d.ts index a60a449c4e..22730438f5 100644 --- a/types/lodash/object/valuesIn.d.ts +++ b/types/lodash/object/valuesIn.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/seq/chain.d.ts b/types/lodash/seq/chain.d.ts index dedc92da2b..9edc42f881 100644 --- a/types/lodash/seq/chain.d.ts +++ b/types/lodash/seq/chain.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/seq/prototype.at.d.ts b/types/lodash/seq/prototype.at.d.ts index 01aa3c7f86..3a6a35d69b 100644 --- a/types/lodash/seq/prototype.at.d.ts +++ b/types/lodash/seq/prototype.at.d.ts @@ -1,4 +1,4 @@ -// import * as _ from "../index"; +// import _ = require("../index"); // declare module "../index" { // interface LoDashWrapper { // /** diff --git a/types/lodash/seq/prototype.chain.d.ts b/types/lodash/seq/prototype.chain.d.ts index dedc92da2b..9edc42f881 100644 --- a/types/lodash/seq/prototype.chain.d.ts +++ b/types/lodash/seq/prototype.chain.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/seq/prototype.commit.d.ts b/types/lodash/seq/prototype.commit.d.ts index 8d2393cb06..f22477f2f9 100644 --- a/types/lodash/seq/prototype.commit.d.ts +++ b/types/lodash/seq/prototype.commit.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashWrapper { /** diff --git a/types/lodash/seq/prototype.plant.d.ts b/types/lodash/seq/prototype.plant.d.ts index 72410991ec..6025b09381 100644 --- a/types/lodash/seq/prototype.plant.d.ts +++ b/types/lodash/seq/prototype.plant.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashImplicitWrapper { /** diff --git a/types/lodash/seq/prototype.reverse.d.ts b/types/lodash/seq/prototype.reverse.d.ts index 5bc1408784..66526e729b 100644 --- a/types/lodash/seq/prototype.reverse.d.ts +++ b/types/lodash/seq/prototype.reverse.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashWrapper { /** diff --git a/types/lodash/seq/prototype.toJSON.d.ts b/types/lodash/seq/prototype.toJSON.d.ts index d1838eaf2f..22da767aec 100644 --- a/types/lodash/seq/prototype.toJSON.d.ts +++ b/types/lodash/seq/prototype.toJSON.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashWrapper { /** diff --git a/types/lodash/seq/prototype.toString.d.ts b/types/lodash/seq/prototype.toString.d.ts index b829902207..4deef48ec0 100644 --- a/types/lodash/seq/prototype.toString.d.ts +++ b/types/lodash/seq/prototype.toString.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashWrapper { /** diff --git a/types/lodash/seq/prototype.value.d.ts b/types/lodash/seq/prototype.value.d.ts index 8a070267a5..9ba88a8250 100644 --- a/types/lodash/seq/prototype.value.d.ts +++ b/types/lodash/seq/prototype.value.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashWrapper { /** diff --git a/types/lodash/seq/prototype.valueOf.d.ts b/types/lodash/seq/prototype.valueOf.d.ts index 4b24dcc831..6a69f1f202 100644 --- a/types/lodash/seq/prototype.valueOf.d.ts +++ b/types/lodash/seq/prototype.valueOf.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashWrapper { /** diff --git a/types/lodash/seq/tap.d.ts b/types/lodash/seq/tap.d.ts index 14bff06e0d..dd4fc8d754 100644 --- a/types/lodash/seq/tap.d.ts +++ b/types/lodash/seq/tap.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/seq/thru.d.ts b/types/lodash/seq/thru.d.ts index 537431fee1..295011945a 100644 --- a/types/lodash/seq/thru.d.ts +++ b/types/lodash/seq/thru.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/camelCase.d.ts b/types/lodash/string/camelCase.d.ts index 3e92da188f..8362137353 100644 --- a/types/lodash/string/camelCase.d.ts +++ b/types/lodash/string/camelCase.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/capitalize.d.ts b/types/lodash/string/capitalize.d.ts index 0c4086db98..678f1c1de6 100644 --- a/types/lodash/string/capitalize.d.ts +++ b/types/lodash/string/capitalize.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/deburr.d.ts b/types/lodash/string/deburr.d.ts index 8e01b0c13a..85d3476be1 100644 --- a/types/lodash/string/deburr.d.ts +++ b/types/lodash/string/deburr.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/endsWith.d.ts b/types/lodash/string/endsWith.d.ts index 3261b90642..383c0acc41 100644 --- a/types/lodash/string/endsWith.d.ts +++ b/types/lodash/string/endsWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/escape.d.ts b/types/lodash/string/escape.d.ts index 4ef334a935..21131ee05f 100644 --- a/types/lodash/string/escape.d.ts +++ b/types/lodash/string/escape.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/escapeRegExp.d.ts b/types/lodash/string/escapeRegExp.d.ts index f21adb380e..a05b2b80ab 100644 --- a/types/lodash/string/escapeRegExp.d.ts +++ b/types/lodash/string/escapeRegExp.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/kebabCase.d.ts b/types/lodash/string/kebabCase.d.ts index 9c8527f4e4..eac11176a7 100644 --- a/types/lodash/string/kebabCase.d.ts +++ b/types/lodash/string/kebabCase.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/lowerCase.d.ts b/types/lodash/string/lowerCase.d.ts index 25db8151db..5349f3af18 100644 --- a/types/lodash/string/lowerCase.d.ts +++ b/types/lodash/string/lowerCase.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/lowerFirst.d.ts b/types/lodash/string/lowerFirst.d.ts index 4dc55d3590..54cacab3e6 100644 --- a/types/lodash/string/lowerFirst.d.ts +++ b/types/lodash/string/lowerFirst.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/pad.d.ts b/types/lodash/string/pad.d.ts index 2de1a43c36..d47f48afad 100644 --- a/types/lodash/string/pad.d.ts +++ b/types/lodash/string/pad.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/padEnd.d.ts b/types/lodash/string/padEnd.d.ts index cb27815729..ed4c552705 100644 --- a/types/lodash/string/padEnd.d.ts +++ b/types/lodash/string/padEnd.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/padStart.d.ts b/types/lodash/string/padStart.d.ts index e73fbf9923..02f2ce2752 100644 --- a/types/lodash/string/padStart.d.ts +++ b/types/lodash/string/padStart.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/parseInt.d.ts b/types/lodash/string/parseInt.d.ts index ec786dadae..082b45617d 100644 --- a/types/lodash/string/parseInt.d.ts +++ b/types/lodash/string/parseInt.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/repeat.d.ts b/types/lodash/string/repeat.d.ts index f634895d94..a72cda78b1 100644 --- a/types/lodash/string/repeat.d.ts +++ b/types/lodash/string/repeat.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/replace.d.ts b/types/lodash/string/replace.d.ts index 30284543d8..9245e2d712 100644 --- a/types/lodash/string/replace.d.ts +++ b/types/lodash/string/replace.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/snakeCase.d.ts b/types/lodash/string/snakeCase.d.ts index ffeb9ce551..efdaac05d0 100644 --- a/types/lodash/string/snakeCase.d.ts +++ b/types/lodash/string/snakeCase.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/split.d.ts b/types/lodash/string/split.d.ts index 73c0084798..e964d851ce 100644 --- a/types/lodash/string/split.d.ts +++ b/types/lodash/string/split.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/startCase.d.ts b/types/lodash/string/startCase.d.ts index dcb0ac8118..19e0551bf6 100644 --- a/types/lodash/string/startCase.d.ts +++ b/types/lodash/string/startCase.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/startsWith.d.ts b/types/lodash/string/startsWith.d.ts index 5185f48ac1..6090c2ed69 100644 --- a/types/lodash/string/startsWith.d.ts +++ b/types/lodash/string/startsWith.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/template.d.ts b/types/lodash/string/template.d.ts index ed1f6444da..a876c72fd8 100644 --- a/types/lodash/string/template.d.ts +++ b/types/lodash/string/template.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface TemplateOptions extends TemplateSettings { /** diff --git a/types/lodash/string/toLower.d.ts b/types/lodash/string/toLower.d.ts index 3fd92d0ca7..522014d583 100644 --- a/types/lodash/string/toLower.d.ts +++ b/types/lodash/string/toLower.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/toUpper.d.ts b/types/lodash/string/toUpper.d.ts index b2fd186b8a..5b2215685b 100644 --- a/types/lodash/string/toUpper.d.ts +++ b/types/lodash/string/toUpper.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/trim.d.ts b/types/lodash/string/trim.d.ts index f9636c232e..47e2a81d36 100644 --- a/types/lodash/string/trim.d.ts +++ b/types/lodash/string/trim.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/trimEnd.d.ts b/types/lodash/string/trimEnd.d.ts index 6f866e9a73..1af345dd74 100644 --- a/types/lodash/string/trimEnd.d.ts +++ b/types/lodash/string/trimEnd.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/trimStart.d.ts b/types/lodash/string/trimStart.d.ts index 255a13f2e9..1055f6b1d3 100644 --- a/types/lodash/string/trimStart.d.ts +++ b/types/lodash/string/trimStart.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/truncate.d.ts b/types/lodash/string/truncate.d.ts index 98a67d4671..23d4039356 100644 --- a/types/lodash/string/truncate.d.ts +++ b/types/lodash/string/truncate.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface TruncateOptions { /** The maximum string length. */ diff --git a/types/lodash/string/unescape.d.ts b/types/lodash/string/unescape.d.ts index 8a5c5e8cfc..3e2be90abb 100644 --- a/types/lodash/string/unescape.d.ts +++ b/types/lodash/string/unescape.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/upperCase.d.ts b/types/lodash/string/upperCase.d.ts index 11e7354c60..d33b6885b9 100644 --- a/types/lodash/string/upperCase.d.ts +++ b/types/lodash/string/upperCase.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/upperFirst.d.ts b/types/lodash/string/upperFirst.d.ts index f8f2e1ecd8..692aa702cd 100644 --- a/types/lodash/string/upperFirst.d.ts +++ b/types/lodash/string/upperFirst.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/string/words.d.ts b/types/lodash/string/words.d.ts index 4ff9508d1b..4ca4530513 100644 --- a/types/lodash/string/words.d.ts +++ b/types/lodash/string/words.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/tsconfig.json b/types/lodash/tsconfig.json index af6ba5e2e9..7bd90cb77f 100644 --- a/types/lodash/tsconfig.json +++ b/types/lodash/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -318,4 +319,4 @@ "zipObjectDeep.d.ts", "zipWith.d.ts" ] -} +} \ No newline at end of file diff --git a/types/lodash/util/attempt.d.ts b/types/lodash/util/attempt.d.ts index 6d8d140742..b539421d13 100644 --- a/types/lodash/util/attempt.d.ts +++ b/types/lodash/util/attempt.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/bindAll.d.ts b/types/lodash/util/bindAll.d.ts index 6e78003bff..1ebe05fe60 100644 --- a/types/lodash/util/bindAll.d.ts +++ b/types/lodash/util/bindAll.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/cond.d.ts b/types/lodash/util/cond.d.ts index ec34302904..036f518184 100644 --- a/types/lodash/util/cond.d.ts +++ b/types/lodash/util/cond.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/conforms.d.ts b/types/lodash/util/conforms.d.ts index 9ffd984ffe..9da61cedd1 100644 --- a/types/lodash/util/conforms.d.ts +++ b/types/lodash/util/conforms.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { type ConformsPredicateObject = { [P in keyof T]?: (val: T[P]) => boolean; diff --git a/types/lodash/util/constant.d.ts b/types/lodash/util/constant.d.ts index a0f5742342..9255171af1 100644 --- a/types/lodash/util/constant.d.ts +++ b/types/lodash/util/constant.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/defaultTo.d.ts b/types/lodash/util/defaultTo.d.ts index 1bb533f8cf..ced0e976c5 100644 --- a/types/lodash/util/defaultTo.d.ts +++ b/types/lodash/util/defaultTo.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/flow.d.ts b/types/lodash/util/flow.d.ts index 49f28d0678..90736c5da4 100644 --- a/types/lodash/util/flow.d.ts +++ b/types/lodash/util/flow.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/flowRight.d.ts b/types/lodash/util/flowRight.d.ts index 358ea933a3..e61f162ce3 100644 --- a/types/lodash/util/flowRight.d.ts +++ b/types/lodash/util/flowRight.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/identity.d.ts b/types/lodash/util/identity.d.ts index 9ecc96fd8d..6fff4525ad 100644 --- a/types/lodash/util/identity.d.ts +++ b/types/lodash/util/identity.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/iteratee.d.ts b/types/lodash/util/iteratee.d.ts index d80d154e85..b41c6d3cf2 100644 --- a/types/lodash/util/iteratee.d.ts +++ b/types/lodash/util/iteratee.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/matches.d.ts b/types/lodash/util/matches.d.ts index d5147ccb78..b919ffbbcc 100644 --- a/types/lodash/util/matches.d.ts +++ b/types/lodash/util/matches.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/matchesProperty.d.ts b/types/lodash/util/matchesProperty.d.ts index c96d2422a8..fc574be4f9 100644 --- a/types/lodash/util/matchesProperty.d.ts +++ b/types/lodash/util/matchesProperty.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/method.d.ts b/types/lodash/util/method.d.ts index 23b1600bc9..09c508caef 100644 --- a/types/lodash/util/method.d.ts +++ b/types/lodash/util/method.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/methodOf.d.ts b/types/lodash/util/methodOf.d.ts index acd9afa335..4ec4d15515 100644 --- a/types/lodash/util/methodOf.d.ts +++ b/types/lodash/util/methodOf.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/mixin.d.ts b/types/lodash/util/mixin.d.ts index 230b355322..02237ae751 100644 --- a/types/lodash/util/mixin.d.ts +++ b/types/lodash/util/mixin.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface MixinOptions { chain?: boolean; diff --git a/types/lodash/util/noConflict.d.ts b/types/lodash/util/noConflict.d.ts index 948ba75863..80ecca9f10 100644 --- a/types/lodash/util/noConflict.d.ts +++ b/types/lodash/util/noConflict.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/noop.d.ts b/types/lodash/util/noop.d.ts index c6b0475f69..ca66677e57 100644 --- a/types/lodash/util/noop.d.ts +++ b/types/lodash/util/noop.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/nthArg.d.ts b/types/lodash/util/nthArg.d.ts index 69a6087424..c5b6b0d5db 100644 --- a/types/lodash/util/nthArg.d.ts +++ b/types/lodash/util/nthArg.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/over.d.ts b/types/lodash/util/over.d.ts index 7b98d05618..2b4b49f573 100644 --- a/types/lodash/util/over.d.ts +++ b/types/lodash/util/over.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/overEvery.d.ts b/types/lodash/util/overEvery.d.ts index e88b3f2a27..d061d3ec72 100644 --- a/types/lodash/util/overEvery.d.ts +++ b/types/lodash/util/overEvery.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/overSome.d.ts b/types/lodash/util/overSome.d.ts index b177805dc2..1ff92f8d42 100644 --- a/types/lodash/util/overSome.d.ts +++ b/types/lodash/util/overSome.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/property.d.ts b/types/lodash/util/property.d.ts index 72658a89dc..8edab90248 100644 --- a/types/lodash/util/property.d.ts +++ b/types/lodash/util/property.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/propertyOf.d.ts b/types/lodash/util/propertyOf.d.ts index 2bfab04f86..cc272ec7bf 100644 --- a/types/lodash/util/propertyOf.d.ts +++ b/types/lodash/util/propertyOf.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/range.d.ts b/types/lodash/util/range.d.ts index f92af4de75..35bf7e3d2e 100644 --- a/types/lodash/util/range.d.ts +++ b/types/lodash/util/range.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/rangeRight.d.ts b/types/lodash/util/rangeRight.d.ts index b63da90370..ced80d5968 100644 --- a/types/lodash/util/rangeRight.d.ts +++ b/types/lodash/util/rangeRight.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/runInContext.d.ts b/types/lodash/util/runInContext.d.ts index 4bd523e96c..38fb1ff6b1 100644 --- a/types/lodash/util/runInContext.d.ts +++ b/types/lodash/util/runInContext.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/stubArray.d.ts b/types/lodash/util/stubArray.d.ts index 92b1bbeba1..b8440b7f25 100644 --- a/types/lodash/util/stubArray.d.ts +++ b/types/lodash/util/stubArray.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/stubFalse.d.ts b/types/lodash/util/stubFalse.d.ts index deb8d92543..394bdc5cce 100644 --- a/types/lodash/util/stubFalse.d.ts +++ b/types/lodash/util/stubFalse.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/stubObject.d.ts b/types/lodash/util/stubObject.d.ts index 2fa401fa75..877decfcf0 100644 --- a/types/lodash/util/stubObject.d.ts +++ b/types/lodash/util/stubObject.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/stubString.d.ts b/types/lodash/util/stubString.d.ts index 8badcdf7f6..6967aafc14 100644 --- a/types/lodash/util/stubString.d.ts +++ b/types/lodash/util/stubString.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/stubTrue.d.ts b/types/lodash/util/stubTrue.d.ts index 1191db4cfb..2a18d82e88 100644 --- a/types/lodash/util/stubTrue.d.ts +++ b/types/lodash/util/stubTrue.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/times.d.ts b/types/lodash/util/times.d.ts index 9860d13ea6..1056080ebf 100644 --- a/types/lodash/util/times.d.ts +++ b/types/lodash/util/times.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/toPath.d.ts b/types/lodash/util/toPath.d.ts index 74905ff4ef..e98a9eb30f 100644 --- a/types/lodash/util/toPath.d.ts +++ b/types/lodash/util/toPath.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/util/uniqueId.d.ts b/types/lodash/util/uniqueId.d.ts index 7f1e8c252f..75bedcaa94 100644 --- a/types/lodash/util/uniqueId.d.ts +++ b/types/lodash/util/uniqueId.d.ts @@ -1,4 +1,4 @@ -import * as _ from "../index"; +import _ = require("../index"); declare module "../index" { interface LoDashStatic { /** diff --git a/types/lodash/v3/tsconfig.json b/types/lodash/v3/tsconfig.json index 5c5613d3f6..1040ab2909 100644 --- a/types/lodash/v3/tsconfig.json +++ b/types/lodash/v3/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/log-symbols/tsconfig.json b/types/log-symbols/tsconfig.json index 8677d194b0..ea0c26df1f 100644 --- a/types/log-symbols/tsconfig.json +++ b/types/log-symbols/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/log-update/tsconfig.json b/types/log-update/tsconfig.json index 888455297b..adf2bc1f11 100644 --- a/types/log-update/tsconfig.json +++ b/types/log-update/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/logat/tsconfig.json b/types/logat/tsconfig.json index 75453c3721..9d7c306b17 100644 --- a/types/logat/tsconfig.json +++ b/types/logat/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/logform/tsconfig.json b/types/logform/tsconfig.json index 5b68ac3c28..c8f0b78465 100644 --- a/types/logform/tsconfig.json +++ b/types/logform/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "logform-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/logg/tsconfig.json b/types/logg/tsconfig.json index 9dd1a361e7..3aa48bf94a 100644 --- a/types/logg/tsconfig.json +++ b/types/logg/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/loggly/tsconfig.json b/types/loggly/tsconfig.json index 76b8a59ac2..7f58c0566a 100644 --- a/types/loggly/tsconfig.json +++ b/types/loggly/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/loglevel/tsconfig.json b/types/loglevel/tsconfig.json index 4d370f7a24..24356220d6 100644 --- a/types/loglevel/tsconfig.json +++ b/types/loglevel/tsconfig.json @@ -14,11 +14,12 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "test/loglevel-tests.ts", "test/loglevel-umd-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/logrotate-stream/tsconfig.json b/types/logrotate-stream/tsconfig.json index 2f82ad189f..71cfc9061a 100644 --- a/types/logrotate-stream/tsconfig.json +++ b/types/logrotate-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lokijs/tsconfig.json b/types/lokijs/tsconfig.json index 96175c28a4..39e3841c03 100644 --- a/types/lokijs/tsconfig.json +++ b/types/lokijs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lolex/tsconfig.json b/types/lolex/tsconfig.json index e9ab242410..6a181ec052 100644 --- a/types/lolex/tsconfig.json +++ b/types/lolex/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/long/tsconfig.json b/types/long/tsconfig.json index 2d90b2337f..6a07cb3a61 100644 --- a/types/long/tsconfig.json +++ b/types/long/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/loopback-boot/loopback-boot-tests.ts b/types/loopback-boot/loopback-boot-tests.ts index 5de95d00c6..8fa409c768 100644 --- a/types/loopback-boot/loopback-boot-tests.ts +++ b/types/loopback-boot/loopback-boot-tests.ts @@ -1,6 +1,6 @@ -import * as loopback from 'loopback'; -import * as boot from 'loopback-boot'; -import * as cookieParser from 'cookie-parser'; +import loopback = require('loopback'); +import boot = require('loopback-boot'); +import cookieParser = require('cookie-parser'); class Server { app: loopback.LoopBackApplication; diff --git a/types/loopback-boot/tsconfig.json b/types/loopback-boot/tsconfig.json index 2a7cbe1ca5..6f4a061162 100644 --- a/types/loopback-boot/tsconfig.json +++ b/types/loopback-boot/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/loopback/loopback-tests.ts b/types/loopback/loopback-tests.ts index ed37bf5804..359e6977b6 100644 --- a/types/loopback/loopback-tests.ts +++ b/types/loopback/loopback-tests.ts @@ -1,5 +1,5 @@ -import * as loopback from 'loopback'; -import * as cookieParser from 'cookie-parser'; +import loopback = require('loopback'); +import cookieParser = require('cookie-parser'); class TestModel { id: number; diff --git a/types/loopback/tsconfig.json b/types/loopback/tsconfig.json index b967450fde..c823167232 100644 --- a/types/loopback/tsconfig.json +++ b/types/loopback/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lorem-ipsum/tsconfig.json b/types/lorem-ipsum/tsconfig.json index c1f3e00374..5575163410 100644 --- a/types/lorem-ipsum/tsconfig.json +++ b/types/lorem-ipsum/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lory.js/tsconfig.json b/types/lory.js/tsconfig.json index 94d47b69ea..6421fd1c74 100644 --- a/types/lory.js/tsconfig.json +++ b/types/lory.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/loud-rejection/tsconfig.json b/types/loud-rejection/tsconfig.json index 56909e692c..10ea4f7604 100644 --- a/types/loud-rejection/tsconfig.json +++ b/types/loud-rejection/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lovefield/tsconfig.json b/types/lovefield/tsconfig.json index fa9ed6e11d..08338eadd1 100644 --- a/types/lovefield/tsconfig.json +++ b/types/lovefield/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lowdb/tsconfig.json b/types/lowdb/tsconfig.json index 7897564789..1de72964d4 100644 --- a/types/lowdb/tsconfig.json +++ b/types/lowdb/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -28,4 +29,4 @@ "lib/main.d.ts", "lowdb-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/lowlight/tsconfig.json b/types/lowlight/tsconfig.json index 31ecea4b06..0a49e6766b 100644 --- a/types/lowlight/tsconfig.json +++ b/types/lowlight/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lozad/tsconfig.json b/types/lozad/tsconfig.json index 9243f7f7d4..d61aba4331 100644 --- a/types/lozad/tsconfig.json +++ b/types/lozad/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lru-cache/tsconfig.json b/types/lru-cache/tsconfig.json index de5c387339..f43250b4df 100644 --- a/types/lru-cache/tsconfig.json +++ b/types/lru-cache/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lscache/tsconfig.json b/types/lscache/tsconfig.json index 50876365a3..2d2820887b 100644 --- a/types/lscache/tsconfig.json +++ b/types/lscache/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ltx/tsconfig.json b/types/ltx/tsconfig.json index d4af416e4b..6dc4e36d43 100644 --- a/types/ltx/tsconfig.json +++ b/types/ltx/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/luaparse/tsconfig.json b/types/luaparse/tsconfig.json index 8e932f496e..20bb41fd6f 100644 --- a/types/luaparse/tsconfig.json +++ b/types/luaparse/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lunr/tsconfig.json b/types/lunr/tsconfig.json index 87faffb76d..703cfe59e2 100644 --- a/types/lunr/tsconfig.json +++ b/types/lunr/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lunr/v0/tsconfig.json b/types/lunr/v0/tsconfig.json index a98126157c..e5e4452efe 100644 --- a/types/lunr/v0/tsconfig.json +++ b/types/lunr/v0/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lusca/tsconfig.json b/types/lusca/tsconfig.json index ede7926c1c..121ac13cb6 100644 --- a/types/lusca/tsconfig.json +++ b/types/lusca/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "lusca-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/luxon/index.d.ts b/types/luxon/index.d.ts index 327fe15ade..fac0b90fe6 100644 --- a/types/luxon/index.d.ts +++ b/types/luxon/index.d.ts @@ -287,13 +287,14 @@ declare module 'luxon' { type Features = { intl: boolean; intlTokens: boolean; - timezones: boolean; + zones: boolean; }; namespace Info { function eras(length?: EraLength, options?: InfoOptions): string[]; function features(): Features; function hasDST(zone: string | Zone): boolean; + function isValidIANAZone(zone: string): boolean; function meridiems(options?: InfoOptions): string[]; function months(length?: UnitLength, options?: UnitOptions): string[]; function monthsFormat(length?: UnitLength, options?: UnitOptions): string[]; diff --git a/types/luxon/luxon-tests.ts b/types/luxon/luxon-tests.ts index 6310342899..11ef254ae9 100644 --- a/types/luxon/luxon-tests.ts +++ b/types/luxon/luxon-tests.ts @@ -78,6 +78,9 @@ i.toString(); /* Info */ Info.months(); Info.weekdays('long'); +Info.features().intl; +Info.features().intlTokens; +Info.features().zones; /* Settings */ Settings.defaultLocale; diff --git a/types/luxon/tsconfig.json b/types/luxon/tsconfig.json index e1b0e7864c..5cc88630a1 100644 --- a/types/luxon/tsconfig.json +++ b/types/luxon/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "luxon-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/lwip/tsconfig.json b/types/lwip/tsconfig.json index 769d843dfa..9ee6b81563 100644 --- a/types/lwip/tsconfig.json +++ b/types/lwip/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/lz-string/tsconfig.json b/types/lz-string/tsconfig.json index 40ca2ffb09..dde67f8095 100644 --- a/types/lz-string/tsconfig.json +++ b/types/lz-string/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/magic-number/tsconfig.json b/types/magic-number/tsconfig.json index 8dedeff2ce..b1f79faabc 100644 --- a/types/magic-number/tsconfig.json +++ b/types/magic-number/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/magicsuggest/tsconfig.json b/types/magicsuggest/tsconfig.json index 19b82ea9cd..c653b426c2 100644 --- a/types/magicsuggest/tsconfig.json +++ b/types/magicsuggest/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/magnet-uri/tsconfig.json b/types/magnet-uri/tsconfig.json index e47bf7de89..6e9dde38d8 100644 --- a/types/magnet-uri/tsconfig.json +++ b/types/magnet-uri/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mailcheck/tsconfig.json b/types/mailcheck/tsconfig.json index 9f3bada102..29af1c15d0 100644 --- a/types/mailcheck/tsconfig.json +++ b/types/mailcheck/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/maildev/tsconfig.json b/types/maildev/tsconfig.json index e7d5d8aa90..dff916fbd2 100644 --- a/types/maildev/tsconfig.json +++ b/types/maildev/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mailgen/tsconfig.json b/types/mailgen/tsconfig.json index be58901e20..54d65b6c43 100644 --- a/types/mailgen/tsconfig.json +++ b/types/mailgen/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mailparser/tsconfig.json b/types/mailparser/tsconfig.json index 0e85dee795..3570cc37d0 100644 --- a/types/mailparser/tsconfig.json +++ b/types/mailparser/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/main-bower-files/tsconfig.json b/types/main-bower-files/tsconfig.json index bde61fa6db..03d4c7ad1f 100644 --- a/types/main-bower-files/tsconfig.json +++ b/types/main-bower-files/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mainloop.js/tsconfig.json b/types/mainloop.js/tsconfig.json index b8e7bf9fd5..784abcc46e 100644 --- a/types/mainloop.js/tsconfig.json +++ b/types/mainloop.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/make-dir/tsconfig.json b/types/make-dir/tsconfig.json index f1770d52af..90fb4e1cdc 100644 --- a/types/make-dir/tsconfig.json +++ b/types/make-dir/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/maker.js/tsconfig.json b/types/maker.js/tsconfig.json index 3f15fa99e1..62757799a0 100644 --- a/types/maker.js/tsconfig.json +++ b/types/maker.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mandrill-api/tsconfig.json b/types/mandrill-api/tsconfig.json index 9855b826de..26cc6e44e4 100644 --- a/types/mandrill-api/tsconfig.json +++ b/types/mandrill-api/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/map-obj/tsconfig.json b/types/map-obj/tsconfig.json index 70c0243a5b..c640073717 100644 --- a/types/map-obj/tsconfig.json +++ b/types/map-obj/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index 1f0edaf412..47f62556c3 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -26,8 +26,12 @@ declare namespace mapboxgl { constructor(options?: MapboxOptions); addControl(control: Control, position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'): this; + + addControl(control: IControl, position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'): this; removeControl(control: Control): this; + + removeControl(control: IControl): this; addClass(klass: string, options?: mapboxgl.StyleOptions): this; diff --git a/types/mapbox-gl/tsconfig.json b/types/mapbox-gl/tsconfig.json index 4c4228132e..347f097155 100644 --- a/types/mapbox-gl/tsconfig.json +++ b/types/mapbox-gl/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "mapbox-gl-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/mapbox/tsconfig.json b/types/mapbox/tsconfig.json index 9aec764a7c..97c6c610a8 100644 --- a/types/mapbox/tsconfig.json +++ b/types/mapbox/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mapbox__shelf-pack/tsconfig.json b/types/mapbox__shelf-pack/tsconfig.json index 49afd3f46e..6dd2d6f58f 100644 --- a/types/mapbox__shelf-pack/tsconfig.json +++ b/types/mapbox__shelf-pack/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mapnik/tsconfig.json b/types/mapnik/tsconfig.json index 81f111a37e..4112c1aab4 100644 --- a/types/mapnik/tsconfig.json +++ b/types/mapnik/tsconfig.json @@ -1,23 +1,24 @@ { - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "mapnik-tests.ts" - ] + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "mapnik-tests.ts" + ] } \ No newline at end of file diff --git a/types/mapsjs/tsconfig.json b/types/mapsjs/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/mapsjs/tsconfig.json +++ b/types/mapsjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/mariasql/tsconfig.json b/types/mariasql/tsconfig.json index bab62b5218..353dfdd4b9 100644 --- a/types/mariasql/tsconfig.json +++ b/types/mariasql/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mark.js/tsconfig.json b/types/mark.js/tsconfig.json index 381f150954..9a75e5b93b 100644 --- a/types/mark.js/tsconfig.json +++ b/types/mark.js/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "mark.js-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/markdown-it-anchor/tsconfig.json b/types/markdown-it-anchor/tsconfig.json index df3de49f4a..8b1b51c3c4 100644 --- a/types/markdown-it-anchor/tsconfig.json +++ b/types/markdown-it-anchor/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/markdown-it-container/tsconfig.json b/types/markdown-it-container/tsconfig.json index 9dd6ec9ad2..9d32044fcb 100644 --- a/types/markdown-it-container/tsconfig.json +++ b/types/markdown-it-container/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/markdown-it/tsconfig.json b/types/markdown-it/tsconfig.json index fc493d2d9b..2cddb5aefd 100644 --- a/types/markdown-it/tsconfig.json +++ b/types/markdown-it/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/markdownlint/tsconfig.json b/types/markdownlint/tsconfig.json index 53b9ae46aa..193076542b 100644 --- a/types/markdownlint/tsconfig.json +++ b/types/markdownlint/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "markdownlint-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/marked/tsconfig.json b/types/marked/tsconfig.json index 222ab4e4f1..8380a3964f 100644 --- a/types/marked/tsconfig.json +++ b/types/marked/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/marker-animate-unobtrusive/tsconfig.json b/types/marker-animate-unobtrusive/tsconfig.json index 68e2526510..1b1c994cb4 100644 --- a/types/marker-animate-unobtrusive/tsconfig.json +++ b/types/marker-animate-unobtrusive/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/markerclustererplus/tsconfig.json b/types/markerclustererplus/tsconfig.json index 0aca5b9a0a..f4c0adbebc 100644 --- a/types/markerclustererplus/tsconfig.json +++ b/types/markerclustererplus/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/markitup/tsconfig.json b/types/markitup/tsconfig.json index daa2c18b72..384fb13be7 100644 --- a/types/markitup/tsconfig.json +++ b/types/markitup/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/maskedinput/tsconfig.json b/types/maskedinput/tsconfig.json index 0884b77742..90ead5dea0 100644 --- a/types/maskedinput/tsconfig.json +++ b/types/maskedinput/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/masonry-layout/tsconfig.json b/types/masonry-layout/tsconfig.json index a2133122a5..e0ebcb530e 100644 --- a/types/masonry-layout/tsconfig.json +++ b/types/masonry-layout/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/massive/tsconfig.json b/types/massive/tsconfig.json index 916b3e2b47..da316ae1a5 100644 --- a/types/massive/tsconfig.json +++ b/types/massive/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/massive/v3/tsconfig.json b/types/massive/v3/tsconfig.json index ddfdc175d3..334d74eea1 100644 --- a/types/massive/v3/tsconfig.json +++ b/types/massive/v3/tsconfig.json @@ -12,15 +12,18 @@ "../../" ], "paths": { - "massive": [ "massive/v3" ] + "massive": [ + "massive/v3" + ] }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ "index.d.ts", "massive-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/match-media-mock/tsconfig.json b/types/match-media-mock/tsconfig.json index adcb526b65..9187747e27 100644 --- a/types/match-media-mock/tsconfig.json +++ b/types/match-media-mock/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/material-components-web/index.d.ts b/types/material-components-web/index.d.ts new file mode 100644 index 0000000000..c5d1434942 --- /dev/null +++ b/types/material-components-web/index.d.ts @@ -0,0 +1,64 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import autoInit from 'material__auto-init'; +import * as base from 'material__base'; +import * as checkbox from 'material__checkbox'; +import * as dialog from 'material__dialog'; +import * as drawer from 'material__drawer'; +import * as formField from 'material__form-field'; +import * as gridList from 'material__grid-list'; +import * as iconToggle from 'material__icon-toggle'; +import * as linearProgress from 'material__linear-progress'; +import * as menu from 'material__menu'; +import * as radio from 'material__radio'; +import * as ripple from 'material__ripple'; +import * as select from 'material__select'; +import * as selectionControl from 'material__selection-control'; +import * as slider from 'material__slider'; +import * as snackbar from 'material__snackbar'; +import * as tabs from 'material__tabs'; +import * as textField from 'material__textfield'; +import * as toolbar from 'material__toolbar'; + +// Export all components. +export { + autoInit, + base, + checkbox, + dialog, + drawer, + formField, + gridList, + iconToggle, + linearProgress, + menu, + radio, + ripple, + select, + selectionControl, + slider, + snackbar, + tabs, + textField, + toolbar, +}; diff --git a/types/material-components-web/tsconfig.json b/types/material-components-web/tsconfig.json new file mode 100644 index 0000000000..8b1b69457e --- /dev/null +++ b/types/material-components-web/tsconfig.json @@ -0,0 +1,24 @@ +{ + "files": [ + "index.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material-components-web/tslint.json b/types/material-components-web/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material-components-web/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material-design-lite/tsconfig.json b/types/material-design-lite/tsconfig.json index 96da690ed9..0672184541 100644 --- a/types/material-design-lite/tsconfig.json +++ b/types/material-design-lite/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/material-ui-datatables/tsconfig.json b/types/material-ui-datatables/tsconfig.json index 805afdbb17..1b91dcedd6 100644 --- a/types/material-ui-datatables/tsconfig.json +++ b/types/material-ui-datatables/tsconfig.json @@ -15,7 +15,8 @@ "jsx": "react", "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/material-ui-pagination/material-ui-pagination-tests.tsx b/types/material-ui-pagination/material-ui-pagination-tests.tsx index a7f85d8184..d680f95e1f 100644 --- a/types/material-ui-pagination/material-ui-pagination-tests.tsx +++ b/types/material-ui-pagination/material-ui-pagination-tests.tsx @@ -5,7 +5,7 @@ import * as ReactDOM from 'react-dom'; import Pagination from 'material-ui-pagination'; import * as ui from 'material-ui'; import { MuiThemeProvider } from 'material-ui/styles'; -import * as injectTapEventPlugin from 'react-tap-event-plugin'; +import injectTapEventPlugin = require('react-tap-event-plugin'); // Needed for onTouchTap // Check this repo: diff --git a/types/material-ui-pagination/tsconfig.json b/types/material-ui-pagination/tsconfig.json index c98526003d..eef315d2c9 100644 --- a/types/material-ui-pagination/tsconfig.json +++ b/types/material-ui-pagination/tsconfig.json @@ -21,6 +21,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/material-ui/tsconfig.json b/types/material-ui/tsconfig.json index 7d478ab185..0d3a5e6d32 100644 --- a/types/material-ui/tsconfig.json +++ b/types/material-ui/tsconfig.json @@ -21,6 +21,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/material__animation/index.d.ts b/types/material__animation/index.d.ts new file mode 100644 index 0000000000..8baf562003 --- /dev/null +++ b/types/material__animation/index.d.ts @@ -0,0 +1,27 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export const transformStyleProperties: string[]; + +export function getCorrectEventName(windowObj: Window, eventType: string): string; + +export function getCorrectPropertyName(windowObj: Window, eventType: string): string; diff --git a/types/material__animation/tsconfig.json b/types/material__animation/tsconfig.json new file mode 100644 index 0000000000..0cbce49fc7 --- /dev/null +++ b/types/material__animation/tsconfig.json @@ -0,0 +1,25 @@ +{ + "files": [ + "index.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__animation/tslint.json b/types/material__animation/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__animation/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__auto-init/index.d.ts b/types/material__auto-init/index.d.ts new file mode 100644 index 0000000000..026b692b99 --- /dev/null +++ b/types/material__auto-init/index.d.ts @@ -0,0 +1,37 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export type MDCLogger = (message?: any, ...optionalParams: any[]) => void; + +export interface MDCAutoInit { + (root?: Document, warn?: MDCLogger): MDCAutoInit; + register(componentName: string, Ctor: (...args: any[]) => any, warn?: MDCLogger): void; + deregister(componentName: string): void; + deregisterAll(): void; +} + +/** + * Auto-initializes all mdc components on a page. + */ +declare const mdcAutoInit: MDCAutoInit; + +export default mdcAutoInit; diff --git a/types/material__auto-init/tsconfig.json b/types/material__auto-init/tsconfig.json new file mode 100644 index 0000000000..0cbce49fc7 --- /dev/null +++ b/types/material__auto-init/tsconfig.json @@ -0,0 +1,25 @@ +{ + "files": [ + "index.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__auto-init/tslint.json b/types/material__auto-init/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__auto-init/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__base/component.d.ts b/types/material__base/component.d.ts new file mode 100644 index 0000000000..0a645b26a4 --- /dev/null +++ b/types/material__base/component.d.ts @@ -0,0 +1,63 @@ +/** + * @license + * Copyright 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCFoundation from './foundation'; + +export class MDCComponent> { + static attachTo(root: Element): MDCComponent>; + + constructor(root: Element, foundation?: F, ...args: any[]); + + // Subclasses can override this to do any additional setup work that would be considered part of a + // "constructor". Essentially, it is a hook into the parent constructor before the foundation is + // initialized. Any additional arguments besides root and foundation will be passed in here. + initialize(...args: any[]): void; + + // Subclasses must override this method to return a properly configured foundation class for the + // component. + getDefaultFoundation(): F; + + // Subclasses should override this method if they need to perform work to synchronize with a host DOM + // object. An example of this would be a form control wrapper that needs to synchronize its internal state + // to some property or attribute of the host DOM. Please note: this is *not* the place to perform DOM + // reads/writes that would cause layout / paint, as this is called synchronously from within the constructor. + initialSyncWithDOM(): void; + + // Subclasses may implement this method to release any resources / deregister any listeners they have + // attached. An example of this might be deregistering a resize event from the window object. + destroy(): void; + + /** + * Wrapper method to add an event listener to the component's root element. This is most useful when + * listening for custom events. + */ + listen(evtType: string, handler: EventListenerOrEventListenerObject): void; + + /** + * Wrapper method to remove an event listener to the component's root element. This is most useful when + * unlistening for custom events. + */ + unlisten(evtType: string, handler: EventListenerOrEventListenerObject): void; + + /** + * Fires a cross-browser-compatible custom event from the component root of the given type, + * with the given data. + */ + emit(evtType: string, evtData: any, shouldBubble?: boolean): void; +} + +export default MDCComponent; diff --git a/types/material__base/foundation.d.ts b/types/material__base/foundation.d.ts new file mode 100644 index 0000000000..7612d0daea --- /dev/null +++ b/types/material__base/foundation.d.ts @@ -0,0 +1,44 @@ +/** + * @license + * Copyright 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface MDCStrings { + [key: string]: string; +} + +export interface MDCNumbers { + [key: string]: number; +} + +export class MDCFoundation { + static readonly cssClasses: MDCStrings; + + static readonly strings: MDCStrings; + + static readonly numbers: MDCNumbers; + + static readonly defaultAdapter: any; + + constructor(adapter: A); + + // Subclasses should override this method to perform initialization routines (registering events, etc.) + init(): void; + + // Subclasses should override this method to perform de-initialization routines (de-registering events, etc.) + destroy(): void; +} + +export default MDCFoundation; diff --git a/types/material__base/index.d.ts b/types/material__base/index.d.ts new file mode 100644 index 0000000000..0172cb35f6 --- /dev/null +++ b/types/material__base/index.d.ts @@ -0,0 +1,27 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * @license + * Copyright 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCNumbers, MDCStrings, MDCFoundation } from './foundation'; +import MDCComponent from './component'; + +export {MDCNumbers, MDCStrings, MDCFoundation, MDCComponent}; diff --git a/types/material__base/tsconfig.json b/types/material__base/tsconfig.json new file mode 100644 index 0000000000..3cd07b146b --- /dev/null +++ b/types/material__base/tsconfig.json @@ -0,0 +1,27 @@ +{ + "files": [ + "component.d.ts", + "index.d.ts", + "foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__base/tslint.json b/types/material__base/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__base/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__checkbox/adapter.d.ts b/types/material__checkbox/adapter.d.ts new file mode 100644 index 0000000000..aedeed30f5 --- /dev/null +++ b/types/material__checkbox/adapter.d.ts @@ -0,0 +1,54 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCSelectionControlState } from 'material__selection-control'; + +/** + * Adapter for MDC Checkbox. Provides an interface for managing + * - classes + * - dom + * - event handlers + * + * Additionally, provides type information for the adapter to the Closure + * compiler. + * + * Implement this adapter for your framework of choice to delegate updates to + * the component in your framework of choice. See architecture documentation + * for more details. + * https://github.com/material-components/material-components-web/blob/master/docs/architecture.md + */ +export class MDCCheckboxAdapter { + addClass(className: string): void; + + removeClass(className: string): void; + + registerAnimationEndHandler(handler: EventListener): void; + + deregisterAnimationEndHandler(handler: EventListener): void; + + registerChangeHandler(handler: EventListener): void; + + deregisterChangeHandler(handler: EventListener): void; + + getNativeControl(): MDCSelectionControlState; + + forceLayout(): void; + + isAttachedToDOM(): boolean; +} + +export default MDCCheckboxAdapter; diff --git a/types/material__checkbox/constants.d.ts b/types/material__checkbox/constants.d.ts new file mode 100644 index 0000000000..ee665f4c05 --- /dev/null +++ b/types/material__checkbox/constants.d.ts @@ -0,0 +1,42 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { MDCStrings, MDCNumbers } from 'material__base'; + +export interface cssClasses extends MDCStrings { + UPGRADED: 'mdc-checkbox--upgraded'; + CHECKED: 'mdc-checkbox--checked'; + INDETERMINATE: 'mdc-checkbox--indeterminate'; + DISABLED: 'mdc-checkbox--disabled'; + ANIM_UNCHECKED_CHECKED: 'mdc-checkbox--anim-unchecked-checked'; + ANIM_UNCHECKED_INDETERMINATE: 'mdc-checkbox--anim-unchecked-indeterminate'; + ANIM_CHECKED_UNCHECKED: 'mdc-checkbox--anim-checked-unchecked'; + ANIM_CHECKED_INDETERMINATE: 'mdc-checkbox--anim-checked-indeterminate'; + ANIM_INDETERMINATE_CHECKED: 'mdc-checkbox--anim-indeterminate-checked'; + ANIM_INDETERMINATE_UNCHECKED: 'mdc-checkbox--anim-indeterminate-unchecked'; +} + +export interface strings extends MDCStrings { + NATIVE_CONTROL_SELECTOR: '.mdc-checkbox__native-control'; + TRANSITION_STATE_INIT: 'init'; + TRANSITION_STATE_CHECKED: 'checked'; + TRANSITION_STATE_UNCHECKED: 'unchecked'; + TRANSITION_STATE_INDETERMINATE: 'indeterminate'; +} + +export interface numbers extends MDCNumbers { + ANIM_END_LATCH_MS: 100; +} diff --git a/types/material__checkbox/foundation.d.ts b/types/material__checkbox/foundation.d.ts new file mode 100644 index 0000000000..73216efcd6 --- /dev/null +++ b/types/material__checkbox/foundation.d.ts @@ -0,0 +1,48 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCFoundation from 'material__base/foundation'; +import MDCCheckboxAdapter from './adapter'; +import { cssClasses, strings, numbers } from './constants'; + +export class MDCCheckboxFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly numbers: numbers; + + static readonly defaultAdapter: MDCCheckboxAdapter; + + isChecked(): boolean; + + setChecked(checked: boolean): boolean; + + isIndeterminate(): boolean; + + setIndeterminate(indeterminate: boolean): void; + + isDisabled(): boolean; + + setDisabled(disabled: boolean): void; + + getValue(): string; + + setValue(value: string): void; +} + +export default MDCCheckboxFoundation; diff --git a/types/material__checkbox/index.d.ts b/types/material__checkbox/index.d.ts new file mode 100644 index 0000000000..9190c3d5a9 --- /dev/null +++ b/types/material__checkbox/index.d.ts @@ -0,0 +1,48 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCComponent from 'material__base/component'; +import MDCCheckboxAdapter from './adapter'; +import { MDCSelectionControl } from 'material__selection-control'; +import MDCCheckboxFoundation from './foundation'; +import { MDCRipple } from 'material__ripple'; + +export {MDCCheckboxAdapter, MDCCheckboxFoundation}; + +export class MDCCheckbox extends MDCComponent implements MDCSelectionControl { + static attachTo(root: Element): MDCCheckbox; + + getDefaultFoundation(): MDCCheckboxFoundation; + + readonly ripple: MDCRipple; + + checked: boolean; + + indeterminate: boolean; + + disabled: boolean; + + value: string; + + destroy(): void; +} diff --git a/types/material__checkbox/tsconfig.json b/types/material__checkbox/tsconfig.json new file mode 100644 index 0000000000..06c0ac3c43 --- /dev/null +++ b/types/material__checkbox/tsconfig.json @@ -0,0 +1,28 @@ +{ + "files": [ + "constants.d.ts", + "adapter.d.ts", + "index.d.ts", + "foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__checkbox/tslint.json b/types/material__checkbox/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__checkbox/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__dialog/adapter.d.ts b/types/material__dialog/adapter.d.ts new file mode 100644 index 0000000000..fd6bc3cf9f --- /dev/null +++ b/types/material__dialog/adapter.d.ts @@ -0,0 +1,55 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface MSDDialogAdapter { + addClass(className: string): void; + + removeClass(className: string): void; + + addBodyClass(className: string): void; + + removeBodyClass(className: string): void; + + eventTargetHasClass(target: EventTarget, className: string): boolean; + + registerInteractionHandler(evt: string, handler: EventListener): void; + + deregisterInteractionHandler(evt: string, handler: EventListener): void; + + registerSurfaceInteractionHandler(evt: string, handler: EventListener): void; + + deregisterSurfaceInteractionHandler(evt: string, handler: EventListener): void; + + registerDocumentKeydownHandler(handler: EventListener): void; + + deregisterDocumentKeydownHandler(handler: EventListener): void; + + registerTransitionEndHandler(handler: EventListener): void; + + deregisterTransitionEndHandler(handler: EventListener): void; + + notifyAccept(): void; + + notifyCancel(): void; + + trapFocusOnSurface(): void; + + untrapFocusOnSurface(): void; + + isDialog(el: Element): boolean; + + layoutFooterRipples(): void; +} diff --git a/types/material__dialog/constants.d.ts b/types/material__dialog/constants.d.ts new file mode 100644 index 0000000000..a45628627c --- /dev/null +++ b/types/material__dialog/constants.d.ts @@ -0,0 +1,35 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + import { MDCStrings } from 'material__base'; + +export interface cssClasses extends MDCStrings { + ROOT: 'mdc-dialog'; + OPEN: 'mdc-dialog--open'; + ANIMATING: 'mdc-dialog--animating'; + BACKDROP: 'mdc-dialog__backdrop'; + SCROLL_LOCK: 'mdc-dialog-scroll-lock'; + ACCEPT_BTN: 'mdc-dialog__footer__button--accept'; + CANCEL_BTN: 'mdc-dialog__footer__button--cancel'; +} + +export interface strings extends MDCStrings { + OPEN_DIALOG_SELECTOR: '.mdc-dialog--open'; + DIALOG_SURFACE_SELECTOR: '.mdc-dialog__surface'; + ACCEPT_SELECTOR: '.mdc-dialog__footer__button--accept'; + ACCEPT_EVENT: 'MDCDialog:accept'; + CANCEL_EVENT: 'MDCDialog:cancel'; +} diff --git a/types/material__dialog/foundation.d.ts b/types/material__dialog/foundation.d.ts new file mode 100644 index 0000000000..f28c541dd2 --- /dev/null +++ b/types/material__dialog/foundation.d.ts @@ -0,0 +1,39 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCFoundation } from 'material__base'; +import { cssClasses, strings } from './constants'; +import { MSDDialogAdapter } from './adapter'; + +export class MDCDialogFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MSDDialogAdapter; + + open(): void; + + close(): void; + + isOpen(): boolean; + + accept(shouldNotify: boolean): void; + + cancel(shouldNotify: boolean): void; +} + +export default MDCDialogFoundation; diff --git a/types/material__dialog/index.d.ts b/types/material__dialog/index.d.ts new file mode 100644 index 0000000000..7d8ab69e30 --- /dev/null +++ b/types/material__dialog/index.d.ts @@ -0,0 +1,46 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCComponent } from 'material__base'; +import { MDCRipple } from 'material__ripple'; + +import MDCDialogFoundation from './foundation'; +import { MSDDialogAdapter } from './adapter'; +import * as util from './util'; + +export {MSDDialogAdapter, MDCDialogFoundation, util}; + +export class MDCDialog extends MDCComponent { + static attachTo(root: Element): MDCDialog; + + readonly open: boolean; + + initialize(): void; + + destroy(): void; + + show(): void; + + close(): void; + + getDefaultFoundation(): MDCDialogFoundation; +} diff --git a/types/material__dialog/tsconfig.json b/types/material__dialog/tsconfig.json new file mode 100644 index 0000000000..9f215e4ee0 --- /dev/null +++ b/types/material__dialog/tsconfig.json @@ -0,0 +1,29 @@ +{ + "files": [ + "constants.d.ts", + "adapter.d.ts", + "util.d.ts", + "index.d.ts", + "foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__dialog/tslint.json b/types/material__dialog/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__dialog/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__dialog/util.d.ts b/types/material__dialog/util.d.ts new file mode 100644 index 0000000000..cfc7e3fda0 --- /dev/null +++ b/types/material__dialog/util.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export type MDCFocusTrapFactory = (a: Element, b: {initialFocus: Element, clickOutsideDeactivates: boolean}) => any; + +export function createFocusTrapInstance(surfaceEl: Element, acceptButtonEl: Element, focusTrapFactory?: MDCFocusTrapFactory): any; diff --git a/types/material__drawer/index.d.ts b/types/material__drawer/index.d.ts new file mode 100644 index 0000000000..379ed35599 --- /dev/null +++ b/types/material__drawer/index.d.ts @@ -0,0 +1,27 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as util from './util'; +export {MDCSlidableDrawerAdapter} from './slidable'; +export {MDCTemporaryDrawer, MDCTemporaryDrawerFoundation} from './temporary'; +export {MDCPersistentDrawer, MDCPersistentDrawerFoundation} from './persistent'; +export {util}; diff --git a/types/material__drawer/persistent/constants.d.ts b/types/material__drawer/persistent/constants.d.ts new file mode 100644 index 0000000000..3d5f7c56ba --- /dev/null +++ b/types/material__drawer/persistent/constants.d.ts @@ -0,0 +1,30 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings } from 'material__base'; + +export interface cssClasses extends MDCStrings { + ROOT: 'mdc-persistent-drawer'; + OPEN: 'mdc-persistent-drawer--open'; + ANIMATING: 'mdc-persistent-drawer--animating'; +} + +export interface strings extends MDCStrings { + DRAWER_SELECTOR: '.mdc-persistent-drawer__drawer'; + FOCUSABLE_ELEMENTS: 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], [contenteditable]'; + OPEN_EVENT: 'MDCPersistentDrawer:open'; + CLOSE_EVENT: 'MDCPersistentDrawer:close'; +} diff --git a/types/material__drawer/persistent/foundation.d.ts b/types/material__drawer/persistent/foundation.d.ts new file mode 100644 index 0000000000..7d4d53f884 --- /dev/null +++ b/types/material__drawer/persistent/foundation.d.ts @@ -0,0 +1,28 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCSlidableDrawerAdapter, MDCSlidableDrawerFoundation } from '../slidable'; +import { cssClasses, strings } from './constants'; + +export class MDCPersistentDrawerFoundation extends MDCSlidableDrawerFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MDCSlidableDrawerAdapter; +} + +export default MDCPersistentDrawerFoundation; diff --git a/types/material__drawer/persistent/index.d.ts b/types/material__drawer/persistent/index.d.ts new file mode 100644 index 0000000000..1c2286fd01 --- /dev/null +++ b/types/material__drawer/persistent/index.d.ts @@ -0,0 +1,33 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCComponent } from 'material__base'; +import { MDCPersistentDrawerFoundation } from './foundation'; +import { MDCSlidableDrawerAdapter } from '../slidable'; +import * as util from '../util'; + +export {MDCSlidableDrawerAdapter, MDCPersistentDrawerFoundation, util}; + +export class MDCPersistentDrawer extends MDCComponent { + static attachTo(root: Element): MDCPersistentDrawer; + + open: boolean; + + // Return the drawer element inside the component. + readonly drawer: Element | null; + + getDefaultFoundation(): MDCPersistentDrawerFoundation; +} diff --git a/types/material__drawer/slidable/adapter.d.ts b/types/material__drawer/slidable/adapter.d.ts new file mode 100644 index 0000000000..3659742558 --- /dev/null +++ b/types/material__drawer/slidable/adapter.d.ts @@ -0,0 +1,59 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface MDCSlidableDrawerAdapter { + addClass(className: string): void; + + removeClass(className: string): void; + + hasClass(className: string): void; + + hasNecessaryDom(): boolean; + + registerInteractionHandler(evt: string, handler: EventListener): void; + + deregisterInteractionHandler(evt: string, handler: EventListener): void; + + registerDrawerInteractionHandler(evt: string, handler: EventListener): void; + + deregisterDrawerInteractionHandler(evt: string, handler: EventListener): void; + + registerTransitionEndHandler(handler: EventListener): void; + + deregisterTransitionEndHandler(handler: EventListener): void; + + registerDocumentKeydownHandler(handler: EventListener): void; + + deregisterDocumentKeydownHandler(handler: EventListener): void; + + setTranslateX(value: number | null): void; + + getFocusableElements(): NodeList; + + saveElementTabState(el: Element): void; + + restoreElementTabState(el: Element): void; + + makeElementUntabbable(el: Element): void; + + notifyOpen(): void; + + notifyClose(): void; + + isRtl(): boolean; + + getDrawerWidth(): number; +} diff --git a/types/material__drawer/slidable/constants.d.ts b/types/material__drawer/slidable/constants.d.ts new file mode 100644 index 0000000000..bfae67fa90 --- /dev/null +++ b/types/material__drawer/slidable/constants.d.ts @@ -0,0 +1,17 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export const FOCUSABLE_ELEMENTS: string; diff --git a/types/material__drawer/slidable/foundation.d.ts b/types/material__drawer/slidable/foundation.d.ts new file mode 100644 index 0000000000..60995e0a95 --- /dev/null +++ b/types/material__drawer/slidable/foundation.d.ts @@ -0,0 +1,30 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCFoundation } from 'material__base'; +import { MDCSlidableDrawerAdapter } from './adapter'; + +export class MDCSlidableDrawerFoundation extends MDCFoundation { + static readonly defaultAdapter: MDCSlidableDrawerAdapter; + + constructor(adapter: MDCSlidableDrawerAdapter, rootCssClass: string, animatingCssClass: string, openCssClass: string); + + open(): void; + + close(): void; + + isOpen(): boolean; +} diff --git a/types/material__drawer/slidable/index.d.ts b/types/material__drawer/slidable/index.d.ts new file mode 100644 index 0000000000..b56661948d --- /dev/null +++ b/types/material__drawer/slidable/index.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export {FOCUSABLE_ELEMENTS} from './constants'; +export {MDCSlidableDrawerFoundation} from './foundation'; +export {MDCSlidableDrawerAdapter} from './adapter'; diff --git a/types/material__drawer/temporary/constants.d.ts b/types/material__drawer/temporary/constants.d.ts new file mode 100644 index 0000000000..b175492a82 --- /dev/null +++ b/types/material__drawer/temporary/constants.d.ts @@ -0,0 +1,32 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings } from 'material__base'; + +export interface cssClasses extends MDCStrings { + ROOT: 'mdc-temporary-drawer'; + OPEN: 'mdc-temporary-drawer--open'; + ANIMATING: 'mdc-temporary-drawer--animating'; + SCROLL_LOCK: 'mdc-drawer-scroll-lock'; +} + +export interface strings extends MDCStrings { + DRAWER_SELECTOR: '.mdc-temporary-drawer__drawer'; + OPACITY_VAR_NAME: '--mdc-temporary-drawer-opacity'; + FOCUSABLE_ELEMENTS: 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], [contenteditable]'; + OPEN_EVENT: 'MDCTemporaryDrawer:open'; + CLOSE_EVENT: 'MDCTemporaryDrawer:close'; +} diff --git a/types/material__drawer/temporary/foundation.d.ts b/types/material__drawer/temporary/foundation.d.ts new file mode 100644 index 0000000000..df1763c274 --- /dev/null +++ b/types/material__drawer/temporary/foundation.d.ts @@ -0,0 +1,32 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCSlidableDrawerFoundation, MDCSlidableDrawerAdapter } from '../slidable'; +import { cssClasses, strings } from './constants'; + +export class MDCTemporaryDrawerFoundation extends MDCSlidableDrawerFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MDCSlidableDrawerAdapter; + + open(): void; + + close(): void; +} + +export default MDCTemporaryDrawerFoundation; diff --git a/types/material__drawer/temporary/index.d.ts b/types/material__drawer/temporary/index.d.ts new file mode 100644 index 0000000000..4e27965e43 --- /dev/null +++ b/types/material__drawer/temporary/index.d.ts @@ -0,0 +1,33 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCComponent } from 'material__base'; +import MDCTemporaryDrawerFoundation from './foundation'; +import { MDCSlidableDrawerAdapter } from '../slidable'; +import * as util from '../util'; + +export {MDCSlidableDrawerAdapter, MDCTemporaryDrawerFoundation, util}; + +export class MDCTemporaryDrawer extends MDCComponent { + static attachTo(root: Element): MDCTemporaryDrawer; + + open: boolean; + + /* Return the drawer element inside the component. */ + readonly drawer: Element | null; + + getDefaultFoundation(): MDCTemporaryDrawerFoundation; +} diff --git a/types/material__drawer/tsconfig.json b/types/material__drawer/tsconfig.json new file mode 100644 index 0000000000..4a95cf90f8 --- /dev/null +++ b/types/material__drawer/tsconfig.json @@ -0,0 +1,36 @@ +{ + "files": [ + "persistent/constants.d.ts", + "persistent/index.d.ts", + "persistent/foundation.d.ts", + "slidable/constants.d.ts", + "slidable/adapter.d.ts", + "slidable/index.d.ts", + "slidable/foundation.d.ts", + "temporary/constants.d.ts", + "temporary/index.d.ts", + "temporary/foundation.d.ts", + "util.d.ts", + "index.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__drawer/tslint.json b/types/material__drawer/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__drawer/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__drawer/util.d.ts b/types/material__drawer/util.d.ts new file mode 100644 index 0000000000..66fa930b43 --- /dev/null +++ b/types/material__drawer/util.d.ts @@ -0,0 +1,33 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Remap touch events to pointer events, if the browser doesn't support touch events. +export function remapEvent(eventName: string, globalObj?: Window): string; + +// Choose the correct transform property to use on the current browser. +export function getTransformPropertyName(globalObj?: Window, forceRefresh?: boolean): string; + +// Determine whether the current browser supports CSS properties. +export function supportsCssCustomProperties(globalObj?: Window): boolean; + +// Determine whether the current browser supports passive event listeners, and if so, use them. +export function applyPassive(globalObj?: Window, forceRefresh?: boolean): boolean; + +// Save the tab state for an element. +export function saveElementTabState(el: Element): void; + +// Restore the tab state for an element, if it was saved. +export function restoreElementTabState(el: Element): void; diff --git a/types/material__form-field/adapter.d.ts b/types/material__form-field/adapter.d.ts new file mode 100644 index 0000000000..7033f363eb --- /dev/null +++ b/types/material__form-field/adapter.d.ts @@ -0,0 +1,43 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Adapter for MDC Form Field. Provides an interface for managing + * - event handlers + * - ripple activation + * + * Additionally, provides type information for the adapter to the Closure + * compiler. + * + * Implement this adapter for your framework of choice to delegate updates to + * the component in your framework of choice. See architecture documentation + * for more details. + * https://github.com/material-components/material-components-web/blob/master/docs/architecture.md + * + * @record + */ +export class MDCFormFieldAdapter { + registerInteractionHandler(type: string, handler: EventListener): void; + + deregisterInteractionHandler(type: string, handler: EventListener): void; + + activateInputRipple(): void; + + deactivateInputRipple(): void; +} + +export default MDCFormFieldAdapter; diff --git a/types/material__form-field/constants.d.ts b/types/material__form-field/constants.d.ts new file mode 100644 index 0000000000..ba55acabcd --- /dev/null +++ b/types/material__form-field/constants.d.ts @@ -0,0 +1,26 @@ +/** + * @license + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings } from 'material__base'; + +export interface cssClasses extends MDCStrings { + ROOT: 'mdc-form-field'; +} + +export interface strings extends MDCStrings { + LABEL_SELECTOR: '.mdc-form-field > label'; +} diff --git a/types/material__form-field/foundation.d.ts b/types/material__form-field/foundation.d.ts new file mode 100644 index 0000000000..026beedfc2 --- /dev/null +++ b/types/material__form-field/foundation.d.ts @@ -0,0 +1,30 @@ +/** + * @license + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCFoundation from 'material__base/foundation'; +import MDCFormFieldAdapter from './adapter'; +import { cssClasses, strings } from './constants'; + +export class MDCFormFieldFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MDCFormFieldAdapter; +} + +export default MDCFormFieldFoundation; diff --git a/types/material__form-field/index.d.ts b/types/material__form-field/index.d.ts new file mode 100644 index 0000000000..1fcc30b4c4 --- /dev/null +++ b/types/material__form-field/index.d.ts @@ -0,0 +1,37 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * @license + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCComponent from 'material__base/component'; +import MDCFormFieldFoundation from './foundation'; +import MDCFormFieldAdapter from './adapter'; +import { MDCSelectionControl } from 'material__selection-control'; + +export {MDCFormFieldAdapter, MDCFormFieldFoundation}; + +export class MDCFormField extends MDCComponent { + static attachTo(root: Element): MDCFormField; + + input: MDCSelectionControl; + + getDefaultFoundation(): MDCFormFieldFoundation; +} diff --git a/types/material__form-field/tsconfig.json b/types/material__form-field/tsconfig.json new file mode 100644 index 0000000000..06c0ac3c43 --- /dev/null +++ b/types/material__form-field/tsconfig.json @@ -0,0 +1,28 @@ +{ + "files": [ + "constants.d.ts", + "adapter.d.ts", + "index.d.ts", + "foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__form-field/tslint.json b/types/material__form-field/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__form-field/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__grid-list/adapter.d.ts b/types/material__grid-list/adapter.d.ts new file mode 100644 index 0000000000..1dcbcbf251 --- /dev/null +++ b/types/material__grid-list/adapter.d.ts @@ -0,0 +1,29 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface MDCGridListAdapter { + getOffsetWidth(): number; + + getNumberOfTiles(): number; + + getOffsetWidthForTileAtIndex(index: number): number; + + setStyleForTilesElement(property: string, value: string): void; + + registerResizeHandler(handler: EventListener): void; + + deregisterResizeHandler(handler: EventListener): void; +} diff --git a/types/material__grid-list/constants.d.ts b/types/material__grid-list/constants.d.ts new file mode 100644 index 0000000000..22cf67bbfc --- /dev/null +++ b/types/material__grid-list/constants.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings } from 'material__base'; + +export interface strings extends MDCStrings { + TILES_SELECTOR: '.mdc-grid-list__tiles'; + TILE_SELECTOR: '.mdc-grid-tile'; +} diff --git a/types/material__grid-list/foundation.d.ts b/types/material__grid-list/foundation.d.ts new file mode 100644 index 0000000000..04843273d6 --- /dev/null +++ b/types/material__grid-list/foundation.d.ts @@ -0,0 +1,29 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCFoundation } from 'material__base'; +import { strings } from './constants'; +import { MDCGridListAdapter } from './adapter'; + +export class MDCGridListFoundation extends MDCFoundation { + static readonly strings: strings; + + static readonly defaultAdapter: MDCGridListAdapter; + + alignCenter(): void; +} + +export default MDCGridListFoundation; diff --git a/types/material__grid-list/index.d.ts b/types/material__grid-list/index.d.ts new file mode 100644 index 0000000000..2a1e98d912 --- /dev/null +++ b/types/material__grid-list/index.d.ts @@ -0,0 +1,33 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCComponent } from 'material__base'; +import { MDCGridListAdapter } from './adapter'; +import MDCGridListFoundation from './foundation'; + +export {MDCGridListAdapter, MDCGridListFoundation}; + +export class MDCGridList extends MDCComponent { + static attachTo(root: Element): MDCGridList; + + getDefaultFoundation(): MDCGridListFoundation; +} diff --git a/types/material__grid-list/tsconfig.json b/types/material__grid-list/tsconfig.json new file mode 100644 index 0000000000..06c0ac3c43 --- /dev/null +++ b/types/material__grid-list/tsconfig.json @@ -0,0 +1,28 @@ +{ + "files": [ + "constants.d.ts", + "adapter.d.ts", + "index.d.ts", + "foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__grid-list/tslint.json b/types/material__grid-list/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__grid-list/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__icon-toggle/adapter.d.ts b/types/material__icon-toggle/adapter.d.ts new file mode 100644 index 0000000000..52481fe732 --- /dev/null +++ b/types/material__icon-toggle/adapter.d.ts @@ -0,0 +1,63 @@ +/** + * @license + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Adapter for MDC Icon Toggle. Provides an interface for managing + * - classes + * - dom + * - inner text + * - event handlers + * - event dispatch + * + * Additionally, provides type information for the adapter to the Closure + * compiler. + * + * Implement this adapter for your framework of choice to delegate updates to + * the component in your framework of choice. See architecture documentation + * for more details. + * https://github.com/material-components/material-components-web/blob/master/docs/architecture.md + * + * @record + */ + +export class MDCIconToggleAdapter { + addClass(className: string): void; + + removeClass(className: string): void; + + registerInteractionHandler(type: string, handler: EventListener): void; + + deregisterInteractionHandler(type: string, handler: EventListener): void; + + setText(text: string): void; + + getTabIndex(): number; + + setTabIndex(tabIndex: number): void; + + getAttr(name: string): string; + + setAttr(name: string, value: string): void; + + rmAttr(name: string): void; + + notifyChange(evtData: IconToggleEvent): void; +} + +export interface IconToggleEvent { + isOn: boolean; +} diff --git a/types/material__icon-toggle/constants.d.ts b/types/material__icon-toggle/constants.d.ts new file mode 100644 index 0000000000..e7140ecefa --- /dev/null +++ b/types/material__icon-toggle/constants.d.ts @@ -0,0 +1,32 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings } from 'material__base'; + +export interface cssClasses extends MDCStrings { + ROOT: 'mdc-icon-toggle'; + DISABLED: 'mdc-icon-toggle--disabled'; +} + +export interface strings extends MDCStrings { + DATA_TOGGLE_ON: 'data-toggle-on'; + DATA_TOGGLE_OFF: 'data-toggle-off'; + ARIA_PRESSED: 'aria-pressed'; + ARIA_DISABLED: 'aria-disabled'; + ARIA_LABEL: 'aria-label'; + CHANGE_EVENT: 'MDCIconToggle:change'; +} diff --git a/types/material__icon-toggle/foundation.d.ts b/types/material__icon-toggle/foundation.d.ts new file mode 100644 index 0000000000..65d25c1307 --- /dev/null +++ b/types/material__icon-toggle/foundation.d.ts @@ -0,0 +1,64 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCFoundation from 'material__base/foundation'; +import { MDCIconToggleAdapter, IconToggleEvent } from './adapter'; +import { cssClasses, strings } from './constants'; + +export class MDCIconToggleFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MDCIconToggleAdapter; + + refreshToggleData(): void; + + isOn(): boolean; + + toggle(isOn?: boolean): void; + + isDisabled(): boolean; + + setDisabled(isDisabled: boolean): void; + + isKeyboardActivated(): boolean; +} + +export interface KeyboardKey { + key: string; + keyCode: number; +} + +export function isSpace(keyboardKey: KeyboardKey): boolean; + +export class IconToggleState { + /** + * The aria-label value of the icon toggle, or undefined if there is no aria-label. + */ + label: string|undefined; + /** + * The text for the icon toggle, or undefined if there is no text. + */ + content: string|undefined; + /** + * The CSS class to add to the icon toggle, or undefined if there is no CSS class. + */ + cssClass: string|undefined; +} + +export default MDCIconToggleFoundation; diff --git a/types/material__icon-toggle/index.d.ts b/types/material__icon-toggle/index.d.ts new file mode 100644 index 0000000000..bfced0b532 --- /dev/null +++ b/types/material__icon-toggle/index.d.ts @@ -0,0 +1,47 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCComponent from 'material__base/component'; +import MDCIconToggleFoundation from './foundation'; +import { MDCIconToggleAdapter } from './adapter'; +import { MDCRipple, MDCRippleFoundation } from 'material__ripple'; + +export {MDCIconToggleAdapter, MDCIconToggleFoundation}; + +export class MDCIconToggle extends MDCComponent { + static attachTo(root: Element): MDCIconToggle; + + destroy(): void; + + getDefaultFoundation(): MDCIconToggleFoundation; + + initialSyncWithDOM(): void; + + readonly ripple: MDCRipple; + + on: boolean; + + disabled: boolean; + + refreshToggleData(): void; +} diff --git a/types/material__icon-toggle/tsconfig.json b/types/material__icon-toggle/tsconfig.json new file mode 100644 index 0000000000..06c0ac3c43 --- /dev/null +++ b/types/material__icon-toggle/tsconfig.json @@ -0,0 +1,28 @@ +{ + "files": [ + "constants.d.ts", + "adapter.d.ts", + "index.d.ts", + "foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__icon-toggle/tslint.json b/types/material__icon-toggle/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__icon-toggle/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__linear-progress/adapter.d.ts b/types/material__linear-progress/adapter.d.ts new file mode 100644 index 0000000000..92afccc19d --- /dev/null +++ b/types/material__linear-progress/adapter.d.ts @@ -0,0 +1,29 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface MDCLinearProgressAdapter { + addClass(className: string): void; + + getPrimaryBar(): Element; + + getBuffer(): Element; + + hasClass(className: string): boolean; + + removeClass(className: string): void; + + setStyle(el: Element, styleProperty: string, value: number): void; +} diff --git a/types/material__linear-progress/constants.d.ts b/types/material__linear-progress/constants.d.ts new file mode 100644 index 0000000000..af83ae9922 --- /dev/null +++ b/types/material__linear-progress/constants.d.ts @@ -0,0 +1,28 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings } from 'material__base'; + +export interface cssClasses extends MDCStrings { + CLOSED_CLASS: 'mdc-linear-progress--closed'; + INDETERMINATE_CLASS: 'mdc-linear-progress--indeterminate'; + REVERSED_CLASS: 'mdc-linear-progress--reversed'; +} + +export interface strings extends MDCStrings { + PRIMARY_BAR_SELECTOR: '.mdc-linear-progress__primary-bar'; + BUFFER_SELECTOR: '.mdc-linear-progress__buffer'; +} diff --git a/types/material__linear-progress/foundation.d.ts b/types/material__linear-progress/foundation.d.ts new file mode 100644 index 0000000000..4abd553a09 --- /dev/null +++ b/types/material__linear-progress/foundation.d.ts @@ -0,0 +1,40 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCFoundation } from 'material__base'; +import { transformStyleProperties } from 'material__animation'; +import { MDCLinearProgressAdapter } from './adapter'; +import { cssClasses, strings } from './constants'; + +export class MDCLinearProgressFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MDCLinearProgressAdapter; + + setDeterminate(isDeterminate: boolean): void; + + setProgress(value: number): void; + + setBuffer(value: number): void; + + setReverse(isReversed: boolean): void; + + open(): void; + + close(): void; +} diff --git a/types/material__linear-progress/index.d.ts b/types/material__linear-progress/index.d.ts new file mode 100644 index 0000000000..765d8cb368 --- /dev/null +++ b/types/material__linear-progress/index.d.ts @@ -0,0 +1,45 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCComponent } from 'material__base'; +import { MDCLinearProgressAdapter } from './adapter'; +import { MDCLinearProgressFoundation } from './foundation'; + +export {MDCLinearProgressAdapter, MDCLinearProgressFoundation}; + +export class MDCLinearProgress extends MDCComponent { + static attachTo(root: Element): MDCLinearProgress; + + determinate: boolean; + + progress: number; + + buffer: number; + + reverse: boolean; + + open(): void; + + close(): void; + + getDefaultFoundation(): MDCLinearProgressFoundation; +} diff --git a/types/material__linear-progress/tsconfig.json b/types/material__linear-progress/tsconfig.json new file mode 100644 index 0000000000..06c0ac3c43 --- /dev/null +++ b/types/material__linear-progress/tsconfig.json @@ -0,0 +1,28 @@ +{ + "files": [ + "constants.d.ts", + "adapter.d.ts", + "index.d.ts", + "foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__linear-progress/tslint.json b/types/material__linear-progress/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__linear-progress/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__menu/index.d.ts b/types/material__menu/index.d.ts new file mode 100644 index 0000000000..af9360d1a8 --- /dev/null +++ b/types/material__menu/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as util from './util'; +import { MDCSimpleMenu, MDCSimpleMenuAdapter, MDCSimpleMenuFoundation } from './simple/index'; +export { MDCSimpleMenu, MDCSimpleMenuAdapter, MDCSimpleMenuFoundation, util }; diff --git a/types/material__menu/simple/adapter.d.ts b/types/material__menu/simple/adapter.d.ts new file mode 100644 index 0000000000..7fdd1e4f3a --- /dev/null +++ b/types/material__menu/simple/adapter.d.ts @@ -0,0 +1,104 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Adapter for MDC Simple Menu. Provides an interface for managing + * - classes + * - dom + * - focus + * - position + * - dimensions + * - event handlers + * + * Additionally, provides type information for the adapter to the Closure + * compiler. + * + * Implement this adapter for your framework of choice to delegate updates to + * the component in your framework of choice. See architecture documentation + * for more details. + * https://github.com/material-components/material-components-web/blob/master/docs/architecture.md + * + * @record + */ +export default class MDCSimpleMenuAdapter { + addClass(className: string): void; + + removeClass(className: string): void; + + hasClass(className: string): boolean; + + hasNecessaryDom(): boolean; + + getAttributeForEventTarget(target: EventTarget, attributeName: string): string; + + getInnerDimensions(): {width: number, height: number}; + + hasAnchor(): boolean; + + getAnchorDimensions(): {width: number, height: number, top: number, right: number, bottom: number, left: number}; + + getWindowDimensions(): {width: number, height: number}; + + setScale(x: number, y: number): void; + + setInnerScale(x: number, y: number): void; + + getNumberOfItems(): number; + + registerInteractionHandler(type: string, handler: EventListener): void; + + deregisterInteractionHandler(type: string, handler: EventListener): void; + + registerBodyClickHandler(handler: EventListener): void; + + deregisterBodyClickHandler(handler: EventListener): void; + + getYParamsForItemAtIndex(index: number): {top: number, height: number}; + + setTransitionDelayForItemAtIndex(index: number, value: string|null): void; + + getIndexForEventTarget(target: EventTarget): number; + + notifySelected(evtData: {index: number}): void; + + notifyCancel(): void; + + saveFocus(): void; + + restoreFocus(): void; + + isFocused(): boolean; + + focus(): void; + + getFocusedItemIndex(): number; + + focusItemAtIndex(index: number): void; + + isRtl(): boolean; + + setTransformOrigin(origin: string): void; + + setPosition(position: { + top: string|undefined, + right: string|undefined, + bottom: string|undefined, + left: string|undefined + }): void; + + getAccurateTime(): number; +} diff --git a/types/material__menu/simple/constants.d.ts b/types/material__menu/simple/constants.d.ts new file mode 100644 index 0000000000..58e2f16614 --- /dev/null +++ b/types/material__menu/simple/constants.d.ts @@ -0,0 +1,52 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings, MDCNumbers } from 'material__base'; + +export interface cssClasses extends MDCStrings { + ROOT: 'mdc-simple-menu'; + OPEN: 'mdc-simple-menu--open'; + ANIMATING: 'mdc-simple-menu--animating'; + TOP_RIGHT: 'mdc-simple-menu--open-from-top-right'; + BOTTOM_LEFT: 'mdc-simple-menu--open-from-bottom-left'; + BOTTOM_RIGHT: 'mdc-simple-menu--open-from-bottom-right'; +} + +export interface strings extends MDCStrings { + ITEMS_SELECTOR: '.mdc-simple-menu__items'; + SELECTED_EVENT: 'MDCSimpleMenu:selected'; + CANCEL_EVENT: 'MDCSimpleMenu:cancel'; + ARIA_DISABLED_ATTR: 'aria-disabled'; +} + +export interface numbers extends MDCNumbers { + // Amount of time to wait before triggering a selected event on the menu. Note that this time + // will most likely be bumped up once interactive lists are supported to allow for the ripple to + // animate before closing the menu + SELECTED_TRIGGER_DELAY: 50; + // Total duration of the menu animation. + TRANSITION_DURATION_MS: 300; + // The menu starts its open animation with the X axis at this time value (0 - 1). + TRANSITION_SCALE_ADJUSTMENT_X: 0.5; + // The time value the menu waits until the animation starts on the Y axis (0 - 1). + TRANSITION_SCALE_ADJUSTMENT_Y: 0.2; + // The cubic bezier control points for the animation (cubic-bezier(0, 0, 0.2, 1)). + TRANSITION_X1: 0; + TRANSITION_Y1: 0; + TRANSITION_X2: 0.2; + TRANSITION_Y2: 1; +} diff --git a/types/material__menu/simple/foundation.d.ts b/types/material__menu/simple/foundation.d.ts new file mode 100644 index 0000000000..78071374b3 --- /dev/null +++ b/types/material__menu/simple/foundation.d.ts @@ -0,0 +1,43 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCFoundation from 'material__base/foundation'; +import MDCSimpleMenuAdapter from './adapter'; +import { cssClasses, strings, numbers } from './constants'; +import { clamp, bezierProgress } from '../util'; + +export default class MDCSimpleMenuFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly numbers: numbers; + + static readonly defaultAdapter: MDCSimpleMenuAdapter; + + /** + * Open the menu. + */ + open(options?: {focusIndex?: number}): void; + + /** + * Closes the menu. + */ + close(evt?: Event): void; + + isOpen(): boolean; +} diff --git a/types/material__menu/simple/index.d.ts b/types/material__menu/simple/index.d.ts new file mode 100644 index 0000000000..c2315810ba --- /dev/null +++ b/types/material__menu/simple/index.d.ts @@ -0,0 +1,42 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCComponent from 'material__base/component'; +import MDCSimpleMenuFoundation from './foundation'; +import MDCSimpleMenuAdapter from './adapter'; +import { getTransformPropertyName } from '../util'; + +export {MDCSimpleMenuAdapter, MDCSimpleMenuFoundation}; + +export class MDCSimpleMenu extends MDCComponent { + static attachTo(root: Element): MDCSimpleMenu; + + open: boolean; + + show(options?: {focusIndex?: number}): void; + + hide(): void; + + /** + * Return the items within the menu. Note that this only contains the set of elements within + * the items container that are proper list items, and not supplemental / presentational DOM + * elements. + */ + readonly items: Element[]; + + getDefaultFoundation(): MDCSimpleMenuFoundation; +} diff --git a/types/material__menu/tsconfig.json b/types/material__menu/tsconfig.json new file mode 100644 index 0000000000..6eb7f942cc --- /dev/null +++ b/types/material__menu/tsconfig.json @@ -0,0 +1,30 @@ +{ + "files": [ + "simple/constants.d.ts", + "simple/adapter.d.ts", + "simple/index.d.ts", + "simple/foundation.d.ts", + "util.d.ts", + "index.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__menu/tslint.json b/types/material__menu/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__menu/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__menu/util.d.ts b/types/material__menu/util.d.ts new file mode 100644 index 0000000000..d5e02a37e2 --- /dev/null +++ b/types/material__menu/util.d.ts @@ -0,0 +1,37 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Returns the name of the correct transform property to use on the current browser. + */ +export function getTransformPropertyName(globalObj: Window, forceRefresh?: boolean): string|undefined; + +/** + * Clamps a value between the minimum and the maximum, returning the clamped value. + */ +export function clamp(value: number, min?: number, max?: number): number; + +/** + * Returns the easing value to apply at time t, for a given cubic bezier curve. + * Control points P0 and P3 are assumed to be (0,0) and (1,1), respectively. + * Parameters are as follows: + * - time: The current time in the animation, scaled between 0 and 1. + * - x1: The x value of control point P1. + * - y1: The y value of control point P1. + * - x2: The x value of control point P2. + * - y2: The y value of control point P2. + */ +export function bezierProgress(time: number, x1: number, y1: number, x2: number, y2: number): number; diff --git a/types/material__radio/adapter.d.ts b/types/material__radio/adapter.d.ts new file mode 100644 index 0000000000..91035ea177 --- /dev/null +++ b/types/material__radio/adapter.d.ts @@ -0,0 +1,40 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCSelectionControlState } from 'material__selection-control'; + +/** + * Adapter for MDC Radio. Provides an interface for managing + * - classes + * - dom + * + * Additionally, provides type information for the adapter to the Closure + * compiler. + * + * Implement this adapter for your framework of choice to delegate updates to + * the component in your framework of choice. See architecture documentation + * for more details. + * https://github.com/material-components/material-components-web/blob/master/docs/architecture.md + */ +export class MDCRadioAdapter { + addClass(className: string): void; + + removeClass(className: string): void; + + getNativeControl(): MDCSelectionControlState; +} + +export default MDCRadioAdapter; diff --git a/types/material__radio/constants.d.ts b/types/material__radio/constants.d.ts new file mode 100644 index 0000000000..5c73f72faf --- /dev/null +++ b/types/material__radio/constants.d.ts @@ -0,0 +1,26 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings } from 'material__base'; + +export interface strings extends MDCStrings { + NATIVE_CONTROL_SELECTOR: '.mdc-radio__native-control'; +} + +export interface cssClasses extends MDCStrings { + ROOT: 'mdc-radio'; + DISABLED: 'mdc-radio--disabled'; +} diff --git a/types/material__radio/foundation.d.ts b/types/material__radio/foundation.d.ts new file mode 100644 index 0000000000..f27bd30f1b --- /dev/null +++ b/types/material__radio/foundation.d.ts @@ -0,0 +1,42 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCFoundation from 'material__base/foundation'; +import { MDCSelectionControlState } from 'material__selection-control'; +import MDCRadioAdapter from './adapter'; +import { cssClasses, strings } from './constants'; + +export class MDCRadioFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MDCRadioAdapter; + + isChecked(): boolean; + + setChecked(checked: boolean): void; + + isDisabled(): boolean; + + setDisabled(disabled: boolean): void; + + getValue(): string; + + setValue(value?: string): void; +} + +export default MDCRadioFoundation; diff --git a/types/material__radio/index.d.ts b/types/material__radio/index.d.ts new file mode 100644 index 0000000000..e9001d9d84 --- /dev/null +++ b/types/material__radio/index.d.ts @@ -0,0 +1,46 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCComponent from 'material__base/component'; +import { MDCSelectionControl } from 'material__selection-control'; +import MDCRadioAdapter from './adapter'; +import MDCRadioFoundation from './foundation'; +import { MDCRipple, MDCRippleFoundation } from 'material__ripple'; + +export {MDCRadioAdapter, MDCRadioFoundation}; + +export class MDCRadio extends MDCComponent implements MDCSelectionControl { + static attachTo(root: Element): MDCRadio; + + checked: boolean; + + disabled: boolean; + + value: string; + + readonly ripple: MDCRipple; + + destroy(): void; + + getDefaultFoundation(): MDCRadioFoundation; +} diff --git a/types/material__radio/tsconfig.json b/types/material__radio/tsconfig.json new file mode 100644 index 0000000000..06c0ac3c43 --- /dev/null +++ b/types/material__radio/tsconfig.json @@ -0,0 +1,28 @@ +{ + "files": [ + "constants.d.ts", + "adapter.d.ts", + "index.d.ts", + "foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__radio/tslint.json b/types/material__radio/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__radio/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__ripple/adapter.d.ts b/types/material__ripple/adapter.d.ts new file mode 100644 index 0000000000..0d2d319aab --- /dev/null +++ b/types/material__ripple/adapter.d.ts @@ -0,0 +1,65 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Adapter for MDC Ripple. Provides an interface for managing + * - classes + * - dom + * - CSS variables + * - position + * - dimensions + * - scroll position + * - event handlers + * - unbounded, active and disabled states + * + * Additionally, provides type information for the adapter to the Closure + * compiler. + * + * Implement this adapter for your framework of choice to delegate updates to + * the component in your framework of choice. See architecture documentation + * for more details. + * https://github.com/material-components/material-components-web/blob/master/docs/architecture.md + * + * @record + */ +export default class MDCRippleAdapter { + browserSupportsCssVars(): boolean; + + isUnbounded(): boolean; + + isSurfaceActive(): boolean; + + isSurfaceDisabled(): boolean; + + addClass(className: string): void; + + removeClass(className: string): void; + + registerInteractionHandler(evtType: string, handler: EventListener): void; + + deregisterInteractionHandler(evtType: string, handler: EventListener): void; + + registerResizeHandler(handler: EventListener): void; + + deregisterResizeHandler(handler: EventListener): void; + + updateCssVariable(varName: string, value: number|string): void; + + computeBoundingRect(): ClientRect; + + getWindowPageOffset(): {x: number, y: number}; +} diff --git a/types/material__ripple/constants.d.ts b/types/material__ripple/constants.d.ts new file mode 100644 index 0000000000..285d5f3f2c --- /dev/null +++ b/types/material__ripple/constants.d.ts @@ -0,0 +1,46 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings, MDCNumbers } from 'material__base'; + +export interface cssClasses extends MDCStrings { + // Ripple is a special case where the "root" component is really a "mixin" of sorts, + // given that it's an 'upgrade' to an existing component. That being said it is the root + // CSS class that all other CSS classes derive from. + ROOT: 'mdc-ripple-upgraded'; + UNBOUNDED: 'mdc-ripple-upgraded--unbounded'; + BG_FOCUSED: 'mdc-ripple-upgraded--background-focused'; + BG_ACTIVE_FILL: 'mdc-ripple-upgraded--background-active-fill'; + FG_ACTIVATION: 'mdc-ripple-upgraded--foreground-activation'; + FG_DEACTIVATION: 'mdc-ripple-upgraded--foreground-deactivation'; +} + +export interface strings extends MDCStrings { + VAR_FG_SIZE: '--mdc-ripple-fg-size'; + VAR_LEFT: '--mdc-ripple-left'; + VAR_TOP: '--mdc-ripple-top'; + VAR_FG_SCALE: '--mdc-ripple-fg-scale'; + VAR_FG_TRANSLATE_START: '--mdc-ripple-fg-translate-start'; + VAR_FG_TRANSLATE_END: '--mdc-ripple-fg-translate-end'; +} + +export interface numbers extends MDCNumbers { + PADDING: 10; + INITIAL_ORIGIN_SCALE: 0.6; + DEACTIVATION_TIMEOUT_MS: 300; + FG_DEACTIVATION_MS: 83; +} diff --git a/types/material__ripple/foundation.d.ts b/types/material__ripple/foundation.d.ts new file mode 100644 index 0000000000..b67632e441 --- /dev/null +++ b/types/material__ripple/foundation.d.ts @@ -0,0 +1,69 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCFoundation from 'material__base/foundation'; +import MDCRippleAdapter from './adapter'; +import { cssClasses, strings, numbers } from './constants'; +import { getNormalizedEventCoords } from './util'; + +export interface ActivationStateType { + isActivated: boolean|undefined; + hasDeactivationUXRun: boolean|undefined; + wasActivatedByPointer: boolean|undefined; + wasElementMadeActive: boolean|undefined; + activationStartTime: number|undefined; + activationEvent: Event; + isProgrammatic: boolean|undefined; +} + +export interface ListenerInfoType { + activate: string|undefined; + deactivate: string|undefined; + focus: string|undefined; + blur: string|undefined; +} + +export interface ListenersType { + activate(e: Event): void; + + deactivate(e: Event): void; + + focus(): void; + + blur(): void; +} + +export interface PointType { + x: number; + y: number; +} + +export default class MDCRippleFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly numbers: numbers; + + static readonly defaultAdapter: MDCRippleAdapter; + + activate(event?: Event): void; + + deactivate(event?: Event): void; + + layout(): void; +} diff --git a/types/material__ripple/index.d.ts b/types/material__ripple/index.d.ts new file mode 100644 index 0000000000..2f8379ac84 --- /dev/null +++ b/types/material__ripple/index.d.ts @@ -0,0 +1,66 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCComponent from 'material__base/component'; +import MDCRippleAdapter from './adapter'; +import MDCRippleFoundation from './foundation'; +import * as util from './util'; + +export {MDCRippleAdapter, MDCRippleFoundation, util}; + +export class MDCRipple extends MDCComponent { + static attachTo(root: Element, bound?: {isUnbounded: boolean|undefined}): MDCRipple; + + static createAdapter(instance: RippleCapableSurface): MDCRippleAdapter; + + unbounded: boolean; + + activate(): void; + + deactivate(): void; + + layout(): void; + + getDefaultFoundation(): MDCRippleFoundation; + + initialSyncWithDOM(): void; +} + +/** + * See Material Design spec for more details on when to use ripples. + * https://material.io/guidelines/motion/choreography.html#choreography-creation + * @record + */ +export class RippleCapableSurface { + protected root_: Element; + + /** + * Whether or not the ripple bleeds out of the bounds of the element. + */ + unbounded: boolean|undefined; + + /** + * Whether or not the ripple is attached to a disabled component. + */ + disabled: boolean|undefined; +} diff --git a/types/material__ripple/tsconfig.json b/types/material__ripple/tsconfig.json new file mode 100644 index 0000000000..9f215e4ee0 --- /dev/null +++ b/types/material__ripple/tsconfig.json @@ -0,0 +1,29 @@ +{ + "files": [ + "constants.d.ts", + "adapter.d.ts", + "util.d.ts", + "index.d.ts", + "foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__ripple/tslint.json b/types/material__ripple/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__ripple/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__ripple/util.d.ts b/types/material__ripple/util.d.ts new file mode 100644 index 0000000000..ed684eca8f --- /dev/null +++ b/types/material__ripple/util.d.ts @@ -0,0 +1,27 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export function supportsCssVariables(windowObj: Window, forceRefresh?: boolean): boolean|undefined; + +/** + * Determine whether the current browser supports passive event listeners, and if so, use them. + */ +export function applyPassive(globalObj?: Window, forceRefresh?: boolean): boolean|{passive: boolean}; + +export function getMatchesProperty(HTMLElementPrototype: object): string[]; + +export function getNormalizedEventCoords(ev: Event, pageOffset: {x: number, y: number}, clientRect: ClientRect): {x: number, y: number}; diff --git a/types/material__select/adapter.d.ts b/types/material__select/adapter.d.ts new file mode 100644 index 0000000000..2828b77361 --- /dev/null +++ b/types/material__select/adapter.d.ts @@ -0,0 +1,81 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface MDCSelectAdapter { + addClass(className: string): void; + + removeClass(className: string): void; + + addBodyClass(className: string): void; + + removeBodyClass(className: string): void; + + setAttr(attr: string, value: string): void; + + rmAttr(attr: string): void; + + computeBoundingRect(): {left: number, top: number}; + + registerInteractionHandler(type: string, handler: EventListener): void; + + deregisterInteractionHandler(type: string, handler: EventListener): void; + + focus(): void; + + makeTabbable(): void; + + makeUntabbable(): void; + + getComputedStyleValue(propertyName: string): string; + + setStyle(propertyName: string, value: string): void; + + create2dRenderingContext(): {font: string, measureText: (val: string) => {width: number}}; + + setMenuElStyle(propertyName: string, value: string): void; + + setMenuElAttr(attr: string, value: string): void; + + rmMenuElAttr(attr: string): void; + + getMenuElOffsetHeight(): number; + + openMenu(focusIndex: number): void; + + isMenuOpen(): boolean; + + setSelectedTextContent(textContent: string): void; + + getNumberOfOptions(): number; + + getTextForOptionAtIndex(index: number): string; + + getValueForOptionAtIndex(index: number): string; + + setAttrForOptionAtIndex(index: number, attr: string, value: string): void; + + rmAttrForOptionAtIndex(index: number, attr: string): void; + + getOffsetTopForOptionAtIndex(index: number): number; + + registerMenuInteractionHandler(type: string, handler: EventListener): void; + + deregisterMenuInteractionHandler(type: string, handler: EventListener): void; + + notifyChange(): void; + + getWindowInnerHeight(): number; +} diff --git a/types/material__select/constants.d.ts b/types/material__select/constants.d.ts new file mode 100644 index 0000000000..1566d71322 --- /dev/null +++ b/types/material__select/constants.d.ts @@ -0,0 +1,28 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings } from 'material__base'; + +export interface cssClasses extends MDCStrings { + ROOT: 'mdc-select'; + OPEN: 'mdc-select--open'; + DISABLED: 'mdc-select--disabled'; + SCROLL_LOCK: 'mdc-select-scroll-lock'; +} + +export interface strings extends MDCStrings { + CHANGE_EVENT: 'MDCSelect:change'; +} diff --git a/types/material__select/foundation.d.ts b/types/material__select/foundation.d.ts new file mode 100644 index 0000000000..6f66f79b5f --- /dev/null +++ b/types/material__select/foundation.d.ts @@ -0,0 +1,40 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCFoundation } from 'material__base'; +import { cssClasses, strings } from './constants'; +import { MDCSimpleMenuFoundation } from 'material__menu'; +import { MDCSelectAdapter } from './adapter'; + +export default class MDCSelectFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MDCSelectAdapter; + + getValue(): string; + + getSelectedIndex(): number; + + setSelectedIndex(index: number): void; + + isDisabled(): boolean; + + setDisabled(disabled: boolean): void; + + resize(): void; +} diff --git a/types/material__select/index.d.ts b/types/material__select/index.d.ts new file mode 100644 index 0000000000..78746a97d1 --- /dev/null +++ b/types/material__select/index.d.ts @@ -0,0 +1,53 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCComponent } from 'material__base'; +import { MDCSimpleMenu } from 'material__menu'; + +import { MDCSelectAdapter } from './adapter'; +import MDCSelectFoundation from './foundation'; + +export {MDCSelectAdapter, MDCSelectFoundation}; + +export class MDCSelect extends MDCComponent { + static attachTo(root: Element): MDCSelect; + + readonly value: string; + + readonly options: Element[]; + + readonly selectedOptions: NodeListOf; + + selectedIndex: number; + + disabled: boolean; + + item(index: number): Element|null; + + nameditem(key: string): Element|null; + + initialize(menuFactory?: (el: Element) => MDCSimpleMenu): void; + + getDefaultFoundation(): MDCSelectFoundation; + + initialSyncWithDOM(): void; +} diff --git a/types/material__select/tsconfig.json b/types/material__select/tsconfig.json new file mode 100644 index 0000000000..06c0ac3c43 --- /dev/null +++ b/types/material__select/tsconfig.json @@ -0,0 +1,28 @@ +{ + "files": [ + "constants.d.ts", + "adapter.d.ts", + "index.d.ts", + "foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__select/tslint.json b/types/material__select/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__select/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__selection-control/index.d.ts b/types/material__selection-control/index.d.ts new file mode 100644 index 0000000000..9c7f90c3fd --- /dev/null +++ b/types/material__selection-control/index.d.ts @@ -0,0 +1,35 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * @license + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCRipple } from 'material__ripple'; + +export interface MDCSelectionControlState { + checked: boolean; + indeterminate: boolean; + disabled: boolean; + value?: string; +} + +export class MDCSelectionControl { + readonly ripple: MDCRipple; +} diff --git a/types/material__selection-control/tsconfig.json b/types/material__selection-control/tsconfig.json new file mode 100644 index 0000000000..0cbce49fc7 --- /dev/null +++ b/types/material__selection-control/tsconfig.json @@ -0,0 +1,25 @@ +{ + "files": [ + "index.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__selection-control/tslint.json b/types/material__selection-control/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__selection-control/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__slider/adapter.d.ts b/types/material__slider/adapter.d.ts new file mode 100644 index 0000000000..940ae04d76 --- /dev/null +++ b/types/material__slider/adapter.d.ts @@ -0,0 +1,67 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface MDCSliderAdapter { + hasClass(className: string): boolean; + + addClass(className: string): void; + + removeClass(className: string): void; + + getAttribute(name: string): string|null; + + setAttribute(name: string, value: string): void; + + removeAttribute(name: string): void; + + computeBoundingRect(): ClientRect; + + getTabIndex(): number; + + registerInteractionHandler(type: string, handler: EventListener): void; + + deregisterInteractionHandler(type: string, handler: EventListener): void; + + registerThumbContainerInteractionHandler(type: string, handler: EventListener): void; + + deregisterThumbContainerInteractionHandler(type: string, handler: EventListener): void; + + registerBodyInteractionHandler(type: string, handler: EventListener): void; + + deregisterBodyInteractionHandler(type: string, handler: EventListener): void; + + registerResizeHandler(handler: EventListener): void; + + deregisterResizeHandler(handler: EventListener): void; + + notifyInput(): void; + + notifyChange(): void; + + setThumbContainerStyleProperty(propertyName: string, value: string): void; + + setTrackStyleProperty(propertyName: string, value: string): void; + + setMarkerValue(value: number): void; + + appendTrackMarkers(numMarkers: number): void; + + removeTrackMarkers(): void; + + setLastTrackMarkersStyleProperty(propertyName: string, value: string): void; + + isRTL(): boolean; +} diff --git a/types/material__slider/constants.d.ts b/types/material__slider/constants.d.ts new file mode 100644 index 0000000000..444eb38f91 --- /dev/null +++ b/types/material__slider/constants.d.ts @@ -0,0 +1,46 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings, MDCNumbers } from 'material__base'; + +export interface cssClasses extends MDCStrings { + ACTIVE: 'mdc-slider--active'; + DISABLED: 'mdc-slider--disabled'; + DISCRETE: 'mdc-slider--discrete'; + FOCUS: 'mdc-slider--focus'; + IN_TRANSIT: 'mdc-slider--in-transit'; + IS_DISCRETE: 'mdc-slider--discrete'; + HAS_TRACK_MARKER: 'mdc-slider--display-markers'; +} + +export interface strings extends MDCStrings { + TRACK_SELECTOR: '.mdc-slider__track'; + TRACK_MARKER_CONTAINER_SELECTOR: '.mdc-slider__track-marker-container'; + LAST_TRACK_MARKER_SELECTOR: '.mdc-slider__track-marker:last-child'; + THUMB_CONTAINER_SELECTOR: '.mdc-slider__thumb-container'; + PIN_VALUE_MARKER_SELECTOR: '.mdc-slider__pin-value-marker'; + ARIA_VALUEMIN: 'aria-valuemin'; + ARIA_VALUEMAX: 'aria-valuemax'; + ARIA_VALUENOW: 'aria-valuenow'; + ARIA_DISABLED: 'aria-disabled'; + STEP_DATA_ATTR: 'data-step'; + CHANGE_EVENT: 'MDCSlider:change'; + INPUT_EVENT: 'MDCSlider:input'; +} + +export interface numbers extends MDCNumbers { + PAGE_FACTOR: 4; +} diff --git a/types/material__slider/foundation.d.ts b/types/material__slider/foundation.d.ts new file mode 100644 index 0000000000..5da6942f49 --- /dev/null +++ b/types/material__slider/foundation.d.ts @@ -0,0 +1,55 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { cssClasses, strings, numbers } from './constants'; + +import { getCorrectEventName, getCorrectPropertyName } from 'material__animation'; +import MDCFoundation from 'material__base/foundation'; +import { MDCSliderAdapter } from './adapter'; + +export default class MDCSliderFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly numbers: numbers; + + static readonly defaultAdapter: MDCSliderAdapter; + + setupTrackMarker(): void; + + layout(): void; + + getValue(): number; + + setValue(value: number): void; + + getMax(): number; + + setMax(max: number): void; + + getMin(): number; + + setMin(min: number): void; + + getStep(): number; + + setStep(step: number): void; + + isDisabled(): boolean; + + setDisabled(disabled: boolean): void; +} diff --git a/types/material__slider/index.d.ts b/types/material__slider/index.d.ts new file mode 100644 index 0000000000..0d0e472775 --- /dev/null +++ b/types/material__slider/index.d.ts @@ -0,0 +1,54 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCComponent from 'material__base/component'; + +import MDCSliderFoundation from './foundation'; +import { MDCSliderAdapter } from './adapter'; + +export {MDCSliderAdapter, MDCSliderFoundation}; + +export class MDCSlider extends MDCComponent { + static attachTo(root: Element): MDCSlider; + + value: number; + + min: number; + + max: number; + + step: number; + + disabled: boolean; + + initialize(): void; + + getDefaultFoundation(): MDCSliderFoundation; + + initialSyncWithDOM(): void; + + layout(): void; + + stepUp(amount?: number): void; + + stepDown(amount?: number): void; +} diff --git a/types/material__slider/tsconfig.json b/types/material__slider/tsconfig.json new file mode 100644 index 0000000000..06c0ac3c43 --- /dev/null +++ b/types/material__slider/tsconfig.json @@ -0,0 +1,28 @@ +{ + "files": [ + "constants.d.ts", + "adapter.d.ts", + "index.d.ts", + "foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__slider/tslint.json b/types/material__slider/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__slider/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__snackbar/adapter.d.ts b/types/material__snackbar/adapter.d.ts new file mode 100644 index 0000000000..412329bd97 --- /dev/null +++ b/types/material__snackbar/adapter.d.ts @@ -0,0 +1,38 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface MDCSnackbarAdapter { + addClass(className: string): void; + removeClass(className: string): void; + setAriaHidden(): void; + unsetAriaHidden(): void; + setActionAriaHidden(): void; + unsetActionAriaHidden(): void; + setActionText(actionText: string): void; + setMessageText(message: string): void; + setFocus(): void; + visibilityIsHidden(): boolean; + registerCapturedBlurHandler(handler: EventListener): void; + deregisterCapturedBlurHandler(handler: EventListener): void; + registerVisibilityChangeHandler(handler: EventListener): void; + deregisterVisibilityChangeHandler(handler: EventListener): void; + registerCapturedInteractionHandler(evtType: string, handler: EventListener): void; + deregisterCapturedInteractionHandler(evtType: string, handler: EventListener): void; + registerActionClickHandler(handler: EventListener): void; + deregisterActionClickHandler(handler: EventListener): void; + registerTransitionEndHandler(handler: EventListener): void; + deregisterTransitionEndHandler(handler: EventListener): void; +} diff --git a/types/material__snackbar/constants.d.ts b/types/material__snackbar/constants.d.ts new file mode 100644 index 0000000000..7bf6758a0a --- /dev/null +++ b/types/material__snackbar/constants.d.ts @@ -0,0 +1,37 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings, MDCNumbers } from 'material__base'; + +export interface cssClasses extends MDCStrings { + ROOT: 'mdc-snackbar'; + TEXT: 'mdc-snackbar__text'; + ACTION_WRAPPER: 'mdc-snackbar__action-wrapper'; + ACTION_BUTTON: 'mdc-snackbar__action-button'; + ACTIVE: 'mdc-snackbar--active'; + MULTILINE: 'mdc-snackbar--multiline'; + ACTION_ON_BOTTOM: 'mdc-snackbar--action-on-bottom'; +} + +export interface strings extends MDCStrings { + TEXT_SELECTOR: '.mdc-snackbar__text'; + ACTION_WRAPPER_SELECTOR: '.mdc-snackbar__action-wrapper'; + ACTION_BUTTON_SELECTOR: '.mdc-snackbar__action-button'; +} + +export interface numbers extends MDCNumbers { + MESSAGE_TIMEOUT: 2750; +} diff --git a/types/material__snackbar/foundation.d.ts b/types/material__snackbar/foundation.d.ts new file mode 100644 index 0000000000..5c85ab5f85 --- /dev/null +++ b/types/material__snackbar/foundation.d.ts @@ -0,0 +1,44 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCFoundation } from 'material__base'; +import { cssClasses, strings, numbers } from './constants'; +import { MDCSnackbarAdapter } from './adapter'; + +export interface MDCSnackbarData { + message: string; + actionHandler: EventListener; + actionText: string; + multiline?: boolean; + actionOnBottom?: boolean; + timeout?: number; +} + +export class MDCSnackbarFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MDCSnackbarAdapter; + + readonly active: boolean; + + dismissesOnAction(): boolean; + + setDismissOnAction(dismissOnAction: boolean): void; + + show(data: MDCSnackbarData): void; +} diff --git a/types/material__snackbar/index.d.ts b/types/material__snackbar/index.d.ts new file mode 100644 index 0000000000..11ac69f573 --- /dev/null +++ b/types/material__snackbar/index.d.ts @@ -0,0 +1,38 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCComponent } from 'material__base'; +import { MDCSnackbarAdapter } from './adapter'; +import { MDCSnackbarFoundation, MDCSnackbarData } from './foundation'; +import { getCorrectEventName } from 'material__animation'; + +export {MDCSnackbarAdapter, MDCSnackbarFoundation}; + +export class MDCSnackbar extends MDCComponent { + static attachTo(root: Element): MDCSnackbar; + + show(data: MDCSnackbarData): void; + + getDefaultFoundation(): MDCSnackbarFoundation; + + dismissesOnAction: boolean; +} diff --git a/types/material__snackbar/tsconfig.json b/types/material__snackbar/tsconfig.json new file mode 100644 index 0000000000..06c0ac3c43 --- /dev/null +++ b/types/material__snackbar/tsconfig.json @@ -0,0 +1,28 @@ +{ + "files": [ + "constants.d.ts", + "adapter.d.ts", + "index.d.ts", + "foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__snackbar/tslint.json b/types/material__snackbar/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__snackbar/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__tabs/index.d.ts b/types/material__tabs/index.d.ts new file mode 100644 index 0000000000..b268e55a8d --- /dev/null +++ b/types/material__tabs/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export {MDCTabFoundation, MDCTab} from './tab/index'; +export {MDCTabBarAdapter, MDCTabBarFoundation, MDCTabBar} from './tab-bar/index'; +export {MDCTabBarScrollerAdapter, MDCTabBarScrollerFoundation, MDCTabBarScroller} from './tab-bar-scroller/index'; diff --git a/types/material__tabs/tab-bar-scroller/adapter.d.ts b/types/material__tabs/tab-bar-scroller/adapter.d.ts new file mode 100644 index 0000000000..8c1286fc74 --- /dev/null +++ b/types/material__tabs/tab-bar-scroller/adapter.d.ts @@ -0,0 +1,69 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface MDCTabBarScrollerAdapter { + addClass(className: string): void; + + removeClass(className: string): void; + + eventTargetHasClass(target: EventTarget, className: string): boolean; + + addClassToForwardIndicator(className: string): void; + + removeClassFromForwardIndicator(className: string): void; + + addClassToBackIndicator(className: string): void; + + removeClassFromBackIndicator(className: string): void; + + isRTL(): boolean; + + registerBackIndicatorClickHandler(handler: EventListener): void; + + deregisterBackIndicatorClickHandler(handler: EventListener): void; + + registerForwardIndicatorClickHandler(handler: EventListener): void; + + deregisterForwardIndicatorClickHandler(handler: EventListener): void; + + registerCapturedInteractionHandler(evt: string, handler: EventListener): void; + + deregisterCapturedInteractionHandler(evt: string, handler: EventListener): void; + + registerWindowResizeHandler(handler: EventListener): void; + + deregisterWindowResizeHandler(handler: EventListener): void; + + getNumberOfTabs(): number; + + getComputedWidthForTabAtIndex(): number; + + getComputedLeftForTabAtIndex(): number; + + getOffsetWidthForScrollFrame(): number; + + getScrollLeftForScrollFrame(): number; + + setScrollLeftForScrollFrame(scrollLeftAmount: number): void; + + getOffsetWidthForTabBar(): number; + + setTransformStyleForTabBar(value: string): void; + + getOffsetLeftForEventTarget(target: EventTarget): number; + + getOffsetWidthForEventTarget(target: EventTarget): number; +} diff --git a/types/material__tabs/tab-bar-scroller/constants.d.ts b/types/material__tabs/tab-bar-scroller/constants.d.ts new file mode 100644 index 0000000000..b78ac1b937 --- /dev/null +++ b/types/material__tabs/tab-bar-scroller/constants.d.ts @@ -0,0 +1,32 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings } from 'material__base'; + +export interface cssClasses extends MDCStrings { + INDICATOR_FORWARD: 'mdc-tab-bar-scroller__indicator--forward'; + INDICATOR_BACK: 'mdc-tab-bar-scroller__indicator--back'; + INDICATOR_ENABLED: 'mdc-tab-bar-scroller__indicator--enabled'; + TAB: 'mdc-tab'; +} + +export interface strings extends MDCStrings { + FRAME_SELECTOR: '.mdc-tab-bar-scroller__scroll-frame'; + TABS_SELECTOR: '.mdc-tab-bar-scroller__scroll-frame__tabs'; + TAB_SELECTOR: '.mdc-tab'; + INDICATOR_FORWARD_SELECTOR: '.mdc-tab-bar-scroller__indicator--forward'; + INDICATOR_BACK_SELECTOR: '.mdc-tab-bar-scroller__indicator--back'; +} diff --git a/types/material__tabs/tab-bar-scroller/foundation.d.ts b/types/material__tabs/tab-bar-scroller/foundation.d.ts new file mode 100644 index 0000000000..ed470c20d2 --- /dev/null +++ b/types/material__tabs/tab-bar-scroller/foundation.d.ts @@ -0,0 +1,36 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCFoundation from 'material__base/foundation'; + +import { cssClasses, strings } from './constants'; +import { MDCTabBarScrollerAdapter } from './adapter'; + +export default class MDCTabBarScrollerFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MDCTabBarScrollerAdapter; + + scrollBack(evt?: Event): void; + + scrollForward(evt?: Event): void; + + layout(): void; + + scrollToTabAtIndex(index: number): void; +} diff --git a/types/material__tabs/tab-bar-scroller/index.d.ts b/types/material__tabs/tab-bar-scroller/index.d.ts new file mode 100644 index 0000000000..a9d71b305c --- /dev/null +++ b/types/material__tabs/tab-bar-scroller/index.d.ts @@ -0,0 +1,36 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { getCorrectPropertyName } from 'material__animation'; +import MDCComponent from 'material__base/component'; + +import { MDCTabBar } from '../tab-bar/index'; +import MDCTabBarScrollerFoundation from './foundation'; +import { MDCTabBarScrollerAdapter } from './adapter'; + +export {MDCTabBarScrollerAdapter, MDCTabBarScrollerFoundation}; + +export class MDCTabBarScroller extends MDCComponent { + static attachTo(root: Element): MDCTabBarScroller; + + readonly tabBar: MDCTabBar; + + initialize(tabBarFactory?: (el: Element) => MDCTabBar): void; + + getDefaultFoundation(): MDCTabBarScrollerFoundation; + + layout(): void; +} diff --git a/types/material__tabs/tab-bar/adapter.d.ts b/types/material__tabs/tab-bar/adapter.d.ts new file mode 100644 index 0000000000..1efa73f52c --- /dev/null +++ b/types/material__tabs/tab-bar/adapter.d.ts @@ -0,0 +1,53 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface MDCTabBarAdapter { + addClass(className: string): void; + + removeClass(className: string): void; + + bindOnMDCTabSelectedEvent(): void; + + unbindOnMDCTabSelectedEvent(): void; + + registerResizeHandler(handler: EventListener): void; + + deregisterResizeHandler(handler: EventListener): void; + + getOffsetWidth(): number; + + setStyleForIndicator(propertyName: string, value: string): void; + + getOffsetWidthForIndicator(): number; + + notifyChange(evtData: {activeTabIndex: number}): void; + + getNumberOfTabs(): number; + + isTabActiveAtIndex(index: number): boolean; + + setTabActiveAtIndex(index: number, isActive: true): void; + + isDefaultPreventedOnClickForTabAtIndex(index: number): boolean; + + setPreventDefaultOnClickForTabAtIndex(index: number, preventDefaultOnClick: boolean): void; + + measureTabAtIndex(index: number): void; + + getComputedWidthForTabAtIndex(index: number): number; + + getComputedLeftForTabAtIndex(index: number): number; +} diff --git a/types/material__tabs/tab-bar/constants.d.ts b/types/material__tabs/tab-bar/constants.d.ts new file mode 100644 index 0000000000..21120fb1e9 --- /dev/null +++ b/types/material__tabs/tab-bar/constants.d.ts @@ -0,0 +1,27 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings } from 'material__base'; + +export interface cssClasses extends MDCStrings { + UPGRADED: 'mdc-tab-bar-upgraded'; +} + +export interface strings extends MDCStrings { + TAB_SELECTOR: '.mdc-tab'; + INDICATOR_SELECTOR: '.mdc-tab-bar__indicator'; + CHANGE_EVENT: 'MDCTabBar:change'; +} diff --git a/types/material__tabs/tab-bar/foundation.d.ts b/types/material__tabs/tab-bar/foundation.d.ts new file mode 100644 index 0000000000..2e5ccb1de2 --- /dev/null +++ b/types/material__tabs/tab-bar/foundation.d.ts @@ -0,0 +1,35 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCFoundation from 'material__base/foundation'; +import { getCorrectPropertyName } from 'material__animation'; + +import { cssClasses, strings } from './constants'; +import { MDCTabBarAdapter } from './adapter'; + +export default class MDCTabBarFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MDCTabBarAdapter; + + layout(): void; + + switchToTabAtIndex(index: number, shouldNotify: boolean): void; + + getActiveTabIndex(): number; +} diff --git a/types/material__tabs/tab-bar/index.d.ts b/types/material__tabs/tab-bar/index.d.ts new file mode 100644 index 0000000000..127a62217f --- /dev/null +++ b/types/material__tabs/tab-bar/index.d.ts @@ -0,0 +1,39 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCComponent from 'material__base/component'; + +import { MDCTab, MDCTabFoundation } from '../tab/index'; +import MDCTabBarFoundation from './foundation'; +import { MDCTabBarAdapter } from './adapter'; + +export {MDCTabBarAdapter, MDCTabBarFoundation}; + +export class MDCTabBar extends MDCComponent { + static attachTo(root: Element): MDCTabBar; + + readonly tabs: MDCTab[]; + + activeTab: MDCTab; + + activeTabIndex: number; + + initialize(tabFactory?: (el: Element) => MDCTab): void; + + getDefaultFoundation(): MDCTabBarFoundation; + + layout(): void; +} diff --git a/types/material__tabs/tab/adapter.d.ts b/types/material__tabs/tab/adapter.d.ts new file mode 100644 index 0000000000..bc07aa5aa7 --- /dev/null +++ b/types/material__tabs/tab/adapter.d.ts @@ -0,0 +1,31 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface MDCTabAdapter { + addClass(className: string): void; + + removeClass(className: string): void; + + registerInteractionHandler(type: string, handler: EventListener): void; + + deregisterInteractionHandler(type: string, handler: EventListener): void; + + getOffsetWidth(): number; + + getOffsetLeft(): number; + + notifySelected(): void; +} diff --git a/types/material__tabs/tab/constants.d.ts b/types/material__tabs/tab/constants.d.ts new file mode 100644 index 0000000000..1023f253db --- /dev/null +++ b/types/material__tabs/tab/constants.d.ts @@ -0,0 +1,25 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings } from 'material__base'; + +export interface cssClasses extends MDCStrings { + ACTIVE: 'mdc-tab--active'; +} + +export interface strings extends MDCStrings { + SELECTED_EVENT: 'MDCTab:selected'; +} diff --git a/types/material__tabs/tab/foundation.d.ts b/types/material__tabs/tab/foundation.d.ts new file mode 100644 index 0000000000..46e14065c8 --- /dev/null +++ b/types/material__tabs/tab/foundation.d.ts @@ -0,0 +1,41 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCFoundation from 'material__base/foundation'; +import { cssClasses, strings } from './constants'; +import { MDCTabAdapter } from './adapter'; + +export class MDCTabFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MDCTabAdapter; + + getComputedWidth(): number; + + getComputedLeft(): number; + + isActive(): boolean; + + setActive(isActive: boolean): void; + + preventsDefaultOnClick(): boolean; + + setPreventDefaultOnClick(preventDefaultOnClick: boolean): void; + + measureSelf(): void; +} diff --git a/types/material__tabs/tab/index.d.ts b/types/material__tabs/tab/index.d.ts new file mode 100644 index 0000000000..bf41b77e65 --- /dev/null +++ b/types/material__tabs/tab/index.d.ts @@ -0,0 +1,44 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCComponent from 'material__base/component'; +import { MDCRipple } from 'material__ripple'; + +import { MDCTabAdapter } from './adapter'; +import { cssClasses } from './constants'; +import { MDCTabFoundation } from './foundation'; + +export {MDCTabAdapter, MDCTabFoundation}; + +export class MDCTab extends MDCComponent { + static attachTo(root: Element): MDCTab; + + readonly computedWidth: number; + + readonly computedLeft: number; + + isActive: boolean; + + preventDefaultOnClick: boolean; + + destroy(): void; + + getDefaultFoundation(): MDCTabFoundation; + + initialSyncWithDOM(): void; + + measureSelf(): void; +} diff --git a/types/material__tabs/tsconfig.json b/types/material__tabs/tsconfig.json new file mode 100644 index 0000000000..69e44f2eef --- /dev/null +++ b/types/material__tabs/tsconfig.json @@ -0,0 +1,37 @@ +{ + "files": [ + "tab-bar/constants.d.ts", + "tab-bar/adapter.d.ts", + "tab-bar/index.d.ts", + "tab-bar/foundation.d.ts", + "tab/constants.d.ts", + "tab/adapter.d.ts", + "tab/index.d.ts", + "tab/foundation.d.ts", + "index.d.ts", + "tab-bar-scroller/constants.d.ts", + "tab-bar-scroller/adapter.d.ts", + "tab-bar-scroller/index.d.ts", + "tab-bar-scroller/foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__tabs/tslint.json b/types/material__tabs/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__tabs/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__textfield/adapter.d.ts b/types/material__textfield/adapter.d.ts new file mode 100644 index 0000000000..ca13544c26 --- /dev/null +++ b/types/material__textfield/adapter.d.ts @@ -0,0 +1,161 @@ +/** + * @license + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCTextFieldBottomLineFoundation from './bottom-line/foundation'; +import MDCTextFieldHelperTextFoundation from './helper-text/foundation'; + +export interface NativeInputType { + value: string; + disabled: boolean; + badInput: boolean; + checkValidity(): boolean; +} + +/** + * Adapter for MDC Text Field. + * + * Defines the shape of the adapter expected by the foundation. Implement this + * adapter to integrate the Text Field into your framework. See + * https://github.com/material-components/material-components-web/blob/master/docs/authoring-components.md + * for more information. + * + * @record + */ +export class MDCTextFieldAdapter { + /** + * Adds a class to the root Element. + */ + addClass(className: string): void; + + /** + * Removes a class from the root Element. + */ + removeClass(className: string): void; + + /** + * Adds a class to the label Element. We recommend you add a conditional + * check here, and in removeClassFromLabel for whether or not the label is + * present so that the JS component could be used with text fields that don't + * require a label, such as the full-width text field. + */ + addClassToLabel(className: string): void; + + /** + * Removes a class from the label Element. + */ + removeClassFromLabel(className: string): void; + + /** + * Sets an attribute on the icon Element. + */ + setIconAttr(name: string, value: string): void; + + /** + * Returns true if classname exists for a given target element. + */ + eventTargetHasClass(target: EventTarget, className: string): boolean; + + /** + * Registers an event handler on the root element for a given event. + */ + registerTextFieldInteractionHandler(type: string, handler: EventListener): void; + + /** + * Deregisters an event handler on the root element for a given event. + */ + deregisterTextFieldInteractionHandler(type: string, handler: EventListener): void; + + /** + * Emits a custom event "MDCTextField:icon" denoting a user has clicked the icon. + */ + notifyIconAction(): void; + + /** + * Adds a class to the helper text element. Note that in our code we check for + * whether or not we have a helper text element and if we don't, we simply + * return. + */ + addClassToHelperText(className: string): void; + + /** + * Removes a class from the helper text element. + */ + removeClassFromHelperText(className: string): void; + + /** + * Returns whether or not the helper text element contains the given class. + */ + helperTextHasClass(className: string): boolean; + + /** + * Registers an event listener on the native input element for a given event. + */ + registerInputInteractionHandler(evtType: string, handler: EventListener): void; + + /** + * Deregisters an event listener on the native input element for a given event. + */ + deregisterInputInteractionHandler(evtType: string, handler: EventListener): void; + + /** + * Registers an event listener on the bottom line element for a given event. + */ + registerBottomLineEventHandler(evtType: string, handler: EventListener): void; + + /** + * Deregisters an event listener on the bottom line element for a given event. + */ + deregisterBottomLineEventHandler(evtType: string, handler: EventListener): void; + + /** + * Sets an attribute with a given value on the helper text element. + */ + setHelperTextAttr(name: string, value: string): void; + + /** + * Removes an attribute from the helper text element. + */ + removeHelperTextAttr(name: string): void; + + /** + * Sets the text content for the help text element + */ + setHelperTextContent(content: string): void; + + /** + * Returns an object representing the native text input element, with a + * similar API shape. The object returned should include the value, disabled + * and badInput properties, as well as the checkValidity() function. We never + * alter the value within our code, however we do update the disabled + * property, so if you choose to duck-type the return value for this method + * in your implementation it's important to keep this in mind. Also note that + * this method can return null, which the foundation will handle gracefully. + */ + getNativeInput(): Element|NativeInputType; + + /** + * Returns the foundation for the bottom line element. Returns undefined if + * there is no bottom line element. + */ + getBottomLineFoundation(): MDCTextFieldBottomLineFoundation; + + /** + * Returns the foundation for the helper text element. Returns undefined if + * there is no helper text element. + */ + getHelperTextFoundation(): MDCTextFieldHelperTextFoundation; +} diff --git a/types/material__textfield/bottom-line/adapter.d.ts b/types/material__textfield/bottom-line/adapter.d.ts new file mode 100644 index 0000000000..25b8de0477 --- /dev/null +++ b/types/material__textfield/bottom-line/adapter.d.ts @@ -0,0 +1,60 @@ +/** + * @license + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Adapter for MDC TextField Bottom Line. + * + * Defines the shape of the adapter expected by the foundation. Implement this + * adapter to integrate the TextField bottom line into your framework. See + * https://github.com/material-components/material-components-web/blob/master/docs/authoring-components.md + * for more information. + * + * @record + */ +export default class MDCTextFieldBottomLineAdapter { + /** + * Adds a class to the bottom line element. + */ + addClass(className: string): void; + + /** + * Removes a class from the bottom line element. + */ + removeClass(className: string): void; + + /** + * Sets an attribute with a given value on the bottom line element. + */ + setAttr(attr: string, value: string): void; + + /** + * Registers an event listener on the bottom line element for a given event. + */ + registerEventHandler(evtType: string, handler: EventListener): void; + + /** + * Deregisters an event listener on the bottom line element for a given event. + */ + deregisterEventHandler(evtType: string, handler: EventListener): void; + + /** + * Emits a custom event "MDCTextFieldBottomLine:animation-end" denoting the + * bottom line has finished its animation; either the activate or + * deactivate animation + */ + notifyAnimationEnd(): void; +} diff --git a/types/material__textfield/bottom-line/constants.d.ts b/types/material__textfield/bottom-line/constants.d.ts new file mode 100644 index 0000000000..519b9fb8e5 --- /dev/null +++ b/types/material__textfield/bottom-line/constants.d.ts @@ -0,0 +1,26 @@ +/** + * @license + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings } from 'material__base'; + +export interface strings extends MDCStrings { + ANIMATION_END_EVENT: 'MDCTextFieldBottomLine:animation-end'; +} + +export interface cssClasses extends MDCStrings { + BOTTOM_LINE_ACTIVE: 'mdc-text-field__bottom-line--active'; +} diff --git a/types/material__textfield/bottom-line/foundation.d.ts b/types/material__textfield/bottom-line/foundation.d.ts new file mode 100644 index 0000000000..6945695348 --- /dev/null +++ b/types/material__textfield/bottom-line/foundation.d.ts @@ -0,0 +1,48 @@ +/** + * @license + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCFoundation from 'material__base/foundation'; +import MDCTextFieldBottomLineAdapter from './adapter'; +import { cssClasses, strings } from './constants'; + +export default class MDCTextFieldBottomLineFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MDCTextFieldBottomLineAdapter; + + /** + * Activates the bottom line + */ + activate(): void; + + /** + * Sets the transform origin given a user's click location. + */ + setTransformOrigin(evt: Event): void; + + /** + * Deactivates the bottom line + */ + deactivate(): void; + + /** + * Handles a transition end event + */ + handleTransitionEnd(evt: Event): void; +} diff --git a/types/material__textfield/bottom-line/index.d.ts b/types/material__textfield/bottom-line/index.d.ts new file mode 100644 index 0000000000..a0ed4ff36d --- /dev/null +++ b/types/material__textfield/bottom-line/index.d.ts @@ -0,0 +1,31 @@ +/** + * @license + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCComponent from 'material__base/component'; + +import MDCTextFieldBottomLineAdapter from './adapter'; +import MDCTextFieldBottomLineFoundation from './foundation'; + +export {MDCTextFieldBottomLineAdapter, MDCTextFieldBottomLineFoundation}; + +export class MDCTextFieldBottomLine extends MDCComponent { + static attachTo(root: Element): MDCTextFieldBottomLine; + + readonly foundation: MDCTextFieldBottomLineFoundation; + + getDefaultFoundation(): MDCTextFieldBottomLineFoundation; +} diff --git a/types/material__textfield/constants.d.ts b/types/material__textfield/constants.d.ts new file mode 100644 index 0000000000..7150bb4b14 --- /dev/null +++ b/types/material__textfield/constants.d.ts @@ -0,0 +1,40 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings } from 'material__base'; + +export interface strings extends MDCStrings { + ARIA_CONTROLS: 'aria-controls'; + INPUT_SELECTOR: '.mdc-text-field__input'; + LABEL_SELECTOR: '.mdc-text-field__label'; + ICON_SELECTOR: '.mdc-text-field__icon'; + ICON_EVENT: 'MDCTextField:icon'; + BOTTOM_LINE_SELECTOR: '.mdc-text-field__bottom-line'; +} + +export interface cssClasses extends MDCStrings { + ROOT: 'mdc-text-field'; + UPGRADED: 'mdc-text-field--upgraded'; + DISABLED: 'mdc-text-field--disabled'; + FOCUSED: 'mdc-text-field--focused'; + INVALID: 'mdc-text-field--invalid'; + LABEL_FLOAT_ABOVE: 'mdc-text-field__label--float-above'; + LABEL_SHAKE: 'mdc-text-field__label--shake'; + BOX: 'mdc-text-field--box'; + TEXT_FIELD_ICON: 'mdc-text-field__icon'; + TEXTAREA: 'mdc-text-field--textarea'; +} diff --git a/types/material__textfield/foundation.d.ts b/types/material__textfield/foundation.d.ts new file mode 100644 index 0000000000..d36d83867e --- /dev/null +++ b/types/material__textfield/foundation.d.ts @@ -0,0 +1,79 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCFoundation from 'material__base/foundation'; +import { MDCTextFieldAdapter, NativeInputType } from './adapter'; +import MDCTextFieldBottomLineFoundation from './bottom-line/foundation'; +import { cssClasses, strings } from './constants'; + +export default class MDCTextFieldFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MDCTextFieldAdapter; + + handleTextFieldInteraction(evt: Event): void; + + /** + * Activates the text field focus state. + */ + activateFocus(): void; + + /** + * Sets the bottom line's transform origin, so that the bottom line activate + * animation will animate out from the user's click location. + */ + setBottomLineTransformOrigin(evt: Event): void; + + /** + * Activates the Text Field's focus state in cases when the input value + * changes without user input (e.g. programatically). + */ + autoCompleteFocus(): void; + + /** + * Handles when bottom line animation ends, performing actions that must wait + * for animations to finish. + */ + handleBottomLineAnimationEnd(): void; + + /** + * Deactives the Text Field's focus state. + */ + deactivateFocus(): void; + + /** + * True if the Text Field is disabled. + */ + isDisabled(): boolean; + + /** + * Sets the text-field disabled or enabled. + */ + setDisabled(disabled: boolean): void; + + /** + * Sets the content of the helper text. + */ + setHelperTextContent(content: string): void; + + /** + * Sets the validity state of the Text Field. + */ + setValid(isValid: boolean): void; +} diff --git a/types/material__textfield/helper-text/adapter.d.ts b/types/material__textfield/helper-text/adapter.d.ts new file mode 100644 index 0000000000..d8320bd0f4 --- /dev/null +++ b/types/material__textfield/helper-text/adapter.d.ts @@ -0,0 +1,58 @@ +/** + * @license + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Adapter for MDC Text Field Helper Text. + * + * Defines the shape of the adapter expected by the foundation. Implement this + * adapter to integrate the TextField helper text into your framework. See + * https://github.com/material-components/material-components-web/blob/master/docs/authoring-components.md + * for more information. + * + * @record + */ +export default class MDCTextFieldHelperTextAdapter { + /** + * Adds a class to the helper text element. + */ + addClass(className: string): void; + + /** + * Removes a class from the helper text element. + */ + removeClass(className: string): void; + + /** + * Returns whether or not the helper text element contains the given class. + */ + hasClass(className: string): boolean; + + /** + * Sets an attribute with a given value on the helper text element. + */ + setAttr(attr: string, value: string): void; + + /** + * Removes an attribute from the helper text element. + */ + removeAttr(attr: string): void; + + /** + * Sets the text content for the helper text element. + */ + setContent(content: string): void; +} diff --git a/types/material__textfield/helper-text/constants.d.ts b/types/material__textfield/helper-text/constants.d.ts new file mode 100644 index 0000000000..5418851e63 --- /dev/null +++ b/types/material__textfield/helper-text/constants.d.ts @@ -0,0 +1,28 @@ +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings } from 'material__base'; + +export interface strings extends MDCStrings { + ARIA_HIDDEN: 'aria-hidden'; + ROLE: 'role'; +} + +export interface cssClasses extends MDCStrings { + HELPER_TEXT_PERSISTENT: 'mdc-text-field-helper-text--persistent'; + HELPER_TEXT_VALIDATION_MSG: 'mdc-text-field-helper-text--validation-msg'; +} diff --git a/types/material__textfield/helper-text/foundation.d.ts b/types/material__textfield/helper-text/foundation.d.ts new file mode 100644 index 0000000000..eccf531e51 --- /dev/null +++ b/types/material__textfield/helper-text/foundation.d.ts @@ -0,0 +1,41 @@ +/** + * @license + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCFoundation from 'material__base/foundation'; +import MDCTextFieldHelperTextAdapter from './adapter'; +import { cssClasses, strings } from './constants'; + +export default class MDCTextFieldHelperTextFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly defaultAdapter: MDCTextFieldHelperTextAdapter; + + /** + * Sets the content of the helper text field. + */ + setContent(content: string): void; + + /** Makes the helper text visible to the screen reader. */ + showToScreenReader(): void; + + /** + * Sets the validity of the helper text based on the input validity. + */ + setValidity(inputIsValid: boolean): void; +} diff --git a/types/material__textfield/helper-text/index.d.ts b/types/material__textfield/helper-text/index.d.ts new file mode 100644 index 0000000000..6c26000366 --- /dev/null +++ b/types/material__textfield/helper-text/index.d.ts @@ -0,0 +1,31 @@ +/** + * @license + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCComponent from 'material__base/component'; + +import MDCTextFieldHelperTextAdapter from './adapter'; +import MDCTextFieldHelperTextFoundation from './foundation'; + +export {MDCTextFieldHelperTextAdapter, MDCTextFieldHelperTextFoundation}; + +export class MDCTextFieldHelperText extends MDCComponent { + static attachTo(root: Element): MDCTextFieldHelperText; + + readonly foundation: MDCTextFieldHelperTextFoundation; + + getDefaultFoundation(): MDCTextFieldHelperTextFoundation; +} diff --git a/types/material__textfield/index.d.ts b/types/material__textfield/index.d.ts new file mode 100644 index 0000000000..85d4c36420 --- /dev/null +++ b/types/material__textfield/index.d.ts @@ -0,0 +1,61 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * @license + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import MDCComponent from 'material__base/component'; +import { MDCRipple } from 'material__ripple'; + +import { cssClasses, strings } from './constants'; +import { MDCTextFieldAdapter } from './adapter'; +import MDCTextFieldFoundation from './foundation'; +import { MDCTextFieldBottomLine } from './bottom-line/index'; +import { MDCTextFieldHelperText } from './helper-text/index'; + +export {MDCTextFieldAdapter, MDCTextFieldFoundation}; + +export class MDCTextField extends MDCComponent { + static attachTo(root: Element): MDCTextField; + + initialize( + rippleFactory?: (el: Element) => MDCRipple, + bottomLineFactory?: (el: Element) => MDCTextFieldBottomLine + ): void; + + destroy(): void; + + /** + * Initiliazes the Text Field's internal state based on the environment's + * state. + */ + initialSyncWithDom(): void; + + disabled: boolean; + + valid: boolean; + + /** + * Sets the helper text element content. + */ + helperTextContent: string; + + getDefaultFoundation(): MDCTextFieldFoundation; +} diff --git a/types/material__textfield/tsconfig.json b/types/material__textfield/tsconfig.json new file mode 100644 index 0000000000..e9d0a01a13 --- /dev/null +++ b/types/material__textfield/tsconfig.json @@ -0,0 +1,36 @@ +{ + "files": [ + "constants.d.ts", + "adapter.d.ts", + "helper-text/constants.d.ts", + "helper-text/adapter.d.ts", + "helper-text/index.d.ts", + "helper-text/foundation.d.ts", + "bottom-line/constants.d.ts", + "bottom-line/adapter.d.ts", + "bottom-line/index.d.ts", + "bottom-line/foundation.d.ts", + "index.d.ts", + "foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__textfield/tslint.json b/types/material__textfield/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__textfield/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__toolbar/adapter.d.ts b/types/material__toolbar/adapter.d.ts new file mode 100644 index 0000000000..625b296cf8 --- /dev/null +++ b/types/material__toolbar/adapter.d.ts @@ -0,0 +1,49 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface MDCToolbarAdapter { + hasClass(className: string): boolean; + + addClass(className: string): void; + + removeClass(className: string): void; + + registerScrollHandler(handler: EventListener): void; + + deregisterScrollHandler(handler: EventListener): void; + + registerResizeHandler(handler: EventListener): void; + + deregisterResizeHandler(handler: EventListener): void; + + getViewportWidth(): number; + + getViewportScrollY(): number; + + getOffsetHeight(): number; + + getFirstRowElementOffsetHeight(): number; + + notifyChange(evtData: {flexibleExpansionRatio: number}): void; + + setStyle(property: string, value: string): void; + + setStyleForTitleElement(property: string, value: string): void; + + setStyleForFlexibleRowElement(property: string, value: string): void; + + setStyleForFixedAdjustElement(property: string, value: string): void; +} diff --git a/types/material__toolbar/constants.d.ts b/types/material__toolbar/constants.d.ts new file mode 100644 index 0000000000..8f984ac113 --- /dev/null +++ b/types/material__toolbar/constants.d.ts @@ -0,0 +1,41 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCStrings, MDCNumbers } from 'material__base'; + +export interface cssClasses extends MDCStrings { + FIXED: 'mdc-toolbar--fixed'; + FIXED_LASTROW: 'mdc-toolbar--fixed-lastrow-only'; + FIXED_AT_LAST_ROW: 'mdc-toolbar--fixed-at-last-row'; + TOOLBAR_ROW_FLEXIBLE: 'mdc-toolbar--flexible'; + FLEXIBLE_DEFAULT_BEHAVIOR: 'mdc-toolbar--flexible-default-behavior'; + FLEXIBLE_MAX: 'mdc-toolbar--flexible-space-maximized'; + FLEXIBLE_MIN: 'mdc-toolbar--flexible-space-minimized'; +} + +export interface strings extends MDCStrings { + TITLE_SELECTOR: '.mdc-toolbar__title'; + FIRST_ROW_SELECTOR: '.mdc-toolbar__row:first-child'; + CHANGE_EVENT: 'MDCToolbar:change'; +} + +export interface numbers extends MDCNumbers { + MAX_TITLE_SIZE: 2.125; + MIN_TITLE_SIZE: 1.25; + TOOLBAR_ROW_HEIGHT: 64; + TOOLBAR_ROW_MOBILE_HEIGHT: 56; + TOOLBAR_MOBILE_BREAKPOINT: 600; +} diff --git a/types/material__toolbar/foundation.d.ts b/types/material__toolbar/foundation.d.ts new file mode 100644 index 0000000000..883c0b19e0 --- /dev/null +++ b/types/material__toolbar/foundation.d.ts @@ -0,0 +1,30 @@ +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import MDCFoundation from 'material__base/foundation'; +import { cssClasses, strings, numbers } from './constants'; +import { MDCToolbarAdapter } from './adapter'; + +export default class MDCToolbarFoundation extends MDCFoundation { + static readonly cssClasses: cssClasses; + + static readonly strings: strings; + + static readonly numbers: numbers; + + static readonly defaultAdapter: MDCToolbarAdapter; + + updateAdjustElementStyles(): void; +} diff --git a/types/material__toolbar/index.d.ts b/types/material__toolbar/index.d.ts new file mode 100644 index 0000000000..1b048c64c9 --- /dev/null +++ b/types/material__toolbar/index.d.ts @@ -0,0 +1,37 @@ +// Type definitions for Material Components Web 0.26 +// Project: https://material.io/components/ +// Definitions by: Brent Douglas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/** + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MDCComponent } from 'material__base'; + +import MDCToolbarFoundation from './foundation'; +import { MDCToolbarAdapter } from './adapter'; +import * as util from './util'; + +export {MDCToolbarAdapter, MDCToolbarFoundation, util}; + +export class MDCToolbar extends MDCComponent { + static attachTo(root: HTMLElement): MDCToolbar; + + fixedAdjustElement: HTMLElement; + + getDefaultFoundation(): MDCToolbarFoundation; +} diff --git a/types/material__toolbar/tsconfig.json b/types/material__toolbar/tsconfig.json new file mode 100644 index 0000000000..9f215e4ee0 --- /dev/null +++ b/types/material__toolbar/tsconfig.json @@ -0,0 +1,29 @@ +{ + "files": [ + "constants.d.ts", + "adapter.d.ts", + "util.d.ts", + "index.d.ts", + "foundation.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/types/material__toolbar/tslint.json b/types/material__toolbar/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/material__toolbar/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/material__toolbar/util.d.ts b/types/material__toolbar/util.d.ts new file mode 100644 index 0000000000..37506958e7 --- /dev/null +++ b/types/material__toolbar/util.d.ts @@ -0,0 +1,18 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Determine whether the current browser supports passive event listeners, and if so, use them. +export function applyPassive(globalObj?: Window, forceRefresh?: boolean): boolean; diff --git a/types/materialize-css/tsconfig.json b/types/materialize-css/tsconfig.json index 316e2f8361..e018875d4a 100644 --- a/types/materialize-css/tsconfig.json +++ b/types/materialize-css/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -23,4 +24,4 @@ "test/materialize-css-module.test.ts", "test/materialize-css-jquery.test.ts" ] -} +} \ No newline at end of file diff --git a/types/materialize-css/v0/tsconfig.json b/types/materialize-css/v0/tsconfig.json index 4f000774ea..a627672707 100644 --- a/types/materialize-css/v0/tsconfig.json +++ b/types/materialize-css/v0/tsconfig.json @@ -20,10 +20,11 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "materialize-css-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/math3d/tsconfig.json b/types/math3d/tsconfig.json index 95a0a4148d..9137199265 100644 --- a/types/math3d/tsconfig.json +++ b/types/math3d/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mathjax/tsconfig.json b/types/mathjax/tsconfig.json index dcf27a92fb..2112b99a25 100644 --- a/types/mathjax/tsconfig.json +++ b/types/mathjax/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mathjs/tsconfig.json b/types/mathjs/tsconfig.json index c2aefff773..b303869490 100644 --- a/types/mathjs/tsconfig.json +++ b/types/mathjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/matter-js/tsconfig.json b/types/matter-js/tsconfig.json index bac77b2a64..b2badceadf 100644 --- a/types/matter-js/tsconfig.json +++ b/types/matter-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/maxmind/tsconfig.json b/types/maxmind/tsconfig.json index 0b1011f8f7..6891fe1c23 100644 --- a/types/maxmind/tsconfig.json +++ b/types/maxmind/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mcustomscrollbar/tsconfig.json b/types/mcustomscrollbar/tsconfig.json index b112ee023e..d30025133e 100644 --- a/types/mcustomscrollbar/tsconfig.json +++ b/types/mcustomscrollbar/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/md5/tsconfig.json b/types/md5/tsconfig.json index 0f2d4677ab..a8d504f6fd 100644 --- a/types/md5/tsconfig.json +++ b/types/md5/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mdns/tsconfig.json b/types/mdns/tsconfig.json index 94e58f4170..66eb855866 100644 --- a/types/mdns/tsconfig.json +++ b/types/mdns/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mdurl/tsconfig.json b/types/mdurl/tsconfig.json index c00c56ef07..38ef207a0a 100644 --- a/types/mdurl/tsconfig.json +++ b/types/mdurl/tsconfig.json @@ -14,10 +14,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ "index.d.ts", "mdurl-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/media-typer/tsconfig.json b/types/media-typer/tsconfig.json index fe5268288d..4a1fc1c9a7 100644 --- a/types/media-typer/tsconfig.json +++ b/types/media-typer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/medium-editor/tsconfig.json b/types/medium-editor/tsconfig.json index 10748accf4..405b91f5c7 100644 --- a/types/medium-editor/tsconfig.json +++ b/types/medium-editor/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mem/tsconfig.json b/types/mem/tsconfig.json index 3545985694..b43f6271a3 100644 --- a/types/mem/tsconfig.json +++ b/types/mem/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/memcached/index.d.ts b/types/memcached/index.d.ts index fffbb57c82..8e330fa88d 100644 --- a/types/memcached/index.d.ts +++ b/types/memcached/index.d.ts @@ -280,5 +280,9 @@ declare namespace Memcached { * 5000, the idle timeout for the connections. */ idle ?: number; + /** + * '', sentinel to prepend to all memcache keys for namespacing the entries. + */ + namespace ?: string; } } diff --git a/types/memcached/tsconfig.json b/types/memcached/tsconfig.json index 720907bb10..daeddba4b9 100644 --- a/types/memcached/tsconfig.json +++ b/types/memcached/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/memoizee/tsconfig.json b/types/memoizee/tsconfig.json index b8aa9634f1..9e24c851b1 100644 --- a/types/memoizee/tsconfig.json +++ b/types/memoizee/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/memory-cache/tsconfig.json b/types/memory-cache/tsconfig.json index 1d0ac845ac..12a7e2cd2f 100644 --- a/types/memory-cache/tsconfig.json +++ b/types/memory-cache/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/memory-fs/tsconfig.json b/types/memory-fs/tsconfig.json index 13eb7da317..b2cc01072d 100644 --- a/types/memory-fs/tsconfig.json +++ b/types/memory-fs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/memwatch-next/tsconfig.json b/types/memwatch-next/tsconfig.json index 4541aaa1cf..36ae49fd1d 100644 --- a/types/memwatch-next/tsconfig.json +++ b/types/memwatch-next/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/menubar/menubar-tests.ts b/types/menubar/menubar-tests.ts index 7fd1a9dbe4..9501574164 100644 --- a/types/menubar/menubar-tests.ts +++ b/types/menubar/menubar-tests.ts @@ -1,4 +1,4 @@ -import * as menubar from "menubar"; +import menubar = require("menubar"); var mb1 = menubar(); diff --git a/types/menubar/tsconfig.json b/types/menubar/tsconfig.json index d9d6d843b4..2e3879f42f 100644 --- a/types/menubar/tsconfig.json +++ b/types/menubar/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/meow/index.d.ts b/types/meow/index.d.ts index 2585d421ae..20e40c63f7 100644 --- a/types/meow/index.d.ts +++ b/types/meow/index.d.ts @@ -1,11 +1,13 @@ -// Type definitions for meow 3.6 +// Type definitions for meow 4.x // Project: https://github.com/sindresorhus/meow -// Definitions by: KnisterPeter +// Definitions by: KnisterPeter , Lindsey Smith // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 -import * as minimist from 'minimist'; +import * as buildOptions from "minimist-options"; -declare function meow(options: string | string[] | meow.Options, minimistOptions?: minimist.Opts): meow.Result; +declare function meow(helpMessage: string | string[], options: meow.Options): meow.Result; +declare function meow(options: string | string[] | meow.Options): meow.Result; declare namespace meow { interface Options { description?: string | boolean; @@ -14,14 +16,18 @@ declare namespace meow { pkg?: any; argv?: string[]; inferType?: boolean; + flags?: buildOptions.Options; + autoHelp?: boolean; + autoVersion?: boolean; } interface Result { input: string[]; flags: { [name: string]: any }; - pkg: any; + pkg: object; help: string; showHelp(code?: number): void; + showVersion(): void; } } diff --git a/types/meow/meow-tests.ts b/types/meow/meow-tests.ts index 6560b76bef..8915603292 100644 --- a/types/meow/meow-tests.ts +++ b/types/meow/meow-tests.ts @@ -1,19 +1,39 @@ import meow = require('meow'); -import Options = meow.Options; -const options: Options = {}; -options.description = true; -options.description = 'string'; -options.help = true; -options.help = 'string'; -options.version = true; -options.version = 'string'; -options.argv = ['string', 'string']; -options.inferType = true; +const cli = meow("Help text", + { + flags: { + unicorn: { + type: 'boolean', + alias: 'u' + }, + fooBar: { + type: 'string', + default: 'foo' + } + } + } +); -meow(options); -meow('Usage text', { - alias: { - opt: 'opt' - } +const cli2 = meow("Help text"); + +const cli3 = meow({ + description: "version string", + help: "help string", + version: "1.0.0", + pkg: {}, + argv: ['foo', 'bar'], + inferType: true, + autoHelp: true, + autoVersion: true, + flags: { + unicorn: { + type: 'boolean', + alias: 'u' + }, + fooBar: { + type: 'string', + default: 'foo' + } + } }); diff --git a/types/meow/tsconfig.json b/types/meow/tsconfig.json index 33dd0b0883..a0ad2daded 100644 --- a/types/meow/tsconfig.json +++ b/types/meow/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/merge-descriptors/tsconfig.json b/types/merge-descriptors/tsconfig.json index 23f7dfbcce..59d838f171 100644 --- a/types/merge-descriptors/tsconfig.json +++ b/types/merge-descriptors/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/merge-stream/tsconfig.json b/types/merge-stream/tsconfig.json index d68bbea99f..f36f9609f1 100644 --- a/types/merge-stream/tsconfig.json +++ b/types/merge-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/merge2/merge2-tests.ts b/types/merge2/merge2-tests.ts index ba11597dfa..c96747973d 100644 --- a/types/merge2/merge2-tests.ts +++ b/types/merge2/merge2-tests.ts @@ -1,5 +1,5 @@ import * as gulp from 'gulp'; -import * as merge2 from 'merge2'; +import merge2 = require('merge2'); gulp.task('app-js', () => merge2( diff --git a/types/merge2/tsconfig.json b/types/merge2/tsconfig.json index e39e70032b..7b84762f1a 100644 --- a/types/merge2/tsconfig.json +++ b/types/merge2/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/merkle/tsconfig.json b/types/merkle/tsconfig.json index f52ca0bab3..0c54ad7910 100644 --- a/types/merkle/tsconfig.json +++ b/types/merkle/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mersenne-twister/tsconfig.json b/types/mersenne-twister/tsconfig.json index 418c7a0355..4d4863d526 100644 --- a/types/mersenne-twister/tsconfig.json +++ b/types/mersenne-twister/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/meshblu/tsconfig.json b/types/meshblu/tsconfig.json index a00e392388..89b1d2672e 100644 --- a/types/meshblu/tsconfig.json +++ b/types/meshblu/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mess/tsconfig.json b/types/mess/tsconfig.json index 8ca702b9a4..813664418e 100644 --- a/types/mess/tsconfig.json +++ b/types/mess/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/messenger/tsconfig.json b/types/messenger/tsconfig.json index 15915e2f35..ba06a057d8 100644 --- a/types/messenger/tsconfig.json +++ b/types/messenger/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/meteor-accounts-phone/tsconfig.json b/types/meteor-accounts-phone/tsconfig.json index f6945ba442..84dc40357b 100644 --- a/types/meteor-accounts-phone/tsconfig.json +++ b/types/meteor-accounts-phone/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/meteor-collection-hooks/tsconfig.json b/types/meteor-collection-hooks/tsconfig.json index 462b5cb2fe..a0a676b908 100644 --- a/types/meteor-collection-hooks/tsconfig.json +++ b/types/meteor-collection-hooks/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/meteor-jboulhous-dev/tsconfig.json b/types/meteor-jboulhous-dev/tsconfig.json index 6a0bc28585..d31afd862e 100644 --- a/types/meteor-jboulhous-dev/tsconfig.json +++ b/types/meteor-jboulhous-dev/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/meteor-persistent-session/tsconfig.json b/types/meteor-persistent-session/tsconfig.json index 9f9adaeead..683c700a9d 100644 --- a/types/meteor-persistent-session/tsconfig.json +++ b/types/meteor-persistent-session/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/meteor-prime8consulting-oauth2/tsconfig.json b/types/meteor-prime8consulting-oauth2/tsconfig.json index 1d71e79d3c..c389ce9cf9 100644 --- a/types/meteor-prime8consulting-oauth2/tsconfig.json +++ b/types/meteor-prime8consulting-oauth2/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/meteor-publish-composite/tsconfig.json b/types/meteor-publish-composite/tsconfig.json index 81c22f6ce3..0785ede5be 100644 --- a/types/meteor-publish-composite/tsconfig.json +++ b/types/meteor-publish-composite/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/meteor-roles/tsconfig.json b/types/meteor-roles/tsconfig.json index 037db6b9f4..51a1ad5bde 100644 --- a/types/meteor-roles/tsconfig.json +++ b/types/meteor-roles/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/meteor/tsconfig.json b/types/meteor/tsconfig.json index 6185ff9c61..52e222c94e 100644 --- a/types/meteor/tsconfig.json +++ b/types/meteor/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "accounts.d.ts", @@ -41,4 +42,4 @@ "index.d.ts", "meteor-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/method-override/tsconfig.json b/types/method-override/tsconfig.json index 1487adc964..650db93067 100644 --- a/types/method-override/tsconfig.json +++ b/types/method-override/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/methods/tsconfig.json b/types/methods/tsconfig.json index 1b3353ca82..3a5f1b3b18 100644 --- a/types/methods/tsconfig.json +++ b/types/methods/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/metric-suffix/tsconfig.json b/types/metric-suffix/tsconfig.json index fc4d7b871f..47128d3617 100644 --- a/types/metric-suffix/tsconfig.json +++ b/types/metric-suffix/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mfiles/tsconfig.json b/types/mfiles/tsconfig.json index 295542875a..530a0d5827 100644 --- a/types/mfiles/tsconfig.json +++ b/types/mfiles/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/micro/micro-tests.ts b/types/micro/micro-tests.ts index 010fe012cb..e47645deb9 100644 --- a/types/micro/micro-tests.ts +++ b/types/micro/micro-tests.ts @@ -1,5 +1,5 @@ import micro, { json, RequestHandler, buffer, text, send, createError } from 'micro'; -import * as socketIO from 'socket.io'; +import socketIO = require('socket.io'); // Json sample diff --git a/types/micro/tsconfig.json b/types/micro/tsconfig.json index 7f1e37655b..2d341abe8d 100644 --- a/types/micro/tsconfig.json +++ b/types/micro/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/micromatch/tsconfig.json b/types/micromatch/tsconfig.json index 277346ea71..02774511a8 100644 --- a/types/micromatch/tsconfig.json +++ b/types/micromatch/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/micromatch/v2/tsconfig.json b/types/micromatch/v2/tsconfig.json index e011e8c1cc..a0e11a8a22 100644 --- a/types/micromatch/v2/tsconfig.json +++ b/types/micromatch/v2/tsconfig.json @@ -19,7 +19,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/microrouter/tsconfig.json b/types/microrouter/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/microrouter/tsconfig.json +++ b/types/microrouter/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/microsoft-ajax/tsconfig.json b/types/microsoft-ajax/tsconfig.json index 3a8d8bcc37..1e27f3d6dd 100644 --- a/types/microsoft-ajax/tsconfig.json +++ b/types/microsoft-ajax/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/microsoft-live-connect/tsconfig.json b/types/microsoft-live-connect/tsconfig.json index 7895e4debe..555540b344 100644 --- a/types/microsoft-live-connect/tsconfig.json +++ b/types/microsoft-live-connect/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/microsoft-sdk-soap/tsconfig.json b/types/microsoft-sdk-soap/tsconfig.json index 3eee7c6b1c..6bc4ac7835 100644 --- a/types/microsoft-sdk-soap/tsconfig.json +++ b/types/microsoft-sdk-soap/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/microsoftteams/tsconfig.json b/types/microsoftteams/tsconfig.json index 95b8785492..6014c8e5d7 100644 --- a/types/microsoftteams/tsconfig.json +++ b/types/microsoftteams/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/microtime/tsconfig.json b/types/microtime/tsconfig.json index c5989f5799..7991d90494 100644 --- a/types/microtime/tsconfig.json +++ b/types/microtime/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/milkcocoa/tsconfig.json b/types/milkcocoa/tsconfig.json index def0b291ed..22c7cb7830 100644 --- a/types/milkcocoa/tsconfig.json +++ b/types/milkcocoa/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/milliseconds/tsconfig.json b/types/milliseconds/tsconfig.json index eb756035ba..aa931efbdb 100644 --- a/types/milliseconds/tsconfig.json +++ b/types/milliseconds/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mime-db/tsconfig.json b/types/mime-db/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/mime-db/tsconfig.json +++ b/types/mime-db/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/mime-types/tsconfig.json b/types/mime-types/tsconfig.json index d197e5f93c..f197d1a1a5 100644 --- a/types/mime-types/tsconfig.json +++ b/types/mime-types/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mime/tsconfig.json b/types/mime/tsconfig.json index 8e0eb9488e..45e7b9f82f 100644 --- a/types/mime/tsconfig.json +++ b/types/mime/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mimos/tsconfig.json b/types/mimos/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/mimos/tsconfig.json +++ b/types/mimos/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/mina/tsconfig.json b/types/mina/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/mina/tsconfig.json +++ b/types/mina/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/minilog/tsconfig.json b/types/minilog/tsconfig.json index b999744170..eabf1dc6ad 100644 --- a/types/minilog/tsconfig.json +++ b/types/minilog/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/minimatch/tsconfig.json b/types/minimatch/tsconfig.json index 7180fe6a29..c0e55963be 100644 --- a/types/minimatch/tsconfig.json +++ b/types/minimatch/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/minimist-options/tsconfig.json b/types/minimist-options/tsconfig.json index b43c584555..54036aa94c 100644 --- a/types/minimist-options/tsconfig.json +++ b/types/minimist-options/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "minimist-options-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/minimist/tsconfig.json b/types/minimist/tsconfig.json index 27be869de4..55bf6c93ab 100644 --- a/types/minimist/tsconfig.json +++ b/types/minimist/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/minipass/tsconfig.json b/types/minipass/tsconfig.json index 9115c6fe85..4d54021296 100644 --- a/types/minipass/tsconfig.json +++ b/types/minipass/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mirrorx/tsconfig.json b/types/mirrorx/tsconfig.json index 561f5cdab4..8adf5ab4b5 100644 --- a/types/mirrorx/tsconfig.json +++ b/types/mirrorx/tsconfig.json @@ -1,5 +1,5 @@ { - "files": [ + "files": [ "index.d.ts", "mirrorx-tests.ts" ], @@ -21,6 +21,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/mithril-global/tsconfig.json b/types/mithril-global/tsconfig.json index f48de2bee8..0a7b5cb267 100644 --- a/types/mithril-global/tsconfig.json +++ b/types/mithril-global/tsconfig.json @@ -11,6 +11,7 @@ "strictFunctionTypes": true, "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/mithril/tsconfig.json b/types/mithril/tsconfig.json index 3164285eb5..e336b24f36 100644 --- a/types/mithril/tsconfig.json +++ b/types/mithril/tsconfig.json @@ -10,6 +10,7 @@ "strictNullChecks": true, "strictFunctionTypes": false, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noEmit": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/mitm/tsconfig.json b/types/mitm/tsconfig.json index bb19fc1d20..86cb3b52d7 100644 --- a/types/mitm/tsconfig.json +++ b/types/mitm/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mixpanel/tsconfig.json b/types/mixpanel/tsconfig.json index f5cbbce2f5..c12c4200d9 100644 --- a/types/mixpanel/tsconfig.json +++ b/types/mixpanel/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mixto/tsconfig.json b/types/mixto/tsconfig.json index 8cbc98843f..f780617abc 100644 --- a/types/mixto/tsconfig.json +++ b/types/mixto/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mkdirp/tsconfig.json b/types/mkdirp/tsconfig.json index a5bd09ff68..605500591f 100644 --- a/types/mkdirp/tsconfig.json +++ b/types/mkdirp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mkpath/tsconfig.json b/types/mkpath/tsconfig.json index e114847c25..8fdbb85d17 100644 --- a/types/mkpath/tsconfig.json +++ b/types/mkpath/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mmmagic/tsconfig.json b/types/mmmagic/tsconfig.json index 074e791e6d..775da23960 100644 --- a/types/mmmagic/tsconfig.json +++ b/types/mmmagic/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mobx-apollo/tsconfig.json b/types/mobx-apollo/tsconfig.json index c4c2acace4..969ca52e32 100644 --- a/types/mobx-apollo/tsconfig.json +++ b/types/mobx-apollo/tsconfig.json @@ -1,17 +1,25 @@ { "compilerOptions": { "module": "commonjs", - "lib": ["es6"], + "lib": [ + "es6" + ], "target": "es5", "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, - "files": ["index.d.ts", "mobx-apollo-tests.ts"] -} + "files": [ + "index.d.ts", + "mobx-apollo-tests.ts" + ] +} \ No newline at end of file diff --git a/types/mocha-phantomjs/tsconfig.json b/types/mocha-phantomjs/tsconfig.json index 12d2f5cf28..4ab29d667e 100644 --- a/types/mocha-phantomjs/tsconfig.json +++ b/types/mocha-phantomjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mocha-steps/tsconfig.json b/types/mocha-steps/tsconfig.json index 0a75385b3a..8447cc6306 100644 --- a/types/mocha-steps/tsconfig.json +++ b/types/mocha-steps/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "mocha-steps-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/mocha/index.d.ts b/types/mocha/index.d.ts index 236c3429b1..06ef96c618 100644 --- a/types/mocha/index.d.ts +++ b/types/mocha/index.d.ts @@ -147,6 +147,7 @@ declare namespace Mocha { sync: boolean; timedOut: boolean; timeout(n: number | string): this; + duration?: number; } /** Partial interface for Mocha's `Suite` class. */ @@ -170,9 +171,30 @@ declare namespace Mocha { currentTest: ITest; } + interface IStats { + suites: number; + tests: number; + passes: number; + pending: number; + failures: number; + start?: Date; + end?: Date; + duration?: Date; + } /** Partial interface for Mocha's `Runner` class. */ - interface IRunner { } + interface IRunner { + stats?: IStats; + started: boolean; + suite: ISuite; + total: number; + failures: number; + grep: (re: string, invert: boolean) => this; + grepTotal: (suite: ISuite) => number; + globals: (arr: ReadonlyArray) => this | string[]; + abort: () => this; + run: (fn?: (failures: number) => void) => this; + } interface IContextDefinition { (description: string, callback: (this: ISuiteCallbackContext) => void): ISuite; @@ -191,13 +213,7 @@ declare namespace Mocha { export module reporters { export class Base { - stats: { - suites: number; - tests: number; - passes: number; - pending: number; - failures: number; - }; + stats: IStats; constructor(runner: IRunner); } diff --git a/types/mocha/mocha-tests.ts b/types/mocha/mocha-tests.ts index 2549c3cb68..0146c04b13 100644 --- a/types/mocha/mocha-tests.ts +++ b/types/mocha/mocha-tests.ts @@ -1,5 +1,8 @@ let boolean: boolean; let string: string; +let number: number; +let stringOrUndefined: string | undefined; +let dateOrUndefined: Date | undefined; function test_describe() { describe('something', () => { }); @@ -112,7 +115,7 @@ function test_setup() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); setup(function () { @@ -123,7 +126,7 @@ function test_setup() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); setup(function (done) { @@ -134,7 +137,7 @@ function test_setup() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); } @@ -158,7 +161,7 @@ function test_teardown() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); teardown(function () { @@ -169,7 +172,7 @@ function test_teardown() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); teardown(function (done) { @@ -180,7 +183,7 @@ function test_teardown() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); } @@ -192,7 +195,7 @@ function test_beforeEach() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); beforeEach(function () { @@ -203,7 +206,7 @@ function test_beforeEach() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); beforeEach(function (done) { @@ -214,7 +217,7 @@ function test_beforeEach() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); beforeEach("my description", function () { @@ -224,7 +227,7 @@ function test_beforeEach() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); beforeEach("my description", function (done) { @@ -235,7 +238,7 @@ function test_beforeEach() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); } @@ -255,7 +258,7 @@ function test_afterEach() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); afterEach(function () { @@ -266,7 +269,7 @@ function test_afterEach() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); afterEach(function (done) { @@ -277,7 +280,7 @@ function test_afterEach() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); afterEach("my description", function () { @@ -287,7 +290,7 @@ function test_afterEach() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); afterEach("my description", function (done) { @@ -298,7 +301,7 @@ function test_afterEach() { boolean = this.currentTest.timedOut; string = this.currentTest.title; string = this.currentTest.fullTitle(); - string = this.currentTest.state; + stringOrUndefined = this.currentTest.state; }); } @@ -455,3 +458,44 @@ function test_run_withOnComplete() { function test_throwError() { mocha.throwError(new Error("I'm an error!")); } + +function test_mochaRunner_properties(runner: MochaDef.IRunner, suite: MochaDef.ISuite) { + runner = runner.abort(); + + if (runner.stats !== undefined) { + number = runner.stats.failures; + number = runner.stats.passes; + number = runner.stats.pending; + number = runner.stats.suites; + number = runner.stats.tests; + + dateOrUndefined = runner.stats.start; + dateOrUndefined = runner.stats.end; + dateOrUndefined = runner.stats.duration; + } + + let s: MochaDef.ISuite = runner.suite; + boolean = runner.started; + number = runner.total; + number = runner.failures; + + runner = runner.grep("regex", false); + number = runner.grepTotal(suite); + + let globals: string[] | MochaDef.IRunner= runner.globals(["hello", "world"]); + + runner = runner.run(); + runner = runner.run((f: number) => {}); +} + +function test_base_reporter_properties(reporter: MochaDef.reporters.Base) { + number = reporter.stats.failures; + number = reporter.stats.passes; + number = reporter.stats.pending; + number = reporter.stats.suites; + number = reporter.stats.tests; + + dateOrUndefined = reporter.stats.start; + dateOrUndefined = reporter.stats.end; + dateOrUndefined = reporter.stats.duration; +} \ No newline at end of file diff --git a/types/mocha/tsconfig.json b/types/mocha/tsconfig.json index 43be806414..469634a2f1 100644 --- a/types/mocha/tsconfig.json +++ b/types/mocha/tsconfig.json @@ -6,8 +6,8 @@ "dom" ], "noImplicitAny": true, - "noImplicitThis": false, - "strictNullChecks": false, + "noImplicitThis": true, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mochaccino/tsconfig.json b/types/mochaccino/tsconfig.json index 166b3f4203..a309a1969a 100644 --- a/types/mochaccino/tsconfig.json +++ b/types/mochaccino/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "mochaccino-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/mock-aws-s3/tsconfig.json b/types/mock-aws-s3/tsconfig.json index 9b5aeeacaa..352631ebac 100644 --- a/types/mock-aws-s3/tsconfig.json +++ b/types/mock-aws-s3/tsconfig.json @@ -1,16 +1,24 @@ { "compilerOptions": { "module": "commonjs", - "lib": ["es6"], + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, - "files": ["index.d.ts", "mock-aws-s3-tests.ts"] -} + "files": [ + "index.d.ts", + "mock-aws-s3-tests.ts" + ] +} \ No newline at end of file diff --git a/types/mock-fs/tsconfig.json b/types/mock-fs/tsconfig.json index b460b4d1d1..03b1ec9bf9 100644 --- a/types/mock-fs/tsconfig.json +++ b/types/mock-fs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mock-knex/mock-knex-tests.ts b/types/mock-knex/mock-knex-tests.ts index ec4ef0024e..f9fa69aea1 100644 --- a/types/mock-knex/mock-knex-tests.ts +++ b/types/mock-knex/mock-knex-tests.ts @@ -1,4 +1,4 @@ -import * as knex from "knex"; +import knex = require("knex"); import * as mockDb from "mock-knex"; const db = knex({ diff --git a/types/mock-knex/tsconfig.json b/types/mock-knex/tsconfig.json index 427ad9f843..c06624f84a 100644 --- a/types/mock-knex/tsconfig.json +++ b/types/mock-knex/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "mock-knex-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/mock-raf/tsconfig.json b/types/mock-raf/tsconfig.json index dfb1b63e78..2430cbd74e 100644 --- a/types/mock-raf/tsconfig.json +++ b/types/mock-raf/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mock-require/tsconfig.json b/types/mock-require/tsconfig.json index 1f6be404c6..3cd28faba0 100644 --- a/types/mock-require/tsconfig.json +++ b/types/mock-require/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mockdate/tsconfig.json b/types/mockdate/tsconfig.json index 062a1f1110..a5d4ba452b 100644 --- a/types/mockdate/tsconfig.json +++ b/types/mockdate/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mockery/tsconfig.json b/types/mockery/tsconfig.json index a8eef69452..0b91197c4d 100644 --- a/types/mockery/tsconfig.json +++ b/types/mockery/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mockjs/tsconfig.json b/types/mockjs/tsconfig.json index 631ad48210..6a407840b6 100644 --- a/types/mockjs/tsconfig.json +++ b/types/mockjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/modernizr/tsconfig.json b/types/modernizr/tsconfig.json index 291b4008d2..5a57efda40 100644 --- a/types/modernizr/tsconfig.json +++ b/types/modernizr/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/modesl/tsconfig.json b/types/modesl/tsconfig.json index 3fc91a7f71..9454dd9a5a 100644 --- a/types/modesl/tsconfig.json +++ b/types/modesl/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/moji/tsconfig.json b/types/moji/tsconfig.json index a6b2e51f26..f529d10796 100644 --- a/types/moji/tsconfig.json +++ b/types/moji/tsconfig.json @@ -1,24 +1,25 @@ { "compilerOptions": { - "module": "commonjs", - "target": "es6", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true + "module": "commonjs", + "target": "es6", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ - "index.d.ts", - "moji-tests.ts" + "index.d.ts", + "moji-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/moment-business-time/tsconfig.json b/types/moment-business-time/tsconfig.json index c1212caa2f..06211c3c46 100644 --- a/types/moment-business-time/tsconfig.json +++ b/types/moment-business-time/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "moment-business-time-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/moment-business/tsconfig.json b/types/moment-business/tsconfig.json index b7307b4121..2f206c8966 100644 --- a/types/moment-business/tsconfig.json +++ b/types/moment-business/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/moment-duration-format/tsconfig.json b/types/moment-duration-format/tsconfig.json index 997b0f907e..49adb2a08e 100644 --- a/types/moment-duration-format/tsconfig.json +++ b/types/moment-duration-format/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/moment-holiday/tsconfig.json b/types/moment-holiday/tsconfig.json index d03f37e12c..886bd77564 100644 --- a/types/moment-holiday/tsconfig.json +++ b/types/moment-holiday/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "moment-holiday-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/moment-jalaali/tsconfig.json b/types/moment-jalaali/tsconfig.json index 6c52d43cbf..4d2026fec3 100644 --- a/types/moment-jalaali/tsconfig.json +++ b/types/moment-jalaali/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/moment-range/tsconfig.json b/types/moment-range/tsconfig.json index 1da3b569e0..aa339a6027 100644 --- a/types/moment-range/tsconfig.json +++ b/types/moment-range/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/moment-round/tsconfig.json b/types/moment-round/tsconfig.json index f6761bd247..13758cbc39 100644 --- a/types/moment-round/tsconfig.json +++ b/types/moment-round/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/moment-strftime2/tsconfig.json b/types/moment-strftime2/tsconfig.json index cd5862e99f..c4c30990bd 100644 --- a/types/moment-strftime2/tsconfig.json +++ b/types/moment-strftime2/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "moment-strftime2-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/moment-timezone/index.d.ts b/types/moment-timezone/index.d.ts index c3927415c6..da5e42bc2d 100644 --- a/types/moment-timezone/index.d.ts +++ b/types/moment-timezone/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Michel Salib , Alan Brazil Lins // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -import * as moment from 'moment'; +import moment = require('moment'); // require("moment-timezone") === require("moment") export = moment; diff --git a/types/moment-timezone/tsconfig.json b/types/moment-timezone/tsconfig.json index 62cbfb4214..16a786e080 100644 --- a/types/moment-timezone/tsconfig.json +++ b/types/moment-timezone/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongodb/tsconfig.json b/types/mongodb/tsconfig.json index 8ed16ed7e6..b5c0a3c5de 100644 --- a/types/mongodb/tsconfig.json +++ b/types/mongodb/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongodb/v1/tsconfig.json b/types/mongodb/v1/tsconfig.json index c20dfaa9c6..e082a3d12e 100644 --- a/types/mongodb/v1/tsconfig.json +++ b/types/mongodb/v1/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongodb/v2/tsconfig.json b/types/mongodb/v2/tsconfig.json index 7bfc92fc32..34cee3be18 100644 --- a/types/mongodb/v2/tsconfig.json +++ b/types/mongodb/v2/tsconfig.json @@ -19,7 +19,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongoose-auto-increment/tsconfig.json b/types/mongoose-auto-increment/tsconfig.json index faef447b4d..451044e5e6 100644 --- a/types/mongoose-auto-increment/tsconfig.json +++ b/types/mongoose-auto-increment/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongoose-deep-populate/tsconfig.json b/types/mongoose-deep-populate/tsconfig.json index 40544f37a1..6f3c2c0a9a 100644 --- a/types/mongoose-deep-populate/tsconfig.json +++ b/types/mongoose-deep-populate/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongoose-geojson-schema/tsconfig.json b/types/mongoose-geojson-schema/tsconfig.json index 9d3afc8952..4a9b4ef787 100644 --- a/types/mongoose-geojson-schema/tsconfig.json +++ b/types/mongoose-geojson-schema/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "mongoose-geojson-schema-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/mongoose-mock/tsconfig.json b/types/mongoose-mock/tsconfig.json index b3cacf1757..8555533c01 100644 --- a/types/mongoose-mock/tsconfig.json +++ b/types/mongoose-mock/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongoose-paginate/mongoose-paginate-tests.ts b/types/mongoose-paginate/mongoose-paginate-tests.ts index d541c44da8..320077bc3a 100644 --- a/types/mongoose-paginate/mongoose-paginate-tests.ts +++ b/types/mongoose-paginate/mongoose-paginate-tests.ts @@ -1,5 +1,3 @@ -/// - /** * Created by Linus Brolin . */ @@ -12,7 +10,7 @@ import { PaginateResult, Document } from 'mongoose'; -import * as mongoosePaginate from 'mongoose-paginate'; +import mongoosePaginate = require('mongoose-paginate'); import { Router, Request, Response } from 'express'; diff --git a/types/mongoose-paginate/tsconfig.json b/types/mongoose-paginate/tsconfig.json index 3194368f11..c7d7fccdcc 100644 --- a/types/mongoose-paginate/tsconfig.json +++ b/types/mongoose-paginate/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongoose-promise/tsconfig.json b/types/mongoose-promise/tsconfig.json index 68c68b35a1..1116f1ca84 100644 --- a/types/mongoose-promise/tsconfig.json +++ b/types/mongoose-promise/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongoose-seeder/tsconfig.json b/types/mongoose-seeder/tsconfig.json index d5d44b75cc..7b4ef1eaa1 100644 --- a/types/mongoose-seeder/tsconfig.json +++ b/types/mongoose-seeder/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongoose-sequence/mongoose-sequence-tests.ts b/types/mongoose-sequence/mongoose-sequence-tests.ts index b4173e0002..85c46633e0 100644 --- a/types/mongoose-sequence/mongoose-sequence-tests.ts +++ b/types/mongoose-sequence/mongoose-sequence-tests.ts @@ -1,12 +1,10 @@ -/// - /** * Based on the examples on: https://github.com/ramiel/mongoose-sequence * Created by Linus Brolin . */ import { SequenceDocument, SequenceOptions, SequenceSchema, Document, Schema, Model, model } from 'mongoose'; -import * as mongooseSequence from 'mongoose-sequence'; +import mongooseSequence = require('mongoose-sequence'); //#region Test Models interface User extends SequenceDocument { diff --git a/types/mongoose-sequence/tsconfig.json b/types/mongoose-sequence/tsconfig.json index 79efa97e34..e9e23837ed 100644 --- a/types/mongoose-sequence/tsconfig.json +++ b/types/mongoose-sequence/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongoose-simple-random/mongoose-simple-random-tests.ts b/types/mongoose-simple-random/mongoose-simple-random-tests.ts index f5b26dbebb..1ed3051652 100644 --- a/types/mongoose-simple-random/mongoose-simple-random-tests.ts +++ b/types/mongoose-simple-random/mongoose-simple-random-tests.ts @@ -1,5 +1,5 @@ import * as mongoose from 'mongoose'; -import * as mongoose_simple_random from "mongoose-simple-random"; +import mongoose_simple_random = require("mongoose-simple-random"); // test compatibility with other libraries - from @types/mongoose import * as _ from 'lodash'; diff --git a/types/mongoose-simple-random/tsconfig.json b/types/mongoose-simple-random/tsconfig.json index 3b879fd8f0..7c2f108e9e 100644 --- a/types/mongoose-simple-random/tsconfig.json +++ b/types/mongoose-simple-random/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongoose-unique-validator/mongoose-unique-validator-tests.ts b/types/mongoose-unique-validator/mongoose-unique-validator-tests.ts index 59ada92a3c..ded6f76ae4 100644 --- a/types/mongoose-unique-validator/mongoose-unique-validator-tests.ts +++ b/types/mongoose-unique-validator/mongoose-unique-validator-tests.ts @@ -1,5 +1,5 @@ import { Schema } from "mongoose"; -import * as uniqueValidator from "mongoose-unique-validator"; +import uniqueValidator = require("mongoose-unique-validator"); const schema = new Schema({ test: { type: String } diff --git a/types/mongoose-unique-validator/tsconfig.json b/types/mongoose-unique-validator/tsconfig.json index 02d461889d..8ab3ec79c9 100644 --- a/types/mongoose-unique-validator/tsconfig.json +++ b/types/mongoose-unique-validator/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index 7ac3ee7e41..3cf4e4ca2a 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -694,7 +694,7 @@ declare module "mongoose" { } interface SchemaOptions { - /** defaults to null (which means use the connection's autoIndex option) */ + /** defaults to false (which means use the connection's autoIndex option) */ autoIndex?: boolean; /** defaults to true */ bufferCommands?: boolean; diff --git a/types/mongoose/tsconfig.json b/types/mongoose/tsconfig.json index 55e06ad201..04f1bc2b3b 100644 --- a/types/mongoose/tsconfig.json +++ b/types/mongoose/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongoose/v3/tsconfig.json b/types/mongoose/v3/tsconfig.json index 2ea987dff7..505d24e636 100644 --- a/types/mongoose/v3/tsconfig.json +++ b/types/mongoose/v3/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mongoose/v4/tsconfig.json b/types/mongoose/v4/tsconfig.json index ad36fd5ca3..f2e0b541c8 100644 --- a/types/mongoose/v4/tsconfig.json +++ b/types/mongoose/v4/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/moo/tsconfig.json b/types/moo/tsconfig.json index e2659ef342..2203d94341 100644 --- a/types/moo/tsconfig.json +++ b/types/moo/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/moonjs/tsconfig.json b/types/moonjs/tsconfig.json index b66e636445..f26c03118b 100644 --- a/types/moonjs/tsconfig.json +++ b/types/moonjs/tsconfig.json @@ -20,6 +20,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/morgan/tsconfig.json b/types/morgan/tsconfig.json index 87ca0a6d5d..40d97bcb99 100644 --- a/types/morgan/tsconfig.json +++ b/types/morgan/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/morris.js/tsconfig.json b/types/morris.js/tsconfig.json index 10aa9f3c2d..4be75cfd20 100644 --- a/types/morris.js/tsconfig.json +++ b/types/morris.js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mousetrap/tsconfig.json b/types/mousetrap/tsconfig.json index ade8c0d47d..7cf51a0ec3 100644 --- a/types/mousetrap/tsconfig.json +++ b/types/mousetrap/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/move-concurrently/tsconfig.json b/types/move-concurrently/tsconfig.json index a0e00356c8..d9ccd40b52 100644 --- a/types/move-concurrently/tsconfig.json +++ b/types/move-concurrently/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/moviedb/tsconfig.json b/types/moviedb/tsconfig.json index 5b182007ca..9cd2ba13e8 100644 --- a/types/moviedb/tsconfig.json +++ b/types/moviedb/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/moxios/tsconfig.json b/types/moxios/tsconfig.json index a0224c335f..000e8feeb0 100644 --- a/types/moxios/tsconfig.json +++ b/types/moxios/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mozilla-readability/mozilla-readability-tests.ts b/types/mozilla-readability/mozilla-readability-tests.ts index bcb17f4bf5..e5431dd14e 100644 --- a/types/mozilla-readability/mozilla-readability-tests.ts +++ b/types/mozilla-readability/mozilla-readability-tests.ts @@ -1,4 +1,4 @@ -import * as Readability from 'mozilla-readability'; +import Readability = require('mozilla-readability'); import { JSDOM } from 'jsdom'; // Compiling requires `--noImplicitUseStrict` diff --git a/types/mozilla-readability/tsconfig.json b/types/mozilla-readability/tsconfig.json index 007aac8b63..07af9472c3 100644 --- a/types/mozilla-readability/tsconfig.json +++ b/types/mozilla-readability/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "mozilla-readability-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/mpromise/tsconfig.json b/types/mpromise/tsconfig.json index 6f5f9d6abc..e76a3809d8 100644 --- a/types/mpromise/tsconfig.json +++ b/types/mpromise/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mri/tsconfig.json b/types/mri/tsconfig.json index 9218819c6b..60f8ce3044 100644 --- a/types/mri/tsconfig.json +++ b/types/mri/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ms/tsconfig.json b/types/ms/tsconfig.json index aaaa9f14e8..080a128095 100644 --- a/types/ms/tsconfig.json +++ b/types/ms/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/msgpack-lite/tsconfig.json b/types/msgpack-lite/tsconfig.json index 014ff12483..73b2be7f36 100644 --- a/types/msgpack-lite/tsconfig.json +++ b/types/msgpack-lite/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/msgpack/tsconfig.json b/types/msgpack/tsconfig.json index b004630b6c..be68498cc9 100644 --- a/types/msgpack/tsconfig.json +++ b/types/msgpack/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/msgpack5/msgpack5-tests.ts b/types/msgpack5/msgpack5-tests.ts index 6cd9854992..d8a2829302 100644 --- a/types/msgpack5/msgpack5-tests.ts +++ b/types/msgpack5/msgpack5-tests.ts @@ -1,9 +1,9 @@ -import * as msgpack from 'msgpack5'; +import msgpack = require('msgpack5'); // msgpack() let packer = msgpack(); packer = msgpack({ forceFloat64: true }); -packer = msgpack({ compatibilityMode: true }); +packer = msgpack({ compatibilityMode: true }); class InputType { number: number; diff --git a/types/msgpack5/tsconfig.json b/types/msgpack5/tsconfig.json index f58f4a8a94..73f103564f 100644 --- a/types/msgpack5/tsconfig.json +++ b/types/msgpack5/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/msnodesql/tsconfig.json b/types/msnodesql/tsconfig.json index 8eb58e9531..5768b83caa 100644 --- a/types/msnodesql/tsconfig.json +++ b/types/msnodesql/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/msportalfx-test/tsconfig.json b/types/msportalfx-test/tsconfig.json index 4df355d685..043b903835 100644 --- a/types/msportalfx-test/tsconfig.json +++ b/types/msportalfx-test/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mssql/index.d.ts b/types/mssql/index.d.ts index a551d15ba8..272abb5e39 100644 --- a/types/mssql/index.d.ts +++ b/types/mssql/index.d.ts @@ -251,6 +251,7 @@ export declare class Request extends events.EventEmitter { public parameters: IRequestParameters; public verbose: boolean; public canceled: boolean; + public multiple: boolean; public stream: any; public constructor(connection?: ConnectionPool); public constructor(transaction: Transaction); diff --git a/types/mssql/tsconfig.json b/types/mssql/tsconfig.json index 51f03fd652..ee8e17a585 100644 --- a/types/mssql/tsconfig.json +++ b/types/mssql/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mu2/tsconfig.json b/types/mu2/tsconfig.json index 3e01589707..929e73f45b 100644 --- a/types/mu2/tsconfig.json +++ b/types/mu2/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/multer-gridfs-storage/multer-gridfs-storage-tests.ts b/types/multer-gridfs-storage/multer-gridfs-storage-tests.ts index 61114fa349..d34eaeeae6 100644 --- a/types/multer-gridfs-storage/multer-gridfs-storage-tests.ts +++ b/types/multer-gridfs-storage/multer-gridfs-storage-tests.ts @@ -1,4 +1,4 @@ -import * as MulterGridfsStorage from 'multer-gridfs-storage'; +import MulterGridfsStorage = require('multer-gridfs-storage'); import { Db, MongoClient, Server } from "mongodb"; // Exported interfaces diff --git a/types/multer-gridfs-storage/tsconfig.json b/types/multer-gridfs-storage/tsconfig.json index 1daa734d97..3644f79add 100644 --- a/types/multer-gridfs-storage/tsconfig.json +++ b/types/multer-gridfs-storage/tsconfig.json @@ -19,7 +19,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/multer-gridfs-storage/v1/multer-gridfs-storage-tests.ts b/types/multer-gridfs-storage/v1/multer-gridfs-storage-tests.ts index 73522eebca..3578089b92 100644 --- a/types/multer-gridfs-storage/v1/multer-gridfs-storage-tests.ts +++ b/types/multer-gridfs-storage/v1/multer-gridfs-storage-tests.ts @@ -1,4 +1,4 @@ -import * as MulterGridfsStorage from 'multer-gridfs-storage'; +import MulterGridfsStorage = require('multer-gridfs-storage'); import { Grid } from "gridfs-stream"; // Exported interfaces diff --git a/types/multer-gridfs-storage/v1/tsconfig.json b/types/multer-gridfs-storage/v1/tsconfig.json index 8fb06dfd29..00e1091a16 100644 --- a/types/multer-gridfs-storage/v1/tsconfig.json +++ b/types/multer-gridfs-storage/v1/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/multer-s3/tsconfig.json b/types/multer-s3/tsconfig.json index 812fd71b21..807cd374a5 100644 --- a/types/multer-s3/tsconfig.json +++ b/types/multer-s3/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/multer/multer-tests.ts b/types/multer/multer-tests.ts index 029f5fa0f4..6346b5f7dc 100644 --- a/types/multer/multer-tests.ts +++ b/types/multer/multer-tests.ts @@ -1,5 +1,5 @@ -import * as express from 'express'; -import * as multer from 'multer'; +import express = require('express'); +import multer = require('multer'); const upload = multer({ dest: 'uploads/', diff --git a/types/multer/tsconfig.json b/types/multer/tsconfig.json index 33a047e9dd..b62fe04125 100644 --- a/types/multer/tsconfig.json +++ b/types/multer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/multi-typeof/tsconfig.json b/types/multi-typeof/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/multi-typeof/tsconfig.json +++ b/types/multi-typeof/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/multimatch/tsconfig.json b/types/multimatch/tsconfig.json index c7ee9e6f63..98647c67da 100644 --- a/types/multimatch/tsconfig.json +++ b/types/multimatch/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/multiparty/tsconfig.json b/types/multiparty/tsconfig.json index 0adadcf9a3..2f73f00ca7 100644 --- a/types/multiparty/tsconfig.json +++ b/types/multiparty/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/multiplexjs/tsconfig.json b/types/multiplexjs/tsconfig.json index bad1ec3652..94e2a89169 100644 --- a/types/multiplexjs/tsconfig.json +++ b/types/multiplexjs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/multisort/tsconfig.json b/types/multisort/tsconfig.json index d2d76512ef..2602e31746 100644 --- a/types/multisort/tsconfig.json +++ b/types/multisort/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "multisort-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/multistream/tsconfig.json b/types/multistream/tsconfig.json index 3fa5cc7c47..cb9258d5c6 100644 --- a/types/multistream/tsconfig.json +++ b/types/multistream/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "multistream-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/murmurhash-js/tsconfig.json b/types/murmurhash-js/tsconfig.json index bcebcbf18e..290fd09fe3 100644 --- a/types/murmurhash-js/tsconfig.json +++ b/types/murmurhash-js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/murmurhash3js/tsconfig.json b/types/murmurhash3js/tsconfig.json index 3f3a3a6fe3..109bec1b1b 100644 --- a/types/murmurhash3js/tsconfig.json +++ b/types/murmurhash3js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/musicmetadata/musicmetadata-tests.ts b/types/musicmetadata/musicmetadata-tests.ts index 421aec3bc5..c2e70116fb 100644 --- a/types/musicmetadata/musicmetadata-tests.ts +++ b/types/musicmetadata/musicmetadata-tests.ts @@ -1,5 +1,5 @@ import * as fs from "fs"; -import * as mm from "musicmetadata"; +import mm = require("musicmetadata"); mm(fs.createReadStream("hype-train.mp3"), (err: Error, metadata: MM.Metadata) => { if (err) throw err; diff --git a/types/musicmetadata/tsconfig.json b/types/musicmetadata/tsconfig.json index da6158b218..55d870abf7 100644 --- a/types/musicmetadata/tsconfig.json +++ b/types/musicmetadata/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mustache/tsconfig.json b/types/mustache/tsconfig.json index dd50c6f999..c1bde7af8b 100644 --- a/types/mustache/tsconfig.json +++ b/types/mustache/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/mv/tsconfig.json b/types/mv/tsconfig.json index fc51bf757d..2ce04b2cfa 100644 --- a/types/mv/tsconfig.json +++ b/types/mv/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/mysql/tsconfig.json b/types/mysql/tsconfig.json index 1249bcd757..d2a4788d7c 100644 --- a/types/mysql/tsconfig.json +++ b/types/mysql/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "mysql-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/mz/tsconfig.json b/types/mz/tsconfig.json index f6a2ef5871..bdfa029d8b 100644 --- a/types/mz/tsconfig.json +++ b/types/mz/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "fs.d.ts", diff --git a/types/n3/tsconfig.json b/types/n3/tsconfig.json index 4ba121903d..c7ec1df12b 100644 --- a/types/n3/tsconfig.json +++ b/types/n3/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nano/nano-tests.ts b/types/nano/nano-tests.ts index 4f13e90f43..0556f2b8fe 100644 --- a/types/nano/nano-tests.ts +++ b/types/nano/nano-tests.ts @@ -1,5 +1,5 @@ import * as fs from "fs"; -import * as nano from "nano"; +import nano = require("nano"); /* * Instantiate with configuration object diff --git a/types/nano/tsconfig.json b/types/nano/tsconfig.json index 7586d0b0bf..f0d7a6a4a2 100644 --- a/types/nano/tsconfig.json +++ b/types/nano/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nanoajax/tsconfig.json b/types/nanoajax/tsconfig.json index 0da0980613..ee0559e4ba 100644 --- a/types/nanoajax/tsconfig.json +++ b/types/nanoajax/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nanoid/tsconfig.json b/types/nanoid/tsconfig.json index 0df191829d..6a7acb9122 100644 --- a/types/nanoid/tsconfig.json +++ b/types/nanoid/tsconfig.json @@ -14,6 +14,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ @@ -25,4 +26,4 @@ "random.d.ts", "url.d.ts" ] -} +} \ No newline at end of file diff --git a/types/nanomsg/tsconfig.json b/types/nanomsg/tsconfig.json index e42b4841af..6f1a4347f9 100644 --- a/types/nanomsg/tsconfig.json +++ b/types/nanomsg/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nanoscroller/tsconfig.json b/types/nanoscroller/tsconfig.json index 7aeed7ab3d..51d0db097f 100644 --- a/types/nanoscroller/tsconfig.json +++ b/types/nanoscroller/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nanp/tsconfig.json b/types/nanp/tsconfig.json index d873227232..0aae22261b 100644 --- a/types/nanp/tsconfig.json +++ b/types/nanp/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nats-hemera/tsconfig.json b/types/nats-hemera/tsconfig.json index 69c6083e56..4238f55a02 100644 --- a/types/nats-hemera/tsconfig.json +++ b/types/nats-hemera/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/natsort/tsconfig.json b/types/natsort/tsconfig.json index a23b1f358e..34d62a95ff 100644 --- a/types/natsort/tsconfig.json +++ b/types/natsort/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/natural-sort/tsconfig.json b/types/natural-sort/tsconfig.json index b592fcdb65..2a06885468 100644 --- a/types/natural-sort/tsconfig.json +++ b/types/natural-sort/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/natural/tsconfig.json b/types/natural/tsconfig.json index c04f83d753..a996ed84dc 100644 --- a/types/natural/tsconfig.json +++ b/types/natural/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/navigation-react/tsconfig.json b/types/navigation-react/tsconfig.json index 75ad101514..ec2d3dabb9 100644 --- a/types/navigation-react/tsconfig.json +++ b/types/navigation-react/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/navigation/tsconfig.json b/types/navigation/tsconfig.json index 8b8e594ec2..fc77d66124 100644 --- a/types/navigation/tsconfig.json +++ b/types/navigation/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/navigo/tsconfig.json b/types/navigo/tsconfig.json index c43965d118..670c3e99fb 100644 --- a/types/navigo/tsconfig.json +++ b/types/navigo/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nblas/tsconfig.json b/types/nblas/tsconfig.json index 9da3a941dd..6d5a0a0b0b 100644 --- a/types/nblas/tsconfig.json +++ b/types/nblas/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nconf/tsconfig.json b/types/nconf/tsconfig.json index 134b7a4fb9..2d213b4bc2 100644 --- a/types/nconf/tsconfig.json +++ b/types/nconf/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ncp/tsconfig.json b/types/ncp/tsconfig.json index ad2247a6c9..cd3215ff35 100644 --- a/types/ncp/tsconfig.json +++ b/types/ncp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ndarray/tsconfig.json b/types/ndarray/tsconfig.json index 9f2c134f3d..cfaf8d710e 100644 --- a/types/ndarray/tsconfig.json +++ b/types/ndarray/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nearley/tsconfig.json b/types/nearley/tsconfig.json index bce8ee061a..d2ad939fb7 100644 --- a/types/nearley/tsconfig.json +++ b/types/nearley/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nedb-logger/tsconfig.json b/types/nedb-logger/tsconfig.json index 857cf7bb11..33e65ee249 100644 --- a/types/nedb-logger/tsconfig.json +++ b/types/nedb-logger/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nedb/tsconfig.json b/types/nedb/tsconfig.json index 220dc976e1..71be3fc3dc 100644 --- a/types/nedb/tsconfig.json +++ b/types/nedb/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/needle/needle-tests.ts b/types/needle/needle-tests.ts index e8f2efee20..a216b1f686 100644 --- a/types/needle/needle-tests.ts +++ b/types/needle/needle-tests.ts @@ -1,4 +1,4 @@ -import * as needle from "needle"; +import needle = require("needle"); import * as fs from "fs"; function Usage() { diff --git a/types/needle/tsconfig.json b/types/needle/tsconfig.json index b0f67719ed..13fb81e8b3 100644 --- a/types/needle/tsconfig.json +++ b/types/needle/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/needle/v0/tsconfig.json b/types/needle/v0/tsconfig.json index 3ea9ca7f93..0cc54647f9 100644 --- a/types/needle/v0/tsconfig.json +++ b/types/needle/v0/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/needle/v1/tsconfig.json b/types/needle/v1/tsconfig.json index 7918dc3952..9e199dda15 100644 --- a/types/needle/v1/tsconfig.json +++ b/types/needle/v1/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/negotiator/tsconfig.json b/types/negotiator/tsconfig.json index 89c06ad77a..83e42b29aa 100644 --- a/types/negotiator/tsconfig.json +++ b/types/negotiator/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/neo4j/tsconfig.json b/types/neo4j/tsconfig.json index fa1c26ea60..24d94b0134 100644 --- a/types/neo4j/tsconfig.json +++ b/types/neo4j/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nes/tsconfig.json b/types/nes/tsconfig.json index 374b67b515..f9e07170b3 100644 --- a/types/nes/tsconfig.json +++ b/types/nes/tsconfig.json @@ -14,10 +14,13 @@ ], "types": [], "paths": { - "boom": ["boom/v4"] + "boom": [ + "boom/v4" + ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -36,4 +39,4 @@ "test/subscriptions-client.ts", "test/subscriptions-server.ts" ] -} +} \ No newline at end of file diff --git a/types/net-keepalive/tsconfig.json b/types/net-keepalive/tsconfig.json index 38736fd181..937edbecfb 100644 --- a/types/net-keepalive/tsconfig.json +++ b/types/net-keepalive/tsconfig.json @@ -1,21 +1,24 @@ { - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es5" - ], - "baseUrl": "../", - "typeRoots": ["../"], - "types": [], - "forceConsistentCasingInFileNames": true, - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "noEmit": true - }, - "files": [ - "index.d.ts", - "net-keepalive-tests.ts" - ] + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es5" + ], + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "noEmit": true + }, + "files": [ + "index.d.ts", + "net-keepalive-tests.ts" + ] } \ No newline at end of file diff --git a/types/netmask/tsconfig.json b/types/netmask/tsconfig.json index 8666e91a29..db74d19edf 100644 --- a/types/netmask/tsconfig.json +++ b/types/netmask/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/new-relic-browser/index.d.ts b/types/new-relic-browser/index.d.ts index 59b2f9a8e6..0064ee4ad2 100644 --- a/types/new-relic-browser/index.d.ts +++ b/types/new-relic-browser/index.d.ts @@ -133,7 +133,6 @@ declare namespace NewRelic { * @param name This will be used as the name of the tracer. If you do not include a name, * New Relic Browser does not add a node to the interaction tree. The callback time will be * attributed to the parent node. - * @param syncCallback * @returns This method ends the async time. It calls (and times) the callback that was passed into createTracer(). * @see https://docs.newrelic.com/docs/browser/new-relic-browser/browser-agent-spa-api/spa-create-tracer */ @@ -170,7 +169,6 @@ declare namespace NewRelic { * has finished. You can invoke methods to modify the interaction, but methods that have asynchronous * side effects will not have an effect. * - * @param callback * @returns This method returns the same API object created by interaction(). * @see https://docs.newrelic.com/docs/browser/new-relic-browser/browser-agent-spa-api/spa-on-end */ diff --git a/types/new-relic-browser/tsconfig.json b/types/new-relic-browser/tsconfig.json index 61ee6742c7..ab3b384d26 100644 --- a/types/new-relic-browser/tsconfig.json +++ b/types/new-relic-browser/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "new-relic-browser-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/nexpect/tsconfig.json b/types/nexpect/tsconfig.json index d73f78e043..712c1fb7b4 100644 --- a/types/nexpect/tsconfig.json +++ b/types/nexpect/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/next-redux-wrapper/tsconfig.json b/types/next-redux-wrapper/tsconfig.json index 7cfafdcb96..3108e45df1 100644 --- a/types/next-redux-wrapper/tsconfig.json +++ b/types/next-redux-wrapper/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/next/tsconfig.json b/types/next/tsconfig.json index 05e0b4e7ad..850e09cb80 100644 --- a/types/next/tsconfig.json +++ b/types/next/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ng-command/tsconfig.json b/types/ng-command/tsconfig.json index f64e284ecb..be46dfcb9b 100644 --- a/types/ng-command/tsconfig.json +++ b/types/ng-command/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ng-cordova/tsconfig.json b/types/ng-cordova/tsconfig.json index d0885bd15f..0572c04f8b 100644 --- a/types/ng-cordova/tsconfig.json +++ b/types/ng-cordova/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ng-dialog/tsconfig.json b/types/ng-dialog/tsconfig.json index 91539585a7..187992997a 100644 --- a/types/ng-dialog/tsconfig.json +++ b/types/ng-dialog/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ng-facebook/tsconfig.json b/types/ng-facebook/tsconfig.json index dc239cbe5a..701a75e7e9 100644 --- a/types/ng-facebook/tsconfig.json +++ b/types/ng-facebook/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ng-file-upload/tsconfig.json b/types/ng-file-upload/tsconfig.json index b08385c840..4cc1ff73fa 100644 --- a/types/ng-file-upload/tsconfig.json +++ b/types/ng-file-upload/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ng-flow/tsconfig.json b/types/ng-flow/tsconfig.json index 47d56906c5..f10dd6c6a1 100644 --- a/types/ng-flow/tsconfig.json +++ b/types/ng-flow/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ng-grid/tsconfig.json b/types/ng-grid/tsconfig.json index 5fcf2d1373..84bb17f123 100644 --- a/types/ng-grid/tsconfig.json +++ b/types/ng-grid/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ng-i18next/tsconfig.json b/types/ng-i18next/tsconfig.json index bf666912a5..038677906d 100644 --- a/types/ng-i18next/tsconfig.json +++ b/types/ng-i18next/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ng-notify/tsconfig.json b/types/ng-notify/tsconfig.json index c8cf3b029a..28342f01d7 100644 --- a/types/ng-notify/tsconfig.json +++ b/types/ng-notify/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ng-stomp/tsconfig.json b/types/ng-stomp/tsconfig.json index 151a99eb53..2f1e898136 100644 --- a/types/ng-stomp/tsconfig.json +++ b/types/ng-stomp/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ngbootbox/tsconfig.json b/types/ngbootbox/tsconfig.json index a5e7d7d878..e4abac771c 100644 --- a/types/ngbootbox/tsconfig.json +++ b/types/ngbootbox/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ngeohash/tsconfig.json b/types/ngeohash/tsconfig.json index 7f248102e6..81b220b62e 100644 --- a/types/ngeohash/tsconfig.json +++ b/types/ngeohash/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ngkookies/tsconfig.json b/types/ngkookies/tsconfig.json index 79178992a5..889586869b 100644 --- a/types/ngkookies/tsconfig.json +++ b/types/ngkookies/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ngmap/tsconfig.json b/types/ngmap/tsconfig.json index 0427e8a338..1fe1544f80 100644 --- a/types/ngmap/tsconfig.json +++ b/types/ngmap/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ngprogress-lite/tsconfig.json b/types/ngprogress-lite/tsconfig.json index 5e8b28fdb2..9e54886818 100644 --- a/types/ngprogress-lite/tsconfig.json +++ b/types/ngprogress-lite/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ngprogress/tsconfig.json b/types/ngprogress/tsconfig.json index 237f5f5962..2a4888f759 100644 --- a/types/ngprogress/tsconfig.json +++ b/types/ngprogress/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ngreact/tsconfig.json b/types/ngreact/tsconfig.json index 39325499dd..e8f4365a16 100644 --- a/types/ngreact/tsconfig.json +++ b/types/ngreact/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/ngstorage/tsconfig.json b/types/ngstorage/tsconfig.json index 5bdb5efc09..dad284112c 100644 --- a/types/ngstorage/tsconfig.json +++ b/types/ngstorage/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ngtoaster/tsconfig.json b/types/ngtoaster/tsconfig.json index 5bc6882baf..b1b426ad7b 100644 --- a/types/ngtoaster/tsconfig.json +++ b/types/ngtoaster/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ngwysiwyg/tsconfig.json b/types/ngwysiwyg/tsconfig.json index 4292c2cff6..b780ce798a 100644 --- a/types/ngwysiwyg/tsconfig.json +++ b/types/ngwysiwyg/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nightmare/tsconfig.json b/types/nightmare/tsconfig.json index 4bce8306fd..a2e7b85879 100644 --- a/types/nightmare/tsconfig.json +++ b/types/nightmare/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nightwatch/tsconfig.json b/types/nightwatch/tsconfig.json index 4b080c6048..e08524ac5c 100644 --- a/types/nightwatch/tsconfig.json +++ b/types/nightwatch/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/noble/tsconfig.json b/types/noble/tsconfig.json index 3539eef12c..6ecc97642a 100644 --- a/types/noble/tsconfig.json +++ b/types/noble/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nock/nock-tests.ts b/types/nock/nock-tests.ts index e81e3fd096..44397db941 100644 --- a/types/nock/nock-tests.ts +++ b/types/nock/nock-tests.ts @@ -1,6 +1,4 @@ - - -import * as nock from 'nock'; +import nock = require('nock'); import * as fs from 'fs'; var scope: nock.Scope; diff --git a/types/nock/tsconfig.json b/types/nock/tsconfig.json index 30c4ce3aa7..fbd88d8e06 100644 --- a/types/nock/tsconfig.json +++ b/types/nock/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nodal/tsconfig.json b/types/nodal/tsconfig.json index 29407ab0a0..e386a34bd5 100644 --- a/types/nodal/tsconfig.json +++ b/types/nodal/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-7z/tsconfig.json b/types/node-7z/tsconfig.json index 87c09a2635..31275e1a7b 100644 --- a/types/node-7z/tsconfig.json +++ b/types/node-7z/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-array-ext/tsconfig.json b/types/node-array-ext/tsconfig.json index b7713bacb2..54ad436976 100644 --- a/types/node-array-ext/tsconfig.json +++ b/types/node-array-ext/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-cache/tsconfig.json b/types/node-cache/tsconfig.json index e024dba82d..0d05a8b958 100644 --- a/types/node-cache/tsconfig.json +++ b/types/node-cache/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-calendar/tsconfig.json b/types/node-calendar/tsconfig.json index f70d2de8ee..ddb256ca4b 100644 --- a/types/node-calendar/tsconfig.json +++ b/types/node-calendar/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-cleanup/tsconfig.json b/types/node-cleanup/tsconfig.json index 0b50b3555b..eab90ee9cc 100644 --- a/types/node-cleanup/tsconfig.json +++ b/types/node-cleanup/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-common-errors/tsconfig.json b/types/node-common-errors/tsconfig.json index a862893b87..361e724698 100644 --- a/types/node-common-errors/tsconfig.json +++ b/types/node-common-errors/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-config-manager/tsconfig.json b/types/node-config-manager/tsconfig.json index c308808722..91a3ae8510 100644 --- a/types/node-config-manager/tsconfig.json +++ b/types/node-config-manager/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-cron/tsconfig.json b/types/node-cron/tsconfig.json index e1ec63395b..5269f6d3a1 100644 --- a/types/node-cron/tsconfig.json +++ b/types/node-cron/tsconfig.json @@ -16,10 +16,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "node-cron-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/node-dir/tsconfig.json b/types/node-dir/tsconfig.json index b8e68860af..cdbe51bb62 100644 --- a/types/node-dir/tsconfig.json +++ b/types/node-dir/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-dogstatsd/tsconfig.json b/types/node-dogstatsd/tsconfig.json index 98d50c65f8..b6f2407301 100644 --- a/types/node-dogstatsd/tsconfig.json +++ b/types/node-dogstatsd/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-emoji/tsconfig.json b/types/node-emoji/tsconfig.json index 448cf4351c..09552ed78b 100644 --- a/types/node-emoji/tsconfig.json +++ b/types/node-emoji/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-fetch/tsconfig.json b/types/node-fetch/tsconfig.json index 98a8d56ff1..b68e127c1f 100644 --- a/types/node-fetch/tsconfig.json +++ b/types/node-fetch/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-fibers/tsconfig.json b/types/node-fibers/tsconfig.json index a646c67d7f..1f8e0571ac 100644 --- a/types/node-fibers/tsconfig.json +++ b/types/node-fibers/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-forge/index.d.ts b/types/node-forge/index.d.ts index a5d3f078fe..2784d95fa3 100644 --- a/types/node-forge/index.d.ts +++ b/types/node-forge/index.d.ts @@ -14,7 +14,7 @@ declare module "node-forge" { type Utf8 = string; type OID = string; - namespace pem { + namespace pem { interface EncodeOptions { maxline?: number; @@ -32,7 +32,7 @@ declare module "node-forge" { function encode(msg: ObjectPEM, options?: EncodeOptions): string; function decode(str: string): ObjectPEM[]; } - + namespace pki { type PEM = string; @@ -79,10 +79,11 @@ declare module "node-forge" { interface CertificateField extends CertificateFieldOptions { valueConstructed?: boolean; valueTagClass?: asn1.Class; - value?: any[]; + value?: any[] | string; extensions?: any[]; } + interface Certificate { version: number; serialNumber: string; @@ -107,11 +108,61 @@ declare module "node-forge" { extensions: any[]; publicKey: any; md: any; + /** + * Sets the subject of this certificate. + * + * @param attrs the array of subject attributes to use. + * @param uniqueId an optional a unique ID to use. + */ + setSubject(attrs: CertificateField[], uniqueId?: string): void; + /** + * Sets the subject of this certificate. + * + * @param attrs the array of subject attributes to use. + * @param uniqueId an optional a unique ID to use. + */ + setIssuer(attrs: CertificateField[], uniqueId?: string): void; + /** + * Sets the extensions of this certificate. + * + * @param exts the array of extensions to use. + */ + setExtensions(exts: any[]): void; + /** + * Gets an extension by its name or id. + * + * @param options the name to use or an object with: + * name the name to use. + * id the id to use. + * + * @return the extension or null if not found. + */ + getExtension(options: string | {name: string;} | {id: number;}): {} | undefined; + + /** + * Signs this certificate using the given private key. + * + * @param key the private key to sign with. + * @param md the message digest object to use (defaults to forge.md.sha1). + */ + sign(key: pki.Key, md: md.MessageDigest): void; + /** + * Attempts verify the signature on the passed certificate using this + * certificate's public key. + * + * @param child the certificate to verify. + * + * @return true if verified, false if not. + */ + verify(child: Certificate): boolean; + } function certificateFromAsn1(obj: asn1.Asn1, computeHash?: boolean): Certificate; function decryptRsaPrivateKey(pem: PEM, passphrase?: string): Key; + + function createCertificate(): Certificate; } namespace ssh { diff --git a/types/node-forge/node-forge-tests.ts b/types/node-forge/node-forge-tests.ts index 63ccca6c70..29b8267714 100644 --- a/types/node-forge/node-forge-tests.ts +++ b/types/node-forge/node-forge-tests.ts @@ -1,4 +1,4 @@ -import * as forge from "node-forge"; +import * as forge from 'node-forge'; let keypair = forge.pki.rsa.generateKeyPair({ bits: 512 }); let privateKeyPem = forge.pki.privateKeyToPem(keypair.privateKey); @@ -8,19 +8,23 @@ let x: string = forge.ssh.privateKeyToOpenSSH(key); let pemKey: forge.pki.PEM = publicKeyPem; let publicKeyRsa = forge.pki.publicKeyFromPem(pemKey); let privateKeyRsa = forge.pki.privateKeyFromPem(privateKeyPem); +let cert = forge.pki.createCertificate(); { let subjectPublicKeyInfo = forge.asn1.create(forge.asn1.Class.UNIVERSAL, forge.asn1.Type.SEQUENCE, true, [ forge.asn1.create(forge.asn1.Class.UNIVERSAL, forge.asn1.Type.SEQUENCE, true, [ - forge.asn1.create(forge.asn1.Class.UNIVERSAL, forge.asn1.Type.OID, false, - forge.asn1.oidToDer(forge.pki.oids['rsaEncryption']).getBytes(), + forge.asn1.create( + forge.asn1.Class.UNIVERSAL, + forge.asn1.Type.OID, + false, + forge.asn1.oidToDer(forge.pki.oids['rsaEncryption']).getBytes() ), - forge.asn1.create(forge.asn1.Class.UNIVERSAL, forge.asn1.Type.NULL, false, ''), + forge.asn1.create(forge.asn1.Class.UNIVERSAL, forge.asn1.Type.NULL, false, '') ]), forge.asn1.create(forge.asn1.Class.UNIVERSAL, forge.asn1.Type.BITSTRING, false, [ forge.asn1.create(forge.asn1.Class.UNIVERSAL, forge.asn1.Type.SEQUENCE, true, [ forge.asn1.create(forge.asn1.Class.UNIVERSAL, forge.asn1.Type.INTEGER, false, []), - forge.asn1.create(forge.asn1.Class.UNIVERSAL, forge.asn1.Type.INTEGER, false, []), + forge.asn1.create(forge.asn1.Class.UNIVERSAL, forge.asn1.Type.INTEGER, false, []) ]) ]) ]); @@ -52,12 +56,14 @@ if (forge.util.fillString('1', 5) !== '11111') throw Error('forge.util.fillStrin src = new Uint8Array(2); encode = forge.util.binary.hex.encode(src); decode = forge.util.binary.hex.decode(encode); - if (encode !== '0000' || src.byteLength !== decode.byteLength) throw Error('forge.util.binary.hex.encode / decode fail'); + if (encode !== '0000' || src.byteLength !== decode.byteLength) + throw Error('forge.util.binary.hex.encode / decode fail'); src = new Uint8Array(2); encode = forge.util.binary.base64.encode(src); decode = forge.util.binary.base64.decode(encode); - if (encode !== 'AAA=' || src.byteLength !== decode.byteLength) throw Error('forge.util.binary.base64.encode / decode fail'); + if (encode !== 'AAA=' || src.byteLength !== decode.byteLength) + throw Error('forge.util.binary.base64.encode / decode fail'); src = new Uint8Array(10); encode = forge.util.binary.raw.encode(src); @@ -97,7 +103,6 @@ if (forge.util.fillString('1', 5) !== '11111') throw Error('forge.util.fillStrin if (hex.length !== 40) throw Error('forge.md.MessageDigest.update / digest fail'); } - { let md: forge.md.MessageDigest; let hex: string; @@ -110,26 +115,74 @@ if (forge.util.fillString('1', 5) !== '11111') throw Error('forge.util.fillStrin } { - let payload = { "asd": "asd" } - let cipher = forge.cipher.createCipher( - "3DES-ECB", - forge.util.createBuffer(key, "raw") - ); + let payload = { asd: 'asd' }; + let cipher = forge.cipher.createCipher('3DES-ECB', forge.util.createBuffer(key, 'raw')); cipher.start(); - cipher.update(forge.util.createBuffer(JSON.stringify(payload), "raw")); + cipher.update(forge.util.createBuffer(JSON.stringify(payload), 'raw')); cipher.finish(); let encrypted = cipher.output; let token = forge.util.encode64(encrypted.getBytes()); - let decipher = forge.cipher.createDecipher( - "3DES-ECB", - forge.util.createBuffer(key, "raw") - ); + let decipher = forge.cipher.createDecipher('3DES-ECB', forge.util.createBuffer(key, 'raw')); decipher.start(); - decipher.update(forge.util.createBuffer(forge.util.decode64(token), "raw")); + decipher.update(forge.util.createBuffer(forge.util.decode64(token), 'raw')); decipher.finish(); let decrypted = decipher.output as forge.util.ByteStringBuffer; let content = JSON.parse(forge.util.encodeUtf8(decrypted.getBytes())); if (content.asd == payload.asd) throw Error('forge.cipher.createCipher failed'); -} \ No newline at end of file +} + +{ + cert.publicKey = keypair.publicKey; + cert.serialNumber = new Date().getTime() + ''; + cert.validity.notBefore = new Date(); + cert.validity.notAfter = new Date(); + cert.validity.notAfter.setFullYear(cert.validity.notAfter.getFullYear() + 20); + const attrs = [ + { + name: 'commonName', + value: 'x22x22' + }, + { + name: 'countryName', + value: 'GitHub' + }, + { + shortName: 'ST', + value: 'GitHub' + }, + { + name: 'localityName', + value: 'GitHub' + }, + { + name: 'organizationName', + value: 'x22x22' + }, + { + shortName: 'OU', + value: 'https://github.com/x22x22' + } + ]; + cert.setSubject(attrs); + cert.setIssuer(attrs); + cert.setExtensions([ + { + name: 'basicConstraints', + critical: true, + cA: true + }, + { + name: 'keyUsage', + critical: true, + keyCertSign: true + }, + { + name: 'subjectKeyIdentifier' + } + ]); + + // self-sign certificate + cert.sign(keypair.privateKey, forge.md.sha256.create()); +} diff --git a/types/node-forge/tsconfig.json b/types/node-forge/tsconfig.json index 8864280abf..fb3691ebef 100644 --- a/types/node-forge/tsconfig.json +++ b/types/node-forge/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-gcm/tsconfig.json b/types/node-gcm/tsconfig.json index f68df952f2..594e89999c 100644 --- a/types/node-gcm/tsconfig.json +++ b/types/node-gcm/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-geocoder/node-geocoder-tests.ts b/types/node-geocoder/node-geocoder-tests.ts index 33ed4b3036..bb554d03ba 100644 --- a/types/node-geocoder/node-geocoder-tests.ts +++ b/types/node-geocoder/node-geocoder-tests.ts @@ -1,4 +1,4 @@ -import * as NodeGeocoder from 'node-geocoder'; +import NodeGeocoder = require('node-geocoder'); const geocoder = NodeGeocoder({ provider: 'google', diff --git a/types/node-geocoder/tsconfig.json b/types/node-geocoder/tsconfig.json index 8076dc932c..0ad4af9d61 100644 --- a/types/node-geocoder/tsconfig.json +++ b/types/node-geocoder/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-getopt/tsconfig.json b/types/node-getopt/tsconfig.json index 757df0d365..399c277a9c 100644 --- a/types/node-getopt/tsconfig.json +++ b/types/node-getopt/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-hid/tsconfig.json b/types/node-hid/tsconfig.json index 3dce09c22b..65590474cb 100644 --- a/types/node-hid/tsconfig.json +++ b/types/node-hid/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-horseman/tsconfig.json b/types/node-horseman/tsconfig.json index 5490648512..a29f0ceb09 100644 --- a/types/node-horseman/tsconfig.json +++ b/types/node-horseman/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "node-horseman-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/node-hue-api/tsconfig.json b/types/node-hue-api/tsconfig.json index 6edecf355c..0310c9fb67 100644 --- a/types/node-hue-api/tsconfig.json +++ b/types/node-hue-api/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-int64/tsconfig.json b/types/node-int64/tsconfig.json index b7911dd7a2..361f4eb4e2 100644 --- a/types/node-int64/tsconfig.json +++ b/types/node-int64/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-ipc/tsconfig.json b/types/node-ipc/tsconfig.json index d8a28a8334..f3a0189b05 100644 --- a/types/node-ipc/tsconfig.json +++ b/types/node-ipc/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-jsfl-runner/tsconfig.json b/types/node-jsfl-runner/tsconfig.json index eb2c2d7fe9..f4353811a9 100644 --- a/types/node-jsfl-runner/tsconfig.json +++ b/types/node-jsfl-runner/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-json-db/tsconfig.json b/types/node-json-db/tsconfig.json index 1372add5aa..dfd45628f8 100644 --- a/types/node-json-db/tsconfig.json +++ b/types/node-json-db/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-mysql-wrapper/tsconfig.json b/types/node-mysql-wrapper/tsconfig.json index 7e12021cdc..d49a9c6e0b 100644 --- a/types/node-mysql-wrapper/tsconfig.json +++ b/types/node-mysql-wrapper/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-notifier/tsconfig.json b/types/node-notifier/tsconfig.json index 97b9bb617e..bab1531cf7 100644 --- a/types/node-notifier/tsconfig.json +++ b/types/node-notifier/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-persist/tsconfig.json b/types/node-persist/tsconfig.json index bcc3c3f2f9..e0b20bbdc4 100644 --- a/types/node-persist/tsconfig.json +++ b/types/node-persist/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-polyglot/tsconfig.json b/types/node-polyglot/tsconfig.json index ebf34971af..8927b0008b 100644 --- a/types/node-polyglot/tsconfig.json +++ b/types/node-polyglot/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-powershell/node-powershell-tests.ts b/types/node-powershell/node-powershell-tests.ts index a60f9db331..186d0bd68e 100644 --- a/types/node-powershell/node-powershell-tests.ts +++ b/types/node-powershell/node-powershell-tests.ts @@ -1,4 +1,4 @@ -import * as nodePowershell from 'node-powershell'; +import nodePowershell = require('node-powershell'); var options: nodePowershell.ShellOptions = { debugMsg: true diff --git a/types/node-powershell/tsconfig.json b/types/node-powershell/tsconfig.json index d24dc26304..2d2fc6f999 100644 --- a/types/node-powershell/tsconfig.json +++ b/types/node-powershell/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-ral/tsconfig.json b/types/node-ral/tsconfig.json index 13eec57091..de24642d5f 100644 --- a/types/node-ral/tsconfig.json +++ b/types/node-ral/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-red/tsconfig.json b/types/node-red/tsconfig.json index e92fbbd930..2330c83cff 100644 --- a/types/node-red/tsconfig.json +++ b/types/node-red/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-rsa/node-rsa-tests.ts b/types/node-rsa/node-rsa-tests.ts index e210d5b68d..0f8defacbd 100644 --- a/types/node-rsa/node-rsa-tests.ts +++ b/types/node-rsa/node-rsa-tests.ts @@ -1,4 +1,4 @@ -import * as NodeRSA from 'node-rsa'; +import NodeRSA = require('node-rsa'); const key = new NodeRSA({ b: 512 }); diff --git a/types/node-rsa/tsconfig.json b/types/node-rsa/tsconfig.json index 662a3c6b6f..e1a294df26 100644 --- a/types/node-rsa/tsconfig.json +++ b/types/node-rsa/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-sass-middleware/node-sass-middleware-tests.ts b/types/node-sass-middleware/node-sass-middleware-tests.ts index bfc755a424..34820155ed 100644 --- a/types/node-sass-middleware/node-sass-middleware-tests.ts +++ b/types/node-sass-middleware/node-sass-middleware-tests.ts @@ -1,6 +1,5 @@ - -import * as express from "express"; -import * as sassMiddleware from "node-sass-middleware"; +import express = require("express"); +import sassMiddleware = require("node-sass-middleware"); import * as path from "path"; var app = express(); app.use(sassMiddleware({ diff --git a/types/node-sass-middleware/tsconfig.json b/types/node-sass-middleware/tsconfig.json index f1c2b3a530..930a88b720 100644 --- a/types/node-sass-middleware/tsconfig.json +++ b/types/node-sass-middleware/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-sass/tsconfig.json b/types/node-sass/tsconfig.json index a1e4cdb079..4ee0b96bb1 100644 --- a/types/node-sass/tsconfig.json +++ b/types/node-sass/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-schedule/tsconfig.json b/types/node-schedule/tsconfig.json index 7ff95758d0..37ff002d0e 100644 --- a/types/node-schedule/tsconfig.json +++ b/types/node-schedule/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-slack/tsconfig.json b/types/node-slack/tsconfig.json index b32803599a..db7ad8d561 100644 --- a/types/node-slack/tsconfig.json +++ b/types/node-slack/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-snap7/tsconfig.json b/types/node-snap7/tsconfig.json index c78bc5a83f..70d02cbaab 100644 --- a/types/node-snap7/tsconfig.json +++ b/types/node-snap7/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-sprite-generator/node-sprite-generator-tests.ts b/types/node-sprite-generator/node-sprite-generator-tests.ts index 23309cea6d..7490d84865 100644 --- a/types/node-sprite-generator/node-sprite-generator-tests.ts +++ b/types/node-sprite-generator/node-sprite-generator-tests.ts @@ -1,5 +1,5 @@ -import * as nsg from 'node-sprite-generator'; -import * as express from 'express'; +import nsg = require('node-sprite-generator'); +import express = require('express'); const app = express(); app.use(nsg.middleware({ diff --git a/types/node-sprite-generator/tsconfig.json b/types/node-sprite-generator/tsconfig.json index 1a1abcf56b..cfd0f3ecb0 100644 --- a/types/node-sprite-generator/tsconfig.json +++ b/types/node-sprite-generator/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-static/tsconfig.json b/types/node-static/tsconfig.json index 57a6d79f15..b6034feeaf 100644 --- a/types/node-static/tsconfig.json +++ b/types/node-static/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-statsd/tsconfig.json b/types/node-statsd/tsconfig.json index a4f7cdba75..dea7e59d6c 100644 --- a/types/node-statsd/tsconfig.json +++ b/types/node-statsd/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-telegram-bot-api/tsconfig.json b/types/node-telegram-bot-api/tsconfig.json index bb33d5e9b5..62f52d6383 100644 --- a/types/node-telegram-bot-api/tsconfig.json +++ b/types/node-telegram-bot-api/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-uuid/tsconfig.json b/types/node-uuid/tsconfig.json index 52dc8180a0..f5491454e9 100644 --- a/types/node-uuid/tsconfig.json +++ b/types/node-uuid/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-validator/tsconfig.json b/types/node-validator/tsconfig.json index eb98203673..693678cdf3 100644 --- a/types/node-validator/tsconfig.json +++ b/types/node-validator/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-vault/node-vault-tests.ts b/types/node-vault/node-vault-tests.ts index d6d85980a1..6ce23bd4cd 100644 --- a/types/node-vault/node-vault-tests.ts +++ b/types/node-vault/node-vault-tests.ts @@ -1,4 +1,4 @@ -import * as nv from "node-vault"; +import nv = require("node-vault"); // Test code came from the sample code in README of the module. const options = { diff --git a/types/node-vault/tsconfig.json b/types/node-vault/tsconfig.json index d2875ffa4a..db340a253a 100644 --- a/types/node-vault/tsconfig.json +++ b/types/node-vault/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-wit/tsconfig.json b/types/node-wit/tsconfig.json index 4c183185fe..0f38fba2fb 100644 --- a/types/node-wit/tsconfig.json +++ b/types/node-wit/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-xmpp-client/tsconfig.json b/types/node-xmpp-client/tsconfig.json index 35471e38d2..da73c1f290 100644 --- a/types/node-xmpp-client/tsconfig.json +++ b/types/node-xmpp-client/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-xmpp-core/tsconfig.json b/types/node-xmpp-core/tsconfig.json index 65e37ab467..aab7c340f4 100644 --- a/types/node-xmpp-core/tsconfig.json +++ b/types/node-xmpp-core/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node-zookeeper-client/tsconfig.json b/types/node-zookeeper-client/tsconfig.json index 0182035432..89a844e122 100644 --- a/types/node-zookeeper-client/tsconfig.json +++ b/types/node-zookeeper-client/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node/index.d.ts b/types/node/index.d.ts index 38f043554b..ffe62a9355 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -118,12 +118,17 @@ interface NodeRequireFunction { } interface NodeRequire extends NodeRequireFunction { - resolve(id: string): string; + resolve: RequireResolve; cache: any; extensions: NodeExtensions; main: NodeModule | undefined; } +interface RequireResolve { + (id: string, options?: { paths?: string[]; }): string; + paths(request: string): string[] | null; +} + interface NodeExtensions { '.js': (m: NodeModule, filename: string) => any; '.json': (m: NodeModule, filename: string) => any; @@ -2621,9 +2626,9 @@ declare module "net" { destroy(err?: any): void; pause(): this; resume(): this; - setTimeout(timeout: number, callback?: Function): void; - setNoDelay(noDelay?: boolean): void; - setKeepAlive(enable?: boolean, initialDelay?: number): void; + setTimeout(timeout: number, callback?: Function): this; + setNoDelay(noDelay?: boolean): this; + setKeepAlive(enable?: boolean, initialDelay?: number): this; address(): { port: number; family: string; address: string; }; unref(): void; ref(): void; @@ -3716,7 +3721,7 @@ declare module "fs" { * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function readdir(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, files: Array) => void): void; + export function readdir(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, files: string[] | Buffer[]) => void): void; /** * Asynchronous readdir(3) - read a directory. @@ -3745,7 +3750,7 @@ declare module "fs" { * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise>; + export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; } /** @@ -3767,7 +3772,7 @@ declare module "fs" { * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function readdirSync(path: PathLike, options?: { encoding?: string | null } | string | null): Array; + export function readdirSync(path: PathLike, options?: { encoding?: string | null } | string | null): string[] | Buffer[]; /** * Asynchronous close(2) - close a file descriptor. @@ -5335,7 +5340,6 @@ declare module "stream" { * 5. error */ addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: string, listener: (...args: any[]) => void): this; addListener(event: "close", listener: () => void): this; addListener(event: "data", listener: (chunk: Buffer | string) => void): this; addListener(event: "end", listener: () => void): this; diff --git a/types/node/node-tests.ts b/types/node/node-tests.ts index dccde2db47..24fde87ddd 100644 --- a/types/node/node-tests.ts +++ b/types/node/node-tests.ts @@ -1,4 +1,4 @@ -import * as assert from "assert"; +import assert = require("assert"); import * as fs from "fs"; import * as events from "events"; import events2 = require("events"); @@ -235,6 +235,25 @@ namespace fs_tests { }); } + { + let listS: string[]; + listS = fs.readdirSync('path'); + listS = fs.readdirSync('path', { encoding: 'utf8' }); + listS = fs.readdirSync('path', { encoding: null }); + listS = fs.readdirSync('path', { encoding: undefined }); + listS = fs.readdirSync('path', 'utf8'); + listS = fs.readdirSync('path', null); + listS = fs.readdirSync('path', undefined); + + let listB: Buffer[]; + listB = fs.readdirSync('path', { encoding: 'buffer' }); + listB = fs.readdirSync("path", 'buffer'); + + let enc = 'buffer'; + fs.readdirSync('path', { encoding: enc }); // $ExpectType string[] | Buffer[] + fs.readdirSync('path', { }); // $ExpectType string[] | Buffer[] + } + { fs.mkdtemp('/tmp/foo-', (err, folder) => { console.log(folder); diff --git a/types/node/tsconfig.json b/types/node/tsconfig.json index 9f4317b9f4..16836a1483 100644 --- a/types/node/tsconfig.json +++ b/types/node/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/node/v0/node-tests.ts b/types/node/v0/node-tests.ts index 8e2443b360..d8e0a40699 100644 --- a/types/node/v0/node-tests.ts +++ b/types/node/v0/node-tests.ts @@ -1,5 +1,4 @@ - -import * as assert from "assert"; +import assert = require("assert"); import * as fs from "fs"; import * as events from "events"; import * as zlib from "zlib"; diff --git a/types/node/v0/tsconfig.json b/types/node/v0/tsconfig.json index a4a370b7a7..b3bde5e9c4 100644 --- a/types/node/v0/tsconfig.json +++ b/types/node/v0/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node/v4/index.d.ts b/types/node/v4/index.d.ts index b2db9f80ee..9d724643ca 100644 --- a/types/node/v4/index.d.ts +++ b/types/node/v4/index.d.ts @@ -1549,9 +1549,9 @@ declare module "net" { destroy(): void; pause(): void; resume(): void; - setTimeout(timeout: number, callback?: Function): void; - setNoDelay(noDelay?: boolean): void; - setKeepAlive(enable?: boolean, initialDelay?: number): void; + setTimeout(timeout: number, callback?: Function): this; + setNoDelay(noDelay?: boolean): this; + setKeepAlive(enable?: boolean, initialDelay?: number): this; address(): { port: number; family: string; address: string; }; unref(): void; ref(): void; diff --git a/types/node/v4/node-tests.ts b/types/node/v4/node-tests.ts index 2bb28ce779..e60b578ccf 100644 --- a/types/node/v4/node-tests.ts +++ b/types/node/v4/node-tests.ts @@ -1,4 +1,4 @@ -import * as assert from "assert"; +import assert = require("assert"); import * as fs from "fs"; import * as events from "events"; import * as zlib from "zlib"; diff --git a/types/node/v4/tsconfig.json b/types/node/v4/tsconfig.json index c89540145a..c5b84e1c76 100644 --- a/types/node/v4/tsconfig.json +++ b/types/node/v4/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node/v6/index.d.ts b/types/node/v6/index.d.ts index 5cbe7ab3dc..b24f170fae 100644 --- a/types/node/v6/index.d.ts +++ b/types/node/v6/index.d.ts @@ -5,6 +5,7 @@ // Wilco Bakker // Thomas Bouldin // Sebastian Silbermann +// Alorel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /************************************************ @@ -2093,9 +2094,9 @@ declare module "net" { setEncoding(encoding?: string): void; write(data: any, encoding?: string, callback?: Function): void; destroy(): void; - setTimeout(timeout: number, callback?: Function): void; - setNoDelay(noDelay?: boolean): void; - setKeepAlive(enable?: boolean, initialDelay?: number): void; + setTimeout(timeout: number, callback?: Function): this; + setNoDelay(noDelay?: boolean): this; + setKeepAlive(enable?: boolean, initialDelay?: number): this; address(): { port: number; family: string; address: string; }; unref(): void; ref(): void; @@ -2595,8 +2596,51 @@ declare module "fs" { * @returns Returns the created folder path. */ export function mkdtempSync(prefix: string): string; - export function readdir(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, files: string[]) => void): void; - export function readdirSync(path: string | Buffer): string[]; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdir(path: string | Buffer, options: { encoding: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdir(path: string | Buffer, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, files: Buffer[]) => void): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdir(path: string | Buffer, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, files: string[] | Buffer[]) => void): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. + */ + export function readdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdirSync(path: string | Buffer, options?: { encoding: BufferEncoding | null } | BufferEncoding | null): string[]; + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdirSync(path: string | Buffer, options: { encoding: "buffer" } | "buffer"): Buffer[]; + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdirSync(path: string | Buffer, options?: { encoding?: string | null } | string | null): string[] | Buffer[]; export function close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function closeSync(fd: number): void; export function open(path: string | Buffer, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; @@ -3605,7 +3649,6 @@ declare module "stream" { * 5. error **/ addListener(event: string, listener: Function): this; - addListener(event: string, listener: Function): this; addListener(event: "close", listener: () => void): this; addListener(event: "data", listener: (chunk: Buffer | string) => void): this; addListener(event: "end", listener: () => void): this; diff --git a/types/node/v6/node-tests.ts b/types/node/v6/node-tests.ts index 34a62bf88d..cd363c708c 100644 --- a/types/node/v6/node-tests.ts +++ b/types/node/v6/node-tests.ts @@ -1,4 +1,4 @@ -import * as assert from "assert"; +import assert = require("assert"); import * as fs from "fs"; import * as events from "events"; import events2 = require("events"); @@ -218,6 +218,25 @@ namespace fs_tests { fs.readFile('testfile', { flag: 'r' }, (err, data) => buffer = data); } + { + fs.readdir('foo', (err: any, files: string[]) => {}) + fs.readdir('foo', 'utf8', (err: any, files: string[]) => {}); + fs.readdir('foo', {encoding: 'utf8'}, (err: any, files: string[]) => {}); + fs.readdir('foo', 'buffer', (err: any, files: Buffer[]) => {}); + fs.readdir('foo', {encoding: 'buffer'}, (err: any, files: Buffer[]) => {}); + + let fsStringOut: string[] = fs.readdirSync('utf8'); + fsStringOut = fs.readdirSync('foo', 'utf8'); + fsStringOut = fs.readdirSync('foo', {encoding: 'utf8'}); + + let fsBufferOut: Buffer[] = fs.readdirSync('utf8', 'buffer'); + fsBufferOut = fs.readdirSync('foo', {encoding: 'buffer'}); + + let enc = 'buffer'; + fs.readdirSync('path', { encoding: enc }); // $ExpectType string[] | Buffer[] + fs.readdirSync('path', { }); // $ExpectType string[] | Buffer[] + } + { var errno: number; fs.readFile('testfile', (err, data) => { diff --git a/types/node/v6/tsconfig.json b/types/node/v6/tsconfig.json index 8fc9488eac..452983f88b 100644 --- a/types/node/v6/tsconfig.json +++ b/types/node/v6/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/node/v7/index.d.ts b/types/node/v7/index.d.ts index 038c4a6f58..3abee38175 100644 --- a/types/node/v7/index.d.ts +++ b/types/node/v7/index.d.ts @@ -2219,9 +2219,9 @@ declare module "net" { destroy(err?: any): void; pause(): this; resume(): this; - setTimeout(timeout: number, callback?: Function): void; - setNoDelay(noDelay?: boolean): void; - setKeepAlive(enable?: boolean, initialDelay?: number): void; + setTimeout(timeout: number, callback?: Function): this; + setNoDelay(noDelay?: boolean): this; + setKeepAlive(enable?: boolean, initialDelay?: number): this; address(): { port: number; family: string; address: string; }; unref(): void; ref(): void; @@ -3754,7 +3754,6 @@ declare module "stream" { * 5. error **/ addListener(event: string, listener: Function): this; - addListener(event: string, listener: Function): this; addListener(event: "close", listener: () => void): this; addListener(event: "data", listener: (chunk: Buffer | string) => void): this; addListener(event: "end", listener: () => void): this; diff --git a/types/node/v7/node-tests.ts b/types/node/v7/node-tests.ts index a2f25db8ec..0240dcc120 100644 --- a/types/node/v7/node-tests.ts +++ b/types/node/v7/node-tests.ts @@ -1,4 +1,4 @@ -import * as assert from "assert"; +import assert = require("assert"); import * as fs from "fs"; import * as events from "events"; import events2 = require("events"); diff --git a/types/node/v7/tsconfig.json b/types/node/v7/tsconfig.json index c5badcdaa5..23318008ca 100644 --- a/types/node/v7/tsconfig.json +++ b/types/node/v7/tsconfig.json @@ -23,6 +23,7 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/node/v8/index.d.ts b/types/node/v8/index.d.ts index 18ba96575d..7c7c6ff615 100644 --- a/types/node/v8/index.d.ts +++ b/types/node/v8/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Node.js 8.5.x +// Type definitions for Node.js 8.9.x // Project: http://nodejs.org/ // Definitions by: Microsoft TypeScript // DefinitelyTyped @@ -116,12 +116,17 @@ interface NodeRequireFunction { } interface NodeRequire extends NodeRequireFunction { - resolve(id: string): string; + resolve: RequireResolve; cache: any; extensions: NodeExtensions; main: NodeModule | undefined; } +interface RequireResolve { + (id: string, options?: { paths?: string[]; }): string; + paths(request: string): string[] | null; +} + interface NodeExtensions { '.js': (m: NodeModule, filename: string) => any; '.json': (m: NodeModule, filename: string) => any; @@ -2609,9 +2614,9 @@ declare module "net" { destroy(err?: any): void; pause(): this; resume(): this; - setTimeout(timeout: number, callback?: Function): void; - setNoDelay(noDelay?: boolean): void; - setKeepAlive(enable?: boolean, initialDelay?: number): void; + setTimeout(timeout: number, callback?: Function): this; + setNoDelay(noDelay?: boolean): this; + setKeepAlive(enable?: boolean, initialDelay?: number): this; address(): { port: number; family: string; address: string; }; unref(): void; ref(): void; @@ -3693,7 +3698,7 @@ declare module "fs" { * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function readdir(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, files: Array) => void): void; + export function readdir(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, files: string[] | Buffer[]) => void): void; /** * Asynchronous readdir(3) - read a directory. @@ -3722,7 +3727,7 @@ declare module "fs" { * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise>; + export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; } /** @@ -3744,7 +3749,7 @@ declare module "fs" { * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function readdirSync(path: PathLike, options?: { encoding?: string | null } | string | null): Array; + export function readdirSync(path: PathLike, options?: { encoding?: string | null } | string | null): string[] | Buffer[]; /** * Asynchronous close(2) - close a file descriptor. @@ -5310,7 +5315,6 @@ declare module "stream" { * 5. error */ addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: string, listener: (...args: any[]) => void): this; addListener(event: "close", listener: () => void): this; addListener(event: "data", listener: (chunk: Buffer | string) => void): this; addListener(event: "end", listener: () => void): this; diff --git a/types/node/v8/node-tests.ts b/types/node/v8/node-tests.ts index 8f4c7f9850..74d4c5c222 100644 --- a/types/node/v8/node-tests.ts +++ b/types/node/v8/node-tests.ts @@ -1,4 +1,4 @@ -import * as assert from "assert"; +import assert = require("assert"); import * as fs from "fs"; import * as events from "events"; import events2 = require("events"); @@ -235,6 +235,25 @@ namespace fs_tests { }); } + { + let listS: string[]; + listS = fs.readdirSync('path'); + listS = fs.readdirSync('path', { encoding: 'utf8' }); + listS = fs.readdirSync('path', { encoding: null }); + listS = fs.readdirSync('path', { encoding: undefined }); + listS = fs.readdirSync('path', 'utf8'); + listS = fs.readdirSync('path', null); + listS = fs.readdirSync('path', undefined); + + let listB: Buffer[]; + listB = fs.readdirSync('path', { encoding: 'buffer' }); + listB = fs.readdirSync("path", 'buffer'); + + let enc = 'buffer'; + fs.readdirSync('path', { encoding: enc }); // $ExpectType string[] | Buffer[] + fs.readdirSync('path', { }); // $ExpectType string[] | Buffer[] + } + { fs.mkdtemp('/tmp/foo-', (err, folder) => { console.log(folder); diff --git a/types/node/v8/tsconfig.json b/types/node/v8/tsconfig.json index 3f4614bef4..ea093ad4a3 100644 --- a/types/node/v8/tsconfig.json +++ b/types/node/v8/tsconfig.json @@ -24,6 +24,7 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } -} +} \ No newline at end of file diff --git a/types/node_redis/tsconfig.json b/types/node_redis/tsconfig.json index 02963e3afd..352332b6c7 100644 --- a/types/node_redis/tsconfig.json +++ b/types/node_redis/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/nodegit/tsconfig.json b/types/nodegit/tsconfig.json index e097a77133..6f425f13a1 100644 --- a/types/nodegit/tsconfig.json +++ b/types/nodegit/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "annotated-commit.d.ts", @@ -119,4 +120,4 @@ "tree-update.d.ts", "tree.d.ts" ] -} +} \ No newline at end of file diff --git a/types/nodemailer-direct-transport/tsconfig.json b/types/nodemailer-direct-transport/tsconfig.json index a86a4a088a..98320cc735 100644 --- a/types/nodemailer-direct-transport/tsconfig.json +++ b/types/nodemailer-direct-transport/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nodemailer-mailgun-transport/tsconfig.json b/types/nodemailer-mailgun-transport/tsconfig.json index 4098e7a2d4..e5d64d4305 100644 --- a/types/nodemailer-mailgun-transport/tsconfig.json +++ b/types/nodemailer-mailgun-transport/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nodemailer-pickup-transport/tsconfig.json b/types/nodemailer-pickup-transport/tsconfig.json index 913453977e..5c029de666 100644 --- a/types/nodemailer-pickup-transport/tsconfig.json +++ b/types/nodemailer-pickup-transport/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nodemailer-ses-transport/nodemailer-ses-transport-tests.ts b/types/nodemailer-ses-transport/nodemailer-ses-transport-tests.ts index 393091816d..271dc6cf41 100644 --- a/types/nodemailer-ses-transport/nodemailer-ses-transport-tests.ts +++ b/types/nodemailer-ses-transport/nodemailer-ses-transport-tests.ts @@ -1,6 +1,6 @@ import * as AWS from "aws-sdk"; import * as nodemailer from "nodemailer"; -import * as sesTransport from 'nodemailer-ses-transport'; +import sesTransport = require('nodemailer-ses-transport'); const opts: sesTransport.SesOptions = { SES: new AWS.SES(), diff --git a/types/nodemailer-ses-transport/tsconfig.json b/types/nodemailer-ses-transport/tsconfig.json index bdaffbb222..db905153d0 100644 --- a/types/nodemailer-ses-transport/tsconfig.json +++ b/types/nodemailer-ses-transport/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nodemailer-smtp-pool/tsconfig.json b/types/nodemailer-smtp-pool/tsconfig.json index 63a47e4ce7..ed28a80cfd 100644 --- a/types/nodemailer-smtp-pool/tsconfig.json +++ b/types/nodemailer-smtp-pool/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nodemailer-smtp-transport/tsconfig.json b/types/nodemailer-smtp-transport/tsconfig.json index 4bce06278d..5a3c396e6f 100644 --- a/types/nodemailer-smtp-transport/tsconfig.json +++ b/types/nodemailer-smtp-transport/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nodemailer-stub-transport/tsconfig.json b/types/nodemailer-stub-transport/tsconfig.json index c8fed1b487..52b6f50f53 100644 --- a/types/nodemailer-stub-transport/tsconfig.json +++ b/types/nodemailer-stub-transport/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nodemailer/lib/mailer/index.d.ts b/types/nodemailer/lib/mailer/index.d.ts index f08c2d085d..bd9dd7ba8d 100644 --- a/types/nodemailer/lib/mailer/index.d.ts +++ b/types/nodemailer/lib/mailer/index.d.ts @@ -3,7 +3,7 @@ import { EventEmitter } from 'events'; import { Socket } from 'net'; import { Readable } from 'stream'; -import { URL } from 'url'; +import { Url } from 'url'; import { SentMessageInfo, Transport, TransportOptions } from '../..'; import * as shared from '../shared'; @@ -34,7 +34,7 @@ declare namespace Mail { /** String, Buffer or a Stream contents for the attachmentent */ content?: string | Buffer | Readable; /** path to a file or an URL (data uris are allowed as well) if you want to stream the file instead of including it (better for larger attachments) */ - path?: string | URL; + path?: string | Url; } interface Attachment extends AttachmentLike { @@ -175,11 +175,11 @@ declare class Mail extends EventEmitter { setupProxy(proxyUrl: string): void; set(key: 'oauth2_provision_cb', value: (user: string, renew: boolean, callback: (err: Error | null, accessToken?: string, expires?: number) => void) => void): Map; - set(key: 'proxy_handler_http' | 'proxy_handler_https' | 'proxy_handler_socks' | 'proxy_handler_socks5' | 'proxy_handler_socks4' | 'proxy_handler_socks4a', value: (proxy: URL, options: TransportOptions, callback: (err: Error | null, socketOptions?: { connection: Socket }) => void) => void): Map; + set(key: 'proxy_handler_http' | 'proxy_handler_https' | 'proxy_handler_socks' | 'proxy_handler_socks5' | 'proxy_handler_socks4' | 'proxy_handler_socks4a', value: (proxy: Url, options: TransportOptions, callback: (err: Error | null, socketOptions?: { connection: Socket }) => void) => void): Map; set(key: string, value: any): Map; get(key: 'oauth2_provision_cb'): (user: string, renew: boolean, callback: (err: Error | null, accessToken: string, expires: number) => void) => void; - get(key: 'proxy_handler_http' | 'proxy_handler_https' | 'proxy_handler_socks' | 'proxy_handler_socks5' | 'proxy_handler_socks4' | 'proxy_handler_socks4a'): (proxy: URL, options: TransportOptions, callback: (err: Error | null, socketOptions: { connection: Socket }) => void) => void; + get(key: 'proxy_handler_http' | 'proxy_handler_https' | 'proxy_handler_socks' | 'proxy_handler_socks5' | 'proxy_handler_socks4' | 'proxy_handler_socks4a'): (proxy: Url, options: TransportOptions, callback: (err: Error | null, socketOptions: { connection: Socket }) => void) => void; get(key: string): any; addListener(event: 'error', listener: (err: Error) => void): this; diff --git a/types/nodemailer/tsconfig.json b/types/nodemailer/tsconfig.json index f2c1ffbbe8..e01403bac1 100644 --- a/types/nodemailer/tsconfig.json +++ b/types/nodemailer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nodemailer/v3/tsconfig.json b/types/nodemailer/v3/tsconfig.json index 4ebef6b8cf..72c13e5afd 100644 --- a/types/nodemailer/v3/tsconfig.json +++ b/types/nodemailer/v3/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nodeunit/tsconfig.json b/types/nodeunit/tsconfig.json index 3d52af1d14..8500b806f3 100644 --- a/types/nodeunit/tsconfig.json +++ b/types/nodeunit/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/noisejs/tsconfig.json b/types/noisejs/tsconfig.json index 43e5b37e38..cab62ac0cd 100644 --- a/types/noisejs/tsconfig.json +++ b/types/noisejs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nomnom/tsconfig.json b/types/nomnom/tsconfig.json index 0c5b757ced..e67f844431 100644 --- a/types/nomnom/tsconfig.json +++ b/types/nomnom/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nopt/tsconfig.json b/types/nopt/tsconfig.json index 0dc537c0c8..8c962d58a5 100644 --- a/types/nopt/tsconfig.json +++ b/types/nopt/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/normalize-package-data/tsconfig.json b/types/normalize-package-data/tsconfig.json index 0e79738d04..95a0703f81 100644 --- a/types/normalize-package-data/tsconfig.json +++ b/types/normalize-package-data/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "normalize-package-data-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/normalize-url/tsconfig.json b/types/normalize-url/tsconfig.json index 1626fe81b7..59d52868c4 100644 --- a/types/normalize-url/tsconfig.json +++ b/types/normalize-url/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/notie/tsconfig.json b/types/notie/tsconfig.json index 0ab631c147..3ee5ae8275 100644 --- a/types/notie/tsconfig.json +++ b/types/notie/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/notify/tsconfig.json b/types/notify/tsconfig.json index a6957993f9..2543739912 100644 --- a/types/notify/tsconfig.json +++ b/types/notify/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/notifyjs-browser/tsconfig.json b/types/notifyjs-browser/tsconfig.json index 53861036b0..e4aae3115f 100644 --- a/types/notifyjs-browser/tsconfig.json +++ b/types/notifyjs-browser/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/notifyjs/tsconfig.json b/types/notifyjs/tsconfig.json index 0652ac5cfc..9c2928de69 100644 --- a/types/notifyjs/tsconfig.json +++ b/types/notifyjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/notyf/tsconfig.json b/types/notyf/tsconfig.json index 9cf78d162a..ac2fa96aad 100644 --- a/types/notyf/tsconfig.json +++ b/types/notyf/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "notyf-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/nouislider/tsconfig.json b/types/nouislider/tsconfig.json index dd6994a4dd..43253dfc79 100644 --- a/types/nouislider/tsconfig.json +++ b/types/nouislider/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nouislider/v7/tsconfig.json b/types/nouislider/v7/tsconfig.json index d24f6c55b0..c38ff9e541 100644 --- a/types/nouislider/v7/tsconfig.json +++ b/types/nouislider/v7/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nouislider/v8/tsconfig.json b/types/nouislider/v8/tsconfig.json index 6dfd2ac510..d0b146bb70 100644 --- a/types/nouislider/v8/tsconfig.json +++ b/types/nouislider/v8/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/novnc-core/tsconfig.json b/types/novnc-core/tsconfig.json index 3aed33120e..93eff8a1e4 100644 --- a/types/novnc-core/tsconfig.json +++ b/types/novnc-core/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/npm-package-arg/tsconfig.json b/types/npm-package-arg/tsconfig.json index 1eea7a98ae..7cc49c7366 100644 --- a/types/npm-package-arg/tsconfig.json +++ b/types/npm-package-arg/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/npm/tsconfig.json b/types/npm/tsconfig.json index 01aebadc3e..8f15ee25cf 100644 --- a/types/npm/tsconfig.json +++ b/types/npm/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nprogress/tsconfig.json b/types/nprogress/tsconfig.json index bd50ab2e1f..e8c393e92c 100644 --- a/types/nprogress/tsconfig.json +++ b/types/nprogress/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ns-api/tsconfig.json b/types/ns-api/tsconfig.json index 6918e1e567..7569d8c5fa 100644 --- a/types/ns-api/tsconfig.json +++ b/types/ns-api/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nslog/tsconfig.json b/types/nslog/tsconfig.json index 6cd009f29d..a285b4a578 100644 --- a/types/nslog/tsconfig.json +++ b/types/nslog/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nsqjs/tsconfig.json b/types/nsqjs/tsconfig.json index 6681afbdb9..5a96224386 100644 --- a/types/nsqjs/tsconfig.json +++ b/types/nsqjs/tsconfig.json @@ -15,10 +15,10 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, - "strictFunctionTypes": true + "esModuleInterop": true }, "files": [ "index.d.ts", "nsqjs-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/number-is-nan/tsconfig.json b/types/number-is-nan/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/number-is-nan/tsconfig.json +++ b/types/number-is-nan/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/number-to-words/tsconfig.json b/types/number-to-words/tsconfig.json index 49b562b085..c14a5e19f2 100644 --- a/types/number-to-words/tsconfig.json +++ b/types/number-to-words/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/numeral/tsconfig.json b/types/numeral/tsconfig.json index 332485f391..e47443e0f5 100644 --- a/types/numeral/tsconfig.json +++ b/types/numeral/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/numjs/tsconfig.json b/types/numjs/tsconfig.json index f76db6c4ca..7b5455900f 100644 --- a/types/numjs/tsconfig.json +++ b/types/numjs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nunjucks-date/tsconfig.json b/types/nunjucks-date/tsconfig.json index c5851d125c..a4174f7bc8 100644 --- a/types/nunjucks-date/tsconfig.json +++ b/types/nunjucks-date/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nunjucks/tsconfig.json b/types/nunjucks/tsconfig.json index 5824ce2f1f..70ac043ff8 100644 --- a/types/nunjucks/tsconfig.json +++ b/types/nunjucks/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "nunjucks-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/nvd3/tsconfig.json b/types/nvd3/tsconfig.json index a2aa830e00..910a98d99c 100644 --- a/types/nvd3/tsconfig.json +++ b/types/nvd3/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nw.gui/tsconfig.json b/types/nw.gui/tsconfig.json index ec66284c38..0570b20e56 100644 --- a/types/nw.gui/tsconfig.json +++ b/types/nw.gui/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/nw.js/tsconfig.json b/types/nw.js/tsconfig.json index 047aa3c15a..035330976b 100644 --- a/types/nw.js/tsconfig.json +++ b/types/nw.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/o.js/tsconfig.json b/types/o.js/tsconfig.json index a3159265ee..536d5abe8c 100644 --- a/types/o.js/tsconfig.json +++ b/types/o.js/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/oauth.js/tsconfig.json b/types/oauth.js/tsconfig.json index 39891ddb92..2b9b599818 100644 --- a/types/oauth.js/tsconfig.json +++ b/types/oauth.js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/oauth2-server/oauth2-server-tests.ts b/types/oauth2-server/oauth2-server-tests.ts index be8fa83705..faf9976873 100644 --- a/types/oauth2-server/oauth2-server-tests.ts +++ b/types/oauth2-server/oauth2-server-tests.ts @@ -1,5 +1,5 @@ -import * as express from "express"; -import * as OAuth2Server from "oauth2-server"; +import express = require("express"); +import OAuth2Server = require("oauth2-server"); const oauth2Model: OAuth2Server.AuthorizationCodeModel = { getClient: async (clientId: string, clientSecret: string): Promise => { diff --git a/types/oauth2-server/tsconfig.json b/types/oauth2-server/tsconfig.json index b245965239..ee86fffc4f 100644 --- a/types/oauth2-server/tsconfig.json +++ b/types/oauth2-server/tsconfig.json @@ -15,6 +15,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "target": "es6" }, "files": [ diff --git a/types/oauth2orize/tsconfig.json b/types/oauth2orize/tsconfig.json index 7903eeb77f..f2a562ac68 100644 --- a/types/oauth2orize/tsconfig.json +++ b/types/oauth2orize/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/obelisk.js/tsconfig.json b/types/obelisk.js/tsconfig.json index f95e82cb80..3005f5052f 100644 --- a/types/obelisk.js/tsconfig.json +++ b/types/obelisk.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/object-assign/tsconfig.json b/types/object-assign/tsconfig.json index f00a78b509..14dd544d25 100644 --- a/types/object-assign/tsconfig.json +++ b/types/object-assign/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/object-diff/tsconfig.json b/types/object-diff/tsconfig.json index 3fdf287fcf..d49649e67a 100644 --- a/types/object-diff/tsconfig.json +++ b/types/object-diff/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/object-hash/index.d.ts b/types/object-hash/index.d.ts index c6b16df950..4da49c262c 100644 --- a/types/object-hash/index.d.ts +++ b/types/object-hash/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for object-hash v1.1.8 +// Type definitions for object-hash v1.2.0 // Project: https://github.com/puleos/object-hash // Definitions by: Michael Zabka // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -18,6 +18,7 @@ declare namespace ObjectHash { respectFunctionNames?: boolean; unorderedArrays?: boolean; unorderedSets?: boolean; + excludeKeys?: (key: string) => boolean; } interface HashTableItem { diff --git a/types/object-hash/tsconfig.json b/types/object-hash/tsconfig.json index 7f1eb2a0f1..fe16726761 100644 --- a/types/object-hash/tsconfig.json +++ b/types/object-hash/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/object-inspect/tsconfig.json b/types/object-inspect/tsconfig.json index 1f167ba039..bcdc9ceafa 100644 --- a/types/object-inspect/tsconfig.json +++ b/types/object-inspect/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "object-inspect-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/object-map/tsconfig.json b/types/object-map/tsconfig.json index 88256eb7f9..b395a58165 100644 --- a/types/object-map/tsconfig.json +++ b/types/object-map/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/object-path/tsconfig.json b/types/object-path/tsconfig.json index 14192cc5b0..776b12f2ed 100644 --- a/types/object-path/tsconfig.json +++ b/types/object-path/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/object-refs/tsconfig.json b/types/object-refs/tsconfig.json index 3d9337cf0a..0fa906064e 100644 --- a/types/object-refs/tsconfig.json +++ b/types/object-refs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/oblo-util/tsconfig.json b/types/oblo-util/tsconfig.json index c424a7fff8..9d878f810c 100644 --- a/types/oblo-util/tsconfig.json +++ b/types/oblo-util/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/oboe/tsconfig.json b/types/oboe/tsconfig.json index 1c02019149..08c0ffd5df 100644 --- a/types/oboe/tsconfig.json +++ b/types/oboe/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/observe-js/tsconfig.json b/types/observe-js/tsconfig.json index 23b2a5106e..19dbac24df 100644 --- a/types/observe-js/tsconfig.json +++ b/types/observe-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/oclazyload/tsconfig.json b/types/oclazyload/tsconfig.json index 3ada1d6bee..c3be409f70 100644 --- a/types/oclazyload/tsconfig.json +++ b/types/oclazyload/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/odata/tsconfig.json b/types/odata/tsconfig.json index d7ea224b4e..635168e418 100644 --- a/types/odata/tsconfig.json +++ b/types/odata/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ofe/tsconfig.json b/types/ofe/tsconfig.json index dbd94babca..13f2ecddb1 100644 --- a/types/ofe/tsconfig.json +++ b/types/ofe/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/office-js/tsconfig.json b/types/office-js/tsconfig.json index 28a0881837..45e8292315 100644 --- a/types/office-js/tsconfig.json +++ b/types/office-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/offline-js/tsconfig.json b/types/offline-js/tsconfig.json index e7d567565c..63c0c3d772 100644 --- a/types/offline-js/tsconfig.json +++ b/types/offline-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/oibackoff/tsconfig.json b/types/oibackoff/tsconfig.json index d1f4fd90d8..bf94e5b8a8 100644 --- a/types/oibackoff/tsconfig.json +++ b/types/oibackoff/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/oidc-token-manager/tsconfig.json b/types/oidc-token-manager/tsconfig.json index 9a1d07adb6..0069da49f5 100644 --- a/types/oidc-token-manager/tsconfig.json +++ b/types/oidc-token-manager/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ol/tsconfig.json b/types/ol/tsconfig.json index b307225e58..4c7846cda7 100644 --- a/types/ol/tsconfig.json +++ b/types/ol/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -173,4 +174,4 @@ "vectortile/index.d.ts", "view/index.d.ts" ] -} +} \ No newline at end of file diff --git a/types/on-finished/tsconfig.json b/types/on-finished/tsconfig.json index 14e726f8c4..7e49b150bb 100644 --- a/types/on-finished/tsconfig.json +++ b/types/on-finished/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/on-headers/tsconfig.json b/types/on-headers/tsconfig.json index a0e5fc13dd..25c2e3c8d5 100644 --- a/types/on-headers/tsconfig.json +++ b/types/on-headers/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/once/tsconfig.json b/types/once/tsconfig.json index e6b9784107..67de4d3961 100644 --- a/types/once/tsconfig.json +++ b/types/once/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/onesignal-cordova-plugin/tsconfig.json b/types/onesignal-cordova-plugin/tsconfig.json index bcee47426f..ce255e192d 100644 --- a/types/onesignal-cordova-plugin/tsconfig.json +++ b/types/onesignal-cordova-plugin/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "onesignal-cordova-plugin-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/onetime/tsconfig.json b/types/onetime/tsconfig.json index 84d3da86b8..f283f14841 100644 --- a/types/onetime/tsconfig.json +++ b/types/onetime/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/oniguruma/tsconfig.json b/types/oniguruma/tsconfig.json index b807c6e5de..28d398ed22 100644 --- a/types/oniguruma/tsconfig.json +++ b/types/oniguruma/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/onoff/tsconfig.json b/types/onoff/tsconfig.json index cbe0820a5a..ae7322e35a 100644 --- a/types/onoff/tsconfig.json +++ b/types/onoff/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/open/tsconfig.json b/types/open/tsconfig.json index 1395893dcb..62cd144b3b 100644 --- a/types/open/tsconfig.json +++ b/types/open/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/opener/tsconfig.json b/types/opener/tsconfig.json index 8f8b166751..fd2c277637 100644 --- a/types/opener/tsconfig.json +++ b/types/opener/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/openfin/tsconfig.json b/types/openfin/tsconfig.json index fd3199ceb7..48d26affcc 100644 --- a/types/openfin/tsconfig.json +++ b/types/openfin/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/openfin/v15/tsconfig.json b/types/openfin/v15/tsconfig.json index 103e765e43..17537fec00 100644 --- a/types/openfin/v15/tsconfig.json +++ b/types/openfin/v15/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/openfin/v16/tsconfig.json b/types/openfin/v16/tsconfig.json index cfb0b2d238..f6d5d45a8a 100644 --- a/types/openfin/v16/tsconfig.json +++ b/types/openfin/v16/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/openjscad/tsconfig.json b/types/openjscad/tsconfig.json index 971a3ee55a..44ef0db880 100644 --- a/types/openjscad/tsconfig.json +++ b/types/openjscad/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index c217a6d873..f9593fcb09 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -12344,13 +12344,42 @@ declare module ol { */ constructor(opt_options?: olx.ViewOptions); + /** + * Animate the view. The view's center, zoom (or resolution), and + * rotation can be animated for smooth transitions between view states. + * @param {olx.AnimateOptions} var_args Animation options. + * @param {olx.AnimateOptions | (completed: boolean) => void } restArgs + * @api experimental + */ + animate(...var_args: Array): void; + + /** + * Determine if the view is being animated. + * @return {boolean} The view is being animated. + * @api + */ + getAnimating(): boolean; + + /** + * Determine if the user is interacting with the view, such as panning or zooming. + * @return {boolean} The view is being interacted with. + * @api + */ + getInteracting(): boolean; + + /** + * Cancel any ongoing animations. + * @api + */ + cancelAnimations(): void; + /** * Get the constrained center of this view. * @param {ol.Coordinate|undefined} center Center. * @return {ol.Coordinate|undefined} Constrained center. * @api */ - constrainCenter(center: (ol.Coordinate)): (ol.Coordinate); + constrainCenter(center?: ol.Coordinate): ol.Coordinate; /** * Get the constrained resolution of this view. @@ -12360,7 +12389,7 @@ declare module ol { * @return {number|undefined} Constrained resolution. * @api */ - constrainResolution(resolution: (number), opt_delta?: number, opt_direction?: number): (number); + constrainResolution(resolution?: number, opt_delta?: number, opt_direction?: number): number; /** * Get the constrained rotation of this view. @@ -12369,7 +12398,7 @@ declare module ol { * @return {number|undefined} Constrained rotation. * @api */ - constrainRotation(rotation: (number), opt_delta?: number): (number); + constrainRotation(rotation?: number, opt_delta?: number): number; /** * Get the view center. @@ -12377,7 +12406,7 @@ declare module ol { * @observable * @api stable */ - getCenter(): (ol.Coordinate); + getCenter(): ol.Coordinate; /** * Calculate the extent for the current view state and the passed size. @@ -12404,6 +12433,34 @@ declare module ol { */ getMinResolution(): number; + /** + * Get the maximum zoom level for the view. + * @return {number} The maximum zoom level. + * @api + */ + getMaxZoom(): number; + + /** + * Set a new maximum zoom level for the view. + * @param {number} zoom The maximum zoom level. + * @api stable + */ + setMaxZoom(zoom: number): void; + + /** + * Get the minimum zoom level for the view. + * @return {number} The minimum zoom level. + * @api + */ + getMinZoom(): number; + + /** + * Set a new minimum zoom level for the view. + * @param {number} zoom The minimum zoom level. + * @api stable + */ + setMinZoom(zoom: number): void; + /** * Get the view projection. * @return {ol.proj.Projection} The projection of the view. @@ -12417,7 +12474,7 @@ declare module ol { * @observable * @api stable */ - getResolution(): (number); + getResolution(): number; /** * Get the resolutions for the view. This returns the array of resolutions @@ -12425,7 +12482,17 @@ declare module ol { * @return {Array.|undefined} The resolutions of the view. * @api stable */ - getResolutions(): (number[]); + getResolutions(): number[]; + + /** + * Get the resolution for a provided extent (in map units) and size (in pixels). + * @param {ol.Extent} extent Extent. + * @param {ol.Size=} opt_size Box pixel size. + * @return {number} The resolution at which the provided extent will render at + * the given size. + * @api + */ + getResolutionForExtent(extent: ol.Extent, opt_size?: ol.Size): number; /** * Get the view rotation. @@ -12436,12 +12503,29 @@ declare module ol { getRotation(): number; /** - * Get the current zoom level. Return undefined if the current - * resolution is undefined or not within the "resolution constraints". + * Get the current zoom level. If you configured your view with a resolutions + * array (this is rare), this method may return non-integer zoom levels (so + * the zoom level is not safe to use as an index into a resolutions array). * @return {number|undefined} Zoom. - * @api stable + * @api */ - getZoom(): (number); + getZoom(): number; + + /** + * Get the zoom level for a resolution. + * @param {number} resolution The resolution. + * @return {number|undefined} The zoom level for the provided resolution. + * @api + */ + getZoomForResolution(resolution: number): number; + + /** + * Get the resolution for a zoom level. + * @param {number} zoom Zoom level. + * @return {number} The view resolution for the provided zoom level. + * @api + */ + getResolutionForZoom(zoom: number): number; /** * Fit the given geometry or extent based on the given map size and border. @@ -12452,7 +12536,7 @@ declare module ol { * @param {olx.view.FitOptions=} opt_options Options. * @api */ - fit(geometry: (ol.geom.SimpleGeometry | ol.Extent), opt_options?: olx.view.FitOptions): void; + fit(geometryOrExtent: (ol.geom.SimpleGeometry | ol.Extent), opt_options?: olx.view.FitOptions): void; /** * Center on coordinate and view position. @@ -12477,7 +12561,7 @@ declare module ol { * @observable * @api stable */ - setCenter(center: (ol.Coordinate)): void; + setCenter(center: ol.Coordinate): void; /** * Set the resolution for this view. @@ -12485,7 +12569,7 @@ declare module ol { * @observable * @api stable */ - setResolution(resolution: (number)): void; + setResolution(resolution?: number): void; /** * Set the rotation for this view. @@ -12495,20 +12579,6 @@ declare module ol { */ setRotation(rotation: number): void; - /** - * Set a new maximum zoom level for the view. - * @param {number} zoom The maximum zoom level. - * @api stable - */ - setMaxZoom(zoom: number): void; - - /** - * Set a new minimum zoom level for the view. - * @param {number} zoom The minimum zoom level. - * @api stable - */ - setMinZoom(zoom: number): void; - /** * Zoom to a specific zoom level. * @param {number} zoom Zoom level. @@ -12516,15 +12586,6 @@ declare module ol { */ setZoom(zoom: number): void; - /** - * Animate the view. The view's center, zoom (or resolution), and - * rotation can be animated for smooth transitions between view states. - * @param {olx.AnimateOptions} var_args Animation options. - * @param {olx.AnimateOptions | (completed: boolean) => void } restArgs - * @api experimental - */ - animate(...var_args: Array): void; - } } @@ -12607,7 +12668,7 @@ declare module olx { zoom?: number | undefined; resolution?: number | undefined; rotation?: number | undefined; - anchor?: number | undefined; + anchor?: ol.Coordinate | undefined; duration?: number | undefined; easing?: ((t: number) => number) | undefined; } diff --git a/types/openlayers/openlayers-tests.ts b/types/openlayers/openlayers-tests.ts index 4353f48960..1981e50847 100644 --- a/types/openlayers/openlayers-tests.ts +++ b/types/openlayers/openlayers-tests.ts @@ -55,6 +55,7 @@ let mapBrowserEvent: ol.MapBrowserEvent; let multiLineString: ol.geom.MultiLineString; let multiPoint: ol.geom.MultiPoint; let multiPolygon: ol.geom.MultiPolygon; +let pixel: ol.Pixel; let point: ol.geom.Point; let polygon: ol.geom.Polygon; let projection: ol.proj.Projection; @@ -392,17 +393,97 @@ voidValue = feature.setProperties(object); // ol.View // -let view: ol.View = new ol.View({ - center: [0, 0], +let view: ol.View; +view = new ol.View(); +view = new ol.View({}); +view = new ol.View({ + center: coordinate, + constrainRotation: numberValue, + enableRotation: booleanValue, + extent: extent, + maxResolution: numberValue, + minResolution: numberValue, + maxZoom: numberValue, + minZoom: numberValue, + projection: projectionLike, + resolution: numberValue, + resolutions: [numberValue, numberValue, numberValue, numberValue, numberValue], + rotation: numberValue, zoom: numberValue, + zoomFactor: numberValue, +}); +view = new ol.View({ + constrainRotation: booleanValue, }); -voidValue = view.setMaxZoom(numberValue); -voidValue = view.setMinZoom(numberValue); +voidValue = view.animate(); +voidValue = view.animate({}); +voidValue = view.animate({zoom: view.getZoom() + 1}); +voidValue = view.animate({zoom: 10}, {center: [0, 0]}); +voidValue = view.animate({ + center: coordinate, + zoom: numberValue, + resolution: numberValue, + rotation: numberValue, + anchor: coordinate, + duration: numberValue, + easing: easingFunction, +}); +extent = view.calculateExtent(); +extent = view.calculateExtent(size); +voidValue = view.cancelAnimations(); +voidValue = view.centerOn(coordinate, size, pixel); +coordinate = view.constrainCenter(); +coordinate = view.constrainCenter(coordinate); +numberValue = view.constrainResolution(); +numberValue = view.constrainResolution(numberValue); +numberValue = view.constrainResolution(numberValue, numberValue); +numberValue = view.constrainResolution(numberValue, numberValue, numberValue); +numberValue = view.constrainRotation(); +numberValue = view.constrainRotation(numberValue); +numberValue = view.constrainRotation(numberValue, numberValue); voidValue = view.fit(simpleGeometry); +voidValue = view.fit(simpleGeometry, {}); voidValue = view.fit(extent); +voidValue = view.fit(extent, {}); voidValue = view.fit(extent, {callback: () => {}}); voidValue = view.fit(extent, {callback: (animationCompleted: boolean) => {}}); +voidValue = view.fit(extent, { + size: size, + padding: [numberValue, numberValue, numberValue, numberValue], + constrainResolution: booleanValue, + nearest: booleanValue, + minResolution: numberValue, + maxZoom: numberValue, + duration: numberValue, + easing: easingFunction, + callback: (animationCompleted: boolean) => {} +}); +booleanValue = view.getAnimating(); +coordinate = view.getCenter(); +booleanValue = view.getInteracting(); +numberValue = view.getMaxResolution(); +numberValue = view.getMaxZoom(); +numberValue = view.getMinResolution(); +numberValue = view.getMinZoom(); +projection = view.getProjection(); +numberValue = view.getResolution(); +numberValue = view.getResolutionForExtent(extent); +numberValue = view.getResolutionForExtent(extent, size); +numberValue = view.getResolutionForZoom(numberValue); +[numberValue, numberValue, numberValue, numberValue, numberValue] = view.getResolutions(); +numberValue = view.getRotation(); +numberValue = view.getZoom(); +numberValue = view.getZoomForResolution(numberValue); +voidValue = view.rotate(numberValue); +voidValue = view.rotate(numberValue, coordinate); +voidValue = view.setCenter(coordinate); +voidValue = view.setMaxZoom(numberValue); +voidValue = view.setMinZoom(numberValue); +voidValue = view.setResolution(); +voidValue = view.setResolution(numberValue); +voidValue = view.setRotation(numberValue); +voidValue = view.setZoom(numberValue); // // ol.layer.Base @@ -468,6 +549,7 @@ let vectorTileLayer: ol.layer.VectorTile = new ol.layer.VectorTile({ zIndex: 2 }); + // // ol.Object // diff --git a/types/openlayers/tsconfig.json b/types/openlayers/tsconfig.json index 5b45cb31b9..3bc277ecae 100644 --- a/types/openlayers/tsconfig.json +++ b/types/openlayers/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/openlayers/v2/tsconfig.json b/types/openlayers/v2/tsconfig.json index 67c0f29fd4..3725c17b1f 100644 --- a/types/openlayers/v2/tsconfig.json +++ b/types/openlayers/v2/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/openlayers/v3/tsconfig.json b/types/openlayers/v3/tsconfig.json index 052323b232..40f3d72c1a 100644 --- a/types/openlayers/v3/tsconfig.json +++ b/types/openlayers/v3/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/openpgp/tsconfig.json b/types/openpgp/tsconfig.json index 8ed156faf3..0d89f5cddd 100644 --- a/types/openpgp/tsconfig.json +++ b/types/openpgp/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/openstack-wrapper/tsconfig.json b/types/openstack-wrapper/tsconfig.json index f6fa4b227b..42501aaebd 100644 --- a/types/openstack-wrapper/tsconfig.json +++ b/types/openstack-wrapper/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/opentok/tsconfig.json b/types/opentok/tsconfig.json index 0e035c2a4c..867816c287 100644 --- a/types/opentok/tsconfig.json +++ b/types/opentok/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/opentype.js/tsconfig.json b/types/opentype.js/tsconfig.json index ae36366993..20de3c612b 100644 --- a/types/opentype.js/tsconfig.json +++ b/types/opentype.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/openui5/tsconfig.json b/types/openui5/tsconfig.json index e61a38f38c..406a9171dd 100644 --- a/types/openui5/tsconfig.json +++ b/types/openui5/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/opn/tsconfig.json b/types/opn/tsconfig.json index 2a51fff8ca..dc544741ee 100644 --- a/types/opn/tsconfig.json +++ b/types/opn/tsconfig.json @@ -1,16 +1,24 @@ { "compilerOptions": { "module": "commonjs", - "lib": ["es6"], + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, - "files": ["index.d.ts", "opn-tests.ts"] -} + "files": [ + "index.d.ts", + "opn-tests.ts" + ] +} \ No newline at end of file diff --git a/types/optics-agent/optics-agent-tests.ts b/types/optics-agent/optics-agent-tests.ts index 2135c810d4..22b9b479e9 100644 --- a/types/optics-agent/optics-agent-tests.ts +++ b/types/optics-agent/optics-agent-tests.ts @@ -9,9 +9,9 @@ import OpticsAgent, { Agent, } from 'optics-agent'; import { GraphQLSchema } from 'graphql'; -import * as express from 'express'; +import express = require('express'); import * as hapi from 'hapi'; -import * as KoaServer from 'koa'; +import KoaServer = require('koa'); const configOptions: Options = { apiKey: "", diff --git a/types/optics-agent/tsconfig.json b/types/optics-agent/tsconfig.json index e7dbc8958b..adb6fdbba4 100644 --- a/types/optics-agent/tsconfig.json +++ b/types/optics-agent/tsconfig.json @@ -14,13 +14,16 @@ ], "types": [], "paths": { - "boom": ["boom/v4"] + "boom": [ + "boom/v4" + ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "optics-agent-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/optimist/tsconfig.json b/types/optimist/tsconfig.json index da5b6d43c7..f16b4b49e4 100644 --- a/types/optimist/tsconfig.json +++ b/types/optimist/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/optimize-css-assets-webpack-plugin/optimize-css-assets-webpack-plugin-tests.ts b/types/optimize-css-assets-webpack-plugin/optimize-css-assets-webpack-plugin-tests.ts index 74cf685649..0dd1531313 100644 --- a/types/optimize-css-assets-webpack-plugin/optimize-css-assets-webpack-plugin-tests.ts +++ b/types/optimize-css-assets-webpack-plugin/optimize-css-assets-webpack-plugin-tests.ts @@ -1,4 +1,4 @@ -import * as OptimizeCssAssets from 'optimize-css-assets-webpack-plugin'; +import OptimizeCssAssets = require('optimize-css-assets-webpack-plugin'); const ocap: OptimizeCssAssets = new OptimizeCssAssets({ assetNameRegExp: /\.min\.css$/, diff --git a/types/optimize-css-assets-webpack-plugin/tsconfig.json b/types/optimize-css-assets-webpack-plugin/tsconfig.json index bb2c39172f..5420b382e4 100644 --- a/types/optimize-css-assets-webpack-plugin/tsconfig.json +++ b/types/optimize-css-assets-webpack-plugin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ora/tsconfig.json b/types/ora/tsconfig.json index 4092876efe..2480951ab5 100644 --- a/types/ora/tsconfig.json +++ b/types/ora/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ora/v0/tsconfig.json b/types/ora/v0/tsconfig.json index b614f6cbc4..d8ac13a91d 100644 --- a/types/ora/v0/tsconfig.json +++ b/types/ora/v0/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/oracledb/tsconfig.json b/types/oracledb/tsconfig.json index 2e6eeb9b95..7a878379cd 100644 --- a/types/oracledb/tsconfig.json +++ b/types/oracledb/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/orchestrator/tsconfig.json b/types/orchestrator/tsconfig.json index 3cfb6b0cdb..1da510b3ca 100644 --- a/types/orchestrator/tsconfig.json +++ b/types/orchestrator/tsconfig.json @@ -15,7 +15,8 @@ "strictNullChecks": false, "strictFunctionTypes": true, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/orderedmap/tsconfig.json b/types/orderedmap/tsconfig.json index d8428d94cc..5ab20ebbc3 100644 --- a/types/orderedmap/tsconfig.json +++ b/types/orderedmap/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/orientjs/orientjs-tests.ts b/types/orientjs/orientjs-tests.ts index ec083b84e3..9b11968058 100644 --- a/types/orientjs/orientjs-tests.ts +++ b/types/orientjs/orientjs-tests.ts @@ -1,4 +1,4 @@ -import * as orientjs from 'orientjs'; +import orientjs = require('orientjs'); const dbserver = orientjs({ host: 'localhost', diff --git a/types/orientjs/tsconfig.json b/types/orientjs/tsconfig.json index 87bfdfd2a8..a8418ce64b 100644 --- a/types/orientjs/tsconfig.json +++ b/types/orientjs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/os-homedir/tsconfig.json b/types/os-homedir/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/os-homedir/tsconfig.json +++ b/types/os-homedir/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/os-locale/tsconfig.json b/types/os-locale/tsconfig.json index fbf08733cf..6e168a01ce 100644 --- a/types/os-locale/tsconfig.json +++ b/types/os-locale/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/os-locale/v1/tsconfig.json b/types/os-locale/v1/tsconfig.json index acb67ee603..c53210a218 100644 --- a/types/os-locale/v1/tsconfig.json +++ b/types/os-locale/v1/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/os-name/tsconfig.json b/types/os-name/tsconfig.json index f48355e962..9220809237 100644 --- a/types/os-name/tsconfig.json +++ b/types/os-name/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/os-tmpdir/tsconfig.json b/types/os-tmpdir/tsconfig.json index abf333c6bf..3d2df78db9 100644 --- a/types/os-tmpdir/tsconfig.json +++ b/types/os-tmpdir/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/osmosis/tsconfig.json b/types/osmosis/tsconfig.json index 9627f6d5fe..f5eb196c89 100644 --- a/types/osmosis/tsconfig.json +++ b/types/osmosis/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/osmtogeojson/tsconfig.json b/types/osmtogeojson/tsconfig.json index c50e45768c..e708a2429b 100644 --- a/types/osmtogeojson/tsconfig.json +++ b/types/osmtogeojson/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/osrm/osrm-tests.ts b/types/osrm/osrm-tests.ts index fd53363dd7..513e8c1fd2 100644 --- a/types/osrm/osrm-tests.ts +++ b/types/osrm/osrm-tests.ts @@ -1,5 +1,5 @@ import * as fs from 'fs'; -import * as OSRM from 'osrm'; +import OSRM = require('osrm'); // Access to Types from namespace const tile: OSRM.Tile = [0, 0, 0]; diff --git a/types/osrm/tsconfig.json b/types/osrm/tsconfig.json index 8a581c7423..3ebd7db8b3 100644 --- a/types/osrm/tsconfig.json +++ b/types/osrm/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/otplib/tsconfig.json b/types/otplib/tsconfig.json index cfb2b07081..2b3c420d67 100644 --- a/types/otplib/tsconfig.json +++ b/types/otplib/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "otplib-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/owasp-password-strength-test/tsconfig.json b/types/owasp-password-strength-test/tsconfig.json index 0206d30034..d10909118e 100644 --- a/types/owasp-password-strength-test/tsconfig.json +++ b/types/owasp-password-strength-test/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "owasp-password-strength-test-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/owl.carousel/tsconfig.json b/types/owl.carousel/tsconfig.json index 4205eff11f..fb9f9f4f6e 100644 --- a/types/owl.carousel/tsconfig.json +++ b/types/owl.carousel/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/owlcarousel/tsconfig.json b/types/owlcarousel/tsconfig.json index 4438ba88ae..db23d47838 100644 --- a/types/owlcarousel/tsconfig.json +++ b/types/owlcarousel/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-all/tsconfig.json b/types/p-all/tsconfig.json index 5cc346c4e3..5d706ed217 100644 --- a/types/p-all/tsconfig.json +++ b/types/p-all/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-any/tsconfig.json b/types/p-any/tsconfig.json index 67d983361a..56f19a51e5 100644 --- a/types/p-any/tsconfig.json +++ b/types/p-any/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-cancelable/tsconfig.json b/types/p-cancelable/tsconfig.json index 504511081d..eb9e9b9b33 100644 --- a/types/p-cancelable/tsconfig.json +++ b/types/p-cancelable/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-debounce/tsconfig.json b/types/p-debounce/tsconfig.json index 4de0f115d8..d8f3a41d21 100644 --- a/types/p-debounce/tsconfig.json +++ b/types/p-debounce/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-defer/tsconfig.json b/types/p-defer/tsconfig.json index 06eb650dbe..d48a07b169 100644 --- a/types/p-defer/tsconfig.json +++ b/types/p-defer/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-do-whilst/tsconfig.json b/types/p-do-whilst/tsconfig.json index 87392769da..fa551d6727 100644 --- a/types/p-do-whilst/tsconfig.json +++ b/types/p-do-whilst/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-each-series/tsconfig.json b/types/p-each-series/tsconfig.json index e8cd900d05..d62549d651 100644 --- a/types/p-each-series/tsconfig.json +++ b/types/p-each-series/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-event/tsconfig.json b/types/p-event/tsconfig.json index 0e047aa84b..8d282c8736 100644 --- a/types/p-event/tsconfig.json +++ b/types/p-event/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-every/tsconfig.json b/types/p-every/tsconfig.json index 979927093f..87b3f1c968 100644 --- a/types/p-every/tsconfig.json +++ b/types/p-every/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-lazy/tsconfig.json b/types/p-lazy/tsconfig.json index 73b2e31142..24a3174936 100644 --- a/types/p-lazy/tsconfig.json +++ b/types/p-lazy/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-limit/tsconfig.json b/types/p-limit/tsconfig.json index 4634bf6300..e438eda453 100644 --- a/types/p-limit/tsconfig.json +++ b/types/p-limit/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-loading/tsconfig.json b/types/p-loading/tsconfig.json index 3aeb261695..fa6843d54f 100644 --- a/types/p-loading/tsconfig.json +++ b/types/p-loading/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "p-loading-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/p-locate/tsconfig.json b/types/p-locate/tsconfig.json index 1f3e8a7711..794031a75b 100644 --- a/types/p-locate/tsconfig.json +++ b/types/p-locate/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-log/tsconfig.json b/types/p-log/tsconfig.json index 891d94fce3..1d875c64b1 100644 --- a/types/p-log/tsconfig.json +++ b/types/p-log/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-map-series/tsconfig.json b/types/p-map-series/tsconfig.json index b06e222983..6594c24661 100644 --- a/types/p-map-series/tsconfig.json +++ b/types/p-map-series/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-map/tsconfig.json b/types/p-map/tsconfig.json index ed62309b29..d156c77951 100644 --- a/types/p-map/tsconfig.json +++ b/types/p-map/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-one/tsconfig.json b/types/p-one/tsconfig.json index 27a6a05ac7..525393d638 100644 --- a/types/p-one/tsconfig.json +++ b/types/p-one/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-props/tsconfig.json b/types/p-props/tsconfig.json index 8ef73ae141..56998f169a 100644 --- a/types/p-props/tsconfig.json +++ b/types/p-props/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-queue/tsconfig.json b/types/p-queue/tsconfig.json index b3dd5e5314..dd19b0083f 100644 --- a/types/p-queue/tsconfig.json +++ b/types/p-queue/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-reduce/tsconfig.json b/types/p-reduce/tsconfig.json index d06d04e5e7..2debc8d66f 100644 --- a/types/p-reduce/tsconfig.json +++ b/types/p-reduce/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-reflect/tsconfig.json b/types/p-reflect/tsconfig.json index 0bd514215f..b7c6dc1702 100644 --- a/types/p-reflect/tsconfig.json +++ b/types/p-reflect/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-retry/tsconfig.json b/types/p-retry/tsconfig.json index 8bd6ddd6b5..21687875fa 100644 --- a/types/p-retry/tsconfig.json +++ b/types/p-retry/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-series/tsconfig.json b/types/p-series/tsconfig.json index 7ac0ed4d4c..45a2be71c5 100644 --- a/types/p-series/tsconfig.json +++ b/types/p-series/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-settle/tsconfig.json b/types/p-settle/tsconfig.json index ba288104e0..1e8220467f 100644 --- a/types/p-settle/tsconfig.json +++ b/types/p-settle/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-some/tsconfig.json b/types/p-some/tsconfig.json index d8bca7e13a..d6e4b1b63e 100644 --- a/types/p-some/tsconfig.json +++ b/types/p-some/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-tap/tsconfig.json b/types/p-tap/tsconfig.json index 1d4042647f..ed4f136d0b 100644 --- a/types/p-tap/tsconfig.json +++ b/types/p-tap/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-throttle/tsconfig.json b/types/p-throttle/tsconfig.json index 81852e4d18..f30c9ed4e3 100644 --- a/types/p-throttle/tsconfig.json +++ b/types/p-throttle/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-timeout/tsconfig.json b/types/p-timeout/tsconfig.json index d16042504a..40bb9b3b8b 100644 --- a/types/p-timeout/tsconfig.json +++ b/types/p-timeout/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-try/tsconfig.json b/types/p-try/tsconfig.json index b8ca67f073..7cd170e0da 100644 --- a/types/p-try/tsconfig.json +++ b/types/p-try/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-wait-for/tsconfig.json b/types/p-wait-for/tsconfig.json index 7df0af64a1..e3e3bb7597 100644 --- a/types/p-wait-for/tsconfig.json +++ b/types/p-wait-for/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p-whilst/tsconfig.json b/types/p-whilst/tsconfig.json index 3309a228fc..8fd1bb42ba 100644 --- a/types/p-whilst/tsconfig.json +++ b/types/p-whilst/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/p2/tsconfig.json b/types/p2/tsconfig.json index c40f2ddd89..576a91b7c6 100644 --- a/types/p2/tsconfig.json +++ b/types/p2/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/package-json/tsconfig.json b/types/package-json/tsconfig.json index 52c1adb7d3..c033223c6d 100644 --- a/types/package-json/tsconfig.json +++ b/types/package-json/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "package-json-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/packery/tsconfig.json b/types/packery/tsconfig.json index 85c7e3ae6a..3e17d32ee6 100644 --- a/types/packery/tsconfig.json +++ b/types/packery/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pad/tsconfig.json b/types/pad/tsconfig.json index 6a6ef6d4c7..fd8ce70400 100644 --- a/types/pad/tsconfig.json +++ b/types/pad/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/page-icon/page-icon-tests.ts b/types/page-icon/page-icon-tests.ts index 4a6bc8c2b6..2b2873dae1 100644 --- a/types/page-icon/page-icon-tests.ts +++ b/types/page-icon/page-icon-tests.ts @@ -1,4 +1,4 @@ -import * as pageIcon from "page-icon"; +import pageIcon = require("page-icon"); const siteUrl = "https://www.facebook.com/"; pageIcon(siteUrl) diff --git a/types/page-icon/tsconfig.json b/types/page-icon/tsconfig.json index f5dc72cbcd..143c1b0232 100644 --- a/types/page-icon/tsconfig.json +++ b/types/page-icon/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/page/tsconfig.json b/types/page/tsconfig.json index 3a774901be..f3ffce244f 100644 --- a/types/page/tsconfig.json +++ b/types/page/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/paho-mqtt/tsconfig.json b/types/paho-mqtt/tsconfig.json index 7e9a7ce4e6..f08ccecb7a 100644 --- a/types/paho-mqtt/tsconfig.json +++ b/types/paho-mqtt/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pako/tsconfig.json b/types/pako/tsconfig.json index 011a39c83c..b1e866a0a9 100644 --- a/types/pako/tsconfig.json +++ b/types/pako/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pangu/tsconfig.json b/types/pangu/tsconfig.json index a1084b5b06..83ce22a7b2 100644 --- a/types/pangu/tsconfig.json +++ b/types/pangu/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "pangu-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/papaparse/tsconfig.json b/types/papaparse/tsconfig.json index 1684012a56..80238273d7 100644 --- a/types/papaparse/tsconfig.json +++ b/types/papaparse/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/paper/index.d.ts b/types/paper/index.d.ts index 5bd4315bfd..3f57526a19 100644 --- a/types/paper/index.d.ts +++ b/types/paper/index.d.ts @@ -3237,6 +3237,16 @@ declare module paper { * Deselects all selected items in the project. */ deselectAll(): void; + + /** + * Adds the specified layer at the end of the this project’s layers list. + */ + addLayer(layer: Layer): Layer; + + /** + * Inserts the specified layer at the specified index in this project’s layers list. + */ + insertLayer(index: number, layer: Layer): Layer; /** * Perform a hit-test on the items contained within the project at the location of the specified point. diff --git a/types/paper/tsconfig.json b/types/paper/tsconfig.json index ba81ca6cf0..6f21980e93 100644 --- a/types/paper/tsconfig.json +++ b/types/paper/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/paralleljs/tsconfig.json b/types/paralleljs/tsconfig.json index 0cea925bbd..d074b65fd1 100644 --- a/types/paralleljs/tsconfig.json +++ b/types/paralleljs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/parent-package-json/tsconfig.json b/types/parent-package-json/tsconfig.json index 33d474c851..b07b7e1918 100644 --- a/types/parent-package-json/tsconfig.json +++ b/types/parent-package-json/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "parent-package-json-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/parse-git-config/tsconfig.json b/types/parse-git-config/tsconfig.json index 5295cbc1ee..ec4ea443ed 100644 --- a/types/parse-git-config/tsconfig.json +++ b/types/parse-git-config/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/parse-glob/tsconfig.json b/types/parse-glob/tsconfig.json index 0f620fa4e7..62c72fdf23 100644 --- a/types/parse-glob/tsconfig.json +++ b/types/parse-glob/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/parse-json/tsconfig.json b/types/parse-json/tsconfig.json index 448f6787ba..153bd71944 100644 --- a/types/parse-json/tsconfig.json +++ b/types/parse-json/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "parse-json-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/parse-link-header/tsconfig.json b/types/parse-link-header/tsconfig.json index 82b1addcbd..7156e907bc 100644 --- a/types/parse-link-header/tsconfig.json +++ b/types/parse-link-header/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/parse-mockdb/tsconfig.json b/types/parse-mockdb/tsconfig.json index 47ec90a997..9990f2ee1e 100644 --- a/types/parse-mockdb/tsconfig.json +++ b/types/parse-mockdb/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/parse-ms/tsconfig.json b/types/parse-ms/tsconfig.json index 3fecf7615f..28c9a4810e 100644 --- a/types/parse-ms/tsconfig.json +++ b/types/parse-ms/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "parse-ms-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/parse-torrent-file/parse-torrent-file-tests.ts b/types/parse-torrent-file/parse-torrent-file-tests.ts index a981c0bc81..43b8c7d0fd 100644 --- a/types/parse-torrent-file/parse-torrent-file-tests.ts +++ b/types/parse-torrent-file/parse-torrent-file-tests.ts @@ -1,4 +1,4 @@ -import * as parseTorrentFile from 'parse-torrent-file'; +import parseTorrentFile = require('parse-torrent-file'); import * as fs from 'fs'; const torrent = fs.readFileSync(__filename); diff --git a/types/parse-torrent-file/tsconfig.json b/types/parse-torrent-file/tsconfig.json index dcd42f04f0..bce67a0d57 100644 --- a/types/parse-torrent-file/tsconfig.json +++ b/types/parse-torrent-file/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/parse-torrent/index.d.ts b/types/parse-torrent/index.d.ts index c6bd901976..9b410759a3 100644 --- a/types/parse-torrent/index.d.ts +++ b/types/parse-torrent/index.d.ts @@ -5,7 +5,7 @@ /// -import * as MagnetUri from 'magnet-uri'; +import MagnetUri = require('magnet-uri'); import * as ParseTorrentFile from 'parse-torrent-file'; declare const ParseTorrent: ParseTorrent.ParseTorrent; diff --git a/types/parse-torrent/parse-torrent-tests.ts b/types/parse-torrent/parse-torrent-tests.ts index 24d00dbe98..c2676ff080 100644 --- a/types/parse-torrent/parse-torrent-tests.ts +++ b/types/parse-torrent/parse-torrent-tests.ts @@ -1,4 +1,4 @@ -import * as parseTorrent from 'parse-torrent'; +import parseTorrent = require('parse-torrent'); import * as fs from 'fs'; // info hash (as a hex string) diff --git a/types/parse-torrent/tsconfig.json b/types/parse-torrent/tsconfig.json index 1a2750195a..f82d5a8bfc 100644 --- a/types/parse-torrent/tsconfig.json +++ b/types/parse-torrent/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/parse-unit/tsconfig.json b/types/parse-unit/tsconfig.json index 081dcee45d..3257f3b69e 100644 --- a/types/parse-unit/tsconfig.json +++ b/types/parse-unit/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/parse/tsconfig.json b/types/parse/tsconfig.json index 53ec60085d..8e41c1dede 100644 --- a/types/parse/tsconfig.json +++ b/types/parse/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/parseurl/tsconfig.json b/types/parseurl/tsconfig.json index f47e85f978..4f7ce9cbac 100644 --- a/types/parseurl/tsconfig.json +++ b/types/parseurl/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/parsimmon/tsconfig.json b/types/parsimmon/tsconfig.json index 676b349a37..6e85d7e3ca 100644 --- a/types/parsimmon/tsconfig.json +++ b/types/parsimmon/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "parsimmon-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/passport-anonymous/tsconfig.json b/types/passport-anonymous/tsconfig.json index 1d8859e706..b667acd694 100644 --- a/types/passport-anonymous/tsconfig.json +++ b/types/passport-anonymous/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-beam/tsconfig.json b/types/passport-beam/tsconfig.json index 7b3fc8e513..bb65e62fbc 100644 --- a/types/passport-beam/tsconfig.json +++ b/types/passport-beam/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-discord/tsconfig.json b/types/passport-discord/tsconfig.json index 38a8051fb9..dcb1ac3502 100644 --- a/types/passport-discord/tsconfig.json +++ b/types/passport-discord/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-facebook-token/passport-facebook-token-tests.ts b/types/passport-facebook-token/passport-facebook-token-tests.ts index c926748286..1539118879 100644 --- a/types/passport-facebook-token/passport-facebook-token-tests.ts +++ b/types/passport-facebook-token/passport-facebook-token-tests.ts @@ -1,6 +1,6 @@ import * as express from 'express'; import * as passport from 'passport'; -import * as PassportFacebookToken from 'passport-facebook-token'; +import PassportFacebookToken = require('passport-facebook-token'); const User = { findOrCreate(id: string, provider: string, callback: (err: any, user: any) => void): void { diff --git a/types/passport-facebook-token/tsconfig.json b/types/passport-facebook-token/tsconfig.json index e1d020177a..2b877f282b 100644 --- a/types/passport-facebook-token/tsconfig.json +++ b/types/passport-facebook-token/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-facebook/tsconfig.json b/types/passport-facebook/tsconfig.json index dcc610efec..9153763af2 100644 --- a/types/passport-facebook/tsconfig.json +++ b/types/passport-facebook/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-github/tsconfig.json b/types/passport-github/tsconfig.json index 0e7ac43e0e..deac088de3 100644 --- a/types/passport-github/tsconfig.json +++ b/types/passport-github/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-github2/tsconfig.json b/types/passport-github2/tsconfig.json index ae03d3bb32..ec58c6f1da 100644 --- a/types/passport-github2/tsconfig.json +++ b/types/passport-github2/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-google-oauth/tsconfig.json b/types/passport-google-oauth/tsconfig.json index 7f3b315c07..ef36d15b4a 100644 --- a/types/passport-google-oauth/tsconfig.json +++ b/types/passport-google-oauth/tsconfig.json @@ -1,16 +1,24 @@ { "compilerOptions": { "module": "commonjs", - "lib": ["es6"], + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, "strictFunctionTypes": true, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, - "files": ["index.d.ts", "passport-google-oauth-tests.ts"] -} + "files": [ + "index.d.ts", + "passport-google-oauth-tests.ts" + ] +} \ No newline at end of file diff --git a/types/passport-google-oauth2/tsconfig.json b/types/passport-google-oauth2/tsconfig.json index ee60531f41..7c144ffdff 100644 --- a/types/passport-google-oauth2/tsconfig.json +++ b/types/passport-google-oauth2/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-http-bearer/tsconfig.json b/types/passport-http-bearer/tsconfig.json index b6033075ab..6ae99f8758 100644 --- a/types/passport-http-bearer/tsconfig.json +++ b/types/passport-http-bearer/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-http/index.d.ts b/types/passport-http/index.d.ts index e9a66964ea..458e5f2076 100644 --- a/types/passport-http/index.d.ts +++ b/types/passport-http/index.d.ts @@ -1,60 +1,69 @@ -// Type definitions for passport-http 0.3.0 +// Type definitions for passport-http 0.3 // Project: https://github.com/jaredhanson/passport-http // Definitions by: Christophe Vidal +// Tomek Łaziuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 import passport = require("passport"); import express = require("express"); -interface BasicStrategyOptions { +export interface BasicStrategyOptions { realm?: string; - passReqToCallback?: boolean; + passReqToCallback?: req; } -interface DigestStrategyOptions { +export interface DigestStrategyOptions { realm?: string; - domain?: string | Array; + domain?: string | string[]; opaque?: string; algorithm?: string; - qop?: string | Array; + qop?: string | string[]; } -interface DigestValidateOptions { +export interface DigestValidateOptions { nonce: string; cnonce: string; nc: number; opaque: string; } -interface BasicVerifyFunction { - (username: string, password: string, done: (error: any, user?: any) => void): void; -} +export type BasicVerifyFunction = ( + username: string, + password: string, + done: (error: any, user?: any) => void, +) => any; -interface BasicVerifyFunctionWithRequest { - (req: express.Request, username: string, password: string, done: (error: any, user?: any) => void): void; -} +export type BasicVerifyFunctionWithRequest = ( + req: express.Request, + username: string, + password: string, + done: (error: any, user?: any) => void, +) => any; -interface DigestSecretFunction { - (username: string, done: (error: any, user?: any, password?: any) => void): void; -} +export type DigestSecretFunction = ( + username: string, + done: (error: any, user?: any, password?: any) => void, +) => any; -interface DigestValidateFunction { - (params: DigestValidateOptions, done: (error: any, valid: boolean) => void): void; -} +export type DigestValidateFunction = ( + params: DigestValidateOptions, + done: (error: any, valid: boolean) => void, +) => any; -declare class BasicStrategy implements passport.Strategy { +export class BasicStrategy implements passport.Strategy { constructor(verify: BasicVerifyFunction); - constructor(options: BasicStrategyOptions, verify: BasicVerifyFunction); + constructor(options: BasicStrategyOptions, verify: BasicVerifyFunction); + constructor(options: BasicStrategyOptions, verify: BasicVerifyFunctionWithRequest); name: string; - authenticate: (req: express.Request, options?: Object) => void; + authenticate: (req: express.Request, options?: object) => void; } -declare class DigestStrategy implements passport.Strategy { +export class DigestStrategy implements passport.Strategy { constructor(secret: DigestSecretFunction, validate?: DigestValidateFunction); constructor(options: DigestStrategyOptions, secret: DigestSecretFunction, validate?: DigestValidateFunction); name: string; - authenticate: (req: express.Request, options?: Object) => void; + authenticate: (req: express.Request, options?: object) => void; } diff --git a/types/passport-http/passport-http-tests.ts b/types/passport-http/passport-http-tests.ts index 4a70d30b89..396138b466 100644 --- a/types/passport-http/passport-http-tests.ts +++ b/types/passport-http/passport-http-tests.ts @@ -5,15 +5,15 @@ import passport = require("passport"); import http = require("passport-http"); -interface IUser { +interface UserInterface { username: string; password?: string; } class User { - public password: string; + password: string; - static findOne(user: IUser, callback: (error: Error, user: User) => void): void { + static findOne(user: UserInterface, callback: (error: Error, user: User) => void): void { callback(null, new User()); } } @@ -24,17 +24,19 @@ function validateNonce(nonce: string) { function validateParams(nonce: string, cnonce: string, nc: number, opaque: string) { } -passport.use(new http.BasicStrategy((username: string, password: string, done: any) => { +passport.use(new http.BasicStrategy((username, password, done) => { User.findOne({ - username: username, - password: password, + username, + password, }, (error, user) => { if (error) { - return done(error); + done(error); + return; } if (!user) { - return done(null, false); + done(null, false); + return; } done(null, user); @@ -44,25 +46,25 @@ passport.use(new http.BasicStrategy((username: string, password: string, done: a passport.use(new http.BasicStrategy({ realm: "User", passReqToCallback: true, -}, (username: string, password: string, done: any) => { - User.findOne({ - username: username, - password: password, - }, (error, user) => { - if (error) { - return done(error); - } +}, (req, username, password, done) => { + // with req when needed +})); - if (!user) { - return done(null, false); - } +passport.use(new http.BasicStrategy({ + realm: "User", +}, (username, password, done) => { + // without req by default +})); - done(null, user); - }); +passport.use(new http.BasicStrategy({ + realm: "User", + passReqToCallback: false, +}, (username, password, done) => { + // without req })); passport.use(new http.DigestStrategy((username: string, done: any) => { - User.findOne({username: username}, (error, user) => { + User.findOne({ username }, (error, user) => { if (error) { return done(error); } @@ -76,7 +78,7 @@ passport.use(new http.DigestStrategy((username: string, done: any) => { })); passport.use(new http.DigestStrategy((username: string, done: any) => { - User.findOne({username: username}, (error, user) => { + User.findOne({ username }, (error, user) => { if (error) { return done(error); } @@ -99,7 +101,7 @@ passport.use(new http.DigestStrategy({ algorithm: "MD5", qop: "auth", }, (username: string, done: any) => { - User.findOne({username: username}, (error, user) => { + User.findOne({ username }, (error, user) => { if (error) { return done(error); } @@ -119,7 +121,7 @@ passport.use(new http.DigestStrategy({ algorithm: "MD5", qop: "auth", }, (username: string, done: any) => { - User.findOne({username: username}, (error, user) => { + User.findOne({ username }, (error, user) => { if (error) { return done(error); } diff --git a/types/passport-http/tsconfig.json b/types/passport-http/tsconfig.json index d1a35a3390..e158bcb014 100644 --- a/types/passport-http/tsconfig.json +++ b/types/passport-http/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-http/tslint.json b/types/passport-http/tslint.json index a41bf5d19a..f93cf8562a 100644 --- a/types/passport-http/tslint.json +++ b/types/passport-http/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/passport-jwt/index.d.ts b/types/passport-jwt/index.d.ts index c300276fe2..0a71c4b725 100644 --- a/types/passport-jwt/index.d.ts +++ b/types/passport-jwt/index.d.ts @@ -4,11 +4,13 @@ // Alex Young // David Ng // Carlos Eduardo Scheffer +// Byungjin Kim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 import { Strategy as PassportStrategy } from 'passport-strategy'; import {Request} from 'express'; +import { VerifyOptions } from 'jsonwebtoken' export declare class Strategy extends PassportStrategy { constructor(opt: StrategyOptions, verify: VerifyCallback); @@ -24,6 +26,7 @@ export interface StrategyOptions { algorithms?: string[]; ignoreExpiration?: boolean; passReqToCallback?: boolean; + jsonWebTokenOptions?: VerifyOptions; } export interface VerifyCallback { diff --git a/types/passport-jwt/tsconfig.json b/types/passport-jwt/tsconfig.json index 906f33004d..6170656dd1 100644 --- a/types/passport-jwt/tsconfig.json +++ b/types/passport-jwt/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-kakao/tsconfig.json b/types/passport-kakao/tsconfig.json index 784cbe32e8..0657b076b8 100644 --- a/types/passport-kakao/tsconfig.json +++ b/types/passport-kakao/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "passport-kakao-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/passport-local-mongoose/passport-local-mongoose-tests.ts b/types/passport-local-mongoose/passport-local-mongoose-tests.ts index 63c82a9913..5058cb88ef 100644 --- a/types/passport-local-mongoose/passport-local-mongoose-tests.ts +++ b/types/passport-local-mongoose/passport-local-mongoose-tests.ts @@ -1,5 +1,3 @@ -/// - /** * Created by Linus Brolin . */ @@ -14,7 +12,7 @@ import { PassportLocalOptions, PassportLocalErrorMessages } from 'mongoose'; -import * as passportLocalMongoose from 'passport-local-mongoose'; +import passportLocalMongoose = require('passport-local-mongoose'); import { Router, Request, Response } from 'express'; import * as passport from 'passport'; diff --git a/types/passport-local-mongoose/tsconfig.json b/types/passport-local-mongoose/tsconfig.json index c0806a2177..6ba09ff095 100644 --- a/types/passport-local-mongoose/tsconfig.json +++ b/types/passport-local-mongoose/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-local/tsconfig.json b/types/passport-local/tsconfig.json index 340ecca02d..fa2f7824d5 100644 --- a/types/passport-local/tsconfig.json +++ b/types/passport-local/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-naver/tsconfig.json b/types/passport-naver/tsconfig.json index 1a8826dcfd..e09b5e2a55 100644 --- a/types/passport-naver/tsconfig.json +++ b/types/passport-naver/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "passport-naver-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/passport-oauth2-client-password/tsconfig.json b/types/passport-oauth2-client-password/tsconfig.json index e7cc4cc177..19cc572681 100644 --- a/types/passport-oauth2-client-password/tsconfig.json +++ b/types/passport-oauth2-client-password/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-oauth2/tsconfig.json b/types/passport-oauth2/tsconfig.json index 5e71cf6328..cc083b7bf7 100644 --- a/types/passport-oauth2/tsconfig.json +++ b/types/passport-oauth2/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-saml/tsconfig.json b/types/passport-saml/tsconfig.json index 0809dbbaf7..f7e6b952d4 100644 --- a/types/passport-saml/tsconfig.json +++ b/types/passport-saml/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-steam/tsconfig.json b/types/passport-steam/tsconfig.json index 94a0d709a4..618ce103d0 100644 --- a/types/passport-steam/tsconfig.json +++ b/types/passport-steam/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-strategy/tsconfig.json b/types/passport-strategy/tsconfig.json index b9d033a50e..912569eef3 100644 --- a/types/passport-strategy/tsconfig.json +++ b/types/passport-strategy/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-twitter/tsconfig.json b/types/passport-twitter/tsconfig.json index 4034aa5640..94c7367c2e 100644 --- a/types/passport-twitter/tsconfig.json +++ b/types/passport-twitter/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport-unique-token/tsconfig.json b/types/passport-unique-token/tsconfig.json index 405438dd5a..5c70a8debd 100644 --- a/types/passport-unique-token/tsconfig.json +++ b/types/passport-unique-token/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/passport/passport-tests.ts b/types/passport/passport-tests.ts index b6c033b907..58c306964c 100644 --- a/types/passport/passport-tests.ts +++ b/types/passport/passport-tests.ts @@ -1,5 +1,5 @@ import * as passport from 'passport'; -import * as express from 'express'; +import express = require('express'); import 'express-session'; class TestStrategy implements passport.Strategy { diff --git a/types/passport/tsconfig.json b/types/passport/tsconfig.json index 08fe485f60..085a0730d1 100644 --- a/types/passport/tsconfig.json +++ b/types/passport/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/password-hash-and-salt/tsconfig.json b/types/password-hash-and-salt/tsconfig.json index a2a0427f51..4269a10725 100644 --- a/types/password-hash-and-salt/tsconfig.json +++ b/types/password-hash-and-salt/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/password-hash/tsconfig.json b/types/password-hash/tsconfig.json index b0e161a8a2..a0fb6b0e8f 100644 --- a/types/password-hash/tsconfig.json +++ b/types/password-hash/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/path-exists/tsconfig.json b/types/path-exists/tsconfig.json index d9e230ee27..50ce9f3349 100644 --- a/types/path-exists/tsconfig.json +++ b/types/path-exists/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/path-exists/v1/tsconfig.json b/types/path-exists/v1/tsconfig.json index 3a52689e9c..f8059a64b7 100644 --- a/types/path-exists/v1/tsconfig.json +++ b/types/path-exists/v1/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/path-is-absolute/tsconfig.json b/types/path-is-absolute/tsconfig.json index c3b15bff95..63bd03ece3 100644 --- a/types/path-is-absolute/tsconfig.json +++ b/types/path-is-absolute/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/path-parse/path-parse-tests.ts b/types/path-parse/path-parse-tests.ts index da2b63f6b4..a632d768f1 100644 --- a/types/path-parse/path-parse-tests.ts +++ b/types/path-parse/path-parse-tests.ts @@ -1,4 +1,4 @@ -import * as parse from "path-parse"; +import parse = require("path-parse"); const parsed = parse("/foo/bar.img"); const { root, dir, base, ext, name } = parsed; diff --git a/types/path-parse/tsconfig.json b/types/path-parse/tsconfig.json index 9123b62477..e89835c7e5 100644 --- a/types/path-parse/tsconfig.json +++ b/types/path-parse/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pathfinding/tsconfig.json b/types/pathfinding/tsconfig.json index 0428d67daa..76d2cec85c 100644 --- a/types/pathfinding/tsconfig.json +++ b/types/pathfinding/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pathjs/tsconfig.json b/types/pathjs/tsconfig.json index 60a8aba82a..a8c29ed915 100644 --- a/types/pathjs/tsconfig.json +++ b/types/pathjs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pathwatcher/tsconfig.json b/types/pathwatcher/tsconfig.json index 41bb35a03c..3c46805477 100644 --- a/types/pathwatcher/tsconfig.json +++ b/types/pathwatcher/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "pathwatcher-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/pause/tsconfig.json b/types/pause/tsconfig.json index 76c0af48a3..14acafe4a9 100644 --- a/types/pause/tsconfig.json +++ b/types/pause/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/payment/tsconfig.json b/types/payment/tsconfig.json index 4f1166c44f..499c49ce64 100644 --- a/types/payment/tsconfig.json +++ b/types/payment/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/paypal-cordova-plugin/tsconfig.json b/types/paypal-cordova-plugin/tsconfig.json index 67ee653902..cddf3ab053 100644 --- a/types/paypal-cordova-plugin/tsconfig.json +++ b/types/paypal-cordova-plugin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/paypal-rest-sdk/tsconfig.json b/types/paypal-rest-sdk/tsconfig.json index 4e1922b8ba..4026071a14 100644 --- a/types/paypal-rest-sdk/tsconfig.json +++ b/types/paypal-rest-sdk/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pbf/tsconfig.json b/types/pbf/tsconfig.json index b9ec4bce50..c6bd76c88a 100644 --- a/types/pbf/tsconfig.json +++ b/types/pbf/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pdfjs-dist/tsconfig.json b/types/pdfjs-dist/tsconfig.json index d189de9f02..17f7d8cfca 100644 --- a/types/pdfjs-dist/tsconfig.json +++ b/types/pdfjs-dist/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pdfkit/tsconfig.json b/types/pdfkit/tsconfig.json index f14037a57f..490ef6e892 100644 --- a/types/pdfkit/tsconfig.json +++ b/types/pdfkit/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pdfobject/tsconfig.json b/types/pdfobject/tsconfig.json index 178c186ae8..dcb101218a 100644 --- a/types/pdfobject/tsconfig.json +++ b/types/pdfobject/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pebblekitjs/tsconfig.json b/types/pebblekitjs/tsconfig.json index e09e806e3b..fb45867efd 100644 --- a/types/pebblekitjs/tsconfig.json +++ b/types/pebblekitjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/peer-dial/peer-dial-tests.ts b/types/peer-dial/peer-dial-tests.ts index cb4238da62..6cc4376458 100644 --- a/types/peer-dial/peer-dial-tests.ts +++ b/types/peer-dial/peer-dial-tests.ts @@ -1,5 +1,5 @@ import { Server, Client, App, AppInfo, CorsOptions, ServerOptions, Delegate, DialDevice, DeviceInfo } from 'peer-dial'; -import * as express from 'express'; +import express = require('express'); class AppImpl implements App { name: string; diff --git a/types/peer-dial/tsconfig.json b/types/peer-dial/tsconfig.json index 4672562aef..f9ec138996 100644 --- a/types/peer-dial/tsconfig.json +++ b/types/peer-dial/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/peerjs/tsconfig.json b/types/peerjs/tsconfig.json index 41e815c2c3..7400e9a78c 100644 --- a/types/peerjs/tsconfig.json +++ b/types/peerjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pegjs/tsconfig.json b/types/pegjs/tsconfig.json index ea5f1cc8e4..49e431cdc2 100644 --- a/types/pegjs/tsconfig.json +++ b/types/pegjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pem/tsconfig.json b/types/pem/tsconfig.json index 509312522f..f7d45f9f7d 100644 --- a/types/pem/tsconfig.json +++ b/types/pem/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/persona/tsconfig.json b/types/persona/tsconfig.json index cadf2878fc..5726175930 100644 --- a/types/persona/tsconfig.json +++ b/types/persona/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pet-finder-api/tsconfig.json b/types/pet-finder-api/tsconfig.json index 66a88e70be..605722a75f 100644 --- a/types/pet-finder-api/tsconfig.json +++ b/types/pet-finder-api/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pg-ears/tsconfig.json b/types/pg-ears/tsconfig.json index a98396e776..3a5bd63fe8 100644 --- a/types/pg-ears/tsconfig.json +++ b/types/pg-ears/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pg-escape/pg-escape-tests.ts b/types/pg-escape/pg-escape-tests.ts index 36636cf0c2..87d70dbd9f 100644 --- a/types/pg-escape/pg-escape-tests.ts +++ b/types/pg-escape/pg-escape-tests.ts @@ -1,4 +1,4 @@ -import * as escape from 'pg-escape'; +import escape = require('pg-escape'); escape('INSERT INTO %I VALUES(%L)', 'books', "O'Reilly"); escape.string("ab'cd"); diff --git a/types/pg-escape/tsconfig.json b/types/pg-escape/tsconfig.json index b5afa8ea9a..a32fb19012 100644 --- a/types/pg-escape/tsconfig.json +++ b/types/pg-escape/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pg-pool/tsconfig.json b/types/pg-pool/tsconfig.json index 5381ba2842..ffc4440460 100644 --- a/types/pg-pool/tsconfig.json +++ b/types/pg-pool/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pg-query-stream/pg-query-stream-tests.ts b/types/pg-query-stream/pg-query-stream-tests.ts index 1df78ea648..dbf0b88d0b 100644 --- a/types/pg-query-stream/pg-query-stream-tests.ts +++ b/types/pg-query-stream/pg-query-stream-tests.ts @@ -1,4 +1,4 @@ -import * as QueryStream from 'pg-query-stream'; +import QueryStream = require('pg-query-stream'); import * as pg from 'pg'; const options: QueryStream.Options = { diff --git a/types/pg-query-stream/tsconfig.json b/types/pg-query-stream/tsconfig.json index 8137847846..d6da0a5ff2 100644 --- a/types/pg-query-stream/tsconfig.json +++ b/types/pg-query-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pg-types/tsconfig.json b/types/pg-types/tsconfig.json index 1ab38690e5..b8e5677970 100644 --- a/types/pg-types/tsconfig.json +++ b/types/pg-types/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pg/tsconfig.json b/types/pg/tsconfig.json index 92ec2db62b..a836da031a 100644 --- a/types/pg/tsconfig.json +++ b/types/pg/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pg/v6/tsconfig.json b/types/pg/v6/tsconfig.json index 4e12c2c891..6f8e496a3a 100644 --- a/types/pg/v6/tsconfig.json +++ b/types/pg/v6/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pgwmodal/tsconfig.json b/types/pgwmodal/tsconfig.json index 5ad4cd4a98..8b0d9007a5 100644 --- a/types/pgwmodal/tsconfig.json +++ b/types/pgwmodal/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/phantom/tsconfig.json b/types/phantom/tsconfig.json index 39ae0edc93..db99b55c3e 100644 --- a/types/phantom/tsconfig.json +++ b/types/phantom/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/phantomcss/tsconfig.json b/types/phantomcss/tsconfig.json index cba4e19ecd..f1ed6ac3c6 100644 --- a/types/phantomcss/tsconfig.json +++ b/types/phantomcss/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/phantomjs/tsconfig.json b/types/phantomjs/tsconfig.json index 02963e3afd..352332b6c7 100644 --- a/types/phantomjs/tsconfig.json +++ b/types/phantomjs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/phoenix/tsconfig.json b/types/phoenix/tsconfig.json index 40bfbb22b6..2ab9a802b8 100644 --- a/types/phoenix/tsconfig.json +++ b/types/phoenix/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/phone-formatter/tsconfig.json b/types/phone-formatter/tsconfig.json index 48f951581e..1446ec115e 100644 --- a/types/phone-formatter/tsconfig.json +++ b/types/phone-formatter/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/phone/tsconfig.json b/types/phone/tsconfig.json index 1890b13a08..bab413270c 100644 --- a/types/phone/tsconfig.json +++ b/types/phone/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/phonegap-facebook-plugin/tsconfig.json b/types/phonegap-facebook-plugin/tsconfig.json index 0a1d090d05..9a06dc0e67 100644 --- a/types/phonegap-facebook-plugin/tsconfig.json +++ b/types/phonegap-facebook-plugin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/phonegap-nfc/tsconfig.json b/types/phonegap-nfc/tsconfig.json index 72b1f019d8..3a44f3b88e 100644 --- a/types/phonegap-nfc/tsconfig.json +++ b/types/phonegap-nfc/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/phonegap-plugin-barcodescanner/tsconfig.json b/types/phonegap-plugin-barcodescanner/tsconfig.json index ec6d41e488..62862eeea7 100644 --- a/types/phonegap-plugin-barcodescanner/tsconfig.json +++ b/types/phonegap-plugin-barcodescanner/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/phonegap/tsconfig.json b/types/phonegap/tsconfig.json index 714111c6e0..e513609ef9 100644 --- a/types/phonegap/tsconfig.json +++ b/types/phonegap/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/phonon/tsconfig.json b/types/phonon/tsconfig.json index bbadd8d12a..27fdea2d6f 100644 --- a/types/phonon/tsconfig.json +++ b/types/phonon/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/photonui/tsconfig.json b/types/photonui/tsconfig.json index 7aa685b04b..444824f4f7 100644 --- a/types/photonui/tsconfig.json +++ b/types/photonui/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/photoswipe/tsconfig.json b/types/photoswipe/tsconfig.json index 9e83ea1174..126ce7e39f 100644 --- a/types/photoswipe/tsconfig.json +++ b/types/photoswipe/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/physijs/tsconfig.json b/types/physijs/tsconfig.json index 6d446c60b3..20053336be 100644 --- a/types/physijs/tsconfig.json +++ b/types/physijs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pi-spi/tsconfig.json b/types/pi-spi/tsconfig.json index 0dada24fe6..b2ec839104 100644 --- a/types/pi-spi/tsconfig.json +++ b/types/pi-spi/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pick-weight/tsconfig.json b/types/pick-weight/tsconfig.json index 86f4110d99..2d02a2adef 100644 --- a/types/pick-weight/tsconfig.json +++ b/types/pick-weight/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pickadate/tsconfig.json b/types/pickadate/tsconfig.json index 7b19418034..a96115048d 100644 --- a/types/pickadate/tsconfig.json +++ b/types/pickadate/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/picturefill/tsconfig.json b/types/picturefill/tsconfig.json index 1435f75db0..84ef59b7ce 100644 --- a/types/picturefill/tsconfig.json +++ b/types/picturefill/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pidusage/tsconfig.json b/types/pidusage/tsconfig.json index 256715e11c..25c6d2eddf 100644 --- a/types/pidusage/tsconfig.json +++ b/types/pidusage/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pify/tsconfig.json b/types/pify/tsconfig.json index bf0a1104aa..13826105d6 100644 --- a/types/pify/tsconfig.json +++ b/types/pify/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pigpio/tsconfig.json b/types/pigpio/tsconfig.json index e5b61af015..7358a555c4 100644 --- a/types/pigpio/tsconfig.json +++ b/types/pigpio/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pikaday-time/tsconfig.json b/types/pikaday-time/tsconfig.json index bf96d27d1a..198426c4ce 100644 --- a/types/pikaday-time/tsconfig.json +++ b/types/pikaday-time/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pikaday/tsconfig.json b/types/pikaday/tsconfig.json index 3c936ab905..e127c57ad1 100644 --- a/types/pikaday/tsconfig.json +++ b/types/pikaday/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pinkyswear/tsconfig.json b/types/pinkyswear/tsconfig.json index c815468eb3..8e67838864 100644 --- a/types/pinkyswear/tsconfig.json +++ b/types/pinkyswear/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pino-multi-stream/pino-multi-stream-tests.ts b/types/pino-multi-stream/pino-multi-stream-tests.ts index d9d0899256..dc48ed3bd4 100644 --- a/types/pino-multi-stream/pino-multi-stream-tests.ts +++ b/types/pino-multi-stream/pino-multi-stream-tests.ts @@ -1,6 +1,6 @@ import * as fs from 'fs'; -import * as pino from 'pino'; -import * as pinoms from 'pino-multi-stream'; +import pino = require('pino'); +import pinoms = require('pino-multi-stream'); const streams: pinoms.Streams = [ { stream: process.stdout }, // an "info" level destination stream diff --git a/types/pino-multi-stream/tsconfig.json b/types/pino-multi-stream/tsconfig.json index 7a060abb2e..a421b036f3 100644 --- a/types/pino-multi-stream/tsconfig.json +++ b/types/pino-multi-stream/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "pino-multi-stream-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/pino/tsconfig.json b/types/pino/tsconfig.json index 78c8106f18..46cfc15004 100644 --- a/types/pino/tsconfig.json +++ b/types/pino/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pino/v3/tsconfig.json b/types/pino/v3/tsconfig.json index cc1e05b0f1..ed2f81e7b8 100644 --- a/types/pino/v3/tsconfig.json +++ b/types/pino/v3/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pinterest-sdk/tsconfig.json b/types/pinterest-sdk/tsconfig.json index 17bc0c1135..1665ad68fc 100644 --- a/types/pinterest-sdk/tsconfig.json +++ b/types/pinterest-sdk/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pinyin/tsconfig.json b/types/pinyin/tsconfig.json index 2fc91705ca..1f1295881d 100644 --- a/types/pinyin/tsconfig.json +++ b/types/pinyin/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/piwik-tracker/tsconfig.json b/types/piwik-tracker/tsconfig.json index 5f3f92ee94..a66212950b 100644 --- a/types/piwik-tracker/tsconfig.json +++ b/types/piwik-tracker/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pixelmatch/tsconfig.json b/types/pixelmatch/tsconfig.json index 02115e3fdc..f922c8c0b3 100644 --- a/types/pixelmatch/tsconfig.json +++ b/types/pixelmatch/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "pixelmatch-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/pixi.js/index.d.ts b/types/pixi.js/index.d.ts index b053b46790..6d7dfaf351 100644 --- a/types/pixi.js/index.d.ts +++ b/types/pixi.js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Pixi.js 4.6 +// Type definitions for Pixi.js 4.7 // Project: https://github.com/pixijs/pixi.js/tree/dev // Definitions by: clark-stevenson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -63,6 +63,7 @@ declare namespace PIXI { let PRECISION: string; let UPLOADS_PER_FRAME: number; let CAN_UPLOAD_SAME_BUFFER: boolean; + let MESH_CANVAS_PADDING: number; } ////////////////////////////////////////////////////////////////////////////// @@ -208,6 +209,7 @@ declare namespace PIXI { renderer: PIXI.WebGLRenderer | PIXI.CanvasRenderer; stage: Container; ticker: ticker.Ticker; + loader: loaders.Loader; readonly screen: Rectangle; stop(): void; @@ -497,6 +499,7 @@ declare namespace PIXI { drawCircle(x: number, y: number, radius: number): Graphics; drawEllipse(x: number, y: number, width: number, height: number): Graphics; drawPolygon(path: number[] | Point[] | Polygon): Graphics; + drawStar(x: number, y: number, points: number, radius: number, innerRadius: number, rotation?: number): Graphics; clear(): Graphics; isFastRect(): boolean; protected _renderCanvas(renderer: CanvasRenderer): void; @@ -1737,7 +1740,9 @@ declare namespace PIXI { // shader - class Shader extends glCore.GLShader { } + class Shader extends glCore.GLShader { + constructor(gl: WebGLRenderingContext, vertexSrc: string | string[], fragmentSrc: string | string[], attributeLocations?: { [key: string]: number }, precision?: string); + } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////EXTRACT/////////////////////////////////////////// @@ -2163,7 +2168,7 @@ declare namespace PIXI { // pixi loader extends // https://github.com/englercj/resource-loader/ - // 2.0.9 + // 2.1.1 class MiniSignalBinding { //tslint:disable-next-line:ban-types forbidden-types @@ -2251,6 +2256,8 @@ declare namespace PIXI { onStart: MiniSignal; onComplete: MiniSignal; + concurrency: number; + add(...params: any[]): this; //tslint:disable-next-line:ban-types forbidden-types add(name: string, url: string, options?: LoaderOptions, cb?: Function): this; @@ -2268,6 +2275,7 @@ declare namespace PIXI { protected _prepareUrl(url: string): string; //tslint:disable-next-line:ban-types forbidden-types protected _loadResource(resource: Resource, dequeue: Function): void; + protected _onStart(): void; protected _onComplete(): void; protected _onLoad(resource: Resource): void; @@ -2523,7 +2531,11 @@ declare namespace PIXI { ////////////////////////////////////////////////////////////////////////////// namespace particles { interface ParticleContainerProperties { + /** + * DEPRECIATED - Use `vertices` + */ scale?: boolean; + vertices?: boolean; position?: boolean; rotation?: boolean; uvs?: boolean; @@ -2531,7 +2543,7 @@ declare namespace PIXI { alpha?: boolean; } class ParticleContainer extends Container { - constructor(maxSize?: number, properties?: ParticleContainerProperties, batchSize?: number, autoSize?: boolean); + constructor(maxSize?: number, properties?: ParticleContainerProperties, batchSize?: number, autoResize?: boolean); protected _tint: number; protected tintRgb: number | any[]; tint: number; diff --git a/types/pixi.js/tsconfig.json b/types/pixi.js/tsconfig.json index 742fa02137..76ed9779cf 100644 --- a/types/pixi.js/tsconfig.json +++ b/types/pixi.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pkg-dir/tsconfig.json b/types/pkg-dir/tsconfig.json index 2701860736..496ac52b2b 100644 --- a/types/pkg-dir/tsconfig.json +++ b/types/pkg-dir/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "pkg-dir-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/pkijs/tsconfig.json b/types/pkijs/tsconfig.json index 2a4d04ec08..885bd7a0d8 100644 --- a/types/pkijs/tsconfig.json +++ b/types/pkijs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/platform/tsconfig.json b/types/platform/tsconfig.json index 95084ee11c..be37a03253 100644 --- a/types/platform/tsconfig.json +++ b/types/platform/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/playcanvas/tsconfig.json b/types/playcanvas/tsconfig.json index a2a2c895a0..2eb564bd87 100644 --- a/types/playcanvas/tsconfig.json +++ b/types/playcanvas/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "playcanvas-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/playerframework/tsconfig.json b/types/playerframework/tsconfig.json index 56c01ef247..984c1f5ae4 100644 --- a/types/playerframework/tsconfig.json +++ b/types/playerframework/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pleasejs/tsconfig.json b/types/pleasejs/tsconfig.json index 94046488fe..57104ee53b 100644 --- a/types/pleasejs/tsconfig.json +++ b/types/pleasejs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/plotly.js/tsconfig.json b/types/plotly.js/tsconfig.json index dd21321c49..6d2562291f 100644 --- a/types/plotly.js/tsconfig.json +++ b/types/plotly.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/plugapi/tsconfig.json b/types/plugapi/tsconfig.json index e0f04186ed..2e234835bd 100644 --- a/types/plugapi/tsconfig.json +++ b/types/plugapi/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/plugin-error/tsconfig.json b/types/plugin-error/tsconfig.json index ee9cd8e61f..a8d393375f 100644 --- a/types/plugin-error/tsconfig.json +++ b/types/plugin-error/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "plugin-error-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/plupload/tsconfig.json b/types/plupload/tsconfig.json index fc46738339..01f211f578 100644 --- a/types/plupload/tsconfig.json +++ b/types/plupload/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pluralize/tsconfig.json b/types/pluralize/tsconfig.json index 112ed18147..4c8f0ed41e 100644 --- a/types/pluralize/tsconfig.json +++ b/types/pluralize/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/png-async/tsconfig.json b/types/png-async/tsconfig.json index 181b899496..96cc95167c 100644 --- a/types/png-async/tsconfig.json +++ b/types/png-async/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pngjs/tsconfig.json b/types/pngjs/tsconfig.json index 4a2c2d47fd..229283a536 100644 --- a/types/pngjs/tsconfig.json +++ b/types/pngjs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pngjs2/tsconfig.json b/types/pngjs2/tsconfig.json index cbefc10524..07948ed5e6 100644 --- a/types/pngjs2/tsconfig.json +++ b/types/pngjs2/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/podcast/tsconfig.json b/types/podcast/tsconfig.json index 8e4c29f1e9..7e348b4913 100644 --- a/types/podcast/tsconfig.json +++ b/types/podcast/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/podium/tsconfig.json b/types/podium/tsconfig.json index a383a8d04c..d7580cd819 100644 --- a/types/podium/tsconfig.json +++ b/types/podium/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/point-in-polygon/tsconfig.json b/types/point-in-polygon/tsconfig.json index a17d220c7e..12a529f109 100644 --- a/types/point-in-polygon/tsconfig.json +++ b/types/point-in-polygon/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/polylabel/tsconfig.json b/types/polylabel/tsconfig.json index a9f8f55e42..b101936e68 100644 --- a/types/polylabel/tsconfig.json +++ b/types/polylabel/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/polyline/tsconfig.json b/types/polyline/tsconfig.json index 267af0e29a..032d5b9180 100644 --- a/types/polyline/tsconfig.json +++ b/types/polyline/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/polymer-ts/tsconfig.json b/types/polymer-ts/tsconfig.json index 67ef43b3be..48b262e0c8 100644 --- a/types/polymer-ts/tsconfig.json +++ b/types/polymer-ts/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/polymer/tsconfig.json b/types/polymer/tsconfig.json index 172edc052b..4b79861705 100644 --- a/types/polymer/tsconfig.json +++ b/types/polymer/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/popcorn/tsconfig.json b/types/popcorn/tsconfig.json index fa1c069762..b4076b50e2 100644 --- a/types/popcorn/tsconfig.json +++ b/types/popcorn/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/portscanner/tsconfig.json b/types/portscanner/tsconfig.json index 0a2ba9f13b..6e71168863 100644 --- a/types/portscanner/tsconfig.json +++ b/types/portscanner/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/postal/tsconfig.json b/types/postal/tsconfig.json index 69e3362d73..d9b73de77d 100644 --- a/types/postal/tsconfig.json +++ b/types/postal/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/postal/v0/tsconfig.json b/types/postal/v0/tsconfig.json index 207cc2f60b..417249bc92 100644 --- a/types/postal/v0/tsconfig.json +++ b/types/postal/v0/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/postmark/tsconfig.json b/types/postmark/tsconfig.json index 86df19a17f..aa22026f4e 100644 --- a/types/postmark/tsconfig.json +++ b/types/postmark/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouch-redux-middleware/tsconfig.json b/types/pouch-redux-middleware/tsconfig.json index f9cf608a5e..46f40a7938 100644 --- a/types/pouch-redux-middleware/tsconfig.json +++ b/types/pouch-redux-middleware/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-adapter-fruitdown/tsconfig.json b/types/pouchdb-adapter-fruitdown/tsconfig.json index c3357ce2d2..3a95c3d2aa 100644 --- a/types/pouchdb-adapter-fruitdown/tsconfig.json +++ b/types/pouchdb-adapter-fruitdown/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-adapter-http/tsconfig.json b/types/pouchdb-adapter-http/tsconfig.json index dd66d20097..43d474c91b 100644 --- a/types/pouchdb-adapter-http/tsconfig.json +++ b/types/pouchdb-adapter-http/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-adapter-idb/tsconfig.json b/types/pouchdb-adapter-idb/tsconfig.json index ce5edaa36c..bb163bf1ad 100644 --- a/types/pouchdb-adapter-idb/tsconfig.json +++ b/types/pouchdb-adapter-idb/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-adapter-leveldb/tsconfig.json b/types/pouchdb-adapter-leveldb/tsconfig.json index 4c3ceef40c..1a145b0469 100644 --- a/types/pouchdb-adapter-leveldb/tsconfig.json +++ b/types/pouchdb-adapter-leveldb/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-adapter-localstorage/tsconfig.json b/types/pouchdb-adapter-localstorage/tsconfig.json index b5c18c4a9f..cdd0d4a974 100644 --- a/types/pouchdb-adapter-localstorage/tsconfig.json +++ b/types/pouchdb-adapter-localstorage/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-adapter-memory/tsconfig.json b/types/pouchdb-adapter-memory/tsconfig.json index 0bf83e3b74..09c2bc23ce 100644 --- a/types/pouchdb-adapter-memory/tsconfig.json +++ b/types/pouchdb-adapter-memory/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-adapter-node-websql/tsconfig.json b/types/pouchdb-adapter-node-websql/tsconfig.json index a154ce42e3..85265196b1 100644 --- a/types/pouchdb-adapter-node-websql/tsconfig.json +++ b/types/pouchdb-adapter-node-websql/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-adapter-websql/tsconfig.json b/types/pouchdb-adapter-websql/tsconfig.json index a4dd9848fc..1b70d6ae7a 100644 --- a/types/pouchdb-adapter-websql/tsconfig.json +++ b/types/pouchdb-adapter-websql/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-browser/tsconfig.json b/types/pouchdb-browser/tsconfig.json index 892bc704d0..2689817b3b 100644 --- a/types/pouchdb-browser/tsconfig.json +++ b/types/pouchdb-browser/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-core/tsconfig.json b/types/pouchdb-core/tsconfig.json index 61dd8ca4d1..53b2e522d3 100644 --- a/types/pouchdb-core/tsconfig.json +++ b/types/pouchdb-core/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-find/tsconfig.json b/types/pouchdb-find/tsconfig.json index 3db7946c2a..633e57958e 100644 --- a/types/pouchdb-find/tsconfig.json +++ b/types/pouchdb-find/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-http/tsconfig.json b/types/pouchdb-http/tsconfig.json index 0e67095870..a4e8be6142 100644 --- a/types/pouchdb-http/tsconfig.json +++ b/types/pouchdb-http/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-mapreduce/tsconfig.json b/types/pouchdb-mapreduce/tsconfig.json index 1af053e93b..0ee8aba915 100644 --- a/types/pouchdb-mapreduce/tsconfig.json +++ b/types/pouchdb-mapreduce/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-node/tsconfig.json b/types/pouchdb-node/tsconfig.json index c1304343b6..bfce778e16 100644 --- a/types/pouchdb-node/tsconfig.json +++ b/types/pouchdb-node/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-replication/tsconfig.json b/types/pouchdb-replication/tsconfig.json index 6a64902380..d4646381cc 100644 --- a/types/pouchdb-replication/tsconfig.json +++ b/types/pouchdb-replication/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb-upsert/tsconfig.json b/types/pouchdb-upsert/tsconfig.json index ff5dc47e0c..99c7fc25b8 100644 --- a/types/pouchdb-upsert/tsconfig.json +++ b/types/pouchdb-upsert/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pouchdb/tsconfig.json b/types/pouchdb/tsconfig.json index 6894fb45dc..0b932bc155 100644 --- a/types/pouchdb/tsconfig.json +++ b/types/pouchdb/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/power-assert-formatter/tsconfig.json b/types/power-assert-formatter/tsconfig.json index 93cc04326a..838e3eb3bc 100644 --- a/types/power-assert-formatter/tsconfig.json +++ b/types/power-assert-formatter/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/power-assert/tsconfig.json b/types/power-assert/tsconfig.json index 9093028de3..f4eb6ee125 100644 --- a/types/power-assert/tsconfig.json +++ b/types/power-assert/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/precise/tsconfig.json b/types/precise/tsconfig.json index e400470ee5..0ad3319223 100644 --- a/types/precise/tsconfig.json +++ b/types/precise/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/precond/tsconfig.json b/types/precond/tsconfig.json index 8158d9149d..376f45bf15 100644 --- a/types/precond/tsconfig.json +++ b/types/precond/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/preloadjs/tsconfig.json b/types/preloadjs/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/preloadjs/tsconfig.json +++ b/types/preloadjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/prelude-ls/tsconfig.json b/types/prelude-ls/tsconfig.json index 7c846df940..79cee0c5db 100644 --- a/types/prelude-ls/tsconfig.json +++ b/types/prelude-ls/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prettier/tsconfig.json b/types/prettier/tsconfig.json index c3ff9609e6..b4fe5b746c 100644 --- a/types/prettier/tsconfig.json +++ b/types/prettier/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pretty-bytes/tsconfig.json b/types/pretty-bytes/tsconfig.json index fd11c640b4..deec7037a2 100644 --- a/types/pretty-bytes/tsconfig.json +++ b/types/pretty-bytes/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pretty-format/tsconfig.json b/types/pretty-format/tsconfig.json index b51d58bdbb..0c54a65fd4 100644 --- a/types/pretty-format/tsconfig.json +++ b/types/pretty-format/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pretty-ms/tsconfig.json b/types/pretty-ms/tsconfig.json index da88b941c7..42961708ac 100644 --- a/types/pretty-ms/tsconfig.json +++ b/types/pretty-ms/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prettyjson/tsconfig.json b/types/prettyjson/tsconfig.json index 8169c27bba..c344cc2742 100644 --- a/types/prettyjson/tsconfig.json +++ b/types/prettyjson/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/printf/tsconfig.json b/types/printf/tsconfig.json index 620efed257..19c87443f7 100644 --- a/types/printf/tsconfig.json +++ b/types/printf/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/priorityqueuejs/tsconfig.json b/types/priorityqueuejs/tsconfig.json index 565b6f8339..93882d576f 100644 --- a/types/priorityqueuejs/tsconfig.json +++ b/types/priorityqueuejs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prismjs/tsconfig.json b/types/prismjs/tsconfig.json index c5385df0ce..03ba8fadf4 100644 --- a/types/prismjs/tsconfig.json +++ b/types/prismjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/private-ip/tsconfig.json b/types/private-ip/tsconfig.json index 33e37f45f5..5a0e21cf48 100644 --- a/types/private-ip/tsconfig.json +++ b/types/private-ip/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/procfs-stats/tsconfig.json b/types/procfs-stats/tsconfig.json index 92d82b595d..8a501b61b3 100644 --- a/types/procfs-stats/tsconfig.json +++ b/types/procfs-stats/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/progress/tsconfig.json b/types/progress/tsconfig.json index 8621f46a57..65e98d96ce 100644 --- a/types/progress/tsconfig.json +++ b/types/progress/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/progressbar/tsconfig.json b/types/progressbar/tsconfig.json index b541482303..7aef8bf887 100644 --- a/types/progressbar/tsconfig.json +++ b/types/progressbar/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/progressjs/tsconfig.json b/types/progressjs/tsconfig.json index 371d303dae..fc6f9032d4 100644 --- a/types/progressjs/tsconfig.json +++ b/types/progressjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/proj4/tsconfig.json b/types/proj4/tsconfig.json index a55659d52c..1ab5dd3aca 100644 --- a/types/proj4/tsconfig.json +++ b/types/proj4/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/proj4leaflet/tsconfig.json b/types/proj4leaflet/tsconfig.json index 697b96a93a..71ce31477e 100644 --- a/types/proj4leaflet/tsconfig.json +++ b/types/proj4leaflet/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/project-oxford/tsconfig.json b/types/project-oxford/tsconfig.json index 4dbec7201d..8fc5270b59 100644 --- a/types/project-oxford/tsconfig.json +++ b/types/project-oxford/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/promise-dag/tsconfig.json b/types/promise-dag/tsconfig.json index c98c23daeb..a67918464c 100644 --- a/types/promise-dag/tsconfig.json +++ b/types/promise-dag/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/promise-pg/tsconfig.json b/types/promise-pg/tsconfig.json index 33ce665884..3738fbe7d4 100644 --- a/types/promise-pg/tsconfig.json +++ b/types/promise-pg/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/promise-polyfill/tsconfig.json b/types/promise-polyfill/tsconfig.json index 7fc4ac5f7b..eeae37f208 100644 --- a/types/promise-polyfill/tsconfig.json +++ b/types/promise-polyfill/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/promise-pool/tsconfig.json b/types/promise-pool/tsconfig.json index 98ab2ed31d..1dee50ec2c 100644 --- a/types/promise-pool/tsconfig.json +++ b/types/promise-pool/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/promise-queue/index.d.ts b/types/promise-queue/index.d.ts new file mode 100644 index 0000000000..efeaf04909 --- /dev/null +++ b/types/promise-queue/index.d.ts @@ -0,0 +1,55 @@ +// Type definitions for promise-queue 2.2 +// Project: https://github.com/azproduction/promise-queue +// Definitions by: Lachlan Stuart +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = PromiseQueue; + +declare class PromiseQueue { + /** + * + * @param maxPendingPromises [Infinity] Number of promises that can run at once. + * @param maxQueuedPromises [Infinity] Number of promises generators that can be in the queue at once. + * `add()` will return a rejected promise if this limit would be exceeded. + * @param options [{}] See QueueOptions + */ + constructor(maxPendingPromises?: number, maxQueuedPromises?: number, options?: PromiseQueue.QueueOptions); + + /** + * Enqueue a promise generator. When the number of running promises is less than `maxPendingPromises`, + * this function will be called and the returned promise will be held as a running promise until it + * rejects or resolves. + * + * @throws If the global `Promise` is undefined and `Queue.configure` hasn't been called. + * @param promiseGenerator A function that returns a promise when called. + * @returns A promise that forwards the resolution/rejection of the promise returned by `promiseGenerator`, + * or immediately rejects if `maxQueuedPromise` is exceeded. + */ + add(promiseGenerator: () => Promise): Promise; + + /** + * Returns the number of promiseGenerators waiting in queue. + */ + getPendingLength(): number; + + /** + * Returns the number of in-flight promises + */ + getQueueLength(): number; + + /** + * Set which promise constructor to use for the value returned by PromiseQueue#add. + * If this isn't called, the global `Promise` constructor is used. + * @param GlobalPromise A constructor for Promises + */ + static configure(GlobalPromise: PromiseConstructor): void; +} + +declare namespace PromiseQueue { + interface QueueOptions { + /** + * Callback that is called when the queue is empty and all pending promises have resolved + */ + onEmpty(): void; + } +} diff --git a/types/promise-queue/promise-queue-tests.ts b/types/promise-queue/promise-queue-tests.ts new file mode 100644 index 0000000000..fb3764c98f --- /dev/null +++ b/types/promise-queue/promise-queue-tests.ts @@ -0,0 +1,11 @@ +import * as PromiseQueue from 'promise-queue'; + +PromiseQueue.configure(Promise); + +const queue1 = new PromiseQueue(); +const queue2 = new PromiseQueue(1, 1, {onEmpty: () => null}); + +const queuedPromise: Promise = queue1.add(() => Promise.resolve(123)); + +const running: number = queue1.getPendingLength(); +const inQueue: number = queue1.getQueueLength(); diff --git a/types/promise-queue/tsconfig.json b/types/promise-queue/tsconfig.json new file mode 100644 index 0000000000..ff00e6ae4d --- /dev/null +++ b/types/promise-queue/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "promise-queue-tests.ts" + ] +} \ No newline at end of file diff --git a/types/promise-queue/tslint.json b/types/promise-queue/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/promise-queue/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/promise-retry/tsconfig.json b/types/promise-retry/tsconfig.json index cd598fc1f4..108576d80a 100644 --- a/types/promise-retry/tsconfig.json +++ b/types/promise-retry/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "promise-retry-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/promise.prototype.finally/tsconfig.json b/types/promise.prototype.finally/tsconfig.json index 7562ea9a0e..8624f013f1 100644 --- a/types/promise.prototype.finally/tsconfig.json +++ b/types/promise.prototype.finally/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/promised-temp/tsconfig.json b/types/promised-temp/tsconfig.json index 95c3dbb03c..0bd5275fad 100644 --- a/types/promised-temp/tsconfig.json +++ b/types/promised-temp/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/promisify-node/tsconfig.json b/types/promisify-node/tsconfig.json index a6cb4941e3..f54f1e857d 100644 --- a/types/promisify-node/tsconfig.json +++ b/types/promisify-node/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/promisify-supertest/promisify-supertest-tests.ts b/types/promisify-supertest/promisify-supertest-tests.ts index 7fa6de147d..84f4205534 100644 --- a/types/promisify-supertest/promisify-supertest-tests.ts +++ b/types/promisify-supertest/promisify-supertest-tests.ts @@ -1,6 +1,5 @@ - -import * as request from 'promisify-supertest'; -import * as express from 'express'; +import request = require('promisify-supertest'); +import express = require('express'); let app = express(); diff --git a/types/promisify-supertest/tsconfig.json b/types/promisify-supertest/tsconfig.json index 5c827afe3d..3709bcb2a7 100644 --- a/types/promisify-supertest/tsconfig.json +++ b/types/promisify-supertest/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prompt-sync-history/tsconfig.json b/types/prompt-sync-history/tsconfig.json index eee808c57f..7a8b0e911b 100644 --- a/types/prompt-sync-history/tsconfig.json +++ b/types/prompt-sync-history/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prompt-sync/tsconfig.json b/types/prompt-sync/tsconfig.json index 4e3cc7be7f..ef1a66e7b2 100644 --- a/types/prompt-sync/tsconfig.json +++ b/types/prompt-sync/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/promptly/tsconfig.json b/types/promptly/tsconfig.json index 1743c8cfae..2c4bb2d18f 100644 --- a/types/promptly/tsconfig.json +++ b/types/promptly/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prop-types/tsconfig.json b/types/prop-types/tsconfig.json index fc9e42b6d6..6274310dfb 100644 --- a/types/prop-types/tsconfig.json +++ b/types/prop-types/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "lib": [ "es6" ] diff --git a/types/properties-reader/tsconfig.json b/types/properties-reader/tsconfig.json index 18f69d9755..ac7cfabcca 100644 --- a/types/properties-reader/tsconfig.json +++ b/types/properties-reader/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-collab/tsconfig.json b/types/prosemirror-collab/tsconfig.json index 42b55853a5..9da4d55b1c 100644 --- a/types/prosemirror-collab/tsconfig.json +++ b/types/prosemirror-collab/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-commands/tsconfig.json b/types/prosemirror-commands/tsconfig.json index 0d89f90c3b..8c66702f55 100644 --- a/types/prosemirror-commands/tsconfig.json +++ b/types/prosemirror-commands/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-gapcursor/tsconfig.json b/types/prosemirror-gapcursor/tsconfig.json index 957316926f..81051ed6d5 100644 --- a/types/prosemirror-gapcursor/tsconfig.json +++ b/types/prosemirror-gapcursor/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-history/tsconfig.json b/types/prosemirror-history/tsconfig.json index 011798770e..04d438cbec 100644 --- a/types/prosemirror-history/tsconfig.json +++ b/types/prosemirror-history/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-inputrules/tsconfig.json b/types/prosemirror-inputrules/tsconfig.json index bb5e0cc19b..1a2521fb30 100644 --- a/types/prosemirror-inputrules/tsconfig.json +++ b/types/prosemirror-inputrules/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-keymap/tsconfig.json b/types/prosemirror-keymap/tsconfig.json index 266a148c55..f4a0154e83 100644 --- a/types/prosemirror-keymap/tsconfig.json +++ b/types/prosemirror-keymap/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-markdown/tsconfig.json b/types/prosemirror-markdown/tsconfig.json index 1fe943489c..b4c5979ef2 100644 --- a/types/prosemirror-markdown/tsconfig.json +++ b/types/prosemirror-markdown/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-menu/tsconfig.json b/types/prosemirror-menu/tsconfig.json index 3f43e1e2eb..312b620e50 100644 --- a/types/prosemirror-menu/tsconfig.json +++ b/types/prosemirror-menu/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-model/index.d.ts b/types/prosemirror-model/index.d.ts index 47741b200e..153358e3c6 100644 --- a/types/prosemirror-model/index.d.ts +++ b/types/prosemirror-model/index.d.ts @@ -832,7 +832,7 @@ export class ResolvedPos { * its parent node or its parent node isn't a textblock (in which * case no marks should be preserved). */ - marksAcross(): Mark[] | null | void; + marksAcross($end: ResolvedPos): Mark[] | null | void; /** * The depth up to which this position and the given (non-resolved) * position share the same parent nodes. diff --git a/types/prosemirror-model/tsconfig.json b/types/prosemirror-model/tsconfig.json index 6ae1c43b0c..0818485734 100644 --- a/types/prosemirror-model/tsconfig.json +++ b/types/prosemirror-model/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-schema-basic/tsconfig.json b/types/prosemirror-schema-basic/tsconfig.json index 44a2b36f28..b14e21e203 100644 --- a/types/prosemirror-schema-basic/tsconfig.json +++ b/types/prosemirror-schema-basic/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-schema-list/tsconfig.json b/types/prosemirror-schema-list/tsconfig.json index 3bc76fb24f..6a2f8c5c7e 100644 --- a/types/prosemirror-schema-list/tsconfig.json +++ b/types/prosemirror-schema-list/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-state/tsconfig.json b/types/prosemirror-state/tsconfig.json index 31354bc4ba..b9eb8cebbb 100644 --- a/types/prosemirror-state/tsconfig.json +++ b/types/prosemirror-state/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-tables/tsconfig.json b/types/prosemirror-tables/tsconfig.json index 956d15d5b9..6039b257f6 100644 --- a/types/prosemirror-tables/tsconfig.json +++ b/types/prosemirror-tables/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-transform/tsconfig.json b/types/prosemirror-transform/tsconfig.json index c5799c88a6..b38cbe15db 100644 --- a/types/prosemirror-transform/tsconfig.json +++ b/types/prosemirror-transform/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/prosemirror-view/tsconfig.json b/types/prosemirror-view/tsconfig.json index 80349461cb..27ca267974 100644 --- a/types/prosemirror-view/tsconfig.json +++ b/types/prosemirror-view/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/protractor-browser-logs/tsconfig.json b/types/protractor-browser-logs/tsconfig.json index f0cfe8c279..3609f79a73 100644 --- a/types/protractor-browser-logs/tsconfig.json +++ b/types/protractor-browser-logs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/protractor-helpers/tsconfig.json b/types/protractor-helpers/tsconfig.json index 6a0cde55eb..011710d5ec 100644 --- a/types/protractor-helpers/tsconfig.json +++ b/types/protractor-helpers/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/protractor-http-mock/tsconfig.json b/types/protractor-http-mock/tsconfig.json index be5b803a40..e901bf0729 100644 --- a/types/protractor-http-mock/tsconfig.json +++ b/types/protractor-http-mock/tsconfig.json @@ -19,7 +19,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/provinces/tsconfig.json b/types/provinces/tsconfig.json index d08b599b71..afb8986660 100644 --- a/types/provinces/tsconfig.json +++ b/types/provinces/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "provinces-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/proxy-addr/tsconfig.json b/types/proxy-addr/tsconfig.json index 2fa7369df3..809cf3d0b6 100644 --- a/types/proxy-addr/tsconfig.json +++ b/types/proxy-addr/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/proxyquire/tsconfig.json b/types/proxyquire/tsconfig.json index 91f5321dca..d3a8d9b5d4 100644 --- a/types/proxyquire/tsconfig.json +++ b/types/proxyquire/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pty.js/tsconfig.json b/types/pty.js/tsconfig.json index bea732e24f..1484657577 100644 --- a/types/pty.js/tsconfig.json +++ b/types/pty.js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/public-ip/tsconfig.json b/types/public-ip/tsconfig.json index 272171128a..57230ba254 100644 --- a/types/public-ip/tsconfig.json +++ b/types/public-ip/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pubnub/tsconfig.json b/types/pubnub/tsconfig.json index fab1a92335..b8a4d1d681 100644 --- a/types/pubnub/tsconfig.json +++ b/types/pubnub/tsconfig.json @@ -1,23 +1,24 @@ { - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "pubnub-tests.ts" - ] -} + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "pubnub-tests.ts" + ] +} \ No newline at end of file diff --git a/types/pubsub-js/tsconfig.json b/types/pubsub-js/tsconfig.json index bccf35e64b..a83540e471 100644 --- a/types/pubsub-js/tsconfig.json +++ b/types/pubsub-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pug/tsconfig.json b/types/pug/tsconfig.json index efae8f261c..1d456b72d9 100644 --- a/types/pug/tsconfig.json +++ b/types/pug/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pulltorefreshjs/tsconfig.json b/types/pulltorefreshjs/tsconfig.json index 000858aefb..f20918e9b2 100644 --- a/types/pulltorefreshjs/tsconfig.json +++ b/types/pulltorefreshjs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pump/pump-tests.ts b/types/pump/pump-tests.ts index 0c8e91b2c0..cf3393de21 100644 --- a/types/pump/pump-tests.ts +++ b/types/pump/pump-tests.ts @@ -1,4 +1,4 @@ -import * as pump from 'pump'; +import pump = require('pump'); import { createReadStream, createWriteStream } from 'fs'; import { Transform } from 'stream'; diff --git a/types/pump/tsconfig.json b/types/pump/tsconfig.json index 64e36bc754..e10b3daf90 100644 --- a/types/pump/tsconfig.json +++ b/types/pump/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pupa/tsconfig.json b/types/pupa/tsconfig.json index 3800bab180..d4d761ce00 100644 --- a/types/pupa/tsconfig.json +++ b/types/pupa/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "pupa-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/puppeteer/tsconfig.json b/types/puppeteer/tsconfig.json index 1231a85489..ad10a6c9cb 100644 --- a/types/puppeteer/tsconfig.json +++ b/types/puppeteer/tsconfig.json @@ -17,7 +17,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/puppeteer/v0/tsconfig.json b/types/puppeteer/v0/tsconfig.json index 314d615a7e..9a629aeb86 100644 --- a/types/puppeteer/v0/tsconfig.json +++ b/types/puppeteer/v0/tsconfig.json @@ -16,19 +16,20 @@ "../../" ], "paths": { - "puppeteer": [ - "puppeteer/v0" - ], - "puppeteer/*": [ - "puppeteer/v0/*" - ] + "puppeteer": [ + "puppeteer/v0" + ], + "puppeteer/*": [ + "puppeteer/v0/*" + ] }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "puppeteer-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/pure-render-decorator/tsconfig.json b/types/pure-render-decorator/tsconfig.json index 75214d18ff..d2f5f65ca2 100644 --- a/types/pure-render-decorator/tsconfig.json +++ b/types/pure-render-decorator/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/purl/tsconfig.json b/types/purl/tsconfig.json index ed87062a7f..d5ca9f7f4b 100644 --- a/types/purl/tsconfig.json +++ b/types/purl/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pusher-js/tsconfig.json b/types/pusher-js/tsconfig.json index 8827ec25e0..a9549bd6dd 100644 --- a/types/pusher-js/tsconfig.json +++ b/types/pusher-js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/pvutils/tsconfig.json b/types/pvutils/tsconfig.json index 1715d090ce..d0eef064de 100644 --- a/types/pvutils/tsconfig.json +++ b/types/pvutils/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/python-shell/tsconfig.json b/types/python-shell/tsconfig.json index 6a36da55e1..86c2287a0d 100644 --- a/types/python-shell/tsconfig.json +++ b/types/python-shell/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/q-io/tsconfig.json b/types/q-io/tsconfig.json index a4c26f2b30..1e26749126 100644 --- a/types/q-io/tsconfig.json +++ b/types/q-io/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/q-retry/tsconfig.json b/types/q-retry/tsconfig.json index 516bc59abf..dc1ed9b23b 100644 --- a/types/q-retry/tsconfig.json +++ b/types/q-retry/tsconfig.json @@ -19,7 +19,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/q/tsconfig.json b/types/q/tsconfig.json index d78aa85a14..5e1034f46b 100644 --- a/types/q/tsconfig.json +++ b/types/q/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/q/v0/tsconfig.json b/types/q/v0/tsconfig.json index 681e8e1f2e..31ac046a31 100644 --- a/types/q/v0/tsconfig.json +++ b/types/q/v0/tsconfig.json @@ -20,7 +20,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/qhistory/tsconfig.json b/types/qhistory/tsconfig.json index 98850cf651..83a801697e 100644 --- a/types/qhistory/tsconfig.json +++ b/types/qhistory/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/qlik-engineapi/tsconfig.json b/types/qlik-engineapi/tsconfig.json index 2486e3c1a1..67fd16bdeb 100644 --- a/types/qlik-engineapi/tsconfig.json +++ b/types/qlik-engineapi/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/qlik-visualizationextensions/tsconfig.json b/types/qlik-visualizationextensions/tsconfig.json index fcda37b74c..e36779b393 100644 --- a/types/qlik-visualizationextensions/tsconfig.json +++ b/types/qlik-visualizationextensions/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/qlik/tsconfig.json b/types/qlik/tsconfig.json index 9ce852a121..17e3a3a1d4 100644 --- a/types/qlik/tsconfig.json +++ b/types/qlik/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/qr-image/tsconfig.json b/types/qr-image/tsconfig.json index c7703160db..cee4442bdc 100644 --- a/types/qr-image/tsconfig.json +++ b/types/qr-image/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/qrcode.react/qrcode.react-tests.tsx b/types/qrcode.react/qrcode.react-tests.tsx index ffae551b01..25136d1a97 100644 --- a/types/qrcode.react/qrcode.react-tests.tsx +++ b/types/qrcode.react/qrcode.react-tests.tsx @@ -1,4 +1,4 @@ -import * as QRCode from "qrcode.react"; +import QRCode = require("qrcode.react"); import * as React from "react"; const qrcodes = [ diff --git a/types/qrcode.react/tsconfig.json b/types/qrcode.react/tsconfig.json index 43b0544543..692ea041c5 100644 --- a/types/qrcode.react/tsconfig.json +++ b/types/qrcode.react/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/qrcode/index.d.ts b/types/qrcode/index.d.ts index cb2ce4a9b7..c04a07c20f 100644 --- a/types/qrcode/index.d.ts +++ b/types/qrcode/index.d.ts @@ -127,65 +127,127 @@ export interface QRCode { */ export function create(text: string | QRCodeSegment[], options: QRCodeOptions): QRCode; +/** + * Draws qr code symbol to canvas. + */ +export function toCanvas(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[]): Promise; /** * Draws qr code symbol to canvas. */ export function toCanvas(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[], callback: (error: Error) => void): void; +/** + * Draws qr code symbol to canvas. + */ +export function toCanvas(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[], options: QRCodeOptions): Promise; /** * Draws qr code symbol to canvas. */ export function toCanvas(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[], options: QRCodeOptions, callback: (error: Error) => void): void; +/** + * Draws qr code symbol to canvas. + */ +export function toCanvas(text: string | QRCodeSegment[]): Promise; /** * Draws qr code symbol to canvas. */ export function toCanvas(text: string | QRCodeSegment[], callback: (error: Error, canvas: HTMLCanvasElement) => void): void; +/** + * Draws qr code symbol to canvas. + */ +export function toCanvas(text: string | QRCodeSegment[], options: QRCodeOptions): Promise; /** * Draws qr code symbol to canvas. */ export function toCanvas(text: string | QRCodeSegment[], options: QRCodeOptions, callback: (error: Error, canvas: HTMLCanvasElement) => void): void; +/** + * Draws qr code symbol to node canvas. + */ +export function toCanvas(canvas: any, text: string | QRCodeSegment[]): Promise; /** * Draws qr code symbol to node canvas. */ export function toCanvas(canvas: any, text: string | QRCodeSegment[], callback: (error: Error) => void): void; +/** + * Draws qr code symbol to node canvas. + */ +export function toCanvas(canvas: any, text: string | QRCodeSegment[], options: QRCodeOptions): Promise; /** * Draws qr code symbol to node canvas. */ export function toCanvas(canvas: any, text: string | QRCodeSegment[], options: QRCodeOptions, callback: (error: Error) => void): void; +/** + * Returns a Data URI containing a representation of the QR Code image. + */ +export function toDataURL(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[]): Promise; /** * Returns a Data URI containing a representation of the QR Code image. */ export function toDataURL(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[], callback: (error: Error, url: string) => void): void; +/** + * Returns a Data URI containing a representation of the QR Code image. + */ +export function toDataURL(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[], options: QRCodeToDataURLOptions): Promise; /** * Returns a Data URI containing a representation of the QR Code image. */ export function toDataURL(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[], options: QRCodeToDataURLOptions, callback: (error: Error, url: string) => void): void; +/** + * Returns a Data URI containing a representation of the QR Code image. + */ +export function toDataURL(text: string | QRCodeSegment[]): Promise; /** * Returns a Data URI containing a representation of the QR Code image. */ export function toDataURL(text: string | QRCodeSegment[], callback: (error: Error, url: string) => void): void; +/** + * Returns a Data URI containing a representation of the QR Code image. + */ +export function toDataURL(text: string | QRCodeSegment[], options: QRCodeToDataURLOptions): Promise; /** * Returns a Data URI containing a representation of the QR Code image. */ export function toDataURL(text: string | QRCodeSegment[], options: QRCodeToDataURLOptions, callback: (error: Error, url: string) => void): void; +/** + * Returns a string representation of the QR Code. + * If choosen output format is svg it will returns a string containing xml code. + */ +export function toString(text: string | QRCodeSegment[]): Promise; /** * Returns a string representation of the QR Code. * If choosen output format is svg it will returns a string containing xml code. */ export function toString(text: string | QRCodeSegment[], callback: (error: Error, string: string) => void): void; +/** + * Returns a string representation of the QR Code. + * If choosen output format is svg it will returns a string containing xml code. + */ +export function toString(text: string | QRCodeSegment[], options: QRCodeToStringOptions): Promise; /** * Returns a string representation of the QR Code. * If choosen output format is svg it will returns a string containing xml code. */ export function toString(text: string | QRCodeSegment[], options: QRCodeToStringOptions, callback: (error: Error, string: string) => void): void; +/** + * Saves QR Code to image file. + * If options.type is not specified, the format will be guessed from file extension. + * Recognized extensions are png, svg, txt. + */ +export function toFile(path: string, text: string | QRCodeSegment[]): Promise; /** * Saves QR Code to image file. * If options.type is not specified, the format will be guessed from file extension. * Recognized extensions are png, svg, txt. */ export function toFile(path: string, text: string | QRCodeSegment[], callback: (error: Error) => void): void; +/** + * Saves QR Code to image file. + * If options.type is not specified, the format will be guessed from file extension. + * Recognized extensions are png, svg, txt. + */ +export function toFile(path: string, text: string | QRCodeSegment[], options: QRCodeToFileOptions): Promise; /** * Saves QR Code to image file. * If options.type is not specified, the format will be guessed from file extension. @@ -193,10 +255,18 @@ export function toFile(path: string, text: string | QRCodeSegment[], callback: ( */ export function toFile(path: string, text: string | QRCodeSegment[], options: QRCodeToFileOptions, callback: (error: Error) => void): void; +/** + * Writes QR Code image to stream. Only works with png format for now. + */ +export function toFileStream(stream: stream.Writable, text: string | QRCodeSegment[]): Promise; /** * Writes QR Code image to stream. Only works with png format for now. */ export function toFileStream(stream: stream.Writable, text: string | QRCodeSegment[], callback: (error: Error) => void): void; +/** + * Writes QR Code image to stream. Only works with png format for now. + */ +export function toFileStream(stream: stream.Writable, text: string | QRCodeSegment[], options: QRCodeOptions): Promise; /** * Writes QR Code image to stream. Only works with png format for now. */ diff --git a/types/qrcode/tsconfig.json b/types/qrcode/tsconfig.json index 9731101a88..4484cf4d0e 100644 --- a/types/qrcode/tsconfig.json +++ b/types/qrcode/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/qs/tsconfig.json b/types/qs/tsconfig.json index afbace4b52..c099312aae 100644 --- a/types/qs/tsconfig.json +++ b/types/qs/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/qtip2/tsconfig.json b/types/qtip2/tsconfig.json index 065a751433..fd9faf89ca 100644 --- a/types/qtip2/tsconfig.json +++ b/types/qtip2/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/query-string/tsconfig.json b/types/query-string/tsconfig.json index 83d5a52072..3561904b2b 100644 --- a/types/query-string/tsconfig.json +++ b/types/query-string/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/quick-lru/tsconfig.json b/types/quick-lru/tsconfig.json index c75dcdb96b..6859298d65 100644 --- a/types/quick-lru/tsconfig.json +++ b/types/quick-lru/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/quill/index.d.ts b/types/quill/index.d.ts index a996babf30..6cc5c824c5 100644 --- a/types/quill/index.d.ts +++ b/types/quill/index.d.ts @@ -84,9 +84,9 @@ export interface DeltaStatic { concat(other: DeltaStatic): DeltaStatic; diff(other: DeltaStatic, index?: number): DeltaStatic; eachLine(predicate: (line: DeltaStatic, attributes: StringMap, idx: number) => any, newline?: string): DeltaStatic; - transform(index: number): number; + transform(index: number, priority?: boolean): number; transform(other: DeltaStatic, priority: boolean): DeltaStatic; - transformPosition(index: number): number; + transformPosition(index: number, priority?: boolean): number; } export class Delta implements DeltaStatic { diff --git a/types/quill/quill-tests.ts b/types/quill/quill-tests.ts index f907092ed1..bda294251d 100644 --- a/types/quill/quill-tests.ts +++ b/types/quill/quill-tests.ts @@ -310,10 +310,14 @@ function test_DeltaTransform() { const d1: DeltaStatic = a.transform(b, true); // new Delta().retain(1).insert('b').retain(5).insert('c'); const d2: DeltaStatic = a.transform(b, false); // new Delta().insert('b').retain(6).insert('c'); const n1: number = a.transform(5); + const n2: number = a.transform(5, true); + const n3: number = a.transform(5, false); } function test_DeltatransformPosition() { const delta = new Delta().retain(5).insert('a'); const n1: number = delta.transformPosition(4); // 4 const n2: number = delta.transformPosition(5); // 6 + const n3: number = delta.transformPosition(5, true); + const n4: number = delta.transformPosition(5, false); } diff --git a/types/quill/tsconfig.json b/types/quill/tsconfig.json index a5297158c9..f2d74f4b36 100644 --- a/types/quill/tsconfig.json +++ b/types/quill/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/quixote/tsconfig.json b/types/quixote/tsconfig.json index 54bd1570ba..a416fc7e5c 100644 --- a/types/quixote/tsconfig.json +++ b/types/quixote/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/qunit/tsconfig.json b/types/qunit/tsconfig.json index 15ac0ffa44..ce7bde690c 100644 --- a/types/qunit/tsconfig.json +++ b/types/qunit/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/qunit/v1/tsconfig.json b/types/qunit/v1/tsconfig.json index 4ed39548dd..ebddc9933c 100644 --- a/types/qunit/v1/tsconfig.json +++ b/types/qunit/v1/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/quoted-printable/tsconfig.json b/types/quoted-printable/tsconfig.json index 7bc181f40b..f3f12d3b37 100644 --- a/types/quoted-printable/tsconfig.json +++ b/types/quoted-printable/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/qwest/tsconfig.json b/types/qwest/tsconfig.json index d8cfd81322..8a6279a79a 100644 --- a/types/qwest/tsconfig.json +++ b/types/qwest/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/r-script/tsconfig.json b/types/r-script/tsconfig.json index 82beae3043..46bbf5d53a 100644 --- a/types/r-script/tsconfig.json +++ b/types/r-script/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/rabbit.js/tsconfig.json b/types/rabbit.js/tsconfig.json index 93e2112a25..1c6363cf3a 100644 --- a/types/rabbit.js/tsconfig.json +++ b/types/rabbit.js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ractive/tsconfig.json b/types/ractive/tsconfig.json index a66823796c..0b1ecb1fbf 100644 --- a/types/ractive/tsconfig.json +++ b/types/ractive/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/radium/radium-tests.tsx b/types/radium/radium-tests.tsx index 0b1b1408c2..6b7aaa1a46 100644 --- a/types/radium/radium-tests.tsx +++ b/types/radium/radium-tests.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { StyleRoot, Style } from "radium"; -import * as Radium from 'radium'; +import Radium = require('radium'); @Radium class TestComponent extends React.Component<{ a: number }> { diff --git a/types/radium/tsconfig.json b/types/radium/tsconfig.json index 73d842bda6..fe28635422 100644 --- a/types/radium/tsconfig.json +++ b/types/radium/tsconfig.json @@ -17,7 +17,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/radius/tsconfig.json b/types/radius/tsconfig.json index 9720137921..e4aa8cb383 100644 --- a/types/radius/tsconfig.json +++ b/types/radius/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index ccd73c53d3..4ee63e0975 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -1245,10 +1245,10 @@ declare namespace R { * Takes a predicate and a list and returns the pair of lists of elements * which do and do not satisfy the predicate, respectively. */ - partition(fn: (a: string) => boolean, list: ReadonlyArray): string[][]; - partition(fn: (a: T) => boolean, list: ReadonlyArray): T[][]; - partition(fn: (a: T) => boolean): (list: ReadonlyArray) => T[][]; - partition(fn: (a: string) => boolean): (list: ReadonlyArray) => string[][]; + partition(fn: (a: string) => boolean, list: ReadonlyArray): [string[], string[]]; + partition(fn: (a: T) => boolean, list: ReadonlyArray): [T[], T[]]; + partition(fn: (a: T) => boolean): (list: ReadonlyArray) => [T[], T[]]; + partition(fn: (a: string) => boolean): (list: ReadonlyArray) => [string[], string[]]; /** * Retrieve the value at a given path. diff --git a/types/ramda/tsconfig.json b/types/ramda/tsconfig.json index d29b3d9783..6be72ef69a 100644 --- a/types/ramda/tsconfig.json +++ b/types/ramda/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/random-js/tsconfig.json b/types/random-js/tsconfig.json index 7f60c90d1b..570d0c82a0 100644 --- a/types/random-js/tsconfig.json +++ b/types/random-js/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/random-seed/tsconfig.json b/types/random-seed/tsconfig.json index 0c0fcd958b..5a1df347cd 100644 --- a/types/random-seed/tsconfig.json +++ b/types/random-seed/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/random-string/tsconfig.json b/types/random-string/tsconfig.json index 444464e11e..9bb3b8da44 100644 --- a/types/random-string/tsconfig.json +++ b/types/random-string/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/randomcolor/tsconfig.json b/types/randomcolor/tsconfig.json index b3a176e1fc..0ceaeaf8cf 100644 --- a/types/randomcolor/tsconfig.json +++ b/types/randomcolor/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/randomstring/tsconfig.json b/types/randomstring/tsconfig.json index 7a159e3797..d1e21fe8bc 100644 --- a/types/randomstring/tsconfig.json +++ b/types/randomstring/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/range-parser/tsconfig.json b/types/range-parser/tsconfig.json index 15585886a9..34afaa3188 100644 --- a/types/range-parser/tsconfig.json +++ b/types/range-parser/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/rangy/tsconfig.json b/types/rangy/tsconfig.json index 4eb68b3ddc..2b7a94d3c4 100644 --- a/types/rangy/tsconfig.json +++ b/types/rangy/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/rangyinputs/tsconfig.json b/types/rangyinputs/tsconfig.json index 8db995320f..8ed5fac9cd 100644 --- a/types/rangyinputs/tsconfig.json +++ b/types/rangyinputs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/raphael/tsconfig.json b/types/raphael/tsconfig.json index 2225a4e61a..c48094a86b 100644 --- a/types/raphael/tsconfig.json +++ b/types/raphael/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/rappid/tsconfig.json b/types/rappid/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/rappid/tsconfig.json +++ b/types/rappid/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/raspi-board/tsconfig.json b/types/raspi-board/tsconfig.json index a55a514726..d445c2e7a3 100644 --- a/types/raspi-board/tsconfig.json +++ b/types/raspi-board/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/raspi-gpio/tsconfig.json b/types/raspi-gpio/tsconfig.json index 480f995bc6..8f13193910 100644 --- a/types/raspi-gpio/tsconfig.json +++ b/types/raspi-gpio/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/raspi-i2c/tsconfig.json b/types/raspi-i2c/tsconfig.json index 4e201f4496..2c371c52cb 100644 --- a/types/raspi-i2c/tsconfig.json +++ b/types/raspi-i2c/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/raspi-led/tsconfig.json b/types/raspi-led/tsconfig.json index 7e9d3a0fcc..7820064819 100644 --- a/types/raspi-led/tsconfig.json +++ b/types/raspi-led/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/raspi-onewire/tsconfig.json b/types/raspi-onewire/tsconfig.json index d7df314b58..0f7e781370 100644 --- a/types/raspi-onewire/tsconfig.json +++ b/types/raspi-onewire/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/raspi-peripheral/tsconfig.json b/types/raspi-peripheral/tsconfig.json index 4b24a67971..262dfe65ab 100644 --- a/types/raspi-peripheral/tsconfig.json +++ b/types/raspi-peripheral/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/raspi-pwm/tsconfig.json b/types/raspi-pwm/tsconfig.json index 5e38158098..cb04441554 100644 --- a/types/raspi-pwm/tsconfig.json +++ b/types/raspi-pwm/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/raspi-serial/tsconfig.json b/types/raspi-serial/tsconfig.json index c2a6058397..3d34b95ae2 100644 --- a/types/raspi-serial/tsconfig.json +++ b/types/raspi-serial/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/raspi-soft-pwm/tsconfig.json b/types/raspi-soft-pwm/tsconfig.json index aab55c4028..be512facda 100644 --- a/types/raspi-soft-pwm/tsconfig.json +++ b/types/raspi-soft-pwm/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/raspi/tsconfig.json b/types/raspi/tsconfig.json index 6906d607cf..a0a4b8c7e1 100644 --- a/types/raspi/tsconfig.json +++ b/types/raspi/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/ratelimiter/ratelimiter-tests.ts b/types/ratelimiter/ratelimiter-tests.ts index 4face1baa9..f529ec2faf 100644 --- a/types/ratelimiter/ratelimiter-tests.ts +++ b/types/ratelimiter/ratelimiter-tests.ts @@ -1,6 +1,5 @@ - import * as redis from 'redis'; -import * as Limiter from 'ratelimiter'; +import Limiter = require('ratelimiter'); declare let id: string; declare let db: redis.RedisClient; diff --git a/types/ratelimiter/tsconfig.json b/types/ratelimiter/tsconfig.json index 7e4e18ce50..f12fb1e8de 100644 --- a/types/ratelimiter/tsconfig.json +++ b/types/ratelimiter/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/raty/tsconfig.json b/types/raty/tsconfig.json index d367e9932e..2181426f02 100644 --- a/types/raty/tsconfig.json +++ b/types/raty/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/raven-for-redux/tsconfig.json b/types/raven-for-redux/tsconfig.json index b9ef813901..27d70eb769 100644 --- a/types/raven-for-redux/tsconfig.json +++ b/types/raven-for-redux/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "raven-for-redux-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/raven/tsconfig.json b/types/raven/tsconfig.json index caa66d1660..7cb5191080 100644 --- a/types/raven/tsconfig.json +++ b/types/raven/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/raygun4js/tsconfig.json b/types/raygun4js/tsconfig.json index 13eb0470bc..a21a9f09ba 100644 --- a/types/raygun4js/tsconfig.json +++ b/types/raygun4js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/rbac-a/tsconfig.json b/types/rbac-a/tsconfig.json index be60bf248e..6ac59a93d5 100644 --- a/types/rbac-a/tsconfig.json +++ b/types/rbac-a/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -23,4 +24,4 @@ "lib/rbac.d.ts", "rbac-a-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/rbush/tsconfig.json b/types/rbush/tsconfig.json index fd02361312..8eb8ae3920 100644 --- a/types/rbush/tsconfig.json +++ b/types/rbush/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/rc-select/tsconfig.json b/types/rc-select/tsconfig.json index 9f4f75be56..3febdbac14 100644 --- a/types/rc-select/tsconfig.json +++ b/types/rc-select/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/rc-slider/tsconfig.json b/types/rc-slider/tsconfig.json index 8a4133645c..4f99fe54bc 100644 --- a/types/rc-slider/tsconfig.json +++ b/types/rc-slider/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/rc-tooltip/tsconfig.json b/types/rc-tooltip/tsconfig.json index 6ac85da4a7..98758d8cc7 100644 --- a/types/rc-tooltip/tsconfig.json +++ b/types/rc-tooltip/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/rc-tree/tsconfig.json b/types/rc-tree/tsconfig.json index f0e6f8f352..328de7f19d 100644 --- a/types/rc-tree/tsconfig.json +++ b/types/rc-tree/tsconfig.json @@ -18,7 +18,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/rc/tsconfig.json b/types/rc/tsconfig.json index dbd3d2ed1f..0408f4d727 100644 --- a/types/rc/tsconfig.json +++ b/types/rc/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/rcloader/tsconfig.json b/types/rcloader/tsconfig.json index 09cf468a7b..de232d1af1 100644 --- a/types/rcloader/tsconfig.json +++ b/types/rcloader/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/rdf-data-model/tsconfig.json b/types/rdf-data-model/tsconfig.json index e1099949e0..1c54cb1a94 100644 --- a/types/rdf-data-model/tsconfig.json +++ b/types/rdf-data-model/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "rdf-data-model-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/rdf-js/tsconfig.json b/types/rdf-js/tsconfig.json index b9c788b408..57d7bb3c05 100644 --- a/types/rdf-js/tsconfig.json +++ b/types/rdf-js/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "rdf-js-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/react-addons-create-fragment/tsconfig.json b/types/react-addons-create-fragment/tsconfig.json index d34d6a1d77..19a01dfff9 100644 --- a/types/react-addons-create-fragment/tsconfig.json +++ b/types/react-addons-create-fragment/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/react-addons-css-transition-group/tsconfig.json b/types/react-addons-css-transition-group/tsconfig.json index d34d6a1d77..19a01dfff9 100644 --- a/types/react-addons-css-transition-group/tsconfig.json +++ b/types/react-addons-css-transition-group/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/react-addons-linked-state-mixin/tsconfig.json b/types/react-addons-linked-state-mixin/tsconfig.json index d34d6a1d77..19a01dfff9 100644 --- a/types/react-addons-linked-state-mixin/tsconfig.json +++ b/types/react-addons-linked-state-mixin/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/react-addons-perf/tsconfig.json b/types/react-addons-perf/tsconfig.json index b2099f42a4..ce3aaab32f 100644 --- a/types/react-addons-perf/tsconfig.json +++ b/types/react-addons-perf/tsconfig.json @@ -17,6 +17,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/react-addons-pure-render-mixin/tsconfig.json b/types/react-addons-pure-render-mixin/tsconfig.json index d34d6a1d77..19a01dfff9 100644 --- a/types/react-addons-pure-render-mixin/tsconfig.json +++ b/types/react-addons-pure-render-mixin/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/react-addons-shallow-compare/react-addons-shallow-compare-tests.tsx b/types/react-addons-shallow-compare/react-addons-shallow-compare-tests.tsx index c1c5d902cc..cd1a96a70e 100644 --- a/types/react-addons-shallow-compare/react-addons-shallow-compare-tests.tsx +++ b/types/react-addons-shallow-compare/react-addons-shallow-compare-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import * as shallowCompare from 'react-addons-shallow-compare'; +import shallowCompare = require('react-addons-shallow-compare'); export class MyComponent extends React.Component { shouldComponentUpdate(nextProps: any, nextState: any, nextContext: any): boolean { diff --git a/types/react-addons-shallow-compare/tsconfig.json b/types/react-addons-shallow-compare/tsconfig.json index f6f4aec748..b5bc120ac8 100644 --- a/types/react-addons-shallow-compare/tsconfig.json +++ b/types/react-addons-shallow-compare/tsconfig.json @@ -20,6 +20,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "preserve" } } \ No newline at end of file diff --git a/types/react-addons-test-utils/tsconfig.json b/types/react-addons-test-utils/tsconfig.json index d34d6a1d77..19a01dfff9 100644 --- a/types/react-addons-test-utils/tsconfig.json +++ b/types/react-addons-test-utils/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/react-addons-transition-group/tsconfig.json b/types/react-addons-transition-group/tsconfig.json index d34d6a1d77..19a01dfff9 100644 --- a/types/react-addons-transition-group/tsconfig.json +++ b/types/react-addons-transition-group/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/react-addons-update/tsconfig.json b/types/react-addons-update/tsconfig.json index d34d6a1d77..19a01dfff9 100644 --- a/types/react-addons-update/tsconfig.json +++ b/types/react-addons-update/tsconfig.json @@ -18,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/react-alert/tsconfig.json b/types/react-alert/tsconfig.json index 9332254f22..839209b7dc 100644 --- a/types/react-alert/tsconfig.json +++ b/types/react-alert/tsconfig.json @@ -15,10 +15,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ "index.d.ts", "react-alert-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-alice-carousel/tsconfig.json b/types/react-alice-carousel/tsconfig.json index 4245303823..bc37758fc3 100644 --- a/types/react-alice-carousel/tsconfig.json +++ b/types/react-alice-carousel/tsconfig.json @@ -1,24 +1,25 @@ { - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true, - "jsx": "react" - }, - "files": [ - "index.d.ts", - "react-alice-carousel-tests.tsx" - ] -} + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "react-alice-carousel-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-app/tsconfig.json b/types/react-app/tsconfig.json index f8571fc792..3ec85b9bf8 100644 --- a/types/react-app/tsconfig.json +++ b/types/react-app/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-aria-menubutton/tsconfig.json b/types/react-aria-menubutton/tsconfig.json index 2dbf395f45..e9d596e375 100644 --- a/types/react-aria-menubutton/tsconfig.json +++ b/types/react-aria-menubutton/tsconfig.json @@ -16,7 +16,8 @@ "types": [], "jsx": "react", "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-autosuggest/react-autosuggest-tests.tsx b/types/react-autosuggest/react-autosuggest-tests.tsx index 3747e8457b..7fea579987 100644 --- a/types/react-autosuggest/react-autosuggest-tests.tsx +++ b/types/react-autosuggest/react-autosuggest-tests.tsx @@ -1,7 +1,7 @@ // region Imports import * as React from 'react'; import * as ReactDOM from 'react-dom'; -import * as Autosuggest from 'react-autosuggest'; +import Autosuggest = require('react-autosuggest'); // endregion interface Language { diff --git a/types/react-autosuggest/tsconfig.json b/types/react-autosuggest/tsconfig.json index fc78293096..2b69e68bf3 100644 --- a/types/react-autosuggest/tsconfig.json +++ b/types/react-autosuggest/tsconfig.json @@ -16,10 +16,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ "index.d.ts", "react-autosuggest-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-beautiful-dnd/tsconfig.json b/types/react-beautiful-dnd/tsconfig.json index 96c9d53cff..4530e4d9b8 100644 --- a/types/react-beautiful-dnd/tsconfig.json +++ b/types/react-beautiful-dnd/tsconfig.json @@ -16,7 +16,8 @@ "types": [], "jsx": "react", "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-big-calendar/tsconfig.json b/types/react-big-calendar/tsconfig.json index 1a28fe79ae..99826b4502 100644 --- a/types/react-big-calendar/tsconfig.json +++ b/types/react-big-calendar/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-body-classname/tsconfig.json b/types/react-body-classname/tsconfig.json index eed9b65a7c..e7bed7437e 100644 --- a/types/react-body-classname/tsconfig.json +++ b/types/react-body-classname/tsconfig.json @@ -16,7 +16,8 @@ "types": [], "jsx": "react", "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-bootstrap-date-picker/react-bootstrap-date-picker-tests.tsx b/types/react-bootstrap-date-picker/react-bootstrap-date-picker-tests.tsx index 07928a09ea..23b6c75d63 100644 --- a/types/react-bootstrap-date-picker/react-bootstrap-date-picker-tests.tsx +++ b/types/react-bootstrap-date-picker/react-bootstrap-date-picker-tests.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { DropdownMenu } from "react-bootstrap"; -import * as DatePicker from "react-bootstrap-date-picker"; +import DatePicker = require("react-bootstrap-date-picker"); const Custom: React.StatelessComponent = () => { return (
); diff --git a/types/react-bootstrap-date-picker/tsconfig.json b/types/react-bootstrap-date-picker/tsconfig.json index c8beba00b1..4b62f1b3f7 100644 --- a/types/react-bootstrap-date-picker/tsconfig.json +++ b/types/react-bootstrap-date-picker/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.ts b/types/react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.ts deleted file mode 100644 index 65e44c6086..0000000000 --- a/types/react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.ts +++ /dev/null @@ -1,23 +0,0 @@ -import DateRangePicker = require("react-bootstrap-daterangepicker"); -import * as React from "react"; - -class IntegrationTest extends React.Component { - render() { - const props = { - onEvent: (ev: any, picker: any) => true, - singleDatePicker: true, - startDate: "1999-12-31", - endDate: "2000-12-31", - dateLimit: 3, - timePicker: true, - timePickerIncrement: 5, - buttonClasses: ["btn-sm"], - applyClass: "myclass", - cancelClass: "myclass", - autoApply: true, - linkedCalendars: true, - }; - - return React.createElement(DateRangePicker, props); - } -} diff --git a/types/react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.tsx b/types/react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.tsx index b34646031d..36484ba416 100644 --- a/types/react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.tsx +++ b/types/react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.tsx @@ -1,4 +1,25 @@ -import * as DateRangePicker from "react-bootstrap-daterangepicker"; +import DateRangePicker = require("react-bootstrap-daterangepicker"); import * as React from "react"; +class IntegrationTest extends React.Component { + render() { + const props = { + onEvent: (ev: any, picker: any) => true, + singleDatePicker: true, + startDate: "1999-12-31", + endDate: "2000-12-31", + dateLimit: 3, + timePicker: true, + timePickerIncrement: 5, + buttonClasses: ["btn-sm"], + applyClass: "myclass", + cancelClass: "myclass", + autoApply: true, + linkedCalendars: true, + }; + + return React.createElement(DateRangePicker, props); + } +} + let pickerCoponent = true} />; diff --git a/types/react-bootstrap-daterangepicker/tsconfig.json b/types/react-bootstrap-daterangepicker/tsconfig.json index bc9c951ccf..39818df2a6 100644 --- a/types/react-bootstrap-daterangepicker/tsconfig.json +++ b/types/react-bootstrap-daterangepicker/tsconfig.json @@ -16,11 +16,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", - "react-bootstrap-daterangepicker-tests.ts", "react-bootstrap-daterangepicker-tests.tsx" ] } \ No newline at end of file diff --git a/types/react-bootstrap-table/tsconfig.json b/types/react-bootstrap-table/tsconfig.json index 5947d4a26d..fd3d5982ef 100644 --- a/types/react-bootstrap-table/tsconfig.json +++ b/types/react-bootstrap-table/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-bootstrap-table/v2/tsconfig.json b/types/react-bootstrap-table/v2/tsconfig.json index eee5850865..ca14332503 100644 --- a/types/react-bootstrap-table/v2/tsconfig.json +++ b/types/react-bootstrap-table/v2/tsconfig.json @@ -21,10 +21,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-bootstrap-table-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-bootstrap-typeahead/tsconfig.json b/types/react-bootstrap-typeahead/tsconfig.json index c8b63ad42b..ce067d6689 100644 --- a/types/react-bootstrap-typeahead/tsconfig.json +++ b/types/react-bootstrap-typeahead/tsconfig.json @@ -16,10 +16,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-bootstrap-typeahead-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-bootstrap/lib/Carousel.d.ts b/types/react-bootstrap/lib/Carousel.d.ts index cef9214064..23ceeda466 100644 --- a/types/react-bootstrap/lib/Carousel.d.ts +++ b/types/react-bootstrap/lib/Carousel.d.ts @@ -1,7 +1,7 @@ import * as React from 'react'; import { Omit, Sizes, SelectCallback } from 'react-bootstrap'; -import * as CarouselItem from './CarouselItem'; -import * as CarouselCaption from './CarouselCaption'; +import CarouselItem = require('./CarouselItem'); +import CarouselCaption = require('./CarouselCaption'); declare namespace Carousel { export type CarouselProps = Omit, 'wrap'> & { diff --git a/types/react-bootstrap/lib/FormControl.d.ts b/types/react-bootstrap/lib/FormControl.d.ts index 9f40f81774..dd7528e2d4 100644 --- a/types/react-bootstrap/lib/FormControl.d.ts +++ b/types/react-bootstrap/lib/FormControl.d.ts @@ -1,7 +1,7 @@ import * as React from 'react'; import { Sizes } from 'react-bootstrap'; -import * as FormControlFeedback from './FormControlFeedback'; -import * as FormControlStatic from './FormControlStatic'; +import FormControlFeedback = require('./FormControlFeedback'); +import FormControlStatic = require('./FormControlStatic'); declare namespace FormControl { export interface FormControlProps extends React.HTMLProps { diff --git a/types/react-bootstrap/lib/InputGroup.d.ts b/types/react-bootstrap/lib/InputGroup.d.ts index 7c99727439..6903fac5cf 100644 --- a/types/react-bootstrap/lib/InputGroup.d.ts +++ b/types/react-bootstrap/lib/InputGroup.d.ts @@ -1,7 +1,7 @@ import * as React from 'react'; import { Sizes } from 'react-bootstrap'; -import * as InputGroupAddon from './InputGroupAddon'; -import * as InputGroupButton from './InputGroupButton'; +import InputGroupAddon = require('./InputGroupAddon'); +import InputGroupButton = require('./InputGroupButton'); declare namespace InputGroup { export interface InputGroupProps extends React.HTMLProps { diff --git a/types/react-bootstrap/lib/Media.d.ts b/types/react-bootstrap/lib/Media.d.ts index eac35a0db9..4e85e69a51 100644 --- a/types/react-bootstrap/lib/Media.d.ts +++ b/types/react-bootstrap/lib/Media.d.ts @@ -1,10 +1,10 @@ import * as React from 'react'; -import * as MediaBody from './MediaBody'; -import * as MediaHeading from './MediaHeading'; -import * as MediaLeft from './MediaLeft'; -import * as MediaList from './MediaList'; -import * as MediaListItem from './MediaListItem'; -import * as MediaRight from './MediaRight'; +import MediaBody = require('./MediaBody'); +import MediaHeading = require('./MediaHeading'); +import MediaLeft = require('./MediaLeft'); +import MediaList = require('./MediaList'); +import MediaListItem = require('./MediaListItem'); +import MediaRight = require('./MediaRight'); declare namespace Media { export interface MediaProps extends React.HTMLProps { diff --git a/types/react-bootstrap/lib/Modal.d.ts b/types/react-bootstrap/lib/Modal.d.ts index 357b7fc8a6..9b5ada2cdc 100644 --- a/types/react-bootstrap/lib/Modal.d.ts +++ b/types/react-bootstrap/lib/Modal.d.ts @@ -1,10 +1,10 @@ import * as React from 'react'; import { Sizes, TransitionCallbacks } from 'react-bootstrap'; -import * as ModalBody from './ModalBody'; -import * as ModalHeader from './ModalHeader'; -import * as ModalTitle from './ModalTitle'; -import * as ModalDialog from './ModalDialog'; -import * as ModalFooter from './ModalFooter'; +import ModalBody = require('./ModalBody'); +import ModalHeader = require('./ModalHeader'); +import ModalTitle = require('./ModalTitle'); +import ModalDialog = require('./ModalDialog'); +import ModalFooter = require('./ModalFooter'); declare namespace Modal { interface ModalProps extends TransitionCallbacks, React.HTMLProps { diff --git a/types/react-bootstrap/lib/Navbar.d.ts b/types/react-bootstrap/lib/Navbar.d.ts index 5231c74052..5849c0392e 100644 --- a/types/react-bootstrap/lib/Navbar.d.ts +++ b/types/react-bootstrap/lib/Navbar.d.ts @@ -1,9 +1,9 @@ import * as React from 'react'; import { Sizes } from 'react-bootstrap'; -import * as NavbarBrand from './NavbarBrand'; -import * as NavbarCollapse from './NavbarCollapse'; -import * as NavbarHeader from './NavbarHeader'; -import * as NavbarToggle from './NavbarToggle'; +import NavbarBrand = require('./NavbarBrand'); +import NavbarCollapse = require('./NavbarCollapse'); +import NavbarHeader = require('./NavbarHeader'); +import NavbarToggle = require('./NavbarToggle'); declare namespace Navbar { export interface NavbarProps extends React.HTMLProps { diff --git a/types/react-bootstrap/lib/Pager.d.ts b/types/react-bootstrap/lib/Pager.d.ts index 647fd416c9..076d30a0af 100644 --- a/types/react-bootstrap/lib/Pager.d.ts +++ b/types/react-bootstrap/lib/Pager.d.ts @@ -1,6 +1,6 @@ import * as React from 'react'; import { SelectCallback } from 'react-bootstrap'; -import * as PagerItem from './PagerItem'; +import PagerItem = require('./PagerItem'); declare namespace Pager { export interface PagerProps extends React.HTMLProps { diff --git a/types/react-bootstrap/lib/Pagination.d.ts b/types/react-bootstrap/lib/Pagination.d.ts index 7e14e823fb..ead70fe342 100644 --- a/types/react-bootstrap/lib/Pagination.d.ts +++ b/types/react-bootstrap/lib/Pagination.d.ts @@ -1,11 +1,11 @@ import * as React from 'react'; import { Sizes, SelectCallback } from 'react-bootstrap'; -import * as PaginationFirst from './PaginationFirst' -import * as PaginationPrev from './PaginationPrev' -import * as PaginationNext from './PaginationNext' -import * as PaginationLast from './PaginationLast' -import * as PaginationEllipsis from './PaginationEllipsis' -import * as PaginationItem from './PaginationItem' +import PaginationFirst = require('./PaginationFirst'); +import PaginationPrev = require('./PaginationPrev'); +import PaginationNext = require('./PaginationNext'); +import PaginationLast = require('./PaginationLast'); +import PaginationEllipsis = require('./PaginationEllipsis'); +import PaginationItem = require('./PaginationItem'); declare namespace Pagination { export interface PaginationProps extends React.HTMLProps { diff --git a/types/react-bootstrap/lib/Panel.d.ts b/types/react-bootstrap/lib/Panel.d.ts index 9957ee1339..1494d69041 100644 --- a/types/react-bootstrap/lib/Panel.d.ts +++ b/types/react-bootstrap/lib/Panel.d.ts @@ -1,11 +1,11 @@ import * as React from 'react'; import { TransitionCallbacks, Sizes, SelectCallback } from 'react-bootstrap'; -import * as PanelHeading from './PanelHeading' -import * as PanelTitle from './PanelTitle' -import * as PanelToggle from './PanelToggle' -import * as PanelCollapse from './PanelCollapse' -import * as PanelBody from './PanelBody' -import * as PanelFooter from './PanelFooter' +import PanelHeading = require('./PanelHeading'); +import PanelTitle = require('./PanelTitle'); +import PanelToggle = require('./PanelToggle'); +import PanelCollapse = require('./PanelCollapse'); +import PanelBody = require('./PanelBody'); +import PanelFooter = require('./PanelFooter'); declare namespace Panel { export interface PanelProps extends TransitionCallbacks, React.HTMLProps { @@ -17,7 +17,7 @@ declare namespace Panel { onToggle?: SelectCallback; } } -declare class Panel extends React.Component { +declare class Panel extends React.Component { static Heading: typeof PanelHeading; static Title: typeof PanelTitle; static Toggle: typeof PanelToggle; diff --git a/types/react-bootstrap/lib/Tab.d.ts b/types/react-bootstrap/lib/Tab.d.ts index 1c98d8c0a3..d3df9dcf8c 100644 --- a/types/react-bootstrap/lib/Tab.d.ts +++ b/types/react-bootstrap/lib/Tab.d.ts @@ -1,8 +1,8 @@ import * as React from 'react'; import { TransitionCallbacks, Omit } from 'react-bootstrap'; -import * as TabContainer from './TabContainer'; -import * as TabPane from './TabPane'; -import * as TabContent from './TabContent'; +import TabContainer = require('./TabContainer'); +import TabPane = require('./TabPane'); +import TabContent = require('./TabContent'); declare namespace Tab { export interface TabProps extends TransitionCallbacks, Omit, "title"> { diff --git a/types/react-bootstrap/test/react-bootstrap-individual-components-tests.tsx b/types/react-bootstrap/test/react-bootstrap-individual-components-tests.tsx index 7e44d8c600..07d6a8a442 100644 --- a/types/react-bootstrap/test/react-bootstrap-individual-components-tests.tsx +++ b/types/react-bootstrap/test/react-bootstrap-individual-components-tests.tsx @@ -1,103 +1,103 @@ import * as React from 'react'; -import * as Accordion from 'react-bootstrap/lib/Accordion'; -import * as Alert from 'react-bootstrap/lib/Alert'; -import * as Badge from 'react-bootstrap/lib/Badge'; -import * as Breadcrumb from 'react-bootstrap/lib/Breadcrumb'; -import * as BreadcrumbItem from 'react-bootstrap/lib/BreadcrumbItem'; -import * as Button from 'react-bootstrap/lib/Button'; -import * as ButtonGroup from 'react-bootstrap/lib/ButtonGroup'; -import * as ButtonToolbar from 'react-bootstrap/lib/ButtonToolbar'; -import * as Carousel from 'react-bootstrap/lib/Carousel'; -import * as CarouselCaption from 'react-bootstrap/lib/CarouselCaption'; -import * as CarouselItem from 'react-bootstrap/lib/CarouselItem'; -import * as Checkbox from 'react-bootstrap/lib/Checkbox'; -import * as Clearfix from 'react-bootstrap/lib/Clearfix'; -import * as Col from 'react-bootstrap/lib/Col'; -import * as Collapse from 'react-bootstrap/lib/Collapse'; -import * as ControlLabel from 'react-bootstrap/lib/ControlLabel'; -import * as Dropdown from 'react-bootstrap/lib/Dropdown'; -import * as DropdownButton from 'react-bootstrap/lib/DropdownButton'; -import * as DropdownMenu from 'react-bootstrap/lib/DropdownMenu'; -import * as DropdownToggle from 'react-bootstrap/lib/DropdownToggle'; -import * as Fade from 'react-bootstrap/lib/Fade'; -import * as Form from 'react-bootstrap/lib/Form'; -import * as FormControl from 'react-bootstrap/lib/FormControl'; -import * as FormControlFeedback from 'react-bootstrap/lib/FormControlFeedback'; -import * as FormControlStatic from 'react-bootstrap/lib/FormControlStatic'; -import * as FormGroup from 'react-bootstrap/lib/FormGroup'; -import * as Glyphicon from 'react-bootstrap/lib/Glyphicon'; -import * as Grid from 'react-bootstrap/lib/Grid'; -import * as HelpBlock from 'react-bootstrap/lib/HelpBlock'; -import * as Image from 'react-bootstrap/lib/Image'; -import * as InputGroup from 'react-bootstrap/lib/InputGroup'; -import * as InputGroupAddon from 'react-bootstrap/lib/InputGroupAddon'; -import * as InputGroupButton from 'react-bootstrap/lib/InputGroupButton'; -import * as Jumbotron from 'react-bootstrap/lib/Jumbotron'; -import * as Label from 'react-bootstrap/lib/Label'; -import * as ListGroup from 'react-bootstrap/lib/ListGroup'; -import * as ListGroupItem from 'react-bootstrap/lib/ListGroupItem'; -import * as Media from 'react-bootstrap/lib/Media'; -import * as MediaBody from 'react-bootstrap/lib/MediaBody'; -import * as MediaHeading from 'react-bootstrap/lib/MediaHeading'; -import * as MediaLeft from 'react-bootstrap/lib/MediaLeft'; -import * as MediaList from 'react-bootstrap/lib/MediaList'; -import * as MediaListItem from 'react-bootstrap/lib/MediaListItem'; -import * as MediaRight from 'react-bootstrap/lib/MediaRight'; -import * as MenuItem from 'react-bootstrap/lib/MenuItem'; -import * as Modal from 'react-bootstrap/lib/Modal'; -import * as ModalBody from 'react-bootstrap/lib/ModalBody'; -import * as ModalDialog from 'react-bootstrap/lib/ModalDialog'; -import * as ModalFooter from 'react-bootstrap/lib/ModalFooter'; -import * as ModalHeader from 'react-bootstrap/lib/ModalHeader'; -import * as ModalTitle from 'react-bootstrap/lib/ModalTitle'; -import * as Nav from 'react-bootstrap/lib/Nav'; -import * as NavDropdown from 'react-bootstrap/lib/NavDropdown'; -import * as NavItem from 'react-bootstrap/lib/NavItem'; -import * as Navbar from 'react-bootstrap/lib/Navbar'; -import * as NavbarBrand from 'react-bootstrap/lib/NavbarBrand'; -import * as NavbarCollapse from 'react-bootstrap/lib/NavbarCollapse'; -import * as NavbarHeader from 'react-bootstrap/lib/NavbarHeader'; -import * as NavbarToggle from 'react-bootstrap/lib/NavbarToggle'; -import * as Overlay from 'react-bootstrap/lib/Overlay'; -import * as OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger'; -import * as PageHeader from 'react-bootstrap/lib/PageHeader'; -import * as PageItem from 'react-bootstrap/lib/PageItem'; -import * as Pager from 'react-bootstrap/lib/Pager'; -import * as PagerItem from 'react-bootstrap/lib/PagerItem'; -import * as Pagination from 'react-bootstrap/lib/Pagination'; -import * as PaginationFirst from 'react-bootstrap/lib/PaginationFirst'; -import * as PaginationPrev from 'react-bootstrap/lib/PaginationPrev'; -import * as PaginationNext from 'react-bootstrap/lib/PaginationNext'; -import * as PaginationLast from 'react-bootstrap/lib/PaginationLast'; -import * as PaginationEllipsis from 'react-bootstrap/lib/PaginationEllipsis'; -import * as PaginationItem from 'react-bootstrap/lib/PaginationItem'; -import * as Panel from 'react-bootstrap/lib/Panel'; -import * as PanelHeading from 'react-bootstrap/lib/PanelHeading'; -import * as PanelTitle from 'react-bootstrap/lib/PanelTitle'; -import * as PanelToggle from 'react-bootstrap/lib/PanelToggle'; -import * as PanelCollapse from 'react-bootstrap/lib/PanelCollapse'; -import * as PanelBody from 'react-bootstrap/lib/PanelBody'; -import * as PanelFooter from 'react-bootstrap/lib/PanelFooter'; -import * as PanelGroup from 'react-bootstrap/lib/PanelGroup'; -import * as Popover from 'react-bootstrap/lib/Popover'; -import * as ProgressBar from 'react-bootstrap/lib/ProgressBar'; -import * as Radio from 'react-bootstrap/lib/Radio'; -import * as ResponsiveEmbed from 'react-bootstrap/lib/ResponsiveEmbed'; -import * as Row from 'react-bootstrap/lib/Row'; -import * as SafeAnchor from 'react-bootstrap/lib/SafeAnchor'; -import * as SplitButton from 'react-bootstrap/lib/SplitButton'; -import * as SplitToggle from 'react-bootstrap/lib/SplitToggle'; -import * as Tab from 'react-bootstrap/lib/Tab'; -import * as TabContainer from 'react-bootstrap/lib/TabContainer'; -import * as TabContent from 'react-bootstrap/lib/TabContent'; -import * as TabPane from 'react-bootstrap/lib/TabPane'; -import * as Table from 'react-bootstrap/lib/Table'; -import * as Tabs from 'react-bootstrap/lib/Tabs'; -import * as Thumbnail from 'react-bootstrap/lib/Thumbnail'; -import * as ToggleButton from 'react-bootstrap/lib/ToggleButton'; -import * as ToggleButtonGroup from 'react-bootstrap/lib/ToggleButtonGroup'; -import * as Tooltip from 'react-bootstrap/lib/Tooltip'; -import * as Well from 'react-bootstrap/lib/Well'; +import Accordion = require('react-bootstrap/lib/Accordion'); +import Alert = require('react-bootstrap/lib/Alert'); +import Badge = require('react-bootstrap/lib/Badge'); +import Breadcrumb = require('react-bootstrap/lib/Breadcrumb'); +import BreadcrumbItem = require('react-bootstrap/lib/BreadcrumbItem'); +import Button = require('react-bootstrap/lib/Button'); +import ButtonGroup = require('react-bootstrap/lib/ButtonGroup'); +import ButtonToolbar = require('react-bootstrap/lib/ButtonToolbar'); +import Carousel = require('react-bootstrap/lib/Carousel'); +import CarouselCaption = require('react-bootstrap/lib/CarouselCaption'); +import CarouselItem = require('react-bootstrap/lib/CarouselItem'); +import Checkbox = require('react-bootstrap/lib/Checkbox'); +import Clearfix = require('react-bootstrap/lib/Clearfix'); +import Col = require('react-bootstrap/lib/Col'); +import Collapse = require('react-bootstrap/lib/Collapse'); +import ControlLabel = require('react-bootstrap/lib/ControlLabel'); +import Dropdown = require('react-bootstrap/lib/Dropdown'); +import DropdownButton = require('react-bootstrap/lib/DropdownButton'); +import DropdownMenu = require('react-bootstrap/lib/DropdownMenu'); +import DropdownToggle = require('react-bootstrap/lib/DropdownToggle'); +import Fade = require('react-bootstrap/lib/Fade'); +import Form = require('react-bootstrap/lib/Form'); +import FormControl = require('react-bootstrap/lib/FormControl'); +import FormControlFeedback = require('react-bootstrap/lib/FormControlFeedback'); +import FormControlStatic = require('react-bootstrap/lib/FormControlStatic'); +import FormGroup = require('react-bootstrap/lib/FormGroup'); +import Glyphicon = require('react-bootstrap/lib/Glyphicon'); +import Grid = require('react-bootstrap/lib/Grid'); +import HelpBlock = require('react-bootstrap/lib/HelpBlock'); +import Image = require('react-bootstrap/lib/Image'); +import InputGroup = require('react-bootstrap/lib/InputGroup'); +import InputGroupAddon = require('react-bootstrap/lib/InputGroupAddon'); +import InputGroupButton = require('react-bootstrap/lib/InputGroupButton'); +import Jumbotron = require('react-bootstrap/lib/Jumbotron'); +import Label = require('react-bootstrap/lib/Label'); +import ListGroup = require('react-bootstrap/lib/ListGroup'); +import ListGroupItem = require('react-bootstrap/lib/ListGroupItem'); +import Media = require('react-bootstrap/lib/Media'); +import MediaBody = require('react-bootstrap/lib/MediaBody'); +import MediaHeading = require('react-bootstrap/lib/MediaHeading'); +import MediaLeft = require('react-bootstrap/lib/MediaLeft'); +import MediaList = require('react-bootstrap/lib/MediaList'); +import MediaListItem = require('react-bootstrap/lib/MediaListItem'); +import MediaRight = require('react-bootstrap/lib/MediaRight'); +import MenuItem = require('react-bootstrap/lib/MenuItem'); +import Modal = require('react-bootstrap/lib/Modal'); +import ModalBody = require('react-bootstrap/lib/ModalBody'); +import ModalDialog = require('react-bootstrap/lib/ModalDialog'); +import ModalFooter = require('react-bootstrap/lib/ModalFooter'); +import ModalHeader = require('react-bootstrap/lib/ModalHeader'); +import ModalTitle = require('react-bootstrap/lib/ModalTitle'); +import Nav = require('react-bootstrap/lib/Nav'); +import NavDropdown = require('react-bootstrap/lib/NavDropdown'); +import NavItem = require('react-bootstrap/lib/NavItem'); +import Navbar = require('react-bootstrap/lib/Navbar'); +import NavbarBrand = require('react-bootstrap/lib/NavbarBrand'); +import NavbarCollapse = require('react-bootstrap/lib/NavbarCollapse'); +import NavbarHeader = require('react-bootstrap/lib/NavbarHeader'); +import NavbarToggle = require('react-bootstrap/lib/NavbarToggle'); +import Overlay = require('react-bootstrap/lib/Overlay'); +import OverlayTrigger = require('react-bootstrap/lib/OverlayTrigger'); +import PageHeader = require('react-bootstrap/lib/PageHeader'); +import PageItem = require('react-bootstrap/lib/PageItem'); +import Pager = require('react-bootstrap/lib/Pager'); +import PagerItem = require('react-bootstrap/lib/PagerItem'); +import Pagination = require('react-bootstrap/lib/Pagination'); +import PaginationFirst = require('react-bootstrap/lib/PaginationFirst'); +import PaginationPrev = require('react-bootstrap/lib/PaginationPrev'); +import PaginationNext = require('react-bootstrap/lib/PaginationNext'); +import PaginationLast = require('react-bootstrap/lib/PaginationLast'); +import PaginationEllipsis = require('react-bootstrap/lib/PaginationEllipsis'); +import PaginationItem = require('react-bootstrap/lib/PaginationItem'); +import Panel = require('react-bootstrap/lib/Panel'); +import PanelHeading = require('react-bootstrap/lib/PanelHeading'); +import PanelTitle = require('react-bootstrap/lib/PanelTitle'); +import PanelToggle = require('react-bootstrap/lib/PanelToggle'); +import PanelCollapse = require('react-bootstrap/lib/PanelCollapse'); +import PanelBody = require('react-bootstrap/lib/PanelBody'); +import PanelFooter = require('react-bootstrap/lib/PanelFooter'); +import PanelGroup = require('react-bootstrap/lib/PanelGroup'); +import Popover = require('react-bootstrap/lib/Popover'); +import ProgressBar = require('react-bootstrap/lib/ProgressBar'); +import Radio = require('react-bootstrap/lib/Radio'); +import ResponsiveEmbed = require('react-bootstrap/lib/ResponsiveEmbed'); +import Row = require('react-bootstrap/lib/Row'); +import SafeAnchor = require('react-bootstrap/lib/SafeAnchor'); +import SplitButton = require('react-bootstrap/lib/SplitButton'); +import SplitToggle = require('react-bootstrap/lib/SplitToggle'); +import Tab = require('react-bootstrap/lib/Tab'); +import TabContainer = require('react-bootstrap/lib/TabContainer'); +import TabContent = require('react-bootstrap/lib/TabContent'); +import TabPane = require('react-bootstrap/lib/TabPane'); +import Table = require('react-bootstrap/lib/Table'); +import Tabs = require('react-bootstrap/lib/Tabs'); +import Thumbnail = require('react-bootstrap/lib/Thumbnail'); +import ToggleButton = require('react-bootstrap/lib/ToggleButton'); +import ToggleButtonGroup = require('react-bootstrap/lib/ToggleButtonGroup'); +import Tooltip = require('react-bootstrap/lib/Tooltip'); +import Well = require('react-bootstrap/lib/Well'); const noop = () => {}; diff --git a/types/react-bootstrap/tsconfig.json b/types/react-bootstrap/tsconfig.json index 6368cc93de..52170e4830 100644 --- a/types/react-bootstrap/tsconfig.json +++ b/types/react-bootstrap/tsconfig.json @@ -17,6 +17,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noUnusedLocals": false }, "files": [ diff --git a/types/react-breadcrumbs-dynamic/tsconfig.json b/types/react-breadcrumbs-dynamic/tsconfig.json index 8b058ae2d6..8a8faf69a6 100644 --- a/types/react-breadcrumbs-dynamic/tsconfig.json +++ b/types/react-breadcrumbs-dynamic/tsconfig.json @@ -16,10 +16,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-breadcrumbs-dynamic-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-breadcrumbs/react-breadcrumbs-tests.tsx b/types/react-breadcrumbs/react-breadcrumbs-tests.tsx index b8a51bf36e..980b27fe41 100644 --- a/types/react-breadcrumbs/react-breadcrumbs-tests.tsx +++ b/types/react-breadcrumbs/react-breadcrumbs-tests.tsx @@ -1,12 +1,10 @@ import * as React from 'react'; import * as ReactRouter from "react-router"; -import * as Breadcrumbs from 'react-breadcrumbs'; - +import Breadcrumbs = require('react-breadcrumbs'); interface MyComponentProps extends ReactRouter.RouteComponentProps<{}, { id: number }> { } - class MyComponent extends React.Component { render() { return ( diff --git a/types/react-breadcrumbs/tsconfig.json b/types/react-breadcrumbs/tsconfig.json index 15b3328f6b..b93f3da81d 100644 --- a/types/react-breadcrumbs/tsconfig.json +++ b/types/react-breadcrumbs/tsconfig.json @@ -24,6 +24,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-broadcast/tsconfig.json b/types/react-broadcast/tsconfig.json index 270151cc33..60a86c386a 100644 --- a/types/react-broadcast/tsconfig.json +++ b/types/react-broadcast/tsconfig.json @@ -1,17 +1,26 @@ { - "compilerOptions": { - "baseUrl": "../", - "typeRoots": ["../"], - "types": [], - "module": "commonjs", - "lib": ["es6", "dom"], - "jsx": "react", - "strictNullChecks": true, - "strictFunctionTypes": false, - "noImplicitAny": true, - "noImplicitThis": true, - "forceConsistentCasingInFileNames": true, - "noEmit": true - }, - "files": ["index.d.ts", "react-broadcast-tests.tsx"] -} + "compilerOptions": { + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "jsx": "react", + "strictNullChecks": true, + "strictFunctionTypes": false, + "noImplicitAny": true, + "noImplicitThis": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, + "noEmit": true + }, + "files": [ + "index.d.ts", + "react-broadcast-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-burger-menu/tsconfig.json b/types/react-burger-menu/tsconfig.json index e8f6d518a5..aff886d199 100644 --- a/types/react-burger-menu/tsconfig.json +++ b/types/react-burger-menu/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-bytesize-icons/tsconfig.json b/types/react-bytesize-icons/tsconfig.json index fdabe49e81..8010451c5f 100644 --- a/types/react-bytesize-icons/tsconfig.json +++ b/types/react-bytesize-icons/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-calendar-heatmap/tsconfig.json b/types/react-calendar-heatmap/tsconfig.json index f605aa4478..7c2cd99718 100644 --- a/types/react-calendar-heatmap/tsconfig.json +++ b/types/react-calendar-heatmap/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-calendar-timeline/tsconfig.json b/types/react-calendar-timeline/tsconfig.json index 0338517fd1..e5a81f1587 100644 --- a/types/react-calendar-timeline/tsconfig.json +++ b/types/react-calendar-timeline/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-cartographer/tsconfig.json b/types/react-cartographer/tsconfig.json index dcf04419fe..2e8720d967 100644 --- a/types/react-cartographer/tsconfig.json +++ b/types/react-cartographer/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-click-outside/react-click-outside-tests.tsx b/types/react-click-outside/react-click-outside-tests.tsx index 6f215e39a8..6aa375b153 100644 --- a/types/react-click-outside/react-click-outside-tests.tsx +++ b/types/react-click-outside/react-click-outside-tests.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { render } from 'react-dom'; -import * as enhanceWithClickOutside from 'react-click-outside'; +import enhanceWithClickOutside = require('react-click-outside'); interface Props { text: string; diff --git a/types/react-click-outside/tsconfig.json b/types/react-click-outside/tsconfig.json index 57ca39a8f0..2ca464b34b 100644 --- a/types/react-click-outside/tsconfig.json +++ b/types/react-click-outside/tsconfig.json @@ -1,25 +1,26 @@ { - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "jsx": "react", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "react-click-outside-tests.tsx" - ] -} + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "react-click-outside-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-codemirror/react-codemirror-tests.tsx b/types/react-codemirror/react-codemirror-tests.tsx index f794e49d94..8673925d1c 100644 --- a/types/react-codemirror/react-codemirror-tests.tsx +++ b/types/react-codemirror/react-codemirror-tests.tsx @@ -1,7 +1,7 @@ -import * as CodeMirror from "codemirror"; +import CodeMirror = require("codemirror"); import * as React from "react"; import * as ReactDOM from "react-dom"; -import * as Codemirror from "react-codemirror"; +import Codemirror = require("react-codemirror"); class CodemirrorTest extends React.Component> { private editorRef: ReactCodeMirror.ReactCodeMirror; diff --git a/types/react-codemirror/tsconfig.json b/types/react-codemirror/tsconfig.json index af24eb1e1f..f127379ce4 100644 --- a/types/react-codemirror/tsconfig.json +++ b/types/react-codemirror/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-collapse/tsconfig.json b/types/react-collapse/tsconfig.json index 291864c9d3..e1c406e099 100644 --- a/types/react-collapse/tsconfig.json +++ b/types/react-collapse/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-collapse-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-color/tsconfig.json b/types/react-color/tsconfig.json index f52a34c374..6d2d8c0281 100644 --- a/types/react-color/tsconfig.json +++ b/types/react-color/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react", "noUnusedParameters": true, "noUnusedLocals": true diff --git a/types/react-confirm/tsconfig.json b/types/react-confirm/tsconfig.json index da3acdd363..4de5e08c45 100644 --- a/types/react-confirm/tsconfig.json +++ b/types/react-confirm/tsconfig.json @@ -15,10 +15,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ "index.d.ts", "react-confirm-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-content-loader/tsconfig.json b/types/react-content-loader/tsconfig.json index 4385503dc9..39d6a9d75a 100644 --- a/types/react-content-loader/tsconfig.json +++ b/types/react-content-loader/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } -} +} \ No newline at end of file diff --git a/types/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx b/types/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx index a3459a66a5..c411139501 100644 --- a/types/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx +++ b/types/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import * as CopyToClipboard from "react-copy-to-clipboard"; +import CopyToClipboard = require("react-copy-to-clipboard"); export class Test extends React.Component { render() { diff --git a/types/react-copy-to-clipboard/tsconfig.json b/types/react-copy-to-clipboard/tsconfig.json index 99987e8aff..131ab41240 100644 --- a/types/react-copy-to-clipboard/tsconfig.json +++ b/types/react-copy-to-clipboard/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-cropper/tsconfig.json b/types/react-cropper/tsconfig.json index aab8a09ee5..7594ac5442 100644 --- a/types/react-cropper/tsconfig.json +++ b/types/react-cropper/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-css-modules/react-css-modules-tests.tsx b/types/react-css-modules/react-css-modules-tests.tsx index da191799c7..967036a8d0 100644 --- a/types/react-css-modules/react-css-modules-tests.tsx +++ b/types/react-css-modules/react-css-modules-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import * as CSSModules from 'react-css-modules'; +import CSSModules= require('react-css-modules'); const styles = {}; diff --git a/types/react-css-modules/tsconfig.json b/types/react-css-modules/tsconfig.json index 0975a113c1..af20eae1b1 100644 --- a/types/react-css-modules/tsconfig.json +++ b/types/react-css-modules/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react", "experimentalDecorators": true }, diff --git a/types/react-css-transition-replace/react-css-transition-replace-tests.tsx b/types/react-css-transition-replace/react-css-transition-replace-tests.tsx index 2da448d448..acbd376a1b 100644 --- a/types/react-css-transition-replace/react-css-transition-replace-tests.tsx +++ b/types/react-css-transition-replace/react-css-transition-replace-tests.tsx @@ -1,6 +1,6 @@ import * as React from "react" import { render } from 'react-dom'; -import * as CSSTransitionReplace from "react-css-transition-replace" +import CSSTransitionReplace = require("react-css-transition-replace"); render( diff --git a/types/react-css-transition-replace/tsconfig.json b/types/react-css-transition-replace/tsconfig.json index 7aff1dd2cc..28fdca36a7 100644 --- a/types/react-css-transition-replace/tsconfig.json +++ b/types/react-css-transition-replace/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-custom-scrollbars/tsconfig.json b/types/react-custom-scrollbars/tsconfig.json index a03a9609b1..3b1d5a433a 100644 --- a/types/react-custom-scrollbars/tsconfig.json +++ b/types/react-custom-scrollbars/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-custom-scrollbars/v3/tsconfig.json b/types/react-custom-scrollbars/v3/tsconfig.json index 47d2b5bc45..f57ff94fcf 100644 --- a/types/react-custom-scrollbars/v3/tsconfig.json +++ b/types/react-custom-scrollbars/v3/tsconfig.json @@ -24,6 +24,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-data-grid/react-data-grid-tests.tsx b/types/react-data-grid/react-data-grid-tests.tsx index 1b42af7ae6..827e20c820 100644 --- a/types/react-data-grid/react-data-grid-tests.tsx +++ b/types/react-data-grid/react-data-grid-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import * as ReactDataGrid from 'react-data-grid'; +import ReactDataGrid = require('react-data-grid'); import * as ReactDataGridPlugins from 'react-data-grid-addons'; import faker = require('faker'); diff --git a/types/react-data-grid/tsconfig.json b/types/react-data-grid/tsconfig.json index a113c4a69e..164a9e3303 100644 --- a/types/react-data-grid/tsconfig.json +++ b/types/react-data-grid/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-data-grid/v1/react-data-grid-tests.tsx b/types/react-data-grid/v1/react-data-grid-tests.tsx index bff860ee02..371831b43a 100644 --- a/types/react-data-grid/v1/react-data-grid-tests.tsx +++ b/types/react-data-grid/v1/react-data-grid-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import * as ReactDataGrid from 'react-data-grid'; +import ReactDataGrid = require('react-data-grid'); import * as ReactDataGridPlugins from 'react-data-grid/addons'; import faker = require('faker'); diff --git a/types/react-data-grid/v1/tsconfig.json b/types/react-data-grid/v1/tsconfig.json index c2602fd049..e16c68f9eb 100644 --- a/types/react-data-grid/v1/tsconfig.json +++ b/types/react-data-grid/v1/tsconfig.json @@ -17,6 +17,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "paths": { "react-data-grid": [ "react-data-grid/v1" diff --git a/types/react-datagrid/tsconfig.json b/types/react-datagrid/tsconfig.json index 111a9dd7ea..2bb8c4211c 100644 --- a/types/react-datagrid/tsconfig.json +++ b/types/react-datagrid/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-date-range/tsconfig.json b/types/react-date-range/tsconfig.json index 91979c462d..57a4fe941c 100644 --- a/types/react-date-range/tsconfig.json +++ b/types/react-date-range/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-datepicker/index.d.ts b/types/react-datepicker/index.d.ts index cb68e8f0b2..60309b7f20 100644 --- a/types/react-datepicker/index.d.ts +++ b/types/react-datepicker/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-datepicker 1.0 +// Type definitions for react-datepicker 1.1 // Project: https://github.com/Hacker0x01/react-datepicker // Definitions by: Rajab Shakirov , // Andrey Balokha , @@ -37,6 +37,7 @@ export interface ReactDatePickerProps { highlightDates?: any[]; id?: string; includeDates?: any[]; + includeTimes?: any[]; inline?: boolean; isClearable?: boolean; locale?: string; @@ -64,10 +65,13 @@ export interface ReactDatePickerProps { readOnly?: boolean; required?: boolean; scrollableYearDropdown?: boolean; + scrollableMonthYearDropdown?: boolean; selected?: moment.Moment | null; selectsEnd?: boolean; selectsStart?: boolean; + showDisabledMonthNavigation?: boolean; showMonthDropdown?: boolean; + showMonthYearDropdown?: boolean; showWeekNumbers?: boolean; showYearDropdown?: boolean; startDate?: moment.Moment; diff --git a/types/react-datepicker/react-datepicker-tests.tsx b/types/react-datepicker/react-datepicker-tests.tsx index 4d5edad58e..92cf23e38b 100644 --- a/types/react-datepicker/react-datepicker-tests.tsx +++ b/types/react-datepicker/react-datepicker-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import * as moment from 'moment'; +import moment = require('moment'); import DatePicker from 'react-datepicker'; class ReactDatePicker extends React.Component<{}, { startDate: moment.Moment; displayName: string; }> { diff --git a/types/react-datepicker/tsconfig.json b/types/react-datepicker/tsconfig.json index 39a236a343..f837f933ec 100644 --- a/types/react-datepicker/tsconfig.json +++ b/types/react-datepicker/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-daterange-picker/tsconfig.json b/types/react-daterange-picker/tsconfig.json index 72fcee1873..2f62e76a6b 100644 --- a/types/react-daterange-picker/tsconfig.json +++ b/types/react-daterange-picker/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-dates/index.d.ts b/types/react-dates/index.d.ts index ef501229ff..abc0de7498 100644 --- a/types/react-dates/index.d.ts +++ b/types/react-dates/index.d.ts @@ -66,6 +66,7 @@ declare namespace ReactDates { reopenPickerOnClearDates?: boolean, renderCalendarInfo?: () => (string | JSX.Element), hideKeyboardShortcutsPanel?: boolean, + daySize?: number, isRTL?: boolean, // navigation related props @@ -145,6 +146,9 @@ declare namespace ReactDates { customInputIcon?: string | JSX.Element, noBorder?: boolean, block?: boolean, + small?: boolean, + regular?: boolean, + keepFocusOnInput?: boolean, // calendar presentation and interaction related props renderMonth?: (day: momentPropTypes.momentObj) => (string | JSX.Element), @@ -162,6 +166,8 @@ declare namespace ReactDates { hideKeyboardShortcutsPanel?: boolean, daySize?: number, isRTL?: boolean, + verticalSpacing?: number, + verticalHeight?: number| null, // navigation related props navPrev?: string | JSX.Element, diff --git a/types/react-dates/react-dates-tests.tsx b/types/react-dates/react-dates-tests.tsx index f9d3118a4f..6462a6ebd5 100644 --- a/types/react-dates/react-dates-tests.tsx +++ b/types/react-dates/react-dates-tests.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import * as moment from "moment"; +import moment = require("moment"); import { SingleDatePicker, @@ -13,9 +13,6 @@ import { toLocalizedDateString, toMomentObject } from "react-dates"; - - - class SingleDatePickerMinimumTest extends React.Component { render() { return day.toString()} + verticalSpacing={4} + keepFocusOnInput={true} + verticalHeight={5} + regular={true} + small={true} /> } } diff --git a/types/react-dates/tsconfig.json b/types/react-dates/tsconfig.json index 82a46d3cd2..30d8a41725 100644 --- a/types/react-dates/tsconfig.json +++ b/types/react-dates/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-daum-postcode/tsconfig.json b/types/react-daum-postcode/tsconfig.json index 134796ae08..9e639e241b 100644 --- a/types/react-daum-postcode/tsconfig.json +++ b/types/react-daum-postcode/tsconfig.json @@ -21,6 +21,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/react-dnd-html5-backend/tsconfig.json b/types/react-dnd-html5-backend/tsconfig.json index dca11ac9e1..18fefef18a 100644 --- a/types/react-dnd-html5-backend/tsconfig.json +++ b/types/react-dnd-html5-backend/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-dnd-multi-backend/tsconfig.json b/types/react-dnd-multi-backend/tsconfig.json index e9857447ef..abef2d8e50 100644 --- a/types/react-dnd-multi-backend/tsconfig.json +++ b/types/react-dnd-multi-backend/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ @@ -23,4 +24,4 @@ "lib/HTML5toTouch.d.ts", "react-dnd-multi-backend-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-dnd-test-backend/tsconfig.json b/types/react-dnd-test-backend/tsconfig.json index aaf674e57e..bc65096358 100644 --- a/types/react-dnd-test-backend/tsconfig.json +++ b/types/react-dnd-test-backend/tsconfig.json @@ -16,10 +16,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-dnd-test-backend-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-dnd-touch-backend/tsconfig.json b/types/react-dnd-touch-backend/tsconfig.json index 926592e1c3..14b02858d5 100644 --- a/types/react-dnd-touch-backend/tsconfig.json +++ b/types/react-dnd-touch-backend/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-dnd-touch-backend-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/react-dnd/tsconfig.json b/types/react-dnd/tsconfig.json index 0f441c38f4..559dc32de8 100644 --- a/types/react-dnd/tsconfig.json +++ b/types/react-dnd/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-document-title/tsconfig.json b/types/react-document-title/tsconfig.json index 5d63d21fb6..553fffc4ec 100644 --- a/types/react-document-title/tsconfig.json +++ b/types/react-document-title/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-dom-factories/tsconfig.json b/types/react-dom-factories/tsconfig.json index 8cdf540399..9ed92f90a5 100644 --- a/types/react-dom-factories/tsconfig.json +++ b/types/react-dom-factories/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-dom-factories-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/react-dom/tsconfig.json b/types/react-dom/tsconfig.json index 0d21b07029..6f538370c7 100644 --- a/types/react-dom/tsconfig.json +++ b/types/react-dom/tsconfig.json @@ -23,6 +23,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "preserve" } } \ No newline at end of file diff --git a/types/react-dom/v15/tsconfig.json b/types/react-dom/v15/tsconfig.json index 8f07ba2276..051926d31f 100644 --- a/types/react-dom/v15/tsconfig.json +++ b/types/react-dom/v15/tsconfig.json @@ -30,6 +30,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/react-dropzone/tsconfig.json b/types/react-dropzone/tsconfig.json index 0dbb3fedc8..cb1d0ed443 100644 --- a/types/react-dropzone/tsconfig.json +++ b/types/react-dropzone/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-dropzone/v2/tsconfig.json b/types/react-dropzone/v2/tsconfig.json index 3ea5a034b1..4fcfb1c416 100644 --- a/types/react-dropzone/v2/tsconfig.json +++ b/types/react-dropzone/v2/tsconfig.json @@ -21,7 +21,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-dropzone/v3/tsconfig.json b/types/react-dropzone/v3/tsconfig.json index 46c4c4cbff..79d579b424 100644 --- a/types/react-dropzone/v3/tsconfig.json +++ b/types/react-dropzone/v3/tsconfig.json @@ -21,7 +21,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-dynamic-number/tsconfig.json b/types/react-dynamic-number/tsconfig.json index ad1a3aee65..5b563dabb3 100644 --- a/types/react-dynamic-number/tsconfig.json +++ b/types/react-dynamic-number/tsconfig.json @@ -1,17 +1,26 @@ { "compilerOptions": { "module": "commonjs", - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react", "strictFunctionTypes": true }, - "files": ["index.d.ts", "react-dynamic-number-tests.tsx"] -} + "files": [ + "index.d.ts", + "react-dynamic-number-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-easy-chart/tsconfig.json b/types/react-easy-chart/tsconfig.json index 06dd62395e..3424d6ec5d 100644 --- a/types/react-easy-chart/tsconfig.json +++ b/types/react-easy-chart/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-event-listener/tsconfig.json b/types/react-event-listener/tsconfig.json index 79cad9b350..e3942956bd 100644 --- a/types/react-event-listener/tsconfig.json +++ b/types/react-event-listener/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-fa/tsconfig.json b/types/react-fa/tsconfig.json index ee7e57f029..239ae74c16 100644 --- a/types/react-fa/tsconfig.json +++ b/types/react-fa/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-facebook-login/tsconfig.json b/types/react-facebook-login/tsconfig.json index 4d76e11a0f..56a7ac71be 100644 --- a/types/react-facebook-login/tsconfig.json +++ b/types/react-facebook-login/tsconfig.json @@ -17,7 +17,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-faux-dom/tsconfig.json b/types/react-faux-dom/tsconfig.json index 198db32576..e1fa17fe85 100644 --- a/types/react-faux-dom/tsconfig.json +++ b/types/react-faux-dom/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-file-input/tsconfig.json b/types/react-file-input/tsconfig.json index 8455a75373..dc48ce1765 100644 --- a/types/react-file-input/tsconfig.json +++ b/types/react-file-input/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-file-reader-input/react-file-reader-input-tests.tsx b/types/react-file-reader-input/react-file-reader-input-tests.tsx index 5170780d8b..0367152f27 100644 --- a/types/react-file-reader-input/react-file-reader-input-tests.tsx +++ b/types/react-file-reader-input/react-file-reader-input-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import * as FileReaderInput from 'react-file-reader-input'; +import FileReaderInput = require('react-file-reader-input'); class MyComponent extends React.Component { handleChange = (event: React.SyntheticEvent, results: FileReaderInput.Result[]) => { diff --git a/types/react-file-reader-input/tsconfig.json b/types/react-file-reader-input/tsconfig.json index 020a2e0930..fd16c142a7 100644 --- a/types/react-file-reader-input/tsconfig.json +++ b/types/react-file-reader-input/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-flags-select/tsconfig.json b/types/react-flags-select/tsconfig.json index f42fa48c4a..58d5e1b668 100644 --- a/types/react-flags-select/tsconfig.json +++ b/types/react-flags-select/tsconfig.json @@ -16,10 +16,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-flags-select-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-flatpickr/tsconfig.json b/types/react-flatpickr/tsconfig.json index dbde62f5d3..3822782936 100644 --- a/types/react-flatpickr/tsconfig.json +++ b/types/react-flatpickr/tsconfig.json @@ -16,7 +16,8 @@ "types": [], "jsx": "react", "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-flex/tsconfig.json b/types/react-flex/tsconfig.json index 2020f9dda4..9e7c9867d6 100644 --- a/types/react-flex/tsconfig.json +++ b/types/react-flex/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "preserve" }, "files": [ diff --git a/types/react-flexr/tsconfig.json b/types/react-flexr/tsconfig.json index 56580115a2..c1ea7ad8fe 100644 --- a/types/react-flexr/tsconfig.json +++ b/types/react-flexr/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-fontawesome/tsconfig.json b/types/react-fontawesome/tsconfig.json index c94422a8b8..fa397d8a5f 100644 --- a/types/react-fontawesome/tsconfig.json +++ b/types/react-fontawesome/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-form/tsconfig.json b/types/react-form/tsconfig.json index d6c6d41dca..cc5dcb26ba 100644 --- a/types/react-form/tsconfig.json +++ b/types/react-form/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-form/v1/tsconfig.json b/types/react-form/v1/tsconfig.json index c1691ba3b1..978f7f0673 100644 --- a/types/react-form/v1/tsconfig.json +++ b/types/react-form/v1/tsconfig.json @@ -1,30 +1,31 @@ { - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../../", - "jsx": "react", - "typeRoots": [ - "../../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true, - "paths": { - "react-form": [ - "react-form/v1" - ] - } - }, - "files": [ - "index.d.ts", - "react-form-tests.tsx" - ] + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "jsx": "react", + "typeRoots": [ + "../../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, + "paths": { + "react-form": [ + "react-form/v1" + ] + } + }, + "files": [ + "index.d.ts", + "react-form-tests.tsx" + ] } \ No newline at end of file diff --git a/types/react-foundation/tsconfig.json b/types/react-foundation/tsconfig.json index 565dbdcece..319ef45694 100644 --- a/types/react-foundation/tsconfig.json +++ b/types/react-foundation/tsconfig.json @@ -17,6 +17,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noUnusedLocals": false }, "files": [ diff --git a/types/react-geosuggest/tsconfig.json b/types/react-geosuggest/tsconfig.json index 304546787b..262fa75ee4 100644 --- a/types/react-geosuggest/tsconfig.json +++ b/types/react-geosuggest/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-google-recaptcha/tsconfig.json b/types/react-google-recaptcha/tsconfig.json index bbd1cfd004..4f519873bc 100644 --- a/types/react-google-recaptcha/tsconfig.json +++ b/types/react-google-recaptcha/tsconfig.json @@ -16,10 +16,11 @@ "types": [], "jsx": "react", "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-google-recaptcha-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-gravatar/react-gravatar-tests.tsx b/types/react-gravatar/react-gravatar-tests.tsx index 1482af274d..f89881e930 100644 --- a/types/react-gravatar/react-gravatar-tests.tsx +++ b/types/react-gravatar/react-gravatar-tests.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import * as Gravatar from "react-gravatar"; +import Gravatar = require("react-gravatar"); class GravatarEmailTest extends React.Component { render() { diff --git a/types/react-gravatar/tsconfig.json b/types/react-gravatar/tsconfig.json index cd0f8f5f34..59e0af6a9b 100644 --- a/types/react-gravatar/tsconfig.json +++ b/types/react-gravatar/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-grid-layout/react-grid-layout-tests.tsx b/types/react-grid-layout/react-grid-layout-tests.tsx index 6c47e42d95..78ecf594ef 100644 --- a/types/react-grid-layout/react-grid-layout-tests.tsx +++ b/types/react-grid-layout/react-grid-layout-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import * as ReactGridLayout from 'react-grid-layout'; +import ReactGridLayout = require('react-grid-layout'); import { Responsive, WidthProvider } from 'react-grid-layout'; const ResponsiveWidth = WidthProvider(Responsive); diff --git a/types/react-grid-layout/tsconfig.json b/types/react-grid-layout/tsconfig.json index c6f201354f..c337a8dceb 100644 --- a/types/react-grid-layout/tsconfig.json +++ b/types/react-grid-layout/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-hamburger-menu/tsconfig.json b/types/react-hamburger-menu/tsconfig.json index 54703bb696..a254b9f4bb 100644 --- a/types/react-hamburger-menu/tsconfig.json +++ b/types/react-hamburger-menu/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-helmet/tsconfig.json b/types/react-helmet/tsconfig.json index e0c7684aae..26cb9dbb4c 100644 --- a/types/react-helmet/tsconfig.json +++ b/types/react-helmet/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-helmet/v4/react-helmet-tests.tsx b/types/react-helmet/v4/react-helmet-tests.tsx index e6b78955b3..695751d381 100644 --- a/types/react-helmet/v4/react-helmet-tests.tsx +++ b/types/react-helmet/v4/react-helmet-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import * as Helmet from 'react-helmet'; +import Helmet = require('react-helmet'); diff --git a/types/react-helmet/v4/tsconfig.json b/types/react-helmet/v4/tsconfig.json index 6f93ba793e..3f541f396f 100644 --- a/types/react-helmet/v4/tsconfig.json +++ b/types/react-helmet/v4/tsconfig.json @@ -21,7 +21,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-highlight-words/tsconfig.json b/types/react-highlight-words/tsconfig.json index 1617289fa7..f01085be0d 100644 --- a/types/react-highlight-words/tsconfig.json +++ b/types/react-highlight-words/tsconfig.json @@ -16,7 +16,8 @@ "types": [], "jsx": "react", "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-highlighter/tsconfig.json b/types/react-highlighter/tsconfig.json index 45e30a642e..36510b6cc1 100644 --- a/types/react-highlighter/tsconfig.json +++ b/types/react-highlighter/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-holder/tsconfig.json b/types/react-holder/tsconfig.json index e8ee50c417..1b16b51f6d 100644 --- a/types/react-holder/tsconfig.json +++ b/types/react-holder/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-hot-loader/tsconfig.json b/types/react-hot-loader/tsconfig.json index 5e898cb303..fcd362bb8c 100644 --- a/types/react-hot-loader/tsconfig.json +++ b/types/react-hot-loader/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-hyperscript/react-hyperscript-tests.ts b/types/react-hyperscript/react-hyperscript-tests.ts index 4be72a9b6a..12303dfd2e 100644 --- a/types/react-hyperscript/react-hyperscript-tests.ts +++ b/types/react-hyperscript/react-hyperscript-tests.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import * as h from 'react-hyperscript'; +import h = require('react-hyperscript'); interface PropTypes { foo: string; diff --git a/types/react-hyperscript/tsconfig.json b/types/react-hyperscript/tsconfig.json index 1ad5f62543..89cc9e1517 100644 --- a/types/react-hyperscript/tsconfig.json +++ b/types/react-hyperscript/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-hyperscript-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/react-i18next/tsconfig.json b/types/react-i18next/tsconfig.json index e38c27a93e..7c180ea76a 100644 --- a/types/react-i18next/tsconfig.json +++ b/types/react-i18next/tsconfig.json @@ -16,7 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, - "strictFunctionTypes": true, + "esModuleInterop": true, "jsx": "react", "experimentalDecorators": true }, @@ -31,4 +31,4 @@ "src/trans.d.ts", "src/translate.d.ts" ] -} +} \ No newline at end of file diff --git a/types/react-i18next/v1/tsconfig.json b/types/react-i18next/v1/tsconfig.json index b16cb92b25..b733293e90 100644 --- a/types/react-i18next/v1/tsconfig.json +++ b/types/react-i18next/v1/tsconfig.json @@ -24,6 +24,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react", "experimentalDecorators": true }, diff --git a/types/react-i18next/v4/tsconfig.json b/types/react-i18next/v4/tsconfig.json index 1e7a8d9eea..3fa0ff8181 100644 --- a/types/react-i18next/v4/tsconfig.json +++ b/types/react-i18next/v4/tsconfig.json @@ -21,6 +21,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react", "experimentalDecorators": true }, @@ -33,4 +34,4 @@ "trans.d.ts", "translate.d.ts" ] -} +} \ No newline at end of file diff --git a/types/react-icon-base/tsconfig.json b/types/react-icon-base/tsconfig.json index 4e98b45572..c47d7e66ef 100644 --- a/types/react-icon-base/tsconfig.json +++ b/types/react-icon-base/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "preserve" }, "files": [ diff --git a/types/react-icons/tsconfig.json b/types/react-icons/tsconfig.json index 30695260df..1117475feb 100644 --- a/types/react-icons/tsconfig.json +++ b/types/react-icons/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "preserve" }, "files": [ diff --git a/types/react-image-gallery/tsconfig.json b/types/react-image-gallery/tsconfig.json index 9970170355..d42a2dc0d8 100644 --- a/types/react-image-gallery/tsconfig.json +++ b/types/react-image-gallery/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-image-gallery-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-imageloader/tsconfig.json b/types/react-imageloader/tsconfig.json index 10c47efd69..2072e936c9 100644 --- a/types/react-imageloader/tsconfig.json +++ b/types/react-imageloader/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-infinite-scroller/tsconfig.json b/types/react-infinite-scroller/tsconfig.json index 9094853395..d3b357a8ad 100644 --- a/types/react-infinite-scroller/tsconfig.json +++ b/types/react-infinite-scroller/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-infinite/index.d.ts b/types/react-infinite/index.d.ts index 28d3ead9b7..442764fe76 100644 --- a/types/react-infinite/index.d.ts +++ b/types/react-infinite/index.d.ts @@ -8,10 +8,10 @@ import * as React from "react"; -import Infinite = ReactInfinite.Infinite; export = Infinite; +export as namespace Infinite; -declare namespace ReactInfinite { +declare namespace Infinite { interface InfiniteProps extends React.Props { elementHeight: number | number[]; containerHeight?: number; @@ -28,8 +28,8 @@ declare namespace ReactInfinite { useWindowAsScrollContainer?: boolean; displayBottomUpwards?: boolean; } +} - export class Infinite extends React.Component { - static containerHeightScaleFactor(n: number): any; - } +declare class Infinite extends React.Component { + static containerHeightScaleFactor(n: number): any; } diff --git a/types/react-infinite/react-infinite-tests.tsx b/types/react-infinite/react-infinite-tests.tsx index 2aa7a23192..478f436e66 100644 --- a/types/react-infinite/react-infinite-tests.tsx +++ b/types/react-infinite/react-infinite-tests.tsx @@ -5,9 +5,9 @@ class Test1 extends React.Component { render() { return ( -
-
-
+
+
+
); } @@ -17,9 +17,9 @@ class Test2 extends React.Component { render() { return ( -
-
-
+
+
+
); } @@ -29,10 +29,10 @@ class Test3 extends React.Component { render() { return ( -
-
-
+ useWindowAsScrollContainer> +
+
+
); } @@ -42,24 +42,37 @@ class Test4 extends React.Component { render() { return ( -
-
-
+ displayBottomUpwards> +
+
+
); } } -class ListItem extends React.Component<{key: number; num: number}, {}> { +class Test5 extends React.Component { + render() { + return ( + +
+
+
+ + ); + } +} + +class ListItem extends React.Component<{ key: number; num: number }, {}> { render() { return
- List Item {this.props.num} + List Item {this.props.num}
; } } -class InfiniteList extends React.Component<{}, {elements: React.ReactElement[], isInfiniteLoading: boolean}> { +class InfiniteList extends React.Component<{}, { elements: React.ReactElement[], isInfiniteLoading: boolean }> { constructor(props?: {}, context?: any) { super(props, context); this.state = { @@ -71,7 +84,7 @@ class InfiniteList extends React.Component<{}, {elements: React.ReactElement[]; for (var i = start; i < end; i++) { - elements.push() + elements.push() } return elements; } @@ -81,7 +94,7 @@ class InfiniteList extends React.Component<{}, {elements: React.ReactElement + containerHeight={250} + infiniteLoadBeginEdgeOffset={200} + onInfiniteLoad={this.handleInfiniteLoad} + loadingSpinnerDelegate={this.elementInfiniteLoad()} + isInfiniteLoading={this.state.isInfiniteLoading} + > {this.state.elements} ; } diff --git a/types/react-infinite/tsconfig.json b/types/react-infinite/tsconfig.json index c3ec7e4192..38915e5d07 100644 --- a/types/react-infinite/tsconfig.json +++ b/types/react-infinite/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-input-calendar/react-input-calendar-tests.tsx b/types/react-input-calendar/react-input-calendar-tests.tsx index 4cd465d9c5..9589c51046 100644 --- a/types/react-input-calendar/react-input-calendar-tests.tsx +++ b/types/react-input-calendar/react-input-calendar-tests.tsx @@ -1,4 +1,4 @@ -import * as ReactInputCalendar from 'react-input-calendar'; +import ReactInputCalendar = require('react-input-calendar'); import * as React from 'react'; import * as ReactDOM from 'react-dom'; ReactDOM.render(, document.body); diff --git a/types/react-input-calendar/tsconfig.json b/types/react-input-calendar/tsconfig.json index 216b0bcfe9..b7becae449 100644 --- a/types/react-input-calendar/tsconfig.json +++ b/types/react-input-calendar/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-input-mask/tsconfig.json b/types/react-input-mask/tsconfig.json index be2a7cc230..ffbee32962 100644 --- a/types/react-input-mask/tsconfig.json +++ b/types/react-input-mask/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-intl-redux/tsconfig.json b/types/react-intl-redux/tsconfig.json index 06eacd254a..4bf5f624a2 100644 --- a/types/react-intl-redux/tsconfig.json +++ b/types/react-intl-redux/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-intl/index.d.ts b/types/react-intl/index.d.ts index 7fc19e41ab..383fdef681 100644 --- a/types/react-intl/index.d.ts +++ b/types/react-intl/index.d.ts @@ -7,6 +7,7 @@ // Karol Janyst , // Brian Houser , // Krister Kari +// Martin Raedlinger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -189,6 +190,7 @@ declare namespace ReactIntl { defaultLocale?: string; defaultFormats?: any; textComponent?: any; + initialNow?: any; } } diff --git a/types/react-intl/tsconfig.json b/types/react-intl/tsconfig.json index d44df31af7..f943e36591 100644 --- a/types/react-intl/tsconfig.json +++ b/types/react-intl/tsconfig.json @@ -20,6 +20,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } -} +} \ No newline at end of file diff --git a/types/react-intl/v1/tsconfig.json b/types/react-intl/v1/tsconfig.json index 1f63dae6a5..7ac64f1af9 100644 --- a/types/react-intl/v1/tsconfig.json +++ b/types/react-intl/v1/tsconfig.json @@ -21,6 +21,7 @@ }, "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react", "experimentalDecorators": true }, diff --git a/types/react-is-deprecated/tsconfig.json b/types/react-is-deprecated/tsconfig.json index ce2c7d740a..7cc62d4f7f 100644 --- a/types/react-is-deprecated/tsconfig.json +++ b/types/react-is-deprecated/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-joyride/tsconfig.json b/types/react-joyride/tsconfig.json index b468366153..ef4ff9b9ee 100644 --- a/types/react-joyride/tsconfig.json +++ b/types/react-joyride/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-json-pretty/react-json-pretty-tests.tsx b/types/react-json-pretty/react-json-pretty-tests.tsx index 95818442df..4821e195e9 100644 --- a/types/react-json-pretty/react-json-pretty-tests.tsx +++ b/types/react-json-pretty/react-json-pretty-tests.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import * as JSONPretty from "react-json-pretty"; +import JSONPretty = require("react-json-pretty"); export class Test extends React.Component { render() { diff --git a/types/react-json-pretty/tsconfig.json b/types/react-json-pretty/tsconfig.json index 17b15160c6..929b115a79 100644 --- a/types/react-json-pretty/tsconfig.json +++ b/types/react-json-pretty/tsconfig.json @@ -17,7 +17,8 @@ "jsx": "preserve", "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-json-tree/tsconfig.json b/types/react-json-tree/tsconfig.json index 134e10e324..e9f7954643 100644 --- a/types/react-json-tree/tsconfig.json +++ b/types/react-json-tree/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-json/tsconfig.json b/types/react-json/tsconfig.json index b9ee513a9d..2c8eb0b159 100644 --- a/types/react-json/tsconfig.json +++ b/types/react-json/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-jsonschema-form/tsconfig.json b/types/react-jsonschema-form/tsconfig.json index a4f7127522..aa6b886675 100644 --- a/types/react-jsonschema-form/tsconfig.json +++ b/types/react-jsonschema-form/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-lazyload/tsconfig.json b/types/react-lazyload/tsconfig.json index 48e56bab80..836d652b93 100644 --- a/types/react-lazyload/tsconfig.json +++ b/types/react-lazyload/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-leaflet/tsconfig.json b/types/react-leaflet/tsconfig.json index 75ce9f7598..c6a123ac19 100644 --- a/types/react-leaflet/tsconfig.json +++ b/types/react-leaflet/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-list/react-list-tests.tsx b/types/react-list/react-list-tests.tsx index f02b1643a5..83aba8f698 100644 --- a/types/react-list/react-list-tests.tsx +++ b/types/react-list/react-list-tests.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import * as ReactList from "react-list"; +import ReactList = require("react-list"); const renderItem = (index: number, key: number) =>
diff --git a/types/react-list/tsconfig.json b/types/react-list/tsconfig.json index 040c8c5fc9..15b1d876e6 100644 --- a/types/react-list/tsconfig.json +++ b/types/react-list/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-loadable/index.d.ts b/types/react-loadable/index.d.ts index 8b591d3f3a..08c5b52e39 100644 --- a/types/react-loadable/index.d.ts +++ b/types/react-loadable/index.d.ts @@ -1,12 +1,15 @@ // Type definitions for react-loadable 5.3 // Project: https://github.com/thejameskyle/react-loadable#readme -// Definitions by: Diogo Franco , Oden S. , Ian Ker-Seymer +// Definitions by: Diogo Franco +// Oden S. +// Ian Ker-Seymer +// Tomek Łaziuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 /// -declare namespace Loadable { +declare namespace LoadableExport { interface LoadingComponentProps { isLoading: boolean; pastDelay: boolean; @@ -182,7 +185,7 @@ declare namespace Loadable { } } -declare const LoadableExport: Loadable.Loadable; +declare const LoadableExport: LoadableExport.Loadable; /* tslint:disable-next-line */ declare module "react-loadable" { diff --git a/types/react-loadable/tsconfig.json b/types/react-loadable/tsconfig.json index 9d46ae0de9..bb968d3b23 100644 --- a/types/react-loadable/tsconfig.json +++ b/types/react-loadable/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-loader/react-loader-tests.tsx b/types/react-loader/react-loader-tests.tsx index bc303f149a..92efaf9401 100644 --- a/types/react-loader/react-loader-tests.tsx +++ b/types/react-loader/react-loader-tests.tsx @@ -1,4 +1,4 @@ -import * as Loader from 'react-loader'; +import Loader = require('react-loader'); import * as React from 'react'; const options = { diff --git a/types/react-loader/tsconfig.json b/types/react-loader/tsconfig.json index dbe08293df..bc0150abd0 100644 --- a/types/react-loader/tsconfig.json +++ b/types/react-loader/tsconfig.json @@ -15,7 +15,8 @@ "jsx": "react", "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-maskedinput/tsconfig.json b/types/react-maskedinput/tsconfig.json index a5544e917d..9935dfab63 100644 --- a/types/react-maskedinput/tsconfig.json +++ b/types/react-maskedinput/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-mce/tsconfig.json b/types/react-mce/tsconfig.json index 7db60d34d1..5abea1ff98 100644 --- a/types/react-mce/tsconfig.json +++ b/types/react-mce/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-mdl/tsconfig.json b/types/react-mdl/tsconfig.json index 45017dc8c9..6fc7a2a4b6 100644 --- a/types/react-mdl/tsconfig.json +++ b/types/react-mdl/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-measure/tsconfig.json b/types/react-measure/tsconfig.json index 63aa208f05..3a29cd4f8f 100644 --- a/types/react-measure/tsconfig.json +++ b/types/react-measure/tsconfig.json @@ -17,7 +17,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-mixin/tsconfig.json b/types/react-mixin/tsconfig.json index fd65a09710..dd0908f60c 100644 --- a/types/react-mixin/tsconfig.json +++ b/types/react-mixin/tsconfig.json @@ -17,7 +17,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-modal/tsconfig.json b/types/react-modal/tsconfig.json index 8c1dd5988b..716fa04a21 100644 --- a/types/react-modal/tsconfig.json +++ b/types/react-modal/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-monaco-editor/tsconfig.json b/types/react-monaco-editor/tsconfig.json index 8d55416feb..64ea75ce0b 100644 --- a/types/react-monaco-editor/tsconfig.json +++ b/types/react-monaco-editor/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-motion-slider/tsconfig.json b/types/react-motion-slider/tsconfig.json index aaf0d16bdb..89e30e32e0 100644 --- a/types/react-motion-slider/tsconfig.json +++ b/types/react-motion-slider/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-motion/tsconfig.json b/types/react-motion/tsconfig.json index 9adebe9fd2..f9f4077a58 100644 --- a/types/react-motion/tsconfig.json +++ b/types/react-motion/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-native-collapsible/tsconfig.json b/types/react-native-collapsible/tsconfig.json index c9cb0c9278..51f7a382eb 100644 --- a/types/react-native-collapsible/tsconfig.json +++ b/types/react-native-collapsible/tsconfig.json @@ -15,6 +15,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-communications/tsconfig.json b/types/react-native-communications/tsconfig.json index f66d5a80ce..409090cf33 100644 --- a/types/react-native-communications/tsconfig.json +++ b/types/react-native-communications/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-datepicker/index.d.ts b/types/react-native-datepicker/index.d.ts index 548de52db4..19b2f488ca 100644 --- a/types/react-native-datepicker/index.d.ts +++ b/types/react-native-datepicker/index.d.ts @@ -38,6 +38,9 @@ export interface DatePickerProps { declare class DatePicker extends React.Component { constructor(props: DatePickerProps); + + onPressDate(): void; + onPressCancel(): void; } export default DatePicker; diff --git a/types/react-native-datepicker/react-native-datepicker-tests.tsx b/types/react-native-datepicker/react-native-datepicker-tests.tsx index f21a1bc874..b208b5982c 100644 --- a/types/react-native-datepicker/react-native-datepicker-tests.tsx +++ b/types/react-native-datepicker/react-native-datepicker-tests.tsx @@ -6,14 +6,23 @@ interface MyDatePickerState { } export default class MyDatePicker extends React.Component<{}, MyDatePickerState> { + datepicker: DatePicker | null; + constructor(props: {}) { super(props); this.state = {date: "2016-05-15"}; } + componentDidMount() { + if (this.datepicker) { + this.datepicker.onPressDate(); + } + } + render() { return ( this.datepicker = datepicker} style={{width: 200}} date={this.state.date} mode="date" diff --git a/types/react-native-datepicker/tsconfig.json b/types/react-native-datepicker/tsconfig.json index b1dd56e20d..82bdba1219 100644 --- a/types/react-native-datepicker/tsconfig.json +++ b/types/react-native-datepicker/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-doc-viewer/tsconfig.json b/types/react-native-doc-viewer/tsconfig.json index 86d578084a..9f162c3d5c 100644 --- a/types/react-native-doc-viewer/tsconfig.json +++ b/types/react-native-doc-viewer/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react-native" }, "files": [ diff --git a/types/react-native-document-picker/tsconfig.json b/types/react-native-document-picker/tsconfig.json index 25f0fcb7b7..c15fde8611 100644 --- a/types/react-native-document-picker/tsconfig.json +++ b/types/react-native-document-picker/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-drawer-layout/index.d.ts b/types/react-native-drawer-layout/index.d.ts index f6cf7a0d4a..f8b34fc3fd 100644 --- a/types/react-native-drawer-layout/index.d.ts +++ b/types/react-native-drawer-layout/index.d.ts @@ -94,12 +94,16 @@ export interface DrawerLayoutProperties extends ViewProperties { } export default class DrawerLayout extends React.Component { - /** - * Opens the drawer. - */ - openDrawer(): void; - /** - * Closes the drawer. - */ - closeDrawer(): void; + static positions: { + Left: "left"; + Right: "right"; + }; + /** + * Opens the drawer. + */ + openDrawer(): void; + /** + * Closes the drawer. + */ + closeDrawer(): void; } diff --git a/types/react-native-drawer-layout/react-native-drawer-layout-tests.tsx b/types/react-native-drawer-layout/react-native-drawer-layout-tests.tsx index c194756333..e0371643ee 100644 --- a/types/react-native-drawer-layout/react-native-drawer-layout-tests.tsx +++ b/types/react-native-drawer-layout/react-native-drawer-layout-tests.tsx @@ -32,6 +32,16 @@ class DrawerTest extends React.Component<{}, DrawerTestState> { > Screen content + + { + DrawerLayout.positions.Left + } + + + { + DrawerLayout.positions.Right + } + ); diff --git a/types/react-native-drawer-layout/tsconfig.json b/types/react-native-drawer-layout/tsconfig.json index a0d6721b68..b9f5068f0e 100644 --- a/types/react-native-drawer-layout/tsconfig.json +++ b/types/react-native-drawer-layout/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-drawer/tsconfig.json b/types/react-native-drawer/tsconfig.json index 1617e4715b..c44a87ca38 100644 --- a/types/react-native-drawer/tsconfig.json +++ b/types/react-native-drawer/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-fabric/tsconfig.json b/types/react-native-fabric/tsconfig.json index 90e24b408e..b27e85ccf7 100644 --- a/types/react-native-fabric/tsconfig.json +++ b/types/react-native-fabric/tsconfig.json @@ -16,10 +16,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-native-fabric-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/react-native-fbsdk/tsconfig.json b/types/react-native-fbsdk/tsconfig.json index 0eae296778..04da79a438 100644 --- a/types/react-native-fbsdk/tsconfig.json +++ b/types/react-native-fbsdk/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react-native" }, "files": [ diff --git a/types/react-native-fetch-blob/tsconfig.json b/types/react-native-fetch-blob/tsconfig.json index c2cf564bb7..a2d48e72fe 100644 --- a/types/react-native-fetch-blob/tsconfig.json +++ b/types/react-native-fetch-blob/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-native-fs/tsconfig.json b/types/react-native-fs/tsconfig.json index f491bb6a7a..7f018a6770 100644 --- a/types/react-native-fs/tsconfig.json +++ b/types/react-native-fs/tsconfig.json @@ -17,7 +17,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-native-google-signin/tsconfig.json b/types/react-native-google-signin/tsconfig.json index aaa8a4b253..885d5909f3 100644 --- a/types/react-native-google-signin/tsconfig.json +++ b/types/react-native-google-signin/tsconfig.json @@ -14,6 +14,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true, "jsx": "react-native" }, @@ -21,4 +22,4 @@ "index.d.ts", "react-native-google-signin-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-native-keep-awake/tsconfig.json b/types/react-native-keep-awake/tsconfig.json index 6a53a9effa..1fb7035348 100644 --- a/types/react-native-keep-awake/tsconfig.json +++ b/types/react-native-keep-awake/tsconfig.json @@ -15,6 +15,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-linear-gradient/tsconfig.json b/types/react-native-linear-gradient/tsconfig.json index 11c04115c3..64f451aff0 100644 --- a/types/react-native-linear-gradient/tsconfig.json +++ b/types/react-native-linear-gradient/tsconfig.json @@ -16,10 +16,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react-native" }, "files": [ "index.d.ts", "react-native-linear-gradient-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-native-material-design-searchbar/tsconfig.json b/types/react-native-material-design-searchbar/tsconfig.json index 41e6dc8bab..fad3a98354 100644 --- a/types/react-native-material-design-searchbar/tsconfig.json +++ b/types/react-native-material-design-searchbar/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-material-kit/tsconfig.json b/types/react-native-material-kit/tsconfig.json index f18bd089b8..383eabe485 100644 --- a/types/react-native-material-kit/tsconfig.json +++ b/types/react-native-material-kit/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react-native" }, "files": [ diff --git a/types/react-native-material-ui/index.d.ts b/types/react-native-material-ui/index.d.ts index f3147eecf7..d8560653d7 100644 --- a/types/react-native-material-ui/index.d.ts +++ b/types/react-native-material-ui/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-native-material-ui 1.12 +// Type definitions for react-native-material-ui 1.19 // Project: https://github.com/xotahal/react-native-material-ui // Definitions by: Kyle Roach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -18,6 +18,7 @@ export interface ActionButtonProps { style?: { container?: ViewStyle icon?: TextStyle + positionContainer?: ViewStyle }; transition?: 'toolbar' | 'speedDial'; onPress?(): void; diff --git a/types/react-native-material-ui/react-native-material-ui-tests.tsx b/types/react-native-material-ui/react-native-material-ui-tests.tsx index 4acb9db12e..b4380fc388 100644 --- a/types/react-native-material-ui/react-native-material-ui-tests.tsx +++ b/types/react-native-material-ui/react-native-material-ui-tests.tsx @@ -25,7 +25,7 @@ const theme = { const Example = () => - + diff --git a/types/react-native-material-ui/tsconfig.json b/types/react-native-material-ui/tsconfig.json index 7c215a4a8b..4df81b6245 100644 --- a/types/react-native-material-ui/tsconfig.json +++ b/types/react-native-material-ui/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-mixpanel/tsconfig.json b/types/react-native-mixpanel/tsconfig.json index 489842ded8..a422356e3d 100644 --- a/types/react-native-mixpanel/tsconfig.json +++ b/types/react-native-mixpanel/tsconfig.json @@ -14,10 +14,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ "index.d.ts", "react-native-mixpanel-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/react-native-modalbox/tsconfig.json b/types/react-native-modalbox/tsconfig.json index 1c41f2e346..35c3a77f61 100644 --- a/types/react-native-modalbox/tsconfig.json +++ b/types/react-native-modalbox/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-navigation/index.d.ts b/types/react-native-navigation/index.d.ts new file mode 100644 index 0000000000..893a904f73 --- /dev/null +++ b/types/react-native-navigation/index.d.ts @@ -0,0 +1,270 @@ +// Type definitions for react-native-navigation 1.1 +// Project: https://github.com/wix/react-native-navigation +// Definitions by: Egor Shulga +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import * as React from 'react'; + +export namespace Navigation { + function registerComponent(screenID: string, generator: () => React.ComponentType, store?: any, provider?: any): void; + function startTabBasedApp(params: TabBasedApp): void; + function startSingleScreenApp(params: SingleScreenApp): void; + function showModal(params: ModalScreen): void; + function dismissModal(params?: { animationType?: 'none' | 'slide-down' }): void; + function dismissAllModals(params?: { animationType?: 'none' | 'slide-down' }): void; + function showLightBox(params?: LightBox): void; + function dismissLightBox(): void; + function handleDeepLink(params?: { link: string; payload?: string; }): void; + function registerScreen(screenId: string, generator: () => React.ComponentType): void; + function getCurrentlyVisibleScreenId(): Promise; +} + +export interface TabBasedApp { + tabs: TabScreen[]; + tabsStyle?: { + tabBarButtonColor?: string; + tabBarSelectedButtonColor?: string; + tabBarBackgroundColor?: string; + initialTabIndex?: number; + }; + appStyle?: { + orientation?: 'auto' | 'landscape' | 'portrait'; + bottomTabBadgeTextColor?: string; + bottomTabBadgeBackgroundColor?: string; + backButtonImage?: any; + hideBackButtonTitle?: boolean; + }; + drawer?: Drawer; + passProps?: object; + animationType?: 'none' | 'slide-down' | 'fade'; +} + +export interface TabScreen { + label?: string; + screen: string; + icon?: any; + selectedIcon?: any; + title?: string; + navigatorStyle?: NavigatorStyle; + navigatorButtons?: NavigatorButtons; +} + +export interface SingleScreenApp { + screen: Screen; + drawer?: Drawer; + passProps?: object; + animationType?: 'none' | 'slide-down' | 'fade'; +} + +export interface Screen { + screen: string; + title?: string; + navigatorStyle?: NavigatorStyle; + navigatorButtons?: NavigatorButtons; +} + +export interface ModalScreen extends Screen { + passProps?: object; + animationType?: 'slide-up' | 'none'; +} + +export interface ResetScreen extends Screen { + passProps?: object; + animated?: boolean; + animationType?: 'fade' | 'slide-horizontal'; +} + +export interface PushedScreen extends ResetScreen { + titleImage?: any; + backButtonTitle?: string; + backButtonHidden?: boolean; + previewView?: React.Component | number; + previewHeight?: number; + previewCommit?: boolean; + previewActions?: Action[]; +} + +export interface Action { + id: string; + title: string; + style?: 'selected' | 'destructive'; + actions: Action[]; +} + +export interface LightBox { + screen: string; + passProps?: object; + style?: { + backgroundBlur?: 'dark' | 'light' | 'xlight' | 'none'; + backgroundColor?: string; + }; + adjustSoftInput?: 'nothing' | 'pan' | 'resize' | 'unspecified'; +} + +export interface Navigator { + push(params: PushedScreen): void; + pop(params?: { animated?: boolean; animationType?: 'fade' | 'slide-horizontal'; }): void; + popToRoot(params?: { animated?: boolean; animationType?: 'fade' | 'slide-horizontal'; }): void; + resetTo(params: PushedScreen): void; + showModal(params: ModalScreen): void; + dismissModal(params?: { animationType?: 'none' | 'slide-down' }): void; + dismissAllModals(params?: { animationType?: 'none' | 'slide-down' }): void; + showLightBox(params: LightBox): void; + dismissLightBox(): void; + showInAppNotification(params?: { screen: string; passProps?: object; autoDismissTimerSec?: number }): void; + handleDeepLink(params: { link: string }): void; + setButtons(params: NavigatorButtons & { animated?: boolean }): void; + setTitle(params: { title: string }): void; + setSubTitle(params: { subtitle: string }): void; + toggleDrawer(params: { side: 'left' | 'right'; animated?: boolean; to?: 'open' | 'closed' }): void; + setDrawerEnabled(params: { side: 'left' | 'right'; enabled: boolean }): void; + toggleTabs(params: { to: 'hidden' | 'shown'; animated?: boolean }): void; + setTabBadge(params?: { tabIndex?: number; badge?: number; badgeColor?: string; }): void; + setTabButton(params?: { tabIndex?: number; icon?: any; selectedIcon?: any; label?: string; }): void; + switchToTab(params?: { tabIndex?: number }): void; + toggleNavBar(params: { to: 'hidden' | 'shown'; animated?: boolean }): void; + setOnNavigatorEvent(callback: (event: { id: string }) => void): void; + addOnNavigatorEvent(callback: (event: { id: string }) => void): () => void; + screenIsCurrentlyVisible(): Promise; + setStyle(params: NavigatorStyle): void; +} + +export class ScreenVisibilityListener { + constructor(params: ScreenVisibilityListenerParams); + register(): void; + unregister(): void; +} + +export interface ScreenVisibilityListenerParams { + willAppear?: (params: ListenerParams) => void; + didAppear?: (params: ListenerParams) => void; + willDisappear?: (params: ListenerParams) => void; + didDisappear?: (params: ListenerParams) => void; +} + +export interface ListenerParams { + screen: string; + startTime: number; + endTime: number; + commandType: string; +} + +export type NavigationComponentProps

= + P & { + navigator: Navigator; + }; + +export interface NavigatorStyle { + navBarTextColor?: string; + navBarTextFontSize?: number; + navBarTextFontFamily?: string; + navBarBackgroundColor?: string; + navBarCustomView?: string; + navBarComponentAlignment?: 'center' | 'fill'; + navBarCustomViewInitialProps?: object; + navBarButtonColor?: string; + topBarElevationShadowEnabled?: boolean; + navBarHidden?: boolean; + navBarHideOnScroll?: boolean; + navBarTranslucent?: boolean; + navBarTransparent?: boolean; + navBarNoBorder?: boolean; + drawUnderNavBar?: boolean; + drawUnderTabBar?: boolean; + navBarBlur?: boolean; + tabBarHidden?: boolean; + statusBarHidden?: boolean; + statusBarTextColorScheme?: string; + navBarSubtitleColor?: string; + navBarSubtitleFontFamily?: string; + navBarSubtitleFontSize?: number; + screenBackgroundColor?: string; + orientation?: 'auto ' | 'landscape' | 'portrait'; + disabledButtonColor?: string; + // iOS only + statusBarTextColorSchemeSingleScreen?: string; + statusBarHideWithNavBar?: boolean; + statusBarBlur?: boolean; + disabledBackGesture?: boolean; + disabledSimultaneousGesture?: boolean; + screenBackgroundImageName?: string; + rootBackgroundImageName?: string; + navBarButtonFontSize?: number; + navBarButtonFontWeight?: string | number; + navBarLeftButtonFontSize?: number; + navBarLeftButtonColor?: string; + navBarLeftButtonFontWeight?: string | number; + navBarRightButtonFontSize?: number; + navBarRightButtonColor?: string; + navBarRightButtonFontWeight?: string | number; + topBarShadowColor?: string; + topBarShadowOpacity?: number; + topBarShadowOffset?: number; + topBarShadowRadius?: number; + preferredContentSize?: { width: number, height: number }; + modalPresentationStyle?: 'formSheet' | 'pageSheet' | 'overFullScreen' | 'overCurrentContext' | 'fullScreen'; + largeTitle?: boolean; + // Android only + navigationBarColor?: string; + navBarTitleTextCentered?: boolean; + navBarButtonFontFamily?: string; + statusBarColor?: string; + drawUnderStatusBar?: boolean; + collapsingToolBarImage?: object; + collapsingToolBarCollapsedColor?: string; + navBarTextFontBold?: boolean; + navBarHeight?: number; + navBarTopPadding?: number; + topTabsHeight?: number; + topBarBorderColor?: string; + topBarBorderWidth?: number; +} + +export interface NavigatorButtons { + leftButtons?: NavigatorButton[]; + rightButtons?: NavigatorButton[]; +} + +export type IdAndroid = 'back' | 'cancel' | 'accept' | 'sideMenu'; + +export type SystemItemIOS = 'done' | 'cancel' | 'edit' | 'save' | 'add' | + 'flexibleSpace' | 'fixedSpace' | 'compose' | 'reply' | 'action' | 'organize' | + 'bookmarks' | 'search' | 'refresh' | 'stop' | 'camera' | 'trash' | 'play' | + 'pause' | 'rewind' | 'fastForward' | 'undo' | 'redo'; + +export interface NavigatorButton { + id: string | IdAndroid; + title?: string; + icon?: any; + component?: string; + passProps?: object; + testID?: string; + disabled?: boolean; + disableIconTint?: boolean; + buttonColor?: string; + buttonFontSize?: number; + buttonFontWeight?: string | number; + systemItem?: SystemItemIOS; +} + +export interface FABAndroid { + collapsedId?: string; + collapsedIcon?: any; + collapsedIconColor?: string; + expendedId?: string; + expendedIcon?: any; + expendedIconColor?: string; + backgroundColor?: string; + actions?: NavigatorButton[]; +} + +export interface Drawer { + left?: { + screen: string; + }; + right?: { + screen: string; + }; + disableOpenGesture?: boolean; +} diff --git a/types/react-native-navigation/react-native-navigation-tests.tsx b/types/react-native-navigation/react-native-navigation-tests.tsx new file mode 100644 index 0000000000..292b0fb375 --- /dev/null +++ b/types/react-native-navigation/react-native-navigation-tests.tsx @@ -0,0 +1,66 @@ +import * as React from 'react'; +import { Text, View } from 'react-native'; +import { Navigation, NavigationComponentProps, NavigatorStyle, NavigatorButtons } from 'react-native-navigation'; + +class Screen1 extends React.Component> { + static navigatorButtons: NavigatorButtons = { + leftButtons: [{ + id: 'sideMenu' + }] + }; + + componentDidMount() { + this.props.navigator.push({ screen: 'example.Screen2' }); + } + + render() { + return ( + + Screen 1 + + ); + } +} + +class Screen2 extends React.Component { + static navigatorStyle: NavigatorStyle = { + drawUnderNavBar: true, + navBarTranslucent: true + }; + + componentDidMount() { + this.props.navigator.resetTo({ screen: 'example.Screen1' }); + } + + render() { + return ( + + Screen 2 + + ); + } +} + +const Drawer = (props: NavigationComponentProps) => { + return ( + + Drawer + + ); +}; + +Navigation.registerComponent('example.Screen1', () => Screen1); +Navigation.registerComponent('example.Screen2', () => Screen2); +Navigation.registerComponent('example.Drawer', () => Drawer); + +Navigation.startSingleScreenApp({ + screen: { + screen: 'example.Screen1', + title: 'Screen 1', + }, + drawer: { + left: { + screen: 'example.Drawer', + } + } +}); diff --git a/types/react-native-navigation/tsconfig.json b/types/react-native-navigation/tsconfig.json new file mode 100644 index 0000000000..d5f6739538 --- /dev/null +++ b/types/react-native-navigation/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, + "jsx": "react-native" + }, + "files": [ + "index.d.ts", + "react-native-navigation-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-native-navigation/tslint.json b/types/react-native-navigation/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-native-navigation/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/react-native-orientation/tsconfig.json b/types/react-native-orientation/tsconfig.json index bd692e954d..60db21ec6d 100644 --- a/types/react-native-orientation/tsconfig.json +++ b/types/react-native-orientation/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-native-popup-dialog/tsconfig.json b/types/react-native-popup-dialog/tsconfig.json index ee710ade52..abc3eb6980 100644 --- a/types/react-native-popup-dialog/tsconfig.json +++ b/types/react-native-popup-dialog/tsconfig.json @@ -16,10 +16,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ "index.d.ts", "react-native-popup-dialog-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-native-push-notification/tsconfig.json b/types/react-native-push-notification/tsconfig.json index a030044ab2..d387ecd667 100644 --- a/types/react-native-push-notification/tsconfig.json +++ b/types/react-native-push-notification/tsconfig.json @@ -15,10 +15,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ "index.d.ts", "react-native-push-notification-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/react-native-qrcode/tsconfig.json b/types/react-native-qrcode/tsconfig.json index b21253194b..24e59a7544 100644 --- a/types/react-native-qrcode/tsconfig.json +++ b/types/react-native-qrcode/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-safari-view/tsconfig.json b/types/react-native-safari-view/tsconfig.json index 4f04c6e8b6..f7e512ef69 100644 --- a/types/react-native-safari-view/tsconfig.json +++ b/types/react-native-safari-view/tsconfig.json @@ -15,6 +15,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-scrollable-tab-view/tsconfig.json b/types/react-native-scrollable-tab-view/tsconfig.json index 6b88cdde66..12ae0f8f4a 100644 --- a/types/react-native-scrollable-tab-view/tsconfig.json +++ b/types/react-native-scrollable-tab-view/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-sensor-manager/tsconfig.json b/types/react-native-sensor-manager/tsconfig.json index 97c238c779..772569be5c 100644 --- a/types/react-native-sensor-manager/tsconfig.json +++ b/types/react-native-sensor-manager/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-native-snap-carousel/tsconfig.json b/types/react-native-snap-carousel/tsconfig.json index 4cba7b2f97..19669fe055 100644 --- a/types/react-native-snap-carousel/tsconfig.json +++ b/types/react-native-snap-carousel/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-sortable-grid/tsconfig.json b/types/react-native-sortable-grid/tsconfig.json index d4391d4624..1906a4418a 100644 --- a/types/react-native-sortable-grid/tsconfig.json +++ b/types/react-native-sortable-grid/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-native-sortable-grid-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-native-sortable-list/tsconfig.json b/types/react-native-sortable-list/tsconfig.json index 52474bc36f..5676c069cc 100644 --- a/types/react-native-sortable-list/tsconfig.json +++ b/types/react-native-sortable-list/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-svg-uri/tsconfig.json b/types/react-native-svg-uri/tsconfig.json index dad8bbe54a..6e769a820e 100644 --- a/types/react-native-svg-uri/tsconfig.json +++ b/types/react-native-svg-uri/tsconfig.json @@ -15,6 +15,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react-native" }, "files": [ diff --git a/types/react-native-swiper/tsconfig.json b/types/react-native-swiper/tsconfig.json index 68d1350773..361058eef8 100644 --- a/types/react-native-swiper/tsconfig.json +++ b/types/react-native-swiper/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-tab-navigator/tsconfig.json b/types/react-native-tab-navigator/tsconfig.json index b8e913c472..7b3482ebf0 100644 --- a/types/react-native-tab-navigator/tsconfig.json +++ b/types/react-native-tab-navigator/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-tab-view/tsconfig.json b/types/react-native-tab-view/tsconfig.json index 7449ff01dd..6c5efd8081 100644 --- a/types/react-native-tab-view/tsconfig.json +++ b/types/react-native-tab-view/tsconfig.json @@ -1,17 +1,25 @@ { - "compilerOptions": { - "module": "commonjs", - "lib": ["es6"], - "jsx": "preserve", - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": ["../"], - "types": [], - "noEmit": true, - "strictFunctionTypes": true, - "forceConsistentCasingInFileNames": true - }, - "files": ["index.d.ts", "react-native-tab-view-tests.tsx"] -} + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "jsx": "preserve", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "strictFunctionTypes": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "react-native-tab-view-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-native-touch-id/tsconfig.json b/types/react-native-touch-id/tsconfig.json index f927782930..715654db9b 100644 --- a/types/react-native-touch-id/tsconfig.json +++ b/types/react-native-touch-id/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-native-vector-icons/tsconfig.json b/types/react-native-vector-icons/tsconfig.json index f66f39ed95..ca8bfa043b 100644 --- a/types/react-native-vector-icons/tsconfig.json +++ b/types/react-native-vector-icons/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native-video/tsconfig.json b/types/react-native-video/tsconfig.json index a2e2a80edd..87e421f751 100644 --- a/types/react-native-video/tsconfig.json +++ b/types/react-native-video/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 28f26c8ec8..c2ca58a5f3 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -758,11 +758,7 @@ export interface TextStyle extends TextStyleIOS, TextStyleAndroid, ViewStyle { fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900"; letterSpacing?: number; lineHeight?: number; - /** - * Specifies text alignment. - * The value 'justify' is only supported on iOS. - */ - textAlign?: "auto" | "left" | "right" | "center"; + textAlign?: "auto" | "left" | "right" | "center" | "justify"; textDecorationLine?: "none" | "underline" | "line-through" | "underline line-through"; textDecorationStyle?: "solid" | "double" | "dotted" | "dashed"; textDecorationColor?: string; @@ -7730,8 +7726,7 @@ export interface EasingStatic { } export namespace Animated { - // Most (all?) functions where AnimatedValue is used any subclass of Animated can be used as well. - type AnimatedValue = Animated; + type AnimatedValue = Value; type AnimatedValueXY = ValueXY; type Base = Animated; @@ -8307,8 +8302,8 @@ export type ListView = ListViewStatic; export var MapView: MapViewStatic; export type MapView = MapViewStatic; -export var MaskedView: MaskedViewStatic; -export type MaskedView = MaskedViewStatic; +export var MaskedViewIOS: MaskedViewStatic; +export type MaskedViewIOS = MaskedViewStatic; export var Modal: ModalStatic; export type Modal = ModalStatic; diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 666ad12aca..879a0c522d 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -43,7 +43,7 @@ import { RefreshControl, TabBarIOS, NativeModules, - MaskedView, + MaskedViewIOS, } from "react-native"; declare module "react-native" { @@ -359,9 +359,9 @@ class AlertTest extends React.Component { class MaskedViewTest extends React.Component { render() { return ( - }> + }> - + ); } } diff --git a/types/react-native/tsconfig.json b/types/react-native/tsconfig.json index 508ac06f1a..674c8e65bf 100644 --- a/types/react-native/tsconfig.json +++ b/types/react-native/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index 37d6360688..1c6f6716a9 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -550,6 +550,7 @@ export const DrawerItems: React.ComponentType; * Drawer Navigator */ export interface DrawerViewConfig { + drawerBackgroundColor?: string; drawerWidth?: number; drawerPosition?: 'left' | 'right'; contentComponent?: React.ComponentType; diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx index 40d19f0fee..9b61d11c2d 100644 --- a/types/react-navigation/react-navigation-tests.tsx +++ b/types/react-navigation/react-navigation-tests.tsx @@ -5,6 +5,8 @@ import { ViewStyle, } from 'react-native'; import { + DrawerNavigator, + DrawerNavigatorConfig, NavigationAction, NavigationActions, NavigationBackAction, @@ -194,6 +196,36 @@ function renderBasicStackNavigator(): JSX.Element { ); } +/** + * Drawer navigator. + */ + +const drawerNavigatorScreenOptions: NavigationTabScreenOptions = { + title: 'title', +}; + +const drawerNavigatorConfig: DrawerNavigatorConfig = { + drawerBackgroundColor: '#777777', + contentOptions: { + activeTintColor: '#7A9B49', + inactiveTintColor: '#FFFFFF', + }, +}; + +const BasicDrawerNavigator = DrawerNavigator( + routeConfigMap, + stackNavigatorConfig, +); + +function renderBasicDrawerNavigator(): JSX.Element { + return ( + { }} + style={viewStyle} + /> + ); +} + interface CustomTransitionerProps { navigation: NavigationScreenProp; } diff --git a/types/react-navigation/tsconfig.json b/types/react-navigation/tsconfig.json index ac0fcf1f1f..f779d8886b 100644 --- a/types/react-navigation/tsconfig.json +++ b/types/react-navigation/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-notification-system-redux/react-notification-system-redux-tests.tsx b/types/react-notification-system-redux/react-notification-system-redux-tests.tsx index 631147976a..65f53a0b40 100644 --- a/types/react-notification-system-redux/react-notification-system-redux-tests.tsx +++ b/types/react-notification-system-redux/react-notification-system-redux-tests.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { createStore, Store } from "redux"; import { Notification } from "react-notification-system"; -import * as Notifications from "react-notification-system-redux"; +import Notifications = require("react-notification-system-redux"); import { reducer, removeAll, show, hide, info, error, warning, success, NotificationLevel } from "react-notification-system-redux"; class Test extends React.Component { diff --git a/types/react-notification-system-redux/tsconfig.json b/types/react-notification-system-redux/tsconfig.json index e401225f10..09316d1f0a 100644 --- a/types/react-notification-system-redux/tsconfig.json +++ b/types/react-notification-system-redux/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-notification-system/react-notification-system-tests.tsx b/types/react-notification-system/react-notification-system-tests.tsx index eb05663523..f46fd33aa2 100644 --- a/types/react-notification-system/react-notification-system-tests.tsx +++ b/types/react-notification-system/react-notification-system-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import * as NotificationSystem from 'react-notification-system'; +import NotificationSystem = require('react-notification-system'); class MyComponent extends React.Component { private notificationSystem: NotificationSystem.System = null; diff --git a/types/react-notification-system/tsconfig.json b/types/react-notification-system/tsconfig.json index 033a759d60..09c3eb8841 100644 --- a/types/react-notification-system/tsconfig.json +++ b/types/react-notification-system/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-numeric-input/react-numeric-input-tests.tsx b/types/react-numeric-input/react-numeric-input-tests.tsx index b3921c5e21..811b77a4c7 100644 --- a/types/react-numeric-input/react-numeric-input-tests.tsx +++ b/types/react-numeric-input/react-numeric-input-tests.tsx @@ -1,5 +1,5 @@ import { Component } from 'react'; -import * as NumericInput from 'react-numeric-input'; +import NumericInput = require('react-numeric-input'); export class NumericInputTest extends Component { render() { diff --git a/types/react-numeric-input/tsconfig.json b/types/react-numeric-input/tsconfig.json index 65c483475e..6cb9afc5c1 100644 --- a/types/react-numeric-input/tsconfig.json +++ b/types/react-numeric-input/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-numeric-input-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-onclickoutside/tsconfig.json b/types/react-onclickoutside/tsconfig.json index 701a5cf764..a9e2719543 100644 --- a/types/react-onclickoutside/tsconfig.json +++ b/types/react-onclickoutside/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-onclickoutside/v5/tsconfig.json b/types/react-onclickoutside/v5/tsconfig.json index 9de01e61ab..b556104845 100644 --- a/types/react-onclickoutside/v5/tsconfig.json +++ b/types/react-onclickoutside/v5/tsconfig.json @@ -21,6 +21,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-onsenui/tsconfig.json b/types/react-onsenui/tsconfig.json index 7835344791..4905933974 100644 --- a/types/react-onsenui/tsconfig.json +++ b/types/react-onsenui/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-overlays/index.d.ts b/types/react-overlays/index.d.ts index e97c7e3761..5d33d8da37 100644 --- a/types/react-overlays/index.d.ts +++ b/types/react-overlays/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for React Overlays 0.6 +// Type definitions for React Overlays 0.8 // Project: https://github.com/react-bootstrap/react-overlays // Definitions by: Aaron Beall // Vito Samson @@ -15,7 +15,6 @@ export { Overlay, Portal, Position, - Transition, RootCloseWrapper, } from './lib'; diff --git a/types/react-overlays/lib/Modal.d.ts b/types/react-overlays/lib/Modal.d.ts index 13a397f3b5..f626a30119 100644 --- a/types/react-overlays/lib/Modal.d.ts +++ b/types/react-overlays/lib/Modal.d.ts @@ -1,5 +1,6 @@ import * as React from 'react'; import { TransitionCallbacks } from 'react-overlays'; +import { TransitionProps } from 'react-transition-group/Transition'; import * as ModalManager from './ModalManager'; import { PortalProps } from './Portal'; @@ -88,13 +89,13 @@ interface ModalProps extends TransitionCallbacks, PortalProps { * A `react-transition-group@2.0.0` `` component used * to control animations for the dialog component. */ - transition?: Element; + transition?: React.ComponentType; /** * A `react-transition-group@2.0.0` `` component used * to control animations for the backdrop components. */ - backdropTransition?: Element; + backdropTransition?: React.ComponentType; /** * When `true` The modal will automatically shift focus to itself when it opens, and diff --git a/types/react-overlays/lib/Overlay.d.ts b/types/react-overlays/lib/Overlay.d.ts index 66a87b16c2..7df97f3cc3 100644 --- a/types/react-overlays/lib/Overlay.d.ts +++ b/types/react-overlays/lib/Overlay.d.ts @@ -1,5 +1,6 @@ import * as React from 'react'; import { TransitionCallbacks } from 'react-overlays'; +import { TransitionProps } from 'react-transition-group/Transition'; import { PortalProps } from './Portal'; import { PositionProps } from './Position'; @@ -29,5 +30,5 @@ interface OverlayProps extends TransitionCallbacks, PortalProps, PositionProps { * A `react-transition-group@2.0.0` `` component * used to animate the overlay as it changes visibility. */ - transition?: Element; + transition?: React.ComponentType; } diff --git a/types/react-overlays/lib/Transition.d.ts b/types/react-overlays/lib/Transition.d.ts deleted file mode 100644 index 7f57e7b0c8..0000000000 --- a/types/react-overlays/lib/Transition.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import * as React from 'react'; -import { TransitionCallbacks } from 'react-overlays'; - -declare class Transition extends React.Component { } -declare namespace Transition { } -export = Transition; - -interface TransitionProps extends TransitionCallbacks { - className?: string; - - /** - * Show the component; triggers the enter or exit animation - */ - in?: boolean; - - /** - * Unmount the component (remove it from the DOM) when it is not shown - */ - unmountOnExit?: boolean; - - /** - * Run the enter animation when the component mounts, if it is initially - * shown - */ - transitionAppear?: boolean; - - /** - * A Timeout for the animation, in milliseconds, to ensure that a node doesn't - * transition indefinately if the browser transitionEnd events are - * canceled or interrupted. - * - * By default this is set to a high number (5 seconds) as a failsafe. You should consider - * setting this to the duration of your animation (or a bit above it). - */ - timeout?: number; - - /** - * CSS class or classes applied when the component is exited - */ - exitedClassName?: string; - - /** - * CSS class or classes applied while the component is exiting - */ - exitingClassName?: string; - - /** - * CSS class or classes applied when the component is entered - */ - enteredClassName?: string; - - /** - * CSS class or classes applied while the component is entering - */ - enteringClassName?: string; -} diff --git a/types/react-overlays/lib/index.d.ts b/types/react-overlays/lib/index.d.ts index bc08d18d77..ea95108f8f 100644 --- a/types/react-overlays/lib/index.d.ts +++ b/types/react-overlays/lib/index.d.ts @@ -1,12 +1,11 @@ -import * as Affix from './Affix'; -import * as AutoAffix from './AutoAffix'; -import * as Modal from './Modal'; -import * as ModalManager from './ModalManager'; -import * as Overlay from './Overlay'; -import * as Portal from './Portal'; -import * as Position from './Position'; -import * as Transition from './Transition'; -import * as RootCloseWrapper from './RootCloseWrapper'; +import Affix = require('./Affix'); +import AutoAffix = require('./AutoAffix'); +import Modal = require('./Modal'); +import ModalManager = require('./ModalManager'); +import Overlay = require('./Overlay'); +import Portal = require('./Portal'); +import Position = require('./Position'); +import RootCloseWrapper = require('./RootCloseWrapper'); export { Affix, @@ -16,6 +15,5 @@ export { Overlay, Portal, Position, - Transition, RootCloseWrapper, }; diff --git a/types/react-overlays/test/react-overlays-tests-individual.tsx b/types/react-overlays/test/react-overlays-tests-individual.tsx index fbf2506331..b066a40ec3 100644 --- a/types/react-overlays/test/react-overlays-tests-individual.tsx +++ b/types/react-overlays/test/react-overlays-tests-individual.tsx @@ -1,27 +1,14 @@ import * as React from "react"; -import * as Transition from 'react-overlays/lib/Transition'; import * as Portal from 'react-overlays/lib/Portal'; import * as Modal from 'react-overlays/lib/Modal'; import * as Position from 'react-overlays/lib/Position'; -import * as Overlay from 'react-overlays/lib/Overlay'; +import Overlay = require('react-overlays/lib/Overlay'); import * as Affix from 'react-overlays/lib/Affix'; -import * as AutoAffix from 'react-overlays/lib/AutoAffix'; -import * as RootCloseWrapper from 'react-overlays/lib/RootCloseWrapper'; +import AutoAffix = require('react-overlays/lib/AutoAffix'); +import RootCloseWrapper = require('react-overlays/lib/RootCloseWrapper'); -function testTransition() { - return ( - -

Test
- - ); -} +import { OverlayFade } from './react-overlays-tests-transition'; class TestAffix extends React.Component { render(): JSX.Element { @@ -35,6 +22,32 @@ class TestAffix extends React.Component { } } +class TestOverlay extends React.Component<{}, {open: boolean}> { + target: HTMLElement | null = null; + state = {open: false}; + + render(): JSX.Element { + const { open } = this.state; + + return ( +
+ + + this.target} + transition={OverlayFade} + onHide={() => this.setState({open: false})} + placement="bottom"> +
Popover content
+
+
+ ); + } +} + class TestRootCloseWrapper extends React.Component { handleRootClose = () => { }; render() { diff --git a/types/react-overlays/test/react-overlays-tests-transition.tsx b/types/react-overlays/test/react-overlays-tests-transition.tsx new file mode 100644 index 0000000000..e1e04d7dda --- /dev/null +++ b/types/react-overlays/test/react-overlays-tests-transition.tsx @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSTransition } from 'react-transition-group'; +import { TransitionProps } from 'react-transition-group/Transition'; + +export function OverlayFade(props: TransitionProps): JSX.Element { + return ( + + ); +} diff --git a/types/react-overlays/test/react-overlays-tests.tsx b/types/react-overlays/test/react-overlays-tests.tsx index dde53d76bc..cbb2046fbc 100644 --- a/types/react-overlays/test/react-overlays-tests.tsx +++ b/types/react-overlays/test/react-overlays-tests.tsx @@ -1,7 +1,6 @@ import * as React from "react"; import { - Transition, Portal, Modal, Position, @@ -11,19 +10,7 @@ import { RootCloseWrapper, } from "react-overlays"; -function testTransition() { - return ( - -
Test
-
- ); -} +import { OverlayFade } from './react-overlays-tests-transition'; class TestAffix extends React.Component { render(): JSX.Element { @@ -37,6 +24,32 @@ class TestAffix extends React.Component { } } +class TestOverlay extends React.Component<{}, {open: boolean}> { + target: HTMLElement | null = null; + state = {open: false}; + + render(): JSX.Element { + const { open } = this.state; + + return ( +
+ + + this.target} + transition={OverlayFade} + onHide={() => this.setState({open: false})} + placement="bottom"> +
Popover content
+
+
+ ); + } +} + class TestRootCloseWrapper extends React.Component { handleRootClose = () => { }; render() { diff --git a/types/react-overlays/tsconfig.json b/types/react-overlays/tsconfig.json index 78f037e583..ff95732c63 100644 --- a/types/react-overlays/tsconfig.json +++ b/types/react-overlays/tsconfig.json @@ -16,11 +16,13 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ "index.d.ts", "test/react-overlays-tests.tsx", - "test/react-overlays-tests-individual.tsx" + "test/react-overlays-tests-individual.tsx", + "test/react-overlays-tests-transition.tsx" ] } \ No newline at end of file diff --git a/types/react-paginate/tsconfig.json b/types/react-paginate/tsconfig.json index 5653cee275..7c7e06ff5e 100644 --- a/types/react-paginate/tsconfig.json +++ b/types/react-paginate/tsconfig.json @@ -20,6 +20,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" } } \ No newline at end of file diff --git a/types/react-pointable/tsconfig.json b/types/react-pointable/tsconfig.json index f45312f83e..8b527c8891 100644 --- a/types/react-pointable/tsconfig.json +++ b/types/react-pointable/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-portal/react-portal-tests.tsx b/types/react-portal/react-portal-tests.tsx index ca6c0289de..5313b101bd 100644 --- a/types/react-portal/react-portal-tests.tsx +++ b/types/react-portal/react-portal-tests.tsx @@ -1,7 +1,7 @@ // Example from https://github.com/tajo/react-portal import * as React from "react"; import * as ReactDOM from "react-dom"; -import * as Portal from "react-portal"; +import Portal = require("react-portal"); export default class App extends React.Component { render() { diff --git a/types/react-portal/tsconfig.json b/types/react-portal/tsconfig.json index 84bec30f58..9ad14743e2 100644 --- a/types/react-portal/tsconfig.json +++ b/types/react-portal/tsconfig.json @@ -13,6 +13,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "lib": [ "es6", "dom" diff --git a/types/react-props-decorators/tsconfig.json b/types/react-props-decorators/tsconfig.json index 92243c709c..6ad67a4d9c 100644 --- a/types/react-props-decorators/tsconfig.json +++ b/types/react-props-decorators/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-recaptcha/react-recaptcha-tests.tsx b/types/react-recaptcha/react-recaptcha-tests.tsx index f049fe6698..2b225925d7 100644 --- a/types/react-recaptcha/react-recaptcha-tests.tsx +++ b/types/react-recaptcha/react-recaptcha-tests.tsx @@ -1,4 +1,4 @@ -import * as Recaptcha from "react-recaptcha"; +import Recaptcha = require("react-recaptcha"); import * as ReactDOM from "react-dom"; import * as React from "react"; diff --git a/types/react-recaptcha/tsconfig.json b/types/react-recaptcha/tsconfig.json index 0206cb26c5..5fe1c34378 100644 --- a/types/react-recaptcha/tsconfig.json +++ b/types/react-recaptcha/tsconfig.json @@ -16,7 +16,8 @@ "types": [], "jsx": "react", "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-redux-i18n/tsconfig.json b/types/react-redux-i18n/tsconfig.json index 8afdf46c9c..ca8e3691b4 100644 --- a/types/react-redux-i18n/tsconfig.json +++ b/types/react-redux-i18n/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-redux-toastr/index.d.ts b/types/react-redux-toastr/index.d.ts index 29570b99a2..125e0f138e 100644 --- a/types/react-redux-toastr/index.d.ts +++ b/types/react-redux-toastr/index.d.ts @@ -100,6 +100,7 @@ interface ReduxToastrProps { toastr?: ToastrState; transitionIn?: transitionInType; transitionOut?: transitionOutType; + className?: string; } interface ToastrEmitter { diff --git a/types/react-redux-toastr/tsconfig.json b/types/react-redux-toastr/tsconfig.json index 8760f15ade..228fb2bcc8 100644 --- a/types/react-redux-toastr/tsconfig.json +++ b/types/react-redux-toastr/tsconfig.json @@ -17,7 +17,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-redux/tsconfig.json b/types/react-redux/tsconfig.json index 981f3c9b0f..64433dbb42 100644 --- a/types/react-redux/tsconfig.json +++ b/types/react-redux/tsconfig.json @@ -21,6 +21,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/react-relay/classic.d.ts b/types/react-relay/classic.d.ts index 0db5308975..e0042c3c9b 100644 --- a/types/react-relay/classic.d.ts +++ b/types/react-relay/classic.d.ts @@ -117,7 +117,7 @@ export class DefaultNetworkLayer implements RelayNetworkLayer { } export function createContainer( - component: React.ComponentClass | React.StatelessComponent, + component: React.ComponentType, params?: CreateContainerOpts ): RelayContainerClass; export function injectNetworkLayer(networkLayer: RelayNetworkLayer): any; @@ -209,13 +209,17 @@ export type OnReadyStateChange = ( } ) => void; -export interface RelayProp { +export interface RelayProp { readonly route: { name: string }; // incomplete, also has params and queries - readonly variables: any; - readonly pendingVariables?: any; - setVariables(variables: any, onReadyStateChange?: OnReadyStateChange): void; - forceFetch(variables: any, onReadyStateChange?: OnReadyStateChange): void; + readonly variables: V; + readonly pendingVariables?: V; + setVariables(variables: V, onReadyStateChange?: OnReadyStateChange): void; + forceFetch(variables: V, onReadyStateChange?: OnReadyStateChange): void; hasOptimisticUpdate(record: any): boolean; getPendingTransactions(record: any): RelayMutationTransaction[]; commitUpdate(mutation: Mutation, callbacks?: StoreUpdateCallbacks): any; } + +export interface RelayProps { + readonly relay: RelayProp; +} diff --git a/types/react-relay/compat.d.ts b/types/react-relay/compat.d.ts index 22585d03d0..b74efc4ac2 100644 --- a/types/react-relay/compat.d.ts +++ b/types/react-relay/compat.d.ts @@ -1,21 +1,16 @@ -export { - QueryRenderer, - fetchQuery, - graphql, -} from "./index"; +export { QueryRenderer, fetchQuery, graphql } from "./index"; import { ConnectionConfig, RelayPaginationProp as RelayModernPaginationProp, - RelayRefetchProp as RelayModernRefetchProp + RelayRefetchProp as RelayModernRefetchProp, } from "./index"; +export { ConcreteFragment, ConcreteRequest, ConcreteBatchRequest } from "relay-runtime"; import * as RelayRuntimeTypes from "relay-runtime"; import { RelayEnvironmentInterface } from "./classic"; // ~~~~~~~~~~~~~~~~~~~~~ // Maybe Fix // ~~~~~~~~~~~~~~~~~~~~~ -export type ConcreteFragment = any; -export type ConcreteBatch = any; export type ConcreteFragmentDefinition = object; export type ConcreteOperationDefinition = object; @@ -30,7 +25,6 @@ export interface StatelessWithFragment extends React.StatelessComponent { getFragment: typeof getFragment; } export type ReactFragmentComponent = ComponentWithFragment | StatelessWithFragment; -export type ReactBaseComponent = React.ComponentClass | React.StatelessComponent; export type RelayClassicEnvironment = RelayEnvironmentInterface; // ~~~~~~~~~~~~~~~~~~~~~ @@ -68,18 +62,18 @@ export interface GeneratedNodeMap { } export function createFragmentContainer( - Component: ReactBaseComponent, + Component: React.ComponentType, fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap ): ReactFragmentComponent; export function createRefetchContainer( - Component: ReactBaseComponent, + Component: React.ComponentType, fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap, taggedNode: RelayRuntimeTypes.GraphQLTaggedNode ): ReactFragmentComponent; export function createPaginationContainer( - Component: ReactBaseComponent, + Component: React.ComponentType, fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap, connectionConfig: ConnectionConfig ): ReactFragmentComponent; diff --git a/types/react-relay/index.d.ts b/types/react-relay/index.d.ts index 04c173e9e2..55848cb47c 100644 --- a/types/react-relay/index.d.ts +++ b/types/react-relay/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Johannes Schickling // Matt Martin // Eloy Durán +// Nicolas Pirotte // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -10,20 +11,36 @@ export { commitLocalUpdate, commitRelayModernMutation as commitMutation, fetchRelayModernQuery as fetchQuery, + GraphQLTaggedNode, requestRelaySubscription as requestSubscription, } from "relay-runtime"; import * as React from "react"; import * as RelayRuntimeTypes from "relay-runtime"; +// ~~~~~~~~~~~~~~~~~~~~~ +// Utility types +// ~~~~~~~~~~~~~~~~~~~~~ + +// Taken from https://github.com/pelotom/type-zoo +// tslint:disable-next-line:strict-export-declare-modifiers +type Diff = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]; +// tslint:disable-next-line:strict-export-declare-modifiers +type Omit = Pick>; + +export type RemoveRelayProp

= Omit

; + +export interface ComponentRef { + componentRef?: (ref: any) => void; +} + +export type RelayContainer = React.ComponentType & ComponentRef>; + // ~~~~~~~~~~~~~~~~~~~~~ // Maybe Fix // ~~~~~~~~~~~~~~~~~~~~~ -export type ConcreteFragment = any; -export type ConcreteBatch = any; export type ConcreteFragmentDefinition = object; export type ConcreteOperationDefinition = object; -export type ReactBaseComponent = React.ComponentClass | React.StatelessComponent; // ~~~~~~~~~~~~~~~~~~~~~ // RelayProp @@ -39,24 +56,19 @@ export interface RelayProp { export function RelayQL(strings: string[], ...substitutions: any[]): RelayRuntimeTypes.RelayConcreteNode; // ~~~~~~~~~~~~~~~~~~~~~ -// RelayModernGraphQLTag +// ReactRelayTypes // ~~~~~~~~~~~~~~~~~~~~~ export interface GeneratedNodeMap { - [key: string]: GraphQLTaggedNode; + [key: string]: RelayRuntimeTypes.GraphQLTaggedNode; } -export type GraphQLTaggedNode = - | (() => ConcreteFragment | ConcreteBatch) - | { - modern(): ConcreteFragment | ConcreteBatch; - classic(relayQL: typeof RelayQL): ConcreteFragmentDefinition | ConcreteOperationDefinition; - }; + /** * Runtime function to correspond to the `graphql` tagged template function. * All calls to this function should be transformed by the plugin. */ export interface GraphqlInterface { - (strings: string[] | TemplateStringsArray): GraphQLTaggedNode; - experimental(strings: string[] | TemplateStringsArray): GraphQLTaggedNode; + (strings: string[] | TemplateStringsArray): RelayRuntimeTypes.GraphQLTaggedNode; + experimental(strings: string[] | TemplateStringsArray): RelayRuntimeTypes.GraphQLTaggedNode; } export const graphql: GraphqlInterface; @@ -66,7 +78,7 @@ export const graphql: GraphqlInterface; export interface QueryRendererProps { cacheConfig?: RelayRuntimeTypes.CacheConfig; environment: RelayRuntimeTypes.Environment; - query: GraphQLTaggedNode; + query: RelayRuntimeTypes.GraphQLTaggedNode; render(readyState: ReadyState): React.ReactElement | undefined | null; variables: RelayRuntimeTypes.Variables; rerunParamExperimental?: RelayRuntimeTypes.RerunParam; @@ -86,9 +98,9 @@ export class QueryRenderer extends ReactRelayQueryRenderer {} // createFragmentContainer // ~~~~~~~~~~~~~~~~~~~~~ export function createFragmentContainer( - Component: ReactBaseComponent, - fragmentSpec: GraphQLTaggedNode | GeneratedNodeMap -): ReactBaseComponent; + Component: React.ComponentType, + fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap +): RelayContainer; // ~~~~~~~~~~~~~~~~~~~~~ // createPaginationContainer @@ -130,16 +142,16 @@ export interface ConnectionConfig { paginationInfo: { count: number; cursor?: string }, fragmentVariables: RelayRuntimeTypes.Variables ): RelayRuntimeTypes.Variables; - query: GraphQLTaggedNode; + query: RelayRuntimeTypes.GraphQLTaggedNode; } export function createPaginationContainer( - Component: ReactBaseComponent, - fragmentSpec: GraphQLTaggedNode | GeneratedNodeMap, + Component: React.ComponentType, + fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap, connectionConfig: ConnectionConfig -): ReactBaseComponent; +): RelayContainer; // ~~~~~~~~~~~~~~~~~~~~~ -// createFragmentContainer +// createRefetchContainer // ~~~~~~~~~~~~~~~~~~~~~ export interface RefetchOptions { force?: boolean; @@ -156,7 +168,7 @@ export type RelayRefetchProp = RelayProp & { ): RelayRuntimeTypes.Disposable; }; export function createRefetchContainer( - Component: ReactBaseComponent, - fragmentSpec: GraphQLTaggedNode | GeneratedNodeMap, - taggedNode: GraphQLTaggedNode -): ReactBaseComponent; + Component: React.ComponentType, + fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap, + taggedNode: RelayRuntimeTypes.GraphQLTaggedNode +): RelayContainer; diff --git a/types/react-relay/test/react-relay-classic-tests.tsx b/types/react-relay/test/react-relay-classic-tests.tsx index 7aae267dfc..a57cbc1b6f 100644 --- a/types/react-relay/test/react-relay-classic-tests.tsx +++ b/types/react-relay/test/react-relay-classic-tests.tsx @@ -1,15 +1,14 @@ import * as React from "react"; import * as Relay from "react-relay/classic"; +import { CompatContainer } from "./react-relay-compat-tests"; + interface Props { text: string; userId: string; } -// tslint:disable-next-line no-empty-interface -interface Response {} - -export default class AddTweetMutation extends Relay.Mutation { +export default class AddTweetMutation extends Relay.Mutation { getMutation() { return Relay.QL`mutation{addTweet}`; } @@ -43,11 +42,14 @@ export default class AddTweetMutation extends Relay.Mutation { } } -interface ArtworkProps { +interface ArtwokRelayVariables { + artworkID: string; +} + +interface ArtworkProps extends Relay.RelayProps { artwork: { title: string; }; - relay: Relay.RelayProp; } class Artwork extends React.Component { @@ -61,6 +63,7 @@ const ArtworkContainer = Relay.createContainer(Artwork, { artwork: () => Relay.QL` fragment on Artwork { title + ${CompatContainer.getFragment("whatever")} } `, }, @@ -80,7 +83,7 @@ class StubbedArtwork extends React.Component { setVariables: () => {}, forceFetch: () => {}, hasOptimisticUpdate: () => false, - getPendingTransactions: (): Relay.RelayMutationTransaction[] => [], + getPendingTransactions: (): any => undefined, commitUpdate: () => {}, }, }; diff --git a/types/react-relay/test/react-relay-compat-tests.tsx b/types/react-relay/test/react-relay-compat-tests.tsx new file mode 100644 index 0000000000..e0ee5d3be2 --- /dev/null +++ b/types/react-relay/test/react-relay-compat-tests.tsx @@ -0,0 +1,53 @@ +import * as React from "react"; +import { + QueryRenderer as CompatQueryRenderer, + createFragmentContainer as createFragmentContainerCompat, + commitMutation as commitMutationCompat, + CompatEnvironment, + RelayPaginationProp as RelayPaginationPropCompat, +} from "react-relay/compat"; + +import { configs, mutation, optimisticResponse } from "./react-relay-tests"; + +// testting compat mutation with classic environment +function markNotificationAsReadCompat(environment: CompatEnvironment, source: string, storyID: string) { + const variables = { + input: { + source, + storyID, + }, + }; + + commitMutationCompat(environment, { + configs, + mutation, + optimisticResponse, + variables, + onCompleted: (response, errors) => { + console.log("Response received from server."); + }, + onError: err => console.error(err), + updater: (store, data) => { + const field = store.get(storyID); + if (field) { + field.setValue(data.story, "story"); + } + } + }); +} + +interface CompatProps { + relay: RelayPaginationPropCompat; +} + +class CompatComponent extends React.Component { + markNotificationAsRead(source: string, storyID: string) { + markNotificationAsReadCompat(this.props.relay.environment, source, storyID); + } + + render() { + return (

); + } +} + +export const CompatContainer = createFragmentContainerCompat(CompatComponent, {}); diff --git a/types/react-relay/test/react-relay-tests.tsx b/types/react-relay/test/react-relay-tests.tsx index f73b7c00c7..cc25f5f368 100644 --- a/types/react-relay/test/react-relay-tests.tsx +++ b/types/react-relay/test/react-relay-tests.tsx @@ -1,9 +1,6 @@ import * as React from "react"; -import { Environment, Network, RecordSource, Store, ConnectionHandler } from "relay-runtime"; +import { Environment, Network, RecordSource, Store, ConnectionHandler, FragmentReference } from "relay-runtime"; -//////////////////////////// -// RELAY MODERN TESTS -/////////////////////////// import { graphql, commitMutation, @@ -13,7 +10,8 @@ import { requestSubscription, QueryRenderer, RelayRefetchProp, - RelayPaginationProp + RelayPaginationProp, + RelayProp } from "react-relay"; // ~~~~~~~~~~~~~~~~~~~~~ @@ -54,63 +52,137 @@ const MyQueryRenderer = (props: { name: string }) => ( /> ); -// ~~~~~~~~~~~~~~~~~~~~~ -// Modern FragmentContainer -// ~~~~~~~~~~~~~~~~~~~~~ -const MyFragmentContainer = createFragmentContainer( - class TodoListView extends React.Component { - render() { - return
; - } - }, - { - item: graphql` - fragment TodoItem_item on Todo { - text - isComplete - } - `, - } -); - // ~~~~~~~~~~~~~~~~~~~~~ // Modern RefetchContainer // ~~~~~~~~~~~~~~~~~~~~~ -interface StoryInterface { - id: string; -} -interface FeedStoriesProps { - relay: RelayRefetchProp; - feed: { - stories: { edges: Array<{ node: StoryInterface }> }; - }; -} -class Story extends React.Component<{ story: StoryInterface }> {} -class FeedStories extends React.Component { - render() { - return ( -
- {this.props.feed.stories.edges.map(edge => )} -
- ); + +type StoryLike = (storyID: string) => void; + +// Artifact produced by relay-compiler-language-typescript +// tslint:disable-next-line:no-const-enum +const enum _Story_story$ref {} +type Story_story$ref = _Story_story$ref & FragmentReference; +// tslint:disable-next-line:interface-over-type-literal +type Story_story = { + readonly id: string; + readonly text: string; + readonly isPublished: boolean; + readonly " $refType": Story_story$ref; +}; + +const Story = (() => { + interface Props { + relay: RelayRefetchProp; + story: Story_story; + onLike: StoryLike; + ignoreMe?: {}; } - _loadMore() { - // Increments the number of stories being rendered by 10. - const refetchVariables = (fragmentVariables: { count: number }) => ({ - count: fragmentVariables.count + 10, + interface State { + isLoading: boolean; + } + + class Story extends React.Component { + state = { + isLoading: false + }; + + componentDidMount() { + setInterval(this.handleRefresh.bind(this), 1000); + } + + handleRefresh() { + this.setState({ isLoading: true }); + this.props.relay.refetch({ id: this.props.story.id }, {}, error => { + this.setState({ isLoading: false }); + }, { force: true }); + } + + render() { + return ( +
+ {this.props.story.isPublished ? "" : "Draft: "} + {this.props.story.text} + {this.state.isLoading && ♺} + +
+ ); + } + } + + const StoryRefetchContainer = createRefetchContainer( + Story, + { + story: graphql` + fragment Story_story on Todo { + id + text + isPublished + } + `, + }, + graphql.experimental` + query StoryRefetchQuery($id: ID!) { + story(id: $id) { + ...Story_story + } + } + ` + ); + + function doesNotRequireRelayPropToBeProvided() { + const onLike = (id: string) => console.log(`Liked story #${id}`); + const story: { " $fragmentRefs": Story_story$ref } = {} as any; + // TODO: Fix requirement to cast fragment reference as `any`. + ; + } + + return StoryRefetchContainer; +})(); + +// ~~~~~~~~~~~~~~~~~~~~~ +// Modern FragmentContainer +// ~~~~~~~~~~~~~~~~~~~~~ + +// Artifact produced by relay-compiler-language-typescript +// tslint:disable-next-line:no-const-enum +const enum _FeedStories_feed$ref {} +type FeedStories_feed$ref = _FeedStories_feed$ref & FragmentReference; +// tslint:disable-next-line:interface-over-type-literal +type FeedStories_feed = { + readonly edges: ReadonlyArray<{ + readonly node: { + readonly id: string; + readonly " $fragmentRefs": Story_story$ref; + }; + }>; + readonly " $refType": FeedStories_feed$ref; +}; + +const Feed = (() => { + interface Props { + relay: RelayProp; + feed: FeedStories_feed; + onStoryLike: StoryLike; + ignoreMe?: {}; + } + + const FeedStories: React.SFC = ({ feed, onStoryLike, relay }) => { + // TODO: Getting env here for no good reason other than needing to test it works. + // If you have a good relavant example, please update! + relay.environment; + const stories = feed.edges.map(edge => { + // TODO: Fix requirement to cast fragment reference as `any`. + return ; }); - this.props.relay.refetch(refetchVariables); - } -} + return
{stories}
; + }; -const FeedRefetchContainer = createRefetchContainer( - FeedStories, - { - feed: graphql.experimental` - fragment FeedStories_feed on Feed @argumentDefinitions(count: { type: "Int", defaultValue: 10 }) { - stories(first: $count) { + const FeedFragmentContainer = createFragmentContainer( + FeedStories, + { + feed: graphql` + fragment FeedStories_feed on Feed { edges { node { id @@ -118,104 +190,137 @@ const FeedRefetchContainer = createRefetchContainer( } } } - } - `, - }, - graphql.experimental` - query FeedStoriesRefetchQuery($count: Int) { - feed { - ...FeedStories_feed @arguments(count: $count) - } + `, } - ` -); + ); + + function doesNotRequireRelayPropToBeProvided() { + const onStoryLike = (id: string) => console.log(`Liked story #${id}`); + const feed: { " $fragmentRefs": FeedStories_feed$ref } = {} as any; + // TODO: Fix requirement to cast fragment reference as `any`. + ; + } + + return FeedFragmentContainer; +})(); // ~~~~~~~~~~~~~~~~~~~~~ // Modern PaginationContainer // ~~~~~~~~~~~~~~~~~~~~~ -interface FeedProps { - user: { feed: { edges: Array<{ node: StoryInterface }> } }; - relay: RelayPaginationProp; -} -class Feed extends React.Component { - render() { - return ( -
- {this.props.user.feed.edges.map(edge => )} -
- ); + +// Artifact produced by relay-compiler-language-typescript +// tslint:disable-next-line:no-const-enum +const enum _UserFeed_user$ref {} +type UserFeed_user$ref = _UserFeed_user$ref & FragmentReference; +// tslint:disable-next-line:interface-over-type-literal +type UserFeed_user = { + readonly feed: { + readonly pageInfo: { + readonly endCursor?: string | null; + readonly hasNextPage: boolean; + }; + readonly " $fragmentRefs": FeedStories_feed$ref; + }; + readonly " $refType": UserFeed_user$ref; +}; + +() => { + interface Props { + relay: RelayPaginationProp; + loadMoreTitle: string; + user: UserFeed_user; + ignoreMe?: {}; } - _loadMore() { - if (!this.props.relay.hasMore() || this.props.relay.isLoading()) { - return; + class UserFeed extends React.Component { + render() { + const onStoryLike = (id: string) => console.log(`Liked story #${id}`); + // TODO: Fix requirement to cast fragment reference as `any`. + const feed = this.props.user.feed as any; + return ( +
+ +
+ ); } - this.props.relay.loadMore( - 10, // Fetch the next 10 feed items - e => { - console.log(e); + _loadMore() { + if (!this.props.relay.hasMore() || this.props.relay.isLoading()) { + return; } - ); - } -} -const FeedPaginationContainer = createPaginationContainer( - Feed, - { - user: graphql` - fragment Feed_user on User { - feed( - first: $count - after: $cursor - orderby: $orderBy # other variables - ) @connection(key: "Feed_feed") { - edges { - node { - id - ...Story_story + this.props.relay.loadMore( + 10, // Fetch the next 10 feed items + e => { + console.log(e); + } + ); + } + } + + const UserFeedPaginationContainer = createPaginationContainer( + UserFeed, + { + user: graphql` + fragment UserFeed_user on User { + feed( + first: $count + after: $cursor + orderby: $orderBy # other variables + ) @connection(key: "Feed_feed") { + ...FeedStories_feed + pageInfo { + endCursor + hasNextPage } } } - } - `, - }, - { - direction: "forward", - getConnectionFromProps(props) { - return props.user && props.user.feed; + `, }, - getFragmentVariables(prevVars, totalCount) { - return { - ...prevVars, - count: totalCount, - }; - }, - getVariables(props, { count, cursor }, fragmentVariables) { - return { - count, - cursor, - // in most cases, for variables other than connection filters like - // `first`, `after`, etc. you may want to use the previous values. - orderBy: fragmentVariables.orderBy, - }; - }, - query: graphql` - query FeedPaginationQuery($count: Int!, $cursor: String, $orderby: String!) { - user { - # You could reference the fragment defined previously. - ...Feed_user + { + direction: "forward", + getConnectionFromProps(props) { + // TODO: Fix requirement to have `edges` and both `pageInfo` details for forward and backward pagination + return props.user && props.user.feed as any; + }, + getFragmentVariables(prevVars, totalCount) { + return { + ...prevVars, + count: totalCount, + }; + }, + getVariables(props, { count, cursor }, fragmentVariables) { + return { + count, + cursor, + // in most cases, for variables other than connection filters like + // `first`, `after`, etc. you may want to use the previous values. + orderBy: fragmentVariables.orderBy, + }; + }, + query: graphql` + query FeedPaginationQuery($count: Int!, $cursor: String, $orderby: String!) { + user { + # You could reference the fragment defined previously. + ...Feed_user + } } - } - `, + `, + } + ); + + function doesNotRequireRelayPropToBeProvided() { + const user: { " $fragmentRefs": UserFeed_user$ref } = {} as any; + // TODO: Fix requirement to cast fragment reference as `any`. + ; } -); +}; // ~~~~~~~~~~~~~~~~~~~~~ // Modern Mutations // ~~~~~~~~~~~~~~~~~~~~~ -const mutation = graphql` +export const mutation = graphql` mutation MarkReadNotificationMutation($input: MarkReadNotificationData!) { markReadNotification(data: $input) { notification { @@ -225,7 +330,7 @@ const mutation = graphql` } `; -const optimisticResponse = { +export const optimisticResponse = { markReadNotification: { notification: { seenState: "SEEN", @@ -233,7 +338,7 @@ const optimisticResponse = { }, }; -const configs = [ +export const configs = [ { type: "NODE_DELETE" as "NODE_DELETE", deletedIDFieldName: "destroyedShipId", @@ -325,147 +430,3 @@ requestSubscription( }, } ); - -//////////////////////////// -// RELAY COMPAT TESTS -/////////////////////////// -import { - QueryRenderer as CompatQueryRenderer, - createFragmentContainer as createFragmentContainerCompat, - commitMutation as commitMutationCompat, - CompatEnvironment, - RelayPaginationProp as RelayPaginationPropCompat, -} from "react-relay/compat"; - -// testting compat mutation with classic environment -function markNotificationAsReadCompat(environment: CompatEnvironment, source: string, storyID: string) { - const variables = { - input: { - source, - storyID, - }, - }; - - commitMutationCompat(environment, { - configs, - mutation, - optimisticResponse, - variables, - onCompleted: (response, errors) => { - console.log("Response received from server."); - }, - onError: err => console.error(err), - updater: (store, data) => { - const field = store.get(storyID); - if (field) { - field.setValue(data.story, "story"); - } - } - }); -} - -interface CompatProps { - relay: RelayPaginationPropCompat; -} - -export class CompatComponent extends React.Component { - markNotificationAsRead(source: string, storyID: string) { - markNotificationAsReadCompat(this.props.relay.environment, source, storyID); - } - - render() { - return (
); - } -} - -const CompatContainer = createFragmentContainerCompat(CompatComponent, {}); - -//////////////////////////// -// RELAY-CLASSIC TESTS -/////////////////////////// -import * as Relay from "react-relay/classic"; - -interface Props { - text: string; - userId: string; -} - -export default class AddTweetMutation extends Relay.Mutation { - getMutation() { - return Relay.QL`mutation{addTweet}`; - } - - getFatQuery() { - return Relay.QL` - fragment on AddTweetPayload { - tweetEdge - user - } - `; - } - - getConfigs() { - return [ - { - type: "RANGE_ADD", - parentName: "user", - parentID: this.props.userId, - connectionName: "tweets", - edgeName: "tweetEdge", - rangeBehaviors: { - "": "append", - }, - }, - ]; - } - - getVariables() { - return this.props; - } -} - -interface ArtworkProps { - artwork: { - title: string; - }; - relay: Relay.RelayProp; -} - -class Artwork extends React.Component { - render() { - return {this.props.artwork.title}; - } -} - -const ArtworkContainer = Relay.createContainer(Artwork, { - fragments: { - artwork: () => Relay.QL` - fragment on Artwork { - title - ${ CompatContainer.getFragment('whatever') } - } - `, - }, -}); - -class StubbedArtwork extends React.Component { - render() { - const props = { - artwork: { title: "CHAMPAGNE FORMICA FLAG" }, - relay: { - route: { - name: "champagne", - }, - variables: { - artworkID: "champagne-formica-flag", - }, - setVariables: () => {}, - forceFetch: () => {}, - hasOptimisticUpdate: () => false, - getPendingTransactions: (): any => undefined, - commitUpdate: () => {}, - }, - }; - return ; - } -} diff --git a/types/react-relay/tsconfig.json b/types/react-relay/tsconfig.json index 3e471b36ad..bf3dc05339 100644 --- a/types/react-relay/tsconfig.json +++ b/types/react-relay/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ @@ -23,6 +24,7 @@ "classic.d.ts", "compat.d.ts", "test/react-relay-tests.tsx", + "test/react-relay-compat-tests.tsx", "test/react-relay-classic-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-resolver/react-resolver-tests.tsx b/types/react-resolver/react-resolver-tests.tsx index ce41e6db4c..088f5e7573 100644 --- a/types/react-resolver/react-resolver-tests.tsx +++ b/types/react-resolver/react-resolver-tests.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; import { Resolver, resolve, context } from 'react-resolver'; -import * as expect from 'expect'; interface OwnProps { thing: number; @@ -32,13 +31,13 @@ const ResolvedPageWithPropMap = resolve({ const PageWithContext = context('history')(Page); -expect().toExist(); -expect().toExist(); +; +; // Resolver.render(() => , document.getElementById('app')); Resolver.resolve(() => { return ; }).then(({ data, Resolved }) => { - expect(data).toBe('World'); + data === 'World'; }); diff --git a/types/react-resolver/tsconfig.json b/types/react-resolver/tsconfig.json index 94a604e352..f54448dae8 100644 --- a/types/react-resolver/tsconfig.json +++ b/types/react-resolver/tsconfig.json @@ -16,10 +16,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ "index.d.ts", "react-resolver-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-responsive/tsconfig.json b/types/react-responsive/tsconfig.json index 294f0c8cde..a099ee5d0e 100644 --- a/types/react-responsive/tsconfig.json +++ b/types/react-responsive/tsconfig.json @@ -15,10 +15,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ "index.d.ts", "react-responsive-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-responsive/v1/react-responsive-tests.tsx b/types/react-responsive/v1/react-responsive-tests.tsx index e3644771c4..adbedbae09 100644 --- a/types/react-responsive/v1/react-responsive-tests.tsx +++ b/types/react-responsive/v1/react-responsive-tests.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import * as MediaQuery from "react-responsive"; +import MediaQuery = require("react-responsive"); class Test extends React.Component { render() { diff --git a/types/react-responsive/v1/tsconfig.json b/types/react-responsive/v1/tsconfig.json index 774fd47a00..5a359a977f 100644 --- a/types/react-responsive/v1/tsconfig.json +++ b/types/react-responsive/v1/tsconfig.json @@ -24,10 +24,11 @@ }, "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ "index.d.ts", "react-responsive-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-router-bootstrap/tsconfig.json b/types/react-router-bootstrap/tsconfig.json index 870c37c742..0583c384f6 100644 --- a/types/react-router-bootstrap/tsconfig.json +++ b/types/react-router-bootstrap/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-router-config/tsconfig.json b/types/react-router-config/tsconfig.json index 49ab50e7b0..82c77037df 100644 --- a/types/react-router-config/tsconfig.json +++ b/types/react-router-config/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "preserve" }, "files": [ diff --git a/types/react-router-dom/tsconfig.json b/types/react-router-dom/tsconfig.json index 4c308400b7..b194a014dc 100644 --- a/types/react-router-dom/tsconfig.json +++ b/types/react-router-dom/tsconfig.json @@ -16,6 +16,7 @@ "noImplicitAny": true, "noImplicitThis": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noEmit": true }, "files": [ diff --git a/types/react-router-native/tsconfig.json b/types/react-router-native/tsconfig.json index 7b5d8f9fe3..115a454187 100644 --- a/types/react-router-native/tsconfig.json +++ b/types/react-router-native/tsconfig.json @@ -16,6 +16,7 @@ "noImplicitAny": true, "noImplicitThis": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noEmit": true }, "files": [ diff --git a/types/react-router-navigation-core/tsconfig.json b/types/react-router-navigation-core/tsconfig.json index b4572aa56c..c3890eb1fe 100644 --- a/types/react-router-navigation-core/tsconfig.json +++ b/types/react-router-navigation-core/tsconfig.json @@ -1,17 +1,26 @@ { "compilerOptions": { "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "module": "commonjs", - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "jsx": "react", "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitAny": true, "noImplicitThis": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noEmit": true }, - "files": ["index.d.ts", "react-router-navigation-core-tests.tsx"] -} + "files": [ + "index.d.ts", + "react-router-navigation-core-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-router-navigation/tsconfig.json b/types/react-router-navigation/tsconfig.json index d9909d32a6..31f32114c0 100644 --- a/types/react-router-navigation/tsconfig.json +++ b/types/react-router-navigation/tsconfig.json @@ -1,17 +1,26 @@ { "compilerOptions": { "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "module": "commonjs", - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "jsx": "react", "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitAny": true, "noImplicitThis": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noEmit": true }, - "files": ["index.d.ts", "react-router-navigation-tests.tsx"] -} + "files": [ + "index.d.ts", + "react-router-navigation-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-router-redux/tsconfig.json b/types/react-router-redux/tsconfig.json index 58bf304abc..fba7117c16 100644 --- a/types/react-router-redux/tsconfig.json +++ b/types/react-router-redux/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-router-redux/v3/tsconfig.json b/types/react-router-redux/v3/tsconfig.json index e9e48c7e58..e6ebc919e1 100644 --- a/types/react-router-redux/v3/tsconfig.json +++ b/types/react-router-redux/v3/tsconfig.json @@ -26,7 +26,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-router-redux/v4/tsconfig.json b/types/react-router-redux/v4/tsconfig.json index 427325c7fc..2ff6844055 100644 --- a/types/react-router-redux/v4/tsconfig.json +++ b/types/react-router-redux/v4/tsconfig.json @@ -26,7 +26,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-router/test/examples-from-react-router-website/Animation.tsx b/types/react-router/test/examples-from-react-router-website/Animation.tsx index d303f29a97..c59d4f91c9 100644 --- a/types/react-router/test/examples-from-react-router-website/Animation.tsx +++ b/types/react-router/test/examples-from-react-router-website/Animation.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import * as ReactCSSTransitionGroup from 'react-addons-css-transition-group'; +import ReactCSSTransitionGroup = require('react-addons-css-transition-group'); import { BrowserRouter as Router, RouteComponentProps, diff --git a/types/react-router/tsconfig.json b/types/react-router/tsconfig.json index 95e3846a8c..4f55c5fb1c 100644 --- a/types/react-router/tsconfig.json +++ b/types/react-router/tsconfig.json @@ -16,6 +16,7 @@ "noImplicitAny": true, "noImplicitThis": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "noEmit": true, "experimentalDecorators": true }, @@ -41,4 +42,4 @@ "test/InheritingRoute.tsx", "test/WithRouter.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-router/v2/tsconfig.json b/types/react-router/v2/tsconfig.json index 9e007bef15..f4c8a30073 100644 --- a/types/react-router/v2/tsconfig.json +++ b/types/react-router/v2/tsconfig.json @@ -26,7 +26,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/react-router/v3/tsconfig.json b/types/react-router/v3/tsconfig.json index a620b2e01b..1d3ddf2cc0 100644 --- a/types/react-router/v3/tsconfig.json +++ b/types/react-router/v3/tsconfig.json @@ -30,7 +30,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-s-alert/tsconfig.json b/types/react-s-alert/tsconfig.json index c029ed03aa..eacaa2f4e8 100644 --- a/types/react-s-alert/tsconfig.json +++ b/types/react-s-alert/tsconfig.json @@ -16,10 +16,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-s-alert-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-scroll/tsconfig.json b/types/react-scroll/tsconfig.json index 4e8422e85d..be5101711f 100644 --- a/types/react-scroll/tsconfig.json +++ b/types/react-scroll/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-scrollbar/tsconfig.json b/types/react-scrollbar/tsconfig.json index d9586168d7..3dc2258567 100644 --- a/types/react-scrollbar/tsconfig.json +++ b/types/react-scrollbar/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-select/tsconfig.json b/types/react-select/tsconfig.json index 727747e72c..9158ae101e 100644 --- a/types/react-select/tsconfig.json +++ b/types/react-select/tsconfig.json @@ -20,6 +20,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/react-side-effect/react-side-effect-tests.ts b/types/react-side-effect/react-side-effect-tests.ts index 60566eafa7..d568fed4cc 100644 --- a/types/react-side-effect/react-side-effect-tests.ts +++ b/types/react-side-effect/react-side-effect-tests.ts @@ -1,5 +1,5 @@ import * as React from "react"; -import * as withSideEffect from "react-side-effect"; +import withSideEffect = require("react-side-effect"); interface DocumentTitleProps { title: string diff --git a/types/react-side-effect/tsconfig.json b/types/react-side-effect/tsconfig.json index f64b0cedec..e5a0ae6fc5 100644 --- a/types/react-side-effect/tsconfig.json +++ b/types/react-side-effect/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-sidebar/tsconfig.json b/types/react-sidebar/tsconfig.json index 8481bb2fa3..72cf019a8b 100644 --- a/types/react-sidebar/tsconfig.json +++ b/types/react-sidebar/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-sketchapp/tsconfig.json b/types/react-sketchapp/tsconfig.json index 6dc8b9460a..ee2e4fd7a9 100644 --- a/types/react-sketchapp/tsconfig.json +++ b/types/react-sketchapp/tsconfig.json @@ -4,6 +4,7 @@ "module": "commonjs", "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "baseUrl": "../", "jsx": "preserve", "typeRoots": [ diff --git a/types/react-slick/tsconfig.json b/types/react-slick/tsconfig.json index 7d8d0c0dbc..7be1247f88 100644 --- a/types/react-slick/tsconfig.json +++ b/types/react-slick/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx b/types/react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx index b976624a4e..22fd0ae83c 100644 --- a/types/react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx +++ b/types/react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import * as SmoothScrollbar from 'react-smooth-scrollbar'; +import SmoothScrollbar = require('react-smooth-scrollbar'); { } } />; // ; TODO: These options don't seem to be documented diff --git a/types/react-smooth-scrollbar/tsconfig.json b/types/react-smooth-scrollbar/tsconfig.json index 7069af35d0..3b950bc1e4 100644 --- a/types/react-smooth-scrollbar/tsconfig.json +++ b/types/react-smooth-scrollbar/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-sortable-hoc/tsconfig.json b/types/react-sortable-hoc/tsconfig.json index 89aef58db4..7e6511c11b 100644 --- a/types/react-sortable-hoc/tsconfig.json +++ b/types/react-sortable-hoc/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-sortable-pane/tsconfig.json b/types/react-sortable-pane/tsconfig.json index 2c919006c5..aeb93be68e 100644 --- a/types/react-sortable-pane/tsconfig.json +++ b/types/react-sortable-pane/tsconfig.json @@ -16,10 +16,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ "index.d.ts", "react-sortable-pane-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-sortable-tree/tsconfig.json b/types/react-sortable-tree/tsconfig.json index abf3027b1e..ba1fea9eaf 100644 --- a/types/react-sortable-tree/tsconfig.json +++ b/types/react-sortable-tree/tsconfig.json @@ -16,7 +16,8 @@ "jsx": "react", "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-spinkit/react-spinkit-tests.tsx b/types/react-spinkit/react-spinkit-tests.tsx index 27717503d6..ac952bc700 100644 --- a/types/react-spinkit/react-spinkit-tests.tsx +++ b/types/react-spinkit/react-spinkit-tests.tsx @@ -1,4 +1,4 @@ -import * as Spinner from 'react-spinkit'; +import Spinner = require('react-spinkit'); import * as React from 'react'; // Examples taken from http://kyleamathews.github.io/react-spinkit/ diff --git a/types/react-spinkit/tsconfig.json b/types/react-spinkit/tsconfig.json index a78e0a8350..5898e0a2b9 100644 --- a/types/react-spinkit/tsconfig.json +++ b/types/react-spinkit/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-spinkit/v1/react-spinkit-tests.tsx b/types/react-spinkit/v1/react-spinkit-tests.tsx index 6742096ebe..463a689364 100644 --- a/types/react-spinkit/v1/react-spinkit-tests.tsx +++ b/types/react-spinkit/v1/react-spinkit-tests.tsx @@ -1,4 +1,4 @@ -import * as Spinner from 'react-spinkit'; +import Spinner = require('react-spinkit'); import * as React from 'react'; // Examples taken from http://kyleamathews.github.io/react-spinkit/ diff --git a/types/react-spinkit/v1/tsconfig.json b/types/react-spinkit/v1/tsconfig.json index 9e75ac7eee..9e47e5233f 100644 --- a/types/react-spinkit/v1/tsconfig.json +++ b/types/react-spinkit/v1/tsconfig.json @@ -24,7 +24,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-sticky/tsconfig.json b/types/react-sticky/tsconfig.json index 42ca8483c7..228be56f40 100644 --- a/types/react-sticky/tsconfig.json +++ b/types/react-sticky/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-stripe-elements/tsconfig.json b/types/react-stripe-elements/tsconfig.json index 7b41414c95..c687200bc4 100644 --- a/types/react-stripe-elements/tsconfig.json +++ b/types/react-stripe-elements/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-svg-pan-zoom/tsconfig.json b/types/react-svg-pan-zoom/tsconfig.json index 9768940812..30d4833817 100644 --- a/types/react-svg-pan-zoom/tsconfig.json +++ b/types/react-svg-pan-zoom/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-swf/tsconfig.json b/types/react-swf/tsconfig.json index 088289e3b4..5de4ce4f53 100644 --- a/types/react-swf/tsconfig.json +++ b/types/react-swf/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-swipe/react-swipe-tests.tsx b/types/react-swipe/react-swipe-tests.tsx index 2a2f0ffc90..2948141ee6 100644 --- a/types/react-swipe/react-swipe-tests.tsx +++ b/types/react-swipe/react-swipe-tests.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import * as ReactSwipe from "react-swipe"; +import ReactSwipe = require("react-swipe"); class ReactSwipeTest extends React.PureComponent { private swipeComponent: ReactSwipe | null = null; diff --git a/types/react-swipe/tsconfig.json b/types/react-swipe/tsconfig.json index 592223407e..929998a56c 100644 --- a/types/react-swipe/tsconfig.json +++ b/types/react-swipe/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-swipeable-views/tsconfig.json b/types/react-swipeable-views/tsconfig.json index 3d4711fc53..7f4c7c4ce6 100644 --- a/types/react-swipeable-views/tsconfig.json +++ b/types/react-swipeable-views/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-swipeable/react-swipeable-tests.tsx b/types/react-swipeable/react-swipeable-tests.tsx index b31011d63d..b068683c33 100644 --- a/types/react-swipeable/react-swipeable-tests.tsx +++ b/types/react-swipeable/react-swipeable-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import * as Swipeable from 'react-swipeable'; +import Swipeable = require('react-swipeable'); class SampleComponent extends React.PureComponent { private readonly handleSwiped: Swipeable.OnSwipedCallback = () => {}; diff --git a/types/react-swipeable/tsconfig.json b/types/react-swipeable/tsconfig.json index a720949edf..1a3953c812 100644 --- a/types/react-swipeable/tsconfig.json +++ b/types/react-swipeable/tsconfig.json @@ -16,10 +16,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ "index.d.ts", "react-swipeable-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-syntax-highlighter/tsconfig.json b/types/react-syntax-highlighter/tsconfig.json index b83dacca56..f0a2eb5b06 100644 --- a/types/react-syntax-highlighter/tsconfig.json +++ b/types/react-syntax-highlighter/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-table/index.d.ts b/types/react-table/index.d.ts index fed845fd49..1800a9d745 100644 --- a/types/react-table/index.d.ts +++ b/types/react-table/index.d.ts @@ -167,7 +167,7 @@ export interface TableProps extends PadRowComponent: () => React.ReactNode; /** Server-side callbacks */ - onFetchData: () => void; + onFetchData: (state: any, instance: any) => void; } export interface ControlledStateOverrideProps { @@ -177,6 +177,9 @@ export interface ControlledStateOverrideProps { /** Default: undefined */ pageSize: number | undefined; + /** Default: undefined */ + pages: number | undefined; + /** Default: undefined */ sorting: number; diff --git a/types/react-table/react-table-tests.tsx b/types/react-table/react-table-tests.tsx index a5609394ce..3230e4c5da 100644 --- a/types/react-table/react-table-tests.tsx +++ b/types/react-table/react-table-tests.tsx @@ -93,6 +93,7 @@ const Component = (props: {}) => { PadRowComponent={() =>  } page={undefined} pageSize={undefined} + pages={undefined} sorted={[]} filtered={[]} resized={[]} @@ -106,7 +107,7 @@ const Component = (props: {}) => { indexKey='_index' groupedByPivotKey='_groupedByPivot' className='' - onFetchData={() => null} + onFetchData={(state, instance) => null} style={{}} column={{ Cell: undefined, diff --git a/types/react-table/tsconfig.json b/types/react-table/tsconfig.json index de6f3f8e69..bcbdae3857 100644 --- a/types/react-table/tsconfig.json +++ b/types/react-table/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-tabs/tsconfig.json b/types/react-tabs/tsconfig.json index 5c1f1aa63c..d32fbb0b3c 100644 --- a/types/react-tabs/tsconfig.json +++ b/types/react-tabs/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-tag-input/tsconfig.json b/types/react-tag-input/tsconfig.json index 9a30e8a334..dff73a5f42 100644 --- a/types/react-tag-input/tsconfig.json +++ b/types/react-tag-input/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-tagcloud/tsconfig.json b/types/react-tagcloud/tsconfig.json index 0d496a97a1..e45d285354 100644 --- a/types/react-tagcloud/tsconfig.json +++ b/types/react-tagcloud/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-tagsinput/react-tagsinput-tests.tsx b/types/react-tagsinput/react-tagsinput-tests.tsx index 8a3a113227..cdcd882817 100644 --- a/types/react-tagsinput/react-tagsinput-tests.tsx +++ b/types/react-tagsinput/react-tagsinput-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import * as TagsInput from 'react-tagsinput'; +import TagsInput = require('react-tagsinput'); interface StateI { tags: string[]; diff --git a/types/react-tagsinput/tsconfig.json b/types/react-tagsinput/tsconfig.json index 1e9342e032..b17090bf2b 100644 --- a/types/react-tagsinput/tsconfig.json +++ b/types/react-tagsinput/tsconfig.json @@ -15,10 +15,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ "index.d.ts", "react-tagsinput-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-tap-event-plugin/tsconfig.json b/types/react-tap-event-plugin/tsconfig.json index 38f0ad79b8..9921a0516f 100644 --- a/types/react-tap-event-plugin/tsconfig.json +++ b/types/react-tap-event-plugin/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-test-renderer/tsconfig.json b/types/react-test-renderer/tsconfig.json index 0c2d149f79..62847003bd 100644 --- a/types/react-test-renderer/tsconfig.json +++ b/types/react-test-renderer/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-test-renderer/v15/tsconfig.json b/types/react-test-renderer/v15/tsconfig.json index 597591256e..6c6c9927a0 100644 --- a/types/react-test-renderer/v15/tsconfig.json +++ b/types/react-test-renderer/v15/tsconfig.json @@ -23,11 +23,12 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "shallow/index.d.ts", "react-test-renderer-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/react-tether/tsconfig.json b/types/react-tether/tsconfig.json index 3190ba8cf1..a346fe707c 100644 --- a/types/react-tether/tsconfig.json +++ b/types/react-tether/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-textarea-autosize/tsconfig.json b/types/react-textarea-autosize/tsconfig.json index 0946f43d10..6f50ce5e42 100644 --- a/types/react-textarea-autosize/tsconfig.json +++ b/types/react-textarea-autosize/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-toastr/tsconfig.json b/types/react-toastr/tsconfig.json index 1fbbfde4af..9d34197b01 100644 --- a/types/react-toastr/tsconfig.json +++ b/types/react-toastr/tsconfig.json @@ -16,10 +16,11 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ "index.d.ts", "react-toastr-tests.tsx" ] -} +} \ No newline at end of file diff --git a/types/react-toggle/tsconfig.json b/types/react-toggle/tsconfig.json index e744478741..4500f8ea1f 100644 --- a/types/react-toggle/tsconfig.json +++ b/types/react-toggle/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-toggle/v2/tsconfig.json b/types/react-toggle/v2/tsconfig.json index 996290fe7b..dbd41a3738 100644 --- a/types/react-toggle/v2/tsconfig.json +++ b/types/react-toggle/v2/tsconfig.json @@ -21,6 +21,7 @@ }, "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-tooltip/react-tooltip-tests.tsx b/types/react-tooltip/react-tooltip-tests.tsx index 5da85d8c59..3fee5dba3e 100644 --- a/types/react-tooltip/react-tooltip-tests.tsx +++ b/types/react-tooltip/react-tooltip-tests.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { findDOMNode } from "react-dom"; -import * as ReactTooltip from "react-tooltip"; +import ReactTooltip = require("react-tooltip"); export class ReactTooltipTest extends React.PureComponent { componentDidMount() { diff --git a/types/react-tooltip/tsconfig.json b/types/react-tooltip/tsconfig.json index 17a730e3b5..a42834eaf0 100644 --- a/types/react-tooltip/tsconfig.json +++ b/types/react-tooltip/tsconfig.json @@ -17,7 +17,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-touch/tsconfig.json b/types/react-touch/tsconfig.json index 807d0d7a2c..2a77a06269 100644 --- a/types/react-touch/tsconfig.json +++ b/types/react-touch/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-tracking/tsconfig.json b/types/react-tracking/tsconfig.json index 4200651a42..5dcd1fa6b4 100644 --- a/types/react-tracking/tsconfig.json +++ b/types/react-tracking/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "experimentalDecorators": true, "jsx": "preserve" }, diff --git a/types/react-transition-group/tsconfig.json b/types/react-transition-group/tsconfig.json index 7b17b06580..701e0fcfba 100644 --- a/types/react-transition-group/tsconfig.json +++ b/types/react-transition-group/tsconfig.json @@ -17,7 +17,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-transition-group/v1/react-transition-group-tests.tsx b/types/react-transition-group/v1/react-transition-group-tests.tsx index 346fe9989a..2e16635a4b 100644 --- a/types/react-transition-group/v1/react-transition-group-tests.tsx +++ b/types/react-transition-group/v1/react-transition-group-tests.tsx @@ -1,6 +1,6 @@ import * as React from "react"; -import * as TransitionGroup from "react-transition-group/TransitionGroup"; -import * as CSSTransitionGroup from "react-transition-group/CSSTransitionGroup"; +import TransitionGroup = require("react-transition-group/TransitionGroup"); +import CSSTransitionGroup = require("react-transition-group/CSSTransitionGroup"); import { CSSTransitionGroupProps, TransitionGroupProps, TransitionGroupChildLifecycle } from "react-transition-group"; class TestChild extends React.Component implements TransitionGroupChildLifecycle { diff --git a/types/react-transition-group/v1/tsconfig.json b/types/react-transition-group/v1/tsconfig.json index 22f6d9caeb..8ae121e18e 100644 --- a/types/react-transition-group/v1/tsconfig.json +++ b/types/react-transition-group/v1/tsconfig.json @@ -23,7 +23,8 @@ }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-treeview/tsconfig.json b/types/react-treeview/tsconfig.json index f1bf7481d5..a6c454bdcd 100644 --- a/types/react-treeview/tsconfig.json +++ b/types/react-treeview/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-truncate/tsconfig.json b/types/react-truncate/tsconfig.json index b36c957da6..5f4a674b24 100644 --- a/types/react-truncate/tsconfig.json +++ b/types/react-truncate/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-user-tour/tsconfig.json b/types/react-user-tour/tsconfig.json index 032fc4c393..29eef2c510 100644 --- a/types/react-user-tour/tsconfig.json +++ b/types/react-user-tour/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/react-virtual-keyboard/tsconfig.json b/types/react-virtual-keyboard/tsconfig.json index b9d7188150..c8b43a15e7 100644 --- a/types/react-virtual-keyboard/tsconfig.json +++ b/types/react-virtual-keyboard/tsconfig.json @@ -20,6 +20,7 @@ "types": [], "noEmit": true, "jsx": "react", - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/react-virtualized-select/tsconfig.json b/types/react-virtualized-select/tsconfig.json index 677bdcf43d..d24d6ab1b3 100644 --- a/types/react-virtualized-select/tsconfig.json +++ b/types/react-virtualized-select/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-virtualized/dist/es/Table.d.ts b/types/react-virtualized/dist/es/Table.d.ts index 97fe20b657..87f79de86d 100644 --- a/types/react-virtualized/dist/es/Table.d.ts +++ b/types/react-virtualized/dist/es/Table.d.ts @@ -74,6 +74,8 @@ export type ColumnProps = { columnData?: any; /** Uniquely identifies the row-data attribute correspnding to this cell */ dataKey: any; + /** Default sort order when clicked for the first time. Valid options include "ASC" and "DESC". Defaults to "ASC" */ + defaultSortDirection?: SortDirectionType; /** If sort is enabled for the table at large, disable it for this column */ disableSort?: boolean; /** Flex grow style; defaults to 0 */ @@ -87,6 +89,10 @@ export type ColumnProps = { * ({ columnData: object, dataKey: string, disableSort: boolean, label: string, sortBy: string, sortDirection: string }): PropTypes.node */ headerRenderer?: TableHeaderRenderer; + /** Optional inline style to apply to this column's header */ + headerStyle?: React.CSSProperties; + /** Optional id to set on the column header; used for aria-describedby */ + id?: string; /** Header label for this column */ label?: string; /** Maximum width of column; this property will only be used if :flexGrow is > 0. */ @@ -97,8 +103,6 @@ export type ColumnProps = { style?: React.CSSProperties; /** Flex basis (width) for this column; This value can grow or shrink based on :flexGrow and :flexShrink properties. */ width: number; - /** Optional id to set on the column header; used for aria-describedby */ - id?: string; } export class Column extends Component { static propTypes: { diff --git a/types/react-virtualized/react-virtualized-tests.tsx b/types/react-virtualized/react-virtualized-tests.tsx index c5958ab96c..d912c1f28f 100644 --- a/types/react-virtualized/react-virtualized-tests.tsx +++ b/types/react-virtualized/react-virtualized-tests.tsx @@ -1546,12 +1546,14 @@ export class TableExample extends PureComponent<{}, any> { } dataKey='index' disableSort={!this._isSortEnabled()} + defaultSortDirection={SortDirection.DESC} width={60} /> } diff --git a/types/react-virtualized/tsconfig.json b/types/react-virtualized/tsconfig.json index 4457f73e3d..853a800ef8 100644 --- a/types/react-virtualized/tsconfig.json +++ b/types/react-virtualized/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-weui/tsconfig.json b/types/react-weui/tsconfig.json index 824352a6af..6d292d375a 100644 --- a/types/react-weui/tsconfig.json +++ b/types/react-weui/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react-widgets-moment/tsconfig.json b/types/react-widgets-moment/tsconfig.json index 332d436d22..b98e15fc03 100644 --- a/types/react-widgets-moment/tsconfig.json +++ b/types/react-widgets-moment/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-widgets-moment-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/react-widgets/index.d.ts b/types/react-widgets/index.d.ts index 00c6cbbc2a..883b94a897 100644 --- a/types/react-widgets/index.d.ts +++ b/types/react-widgets/index.d.ts @@ -1,6 +1,9 @@ -// Type definitions for react-widgets 3.2 +// Type definitions for react-widgets 4.1 // Project: https://github.com/jquense/react-widgets -// Definitions by: Rogier Schouten , Balázs Sándor , Frode Hansen +// Definitions by: Rogier Schouten +// Balázs Sándor +// Frode Hansen +// Andrew Makarov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 diff --git a/types/react-widgets/lib/Calendar.d.ts b/types/react-widgets/lib/Calendar.d.ts index d9d0a6d540..4cb97805d6 100644 --- a/types/react-widgets/lib/Calendar.d.ts +++ b/types/react-widgets/lib/Calendar.d.ts @@ -1,7 +1,13 @@ import * as React from 'react'; -import { ReactWidgetsCommonProps } from './CommonProps'; +import { ReactWidgetsCommonProps, AutoFocus } from './CommonProps'; -interface CalendarProps extends ReactWidgetsCommonProps{ +type CalendarView = 'month' | 'year' | 'decade' | 'century'; + +interface CalendarProps extends ReactWidgetsCommonProps, AutoFocus { + /** + * Set the culture of the Calendar, passed to the configured localizer. + */ + culture?: string; /** * The current selected date, should be a Date object or null. */ @@ -15,11 +21,19 @@ interface CalendarProps extends ReactWidgetsCommonProps{ * the Date object */ onChange?: (date?: Date) => void; + /** + * The native onKeyDown event, called preventDefault will prevent any custom behavior, included keyboard shortcuts. + */ + onKeyDown?: (event: KeyboardEvent) => void; /** * Callback fired when the Calendar navigates between views, or forward and backwards in * time. */ onNavigate?: (date: Date, direction: string, view: string ) => void; + /** + * A callback fired when the view changes. + */ + onViewChange?: () => void; /** * The minimum date that the Calendar can navigate from. */ @@ -99,6 +113,18 @@ interface CalendarProps extends ReactWidgetsCommonProps{ */ centuryFormat?: string | ((day: Date) => string); messages?: CalendarMessages; + /** + * Set a unique starting view + */ + defaultView?: CalendarView; + /** + * Controls the currently displayed calendar view. Use defaultView to set a unique starting view. + */ + view?: CalendarView; + /** + * Defines a list of views the Calendar can traverse through, starting with the first in the list to the last. + */ + views?: CalendarView[]; } interface CalendarMessages { diff --git a/types/react-widgets/lib/Combobox.d.ts b/types/react-widgets/lib/Combobox.d.ts index a3b6aadb94..0a059f102d 100644 --- a/types/react-widgets/lib/Combobox.d.ts +++ b/types/react-widgets/lib/Combobox.d.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { ReactWidgetsCommonDropdownProps } from './CommonProps'; +import { ReactWidgetsCommonDropdownProps, AutoFocus } from './CommonProps'; interface ComboBoxMessages { /** @@ -16,7 +16,7 @@ interface ComboBoxMessages { emptyFilter: string | ((props: ComboBoxProps) => string); } -interface ComboBoxProps extends ReactWidgetsCommonDropdownProps { +interface ComboBoxProps extends ReactWidgetsCommonDropdownProps, AutoFocus { /** * The current value of the Combobox. This can be an object (such as a member of the data * array) or a primitive value, hinted to by the valueField. The widget value does not need @@ -44,6 +44,11 @@ interface ComboBoxProps extends ReactWidgetsCommonDropdownProps { * comprise the value field (such as an id) and the field used to label the item. */ data?: any[]; + /** + * Delay + * @default 500 + */ + delay?: number; /** * A dataItem field name for uniquely identifying items in the data list. A valueField is * required when the value prop is not itself a dataItem. A valueField is useful when @@ -63,6 +68,15 @@ interface ComboBoxProps extends ReactWidgetsCommonDropdownProps { * component renders the text of the selected item (specified by textfield) */ itemComponent?: React.ReactType; + /** + * An object of props that is passed directly to the underlying input component. + */ + inputProps?: object; + listComponent?: React.ReactType | string; + /** + * An object of props that is passed directly to the underlying List component. + */ + listProps?: object; /** * Determines how to group the Combobox. Providing a string will group the data array by * that property. You can also provide a function which should return the group value. @@ -83,6 +97,12 @@ interface ComboBoxProps extends ReactWidgetsCommonDropdownProps { * always "startsWith", meaning it will search from the start of the textField property */ suggest?: boolean; + /** + * A Transition component from react-transition-group v2. The provided component will be used + * instead of the default SlideDownTransition for fully customizable animations. + * The transition component is also injected with a dropUp prop indicating the direction it should open. + */ + popupTransition?: React.ReactType | string; /** * Specify a filtering method used to reduce the items in the dropdown as you type. It can * be used in conjunction with the suggest prop or instead of it. There are a few built-in @@ -123,6 +143,10 @@ interface ComboBoxProps extends ReactWidgetsCommonDropdownProps { * The speed, in milliseconds, of the dropdown animation. */ duration?: number; + /** + * The HTML name attribute, passed directly to the input element. + */ + name?: string; /** * Object hash containing display text and/or text for screen readers. Use the messages * object to localize widget text and increase accessibility. diff --git a/types/react-widgets/lib/CommonProps.d.ts b/types/react-widgets/lib/CommonProps.d.ts index 2547a579a8..b407b96fe5 100644 --- a/types/react-widgets/lib/CommonProps.d.ts +++ b/types/react-widgets/lib/CommonProps.d.ts @@ -21,6 +21,13 @@ interface ReactWidgetsCommonProps extends React.Props { isRtl?: boolean; } +export interface AutoFocus { + /** + * Pass focus to component when it mounts. + */ + autoFocus?: boolean; +} + interface ReactWidgetsCommonDropdownProps extends ReactWidgetsCommonProps { /** * Show "drop up" not "drop down" diff --git a/types/react-widgets/lib/DateTimePicker.d.ts b/types/react-widgets/lib/DateTimePicker.d.ts index 3596f6063a..ee0428c67b 100644 --- a/types/react-widgets/lib/DateTimePicker.d.ts +++ b/types/react-widgets/lib/DateTimePicker.d.ts @@ -1,7 +1,12 @@ import * as React from 'react'; -import { ReactWidgetsCommonDropdownProps } from './CommonProps'; +import { ReactWidgetsCommonDropdownProps, AutoFocus } from './CommonProps'; +import { KeyboardEvent } from 'react'; -interface DateTimePickerProps extends ReactWidgetsCommonDropdownProps { +interface DateTimePickerProps extends ReactWidgetsCommonDropdownProps, AutoFocus { + /** + * Set the culture of the DateTimePicker, passed to the configured localizer. + */ + culture?: string; /** * Whether to show the date picker button. * @default true @@ -12,6 +17,10 @@ interface DateTimePickerProps extends ReactWidgetsCommonDropdownProps void; + /** + * The native onBlur event, called when focus leaves the DateTimePicker entirely. + */ + onBlur?: () => void; + /** + * The native onFocus event, called when focus enters the DateTimePicker. + */ + onFocus?: () => void; + /** + * The native onKeyDown event, called preventDefault will prevent any custom behavior, included keyboard shortcuts. + */ + onKeyDown?: (event: KeyboardEvent) => void; + /** + * The native onKeyPress event, called preventDefault will stop any custom behavior. + */ + onKeyPress?: (event: KeyboardEvent) => void; /** * This handler fires when an item has been selected from the list or calendar. It fires * before the onChange handler, and fires regardless of whether the value has actually @@ -98,10 +127,11 @@ interface DateTimePickerProps extends ReactWidgetsCommonDropdownProps void; /** * Whether or not the DateTimePicker is open. When unset (undefined) the DateTimePicker will - * handle the opening and closing internally. - * @enum false "calendar" "time" + * handle the opening and closing internally. + * @enum false "date" "time" + * @default false */ - open?: boolean | "calendar" | "time"; + open?: boolean | "date" | "time"; /** * The defaultOpen prop can be used to set an * initialization value for uncontrolled widgets. @@ -126,6 +156,20 @@ interface DateTimePickerProps extends ReactWidgetsCommonDropdownProps { +interface DropdownListProps extends ReactWidgetsCommonDropdownProps, AutoFocus { /** * The current value of the DropdownList. This can be an object (such as a member of the * data array) or a primitive value, hinted to by the valueField. The widget value does not @@ -21,12 +21,25 @@ interface DropdownListProps extends ReactWidgetsCommonDropdownProps void; + /** + * The native onKeyDown event, called preventDefault will prevent any custom behavior, included keyboard shortcuts. + */ + onKeyDown?: (event: KeyboardEvent) => void; + /** + * The native onKeyPress event, called preventDefault will stop any custom behavior. + */ + onKeyPress?: (event: KeyboardEvent) => void; /** * Provide an array of possible values for the DropdownList. If an array of objects is * provided you should use the valueField and textField props, to specify which object * properties comprise the value field (such as an id) and the field used to label the item. */ data?: any[]; + /** + * Delay + * @default 250 + */ + delay?: number; /** * A dataItem field name for uniquely identifying items in the data list. A valueField is * required when the value prop is not itself a dataItem. A valueField is useful when @@ -50,7 +63,7 @@ interface DropdownListProps extends ReactWidgetsCommonDropdownProps void; /** * Whether or not the DropdownList is open. When unset (undefined) the DropdownList will - * handle the opening and closing internally. + * handle the opening and closing internally. */ open?: boolean; /** @@ -128,6 +141,20 @@ interface DropdownListProps extends ReactWidgetsCommonDropdownProps { +interface MultiselectProps extends ReactWidgetsCommonDropdownProps, AutoFocus { + /** + * Enables the list option creation UI. onFilter will only the UI when actively filtering for a list item. + * @default 'onFilter' + */ + allowCreate?: boolean | 'onFilter'; /** * The current values of the Multiselect. The value should can null, or an array of * valueField values, or an array of objects (such as a few items in the data array) @@ -15,12 +20,20 @@ interface MultiselectProps extends ReactWidgetsCommonDropdownProps void; + onChange?: (dataItems: any[], metadata: { + dataItem: any; + action: 'insert' | 'remove'; + originalEvent?: any; + lastValue?: any[]; + searchTerm?: string; + }) => void; /** * This handler fires when an item has been selected from the list. It fires before the * onChange handler, and fires regardless of whether the value has actually changed */ - onSelect?: (value: any) => void; + onSelect?: (value: any, metadata: { + originalEvent: any; + }) => void; /** * This handler fires when the user chooses to create a new tag, not in the data list. It is * up to the widget parent to implement creation logic, a common implementation is shown @@ -51,7 +64,11 @@ interface MultiselectProps extends ReactWidgetsCommonDropdownProps void; + onSearch?: (searchTerm: string, metadata: { + action: 'clear' | 'input'; + lastSearchTerm?: string; + originalEvent?: any; + }) => void; /** * Whether or not the Multiselect is open. When unset (undefined) the Multiselect will * handle the opening and closing internally. The defaultOpen prop can be used to set an @@ -133,9 +154,29 @@ interface MultiselectProps extends ReactWidgetsCommonDropdownProps string); + createOption?: string | ((props: MultiselectProps) => string); + tagsLabel?: string | ((props: MultiselectProps) => string); + selectedItems?: string | ((props: MultiselectProps) => string); + noneSelected?: string | ((props: MultiselectProps) => string); + removeLabel?: string | ((props: MultiselectProps) => string); /** * The text label for creating new tags. * @default "(create new tag)" diff --git a/types/react-widgets/lib/NumberPicker.d.ts b/types/react-widgets/lib/NumberPicker.d.ts index 0feaee5bf1..474fe4dc39 100644 --- a/types/react-widgets/lib/NumberPicker.d.ts +++ b/types/react-widgets/lib/NumberPicker.d.ts @@ -1,7 +1,15 @@ import * as React from 'react'; -import { ReactWidgetsCommonProps } from './CommonProps'; +import { ReactWidgetsCommonProps, AutoFocus } from './CommonProps'; -interface NumberPickerProps extends ReactWidgetsCommonProps{ +interface NumberPickerProps extends ReactWidgetsCommonProps, AutoFocus { + /** + * Set the culture of the NumberPicker, passed to the configured localizer. + */ + culture?: string; + /** + * An object of props that is passed directly to the underlying input component. + */ + inputProps?: object; /** * The current value of the NumberPicker. */ @@ -51,6 +59,27 @@ interface NumberPickerProps extends ReactWidgetsCommonProps{ * object to localize widget text and increase accessibility. */ messages?: NumberPickerMessages; + /** + * The HTML name attribute, passed directly to the input element. + */ + name?: string; + /** + * The native onKeyDown event, called preventDefault will prevent any custom behavior, included keyboard shortcuts. + */ + onKeyDown?: (event: KeyboardEvent) => void; + /** + * The native onKeyPress event, called preventDefault will stop any custom behavior. + */ + onKeyPress?: (event: KeyboardEvent) => void; + /** + * Controls the visibility of the NumberPicker popup. Use defaultOpen to set an initial value for uncontrolled widgets. + * @default false + */ + open?: boolean; + /** + * Text to display in the input when the value is empty. + */ + placeholder?: string; } interface NumberPickerMessages { diff --git a/types/react-widgets/lib/SelectList.d.ts b/types/react-widgets/lib/SelectList.d.ts index a70f4c4de8..cf3539a56a 100644 --- a/types/react-widgets/lib/SelectList.d.ts +++ b/types/react-widgets/lib/SelectList.d.ts @@ -1,7 +1,7 @@ import * as React from 'react'; -import { ReactWidgetsCommonProps } from './CommonProps'; +import { ReactWidgetsCommonProps, AutoFocus } from './CommonProps'; -interface SelectListProps extends ReactWidgetsCommonProps{ +interface SelectListProps extends ReactWidgetsCommonProps, AutoFocus { /** * The current value or values of the SelectList. This can be an object (such as a member of * the data array) or a primitive value, hinted to by the valueField. The widget value does @@ -23,6 +23,11 @@ interface SelectListProps extends ReactWidgetsCommonProps{ * properties comprise the value field (such as an id) and the field used to label the item. */ data?: any[]; + /** + * Delay + * @default 250 + */ + delay?: number; /** * A dataItem field name for uniquely identifying items in the data list. A valueField is * required when the value prop is not itself a dataItem. A valueField is useful when @@ -58,6 +63,14 @@ interface SelectListProps extends ReactWidgetsCommonProps{ * the groupBy value will be used. */ groupComponent?: React.ReactType; + /** + * The native onKeyDown event, called preventDefault will prevent any custom behavior, included keyboard shortcuts. + */ + onKeyDown?: (event: KeyboardEvent) => void; + /** + * The native onKeyPress event, called preventDefault will stop any custom behavior. + */ + onKeyPress?: (event: KeyboardEvent) => void; /** * A handler called when focus shifts on the SelectList. Internally this is used to ensure * the focused item is in view. If you want to define your own "scrollTo" behavior or just @@ -77,6 +90,22 @@ interface SelectListProps extends ReactWidgetsCommonProps{ * object to localize widget text and increase accessibility. */ messages?: SelectListMessages; + /** + * @default List + */ + listComponent?: React.ReactType | string; + /** + * An object of props that is passed directly to the underlying List component. + */ + listProps?: object; + /** + * The HTML name attribute used to group checkboxes and radio buttons together. + */ + name?: string; + /** + * The HTML tabindex attribute, controls the order in which focus moves via the TAB key + */ + tabIndex?: number; } interface SelectListMessages { /** diff --git a/types/react-widgets/react-widgets-tests.tsx b/types/react-widgets/react-widgets-tests.tsx index d0af494394..c4e672c7b2 100644 --- a/types/react-widgets/react-widgets-tests.tsx +++ b/types/react-widgets/react-widgets-tests.tsx @@ -11,6 +11,10 @@ function itemComponent(props: { value: string }) { return {props.value}; } +function listComponent(props: { value: string }) { + return {props.value}; +} + class Test extends React.Component> { render() { return ( @@ -26,12 +30,12 @@ class Test extends React.Component> {
- - - - + + + + - +
> { /> + +
@@ -52,7 +64,45 @@ class Test extends React.Component> { - + +
+
+ + + + + + +
); diff --git a/types/react-widgets/tsconfig.json b/types/react-widgets/tsconfig.json index cb7126a5e5..2ff1d31ea5 100644 --- a/types/react-widgets/tsconfig.json +++ b/types/react-widgets/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "jsx": "react", @@ -16,10 +16,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "react-widgets-tests.tsx" ] -} \ No newline at end of file +} diff --git a/types/react-youtube/tsconfig.json b/types/react-youtube/tsconfig.json index e6ddd061cc..42ff06f458 100644 --- a/types/react-youtube/tsconfig.json +++ b/types/react-youtube/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/react/index.d.ts b/types/react/index.d.ts index 83ab445356..c39e5eeb6c 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -3723,7 +3723,7 @@ declare namespace React { // ---------------------------------------------------------------------- interface ErrorInfo { /** - * Captures which component contained the exception, and it's ancestors. + * Captures which component contained the exception, and its ancestors. */ componentStack: string; } diff --git a/types/react/test/index.ts b/types/react/test/index.ts index 3e2be1605f..757a1da669 100644 --- a/types/react/test/index.ts +++ b/types/react/test/index.ts @@ -2,15 +2,15 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; import * as ReactDOMServer from "react-dom/server"; import createFragment = require("react-addons-create-fragment"); -import * as CSSTransitionGroup from "react-addons-css-transition-group"; +import CSSTransitionGroup = require("react-addons-css-transition-group"); import * as LinkedStateMixin from "react-addons-linked-state-mixin"; import * as Perf from "react-addons-perf"; import * as PureRenderMixin from "react-addons-pure-render-mixin"; -import * as shallowCompare from "react-addons-shallow-compare"; +import shallowCompare = require("react-addons-shallow-compare"); import * as TestUtils from "react-addons-test-utils"; -import * as TransitionGroup from "react-addons-transition-group"; +import TransitionGroup = require("react-addons-transition-group"); import update = require("react-addons-update"); -import * as createReactClass from "create-react-class"; +import createReactClass = require("create-react-class"); import * as PropTypes from "prop-types"; import * as DOM from "react-dom-factories"; diff --git a/types/react/tsconfig.json b/types/react/tsconfig.json index 46866c10b1..1b79768acc 100644 --- a/types/react/tsconfig.json +++ b/types/react/tsconfig.json @@ -22,6 +22,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "preserve" } } \ No newline at end of file diff --git a/types/react/v15/test/index.ts b/types/react/v15/test/index.ts index b0c358b011..8cd6765f4c 100644 --- a/types/react/v15/test/index.ts +++ b/types/react/v15/test/index.ts @@ -2,13 +2,13 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; import * as ReactDOMServer from "react-dom/server"; import createFragment = require("react-addons-create-fragment"); -import * as CSSTransitionGroup from "react-addons-css-transition-group"; +import CSSTransitionGroup = require("react-addons-css-transition-group"); import * as LinkedStateMixin from "react-addons-linked-state-mixin"; import * as Perf from "react-addons-perf"; import * as PureRenderMixin from "react-addons-pure-render-mixin"; -import * as shallowCompare from "react-addons-shallow-compare"; +import shallowCompare = require("react-addons-shallow-compare"); import * as TestUtils from "react-addons-test-utils"; -import * as TransitionGroup from "react-addons-transition-group"; +import TransitionGroup = require("react-addons-transition-group"); import update = require("react-addons-update"); interface Props extends React.Attributes { diff --git a/types/react/v15/tsconfig.json b/types/react/v15/tsconfig.json index f9c13ee9f2..c2d4169d33 100644 --- a/types/react/v15/tsconfig.json +++ b/types/react/v15/tsconfig.json @@ -27,6 +27,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "preserve" } } \ No newline at end of file diff --git a/types/reactable/tsconfig.json b/types/reactable/tsconfig.json index cf703a49d8..45d6422faa 100644 --- a/types/reactable/tsconfig.json +++ b/types/reactable/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/reactcss/tsconfig.json b/types/reactcss/tsconfig.json index 770887668d..2d17d40010 100644 --- a/types/reactcss/tsconfig.json +++ b/types/reactcss/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/reactstrap/index.d.ts b/types/reactstrap/index.d.ts index 38c55bc08a..73b456783a 100644 --- a/types/reactstrap/index.d.ts +++ b/types/reactstrap/index.d.ts @@ -14,82 +14,80 @@ export interface CSSModule { [className: string]: string; } -export { default as Alert, AlertProps } from './lib/Alert'; -export { default as Badge, BadgeProps } from './lib/Badge'; -export { default as Breadcrumb, BreadcrumbProps } from './lib/Breadcrumb'; -export { default as BreadcrumbItem, BreadcrumbItemProps } from './lib/BreadcrumbItem'; -export { default as Button, ButtonProps } from './lib/Button'; -export { default as ButtonDropdown, ButtonDropdownProps } from './lib/ButtonDropdown'; -export { default as ButtonGroup, ButtonGroupProps } from './lib/ButtonGroup'; -export { default as ButtonToolbar, ButtonToolbarProps } from './lib/ButtonToolbar'; -export { default as Card, CardProps } from './lib/Card'; -export { default as CardBody, CardBodyProps } from './lib/CardBody'; -export { default as CardBlock, CardBlockProps } from './lib/CardBlock'; -export { default as CardColumns, CardColumnsProps } from './lib/CardColumns'; -export { default as CardDeck, CardDeckProps } from './lib/CardDeck'; -export { default as CardFooter, CardFooterProps } from './lib/CardFooter'; -export { default as CardGroup, CardGroupProps } from './lib/CardGroup'; -export { default as CardHeader, CardHeaderProps } from './lib/CardHeader'; -export { default as CardImg, CardImgProps } from './lib/CardImg'; -export { default as CardImgOverlay, CardImgOverlayProps } from './lib/CardImgOverlay'; -export { default as CardLink, CardLinkProps } from './lib/CardLink'; -export { default as CardSubtitle, CardSubtitleProps } from './lib/CardSubtitle'; -export { default as CardText, CardTextProps } from './lib/CardText'; -export { default as CardTitle, CardTitleProps } from './lib/CardTitle'; -export { default as Carousel, CarouselProps } from './lib/Carousel'; -export { default as CarouselItem, CarouselItemProps } from './lib/CarouselItem'; -export { default as CarouselControl, CarouselControlProps } from './lib/CarouselControl'; -export { default as CarouselIndicators, CarouselIndicatorsProps } from './lib/CarouselIndicators'; -export { default as CarouselCaption, CarouselCaptionProps } from './lib/CarouselCaption'; -export { default as Col, ColProps } from './lib/Col'; -export { default as Collapse, CollapseProps } from './lib/Collapse'; -export { default as Container, ContainerProps } from './lib/Container'; -export { default as Dropdown, DropdownProps } from './lib/Dropdown'; -export { default as DropdownItem, DropdownItemProps } from './lib/DropdownItem'; -export { default as DropdownMenu, DropdownMenuProps } from './lib/DropdownMenu'; -export { default as DropdownToggle, DropdownToggleProps } from './lib/DropdownToggle'; -export { default as Fade, FadeProps } from './lib/Fade'; -export { default as Form, FormProps } from './lib/Form'; -export { default as FormFeedback, FormFeedbackProps } from './lib/FormFeedback'; -export { default as FormGroup, FormGroupProps } from './lib/FormGroup'; -export { default as FormText, FormTextProps } from './lib/FormText'; -export { default as Input, InputProps } from './lib/Input'; -export { default as InputGroup, InputGroupProps } from './lib/InputGroup'; -export { default as InputGroupAddon, InputGroupAddonProps } from './lib/InputGroupAddon'; -export { default as InputGroupButton, InputGroupButtonProps } from './lib/InputGroupButton'; -export { default as Jumbotron, JumbotronProps } from './lib/Jumbotron'; -export { default as Label, LabelProps } from './lib/Label'; -export { default as ListGroup, ListGroupProps } from './lib/ListGroup'; -export { default as ListGroupItem, ListGroupItemProps } from './lib/ListGroupItem'; -export { default as ListGroupItemHeading, ListGroupItemHeadingProps } from './lib/ListGroupItemHeading'; -export { default as ListGroupItemText, ListGroupItemTextProps } from './lib/ListGroupItemText'; -export { default as Media, MediaProps } from './lib/Media'; -export { default as Modal, ModalProps } from './lib/Modal'; -export { default as ModalBody, ModalBodyProps } from './lib/ModalBody'; -export { default as ModalFooter, ModalFooterProps } from './lib/ModalFooter'; -export { default as ModalHeader, ModalHeaderProps } from './lib/ModalHeader'; -export { default as Nav, NavProps } from './lib/Nav'; -export { default as Navbar, NavbarProps } from './lib/Navbar'; -export { default as NavbarBrand, NavbarBrandProps } from './lib/NavbarBrand'; -export { default as NavbarToggler, NavbarTogglerProps } from './lib/NavbarToggler'; -export { default as NavDropdown, NavDropdownProps } from './lib/NavDropdown'; -export { default as NavItem, NavItemProps } from './lib/NavItem'; -export { default as NavLink, NavLinkProps } from './lib/NavLink'; -export { default as Pagination, PaginationProps } from './lib/Pagination'; -export { default as PaginationItem, PaginationItemProps } from './lib/PaginationItem'; -export { default as PaginationLink, PaginationLinkProps } from './lib/PaginationLink'; -export { default as Popover, PopoverProps } from './lib/Popover'; -export { default as PopoverBody, PopoverBodyProps } from './lib/PopoverBody'; -export { default as PopoverHeader, PopoverHeaderProps } from './lib/PopoverHeader'; -export { default as Progress, ProgressProps } from './lib/Progress'; -export { default as Row, RowProps } from './lib/Row'; -export { default as TabContent, TabContentProps } from './lib/TabContent'; -export { default as Table, TableProps } from './lib/Table'; -export { default as TabPane, TabPaneProps } from './lib/TabPane'; -export { default as Tag, TagProps } from './lib/Tag'; -export { default as Tooltip, TooltipProps } from './lib/Tooltip'; -export { UncontrolledAlert, UncontrolledAlertProps } from './lib/Uncontrolled'; -export { UncontrolledButtonDropdown, UncontrolledButtonDropdownProps } from './lib/Uncontrolled'; -export { UncontrolledDropdown, UncontrolledDropdownProps } from './lib/Uncontrolled'; -export { UncontrolledNavDropdown, UncontrolledNavDropdownProps } from './lib/Uncontrolled'; -export { UncontrolledTooltip, UncontrolledTooltipProps } from './lib/Uncontrolled'; +export { default as Alert, AlertProps } from './lib/Alert'; +export { default as Badge, BadgeProps } from './lib/Badge'; +export { default as Breadcrumb, BreadcrumbProps } from './lib/Breadcrumb'; +export { default as BreadcrumbItem, BreadcrumbItemProps } from './lib/BreadcrumbItem'; +export { default as Button, ButtonProps } from './lib/Button'; +export { default as ButtonDropdown, ButtonDropdownProps } from './lib/ButtonDropdown'; +export { default as ButtonGroup, ButtonGroupProps } from './lib/ButtonGroup'; +export { default as ButtonToolbar, ButtonToolbarProps } from './lib/ButtonToolbar'; +export { default as Card, CardProps } from './lib/Card'; +export { default as CardBody, CardBodyProps } from './lib/CardBody'; +export { default as CardColumns, CardColumnsProps } from './lib/CardColumns'; +export { default as CardDeck, CardDeckProps } from './lib/CardDeck'; +export { default as CardFooter, CardFooterProps } from './lib/CardFooter'; +export { default as CardGroup, CardGroupProps } from './lib/CardGroup'; +export { default as CardHeader, CardHeaderProps } from './lib/CardHeader'; +export { default as CardImg, CardImgProps } from './lib/CardImg'; +export { default as CardImgOverlay, CardImgOverlayProps } from './lib/CardImgOverlay'; +export { default as CardLink, CardLinkProps } from './lib/CardLink'; +export { default as CardSubtitle, CardSubtitleProps } from './lib/CardSubtitle'; +export { default as CardText, CardTextProps } from './lib/CardText'; +export { default as CardTitle, CardTitleProps } from './lib/CardTitle'; +export { default as Carousel, CarouselProps } from './lib/Carousel'; +export { default as CarouselItem, CarouselItemProps } from './lib/CarouselItem'; +export { default as CarouselControl, CarouselControlProps } from './lib/CarouselControl'; +export { default as CarouselIndicators, CarouselIndicatorsProps } from './lib/CarouselIndicators'; +export { default as CarouselCaption, CarouselCaptionProps } from './lib/CarouselCaption'; +export { default as Col, ColProps } from './lib/Col'; +export { default as Collapse, CollapseProps } from './lib/Collapse'; +export { default as Container, ContainerProps } from './lib/Container'; +export { default as Dropdown, DropdownProps } from './lib/Dropdown'; +export { default as DropdownItem, DropdownItemProps } from './lib/DropdownItem'; +export { default as DropdownMenu, DropdownMenuProps } from './lib/DropdownMenu'; +export { default as DropdownToggle, DropdownToggleProps } from './lib/DropdownToggle'; +export { default as Fade, FadeProps } from './lib/Fade'; +export { default as Form, FormProps } from './lib/Form'; +export { default as FormFeedback, FormFeedbackProps } from './lib/FormFeedback'; +export { default as FormGroup, FormGroupProps } from './lib/FormGroup'; +export { default as FormText, FormTextProps } from './lib/FormText'; +export { default as Input, InputProps } from './lib/Input'; +export { default as InputGroup, InputGroupProps } from './lib/InputGroup'; +export { default as InputGroupAddon, InputGroupAddonProps } from './lib/InputGroupAddon'; +export { default as InputGroupButtonDropdown, InputGroupButtonDropdownProps } from './lib/InputGroupButtonDropdown'; +export { default as InputGroupText, InputGroupTextProps } from './lib/InputGroupText'; +export { default as Jumbotron, JumbotronProps } from './lib/Jumbotron'; +export { default as Label, LabelProps } from './lib/Label'; +export { default as ListGroup, ListGroupProps } from './lib/ListGroup'; +export { default as ListGroupItem, ListGroupItemProps } from './lib/ListGroupItem'; +export { default as ListGroupItemHeading, ListGroupItemHeadingProps } from './lib/ListGroupItemHeading'; +export { default as ListGroupItemText, ListGroupItemTextProps } from './lib/ListGroupItemText'; +export { default as Media, MediaProps } from './lib/Media'; +export { default as Modal, ModalProps } from './lib/Modal'; +export { default as ModalBody, ModalBodyProps } from './lib/ModalBody'; +export { default as ModalFooter, ModalFooterProps } from './lib/ModalFooter'; +export { default as ModalHeader, ModalHeaderProps } from './lib/ModalHeader'; +export { default as Nav, NavProps } from './lib/Nav'; +export { default as Navbar, NavbarProps } from './lib/Navbar'; +export { default as NavbarBrand, NavbarBrandProps } from './lib/NavbarBrand'; +export { default as NavbarToggler, NavbarTogglerProps } from './lib/NavbarToggler'; +export { default as NavItem, NavItemProps } from './lib/NavItem'; +export { default as NavLink, NavLinkProps } from './lib/NavLink'; +export { default as Pagination, PaginationProps } from './lib/Pagination'; +export { default as PaginationItem, PaginationItemProps } from './lib/PaginationItem'; +export { default as PaginationLink, PaginationLinkProps } from './lib/PaginationLink'; +export { default as Popover, PopoverProps } from './lib/Popover'; +export { default as PopoverBody, PopoverBodyProps } from './lib/PopoverBody'; +export { default as PopoverHeader, PopoverHeaderProps } from './lib/PopoverHeader'; +export { default as Progress, ProgressProps } from './lib/Progress'; +export { default as Row, RowProps } from './lib/Row'; +export { default as TabContent, TabContentProps } from './lib/TabContent'; +export { default as Table, TableProps } from './lib/Table'; +export { default as TabPane, TabPaneProps } from './lib/TabPane'; +export { default as Tag, TagProps } from './lib/Tag'; +export { default as Tooltip, TooltipProps } from './lib/Tooltip'; +export { UncontrolledAlert, UncontrolledAlertProps } from './lib/Uncontrolled'; +export { UncontrolledButtonDropdown, UncontrolledButtonDropdownProps } from './lib/Uncontrolled'; +export { UncontrolledDropdown, UncontrolledDropdownProps } from './lib/Uncontrolled'; +export { UncontrolledTooltip, UncontrolledTooltipProps } from './lib/Uncontrolled'; diff --git a/types/reactstrap/lib/CardBlock.d.ts b/types/reactstrap/lib/CardBlock.d.ts deleted file mode 100644 index 9830e15e6a..0000000000 --- a/types/reactstrap/lib/CardBlock.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { CSSModule } from '../index'; - -export interface CardBlockProps { - tag?: React.ReactType; - className?: string; - cssModule?: CSSModule; -} - -declare const CardBlock: React.StatelessComponent; -export default CardBlock; diff --git a/types/reactstrap/lib/Dropdown.d.ts b/types/reactstrap/lib/Dropdown.d.ts index 9754af4fe2..e53b813cfe 100644 --- a/types/reactstrap/lib/Dropdown.d.ts +++ b/types/reactstrap/lib/Dropdown.d.ts @@ -18,6 +18,7 @@ export interface Props extends UncontrolledProps { group?: boolean; size?: string; tag?: React.ReactType; + addonType?: boolean | 'prepend' | 'append'; } export interface DropdownProps extends Props { /* intentionally blank */ diff --git a/types/reactstrap/lib/DropdownToggle.d.ts b/types/reactstrap/lib/DropdownToggle.d.ts index 51028815d4..eab2f3879d 100644 --- a/types/reactstrap/lib/DropdownToggle.d.ts +++ b/types/reactstrap/lib/DropdownToggle.d.ts @@ -6,6 +6,7 @@ export interface DropdownToggleProps { cssModule?: CSSModule; disabled?: boolean; onClick?: React.MouseEventHandler; + outline?: boolean; 'data-toggle'?: string; 'aria-haspopup'?: boolean; split?: boolean; diff --git a/types/reactstrap/lib/InputGroupAddon.d.ts b/types/reactstrap/lib/InputGroupAddon.d.ts index 31f5af505d..88b4f678c7 100644 --- a/types/reactstrap/lib/InputGroupAddon.d.ts +++ b/types/reactstrap/lib/InputGroupAddon.d.ts @@ -1,9 +1,10 @@ import { CSSModule } from '../index'; -export interface InputGroupAddonProps { +export interface InputGroupAddonProps extends React.HTMLAttributes { tag?: React.ReactType; className?: string; cssModule?: CSSModule; + addonType: 'prepend' | 'append'; } declare const InputGroupAddon: React.StatelessComponent; diff --git a/types/reactstrap/lib/InputGroupButton.d.ts b/types/reactstrap/lib/InputGroupButton.d.ts deleted file mode 100644 index 0d77701932..0000000000 --- a/types/reactstrap/lib/InputGroupButton.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { CSSModule } from '../index'; - -export interface InputGroupButtonProps { - tag?: React.ReactType; - groupClassName?: string; - groupAttributes?: any; - className?: string; - cssModule?: CSSModule; - color?: string; -} - -declare const InputGroupButton: React.StatelessComponent; -export default InputGroupButton; diff --git a/types/reactstrap/lib/InputGroupButtonDropdown.d.ts b/types/reactstrap/lib/InputGroupButtonDropdown.d.ts new file mode 100644 index 0000000000..32a129d43d --- /dev/null +++ b/types/reactstrap/lib/InputGroupButtonDropdown.d.ts @@ -0,0 +1,8 @@ +import { DropdownProps } from './Dropdown'; + +export interface InputGroupButtonDropdownProps extends DropdownProps { + addonType: 'prepend' | 'append'; +} + +declare const InputGroupButtonDropdown: React.StatelessComponent; +export default InputGroupButtonDropdown; diff --git a/types/reactstrap/lib/InputGroupText.d.ts b/types/reactstrap/lib/InputGroupText.d.ts new file mode 100644 index 0000000000..356babe8f4 --- /dev/null +++ b/types/reactstrap/lib/InputGroupText.d.ts @@ -0,0 +1,9 @@ +import { CSSModule } from '../index'; + +export interface InputGroupTextProps extends React.HTMLAttributes { + tag?: React.ReactType; + cssModule?: CSSModule; +} + +declare const InputGroupText: React.StatelessComponent; +export default InputGroupText; diff --git a/types/reactstrap/lib/NavDropdown.d.ts b/types/reactstrap/lib/NavDropdown.d.ts deleted file mode 100644 index e40e60601c..0000000000 --- a/types/reactstrap/lib/NavDropdown.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { UncontrolledDropdownProps, DropdownProps } from './Dropdown'; - -export interface UncontrolledProps extends UncontrolledDropdownProps { - /* intentionally blank */ -} -export interface UncontrolledNavDropdownProps extends UncontrolledProps { - /* intentionally blank */ -} - -export interface NavDropdownProps extends DropdownProps { - /* intentionally blank */ -} - -declare const NavDropdown: React.StatelessComponent; -export default NavDropdown; diff --git a/types/reactstrap/lib/Uncontrolled.d.ts b/types/reactstrap/lib/Uncontrolled.d.ts index b3b292dd6b..d241477adb 100644 --- a/types/reactstrap/lib/Uncontrolled.d.ts +++ b/types/reactstrap/lib/Uncontrolled.d.ts @@ -1,17 +1,14 @@ import { UncontrolledAlertProps } from './Alert'; import { UncontrolledButtonDropdownProps } from './ButtonDropdown'; import { UncontrolledDropdownProps } from './Dropdown'; -import { UncontrolledNavDropdownProps } from './NavDropdown'; import { UncontrolledTooltipProps } from './Tooltip'; export const UncontrolledAlert: React.StatelessComponent; export const UncontrolledButtonDropdown: React.StatelessComponent; export const UncontrolledDropdown: React.StatelessComponent; -export const UncontrolledNavDropdown: React.StatelessComponent; export const UncontrolledTooltip: React.StatelessComponent; export { UncontrolledAlertProps } from './Alert'; export { UncontrolledButtonDropdownProps } from './ButtonDropdown'; export { UncontrolledDropdownProps } from './Dropdown'; -export { UncontrolledNavDropdownProps } from './NavDropdown'; export { UncontrolledTooltipProps } from './Tooltip'; diff --git a/types/reactstrap/reactstrap-tests.tsx b/types/reactstrap/reactstrap-tests.tsx index 0f0bf7b81d..756d3acbd0 100644 --- a/types/reactstrap/reactstrap-tests.tsx +++ b/types/reactstrap/reactstrap-tests.tsx @@ -15,7 +15,6 @@ import { DropdownToggle, Card, CardBody, - CardBlock, CardColumns, CardDeck, CardFooter, @@ -44,7 +43,8 @@ import { Input, InputGroup, InputGroupAddon, - InputGroupButton, + InputGroupButtonDropdown, + InputGroupText, Pagination, Label, ListGroup, @@ -61,7 +61,6 @@ import { Navbar, NavbarBrand, NavbarToggler, - NavDropdown, NavItem, NavLink, PaginationItem, @@ -73,7 +72,6 @@ import { TabPane, UncontrolledButtonDropdown, UncontrolledDropdown, - UncontrolledNavDropdown, UncontrolledTooltip, TabContent, Table, @@ -522,12 +520,12 @@ const Example25 = (props: any) => {
- + Card title Card subtitle Some quick example text to build on the card title and make up the bulk of the card's content. - +
); @@ -537,16 +535,16 @@ const Example26 = (props: any) => { return (
- + Card title Card subtitle - + Card image cap - + Some quick example text to build on the card title and make up the bulk of the card's content. Card Link Another Link - +
); @@ -600,21 +598,21 @@ const Example29 = (props: any) => {
Header - + Special Title Treatment With supporting text below as a natural lead-in to additional content. - + Footer Featured - + Special Title Treatment With supporting text below as a natural lead-in to additional content. - + Footer
@@ -626,22 +624,22 @@ const Example30 = (props: any) => {
- + Card Title This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. Last updated 3 mins ago - + - + Card Title This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. Last updated 3 mins ago - +
@@ -744,25 +742,25 @@ const Example34 = (props: any) => { - + Card title Card subtitle This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. - + - + Card title Card subtitle This card has supporting text below as a natural lead-in to additional content. - + - + Card title Card subtitle @@ -770,7 +768,7 @@ const Example34 = (props: any) => { card has even longer content than the first to show that equal height action. - + ); @@ -781,25 +779,25 @@ const Example35 = (props: any) => { - + Card title Card subtitle This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. - + - + Card title Card subtitle This card has supporting text below as a natural lead-in to additional content. - + - + Card title Card subtitle @@ -807,7 +805,7 @@ const Example35 = (props: any) => { even longer content than the first to show that equal height action. - + ); @@ -818,23 +816,23 @@ const Example36 = (props: any) => { - + Card title Card subtitle This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. - + - + Card title Card subtitle This card has supporting text below as a natural lead-in to additional content. - + Special Title Treatment @@ -845,7 +843,7 @@ const Example36 = (props: any) => { - + Card title Card subtitle @@ -853,7 +851,7 @@ const Example36 = (props: any) => { has even longer content than the first to show that equal height action. - + Special Title Treatment @@ -883,12 +881,12 @@ class Example37 extends React.Component { - + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. - +
@@ -925,12 +923,12 @@ class Example38 extends React.Component {
Current state: {this.state.status}
- + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. - +
@@ -1422,12 +1420,12 @@ const Example52 = (props: any) => { return (
- @ + @
- + @@ -1435,21 +1433,25 @@ const Example52 = (props: any) => {
- @example.com + @example.com
- $ - $ + + $ + $ + - $ - $ + + $ + $ +
- $ + $ - .00 + .00
); @@ -1459,19 +1461,19 @@ const Example53 = (props: any) => { return (
- To the Left! + To the Left!
- To the Right! + To the Right!
- To the Left! + To the Left! - To the Right! + To the Right!
); @@ -1481,17 +1483,17 @@ const Example54 = (props: any) => { return (
- @lg + @lg
- @normal + @normal
- @sm + @sm
@@ -1502,19 +1504,19 @@ const Example55 = (props: any) => { return (
- +
- +
- + - +
); @@ -1524,17 +1526,17 @@ const Example56 = (props: any) => { return (
- @lg + @lg
- @normal + @normal
- @sm + @sm
@@ -1545,19 +1547,19 @@ const Example57 = (props: any) => { return (
- +
- +
- + - +
); @@ -1567,19 +1569,19 @@ const Example58 = (props: any) => { return (
- To the Left! + To the Left!
- To the Right! + To the Right!
- To the Left! + To the Left! - To the Right! + To the Right!
); @@ -2242,7 +2244,7 @@ class Example79 extends React.Component { Link - + Dropdown @@ -2253,7 +2255,7 @@ class Example79 extends React.Component { Another Action - + Link @@ -2292,7 +2294,7 @@ class Example80 extends React.Component { Link - + Dropdown @@ -2303,7 +2305,7 @@ class Example80 extends React.Component { Another Action - + Link @@ -3614,3 +3616,46 @@ class Example115 extends React.Component { ); } } + +const Example116 = (props: any) => { + return( +
+ + + + +
+ + + + + Button Dropdown + + + Header + Action + Another Action + + Another Action + + + +
+ + + + + + Header + Action + Another Action + + Another Action + + + + + +
+ ); +}; diff --git a/types/reactstrap/tsconfig.json b/types/reactstrap/tsconfig.json index eab2583792..d6485370c0 100644 --- a/types/reactstrap/tsconfig.json +++ b/types/reactstrap/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/reactstrap/v4/tsconfig.json b/types/reactstrap/v4/tsconfig.json index 73578a9178..28bacae6ce 100644 --- a/types/reactstrap/v4/tsconfig.json +++ b/types/reactstrap/v4/tsconfig.json @@ -15,11 +15,14 @@ "../../" ], "paths": { - "reactstrap": ["reactstrap/v4"] + "reactstrap": [ + "reactstrap/v4" + ] }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/read-chunk/tsconfig.json b/types/read-chunk/tsconfig.json index 041ee0f648..452a52a6ec 100644 --- a/types/read-chunk/tsconfig.json +++ b/types/read-chunk/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/read-package-tree/tsconfig.json b/types/read-package-tree/tsconfig.json index 3e4f94e46c..a1ac1c2c9e 100644 --- a/types/read-package-tree/tsconfig.json +++ b/types/read-package-tree/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/read-pkg-up/tsconfig.json b/types/read-pkg-up/tsconfig.json index a9c2341011..75a20b3452 100644 --- a/types/read-pkg-up/tsconfig.json +++ b/types/read-pkg-up/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/read-pkg/tsconfig.json b/types/read-pkg/tsconfig.json index 95c3962946..72016bbd28 100644 --- a/types/read-pkg/tsconfig.json +++ b/types/read-pkg/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "read-pkg-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/read/tsconfig.json b/types/read/tsconfig.json index 31e23cb479..c4e3523f3b 100644 --- a/types/read/tsconfig.json +++ b/types/read/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/readdir-enhanced/tsconfig.json b/types/readdir-enhanced/tsconfig.json index a15bc6fd77..f0164f1dc2 100644 --- a/types/readdir-enhanced/tsconfig.json +++ b/types/readdir-enhanced/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "readdir-enhanced-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/readdir-stream/tsconfig.json b/types/readdir-stream/tsconfig.json index f4fcaeade4..ff1417fa6b 100644 --- a/types/readdir-stream/tsconfig.json +++ b/types/readdir-stream/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/readline-sync/tsconfig.json b/types/readline-sync/tsconfig.json index 24375b96f0..a778f3c93f 100644 --- a/types/readline-sync/tsconfig.json +++ b/types/readline-sync/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/reapop/tsconfig.json b/types/reapop/tsconfig.json index 4ce459396a..1c8bd2fbce 100644 --- a/types/reapop/tsconfig.json +++ b/types/reapop/tsconfig.json @@ -16,6 +16,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "jsx": "react" }, "files": [ diff --git a/types/rebass/tsconfig.json b/types/rebass/tsconfig.json index 080a1661b3..1dc8e1e8cc 100644 --- a/types/rebass/tsconfig.json +++ b/types/rebass/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/recase/tsconfig.json b/types/recase/tsconfig.json index 3f0d64b1f1..89f3926313 100644 --- a/types/recase/tsconfig.json +++ b/types/recase/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/recharts/index.d.ts b/types/recharts/index.d.ts index 3b9afac937..c6207cd48e 100644 --- a/types/recharts/index.d.ts +++ b/types/recharts/index.d.ts @@ -161,7 +161,7 @@ export interface AreaProps extends EventAttributes, Partial | ContentRenderer; dot?: boolean | object | React.ReactElement | ContentRenderer; - label?: boolean | object | React.ReactElement | Label['content']; + label?: boolean | object | React.ReactElement | LabelProps['content']; hide?: boolean; layout?: LayoutType; baseLine?: number | any[]; @@ -399,7 +399,7 @@ export interface LineProps extends EventAttributes, Partial | Label['content']; + label?: boolean | object | React.ReactElement | LabelProps['content']; points?: Point[]; } @@ -432,7 +432,7 @@ export interface PieProps extends EventAttributes, Partial | React.ReactElement | boolean; label?: { offsetRadius: number; - } | Label['content'] | React.ReactElement | boolean; + } | LabelProps['content'] | React.ReactElement | boolean; activeShape?: object |ContentRenderer | React.ReactElement; activeIndex?: number | number[]; } @@ -547,7 +547,7 @@ export interface RadarProps extends EventAttributes, Partial | ContentRenderer; activeDot?: object | React.ReactElement | ContentRenderer | boolean; dot?: object | React.ReactElement | ContentRenderer | boolean; - label?: object | React.ReactElement | Label['content'] | boolean; + label?: object | React.ReactElement | LabelProps['content'] | boolean; legendType?: LegendType; hide?: boolean; } @@ -586,7 +586,7 @@ export interface RadialBarProps extends EventAttributes, Partial | Label['content'] | object; + label?: boolean | React.ReactElement | LabelProps['content'] | object; background?: boolean | React.ReactElement | ContentRenderer | object; hide?: boolean; } @@ -821,22 +821,16 @@ export interface TreemapProps extends EventAttributes, Animatable { export class Treemap extends React.Component { } -export interface Label { - className?: string; +export class Label extends React.Component { } + +export interface LabelProps { viewBox?: ViewBox | PolarViewBox; formatter?: LabelFormatter; - value: string | number; + value?: number | string; offset?: number; position?: PositionType; children?: React.ReactNode[] | React.ReactNode; - content?: React.ReactElement | ContentRenderer
getBBox() to measure the size of text elements. - */ - SVG, - /** - * Use CanvasRenderingContext2D.measureText() to measure the width of text elements. - */ - CANVAS - } - /** - * A basic label style which renders the label's {@link yfiles.graph.ILabel#text} and optionally a {@link yfiles.styles.DefaultLabelStyle#backgroundFill background} and {@link yfiles.styles.DefaultLabelStyle#backgroundStroke border}. - *

- * This style uses a {@link yfiles.styles.DefaultLabelStyleRenderer} to create its visualization. - *

- * @class - * @implements {yfiles.styles.ILabelStyle} - */ - export interface DefaultLabelStyle extends yfiles.lang.Object,yfiles.styles.ILabelStyle{} - export class DefaultLabelStyle { - /** - * Creates a new instance using the provided renderer. - * @param renderer The custom renderer for this style instance. - */ - constructor(renderer:yfiles.styles.ILabelStyleRenderer); - /** - * Creates a new instance using the provided renderer. - * @param {Object} options The parameters to pass. - * @param options.renderer The custom renderer for this style instance. - * @param {boolean} options.autoFlip A value indicating whether the label should be flipped 180 degrees automatically, if it would be oriented downwards, otherwise. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#autoFlip} property on the created object. - *

- * @param {yfiles.view.Fill} options.backgroundFill The brush to use for the background box of the label. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#backgroundFill} property on the created object. - *

- * @param {yfiles.view.Stroke} options.backgroundStroke The pen to use for the background box of the label. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#backgroundStroke} property on the created object. - *

- * @param {boolean} options.clipText A value that determines whether text should be clipped. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#clipText} property on the created object. - *

- * @param {yfiles.view.HorizontalTextAlignment} options.horizontalTextAlignment The text alignment. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#horizontalTextAlignment} property on the created object. - *

- * @param {yfiles.view.Fill} options.textFill The brush to use for the label's text. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#textFill} property on the created object. - *

- * @param {number} options.textSize The size of the text. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#textSize} property on the created object. - *

- * @param {yfiles.view.TextWrapping} options.wrapping The text trimming. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#wrapping} property on the created object. - *

- * @param {yfiles.view.Font} options.font The typeface to use for the label. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#font} property on the created object. - *

- * @param {yfiles.view.VerticalTextAlignment} options.verticalTextAlignment The vertical text alignment to use if the label is assigned more space than needed. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#verticalTextAlignment} property on the created object. - *

- */ - constructor(options:{renderer:yfiles.styles.ILabelStyleRenderer,autoFlip?:boolean,backgroundFill?:yfiles.view.Fill,backgroundStroke?:yfiles.view.Stroke,clipText?:boolean,horizontalTextAlignment?:yfiles.view.HorizontalTextAlignment,textFill?:yfiles.view.Fill,textSize?:number,wrapping?:yfiles.view.TextWrapping,font?:yfiles.view.Font,verticalTextAlignment?:yfiles.view.VerticalTextAlignment}); - /** - * Creates a new instance using {@link yfiles.styles.DefaultLabelStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {boolean} options.autoFlip A value indicating whether the label should be flipped 180 degrees automatically, if it would be oriented downwards, otherwise. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#autoFlip} property on the created object. - *

- * @param {yfiles.view.Fill} options.backgroundFill The brush to use for the background box of the label. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#backgroundFill} property on the created object. - *

- * @param {yfiles.view.Stroke} options.backgroundStroke The pen to use for the background box of the label. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#backgroundStroke} property on the created object. - *

- * @param {boolean} options.clipText A value that determines whether text should be clipped. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#clipText} property on the created object. - *

- * @param {yfiles.view.HorizontalTextAlignment} options.horizontalTextAlignment The text alignment. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#horizontalTextAlignment} property on the created object. - *

- * @param {yfiles.view.Fill} options.textFill The brush to use for the label's text. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#textFill} property on the created object. - *

- * @param {number} options.textSize The size of the text. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#textSize} property on the created object. - *

- * @param {yfiles.view.TextWrapping} options.wrapping The text trimming. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#wrapping} property on the created object. - *

- * @param {yfiles.view.Font} options.font The typeface to use for the label. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#font} property on the created object. - *

- * @param {yfiles.view.VerticalTextAlignment} options.verticalTextAlignment The vertical text alignment to use if the label is assigned more space than needed. - *

- * This option sets the {@link yfiles.styles.DefaultLabelStyle#verticalTextAlignment} property on the created object. - *

- */ - constructor(options?:{autoFlip?:boolean,backgroundFill?:yfiles.view.Fill,backgroundStroke?:yfiles.view.Stroke,clipText?:boolean,horizontalTextAlignment?:yfiles.view.HorizontalTextAlignment,textFill?:yfiles.view.Fill,textSize?:number,wrapping?:yfiles.view.TextWrapping,font?:yfiles.view.Font,verticalTextAlignment?:yfiles.view.VerticalTextAlignment}); - /** - * - * @returns - */ - clone():any; - /** - * Gets or sets the brush to use for the background box of the label. - *

- * The default value is null. - *

- * @default null - * @type {yfiles.view.Fill} - */ - backgroundFill:yfiles.view.Fill; - /** - * Gets or sets the vertical text alignment to use if the label is assigned more space than needed. - *

- * The default value is {@link yfiles.view.VerticalTextAlignment#TOP}. - *

- * @default yfiles.view.VerticalTextAlignment.TOP - * @type {yfiles.view.VerticalTextAlignment} - */ - verticalTextAlignment:yfiles.view.VerticalTextAlignment; - /** - * Gets or sets the text alignment. - *

- * The default value is {@link yfiles.view.HorizontalTextAlignment#LEFT}. - *

- * @default yfiles.view.HorizontalTextAlignment.LEFT - * @type {yfiles.view.HorizontalTextAlignment} - */ - horizontalTextAlignment:yfiles.view.HorizontalTextAlignment; - /** - * Gets or sets the text trimming. - *

- * The default value is {@link yfiles.view.TextWrapping#NONE}. - *

- * @default yfiles.view.TextWrapping.NONE - * @type {yfiles.view.TextWrapping} - */ - wrapping:yfiles.view.TextWrapping; - /** - * Gets or sets a value that determines whether text should be clipped. - *

- * The default value is true. - *

- * @default true - * @type {boolean} - */ - clipText:boolean; - /** - * Gets or sets the pen to use for the background box of the label. - *

- * The default value is null. - *

- * @default null - * @type {yfiles.view.Stroke} - */ - backgroundStroke:yfiles.view.Stroke; - /** - * - * @type {yfiles.styles.ILabelStyleRenderer} - */ - renderer:yfiles.styles.ILabelStyleRenderer; - /** - * Gets or sets the typeface to use for the label. - *

- * The default value is an instance of {@link yfiles.styles.DefaultLabelStyle#font} for Arial". - *

- * @throws {Stubs.Exceptions.ArgumentError} value cannot be null! - * @type {yfiles.view.Font} - */ - font:yfiles.view.Font; - /** - * Gets or sets a value indicating whether the label should be flipped 180 degrees automatically, if it would be oriented - * downwards, otherwise. - *

- * The default value is true. - *

- * @default true - * @type {boolean} - */ - autoFlip:boolean; - /** - * Gets or sets the brush to use for the label's text. - *

- * The default value is {@link yfiles.view.Fill#BLACK}. - *

- * @throws {Stubs.Exceptions.ArgumentError} value cannot be null! - * @default 'Black' - * @type {yfiles.view.Fill} - */ - textFill:yfiles.view.Fill; - /** - * Gets or sets the size of the text. - *

- * This property delegates to the size of the {@link yfiles.styles.DefaultLabelStyle#font} property. - *

- *

- * The default value is 12.0d. - *

- * @default 12 - * @type {number} - */ - textSize:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.DefaultLabelStyle; - } - /** - * A label style that draws an icon in addition to the text. - *

- * This style draws the icon at the location specified by {@link yfiles.styles.IconLabelStyle#iconPlacement} and delegates the drawing of the label's text to the {@link yfiles.styles.IconLabelStyle#wrapped} style. - *

- * @class - * @implements {yfiles.styles.ILabelStyle} - */ - export interface IconLabelStyle extends yfiles.lang.Object,yfiles.styles.ILabelStyle{} - export class IconLabelStyle { - /** - * Creates a new instance using the provided icon and renderer. - * @param icon The icon to draw. - * @param [renderer=null] The custom renderer for this style instance. - */ - constructor(icon:string,renderer?:yfiles.styles.ILabelStyleRenderer); - /** - * Creates a new instance using the provided icon and renderer. - * @param {Object} options The parameters to pass. - * @param options.icon The icon to draw. - * @param [options.renderer=null] The custom renderer for this style instance. - * @param {boolean} options.autoFlip A value indicating whether to automatically flip the rendering should the {@link yfiles.graph.ILabel#layout layout}'s {@link yfiles.geometry.IOrientedRectangle#upY up vector} point downwards. - *

- * This option sets the {@link yfiles.styles.IconLabelStyle#autoFlip} property on the created object. - *

- * @param {yfiles.graph.ILabelModelParameter} options.iconPlacement The parameter that specifies the icon placement. - *

- * This option sets the {@link yfiles.styles.IconLabelStyle#iconPlacement} property on the created object. - *

- * @param {yfiles.geometry.Size} options.iconSize The size of the icon to paint for the label. - *

- * This option sets the {@link yfiles.styles.IconLabelStyle#iconSize} property on the created object. - *

- * @param {yfiles.styles.ILabelStyle} options.wrapped The style that renders the text of the label. - *

- * This option sets the {@link yfiles.styles.IconLabelStyle#wrapped} property on the created object. - *

- * @param {yfiles.geometry.Insets} options.wrappedInsets The insets that should be applied for the {@link yfiles.graph.ILabel#layout layout} of the {@link yfiles.styles.IconLabelStyle#wrapped wrapped style} rendering. - *

- * This option sets the {@link yfiles.styles.IconLabelStyle#wrappedInsets} property on the created object. - *

- */ - constructor(options:{icon:string,renderer?:yfiles.styles.ILabelStyleRenderer,autoFlip?:boolean,iconPlacement?:yfiles.graph.ILabelModelParameter,iconSize?:yfiles.geometry.Size,wrapped?:yfiles.styles.ILabelStyle,wrappedInsets?:yfiles.geometry.Insets}); - /** - * Creates a new instance using no icon and {@link yfiles.styles.IconLabelStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {boolean} options.autoFlip A value indicating whether to automatically flip the rendering should the {@link yfiles.graph.ILabel#layout layout}'s {@link yfiles.geometry.IOrientedRectangle#upY up vector} point downwards. - *

- * This option sets the {@link yfiles.styles.IconLabelStyle#autoFlip} property on the created object. - *

- * @param {string} options.icon The URL of the icon. - *

- * This option sets the {@link yfiles.styles.IconLabelStyle#icon} property on the created object. - *

- * @param {yfiles.graph.ILabelModelParameter} options.iconPlacement The parameter that specifies the icon placement. - *

- * This option sets the {@link yfiles.styles.IconLabelStyle#iconPlacement} property on the created object. - *

- * @param {yfiles.geometry.Size} options.iconSize The size of the icon to paint for the label. - *

- * This option sets the {@link yfiles.styles.IconLabelStyle#iconSize} property on the created object. - *

- * @param {yfiles.styles.ILabelStyle} options.wrapped The style that renders the text of the label. - *

- * This option sets the {@link yfiles.styles.IconLabelStyle#wrapped} property on the created object. - *

- * @param {yfiles.geometry.Insets} options.wrappedInsets The insets that should be applied for the {@link yfiles.graph.ILabel#layout layout} of the {@link yfiles.styles.IconLabelStyle#wrapped wrapped style} rendering. - *

- * This option sets the {@link yfiles.styles.IconLabelStyle#wrappedInsets} property on the created object. - *

- */ - constructor(options?:{autoFlip?:boolean,icon?:string,iconPlacement?:yfiles.graph.ILabelModelParameter,iconSize?:yfiles.geometry.Size,wrapped?:yfiles.styles.ILabelStyle,wrappedInsets?:yfiles.geometry.Insets}); - /** - * - * @returns - */ - clone():any; - /** - * Gets or sets the URL of the icon. - *

- * The URL can either be a relative URL, an absolute URL, or a Data URI. Relative URLs are resolved relative to the - * document. Eventually, this string becomes the value of the href attribute of an SVG image element. - *

- * @type {string} - */ - icon:string; - /** - * Gets or sets the size of the icon to paint for the label. - *

- * The default value is {@link yfiles.geometry.Size#EMPTY}. - *

- * @type {yfiles.geometry.Size} - */ - iconSize:yfiles.geometry.Size; - /** - * Gets or sets the parameter that specifies the icon placement. - *

- * All valid node label model parameters can be used. The label's {@link yfiles.graph.ILabel#layout layout} will be interpreted as the a node's layout and the - * icon will be placed relative to that layout as if it was a node's label. - *

- *

- * The default value is {@link yfiles.graph.ExteriorLabelModel#WEST}. - *

- * @throws {Stubs.Exceptions.ArgumentError} value is null. - * @type {yfiles.graph.ILabelModelParameter} - */ - iconPlacement:yfiles.graph.ILabelModelParameter; - /** - * Gets or sets the style that renders the text of the label. - *

- * This style will be rendered before the icon and is responsible for rendering the {@link yfiles.graph.ILabel#text}, since {@link yfiles.styles.IconLabelStyleRenderer} - * will only render the {@link yfiles.styles.IconLabelStyle#icon}. - *

- *

- * The default value is {@link yfiles.styles.DefaultLabelStyle}. - *

- * @throws {Stubs.Exceptions.ArgumentError} value is null. - * @type {yfiles.styles.ILabelStyle} - */ - wrapped:yfiles.styles.ILabelStyle; - /** - * Gets or sets the insets that should be applied for the {@link yfiles.graph.ILabel#layout layout} of the {@link yfiles.styles.IconLabelStyle#wrapped wrapped style} rendering. - *

- * The {@link yfiles.styles.IconLabelStyleRenderer#getPreferredSize} will take the preferred size of the {@link yfiles.styles.IconLabelStyle#wrapped}'s {@link yfiles.styles.ILabelStyleRenderer} - * and add these insets to it. During the {@link yfiles.view.IVisualCreator rendering} these insets will be used to offset the rendering of the wrapped - * style. - *

- *

- * The default insets are empty. - *

- * @default '0' - * @type {yfiles.geometry.Insets} - */ - wrappedInsets:yfiles.geometry.Insets; - /** - * - * @type {yfiles.styles.ILabelStyleRenderer} - */ - renderer:yfiles.styles.ILabelStyleRenderer; - /** - * Gets a value indicating whether to automatically flip the rendering should the {@link yfiles.graph.ILabel#layout layout}'s {@link yfiles.geometry.IOrientedRectangle#upY up vector} point downwards. - *

- * The default value is true. - *

- * @default true - * @type {boolean} - */ - autoFlip:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.IconLabelStyle; - } - /** - * A simple {@link yfiles.styles.ILabelStyleRenderer} implementation that can handle {@link yfiles.styles.DefaultLabelStyle} instances. - *

- * This implementation will just draw the label's {@link yfiles.graph.ILabel#text} using the properties provided by {@link yfiles.styles.DefaultLabelStyle} into - * the label's {@link yfiles.graph.ILabel#layout layout} area. - *

- * @class - * @implements {yfiles.styles.ILabelStyleRenderer} - * @implements {yfiles.view.IBoundsProvider} - * @implements {yfiles.view.IVisibilityTestable} - * @implements {yfiles.input.IMarqueeTestable} - * @implements {yfiles.input.IHitTestable} - * @implements {yfiles.graph.ILookup} - * @implements {yfiles.view.IVisualCreator} - */ - export interface DefaultLabelStyleRenderer extends yfiles.lang.Object,yfiles.styles.ILabelStyleRenderer,yfiles.view.IBoundsProvider,yfiles.view.IVisibilityTestable,yfiles.input.IMarqueeTestable,yfiles.input.IHitTestable,yfiles.graph.ILookup,yfiles.view.IVisualCreator{} - export class DefaultLabelStyleRenderer { - /** - * Creates a new default instance. - */ - constructor(); - /** - * Add the text content to the provided SVG text element. - * @param textElement An SVG text element to add the provided text to. - * @param font The {@link } that defines the font properties to apply to the added text. - * @param text The text content to add to the provided text element (may contain newline characters). - * @param maxSize The bounds that shouldn't be exceeded when placing the text; null or not provided means unbound. - * @param wrapping The {@link } policy to apply when the text exceeds the provided maxSize. - * @returns - * @protected - */ - addTextElements(textElement:SVGTextElement,font:yfiles.view.Font,text:string,maxSize:yfiles.geometry.Size,wrapping:yfiles.view.TextWrapping):string; - /** - * Prepares this instance for subsequent calls after the style and label have been initialized. - *

- * Upon invocation the {@link yfiles.styles.DefaultLabelStyleRenderer#style} and {@link yfiles.styles.DefaultLabelStyleRenderer#label} properties have been populated by the - * {@link yfiles.styles.DefaultLabelStyleRenderer#getVisualCreator}, {@link yfiles.styles.DefaultLabelStyleRenderer#getBoundsProvider}, - * {@link yfiles.styles.DefaultLabelStyleRenderer#getHitTestable}, or {@link yfiles.styles.DefaultLabelStyleRenderer#getMarqueeTestable} - * methods. - *

- *

- * Stores the {@link yfiles.graph.ILabel#layout layout} into {@link yfiles.styles.DefaultLabelStyleRenderer#layout}. Subclasses which to override this method should call the base implementation. - *

- * @protected - */ - configure():void; - /** - * - * @param context - * @returns - */ - createVisual(context:yfiles.view.IRenderContext):yfiles.view.Visual; - /** - * - * @param context - * @returns - */ - getBounds(context:yfiles.view.ICanvasContext):yfiles.geometry.Rect; - /** - * Configures the style and label parameters, calls {@link yfiles.styles.DefaultLabelStyleRenderer#configure} and returns this. - * @param label The label to retrieve the bounds provider for. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.DefaultLabelStyleRenderer#getBounds - */ - getBoundsProvider(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.view.IBoundsProvider; - /** - * Configures the style and label parameters, does not call {@link yfiles.styles.DefaultLabelStyleRenderer#configure} and returns - * this. - *

- * As this method may be called often it will not automatically call {@link yfiles.styles.DefaultLabelStyleRenderer#configure}, - * instead subclasses should ensure that in the {@link yfiles.styles.DefaultLabelStyleRenderer#lookup} method call they should call - * {@link yfiles.styles.DefaultLabelStyleRenderer#configure} only if needed, i.e. if they decide to return this or an instance that - * depends on a correctly configured this. - *

- * @param label The label to query the context for. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.DefaultLabelStyleRenderer#lookup - */ - getContext(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.graph.ILookup; - /** - * Configures the style and label parameters, calls {@link yfiles.styles.DefaultLabelStyleRenderer#configure} and returns this. - * @param label The label to query hit test with. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.DefaultLabelStyleRenderer#isHit - */ - getHitTestable(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.input.IHitTestable; - /** - * Determines how the text should be aligned within the assigned label bounds. - * @returns This value as obtained from the style. - * @protected - */ - getHorizontalTextAlignment():yfiles.view.HorizontalTextAlignment; - /** - * Configures the style and label parameters, calls {@link yfiles.styles.DefaultLabelStyleRenderer#configure} and returns this. - * @param label The label to query marquee intersection tests. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.DefaultLabelStyleRenderer#isInBox - */ - getMarqueeTestable(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.input.IMarqueeTestable; - /** - * - * @param label - * @param style - * @returns - */ - getPreferredSize(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.geometry.Size; - /** - * Calculates the preferred size given the current state of the renderer. - * @returns The size as suggested by this renderer. - * @protected - */ - getPreferredSizeCore():yfiles.geometry.Size; - /** - * Determines how the text should be aligned vertically within the assigned label bounds. - * @returns This value as obtained from the style. - * @protected - */ - getVerticalTextAlignment():yfiles.view.VerticalTextAlignment; - /** - * Configures the style and label parameters, does not call {@link yfiles.styles.DefaultLabelStyleRenderer#configure} and returns - * this. - *

- * Unlike most of the other methods this implementation does not call {@link yfiles.styles.DefaultLabelStyleRenderer#configure}. If - * the subclass implementation depends on this instance to be configured, it needs to call Configure in - * {@link yfiles.styles.DefaultLabelStyleRenderer#isVisible}. - *

- * @param label The label to query visibility tests. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.DefaultLabelStyleRenderer#isVisible - */ - getVisibilityTestable(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.view.IVisibilityTestable; - /** - * Configures the style and label parameters, calls {@link yfiles.styles.DefaultLabelStyleRenderer#configure} and returns this. - * @param label The label to retrieve the {@link } for. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.DefaultLabelStyleRenderer#createVisual - * @see yfiles.styles.DefaultLabelStyleRenderer#updateVisual - */ - getVisualCreator(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.view.IVisualCreator; - /** - * Determines how the text should be trimmed to fit the assigned label bounds. - * @returns This value as obtained from the style. - * @protected - */ - getWrapping():yfiles.view.TextWrapping; - /** - * Delegates to {@link yfiles.styles.DefaultLabelStyle#autoFlip} - * @returns Whether to flip the drawing if it is upside down. - * @protected - */ - isAutoFlip():boolean; - /** - * Determines whether text should be forced to be clipped inside the rectangle. - * @returns This value as obtained from the style. - * @protected - */ - isClippingText():boolean; - /** - * - * @param context - * @param location - * @returns - */ - isHit(context:yfiles.input.IInputModeContext,location:yfiles.geometry.Point):boolean; - /** - * - * @param context - * @param rectangle - * @returns - */ - isInBox(context:yfiles.input.IInputModeContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Uses the {@link yfiles.graph.ILabel#layout} to determine whether the clip intersects. - * @param context - * @param rectangle - * @returns - */ - isVisible(context:yfiles.view.ICanvasContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Implements the {@link yfiles.graph.ILookup} interface. - *

- * This method will be used by default if {@link yfiles.styles.DefaultLabelStyleRenderer#getContext} has been queried for a lookup - * implementation. Note that it cannot be assumed that {@link yfiles.styles.DefaultLabelStyleRenderer#configure} has already been - * invoked. However, normally {@link yfiles.styles.DefaultLabelStyleRenderer#label} and {@link yfiles.styles.DefaultLabelStyleRenderer#style} will be correctly configured if invoked directly after GetContext. Subclass - * implementations should make sure to configure this instance before they return this as a result of a successful lookup. - * This implementation will check if type.IsInstanceOfType(this) and will call {@link yfiles.styles.DefaultLabelStyleRenderer#configure} - * on success and return this. - *

- * @param type The type to query for. - * @returns An implementation or null. - */ - lookup(type:yfiles.lang.Class):any; - /** - * Calculate the width and height required to render the provided text using the provided {@link yfiles.view.Font}. - * @param text The text that should be measured. - * @param font The {@link } to apply to the text before measuring. - * @returns The text size. - * @protected - */ - measureText(text:string,font:yfiles.view.Font):yfiles.geometry.Size; - /** - * - * @param context - * @param oldVisual - * @returns - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual):yfiles.view.Visual; - /** - * Gets or sets the current {@link yfiles.graph.ILabel#layout layout}. - * @protected - * @type {yfiles.geometry.IOrientedRectangle} - */ - layout:yfiles.geometry.IOrientedRectangle; - /** - * Gets or sets the currently configured style. - * @protected - * @type {yfiles.styles.DefaultLabelStyle} - */ - style:yfiles.styles.DefaultLabelStyle; - /** - * Gets or sets the currently configured label. - * @protected - * @type {yfiles.graph.ILabel} - */ - label:yfiles.graph.ILabel; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.DefaultLabelStyleRenderer; - } - /** - * An {@link yfiles.styles.ILabelStyleRenderer} that can handle {@link yfiles.styles.IconLabelStyle} instances. - *

- * This implementation renders the label's inner style and an icon. - *

- * @class - * @implements {yfiles.styles.ILabelStyleRenderer} - * @implements {yfiles.view.IBoundsProvider} - * @implements {yfiles.view.IVisibilityTestable} - * @implements {yfiles.input.IMarqueeTestable} - * @implements {yfiles.input.IHitTestable} - * @implements {yfiles.graph.ILookup} - * @implements {yfiles.view.IVisualCreator} - */ - export interface IconLabelStyleRenderer extends yfiles.lang.Object,yfiles.styles.ILabelStyleRenderer,yfiles.view.IBoundsProvider,yfiles.view.IVisibilityTestable,yfiles.input.IMarqueeTestable,yfiles.input.IHitTestable,yfiles.graph.ILookup,yfiles.view.IVisualCreator{} - export class IconLabelStyleRenderer { - /** - * Creates a new instance of this renderer. - */ - constructor(); - /** - * - * @protected - */ - configure():void; - /** - * - * @param context - * @returns - */ - createVisual(context:yfiles.view.IRenderContext):yfiles.view.Visual; - /** - * - * @param context - * @returns - */ - getBounds(context:yfiles.view.ICanvasContext):yfiles.geometry.Rect; - /** - * Configures the style and label parameters, calls {@link yfiles.styles.IconLabelStyleRenderer#configure} and returns this. - * @param label The label to retrieve the bounds provider for. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.IconLabelStyleRenderer#getBounds - */ - getBoundsProvider(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.view.IBoundsProvider; - /** - * Configures the style and label parameters, does not call {@link yfiles.styles.IconLabelStyleRenderer#configure} and returns this. - *

- * As this method may be called often it will not automatically call {@link yfiles.styles.IconLabelStyleRenderer#configure}, - * instead subclasses should ensure that in the {@link yfiles.styles.IconLabelStyleRenderer#lookup} method call they should call {@link yfiles.styles.IconLabelStyleRenderer#configure} - * only if needed, i.e. if they decide to return this or an instance that depends on a correctly configured this. - *

- * @param label The label to query the context for. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.IconLabelStyleRenderer#lookup - */ - getContext(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.graph.ILookup; - /** - * Configures the style and label parameters, calls {@link yfiles.styles.IconLabelStyleRenderer#configure} and returns this. - * @param label The label to query hit test with. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.IconLabelStyleRenderer#isHit - */ - getHitTestable(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.input.IHitTestable; - /** - * Retrieves the {@link yfiles.styles.IconLabelStyle#icon} from the {@link yfiles.styles.IconLabelStyleRenderer#style}. - * @returns The icon. - * @protected - */ - getIcon():string; - /** - * Retrieves the {@link yfiles.styles.IconLabelStyle#iconPlacement} from the {@link yfiles.styles.IconLabelStyleRenderer#style}. - * @returns The placement parameter. - * @protected - */ - getIconPlacement():yfiles.graph.ILabelModelParameter; - /** - * Gets the size of the icon from the {@link yfiles.styles.IconLabelStyle#iconSize} property. - * @returns The size to use for the icon. - * @protected - */ - getIconSize():yfiles.geometry.Size; - /** - * Configures the style and label parameters, calls {@link yfiles.styles.IconLabelStyleRenderer#configure} and returns this. - * @param label The label to query marquee intersection tests. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.IconLabelStyleRenderer#isInBox - */ - getMarqueeTestable(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.input.IMarqueeTestable; - /** - * - * @param label - * @param style - * @returns - */ - getPreferredSize(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.geometry.Size; - /** - * Calculates the preferred size given the current state of the renderer. - * @returns The size as suggested by this renderer. - * @protected - */ - getPreferredSizeCore():yfiles.geometry.Size; - /** - * Configures the style and label parameters, does not call {@link yfiles.styles.IconLabelStyleRenderer#configure} and returns this. - *

- * Unlike most of the other methods this implementation does not call {@link yfiles.styles.IconLabelStyleRenderer#configure}. If the - * subclass implementation depends on this instance to be configured, it needs to call Configure in - * {@link yfiles.styles.IconLabelStyleRenderer#isVisible}. - *

- * @param label The label to query visibility tests. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.IconLabelStyleRenderer#isVisible - */ - getVisibilityTestable(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.view.IVisibilityTestable; - /** - * Configures the style and label parameters, calls {@link yfiles.styles.IconLabelStyleRenderer#configure} and returns this. - * @param label The label to retrieve the {@link } for. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.IconLabelStyleRenderer#createVisual - * @see yfiles.styles.IconLabelStyleRenderer#updateVisual - */ - getVisualCreator(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.view.IVisualCreator; - /** - * Retrieves the {@link yfiles.styles.IconLabelStyle#wrapped} from the {@link yfiles.styles.IconLabelStyleRenderer#style}. - * @returns The style. - * @protected - */ - getWrappedStyle():yfiles.styles.ILabelStyle; - /** - * Retrieves the {@link yfiles.styles.IconLabelStyle#wrappedInsets} from the {@link yfiles.styles.IconLabelStyleRenderer#style}. - * @returns The insets. - * @protected - */ - getWrappedStyleInsets():yfiles.geometry.Insets; - /** - * Retrieves the {@link yfiles.styles.IconLabelStyle#autoFlip} property from the {@link yfiles.styles.IconLabelStyleRenderer#style}. - * @returns The autoflip property value. - * @protected - */ - isAutoFlip():boolean; - /** - * - * @param context - * @param location - * @returns - */ - isHit(context:yfiles.input.IInputModeContext,location:yfiles.geometry.Point):boolean; - /** - * - * @param context - * @param rectangle - * @returns - */ - isInBox(context:yfiles.input.IInputModeContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * - * @param context - * @param rectangle - * @returns - */ - isVisible(context:yfiles.view.ICanvasContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Implements the {@link yfiles.graph.ILookup} interface. - *

- * This method will be used by default if {@link yfiles.styles.IconLabelStyleRenderer#getContext} has been queried for a lookup - * implementation. Note that it cannot be assumed that {@link yfiles.styles.IconLabelStyleRenderer#configure} has already been - * invoked. However, normally {@link yfiles.styles.IconLabelStyleRenderer#label} and {@link yfiles.styles.IconLabelStyleRenderer#style} will be correctly configured if invoked directly after GetContext. Subclass - * implementations should make sure to configure this instance before they return this as a result of a successful lookup. - * This implementation will check if type.IsInstanceOfType(this) and will call {@link yfiles.styles.IconLabelStyleRenderer#configure} - * on success and return this. - *

- * @param type The type to query for. - * @returns An implementation or null. - */ - lookup(type:yfiles.lang.Class):any; - /** - * Returns whether the icon bounds should be considered for hit testing. - * @returns true - * @protected - */ - shouldHitTestIcon():boolean; - /** - * - * @param context - * @param oldVisual - * @returns - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual):yfiles.view.Visual; - /** - * Gets or sets the currently configured style. - * @protected - * @type {yfiles.styles.IconLabelStyle} - */ - style:yfiles.styles.IconLabelStyle; - /** - * Gets or sets the currently configured label. - * @protected - * @type {yfiles.graph.ILabel} - */ - label:yfiles.graph.ILabel; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.IconLabelStyleRenderer; - } - /** - * A node style that can display node shapes with a boundary that is defined by a {@link yfiles.geometry.GeneralPath} instance. - * @class - * @implements {yfiles.styles.INodeStyle} - */ - export interface GeneralPathNodeStyle extends yfiles.lang.Object,yfiles.styles.INodeStyle{} - export class GeneralPathNodeStyle { - /** - * Creates a new instance using the specified path and a custom renderer instance. - * @param path The path that defines the boundary of this style. - * @param [renderer=null] Custom renderer instance for this style - */ - constructor(path:yfiles.geometry.GeneralPath,renderer?:yfiles.styles.GeneralPathNodeStyleRenderer); - /** - * Creates a new instance using the specified path and a custom renderer instance. - * @param {Object} options The parameters to pass. - * @param options.path The path that defines the boundary of this style. - * @param [options.renderer=null] Custom renderer instance for this style - * @param {yfiles.view.Fill} options.fill The {@link yfiles.view.Fill} that is used to draw the shape. - *

- * This option sets the {@link yfiles.styles.GeneralPathNodeStyle#fill} property on the created object. - *

- * @param {yfiles.view.Stroke} options.stroke The {@link yfiles.view.Stroke} that is used to draw the shape. - *

- * This option sets the {@link yfiles.styles.GeneralPathNodeStyle#stroke} property on the created object. - *

- */ - constructor(options:{path:yfiles.geometry.GeneralPath,renderer?:yfiles.styles.GeneralPathNodeStyleRenderer,fill?:yfiles.view.Fill,stroke?:yfiles.view.Stroke}); - /** - * Creates a new instance using a simple rectangular path and {@link yfiles.styles.GeneralPathNodeStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {yfiles.view.Fill} options.fill The {@link yfiles.view.Fill} that is used to draw the shape. - *

- * This option sets the {@link yfiles.styles.GeneralPathNodeStyle#fill} property on the created object. - *

- * @param {yfiles.geometry.GeneralPath} options.path The path that defines the boundary of the shape. - *

- * This option sets the {@link yfiles.styles.GeneralPathNodeStyle#path} property on the created object. - *

- * @param {yfiles.view.Stroke} options.stroke The {@link yfiles.view.Stroke} that is used to draw the shape. - *

- * This option sets the {@link yfiles.styles.GeneralPathNodeStyle#stroke} property on the created object. - *

- */ - constructor(options?:{fill?:yfiles.view.Fill,path?:yfiles.geometry.GeneralPath,stroke?:yfiles.view.Stroke}); - /** - * - * @returns - */ - clone():any; - /** - * Get or sets the path that defines the boundary of the shape. - *

- * The path must be defined in such a way that <0,0> will be at the top left of a node's {@link yfiles.graph.INode#layout} and <1,1> will be at the lower - * right. The path will be scaled accordingly during the painting. - *

- *

- * The default is a simple rectangular path. - *

- * @type {yfiles.geometry.GeneralPath} - */ - path:yfiles.geometry.GeneralPath; - /** - * - * @type {yfiles.styles.INodeStyleRenderer} - */ - renderer:yfiles.styles.INodeStyleRenderer; - /** - * Gets or sets the {@link yfiles.view.Fill} that is used to draw the shape. - *

- * The default value is {@link yfiles.view.Fill#WHITE}. - *

- * @default 'System.Drawing.Brushes.White' - * @type {yfiles.view.Fill} - */ - fill:yfiles.view.Fill; - /** - * Gets or sets the {@link yfiles.view.Stroke} that is used to draw the shape. - *

- * The default value is {@link yfiles.view.Stroke#BLACK}. - *

- * @default 'System.Drawing.Pens.Black' - * @type {yfiles.view.Stroke} - */ - stroke:yfiles.view.Stroke; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.GeneralPathNodeStyle; - } - /** - * An {@link yfiles.styles.INodeStyleRenderer} implementation that can handle {@link yfiles.styles.GeneralPathNodeStyle} instances. - * @class - * @implements {yfiles.styles.INodeStyleRenderer} - * @implements {yfiles.styles.IShapeGeometry} - * @implements {yfiles.view.IBoundsProvider} - * @implements {yfiles.view.IVisibilityTestable} - * @implements {yfiles.input.IMarqueeTestable} - * @implements {yfiles.input.IHitTestable} - * @implements {yfiles.graph.ILookup} - * @implements {yfiles.view.IVisualCreator} - */ - export interface GeneralPathNodeStyleRenderer extends yfiles.lang.Object,yfiles.styles.INodeStyleRenderer,yfiles.styles.IShapeGeometry,yfiles.view.IBoundsProvider,yfiles.view.IVisibilityTestable,yfiles.input.IMarqueeTestable,yfiles.input.IHitTestable,yfiles.graph.ILookup,yfiles.view.IVisualCreator{} - export class GeneralPathNodeStyleRenderer { - /** - * Initializes a new instance of the {@link yfiles.styles.GeneralPathNodeStyleRenderer} class. - */ - constructor(); - /** - * Prepares this instance for subsequent calls after the style and node have been initialized. - *

- * Upon invocation the {@link yfiles.styles.GeneralPathNodeStyleRenderer#style} and {@link yfiles.styles.GeneralPathNodeStyleRenderer#node} properties have been populated by the - * {@link yfiles.styles.GeneralPathNodeStyleRenderer#getVisualCreator}, - * {@link yfiles.styles.GeneralPathNodeStyleRenderer#getBoundsProvider}, {@link yfiles.styles.GeneralPathNodeStyleRenderer#getHitTestable}, - * or {@link yfiles.styles.GeneralPathNodeStyleRenderer#getMarqueeTestable} methods. - *

- *

- * This is an empty implementation. Subclasses might have to override this method. - *

- * @protected - */ - configure():void; - /** - * - * @param context - * @returns - */ - createVisual(context:yfiles.view.IRenderContext):yfiles.view.Visual; - /** - * - * @param context - * @returns - */ - getBounds(context:yfiles.view.ICanvasContext):yfiles.geometry.Rect; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.GeneralPathNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the bounds provider for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.GeneralPathNodeStyleRenderer#getBounds - */ - getBoundsProvider(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IBoundsProvider; - /** - * Configures the style and node parameters, does not call {@link yfiles.styles.GeneralPathNodeStyleRenderer#configure} and returns - * this. - *

- * As this method may be called often it will not automatically call {@link yfiles.styles.GeneralPathNodeStyleRenderer#configure}, - * instead subclasses should ensure that in the {@link yfiles.styles.GeneralPathNodeStyleRenderer#lookup} method call they should - * call {@link yfiles.styles.GeneralPathNodeStyleRenderer#configure} only if needed, i.e. if they decide to return this or an - * instance that depends on a correctly configured this. - *

- * @param node The node to query the context for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.GeneralPathNodeStyleRenderer#lookup - */ - getContext(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.graph.ILookup; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.GeneralPathNodeStyleRenderer#configure} and returns this. - * @param node The node to query hit test with. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.GeneralPathNodeStyleRenderer#isHit - */ - getHitTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IHitTestable; - /** - * - * @param inner - * @param outer - * @returns - */ - getIntersection(inner:yfiles.geometry.Point,outer:yfiles.geometry.Point):yfiles.geometry.Point; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.GeneralPathNodeStyleRenderer#configure} and returns this. - * @param node The node to query marquee intersection tests. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.GeneralPathNodeStyleRenderer#isInBox - */ - getMarqueeTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IMarqueeTestable; - /** - * - * @returns - */ - getOutline():yfiles.geometry.GeneralPath; - /** - * Configures the {@link yfiles.styles.GeneralPathNodeStyleRenderer#style} and {@link yfiles.styles.GeneralPathNodeStyleRenderer#node} properties, calls {@link yfiles.styles.GeneralPathNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the shape geometry for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.GeneralPathNodeStyleRenderer#isInside - * @see yfiles.styles.GeneralPathNodeStyleRenderer#getIntersection - */ - getShapeGeometry(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.styles.IShapeGeometry; - /** - * Configures the style and node parameters, does not call {@link yfiles.styles.GeneralPathNodeStyleRenderer#configure} and returns - * this. - *

- * Unlike most of the other methods this implementation does not call {@link yfiles.styles.GeneralPathNodeStyleRenderer#configure}. If - * the subclass implementation depends on this instance to be configured, it needs to call Configure in - * {@link yfiles.styles.GeneralPathNodeStyleRenderer#isVisible}. - *

- * @param node The node to query visibility tests. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.GeneralPathNodeStyleRenderer#isVisible - */ - getVisibilityTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisibilityTestable; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.GeneralPathNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the {@link } for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.GeneralPathNodeStyleRenderer#createVisual - * @see yfiles.styles.GeneralPathNodeStyleRenderer#updateVisual - */ - getVisualCreator(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisualCreator; - /** - * - * @param context - * @param location - * @returns - */ - isHit(context:yfiles.input.IInputModeContext,location:yfiles.geometry.Point):boolean; - /** - * - * @param context - * @param rectangle - * @returns - */ - isInBox(context:yfiles.input.IInputModeContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * - * @param location - * @returns - */ - isInside(location:yfiles.geometry.Point):boolean; - /** - * Determines visibility by checking for an intersection with the {@link yfiles.styles.GeneralPathNodeStyleRenderer#layout}. - * @param context The context. - * @param rectangle The current clip - * @returns Whether the {@link #layout} is visible in the clip. - */ - isVisible(context:yfiles.view.ICanvasContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Implements the {@link yfiles.graph.ILookup} interface. - *

- * This method will be used by default if {@link yfiles.styles.GeneralPathNodeStyleRenderer#getContext} has been queried for a - * lookup implementation. Note that it cannot be assumed that {@link yfiles.styles.GeneralPathNodeStyleRenderer#configure} has - * already been invoked. However, normally {@link yfiles.styles.GeneralPathNodeStyleRenderer#node} and {@link yfiles.styles.GeneralPathNodeStyleRenderer#style} will be correctly configured if invoked directly after GetContext. - * Subclass implementations should make sure to configure this instance before they return this as a result of a successful - * lookup. This implementation will check if type.IsInstanceOfType(this) and will call {@link yfiles.styles.GeneralPathNodeStyleRenderer#configure} - * on success and return this. - *

- * @param type The type to query for. - * @returns An implementation or null. - */ - lookup(type:yfiles.lang.Class):any; - /** - * - * @param context - * @param oldVisual - * @returns - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual):yfiles.view.Visual; - /** - * Gets or sets the currently configured style. - * @protected - * @type {yfiles.styles.GeneralPathNodeStyle} - */ - style:yfiles.styles.GeneralPathNodeStyle; - /** - * Gets or sets the currently configured node. - * @protected - * @type {yfiles.graph.INode} - */ - node:yfiles.graph.INode; - /** - * Gets the {@link yfiles.graph.INode#layout} of the node this renderer is currently configured for. - *

- * Returns Node.Layout. - *

- * @type {yfiles.geometry.IRectangle} - */ - layout:yfiles.geometry.IRectangle; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.GeneralPathNodeStyleRenderer; - } - /** - * An abstract base class for {@link yfiles.styles.IEdgeStyleRenderer} implementations that are based on the calculation of a - * {@link yfiles.geometry.GeneralPath}. - * Type parameter TStyle: The exact type of style to use for this instance. - * @class - * @implements {yfiles.styles.IEdgeStyleRenderer} - * @implements {yfiles.styles.IPathGeometry} - * @implements {yfiles.view.IBoundsProvider} - * @implements {yfiles.view.IVisibilityTestable} - * @implements {yfiles.input.IMarqueeTestable} - * @implements {yfiles.input.IHitTestable} - * @implements {yfiles.graph.ILookup} - * @implements {yfiles.view.IVisualCreator} - * @implements {yfiles.view.IObstacleProvider} - * @template TStyle - */ - export interface PathBasedEdgeStyleRenderer extends yfiles.lang.Object,yfiles.styles.IEdgeStyleRenderer,yfiles.styles.IPathGeometry,yfiles.view.IBoundsProvider,yfiles.view.IVisibilityTestable,yfiles.input.IMarqueeTestable,yfiles.input.IHitTestable,yfiles.graph.ILookup,yfiles.view.IVisualCreator,yfiles.view.IObstacleProvider{} - export class PathBasedEdgeStyleRenderer { - /** - * - * @param edgeStyleType The exact type of style to use for this instance. - */ - constructor(edgeStyleType:yfiles.lang.Class); - /** - * Prepares this instance for subsequent calls after the style and edge have been initialized. - *

- * Upon invocation the {@link yfiles.styles.PathBasedEdgeStyleRenderer.#style} and {@link yfiles.styles.PathBasedEdgeStyleRenderer.#edge} properties have been populated by the {@link yfiles.styles.PathBasedEdgeStyleRenderer.#getVisualCreator}, {@link yfiles.styles.PathBasedEdgeStyleRenderer.#getBoundsProvider}, {@link yfiles.styles.PathBasedEdgeStyleRenderer.#getHitTestable}, - * or {@link yfiles.styles.PathBasedEdgeStyleRenderer.#getMarqueeTestable} methods. - *

- *

- * Subclasses which override this method have to call the base implementation, first. - *

- * @protected - */ - configure():void; - /** - * This method should create the basic uncropped path given the control points. - * @returns A path that has to be cropped, yet. - * @protected - * @abstract - */ - createPath():yfiles.geometry.GeneralPath; - /** - * Static utility method that creates a rectangular self loop path. - * @param sx The x coordinate of the source port. - * @param sy The y coordinate of the source port. - * @param oppositeX The x coordinate of the single control point. - * @param oppositeY The y coordinate of the single control point. - * @param tx The x coordinate of the target port. - * @param ty The y coordinate of the target port. - * @returns A path that describes a rectangular self loop. - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#createSelfLoopPath - * @protected - * @static - */ - static createRectangleSelfLoop(sx:number,sy:number,oppositeX:number,oppositeY:number,tx:number,ty:number):yfiles.geometry.GeneralPath; - /** - * Static utility method that creates a round self loop path. - * @param sx The x coordinate of the source port. - * @param sy The y coordinate of the source port. - * @param oppositeX The x coordinate of the single control point. - * @param oppositeY The y coordinate of the single control point. - * @param tx The x coordinate of the target port. - * @param ty The y coordinate of the target port. - * @returns A path that describes a round self loop. - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#createSelfLoopPath - * @protected - * @static - */ - static createRoundSelfLoop(sx:number,sy:number,oppositeX:number,oppositeY:number,tx:number,ty:number):yfiles.geometry.GeneralPath; - /** - * Special implementation that will create a self loop path. - * @param roundSelfLoop - * @returns - * @protected - */ - createSelfLoopPath(roundSelfLoop:boolean):yfiles.geometry.GeneralPath; - /** - * - * @param context - * @returns - */ - createVisual(context:yfiles.view.IRenderContext):yfiles.view.Visual; - /** - * Crops the edge's path at the nodes. - *

- * This implementation uses the {@link yfiles.styles.IEdgePathCropper} instances found in the {@link yfiles.graph.ILookup#lookup} of the - * source and target port of the edge to perform the actual cropping. - *

- * @param path The path that should be cropped. - * @returns The cropped path. This is can be either the same instance of the given path or a newly created instance. - * @protected - */ - cropPath(path:yfiles.geometry.GeneralPath):yfiles.geometry.GeneralPath; - /** - * - * @param context - * @returns - */ - getBounds(context:yfiles.view.ICanvasContext):yfiles.geometry.Rect; - /** - * Configures the style and edge parameters, calls {@link yfiles.styles.PathBasedEdgeStyleRenderer.#configure} and returns this. - * @param edge The edge to retrieve the bounds provider for. The value will be stored in the {@link #edge} property. - * @param style The style to associate with the edge. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#getBounds - */ - getBoundsProvider(edge:yfiles.graph.IEdge,style:yfiles.styles.IEdgeStyle):yfiles.view.IBoundsProvider; - /** - * Yields the {@link yfiles.view.IBridgeCreator} to use for {@link yfiles.styles.PathBasedEdgeStyleRenderer.#addBridges adding bridges} to the {@link yfiles.styles.PathBasedEdgeStyleRenderer.#createPath created path}. - *

- * The return value of this method (which may be null) will be passed to the {@link yfiles.view.BridgeManager}'s {@link yfiles.view.BridgeManager#addBridges} - * method. - *

- * @returns This implementation returns null. - * @protected - */ - getBridgeCreator():yfiles.view.IBridgeCreator; - /** - * Configures the style and edge parameters, does not call {@link yfiles.styles.PathBasedEdgeStyleRenderer.#configure} and returns this. - *

- * As this method may be called often it will not automatically call {@link yfiles.styles.PathBasedEdgeStyleRenderer.#configure}, instead subclasses should ensure that in - * the {@link yfiles.styles.PathBasedEdgeStyleRenderer.#lookup} method call they should call {@link yfiles.styles.PathBasedEdgeStyleRenderer.#configure} only if needed, i.e. if they decide to return this or an instance - * that depends on a correctly configured this. - *

- * @param edge The edge to query the context for. The value will be stored in the {@link #edge} property. - * @param style The style to associate with the edge. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#lookup - */ - getContext(edge:yfiles.graph.IEdge,style:yfiles.styles.IEdgeStyle):yfiles.graph.ILookup; - /** - * Configures the style and edge parameters and returns this. - *

- * This implementation does not call {@link yfiles.styles.PathBasedEdgeStyleRenderer.#configure}. If subclasses depend on a configured instance in an override of {@link yfiles.styles.PathBasedEdgeStyleRenderer.#isHit}, - * they need to override this method, too and call {@link yfiles.styles.PathBasedEdgeStyleRenderer.#configure} if the base call returns a non-null value. - *

- * @param edge - * @param style - * @returns - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#isHit - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#configure - * @see yfiles.styles.IEdgeStyleRenderer#getHitTestable - */ - getHitTestable(edge:yfiles.graph.IEdge,style:yfiles.styles.IEdgeStyle):yfiles.input.IHitTestable; - /** - * Configures the style and edge parameters, calls {@link yfiles.styles.PathBasedEdgeStyleRenderer.#configure} and returns this. - * @param edge The edge to query marquee intersection tests. The value will be stored in the {@link #edge} property. - * @param style The style to associate with the edge. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#isInBox - */ - getMarqueeTestable(edge:yfiles.graph.IEdge,style:yfiles.styles.IEdgeStyle):yfiles.input.IMarqueeTestable; - /** - * Returns {@link yfiles.styles.PathBasedEdgeStyleRenderer.#createPath} unless {@link yfiles.styles.PathBasedEdgeStyleRenderer.#isVisible} yields false for the provided context and {@link yfiles.view.IRenderContext#clip}. - * @param context The context to yield the obstacles for. - * @returns Either null or the result of {@link #createPath}. - * @see yfiles.view.IObstacleProvider - */ - getObstacles(context:yfiles.view.IRenderContext):yfiles.geometry.GeneralPath; - /** - * - * @returns - */ - getPath():yfiles.geometry.GeneralPath; - /** - * Gets an implementation of the {@link yfiles.styles.IPathGeometry} interface that can handle the provided edge and its associated - * style. - * @param edge The edge to provide an instance for - * @param style The style to use for the painting - * @returns this - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#configure - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#getTangent - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#getTangent - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#getSegmentCount - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#getPath - */ - getPathGeometry(edge:yfiles.graph.IEdge,style:yfiles.styles.IEdgeStyle):yfiles.styles.IPathGeometry; - /** - * Returns the number of "segments" this edge's path consists of. - *

- * This method is part of the {@link yfiles.styles.IPathGeometry} interface, that is implemented by this class. This interface will - * be returned by {@link yfiles.styles.PathBasedEdgeStyleRenderer.#getPathGeometry}. - *

- * @returns the number of segments or -1 if there is no such thing as a segment for this edge. - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#getPathGeometry - * @abstract - */ - getSegmentCount():number; - /** - * Gets the value that determines the radius of the smoothing arcs that can be added to the path at the bends. - *

- * This implementation returns 0.0d, which effectively turns off path smoothing. - *

- * @returns The radius of the arcs to use at the bends of the path. - * @protected - */ - getSmoothingLength():number; - /** - * Gets the source arrow from the style. - * @returns The arrow to use. - * @protected - * @abstract - */ - getSourceArrow():yfiles.styles.IArrow; - /** - * Calculate and update the anchor and the source arrow's direction vector. - * @param arrow The arrow to calculate the anchor for. - * @returns The anchor and directional vector of the arrow, if any exist. - * @protected - */ - getSourceArrowAnchor(arrow:yfiles.styles.IArrow):yfiles.geometry.Tangent; - /** - * Gets the {@link yfiles.view.Stroke} to use to render the path. - * @returns The {@link } or null. - * @protected - * @abstract - */ - getStroke():yfiles.view.Stroke; - /** - * Calculates the tangent on the edge's path at the given ratio point for the given segment. - *

- * This method is part of the {@link yfiles.styles.IPathGeometry} interface, that is implemented by this class. This interface will - * be returned by {@link yfiles.styles.PathBasedEdgeStyleRenderer.#getPathGeometry}. - *

- * @param segmentIndex the segment to use for the calculation - * @param ratio a value in [0,1] where 0 is the source's end and 1 is at the target's end of the segment - * @returns The tangential line, if any exists. - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#getTangent - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#getSegmentCount - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#getPathGeometry - * @abstract - */ - getTangent(segmentIndex:number,ratio:number):yfiles.geometry.Tangent; - /** - * Calculates the tangent on the edge's path at the given ratio point. - *

- * This method is part of the {@link yfiles.styles.IPathGeometry} interface, that is implemented by this class. This interface will - * be returned by {@link yfiles.styles.PathBasedEdgeStyleRenderer.#getPathGeometry}. - *

- * @param ratio a value in [0,1] where 0 is the source's end and 1 is at the target's end of the visible edge path - * @returns The tangential line, if any exists. - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#getPathGeometry - * @abstract - */ - getTangent(ratio:number):yfiles.geometry.Tangent; - /** - * Gets the target arrow from the style. - * @returns The arrow to use. - * @protected - * @abstract - */ - getTargetArrow():yfiles.styles.IArrow; - /** - * Calculate and update the anchor and the target arrow's direction vector. - * @param arrow The arrow to calculate the anchor for. - * @returns The anchor and directional vector of the arrow, if any exist. - * @protected - */ - getTargetArrowAnchor(arrow:yfiles.styles.IArrow):yfiles.geometry.Tangent; - /** - * Configures the style and edge parameters, does not call {@link yfiles.styles.PathBasedEdgeStyleRenderer.#configure} and returns this. - *

- * Unlike most of the other methods this implementation does not call {@link yfiles.styles.PathBasedEdgeStyleRenderer.#configure}. If the subclass implementation depends on - * this instance to be configured, it needs to call Configure in {@link yfiles.styles.PathBasedEdgeStyleRenderer.#isVisible}. - *

- * @param edge The edge to query visibility tests. The value will be stored in the {@link #edge} property. - * @param style The style to associate with the edge. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#isVisible - */ - getVisibilityTestable(edge:yfiles.graph.IEdge,style:yfiles.styles.IEdgeStyle):yfiles.view.IVisibilityTestable; - /** - * Configures the style and edge parameters, calls {@link yfiles.styles.PathBasedEdgeStyleRenderer.#configure} and returns this. - * @param edge The edge to retrieve the {@link } for. The value will be stored in the {@link #edge} property. - * @param style The style to associate with the edge. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#createVisual - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#updateVisual - */ - getVisualCreator(edge:yfiles.graph.IEdge,style:yfiles.styles.IEdgeStyle):yfiles.view.IVisualCreator; - /** - * This method is overridden for performance reasons. - *

- * This implementation uses {@link yfiles.styles.PathBasedEdgeStyleRenderer.#isVisible} as an early exit indicator. If IsVisible returns false for a certain rectangle, the - * instance will not be configured but a non-hit will be assumed. Otherwise this instance will be configured and the - * standard path based hit test routine - *
- * Subclasses should not depend on the fact that {@link yfiles.styles.PathBasedEdgeStyleRenderer.#configure} has already been called. This may not be the case. If your - * subclass depends on Configure being called, override {@link yfiles.styles.PathBasedEdgeStyleRenderer.#getHitTestable} and call {@link yfiles.styles.PathBasedEdgeStyleRenderer.#configure} after the base class call. - *

- * @param context - * @param location - * @returns - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#getHitTestable - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#configure - */ - isHit(context:yfiles.input.IInputModeContext,location:yfiles.geometry.Point):boolean; - /** - * - * @param context - * @param rectangle - * @returns - */ - isInBox(context:yfiles.input.IInputModeContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Calls {@link yfiles.styles.PathBasedEdgeStyleRenderer.#configure} and test the {@link yfiles.styles.PathBasedEdgeStyleRenderer.#edge} using the {@link yfiles.styles.PathBasedEdgeStyleRenderer.#style} for a visible intersection with the clip bounds. - *

- * This simple implementation uses {@link yfiles.styles.PathBasedEdgeStyleRenderer.#getBounds} to determine the visibility. Subclasses may choose to override this behavior - * for improved performance but need to make sure to call {@link yfiles.styles.PathBasedEdgeStyleRenderer.#configure} if they depend on a configured instance. - *

- * @param context the current canvas context - * @param rectangle the clip bounds - * @returns true if the edge may be painted within the clip bounds. - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#getVisibilityTestable - */ - isVisible(context:yfiles.view.ICanvasContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * - * @param type - * @returns - */ - lookup(type:yfiles.lang.Class):any; - /** - * - * @param context - * @param oldVisual - * @returns - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual):yfiles.view.Visual; - /** - * The path instance that this instance is working with. - * @protected - * @type {yfiles.geometry.GeneralPath} - */ - path:yfiles.geometry.GeneralPath; - /** - * Gets or sets the currently configured style. - * @protected - * @type {TStyle} - */ - style:TStyle; - /** - * Gets or sets the currently configured edge. - * @protected - * @type {yfiles.graph.IEdge} - */ - edge:yfiles.graph.IEdge; - /** - * Gets whether the rendered path should use the {@link yfiles.view.BridgeManager} to {@link yfiles.view.BridgeManager#addBridges add bridges to it.} - * @see yfiles.styles.PathBasedEdgeStyleRenderer.#getBridgeCreator - * @protected - * @type {boolean} - */ - addBridges:boolean; - /** - * Gets or sets the distance between the node's layout and its self loop control points. - * @type {number} - */ - selfLoopDistance:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.PathBasedEdgeStyleRenderer; - } - /** - * An {@link yfiles.styles.IEdgeStyleRenderer} that will render {@link yfiles.styles.PolylineEdgeStyle} instances. - * @class - * @extends {yfiles.styles.PathBasedEdgeStyleRenderer.} - */ - export interface PolylineEdgeStyleRenderer extends yfiles.styles.PathBasedEdgeStyleRenderer{} - export class PolylineEdgeStyleRenderer { - constructor(); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.PolylineEdgeStyleRenderer; - } - /** - * A polygonal {@link yfiles.styles.IEdgeStyle} where straight line segments are used to connect the bends. - * @class - * @implements {yfiles.styles.IEdgeStyle} - */ - export interface PolylineEdgeStyle extends yfiles.lang.Object,yfiles.styles.IEdgeStyle{} - export class PolylineEdgeStyle { - /** - * Creates a new instance using the provided renderer. - * @param renderer The custom renderer for this style instance. - */ - constructor(renderer:yfiles.styles.PolylineEdgeStyleRenderer); - /** - * Creates a new instance using the provided renderer. - * @param {Object} options The parameters to pass. - * @param options.renderer The custom renderer for this style instance. - * @param {yfiles.view.Stroke} options.stroke The {@link yfiles.styles.PolylineEdgeStyle#stroke} for the line. - *

- * This option sets the {@link yfiles.styles.PolylineEdgeStyle#stroke} property on the created object. - *

- * @param {number} options.smoothingLength The smoothing length used for creating smooth bends. - *

- * This option sets the {@link yfiles.styles.PolylineEdgeStyle#smoothingLength} property on the created object. - *

- * @param {yfiles.styles.IArrow} options.sourceArrow The visual arrow at the source end of edges that use this style. - *

- * This option sets the {@link yfiles.styles.PolylineEdgeStyle#sourceArrow} property on the created object. - *

- * @param {yfiles.styles.IArrow} options.targetArrow The visual arrow at the target end of edges that use this style. - *

- * This option sets the {@link yfiles.styles.PolylineEdgeStyle#targetArrow} property on the created object. - *

- */ - constructor(options:{renderer:yfiles.styles.PolylineEdgeStyleRenderer,stroke?:yfiles.view.Stroke,smoothingLength?:number,sourceArrow?:yfiles.styles.IArrow,targetArrow?:yfiles.styles.IArrow}); - /** - * Creates a new instance using {@link yfiles.styles.PolylineEdgeStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {yfiles.view.Stroke} options.stroke The {@link yfiles.styles.PolylineEdgeStyle#stroke} for the line. - *

- * This option sets the {@link yfiles.styles.PolylineEdgeStyle#stroke} property on the created object. - *

- * @param {number} options.smoothingLength The smoothing length used for creating smooth bends. - *

- * This option sets the {@link yfiles.styles.PolylineEdgeStyle#smoothingLength} property on the created object. - *

- * @param {yfiles.styles.IArrow} options.sourceArrow The visual arrow at the source end of edges that use this style. - *

- * This option sets the {@link yfiles.styles.PolylineEdgeStyle#sourceArrow} property on the created object. - *

- * @param {yfiles.styles.IArrow} options.targetArrow The visual arrow at the target end of edges that use this style. - *

- * This option sets the {@link yfiles.styles.PolylineEdgeStyle#targetArrow} property on the created object. - *

- */ - constructor(options?:{stroke?:yfiles.view.Stroke,smoothingLength?:number,sourceArrow?:yfiles.styles.IArrow,targetArrow?:yfiles.styles.IArrow}); - /** - * Performs a {@link any#memberwiseClone} - * @returns - */ - clone():any; - /** - * Gets or sets the {@link yfiles.styles.PolylineEdgeStyle#stroke} for the line. - *

- * The default value is {@link yfiles.view.Stroke#BLACK}. - *

- * @default 'System.Drawing.Pens.Black' - * @type {yfiles.view.Stroke} - */ - stroke:yfiles.view.Stroke; - /** - * Gets or sets the smoothing length used for creating smooth bends. - *

- * A value of 0.0d will disable smoothing. - *

- *

- * The default value is 0. - *

- * @default 0.0 - * @type {number} - */ - smoothingLength:number; - /** - * Gets or sets the visual arrow at the target end of edges that use this style. - *

- * Arrow instances may be shared between multiple style instances. - *

- *

- * This property may not be null. To have no target arrow set, use {@link yfiles.styles.IArrow#NONE} instead. - *

- *

- * The default value is {@link yfiles.styles.IArrow#NONE}. - *

- * @default 'None' - * @type {yfiles.styles.IArrow} - */ - targetArrow:yfiles.styles.IArrow; - /** - * Gets or sets the visual arrow at the source end of edges that use this style. - *

- * Arrow instances may be shared between multiple style instances. - *

- *

- * This property may not be null. To have no source arrow set, use {@link yfiles.styles.IArrow#NONE} instead. - *

- *

- * The default value is {@link yfiles.styles.IArrow#NONE}. - *

- * @default 'None' - * @type {yfiles.styles.IArrow} - */ - sourceArrow:yfiles.styles.IArrow; - /** - * Gets the renderer implementation that has been supplied to this instance in the constructor. - * @type {yfiles.styles.IEdgeStyleRenderer} - */ - renderer:yfiles.styles.IEdgeStyleRenderer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.PolylineEdgeStyle; - } - export enum ShapeNodeShape{ - /** - * A rectangular shape - */ - RECTANGLE, - /** - * A rectangular shape with rounded edges - */ - ROUND_RECTANGLE, - /** - * An elliptical shape - */ - ELLIPSE, - /** - * A triangular shape that points to the top - */ - TRIANGLE, - /** - * A triangular shape that points to the bottom - */ - TRIANGLE2, - /** - * A rectangle that is sheared in the horizontal direction to the right - */ - SHEARED_RECTANGLE, - /** - * A rectangle that is sheared in the horizontal direction to the left - */ - SHEARED_RECTANGLE2, - /** - * A trapezoid shape that is smaller at the bottom - */ - TRAPEZ, - /** - * A trapezoid shape that is smaller at the top - */ - TRAPEZ2, - /** - * A 5-star shape - */ - STAR5, - /** - * A 6-star shape - */ - STAR6, - /** - * An 8-star shape - */ - STAR8, - /** - * An arrow like shape that points to the right - */ - FAT_ARROW, - /** - * An arrow like shape that points to the left - */ - FAT_ARROW2, - /** - * A symmetric parallelogram shape that has sloped edges - */ - DIAMOND, - /** - * A regular eight-sided shape, - */ - OCTAGON, - /** - * A regular six-sided shape, - */ - HEXAGON - } - /** - * Default renderer implementation that can be used for {@link yfiles.styles.ShapeNodeStyle} instances. - * @class - * @implements {yfiles.styles.INodeStyleRenderer} - * @implements {yfiles.styles.IShapeGeometry} - * @implements {yfiles.view.IBoundsProvider} - * @implements {yfiles.view.IVisibilityTestable} - * @implements {yfiles.input.IMarqueeTestable} - * @implements {yfiles.input.IHitTestable} - * @implements {yfiles.graph.ILookup} - * @implements {yfiles.view.IVisualCreator} - */ - export interface ShapeNodeStyleRenderer extends yfiles.lang.Object,yfiles.styles.INodeStyleRenderer,yfiles.styles.IShapeGeometry,yfiles.view.IBoundsProvider,yfiles.view.IVisibilityTestable,yfiles.input.IMarqueeTestable,yfiles.input.IHitTestable,yfiles.graph.ILookup,yfiles.view.IVisualCreator{} - export class ShapeNodeStyleRenderer { - constructor(); - /** - * Prepares this instance for subsequent calls after the style and node have been initialized. - *

- * Upon invocation the {@link yfiles.styles.ShapeNodeStyleRenderer#style} and {@link yfiles.styles.ShapeNodeStyleRenderer#node} properies have been populated by the {@link yfiles.styles.ShapeNodeStyleRenderer#getVisualCreator}, - * {@link yfiles.styles.ShapeNodeStyleRenderer#getBoundsProvider}, {@link yfiles.styles.ShapeNodeStyleRenderer#getHitTestable}, or {@link yfiles.styles.ShapeNodeStyleRenderer#getMarqueeTestable} - * methods. - *

- *

- * This is an empty implementation. Subclasses might have to override this method. - *

- * @protected - */ - configure():void; - /** - * - * @param context - * @returns - */ - createVisual(context:yfiles.view.IRenderContext):yfiles.view.Visual; - /** - * Returns the layout bounds as an upper bound for the painting bound. - *

- * This implementation simply sets the {@link yfiles.styles.ShapeNodeStyleRenderer#layout}'s bounds to the scratch variable and returns. - *

- * @param context the context to calculate the bounds for - * @returns the bounds or null to indicate an unbound area - */ - getBounds(context:yfiles.view.ICanvasContext):yfiles.geometry.Rect; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.ShapeNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the bounds provider for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ShapeNodeStyleRenderer#getBounds - */ - getBoundsProvider(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IBoundsProvider; - /** - * Configures the style and node parameters, does not call {@link yfiles.styles.ShapeNodeStyleRenderer#configure} and returns this. - *

- * As this method may be called often it will not automatically call {@link yfiles.styles.ShapeNodeStyleRenderer#configure}, - * instead subclasses should ensure that in the {@link yfiles.styles.ShapeNodeStyleRenderer#lookup} method call they should call {@link yfiles.styles.ShapeNodeStyleRenderer#configure} - * only if needed, i.e. if they decide to return this or an instance that depends on a correctly configured this. - *

- * @param node The node to query the context for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ShapeNodeStyleRenderer#lookup - */ - getContext(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.graph.ILookup; - /** - * Get the brush that is currently used by this renderer. - *

- * This implementation retrieves the brush from the owning style - *

- * @returns The brush that is currently used by this renderer. - * @protected - */ - getFill():yfiles.view.Fill; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.ShapeNodeStyleRenderer#configure} and returns this. - * @param node The node to query hit test with. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ShapeNodeStyleRenderer#isHit - */ - getHitTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IHitTestable; - /** - * - * @param inner - * @param outer - * @returns - */ - getIntersection(inner:yfiles.geometry.Point,outer:yfiles.geometry.Point):yfiles.geometry.Point; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.ShapeNodeStyleRenderer#configure} and returns this. - * @param node The node to query marquee intersection tests. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ShapeNodeStyleRenderer#isInBox - */ - getMarqueeTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IMarqueeTestable; - /** - * - * @returns - */ - getOutline():yfiles.geometry.GeneralPath; - /** - * Get the shape that is currently used by this renderer. - *

- * This implementation retrieves the shape from the owning style - *

- * @returns The shape that is currently used by this renderer. - * @protected - */ - getShape():yfiles.styles.ShapeNodeShape; - /** - * Configures the {@link yfiles.styles.ShapeNodeStyleRenderer#style} and {@link yfiles.styles.ShapeNodeStyleRenderer#node} properties, calls {@link yfiles.styles.ShapeNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the shape geometry for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ShapeNodeStyleRenderer#isInside - * @see yfiles.styles.ShapeNodeStyleRenderer#getIntersection - */ - getShapeGeometry(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.styles.IShapeGeometry; - /** - * Get the pen that is currently used by this renderer. - *

- * This implementation retrieves the {@link yfiles.view.Stroke} from the owning style - *

- * @returns The {@link } that is currently used by this renderer. - * @protected - */ - getStroke():yfiles.view.Stroke; - /** - * Configures the style and node parameters, does not call {@link yfiles.styles.ShapeNodeStyleRenderer#configure} and returns this. - *

- * Unlike most of the other methods this implementation does not call {@link yfiles.styles.ShapeNodeStyleRenderer#configure}. If the - * subclass implementation depends on this instance to be configured, it needs to call Configure in - * {@link yfiles.styles.ShapeNodeStyleRenderer#isVisible}. - *

- * @param node The node to query visibility tests. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ShapeNodeStyleRenderer#isVisible - */ - getVisibilityTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisibilityTestable; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.ShapeNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the {@link } for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ShapeNodeStyleRenderer#createVisual - * @see yfiles.styles.ShapeNodeStyleRenderer#updateVisual - */ - getVisualCreator(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisualCreator; - /** - * - * @param context - * @param location - * @returns - */ - isHit(context:yfiles.input.IInputModeContext,location:yfiles.geometry.Point):boolean; - /** - * Tests the {@link yfiles.styles.ShapeNodeStyleRenderer#node node} using the current {@link yfiles.styles.ShapeNodeStyleRenderer#style} for an intersection with the given box. - *

- * This implementation uses the {@link yfiles.styles.ShapeNodeStyleRenderer#layout} to determine whether the node is in the box. - *

- * @param context the current input mode context - * @param rectangle the box describing the marquee's bounds - * @returns true if the node is considered to be captured by the marquee - */ - isInBox(context:yfiles.input.IInputModeContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * - * @param location - * @returns - */ - isInside(location:yfiles.geometry.Point):boolean; - /** - * Determines visibility by checking for an intersection with the {@link yfiles.styles.ShapeNodeStyleRenderer#layout}. - * @param context The context. - * @param rectangle The current clip - * @returns Whether the {@link #layout} is visible in the clip. - */ - isVisible(context:yfiles.view.ICanvasContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Implements the {@link yfiles.graph.ILookup} interface. - *

- * This method will be used by default if {@link yfiles.styles.ShapeNodeStyleRenderer#getContext} has been queried for a lookup - * implementation. Note that it cannot be assumed that {@link yfiles.styles.ShapeNodeStyleRenderer#configure} has already been - * invoked. However, normally {@link yfiles.styles.ShapeNodeStyleRenderer#node} and {@link yfiles.styles.ShapeNodeStyleRenderer#style} will be correctly configured if invoked directly after GetContext. Subclass - * implementations should make sure to configure this instance before they return this as a result of a successful lookup. - * This implementation will check if type.IsInstanceOfType(this) and will call {@link yfiles.styles.ShapeNodeStyleRenderer#configure} - * on success and return this. - *

- * @param type The type to query for. - * @returns An implementation or null. - */ - lookup(type:yfiles.lang.Class):any; - /** - * - * @param context - * @param oldVisual - * @returns - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual):yfiles.view.Visual; - /** - * Gets or sets the currently configured style. - * @protected - * @type {yfiles.styles.ShapeNodeStyle} - */ - style:yfiles.styles.ShapeNodeStyle; - /** - * Gets or sets the currently configured node. - * @protected - * @type {yfiles.graph.INode} - */ - node:yfiles.graph.INode; - /** - * Gets the {@link yfiles.graph.INode#layout} of the node this renderer is currently configured for. - *

- * Returns Node.Layout. - *

- * @type {yfiles.geometry.IRectangle} - */ - layout:yfiles.geometry.IRectangle; - /** - * Gets or sets the radius that is used to draw rounded edges. - * @type {number} - */ - roundRectArcRadius:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.ShapeNodeStyleRenderer; - } - /** - * Node style implementation that can show predefined shapes of type {@link yfiles.styles.ShapeNodeShape}. - *

- * This style can be used together with {@link yfiles.styles.ShapeNodeStyleRenderer} instances. - *

- * @class - * @implements {yfiles.styles.INodeStyle} - */ - export interface ShapeNodeStyle extends yfiles.lang.Object,yfiles.styles.INodeStyle{} - export class ShapeNodeStyle { - /** - * Creates a new instance using the provided renderer. - * @param renderer Custom renderer instance for this style. - */ - constructor(renderer:yfiles.styles.ShapeNodeStyleRenderer); - /** - * Creates a new instance using the provided renderer. - * @param {Object} options The parameters to pass. - * @param options.renderer Custom renderer instance for this style. - * @param {yfiles.view.Fill} options.fill The {@link yfiles.styles.ShapeNodeStyle#fill} for this style. - *

- * This option sets the {@link yfiles.styles.ShapeNodeStyle#fill} property on the created object. - *

- * @param {yfiles.view.Stroke} options.stroke The {@link yfiles.styles.ShapeNodeStyle#stroke} for this style. - *

- * This option sets the {@link yfiles.styles.ShapeNodeStyle#stroke} property on the created object. - *

- * @param {yfiles.styles.ShapeNodeShape} options.shape The shape for this style. - *

- * This option sets the {@link yfiles.styles.ShapeNodeStyle#shape} property on the created object. - *

- */ - constructor(options:{renderer:yfiles.styles.ShapeNodeStyleRenderer,fill?:yfiles.view.Fill,stroke?:yfiles.view.Stroke,shape?:yfiles.styles.ShapeNodeShape}); - /** - * Creates a new instance using {@link yfiles.styles.ShapeNodeStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {yfiles.view.Fill} options.fill The {@link yfiles.styles.ShapeNodeStyle#fill} for this style. - *

- * This option sets the {@link yfiles.styles.ShapeNodeStyle#fill} property on the created object. - *

- * @param {yfiles.view.Stroke} options.stroke The {@link yfiles.styles.ShapeNodeStyle#stroke} for this style. - *

- * This option sets the {@link yfiles.styles.ShapeNodeStyle#stroke} property on the created object. - *

- * @param {yfiles.styles.ShapeNodeShape} options.shape The shape for this style. - *

- * This option sets the {@link yfiles.styles.ShapeNodeStyle#shape} property on the created object. - *

- */ - constructor(options?:{fill?:yfiles.view.Fill,stroke?:yfiles.view.Stroke,shape?:yfiles.styles.ShapeNodeShape}); - /** - * - * @returns - */ - clone():any; - /** - * Gets or sets the {@link yfiles.styles.ShapeNodeStyle#stroke} for this style. - *

- * The default value is {@link yfiles.view.Stroke#BLACK}. - *

- * @default 'System.Drawing.Pens.Black' - * @type {yfiles.view.Stroke} - */ - stroke:yfiles.view.Stroke; - /** - * Gets or sets the {@link yfiles.styles.ShapeNodeStyle#fill} for this style. - *

- * The default value is {@link yfiles.view.Fill#WHITE}. - *

- * @default 'System.Drawing.Brushes.White' - * @type {yfiles.view.Fill} - */ - fill:yfiles.view.Fill; - /** - * Gets or sets the shape for this style. - *

- * The default value is {@link yfiles.styles.ShapeNodeShape#RECTANGLE}. - *

- * @default yfiles.styles.ShapeNodeShape.RECTANGLE - * @type {yfiles.styles.ShapeNodeShape} - */ - shape:yfiles.styles.ShapeNodeShape; - /** - * - * @type {yfiles.styles.INodeStyleRenderer} - */ - renderer:yfiles.styles.INodeStyleRenderer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.ShapeNodeStyle; - } - /** - * Default renderer implementation for {@link yfiles.styles.ArcEdgeStyle} - * @class - * @extends {yfiles.styles.PathBasedEdgeStyleRenderer.} - */ - export interface ArcEdgeStyleRenderer extends yfiles.styles.PathBasedEdgeStyleRenderer{} - export class ArcEdgeStyleRenderer { - constructor(); - /** - * Retrieves the {@link yfiles.styles.ArcEdgeStyle#height} of the style. - * @returns the height. - */ - getHeight():number; - /** - * Gets a value indicating whether this {@link yfiles.styles.ArcEdgeStyleRenderer#getHeight} should be interpreted as an absolute - * or relative value. - * @returns true if the height value should be interpreted as a fixed value, otherwise, false. - * @see yfiles.styles.ArcEdgeStyleRenderer#getHeight - */ - isFixedHeight():boolean; - /** - * Gets whether bridges are added to the edge path. - *

- * Overridden to return false since the flattening interferes with its own obstacles. - *

- * @protected - * @type {boolean} - */ - addBridges:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.ArcEdgeStyleRenderer; - } - /** - * Provides an arc representation for an edge. - *

- * The rendering does not take into account bends of an edge, instead the arc's height is determined as a fixed ratio or - * fixed height. - *

- *

- * This style uses an {@link yfiles.styles.ArcEdgeStyleRenderer} for its visualization. - *

- * @class - * @implements {yfiles.styles.IEdgeStyle} - */ - export interface ArcEdgeStyle extends yfiles.lang.Object,yfiles.styles.IEdgeStyle{} - export class ArcEdgeStyle { - /** - * Creates a new instance using the provided renderer. - * @param renderer The custom renderer for this style instance. - */ - constructor(renderer:yfiles.styles.ArcEdgeStyleRenderer); - /** - * Creates a new instance using the provided renderer. - * @param {Object} options The parameters to pass. - * @param options.renderer The custom renderer for this style instance. - * @param {boolean} options.fixedHeight A value indicating whether this {@link yfiles.styles.ArcEdgeStyle} interprets the {@link yfiles.styles.ArcEdgeStyle#height} value as an absolute or relative value. - *

- * This option sets the {@link yfiles.styles.ArcEdgeStyle#fixedHeight} property on the created object. - *

- * @param {number} options.height The "height" of the arc. - *

- * This option sets the {@link yfiles.styles.ArcEdgeStyle#height} property on the created object. - *

- * @param {yfiles.view.Stroke} options.stroke The {@link yfiles.styles.ArcEdgeStyle#stroke} that is used to draw the arc - *

- * This option sets the {@link yfiles.styles.ArcEdgeStyle#stroke} property on the created object. - *

- * @param {boolean} options.provideHeightHandle A value indicating whether the {@link yfiles.styles.ArcEdgeStyleRenderer} should provide an {@link yfiles.input.IHandle} if queried for the {@link yfiles.input.IHandleProvider} implementation that allows for adjusting the {@link yfiles.styles.ArcEdgeStyle#height} of this instance. - *

- * This option sets the {@link yfiles.styles.ArcEdgeStyle#provideHeightHandle} property on the created object. - *

- * @param {yfiles.styles.IArrow} options.sourceArrow The visual arrow at the source end of edges that use this style. - *

- * This option sets the {@link yfiles.styles.ArcEdgeStyle#sourceArrow} property on the created object. - *

- * @param {yfiles.styles.IArrow} options.targetArrow The visual arrow at the target end of edges that use this style. - *

- * This option sets the {@link yfiles.styles.ArcEdgeStyle#targetArrow} property on the created object. - *

- */ - constructor(options:{renderer:yfiles.styles.ArcEdgeStyleRenderer,fixedHeight?:boolean,height?:number,stroke?:yfiles.view.Stroke,provideHeightHandle?:boolean,sourceArrow?:yfiles.styles.IArrow,targetArrow?:yfiles.styles.IArrow}); - /** - * Creates a new instance using {@link yfiles.styles.ArcEdgeStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {boolean} options.fixedHeight A value indicating whether this {@link yfiles.styles.ArcEdgeStyle} interprets the {@link yfiles.styles.ArcEdgeStyle#height} value as an absolute or relative value. - *

- * This option sets the {@link yfiles.styles.ArcEdgeStyle#fixedHeight} property on the created object. - *

- * @param {number} options.height The "height" of the arc. - *

- * This option sets the {@link yfiles.styles.ArcEdgeStyle#height} property on the created object. - *

- * @param {yfiles.view.Stroke} options.stroke The {@link yfiles.styles.ArcEdgeStyle#stroke} that is used to draw the arc - *

- * This option sets the {@link yfiles.styles.ArcEdgeStyle#stroke} property on the created object. - *

- * @param {boolean} options.provideHeightHandle A value indicating whether the {@link yfiles.styles.ArcEdgeStyleRenderer} should provide an {@link yfiles.input.IHandle} if queried for the {@link yfiles.input.IHandleProvider} implementation that allows for adjusting the {@link yfiles.styles.ArcEdgeStyle#height} of this instance. - *

- * This option sets the {@link yfiles.styles.ArcEdgeStyle#provideHeightHandle} property on the created object. - *

- * @param {yfiles.styles.IArrow} options.sourceArrow The visual arrow at the source end of edges that use this style. - *

- * This option sets the {@link yfiles.styles.ArcEdgeStyle#sourceArrow} property on the created object. - *

- * @param {yfiles.styles.IArrow} options.targetArrow The visual arrow at the target end of edges that use this style. - *

- * This option sets the {@link yfiles.styles.ArcEdgeStyle#targetArrow} property on the created object. - *

- */ - constructor(options?:{fixedHeight?:boolean,height?:number,stroke?:yfiles.view.Stroke,provideHeightHandle?:boolean,sourceArrow?:yfiles.styles.IArrow,targetArrow?:yfiles.styles.IArrow}); - /** - * Performs a {@link any#memberwiseClone} - * @returns - */ - clone():any; - /** - * Gets or sets the {@link yfiles.styles.ArcEdgeStyle#stroke} that is used to draw the arc - *

- * The default value is {@link yfiles.view.Stroke#BLACK}. - *

- * @default 'System.Drawing.Pens.Black' - * @type {yfiles.view.Stroke} - */ - stroke:yfiles.view.Stroke; - /** - * Gets or sets the "height" of the arc. - *

- * Depending on the setting of {@link yfiles.styles.ArcEdgeStyle#fixedHeight}, this value is interpreted differently: If {@link yfiles.styles.ArcEdgeStyle#fixedHeight} is disabled, the height of the arc will depend - * on it's width. The width will be multiplied by this value to obtain the height. If the {@link yfiles.styles.ArcEdgeStyle#fixedHeight} feature is enabled, this value - * will be interpreted as the absolute height. - *

- *

- * The default value is 0. - *

- * @default 0 - * @type {number} - */ - height:number; - /** - * Gets or sets a value indicating whether this {@link yfiles.styles.ArcEdgeStyle} interprets the {@link yfiles.styles.ArcEdgeStyle#height} value as an absolute or relative - * value. - *

- * The default value is true. - *

- * @see yfiles.styles.ArcEdgeStyle#height - * @default true - * @type {boolean} - */ - fixedHeight:boolean; - /** - * Gets or sets a value indicating whether the {@link yfiles.styles.ArcEdgeStyleRenderer} should provide an {@link yfiles.input.IHandle} if - * queried for the {@link yfiles.input.IHandleProvider} implementation that allows for adjusting the {@link yfiles.styles.ArcEdgeStyle#height} of this instance. - *

- * The default value is true. - *

- * @default true - * @type {boolean} - */ - provideHeightHandle:boolean; - /** - * Gets or sets the visual arrow at the target end of edges that use this style. - *

- * Arrow instances may be shared between multiple style instances. - *

- *

- * The default value is {@link yfiles.styles.IArrow#NONE}. - *

- * @default 'None' - * @type {yfiles.styles.IArrow} - */ - targetArrow:yfiles.styles.IArrow; - /** - * Gets or sets the visual arrow at the source end of edges that use this style. - *

- * Arrow instances may be shared between multiple style instances. - *

- *

- * The default value is {@link yfiles.styles.IArrow#NONE}. - *

- * @default 'None' - * @type {yfiles.styles.IArrow} - */ - sourceArrow:yfiles.styles.IArrow; - /** - * Gets the renderer implementation that has been supplied to this instance in the constructor. - * @type {yfiles.styles.IEdgeStyleRenderer} - */ - renderer:yfiles.styles.IEdgeStyleRenderer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.ArcEdgeStyle; - } - /** - * A {@link yfiles.styles.INodeStyle} {@link yfiles.styles.INodeStyleRenderer renderer} implementation that draws a rounded rectangle with a bevel border in a 'shiny plate' - * fashion. - * @class - * @implements {yfiles.styles.INodeStyleRenderer} - * @implements {yfiles.styles.IShapeGeometry} - * @implements {yfiles.view.IBoundsProvider} - * @implements {yfiles.view.IVisibilityTestable} - * @implements {yfiles.input.IMarqueeTestable} - * @implements {yfiles.input.IHitTestable} - * @implements {yfiles.graph.ILookup} - * @implements {yfiles.view.IVisualCreator} - */ - export interface BevelNodeStyleRenderer extends yfiles.lang.Object,yfiles.styles.INodeStyleRenderer,yfiles.styles.IShapeGeometry,yfiles.view.IBoundsProvider,yfiles.view.IVisibilityTestable,yfiles.input.IMarqueeTestable,yfiles.input.IHitTestable,yfiles.graph.ILookup,yfiles.view.IVisualCreator{} - export class BevelNodeStyleRenderer { - /** - * Prepares this instance for subsequent calls after the style and node have been initialized. - *

- * Upon invocation the {@link yfiles.styles.BevelNodeStyleRenderer#style} and {@link yfiles.styles.BevelNodeStyleRenderer#node} properties have been populated by the {@link yfiles.styles.BevelNodeStyleRenderer#getVisualCreator}, - * {@link yfiles.styles.BevelNodeStyleRenderer#getBoundsProvider}, {@link yfiles.styles.BevelNodeStyleRenderer#getHitTestable}, or {@link yfiles.styles.BevelNodeStyleRenderer#getMarqueeTestable} - * methods. - *

- *

- * This is an empty implementation. Subclasses might have to override this method. - *

- * @protected - */ - configure():void; - /** - * - * @param context - * @returns - */ - createVisual(context:yfiles.view.IRenderContext):yfiles.view.Visual; - /** - * Returns the layout bounds as an upper bound for the painting bound. - *

- * This implementation simply sets the {@link yfiles.styles.BevelNodeStyleRenderer#layout}'s bounds to the scratch variable and returns. - *

- * @param context the context to calculate the bounds for - * @returns the bounds or null to indicate an unbound area - */ - getBounds(context:yfiles.view.ICanvasContext):yfiles.geometry.Rect; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.BevelNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the bounds provider for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.BevelNodeStyleRenderer#getBounds - */ - getBoundsProvider(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IBoundsProvider; - /** - * Configures the style and node parameters, does not call {@link yfiles.styles.BevelNodeStyleRenderer#configure} and returns this. - *

- * As this method may be called often it will not automatically call {@link yfiles.styles.BevelNodeStyleRenderer#configure}, - * instead subclasses should ensure that in the {@link yfiles.styles.BevelNodeStyleRenderer#lookup} method call they should call {@link yfiles.styles.BevelNodeStyleRenderer#configure} - * only if needed, i.e. if they decide to return this or an instance that depends on a correctly configured this. - *

- * @param node The node to query the context for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.BevelNodeStyleRenderer#lookup - */ - getContext(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.graph.ILookup; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.BevelNodeStyleRenderer#configure} and returns this. - * @param node The node to query hit test with. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.BevelNodeStyleRenderer#isHit - */ - getHitTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IHitTestable; - /** - * - * @param inner - * @param outer - * @returns - */ - getIntersection(inner:yfiles.geometry.Point,outer:yfiles.geometry.Point):yfiles.geometry.Point; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.BevelNodeStyleRenderer#configure} and returns this. - * @param node The node to query marquee intersection tests. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.BevelNodeStyleRenderer#isInBox - */ - getMarqueeTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IMarqueeTestable; - /** - * - * @returns - */ - getOutline():yfiles.geometry.GeneralPath; - /** - * Configures the {@link yfiles.styles.BevelNodeStyleRenderer#style} and {@link yfiles.styles.BevelNodeStyleRenderer#node} properties, calls {@link yfiles.styles.BevelNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the shape geometry for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.BevelNodeStyleRenderer#isInside - * @see yfiles.styles.BevelNodeStyleRenderer#getIntersection - */ - getShapeGeometry(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.styles.IShapeGeometry; - /** - * Configures the style and node parameters, does not call {@link yfiles.styles.BevelNodeStyleRenderer#configure} and returns this. - *

- * Unlike most of the other methods this implementation does not call {@link yfiles.styles.BevelNodeStyleRenderer#configure}. If the - * subclass implementation depends on this instance to be configured, it needs to call Configure in - * {@link yfiles.styles.BevelNodeStyleRenderer#isVisible}. - *

- * @param node The node to query visibility tests. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.BevelNodeStyleRenderer#isVisible - */ - getVisibilityTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisibilityTestable; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.BevelNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the {@link } for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.BevelNodeStyleRenderer#createVisual - * @see yfiles.styles.BevelNodeStyleRenderer#updateVisual - */ - getVisualCreator(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisualCreator; - /** - * - * @param context - * @param location - * @returns - */ - isHit(context:yfiles.input.IInputModeContext,location:yfiles.geometry.Point):boolean; - /** - * Tests the {@link yfiles.styles.BevelNodeStyleRenderer#node node} using the current {@link yfiles.styles.BevelNodeStyleRenderer#style} for an intersection with the given box. - *

- * This implementation uses the {@link yfiles.styles.BevelNodeStyleRenderer#layout} to determine whether the node is in the box. - *

- * @param context the current input mode context - * @param rectangle the box describing the marquee's bounds - * @returns true if the node is considered to be captured by the marquee - */ - isInBox(context:yfiles.input.IInputModeContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * - * @param location - * @returns - */ - isInside(location:yfiles.geometry.Point):boolean; - /** - * Determines visibility by checking for an intersection with the {@link yfiles.styles.BevelNodeStyleRenderer#layout}. - * @param context The context. - * @param rectangle The current clip - * @returns Whether the {@link #layout} is visible in the clip. - */ - isVisible(context:yfiles.view.ICanvasContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * - * @param type - * @returns - */ - lookup(type:yfiles.lang.Class):any; - /** - * - * @param context - * @param oldVisual - * @returns - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual):yfiles.view.Visual; - /** - * Gets or sets the currently configured style. - * @protected - * @type {yfiles.styles.BevelNodeStyle} - */ - style:yfiles.styles.BevelNodeStyle; - /** - * Gets or sets the currently configured node. - * @protected - * @type {yfiles.graph.INode} - */ - node:yfiles.graph.INode; - /** - * Gets the {@link yfiles.graph.INode#layout} of the node this renderer is currently configured for. - *

- * Returns Node.Layout. - *

- * @type {yfiles.geometry.IRectangle} - */ - layout:yfiles.geometry.IRectangle; - /** - * Gets the color from the style. - * @protected - * @type {yfiles.view.Color} - */ - color:yfiles.view.Color; - /** - * Gets the inset from the style. - * @protected - * @type {number} - */ - inset:number; - /** - * Gets the radius to use from the style. - * @protected - * @type {number} - */ - radius:number; - /** - * Gets or sets a property that determines whether this instance should provide an {@link yfiles.input.IHandle} for editing the - * radius of the shape. - *

- * The default is false. This implementation will add an appropriate {@link yfiles.input.IHandleProvider} to the {@link yfiles.styles.BevelNodeStyleRenderer#lookup} - * of this instance if this feature is enabled. - *

- * @default false - * @type {boolean} - */ - provideRadiusHandle:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.BevelNodeStyleRenderer; - } - /** - * An implementation of the {@link yfiles.styles.INodeStyle} that can be used to create rectangular nodes with rounded corners, a - * bevel border, and a shining background. - *

- * Optionally, this style renders a drop shadow by itself. - *

- *

- * This style uses the {@link yfiles.styles.BevelNodeStyleRenderer} to visualize a node. - *

- * @see yfiles.styles.BevelNodeStyleRenderer - * @class - * @implements {yfiles.styles.INodeStyle} - */ - export interface BevelNodeStyle extends yfiles.lang.Object,yfiles.styles.INodeStyle{} - export class BevelNodeStyle { - /** - * Creates a new instance using the provided renderer to share. - * @param renderer - */ - constructor(renderer:yfiles.styles.BevelNodeStyleRenderer); - /** - * Creates a new instance using the provided renderer to share. - * @param {Object} options The parameters to pass. - * @param options.renderer - * @param {yfiles.view.Color} options.color The base color to use. - *

- * This option sets the {@link yfiles.styles.BevelNodeStyle#color} property on the created object. - *

- * @param {boolean} options.drawShadow A value indicating whether to draw a drop shadow. - *

- * This option sets the {@link yfiles.styles.BevelNodeStyle#drawShadow} property on the created object. - *

- * @param {number} options.inset The insets to use for the bevel. - *

- * This option sets the {@link yfiles.styles.BevelNodeStyle#inset} property on the created object. - *

- * @param {number} options.radius The radius of the corner of the rounded rectangle. - *

- * This option sets the {@link yfiles.styles.BevelNodeStyle#radius} property on the created object. - *

- */ - constructor(options:{renderer:yfiles.styles.BevelNodeStyleRenderer,color?:yfiles.view.Color,drawShadow?:boolean,inset?:number,radius?:number}); - /** - * Creates a new instance using {@link yfiles.styles.BevelNodeStyleRenderer} as renderer to share. - * @param {Object} [options=null] The parameters to pass. - * @param {yfiles.view.Color} options.color The base color to use. - *

- * This option sets the {@link yfiles.styles.BevelNodeStyle#color} property on the created object. - *

- * @param {boolean} options.drawShadow A value indicating whether to draw a drop shadow. - *

- * This option sets the {@link yfiles.styles.BevelNodeStyle#drawShadow} property on the created object. - *

- * @param {number} options.inset The insets to use for the bevel. - *

- * This option sets the {@link yfiles.styles.BevelNodeStyle#inset} property on the created object. - *

- * @param {number} options.radius The radius of the corner of the rounded rectangle. - *

- * This option sets the {@link yfiles.styles.BevelNodeStyle#radius} property on the created object. - *

- */ - constructor(options?:{color?:yfiles.view.Color,drawShadow?:boolean,inset?:number,radius?:number}); - /** - * - * @returns - */ - clone():any; - /** - * Gets or sets the insets to use for the bevel. - *

- * The default value is 3. - *

- * @type {number} - */ - inset:number; - /** - * Gets or sets the radius of the corner of the rounded rectangle. - *

- * The default value is 10. - *

- * @type {number} - */ - radius:number; - /** - * Gets or sets the base color to use. - *

- * The default value is {@link yfiles.view.Color#BLACK}. - *

- * @default 'Black' - * @type {yfiles.view.Color} - */ - color:yfiles.view.Color; - /** - * - * @type {yfiles.styles.INodeStyleRenderer} - */ - renderer:yfiles.styles.INodeStyleRenderer; - /** - * Gets or sets a value indicating whether to draw a drop shadow. - *

- * The default value is false. - *

- * @default false - * @type {boolean} - */ - drawShadow:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.BevelNodeStyle; - } - /** - * A style renderer implementation that can be used together with {@link yfiles.styles.ImageNodeStyle} instances. - * @class - * @implements {yfiles.styles.INodeStyleRenderer} - * @implements {yfiles.styles.IShapeGeometry} - * @implements {yfiles.view.IBoundsProvider} - * @implements {yfiles.view.IVisibilityTestable} - * @implements {yfiles.input.IMarqueeTestable} - * @implements {yfiles.input.IHitTestable} - * @implements {yfiles.graph.ILookup} - * @implements {yfiles.view.IVisualCreator} - */ - export interface ImageNodeStyleRenderer extends yfiles.lang.Object,yfiles.styles.INodeStyleRenderer,yfiles.styles.IShapeGeometry,yfiles.view.IBoundsProvider,yfiles.view.IVisibilityTestable,yfiles.input.IMarqueeTestable,yfiles.input.IHitTestable,yfiles.graph.ILookup,yfiles.view.IVisualCreator{} - export class ImageNodeStyleRenderer { - constructor(); - /** - * Prepares this instance for subsequent calls after the style and node have been initialized. - *

- * Upon invocation the {@link yfiles.styles.ImageNodeStyleRenderer#style} and {@link yfiles.styles.ImageNodeStyleRenderer#node} properties have been populated by the {@link yfiles.styles.ImageNodeStyleRenderer#getVisualCreator}, - * {@link yfiles.styles.ImageNodeStyleRenderer#getBoundsProvider}, {@link yfiles.styles.ImageNodeStyleRenderer#getHitTestable}, or {@link yfiles.styles.ImageNodeStyleRenderer#getMarqueeTestable} - * methods. - *

- *

- * This is an empty implementation. Subclasses might have to override this method. - *

- * @protected - */ - configure():void; - /** - * - * @param context - * @returns - */ - createVisual(context:yfiles.view.IRenderContext):yfiles.view.Visual; - /** - * Returns the layout bounds as an upper bound for the painting bound. - *

- * This implementation simply sets the {@link yfiles.styles.ImageNodeStyleRenderer#layout}'s bounds to the scratch variable and returns. - *

- * @param context the context to calculate the bounds for - * @returns the bounds or null to indicate an unbound area - */ - getBounds(context:yfiles.view.ICanvasContext):yfiles.geometry.Rect; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.ImageNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the bounds provider for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ImageNodeStyleRenderer#getBounds - */ - getBoundsProvider(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IBoundsProvider; - /** - * Configures the style and node parameters, does not call {@link yfiles.styles.ImageNodeStyleRenderer#configure} and returns this. - *

- * As this method may be called often it will not automatically call {@link yfiles.styles.ImageNodeStyleRenderer#configure}, - * instead subclasses should ensure that in the {@link yfiles.styles.ImageNodeStyleRenderer#lookup} method call they should call {@link yfiles.styles.ImageNodeStyleRenderer#configure} - * only if needed, i.e. if they decide to return this or an instance that depends on a correctly configured this. - *

- * @param node The node to query the context for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ImageNodeStyleRenderer#lookup - */ - getContext(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.graph.ILookup; - /** - * Get the style's fallback image. - * @returns - * @protected - */ - getFallbackImage():string; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.ImageNodeStyleRenderer#configure} and returns this. - * @param node The node to query hit test with. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ImageNodeStyleRenderer#isHit - */ - getHitTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IHitTestable; - /** - * Get the image that is currently used to render the style. - * @returns - * @protected - */ - getImage():string; - /** - * Tries to use the {@link yfiles.styles.ImageNodeStyle#normalizedOutline} to perform the intersection calculation, otherwise reverts to default (rectangular) behavior. - * @param inner - * @param outer - * @returns - */ - getIntersection(inner:yfiles.geometry.Point,outer:yfiles.geometry.Point):yfiles.geometry.Point; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.ImageNodeStyleRenderer#configure} and returns this. - * @param node The node to query marquee intersection tests. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ImageNodeStyleRenderer#isInBox - */ - getMarqueeTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IMarqueeTestable; - /** - * Tries to use the {@link yfiles.styles.ImageNodeStyle#normalizedOutline} to create the outline shape path, otherwise reverts to default (rectangular) behavior. - * @returns - */ - getOutline():yfiles.geometry.GeneralPath; - /** - * Gets the value that determines whether the aspect ratio of the image should be preserved. - * @returns false - * @protected - */ - getPreserveAspectRatio():boolean; - /** - * Configures the {@link yfiles.styles.ImageNodeStyleRenderer#style} and {@link yfiles.styles.ImageNodeStyleRenderer#node} properties, calls {@link yfiles.styles.ImageNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the shape geometry for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ImageNodeStyleRenderer#isInside - * @see yfiles.styles.ImageNodeStyleRenderer#getIntersection - */ - getShapeGeometry(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.styles.IShapeGeometry; - /** - * Configures the style and node parameters, does not call {@link yfiles.styles.ImageNodeStyleRenderer#configure} and returns this. - *

- * Unlike most of the other methods this implementation does not call {@link yfiles.styles.ImageNodeStyleRenderer#configure}. If the - * subclass implementation depends on this instance to be configured, it needs to call Configure in - * {@link yfiles.styles.ImageNodeStyleRenderer#isVisible}. - *

- * @param node The node to query visibility tests. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ImageNodeStyleRenderer#isVisible - */ - getVisibilityTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisibilityTestable; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.ImageNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the {@link } for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ImageNodeStyleRenderer#createVisual - * @see yfiles.styles.ImageNodeStyleRenderer#updateVisual - */ - getVisualCreator(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisualCreator; - /** - * Tries to use {@link yfiles.styles.ImageNodeStyle#normalizedOutline} to perform the hit test analysis, otherwise reverts to default (rectangular) behavior. - * @param context the context the hit test is performed in - * @param location the coordinates in world coordinate system - * @returns whether something has been hit - */ - isHit(context:yfiles.input.IInputModeContext,location:yfiles.geometry.Point):boolean; - /** - * Tries to use the {@link yfiles.styles.ImageNodeStyle#normalizedOutline} to perform the marquee intersection analysis, otherwise reverts to default (rectangular) behavior. - * @param context - * @param rectangle - * @returns - */ - isInBox(context:yfiles.input.IInputModeContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Tries to use the {@link yfiles.styles.ImageNodeStyle#normalizedOutline} to perform the contains test, otherwise reverts to default (rectangular) behavior. - * @param location - * @returns - */ - isInside(location:yfiles.geometry.Point):boolean; - /** - * Determines visibility by checking for an intersection with the {@link yfiles.styles.ImageNodeStyleRenderer#layout}. - * @param context The context. - * @param rectangle The current clip - * @returns Whether the {@link #layout} is visible in the clip. - */ - isVisible(context:yfiles.view.ICanvasContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Implements the {@link yfiles.graph.ILookup} interface. - *

- * This method will be used by default if {@link yfiles.styles.ImageNodeStyleRenderer#getContext} has been queried for a lookup - * implementation. Note that it cannot be assumed that {@link yfiles.styles.ImageNodeStyleRenderer#configure} has already been - * invoked. However, normally {@link yfiles.styles.ImageNodeStyleRenderer#node} and {@link yfiles.styles.ImageNodeStyleRenderer#style} will be correctly configured if invoked directly after GetContext. Subclass - * implementations should make sure to configure this instance before they return this as a result of a successful lookup. - * This implementation will check if type.IsInstanceOfType(this) and will call {@link yfiles.styles.ImageNodeStyleRenderer#configure} - * on success and return this. - *

- * @param type The type to query for. - * @returns An implementation or null. - */ - lookup(type:yfiles.lang.Class):any; - /** - * - * @param context - * @param oldVisual - * @returns - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual):yfiles.view.Visual; - /** - * Gets or sets the currently configured style. - * @protected - * @type {yfiles.styles.ImageNodeStyle} - */ - style:yfiles.styles.ImageNodeStyle; - /** - * Gets or sets the currently configured node. - * @protected - * @type {yfiles.graph.INode} - */ - node:yfiles.graph.INode; - /** - * Gets the {@link yfiles.graph.INode#layout} of the node this renderer is currently configured for. - *

- * Returns Node.Layout. - *

- * @type {yfiles.geometry.IRectangle} - */ - layout:yfiles.geometry.IRectangle; - /** - * A {@link string} that will be used to find the fallback image url that will be used to render the node, if the style does not - * explicitly specify a {@link yfiles.styles.ImageNodeStyle#fallbackImage fallback image}. - * @const - * @static - * @type {string} - */ - static TEMPLATE_KEY:string; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.ImageNodeStyleRenderer; - } - /** - * A node style that can use an image for the visual representation of a node. - *

- * This style can be used together with {@link yfiles.styles.ImageNodeStyleRenderer} instances. - *

- * @class - * @implements {yfiles.styles.INodeStyle} - */ - export interface ImageNodeStyle extends yfiles.lang.Object,yfiles.styles.INodeStyle{} - export class ImageNodeStyle { - /** - * Creates a new instance that uses the specified image and a custom renderer instance. - * @param image The image. - * @param [fallbackImage=null] The fallback image. - * @param [renderer=null] The renderer for this instance - */ - constructor(image:string,fallbackImage?:string,renderer?:yfiles.styles.ImageNodeStyleRenderer); - /** - * Creates a new instance that uses the specified image and a custom renderer instance. - * @param {Object} options The parameters to pass. - * @param options.image The image. - * @param [options.fallbackImage=null] The fallback image. - * @param [options.renderer=null] The renderer for this instance - * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of the image that will be displayed. - *

- * This option sets the {@link yfiles.styles.ImageNodeStyle#normalizedOutline} property on the created object. - *

- */ - constructor(options:{image:string,fallbackImage?:string,renderer?:yfiles.styles.ImageNodeStyleRenderer,normalizedOutline?:yfiles.geometry.GeneralPath}); - /** - * Creates a new instance with no image and {@link yfiles.styles.ImageNodeStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {string} [options.fallbackImage=null] Sets the fallbackImage property. - * @param {string} options.image The image that is used for the style instance. - *

- * This option sets the {@link yfiles.styles.ImageNodeStyle#image} property on the created object. - *

- * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of the image that will be displayed. - *

- * This option sets the {@link yfiles.styles.ImageNodeStyle#normalizedOutline} property on the created object. - *

- */ - constructor(options?:{fallbackImage?:string,image?:string,normalizedOutline?:yfiles.geometry.GeneralPath}); - /** - * This implementation performs a shallow copy with respect to the {@link yfiles.styles.ImageNodeStyle#image} property. - *

- * If clients need to have a deep copy of this instance, they need to manually clone and reassign the {@link yfiles.styles.ImageNodeStyle#image} to the clone. - *

- * @returns A shallow copy of this instance. - */ - clone():any; - /** - * - * @type {yfiles.styles.INodeStyleRenderer} - */ - renderer:yfiles.styles.INodeStyleRenderer; - /** - * Gets or sets the image that is used for the style instance. - *

- * The default value is null. - *

- * @type {string} - */ - image:string; - /** - * - * @default null - * @type {string} - */ - fallbackImage:string; - /** - * Gets or sets the normalized outline of the image that will be displayed. - *

- * This shape will be used to satisfy requests to {@link yfiles.input.IMarqueeTestable#isInBox} and {@link yfiles.input.IHitTestable#isHit} - * and may be left null to indicate default (rectangular) behavior. - *

- *

- * The default value is null. - *

- * @default null - * @type {yfiles.geometry.GeneralPath} - */ - normalizedOutline:yfiles.geometry.GeneralPath; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.ImageNodeStyle; - } - /** - * An implementation of {@link yfiles.styles.INodeStyle} that draws a simple floating panel with a slight gradient, a thin border - * and optionally a drop shadow. - *

- * This style can be used to create the visual representation for group nodes, for example. By default, it a drop shadow by - * itself. - *

- *

- * This style uses the {@link yfiles.styles.PanelNodeStyleRenderer} to visualize a node. - *

- * @see yfiles.styles.PanelNodeStyleRenderer - * @class - * @implements {yfiles.styles.INodeStyle} - */ - export interface PanelNodeStyle extends yfiles.lang.Object,yfiles.styles.INodeStyle{} - export class PanelNodeStyle { - /** - * Creates a new instance using the provided renderer to share. - * @param renderer - */ - constructor(renderer:yfiles.styles.PanelNodeStyleRenderer); - /** - * Creates a new instance using the provided renderer to share. - * @param {Object} options The parameters to pass. - * @param options.renderer - * @param {yfiles.view.Color} options.color The base color to use. - *

- * This option sets the {@link yfiles.styles.PanelNodeStyle#color} property on the created object. - *

- * @param {yfiles.geometry.Insets} options.insets The instance to use that provides the insets for this style. - *

- * This option sets the {@link yfiles.styles.PanelNodeStyle#insets} property on the created object. - *

- * @param {yfiles.view.Color} options.labelInsetsColor The base color to use for drawing the label insets background. - *

- * This option sets the {@link yfiles.styles.PanelNodeStyle#labelInsetsColor} property on the created object. - *

- */ - constructor(options:{renderer:yfiles.styles.PanelNodeStyleRenderer,color?:yfiles.view.Color,insets?:yfiles.geometry.Insets,labelInsetsColor?:yfiles.view.Color}); - /** - * Creates a new instance using {@link yfiles.styles.PanelNodeStyleRenderer} as renderer to share. - * @param {Object} [options=null] The parameters to pass. - * @param {yfiles.view.Color} options.color The base color to use. - *

- * This option sets the {@link yfiles.styles.PanelNodeStyle#color} property on the created object. - *

- * @param {yfiles.geometry.Insets} options.insets The instance to use that provides the insets for this style. - *

- * This option sets the {@link yfiles.styles.PanelNodeStyle#insets} property on the created object. - *

- * @param {yfiles.view.Color} options.labelInsetsColor The base color to use for drawing the label insets background. - *

- * This option sets the {@link yfiles.styles.PanelNodeStyle#labelInsetsColor} property on the created object. - *

- */ - constructor(options?:{color?:yfiles.view.Color,insets?:yfiles.geometry.Insets,labelInsetsColor?:yfiles.view.Color}); - /** - * - * @returns - */ - clone():any; - /** - * Gets or sets the base color to use. - *

- * The default value is {@link yfiles.view.Color#BLACK}. - *

- * @default 'Black' - * @type {yfiles.view.Color} - */ - color:yfiles.view.Color; - /** - * Gets or sets the base color to use for drawing the label insets background. - *

- * Setting this to null effectively disables label insets background coloring. - *

- *

- * The default value is {@link yfiles.view.Color#LIGHT_GRAY}. - *

- * @default 'LightGray' - * @type {yfiles.view.Color} - */ - labelInsetsColor:yfiles.view.Color; - /** - * Gets or sets the instance to use that provides the insets for this style. - *

- * The {@link yfiles.styles.PanelNodeStyleRenderer} will use these insets and return them via an {@link yfiles.input.INodeInsetsProvider} - * if such an instance is queried through the {@link yfiles.styles.INodeStyleRenderer#getContext context lookup}. - *

- *

- * The default insets are set to (5,5,5,5). - *

- * @see yfiles.input.INodeInsetsProvider - * @default '5, 5, 5, 5' - * @type {yfiles.geometry.Insets} - */ - insets:yfiles.geometry.Insets; - /** - * - * @type {yfiles.styles.INodeStyleRenderer} - */ - renderer:yfiles.styles.INodeStyleRenderer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.PanelNodeStyle; - } - /** - * A {@link yfiles.styles.INodeStyle} {@link yfiles.styles.INodeStyleRenderer renderer} implementation that draws a simple floating panel with a slight gradient, a thin - * border and a simple drop shadow. - * @see yfiles.styles.PanelNodeStyle - * @class - * @implements {yfiles.styles.INodeStyleRenderer} - * @implements {yfiles.styles.IShapeGeometry} - * @implements {yfiles.view.IBoundsProvider} - * @implements {yfiles.view.IVisibilityTestable} - * @implements {yfiles.input.IMarqueeTestable} - * @implements {yfiles.input.IHitTestable} - * @implements {yfiles.graph.ILookup} - * @implements {yfiles.view.IVisualCreator} - */ - export interface PanelNodeStyleRenderer extends yfiles.lang.Object,yfiles.styles.INodeStyleRenderer,yfiles.styles.IShapeGeometry,yfiles.view.IBoundsProvider,yfiles.view.IVisibilityTestable,yfiles.input.IMarqueeTestable,yfiles.input.IHitTestable,yfiles.graph.ILookup,yfiles.view.IVisualCreator{} - export class PanelNodeStyleRenderer { - /** - * The style that it currently assigned to this renderer instance. - */ - constructor(); - /** - * Prepares this instance for subsequent calls after the style and node have been initialized. - *

- * Upon invocation the {@link yfiles.styles.PanelNodeStyleRenderer#style} and {@link yfiles.styles.PanelNodeStyleRenderer#node} properties have been populated by the {@link yfiles.styles.PanelNodeStyleRenderer#getVisualCreator}, - * {@link yfiles.styles.PanelNodeStyleRenderer#getBoundsProvider}, {@link yfiles.styles.PanelNodeStyleRenderer#getHitTestable}, or {@link yfiles.styles.PanelNodeStyleRenderer#getMarqueeTestable} - * methods. - *

- *

- * This is an empty implementation. Subclasses might have to override this method. - *

- * @protected - */ - configure():void; - /** - * - * @param context - * @returns - */ - createVisual(context:yfiles.view.IRenderContext):yfiles.view.Visual; - /** - * Determines whether to draw the drop shadow. - * @returns true, always. - * @protected - */ - drawShadow():boolean; - /** - * - * @param context - * @returns - */ - getBounds(context:yfiles.view.ICanvasContext):yfiles.geometry.Rect; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.PanelNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the bounds provider for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.PanelNodeStyleRenderer#getBounds - */ - getBoundsProvider(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IBoundsProvider; - /** - * Configures the style and node parameters, does not call {@link yfiles.styles.PanelNodeStyleRenderer#configure} and returns this. - *

- * As this method may be called often it will not automatically call {@link yfiles.styles.PanelNodeStyleRenderer#configure}, - * instead subclasses should ensure that in the {@link yfiles.styles.PanelNodeStyleRenderer#lookup} method call they should call {@link yfiles.styles.PanelNodeStyleRenderer#configure} - * only if needed, i.e. if they decide to return this or an instance that depends on a correctly configured this. - *

- * @param node The node to query the context for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.PanelNodeStyleRenderer#lookup - */ - getContext(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.graph.ILookup; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.PanelNodeStyleRenderer#configure} and returns this. - * @param node The node to query hit test with. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.PanelNodeStyleRenderer#isHit - */ - getHitTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IHitTestable; - /** - * Finds an intersection for the current {@link yfiles.styles.PanelNodeStyleRenderer#node node} using the {@link yfiles.styles.PanelNodeStyleRenderer#style}. - *

- * This implementation returns the intersection for the {@link yfiles.styles.PanelNodeStyleRenderer#layout}. - *

- * @param inner - * @param outer - * @returns True if an intersection was actually found - */ - getIntersection(inner:yfiles.geometry.Point,outer:yfiles.geometry.Point):yfiles.geometry.Point; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.PanelNodeStyleRenderer#configure} and returns this. - * @param node The node to query marquee intersection tests. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.PanelNodeStyleRenderer#isInBox - */ - getMarqueeTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IMarqueeTestable; - /** - * Returns the outline of the shape using the node's {@link yfiles.styles.PanelNodeStyleRenderer#layout}. - * @returns The outline of the bounds of the node. - */ - getOutline():yfiles.geometry.GeneralPath; - /** - * Configures the {@link yfiles.styles.PanelNodeStyleRenderer#style} and {@link yfiles.styles.PanelNodeStyleRenderer#node} properties, calls {@link yfiles.styles.PanelNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the shape geometry for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.PanelNodeStyleRenderer#isInside - * @see yfiles.styles.PanelNodeStyleRenderer#getIntersection - */ - getShapeGeometry(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.styles.IShapeGeometry; - /** - * Configures the style and node parameters, does not call {@link yfiles.styles.PanelNodeStyleRenderer#configure} and returns this. - *

- * Unlike most of the other methods this implementation does not call {@link yfiles.styles.PanelNodeStyleRenderer#configure}. If the - * subclass implementation depends on this instance to be configured, it needs to call Configure in - * {@link yfiles.styles.PanelNodeStyleRenderer#isVisible}. - *

- * @param node The node to query visibility tests. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.PanelNodeStyleRenderer#isVisible - */ - getVisibilityTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisibilityTestable; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.PanelNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the {@link } for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.PanelNodeStyleRenderer#createVisual - * @see yfiles.styles.PanelNodeStyleRenderer#updateVisual - */ - getVisualCreator(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisualCreator; - /** - * Hit tests the {@link yfiles.styles.PanelNodeStyleRenderer#node node} using the current {@link yfiles.styles.PanelNodeStyleRenderer#style}. - *

- * This implementation uses the {@link yfiles.styles.PanelNodeStyleRenderer#layout} to determine whether the node has been hit. The check is delegated to {@link yfiles.geometry.Rect#containsWithEps} - * using {@link yfiles.view.ICanvasContext#hitTestRadius} as the last argument. - *

- * @param context the context the hit test is performed in - * @param location the coordinates in world coordinate system - * @returns whether something has been hit - */ - isHit(context:yfiles.input.IInputModeContext,location:yfiles.geometry.Point):boolean; - /** - * Tests the {@link yfiles.styles.PanelNodeStyleRenderer#node node} using the current {@link yfiles.styles.PanelNodeStyleRenderer#style} for an intersection with the given box. - *

- * This implementation uses the {@link yfiles.styles.PanelNodeStyleRenderer#layout} to determine whether the node is in the box. - *

- * @param context the current input mode context - * @param rectangle the box describing the marquee's bounds - * @returns true if the node is considered to be captured by the marquee - */ - isInBox(context:yfiles.input.IInputModeContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Checks whether the given coordinate lies within the shape's geometric bounds. - *

- * This implementation checks for containment in the {@link yfiles.styles.PanelNodeStyleRenderer#layout}. - *

- * @param location - * @returns True if the point lies within the geometry of the rendering. - */ - isInside(location:yfiles.geometry.Point):boolean; - /** - * - * @param context - * @param rectangle - * @returns - */ - isVisible(context:yfiles.view.ICanvasContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * - * @param type - * @returns - */ - lookup(type:yfiles.lang.Class):any; - /** - * - * @param context - * @param oldVisual - * @returns - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual):yfiles.view.Visual; - /** - * Gets or sets the currently configured style. - * @protected - * @type {yfiles.styles.PanelNodeStyle} - */ - style:yfiles.styles.PanelNodeStyle; - /** - * Gets or sets the currently configured node. - * @protected - * @type {yfiles.graph.INode} - */ - node:yfiles.graph.INode; - /** - * Gets the {@link yfiles.graph.INode#layout} of the node this renderer is currently configured for. - *

- * Returns Node.Layout. - *

- * @type {yfiles.geometry.IRectangle} - */ - layout:yfiles.geometry.IRectangle; - /** - * Gets the color from the style. - * @protected - * @type {yfiles.view.Color} - */ - color:yfiles.view.Color; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.PanelNodeStyleRenderer; - } - /** - * Decorates other node styles with a smooth drop shadow. - *

- * This implementation uses an SVG filter effect. This may cause performance issues for larger nodes or high zoom factors. - * In this case it might be more appropriate to implement a drop shadow implementation using canvas drawing and displaying - * the canvas content using an image element with canvas.toDataURL. - *

- * @class - * @implements {yfiles.styles.INodeStyle} - */ - export interface ShadowNodeStyleDecorator extends yfiles.lang.Object,yfiles.styles.INodeStyle{} - export class ShadowNodeStyleDecorator { - /** - * Creates a new instance wrapping the provided style. - *

- * The provided instance is used by reference, so subsequent changes to the style will affect the appearance of this - * style. - *

- * @param wrapped The style to wrap. - */ - constructor(wrapped:yfiles.styles.INodeStyle); - /** - * Creates a new instance wrapping a simple {@link yfiles.styles.ShapeNodeStyle}. - *

- * The provided instance is used by reference, so subsequent changes to the style will affect the appearance of this - * style. - *

- * @param {Object} [options=null] The parameters to pass. - * @param {yfiles.styles.INodeStyle} options.wrapped The wrapped node style instance by reference. - *

- * This option sets the {@link yfiles.styles.ShadowNodeStyleDecorator#wrapped} property on the created object. - *

- * @see yfiles.styles.ShadowNodeStyleDecorator#wrapped - */ - constructor(options?:{wrapped?:yfiles.styles.INodeStyle}); - /** - * - * @returns - */ - clone():any; - /** - * Gets or sets the wrapped node style instance by reference. - * @type {yfiles.styles.INodeStyle} - */ - wrapped:yfiles.styles.INodeStyle; - /** - * - * @type {yfiles.styles.INodeStyleRenderer} - */ - renderer:yfiles.styles.INodeStyleRenderer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.ShadowNodeStyleDecorator; - } - /** - * Implementation of the {@link yfiles.styles.INodeStyle} which creates rectangular nodes with rounded corners and a highlighted - * ('shiny plate') interior. - *

- * By default, this style renders a drop shadow by itself. - *

- *

- * This style uses the {@link yfiles.styles.ShinyPlateNodeStyleRenderer} to visualize a node. - *

- * @see yfiles.styles.ShinyPlateNodeStyleRenderer - * @class - * @implements {yfiles.styles.INodeStyle} - */ - export interface ShinyPlateNodeStyle extends yfiles.lang.Object,yfiles.styles.INodeStyle{} - export class ShinyPlateNodeStyle { - /** - * Creates a new instance using the provided renderer. - * @param renderer - */ - constructor(renderer:yfiles.styles.ShinyPlateNodeStyleRenderer); - /** - * Creates a new instance using the provided renderer. - * @param {Object} options The parameters to pass. - * @param options.renderer - * @param {yfiles.view.Fill} options.fill The background brush for this style. - *

- * This option sets the {@link yfiles.styles.ShinyPlateNodeStyle#fill} property on the created object. - *

- * @param {boolean} options.drawShadow A value indicating whether to draw a drop shadow. - *

- * This option sets the {@link yfiles.styles.ShinyPlateNodeStyle#drawShadow} property on the created object. - *

- * @param {yfiles.geometry.Insets} options.insets The instance to use that provides the insets for this style. - *

- * This option sets the {@link yfiles.styles.ShinyPlateNodeStyle#insets} property on the created object. - *

- * @param {yfiles.view.Stroke} options.stroke The {@link yfiles.styles.ShinyPlateNodeStyle#stroke} to use for the outline. - *

- * This option sets the {@link yfiles.styles.ShinyPlateNodeStyle#stroke} property on the created object. - *

- * @param {number} options.radius The corner radius of the rounded rectangle - *

- * This option sets the {@link yfiles.styles.ShinyPlateNodeStyle#radius} property on the created object. - *

- */ - constructor(options:{renderer:yfiles.styles.ShinyPlateNodeStyleRenderer,fill?:yfiles.view.Fill,drawShadow?:boolean,insets?:yfiles.geometry.Insets,stroke?:yfiles.view.Stroke,radius?:number}); - /** - * Creates a new instance using {@link yfiles.styles.ShinyPlateNodeStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {yfiles.view.Fill} options.fill The background brush for this style. - *

- * This option sets the {@link yfiles.styles.ShinyPlateNodeStyle#fill} property on the created object. - *

- * @param {boolean} options.drawShadow A value indicating whether to draw a drop shadow. - *

- * This option sets the {@link yfiles.styles.ShinyPlateNodeStyle#drawShadow} property on the created object. - *

- * @param {yfiles.geometry.Insets} options.insets The instance to use that provides the insets for this style. - *

- * This option sets the {@link yfiles.styles.ShinyPlateNodeStyle#insets} property on the created object. - *

- * @param {yfiles.view.Stroke} options.stroke The {@link yfiles.styles.ShinyPlateNodeStyle#stroke} to use for the outline. - *

- * This option sets the {@link yfiles.styles.ShinyPlateNodeStyle#stroke} property on the created object. - *

- * @param {number} options.radius The corner radius of the rounded rectangle - *

- * This option sets the {@link yfiles.styles.ShinyPlateNodeStyle#radius} property on the created object. - *

- */ - constructor(options?:{fill?:yfiles.view.Fill,drawShadow?:boolean,insets?:yfiles.geometry.Insets,stroke?:yfiles.view.Stroke,radius?:number}); - /** - * - * @returns - */ - clone():any; - /** - * Gets or sets the background brush for this style. - *

- * The default value is {@link yfiles.view.Fill#BLACK}. - *

- * @type {yfiles.view.Fill} - */ - fill:yfiles.view.Fill; - /** - * Gets or sets the {@link yfiles.styles.ShinyPlateNodeStyle#stroke} to use for the outline. - *

- * The default value is null. - *

- * @default null - * @type {yfiles.view.Stroke} - */ - stroke:yfiles.view.Stroke; - /** - * Gets or sets the corner radius of the rounded rectangle - *

- * The default value is 5. - *

- * @default 5 - * @type {number} - */ - radius:number; - /** - * Gets or sets a value indicating whether to draw a drop shadow. - *

- * The default value is true. - *

- * @default true - * @type {boolean} - */ - drawShadow:boolean; - /** - * Gets or sets the instance to use that provides the insets for this style. - *

- * The {@link yfiles.styles.ShinyPlateNodeStyleRenderer} will use these insets and return them via an {@link yfiles.input.INodeInsetsProvider} - * if such an instance is queried through the {@link yfiles.styles.INodeStyleRenderer#getContext context lookup}. - *

- *

- * The default insets are set to (5,5,5,5). - *

- * @see yfiles.input.INodeInsetsProvider - * @default '5,5,5,5' - * @type {yfiles.geometry.Insets} - */ - insets:yfiles.geometry.Insets; - /** - * - * @type {yfiles.styles.INodeStyleRenderer} - */ - renderer:yfiles.styles.INodeStyleRenderer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.ShinyPlateNodeStyle; - } - /** - * A {@link yfiles.styles.INodeStyle} {@link yfiles.styles.INodeStyleRenderer renderer} implementation that draws a simple floating shinyPlate with a slight gradient, a - * thin border and a simple drop shadow. - * @see yfiles.styles.ShinyPlateNodeStyle - * @class - * @implements {yfiles.styles.INodeStyleRenderer} - * @implements {yfiles.styles.IShapeGeometry} - * @implements {yfiles.view.IBoundsProvider} - * @implements {yfiles.view.IVisibilityTestable} - * @implements {yfiles.input.IMarqueeTestable} - * @implements {yfiles.input.IHitTestable} - * @implements {yfiles.graph.ILookup} - * @implements {yfiles.view.IVisualCreator} - */ - export interface ShinyPlateNodeStyleRenderer extends yfiles.lang.Object,yfiles.styles.INodeStyleRenderer,yfiles.styles.IShapeGeometry,yfiles.view.IBoundsProvider,yfiles.view.IVisibilityTestable,yfiles.input.IMarqueeTestable,yfiles.input.IHitTestable,yfiles.graph.ILookup,yfiles.view.IVisualCreator{} - export class ShinyPlateNodeStyleRenderer { - /** - * Prepares this instance for subsequent calls after the style and node have been initialized. - *

- * Upon invocation the {@link yfiles.styles.ShinyPlateNodeStyleRenderer#style} and {@link yfiles.styles.ShinyPlateNodeStyleRenderer#node} properties have been populated by the - * {@link yfiles.styles.ShinyPlateNodeStyleRenderer#getVisualCreator}, {@link yfiles.styles.ShinyPlateNodeStyleRenderer#getBoundsProvider}, - * {@link yfiles.styles.ShinyPlateNodeStyleRenderer#getHitTestable}, or {@link yfiles.styles.ShinyPlateNodeStyleRenderer#getMarqueeTestable} - * methods. - *

- *

- * This is an empty implementation. Subclasses might have to override this method. - *

- * @protected - */ - configure():void; - /** - * - * @param context - * @returns - */ - createVisual(context:yfiles.view.IRenderContext):yfiles.view.Visual; - /** - * Determines whether to draw the drop shadow. - * @returns {@link #drawShadow}. - * @protected - */ - drawShadow():boolean; - /** - * - * @param context - * @returns - */ - getBounds(context:yfiles.view.ICanvasContext):yfiles.geometry.Rect; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.ShinyPlateNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the bounds provider for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ShinyPlateNodeStyleRenderer#getBounds - */ - getBoundsProvider(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IBoundsProvider; - /** - * Configures the style and node parameters, does not call {@link yfiles.styles.ShinyPlateNodeStyleRenderer#configure} and returns - * this. - *

- * As this method may be called often it will not automatically call {@link yfiles.styles.ShinyPlateNodeStyleRenderer#configure}, - * instead subclasses should ensure that in the {@link yfiles.styles.ShinyPlateNodeStyleRenderer#lookup} method call they should - * call {@link yfiles.styles.ShinyPlateNodeStyleRenderer#configure} only if needed, i.e. if they decide to return this or an - * instance that depends on a correctly configured this. - *

- * @param node The node to query the context for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ShinyPlateNodeStyleRenderer#lookup - */ - getContext(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.graph.ILookup; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.ShinyPlateNodeStyleRenderer#configure} and returns this. - * @param node The node to query hit test with. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ShinyPlateNodeStyleRenderer#isHit - */ - getHitTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IHitTestable; - /** - * - * @param inner - * @param outer - * @returns - */ - getIntersection(inner:yfiles.geometry.Point,outer:yfiles.geometry.Point):yfiles.geometry.Point; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.ShinyPlateNodeStyleRenderer#configure} and returns this. - * @param node The node to query marquee intersection tests. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ShinyPlateNodeStyleRenderer#isInBox - */ - getMarqueeTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IMarqueeTestable; - /** - * - * @returns - */ - getOutline():yfiles.geometry.GeneralPath; - /** - * Configures the {@link yfiles.styles.ShinyPlateNodeStyleRenderer#style} and {@link yfiles.styles.ShinyPlateNodeStyleRenderer#node} properties, calls {@link yfiles.styles.ShinyPlateNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the shape geometry for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ShinyPlateNodeStyleRenderer#isInside - * @see yfiles.styles.ShinyPlateNodeStyleRenderer#getIntersection - */ - getShapeGeometry(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.styles.IShapeGeometry; - /** - * Configures the style and node parameters, does not call {@link yfiles.styles.ShinyPlateNodeStyleRenderer#configure} and returns - * this. - *

- * Unlike most of the other methods this implementation does not call {@link yfiles.styles.ShinyPlateNodeStyleRenderer#configure}. If - * the subclass implementation depends on this instance to be configured, it needs to call Configure in - * {@link yfiles.styles.ShinyPlateNodeStyleRenderer#isVisible}. - *

- * @param node The node to query visibility tests. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ShinyPlateNodeStyleRenderer#isVisible - */ - getVisibilityTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisibilityTestable; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.ShinyPlateNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the {@link } for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.ShinyPlateNodeStyleRenderer#createVisual - * @see yfiles.styles.ShinyPlateNodeStyleRenderer#updateVisual - */ - getVisualCreator(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisualCreator; - /** - * - * @param context - * @param location - * @returns - */ - isHit(context:yfiles.input.IInputModeContext,location:yfiles.geometry.Point):boolean; - /** - * Tests the {@link yfiles.styles.ShinyPlateNodeStyleRenderer#node node} using the current {@link yfiles.styles.ShinyPlateNodeStyleRenderer#style} for an intersection with the given box. - *

- * This implementation uses the {@link yfiles.styles.ShinyPlateNodeStyleRenderer#layout} to determine whether the node is in the box. - *

- * @param context the current input mode context - * @param rectangle the box describing the marquee's bounds - * @returns true if the node is considered to be captured by the marquee - */ - isInBox(context:yfiles.input.IInputModeContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * - * @param location - * @returns - */ - isInside(location:yfiles.geometry.Point):boolean; - /** - * - * @param context - * @param rectangle - * @returns - */ - isVisible(context:yfiles.view.ICanvasContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * - * @param type - * @returns - */ - lookup(type:yfiles.lang.Class):any; - /** - * - * @param context - * @param oldVisual - * @returns - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual):yfiles.view.Visual; - /** - * Gets or sets the currently configured style. - * @protected - * @type {yfiles.styles.ShinyPlateNodeStyle} - */ - style:yfiles.styles.ShinyPlateNodeStyle; - /** - * Gets or sets the currently configured node. - * @protected - * @type {yfiles.graph.INode} - */ - node:yfiles.graph.INode; - /** - * Gets the {@link yfiles.graph.INode#layout} of the node this renderer is currently configured for. - *

- * Returns Node.Layout. - *

- * @type {yfiles.geometry.IRectangle} - */ - layout:yfiles.geometry.IRectangle; - /** - * Gets the {@link yfiles.styles.ShinyPlateNodeStyleRenderer#fill} from the style. - * @protected - * @type {yfiles.view.Fill} - */ - fill:yfiles.view.Fill; - /** - * Gets the {@link yfiles.styles.ShinyPlateNodeStyleRenderer#stroke} from the style. - * @protected - * @type {yfiles.view.Stroke} - */ - stroke:yfiles.view.Stroke; - /** - * Gets the radius from the style. - * @protected - * @type {number} - */ - radius:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.ShinyPlateNodeStyleRenderer; - } - /** - * Base class for stripe styles that use a SVG snippet as template for the visualization of {@link yfiles.graph.IStripe}s. - * @see yfiles.styles.TemplateStripeStyle - * @see yfiles.styles.StringTemplateStripeStyle - * @class - * @implements {yfiles.styles.IStripeStyle} - * @implements {yfiles.lang.IPropertyObservable} - * @implements {yfiles.lang.ICloneable} - */ - export interface TemplateStripeStyleBase extends yfiles.lang.Object,yfiles.styles.IStripeStyle,yfiles.lang.IPropertyObservable,yfiles.lang.ICloneable{} - export class TemplateStripeStyleBase { - /** - * Constructs a new instance using the provided renderer. - * @param renderer - * @protected - */ - constructor(renderer:yfiles.styles.TemplateStripeStyleRenderer); - /** - * Constructs a new instance of this style with default values. - * @protected - */ - constructor(); - /** - * Performs a shallow clone of this instance, except for the value of {@link yfiles.styles.TemplateStripeStyleBase#styleTag} which is cloned, too, if it can be cloned. - * @returns A clone of this instance. - */ - clone():any; - /** - * Factory method that is called by the {@link yfiles.styles.TemplateStripeStyleRenderer} to create the visual that will be used - * for the display of the stripe. - * @param context The context for which the visual should be created. - * @param stripe The stripe that will be rendered. - * @returns The readily styled visual. - */ - createTemplate(context:yfiles.view.IRenderContext,stripe:yfiles.graph.IStripe):yfiles.view.SvgVisual; - /** - * Loads all template script elements that have not been parsed, yet, and creates the respective template cache objects. - *

- * This method can be called to perform the template loading at a certain point in time, for example during application - * startup. By default, a template is loaded lazily when the first visual using this template is built. - *

- * @static - */ - static loadAllTemplates():void; - /** - * Raises the {@link yfiles.styles.TemplateStripeStyleBase#addPropertyChangedListener PropertyChanged} - * event. - * @param evt The {@link } instance containing the event data. - * @protected - */ - onPropertyChanged(evt:yfiles.lang.PropertyChangedEventArgs):void; - /** - * Adds the given listener for the PropertyChanged event that occurs when a property value changes. - * @param listener The listener to add. - * @see yfiles.styles.TemplateStripeStyleBase#removePropertyChangedListener - */ - addPropertyChangedListener(listener:(sender:any,args:yfiles.lang.PropertyChangedEventArgs)=>void):void; - /** - * Removes the given listener for the PropertyChanged event that occurs when a property value changes. - * @param listener The listener to remove. - * @see yfiles.styles.TemplateStripeStyleBase#addPropertyChangedListener - */ - removePropertyChangedListener(listener:(sender:any,args:yfiles.lang.PropertyChangedEventArgs)=>void):void; - /** - * Gets or sets the tag that is associated with this style instance. - *

- * The various style renderer implementations can use this tag to make it accessible in the context of the instantiated - * templates and controls. The framework does not make any assumptions about the value of this property. It is there for - * convenient use in the process of data binding the templates. This property supports {@link yfiles.lang.IPropertyObservable property change notification} and can - * thus be data bound easily. - *

- * @default null - * @type {any} - */ - styleTag:any; - /** - * Gets or sets an implementation of {@link yfiles.graph.IContextLookup} that can be used to satisfy queries that are made to the - * implementation which is returned by calls to {@link yfiles.styles.IStripeStyleRenderer#getContext} that are made on the style - * renderer that is associated with this style instance. - *

- * This can be used to conveniently customize the lookup behavior of the style renderers that are associated with this - * instance. The default value is {@link yfiles.graph.IContextLookup#EMPTY_CONTEXT_LOOKUP} - *

- * @default 'Lookups.EmptyContextLookup' - * @type {yfiles.graph.IContextLookup} - */ - contextLookup:yfiles.graph.IContextLookup; - /** - * Convenience getter that yields the {@link yfiles.styles.TemplateStripeStyleRenderer} that is used by this instance. - * @see yfiles.styles.IStripeStyle#renderer - * @type {yfiles.styles.IStripeStyleRenderer} - */ - renderer:yfiles.styles.IStripeStyleRenderer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.TemplateStripeStyleBase; - } - /** - * An {@link yfiles.styles.IStripeStyle} implementation that can render complex {@link yfiles.view.Visual}s for the visualization of - * {@link yfiles.graph.IStripe}s using a {@link yfiles.styles.TemplateStripeStyleRenderer}. - *

- * The {@link yfiles.styles.TemplateStripeStyle#styleResourceKey} is used to determine the template that will be applied to the {@link yfiles.view.Visual}. - *

- *

Related demos:

- *
    - *
  • Demo: Control Styles Demo, Demo.yFiles.Graph.ControlStyles
  • - *
  • Demo: OrgChart Demo, Demo.yFiles.Graph.OrgChart
  • - *
- * @class - * @extends {yfiles.styles.TemplateStripeStyleBase} - */ - export interface TemplateStripeStyle extends yfiles.styles.TemplateStripeStyleBase{} - export class TemplateStripeStyle { - /** - * Creates a new instance using the given resource key and a custom renderer instance. - * @param styleResourceKey The key of the style resource that will be used for the component. - * @param renderer The custom renderer for this style instance. - */ - constructor(styleResourceKey:string,renderer:yfiles.styles.TemplateStripeStyleRenderer); - /** - * Creates a new instance using the given resource key and {@link yfiles.styles.TemplateStripeStyleRenderer} as renderer. - * @param styleResourceKey The key of the style resource that will be used for the component. - */ - constructor(styleResourceKey:string); - /** - * Creates a new instance with no style resource key and {@link yfiles.styles.TemplateStripeStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {string} options.styleResourceKey The {@link string} that will be used to look up the template that is applied to the component. - *

- * This option sets the {@link yfiles.styles.TemplateStripeStyle#styleResourceKey} property on the created object. - *

- */ - constructor(options?:{styleResourceKey?:string}); - /** - * Gets or sets the {@link string} that will be used to look up the template that is applied to the component. - * @default null - * @type {string} - */ - styleResourceKey:string; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.TemplateStripeStyle; - } - /** - * A {@link yfiles.styles.IStripeStyle} that uses an SVG snippet as template for the visualization of {@link yfiles.graph.IStripe}s. - *

- * In contrast to {@link yfiles.styles.TemplateStripeStyle}, the SVG template used by this style must be encoded as string and set - * to the {@link yfiles.styles.StringTemplateStripeStyle#svgContent} property. - *

- *

- * It is vital that the {@link yfiles.styles.StringTemplateStripeStyle#svgContent SVG snippet} does not declare the SVG namespace itself. Its content is parsed in a dummy namespace - * in order to avoid immediate validation of the result. The resulting SVG elements are automatically created in the SVG - * namespace before they are added to the DOM. - *

- * @class - * @extends {yfiles.styles.TemplateStripeStyleBase} - */ - export interface StringTemplateStripeStyle extends yfiles.styles.TemplateStripeStyleBase{} - export class StringTemplateStripeStyle { - /** - * Creates a new instance using the given SVG template and a custom renderer instance. - * @param svgContent The SVG snippet that will be used as a template for the component. - * @param renderer The custom renderer for this instance. - */ - constructor(svgContent:string,renderer:yfiles.styles.TemplateStripeStyleRenderer); - /** - * Creates a new instance using the given SVG template and a custom renderer instance. - * @param {Object} options The parameters to pass. - * @param options.svgContent The SVG snippet that will be used as a template for the component. - * @param options.renderer The custom renderer for this instance. - * @param {Object} options.styleTag The tag that is associated with this style instance. - *

- * This option sets the {@link yfiles.styles.TemplateStripeStyleBase#styleTag} property on the created object. - *

- */ - constructor(options:{svgContent:string,renderer:yfiles.styles.TemplateStripeStyleRenderer,styleTag?:Object}); - /** - * Creates a new instance using the given SVG template and {@link yfiles.styles.TemplateStripeStyleRenderer} as renderer. - * @param svgContent The SVG snippet that will be used as a template for the component. - */ - constructor(svgContent:string); - /** - * Creates a new instance with no SVG template and {@link yfiles.styles.TemplateStripeStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {string} options.svgContent The SVG content that is the template for the stripe visualization. - *

- * This option sets the {@link yfiles.styles.StringTemplateStripeStyle#svgContent} property on the created object. - *

- */ - constructor(options?:{svgContent?:string}); - /** - * Gets or sets the SVG content that is the template for the stripe visualization. - * @default null - * @type {string} - */ - svgContent:string; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.StringTemplateStripeStyle; - } - /** - * An implementation of the {@link yfiles.styles.IStripeStyleRenderer} interface that can render {@link yfiles.styles.TemplateStripeStyle} - * instances. - * @see yfiles.styles.TemplateStripeStyle - * @class - * @implements {yfiles.styles.IStripeStyleRenderer} - * @implements {yfiles.graph.ILookup} - * @implements {yfiles.view.IVisualCreator} - */ - export interface TemplateStripeStyleRenderer extends yfiles.lang.Object,yfiles.styles.IStripeStyleRenderer,yfiles.graph.ILookup,yfiles.view.IVisualCreator{} - export class TemplateStripeStyleRenderer { - /** - * Prepares this instance for subsequent calls after the style and stripe have been initialized. - *

- * Upon invocation the {@link yfiles.styles.TemplateStripeStyleRenderer#style} and {@link yfiles.styles.TemplateStripeStyleRenderer#stripe} properties have been populated by the {@link yfiles.styles.TemplateStripeStyleRenderer#getVisualCreator} - * or {@link yfiles.styles.TemplateStripeStyleRenderer#getContext} methods. - *

- *

- * This is an empty implementation. Subclasses might have to override this method. - *

- * @protected - */ - configure():void; - /** - * Creates the visual by delegating to CreateControl and then initializing the control with the context. - * @param context The context for the creation. - * @returns The control that is used for rendering the stripe. - */ - createVisual(context:yfiles.view.IRenderContext):yfiles.view.Visual; - /** - * Configures the style and stripe parameters, does not call {@link yfiles.styles.TemplateStripeStyleRenderer#configure} and returns - * this. - *

- * As this method may be called often it will not automatically call {@link yfiles.styles.TemplateStripeStyleRenderer#configure}, - * instead subclasses should ensure that in the {@link yfiles.styles.TemplateStripeStyleRenderer#lookup} method call they should - * call {@link yfiles.styles.TemplateStripeStyleRenderer#configure} only if needed, i.e. if they decide to return this or an - * instance that depends on a correctly configured this. - *

- * @param stripe The stripe to query the context for. The value will be stored in the {@link #stripe} property. - * @param style The style to associate with the stripe. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplateStripeStyleRenderer#lookup - */ - getContext(stripe:yfiles.graph.IStripe,style:yfiles.styles.IStripeStyle):yfiles.graph.ILookup; - /** - * Gets the context by delegating to {@link yfiles.styles.TemplateStripeStyleBase#contextLookup}. - * @param style - * @returns - * @protected - */ - getContextLookup(style:yfiles.styles.TemplateStripeStyleBase):yfiles.graph.IContextLookup; - /** - * Configures the style and stripe parameters, calls {@link yfiles.styles.TemplateStripeStyleRenderer#configure} and returns this. - * @param stripe The stripe to retrieve the {@link } for. The value will be stored in the {@link #stripe} property. - * @param style The style to associate with the stripe. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplateStripeStyleRenderer#createVisual - * @see yfiles.styles.TemplateStripeStyleRenderer#updateVisual - */ - getVisualCreator(stripe:yfiles.graph.IStripe,style:yfiles.styles.IStripeStyle):yfiles.view.IVisualCreator; - /** - * Implementation of the {@link yfiles.graph.ILookup#lookup} method. - *

- * Delegates to the lookup returned by GetContextLookup(StripeControlStripeStyle), first. Last, it returns this class if it - * implements the queried type. - *

- * @param type The type to query an instance for. - * @returns The implementation or null. - */ - lookup(type:yfiles.lang.Class):any; - /** - * Updates the component correspondingly. - * @param context The context for the creation. - * @param oldVisual The currently rendered visual. - * @returns The control that is used for rendering the stripe. - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual):yfiles.view.Visual; - /** - * Gets or sets the currently configured style. - * @protected - * @type {yfiles.styles.TemplateStripeStyleBase} - */ - style:yfiles.styles.TemplateStripeStyleBase; - /** - * Gets or sets the currently configured stripe. - * @protected - * @type {yfiles.graph.IStripe} - */ - stripe:yfiles.graph.IStripe; - /** - * Gets the {@link yfiles.graph.IStripe#layout} of the stripe this renderer is currently configured for. - *

- * Returns Stripe.Layout. - *

- * @type {yfiles.geometry.IRectangle} - */ - layout:yfiles.geometry.IRectangle; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.TemplateStripeStyleRenderer; - } - /** - * A {@link yfiles.styles.INodeStyle} for {@link yfiles.graph.ITable tables}. - *

- * This implementations stores the table instance and therefore, its instances cannot be shared among different table - * instances. - *

- * @class - * @implements {yfiles.styles.INodeStyle} - * @implements {yfiles.lang.IPropertyObservable} - */ - export interface TableNodeStyle extends yfiles.lang.Object,yfiles.styles.INodeStyle,yfiles.lang.IPropertyObservable{} - export class TableNodeStyle { - /** - * Constructor with a custom renderer implementation that uses table as backing table model. - * @param table The table instance that defines the tabular structure. - * @param [renderer=null] Custom renderer instance for this style. - */ - constructor(table:yfiles.graph.ITable,renderer?:yfiles.styles.TableNodeStyleRenderer); - /** - * Constructor with a custom renderer implementation that uses table as backing table model. - * @param {Object} options The parameters to pass. - * @param options.table The table instance that defines the tabular structure. - * @param [options.renderer=null] Custom renderer instance for this style. - * @param {yfiles.styles.INodeStyle} options.backgroundStyle The style that is used to draw the background of the table - *

- * This option sets the {@link yfiles.styles.TableNodeStyle#backgroundStyle} property on the created object. - *

- * @param {yfiles.styles.TableRenderingOrder} options.tableRenderingOrder The order in which rows and columns are rendered. - *

- * This option sets the {@link yfiles.styles.TableNodeStyle#tableRenderingOrder} property on the created object. - *

- */ - constructor(options:{table:yfiles.graph.ITable,renderer?:yfiles.styles.TableNodeStyleRenderer,backgroundStyle?:yfiles.styles.INodeStyle,tableRenderingOrder?:yfiles.styles.TableRenderingOrder}); - /** - * Default constructor that creates an empty table. - * @param {Object} [options=null] The parameters to pass. - * @param {yfiles.styles.INodeStyle} options.backgroundStyle The style that is used to draw the background of the table - *

- * This option sets the {@link yfiles.styles.TableNodeStyle#backgroundStyle} property on the created object. - *

- * @param {yfiles.graph.ITable} options.table The {@link yfiles.graph.ITable} instance that defines the tabular structure. - *

- * This option sets the {@link yfiles.styles.TableNodeStyle#table} property on the created object. - *

- * @param {yfiles.styles.TableRenderingOrder} options.tableRenderingOrder The order in which rows and columns are rendered. - *

- * This option sets the {@link yfiles.styles.TableNodeStyle#tableRenderingOrder} property on the created object. - *

- */ - constructor(options?:{backgroundStyle?:yfiles.styles.INodeStyle,table?:yfiles.graph.ITable,tableRenderingOrder?:yfiles.styles.TableRenderingOrder}); - /** - * - * @returns - */ - clone():any; - /** - * Create a copy of the background style when this style instance is cloned - * @param style The original background node style - * @returns This implementation always returns the original style instance. - * @protected - */ - copyBackgroundStyle(style:yfiles.styles.INodeStyle):yfiles.styles.INodeStyle; - /** - * Create a copy of the table when this style instance is cloned - * @param table The original table instance - * @returns This implementation always tries to {@link #clone} clone the original table instance, if possible, - * otherwise it returns table unchanged. - * @protected - */ - copyTable(table:yfiles.graph.ITable):yfiles.graph.ITable; - /** - * Raises the {@link yfiles.styles.TableNodeStyle#addPropertyChangedListener PropertyChanged} event. - *

- * Called when the value of the {@link yfiles.styles.TableNodeStyle#table} property changes. - *

- * @param evt The {@link } instance containing the event data. - * @protected - */ - onPropertyChanged(evt:yfiles.lang.PropertyChangedEventArgs):void; - /** - * Gets or sets the order in which rows and columns are rendered. - * @default yfiles.styles.TableRenderingOrder.COLUMNS_FIRST - * @type {yfiles.styles.TableRenderingOrder} - */ - tableRenderingOrder:yfiles.styles.TableRenderingOrder; - /** - * Gets or sets the style that is used to draw the background of the table - * @default 'TableNodeStyle.defaultBackgroundStyle' - * @type {yfiles.styles.INodeStyle} - */ - backgroundStyle:yfiles.styles.INodeStyle; - /** - * Adds the given listener for the PropertyChanged event that occurs when the value of the {@link yfiles.styles.TableNodeStyle#table} property changes. - * @param listener The listener to add. - * @see yfiles.styles.TableNodeStyle#removePropertyChangedListener - */ - addPropertyChangedListener(listener:(sender:any,args:yfiles.lang.PropertyChangedEventArgs)=>void):void; - /** - * Removes the given listener for the PropertyChanged event that occurs when the value of the {@link yfiles.styles.TableNodeStyle#table} property changes. - * @param listener The listener to remove. - * @see yfiles.styles.TableNodeStyle#addPropertyChangedListener - */ - removePropertyChangedListener(listener:(sender:any,args:yfiles.lang.PropertyChangedEventArgs)=>void):void; - /** - * Gets or sets the {@link yfiles.graph.ITable} instance that defines the tabular structure. - * @type {yfiles.graph.ITable} - */ - table:yfiles.graph.ITable; - /** - * - * @type {yfiles.styles.INodeStyleRenderer} - */ - renderer:yfiles.styles.INodeStyleRenderer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.TableNodeStyle; - } - /** - * Default renderer implementation that can be used for {@link yfiles.styles.TableNodeStyle} instances. - * @class - * @implements {yfiles.styles.INodeStyleRenderer} - * @implements {yfiles.styles.IShapeGeometry} - * @implements {yfiles.view.IBoundsProvider} - * @implements {yfiles.view.IVisibilityTestable} - * @implements {yfiles.input.IMarqueeTestable} - * @implements {yfiles.input.IHitTestable} - * @implements {yfiles.graph.ILookup} - * @implements {yfiles.view.IVisualCreator} - */ - export interface TableNodeStyleRenderer extends yfiles.lang.Object,yfiles.styles.INodeStyleRenderer,yfiles.styles.IShapeGeometry,yfiles.view.IBoundsProvider,yfiles.view.IVisibilityTestable,yfiles.input.IMarqueeTestable,yfiles.input.IHitTestable,yfiles.graph.ILookup,yfiles.view.IVisualCreator{} - export class TableNodeStyleRenderer { - /** - * Prepares this instance for subsequent calls after the style and node have been initialized. - *

- * Upon invocation the {@link yfiles.styles.TableNodeStyleRenderer#style} and {@link yfiles.styles.TableNodeStyleRenderer#node} properties have been populated by the {@link yfiles.styles.TableNodeStyleRenderer#getVisualCreator}, - * {@link yfiles.styles.TableNodeStyleRenderer#getBoundsProvider}, {@link yfiles.styles.TableNodeStyleRenderer#getHitTestable}, or {@link yfiles.styles.TableNodeStyleRenderer#getMarqueeTestable} - * methods. - *

- *

- * This is an empty implementation. Subclasses might have to override this method. - *

- * @protected - */ - configure():void; - /** - * - * @param context - * @returns - */ - createVisual(context:yfiles.view.IRenderContext):yfiles.view.Visual; - /** - * Get the {@link yfiles.styles.INodeStyle background style} that is currently used by this renderer. - *

- * This implementation retrieves the {@link yfiles.styles.TableNodeStyle#backgroundStyle} from the owning style - *

- * @returns The {@link background style} that is currently used by this renderer. - * @protected - */ - getBackgroundStyle():yfiles.styles.INodeStyle; - /** - * - * @param context - * @returns - */ - getBounds(context:yfiles.view.ICanvasContext):yfiles.geometry.Rect; - /** - * - * @param node - * @param style - * @returns - */ - getBoundsProvider(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IBoundsProvider; - /** - * - * @param node - * @param style - * @returns - */ - getContext(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.graph.ILookup; - /** - * - * @param node - * @param style - * @returns - */ - getHitTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IHitTestable; - /** - * - * @param inner - * @param outer - * @returns - */ - getIntersection(inner:yfiles.geometry.Point,outer:yfiles.geometry.Point):yfiles.geometry.Point; - /** - * - * @param node - * @param style - * @returns - */ - getMarqueeTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IMarqueeTestable; - /** - * - * @returns - */ - getOutline():yfiles.geometry.GeneralPath; - /** - * - * @param node - * @param style - * @returns - */ - getShapeGeometry(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.styles.IShapeGeometry; - /** - * Gets the table object that should be used for rendering. - *

- * This implementation delegates to the Table provided by the {@link yfiles.styles.TableNodeStyle#table} property. - *

- * @returns The table that should be used for the rendering process. - * @protected - */ - getTable():yfiles.graph.ITable; - /** - * Get the {@link yfiles.styles.TableRenderingOrder} that is currently used by this renderer. - *

- * This implementation retrieves the {@link yfiles.styles.TableRenderingOrder} from the owning style - *

- * @returns The {@link } that is currently used by this renderer. - * @protected - */ - getTableRenderingOrder():yfiles.styles.TableRenderingOrder; - /** - * - * @param node - * @param style - * @returns - */ - getVisibilityTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisibilityTestable; - /** - * - * @param node - * @param style - * @returns - */ - getVisualCreator(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisualCreator; - /** - * - * @param context - * @param location - * @returns - */ - isHit(context:yfiles.input.IInputModeContext,location:yfiles.geometry.Point):boolean; - /** - * - * @param context - * @param rectangle - * @returns - */ - isInBox(context:yfiles.input.IInputModeContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * - * @param location - * @returns - */ - isInside(location:yfiles.geometry.Point):boolean; - /** - * - * @param context - * @param rectangle - * @returns - */ - isVisible(context:yfiles.view.ICanvasContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * - * @param type - * @returns - */ - lookup(type:yfiles.lang.Class):any; - /** - * - * @param context - * @param oldVisual - * @returns - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual):yfiles.view.Visual; - /** - * Gets or sets the currently configured style. - * @protected - * @type {yfiles.styles.TableNodeStyle} - */ - style:yfiles.styles.TableNodeStyle; - /** - * Gets or sets the currently configured node. - * @protected - * @type {yfiles.graph.INode} - */ - node:yfiles.graph.INode; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.TableNodeStyleRenderer; - } - /** - * The context of a TemplateBinding. This interface exposes properties of a graph element onto which a TemplateBinding can - * be bound. - * @interface - * @implements {yfiles.lang.IPropertyObservable} - */ - export interface ITemplateStyleBindingContext extends yfiles.lang.Object,yfiles.lang.IPropertyObservable{ - /** - * Gets the width of the visual. - * @abstract - * @type {number} - */ - width:number; - /** - * Gets the height of the visual. - * @abstract - * @type {number} - */ - height:number; - /** - * Gets or sets the {@link yfiles.view.CanvasComponent} instance this instance is used in. - * @abstract - * @type {yfiles.view.CanvasComponent} - */ - canvasComponent:yfiles.view.CanvasComponent; - /** - * Gets or sets a value indicating whether the item is currently selected. - *

- * This state is bound to the {@link yfiles.view.IGraphSelection} which is used in the {@link yfiles.styles.ITemplateStyleBindingContext#canvasComponent} this visual is being used in. Setting this - * value will write through to the {@link yfiles.view.IGraphSelection}. - *

- * @abstract - * @type {boolean} - */ - itemSelected:boolean; - /** - * Gets or sets a value indicating whether the item is the currently focused item in the {@link yfiles.view.GraphComponent}. - *

- * This state is bound to the {@link yfiles.view.GraphComponent#currentItem} which is used in the {@link yfiles.styles.ITemplateStyleBindingContext#canvasComponent} this visual is being used in. Setting this value will write through to - * the {@link yfiles.view.GraphComponent#currentItem}. - *

- * @abstract - * @type {boolean} - */ - itemFocused:boolean; - /** - * Gets or sets a value indicating whether the item is currently highlighted. - *

- * This state is bound to the {@link yfiles.view.HighlightIndicatorManager.} which is used in the {@link yfiles.styles.ITemplateStyleBindingContext#canvasComponent} this visual is being used in. Setting this value will write through to - * the {@link yfiles.view.HighlightIndicatorManager.}'s {@link yfiles.view.HighlightIndicatorManager.#selectionModel} - *

- * @abstract - * @type {boolean} - */ - itemHighlighted:boolean; - /** - * Gets or sets the item that is rendered by this instance. - * @abstract - * @type {yfiles.graph.IModelItem} - */ - item:yfiles.graph.IModelItem; - /** - * Gets or sets the style tag that is associated with the style that created this visual. - *

- * This property can be used by implementers as a convenient property to pass data to the visual. - *

- * @abstract - * @type {any} - */ - styleTag:any; - } - var ITemplateStyleBindingContext:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.styles.ITemplateStyleBindingContext; - }; - /** - * Enhances the context of a TemplateBinding ({@link yfiles.styles.ITemplateStyleBindingContext}) for labels. This interface - * exposes additional properties of a label onto which a TemplateBinding can be bound. - * @interface - * @implements {yfiles.lang.IPropertyObservable} - */ - export interface ILabelTemplateStyleBindingContext extends yfiles.lang.Object,yfiles.lang.IPropertyObservable{ - /** - * Gets or sets the label text property that is populated using the {@link yfiles.graph.ILabel}'s {@link yfiles.graph.ILabel#text} property. - * @abstract - * @type {string} - */ - labelText:string; - /** - * Gets a value indicating whether this instance has been flipped so that it points upwards. - * @abstract - * @type {boolean} - */ - isFlipped:boolean; - /** - * Gets a value indicating whether this instance is currently rendered upside down. - * @abstract - * @type {boolean} - */ - isUpsideDown:boolean; - } - var ILabelTemplateStyleBindingContext:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.styles.ILabelTemplateStyleBindingContext; - }; - /** - * Base class for label styles that use a SVG snippet as template for the visualization of {@link yfiles.graph.ILabel}s. - * @see yfiles.styles.TemplateLabelStyle - * @see yfiles.styles.StringTemplateLabelStyle - * @class - * @implements {yfiles.styles.ILabelStyle} - * @implements {yfiles.lang.IPropertyObservable} - * @implements {yfiles.lang.ICloneable} - */ - export interface TemplateLabelStyleBase extends yfiles.lang.Object,yfiles.styles.ILabelStyle,yfiles.lang.IPropertyObservable,yfiles.lang.ICloneable{} - export class TemplateLabelStyleBase { - /** - * Constructs a new instance using the provided renderer. - * @param renderer - */ - constructor(renderer:yfiles.styles.TemplateLabelStyleRenderer); - /** - * Constructs a new instance of this style with default values. - * @protected - */ - constructor(); - /** - * Performs a shallow clone of this instance, except for the value of {@link yfiles.styles.TemplateLabelStyleBase#styleTag} which is cloned, too, if it can be cloned. - * @returns A clone of this instance. - */ - clone():any; - /** - * Factory method that is called by the {@link yfiles.styles.TemplateLabelStyleRenderer} to create the visual that will be used for - * the display of the label. - * @param context The context for which the visual should be created. - * @param label The label that will be rendered. - * @returns The readily styled visual. - */ - createTemplate(context:yfiles.view.IRenderContext,label:yfiles.graph.ILabel):yfiles.view.SvgVisual; - /** - * Convenience method that determines the preferred size of the label if this style was applied. - * @param context The context for which the size should be calculated. - * @param label The label to determine the preferred size of. - * @returns The preferred size. - */ - getPreferredSize(context:yfiles.view.IRenderContext,label:yfiles.graph.ILabel):yfiles.geometry.Size; - /** - * Loads all template script elements that have not been parsed, yet, and creates the respective template cache objects. - *

- * This method can be called to perform the template loading at a certain point in time, for example during application - * startup. By default, a template is loaded lazily when the first visual using this template is built. - *

- * @static - */ - static loadAllTemplates():void; - /** - * Raises the {@link yfiles.styles.TemplateLabelStyleBase#addPropertyChangedListener PropertyChanged} event. - * @param evt The {@link } instance containing the event data. - * @protected - */ - onPropertyChanged(evt:yfiles.lang.PropertyChangedEventArgs):void; - /** - * Adds the given listener for the PropertyChanged event that occurs when a property value changes. - * @param listener The listener to add. - * @see yfiles.styles.TemplateLabelStyleBase#removePropertyChangedListener - */ - addPropertyChangedListener(listener:(sender:any,args:yfiles.lang.PropertyChangedEventArgs)=>void):void; - /** - * Removes the given listener for the PropertyChanged event that occurs when a property value changes. - * @param listener The listener to remove. - * @see yfiles.styles.TemplateLabelStyleBase#addPropertyChangedListener - */ - removePropertyChangedListener(listener:(sender:any,args:yfiles.lang.PropertyChangedEventArgs)=>void):void; - /** - * Gets or sets the tag that is associated with this style instance. - *

- * The various style renderer implementations can use this tag to make it accessible in the context of the instantiated - * templates and controls. The framework does not make any assumptions about the value of this property. It is there for - * convenient use in the process of data binding the templates. This property supports {@link yfiles.lang.IPropertyObservable property change notification} and can - * thus be data bound easily. - *

- * @default null - * @type {any} - */ - styleTag:any; - /** - * Gets or sets an implementation of {@link yfiles.graph.IContextLookup} that can be used to satisfy queries that are made to the - * implementation which is returned by calls to {@link yfiles.styles.ILabelStyleRenderer#getContext} that are made on the style - * renderer that is associated with this style instance. - *

- * This can be used to conveniently customize the lookup behavior of the style renderers that are associated with this - * instance. The default value is {@link yfiles.graph.IContextLookup#EMPTY_CONTEXT_LOOKUP} - *

- * @default 'Lookups.EmptyContextLookup' - * @type {yfiles.graph.IContextLookup} - */ - contextLookup:yfiles.graph.IContextLookup; - /** - * Gets or sets the normalized outline of a label that will be displayed using the created visual. - *

- * The shape will automatically arranged and transformed to have the bounds of the label. This shape will be used to - * satisfy requests to {@link yfiles.input.IMarqueeTestable#isInBox} and {@link yfiles.input.IHitTestable#isHit} and may be left null to - * indicate default (rectangular) behavior. - *

- *

- * The default value is null. - *

- * @default null - * @type {yfiles.geometry.GeneralPath} - */ - normalizedOutline:yfiles.geometry.GeneralPath; - /** - * Gets or sets a value indicating whether the rendering should automatically be flipped (rotated by 180 degrees) if - * otherwise it would be rendered upside-down. - *

- * The default value is true. - *

- * @default true - * @type {boolean} - */ - autoFlip:boolean; - /** - * Gets or sets the preferred size of the labels that use this style. - * @type {yfiles.geometry.Size} - */ - preferredSize:yfiles.geometry.Size; - /** - * - * @type {yfiles.styles.ILabelStyleRenderer} - */ - renderer:yfiles.styles.ILabelStyleRenderer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.TemplateLabelStyleBase; - } - /** - * An {@link yfiles.styles.ILabelStyle} implementation that uses an SVG snippet as template for the visualization of - * {@link yfiles.graph.ILabel}s. - *

- * The {@link yfiles.styles.TemplateLabelStyle#styleResourceKey} is used to determine the template that will be applied to the component. The template must be specified in the DOM - * in a script tag with type='text/yfiles-template'. - *

- *

- * The SVG template snippet can contain bindings in the form attribute="{Binding propertyName}" that bind the attribute - * value to the value of the property with the given name in the node's tag. - *

- *

- * TemplateBindings in the form attribute="{TemplateBinding propertyName}" bind the attribute value to a set of - * well-defined properties of the label that are provided by the style. The available template binding properties are: - *

- *
    - *
  • width: The width of the graph element
  • - *
  • height: The height of the graph element
  • - *
  • bounds: The bounding rectangle of the graph element
  • - *
  • canvas: The {@link yfiles.view.GraphComponent} the element is rendered in
  • - *
  • itemSelected: Whether the element is selected
  • - *
  • itemFocused: Whether the element has the focus
  • - *
  • itemHighlighted: Whether the element is highlighted
  • - *
  • styleTag: The tag associated with the element's style instance
  • - *
  • labelText: The label text property that is populated using the {@link yfiles.graph.ILabel}'s {@link yfiles.graph.ILabel#text} property
  • - *
  • isFlipped: Whether the element has been flipped
  • - *
  • isUpsideDown: Whether the element is currently rendered upside down
  • - *
- * @class - * @extends {yfiles.styles.TemplateLabelStyleBase} - */ - export interface TemplateLabelStyle extends yfiles.styles.TemplateLabelStyleBase{} - export class TemplateLabelStyle { - /** - * Creates a new instance using the given render template id and a custom renderer instance. - * @param renderTemplateId The id of the SVG snippet that will be used for the component. - * @param renderer The custom renderer for this style instance. - */ - constructor(renderTemplateId:string,renderer:yfiles.styles.TemplateLabelStyleRenderer); - /** - * Creates a new instance using the given render template id and a custom renderer instance. - * @param {Object} options The parameters to pass. - * @param options.renderTemplateId The id of the SVG snippet that will be used for the component. - * @param options.renderer The custom renderer for this style instance. - * @param {boolean} options.autoFlip A value indicating whether the rendering should automatically be flipped (rotated by 180 degrees) if otherwise it would be rendered upside-down. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#autoFlip} property on the created object. - *

- * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a label that will be displayed using the created visual. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#normalizedOutline} property on the created object. - *

- * @param {yfiles.geometry.Size} options.preferredSize The preferred size of the labels that use this style. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#preferredSize} property on the created object. - *

- */ - constructor(options:{renderTemplateId:string,renderer:yfiles.styles.TemplateLabelStyleRenderer,autoFlip?:boolean,normalizedOutline?:yfiles.geometry.GeneralPath,preferredSize?:yfiles.geometry.Size}); - /** - * Creates a new instance using the given render template id. - * @param renderTemplateId The id of the render template that will be used for the component. - */ - constructor(renderTemplateId:string); - /** - * Creates a new instance using the given render template id. - * @param {Object} options The parameters to pass. - * @param options.renderTemplateId The id of the render template that will be used for the component. - * @param {boolean} options.autoFlip A value indicating whether the rendering should automatically be flipped (rotated by 180 degrees) if otherwise it would be rendered upside-down. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#autoFlip} property on the created object. - *

- * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a label that will be displayed using the created visual. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#normalizedOutline} property on the created object. - *

- * @param {yfiles.geometry.Size} options.preferredSize The preferred size of the labels that use this style. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#preferredSize} property on the created object. - *

- */ - constructor(options:{renderTemplateId:string,autoFlip?:boolean,normalizedOutline?:yfiles.geometry.GeneralPath,preferredSize?:yfiles.geometry.Size}); - /** - * Creates a new instance with no render template id and {@link yfiles.styles.TemplateLabelStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {boolean} options.autoFlip A value indicating whether the rendering should automatically be flipped (rotated by 180 degrees) if otherwise it would be rendered upside-down. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#autoFlip} property on the created object. - *

- * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a label that will be displayed using the created visual. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#normalizedOutline} property on the created object. - *

- * @param {yfiles.geometry.Size} options.preferredSize The preferred size of the labels that use this style. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#preferredSize} property on the created object. - *

- * @param {string} options.styleResourceKey The {@link string} that will be used to look up the template that is applied to the component. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyle#styleResourceKey} property on the created object. - *

- */ - constructor(options?:{autoFlip?:boolean,normalizedOutline?:yfiles.geometry.GeneralPath,preferredSize?:yfiles.geometry.Size,styleResourceKey?:string}); - /** - * Gets or sets the {@link string} that will be used to look up the template that is applied to the component. - *

- * The default value is null. - *

- * @default null - * @type {string} - */ - styleResourceKey:string; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.TemplateLabelStyle; - } - /** - * An {@link yfiles.styles.ILabelStyle} that uses an SVG snippet as template for the visualization of {@link yfiles.graph.ILabel}s. - *

- * In contrast to {@link yfiles.styles.TemplateLabelStyle}, the SVG template used by this style must be encoded as string and set - * to the {@link yfiles.styles.StringTemplateLabelStyle#svgContent} property. - *

- *

- * It is vital that the {@link yfiles.styles.StringTemplateLabelStyle#svgContent SVG snippet} does not declare the SVG namespace itself. Its content is parsed in a dummy namespace - * in order to avoid immediate validation of the result. The resulting SVG elements are automatically created in the SVG - * namespace before they are added to the DOM. - *

- *

- * The SVG template snippet can contain bindings in the form attribute="{Binding propertyName}" that bind the attribute - * value to the value of the property with the given name in the node's tag. - *

- *

- * TemplateBindings in the form attribute="{TemplateBinding propertyName}" bind the attribute value to a set of - * well-defined properties of the label that are provided by the style. The available template binding properties are: - *

- *
    - *
  • width: The width of the graph element
  • - *
  • height: The height of the graph element
  • - *
  • bounds: The bounding rectangle of the graph element
  • - *
  • canvas: The {@link yfiles.view.GraphComponent} the element is rendered in
  • - *
  • itemSelected: Whether the element is selected
  • - *
  • itemFocused: Whether the element has the focus
  • - *
  • itemHighlighted: Whether the element is highlighted
  • - *
  • styleTag: The tag associated with the element's style instance
  • - *
  • labelText: The label text property that is populated using the {@link yfiles.graph.ILabel}'s {@link yfiles.graph.ILabel#text} property
  • - *
  • isFlipped: Whether this instance has been flipped so that it points upwards
  • - *
  • isUpsideDown: Whether this instance is currently rendered upside down
  • - *
- * @class - * @extends {yfiles.styles.TemplateLabelStyleBase} - */ - export interface StringTemplateLabelStyle extends yfiles.styles.TemplateLabelStyleBase{} - export class StringTemplateLabelStyle { - /** - * Creates a new instance using the provided renderer. - * @param renderer The custom renderer for this style instance. - */ - constructor(renderer:yfiles.styles.TemplateLabelStyleRenderer); - /** - * Creates a new instance using the provided renderer. - * @param {Object} options The parameters to pass. - * @param options.renderer The custom renderer for this style instance. - * @param {boolean} options.autoFlip A value indicating whether the rendering should automatically be flipped (rotated by 180 degrees) if otherwise it would be rendered upside-down. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#autoFlip} property on the created object. - *

- * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a label that will be displayed using the created visual. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#normalizedOutline} property on the created object. - *

- * @param {yfiles.geometry.Size} options.preferredSize The preferred size of the labels that use this style. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#preferredSize} property on the created object. - *

- * @param {string} options.svgContent The SVG content that is the template for the label visualization. - *

- * This option sets the {@link yfiles.styles.StringTemplateLabelStyle#svgContent} property on the created object. - *

- */ - constructor(options:{renderer:yfiles.styles.TemplateLabelStyleRenderer,autoFlip?:boolean,normalizedOutline?:yfiles.geometry.GeneralPath,preferredSize?:yfiles.geometry.Size,svgContent?:string}); - /** - * Initializes a new instance of this class and sets the given string as its {@link yfiles.styles.StringTemplateLabelStyle#svgContent}. - * @param svgContent The SVG snippet to use as template. - */ - constructor(svgContent:string); - /** - * Initializes a new instance of this class and sets the given string as its {@link yfiles.styles.StringTemplateLabelStyle#svgContent}. - * @param {Object} options The parameters to pass. - * @param options.svgContent The SVG snippet to use as template. - * @param {boolean} options.autoFlip A value indicating whether the rendering should automatically be flipped (rotated by 180 degrees) if otherwise it would be rendered upside-down. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#autoFlip} property on the created object. - *

- * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a label that will be displayed using the created visual. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#normalizedOutline} property on the created object. - *

- * @param {yfiles.geometry.Size} options.preferredSize The preferred size of the labels that use this style. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#preferredSize} property on the created object. - *

- */ - constructor(options:{svgContent:string,autoFlip?:boolean,normalizedOutline?:yfiles.geometry.GeneralPath,preferredSize?:yfiles.geometry.Size}); - /** - * Initializes a new instance of this class. - * @param {Object} [options=null] The parameters to pass. - * @param {boolean} options.autoFlip A value indicating whether the rendering should automatically be flipped (rotated by 180 degrees) if otherwise it would be rendered upside-down. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#autoFlip} property on the created object. - *

- * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a label that will be displayed using the created visual. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#normalizedOutline} property on the created object. - *

- * @param {yfiles.geometry.Size} options.preferredSize The preferred size of the labels that use this style. - *

- * This option sets the {@link yfiles.styles.TemplateLabelStyleBase#preferredSize} property on the created object. - *

- * @param {string} options.svgContent The SVG content that is the template for the label visualization. - *

- * This option sets the {@link yfiles.styles.StringTemplateLabelStyle#svgContent} property on the created object. - *

- */ - constructor(options?:{autoFlip?:boolean,normalizedOutline?:yfiles.geometry.GeneralPath,preferredSize?:yfiles.geometry.Size,svgContent?:string}); - /** - * Gets or sets the SVG content that is the template for the label visualization. - * @default null - * @type {string} - */ - svgContent:string; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.StringTemplateLabelStyle; - } - /** - * An implementation of the {@link yfiles.styles.ILabelStyleRenderer} interface that can render {@link yfiles.styles.TemplateLabelStyleBase} - * instances. - * @see yfiles.styles.TemplateLabelStyle - * @see yfiles.styles.StringTemplateLabelStyle - * @class - * @implements {yfiles.styles.ILabelStyleRenderer} - * @implements {yfiles.view.IVisualCreator} - * @implements {yfiles.view.IBoundsProvider} - * @implements {yfiles.input.IHitTestable} - * @implements {yfiles.input.IMarqueeTestable} - * @implements {yfiles.view.IVisibilityTestable} - * @implements {yfiles.graph.ILookup} - */ - export interface TemplateLabelStyleRenderer extends yfiles.lang.Object,yfiles.styles.ILabelStyleRenderer,yfiles.view.IVisualCreator,yfiles.view.IBoundsProvider,yfiles.input.IHitTestable,yfiles.input.IMarqueeTestable,yfiles.view.IVisibilityTestable,yfiles.graph.ILookup{} - export class TemplateLabelStyleRenderer { - /** - * Stores the {@link yfiles.graph.ILabel#layout layout}. - *

- * Subclasses should override this method, call the super implementation and configure their painting entities. - *

- * @protected - */ - configure():void; - /** - * Creates the visual by delegating to {@link yfiles.styles.TemplateLabelStyleBase#createTemplate} and then initializing the - * control with the context. - * @param context The context for the creation. - * @returns The visual that is used for rendering the label. - */ - createVisual(context:yfiles.view.IRenderContext):yfiles.view.Visual; - /** - * - * @param context - * @returns - */ - getBounds(context:yfiles.view.ICanvasContext):yfiles.geometry.Rect; - /** - * Configures the {@link yfiles.styles.TemplateLabelStyleRenderer#style} and {@link yfiles.styles.TemplateLabelStyleRenderer#label} properties, calls {@link yfiles.styles.TemplateLabelStyleRenderer#configure} and returns this. - * @param label The label to retrieve the bounds provider for. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplateLabelStyleRenderer#getBounds - */ - getBoundsProvider(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.view.IBoundsProvider; - /** - * Configures the {@link yfiles.styles.TemplateLabelStyleRenderer#style} and {@link yfiles.styles.TemplateLabelStyleRenderer#label} properties, does not call {@link yfiles.styles.TemplateLabelStyleRenderer#configure} and returns this. - *

- * As this method may be called often it will not automatically call {@link yfiles.styles.TemplateLabelStyleRenderer#configure}, - * instead subclasses should ensure that in the {@link yfiles.styles.TemplateLabelStyleRenderer#lookup} method call they should - * call {@link yfiles.styles.TemplateLabelStyleRenderer#configure} only if needed, i.e. if they decide to return this or an - * instance that depends on a correctly configured this. - *

- * @param label The label to query the context for. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplateLabelStyleRenderer#lookup - */ - getContext(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.graph.ILookup; - /** - * Configures the {@link yfiles.styles.TemplateLabelStyleRenderer#style} and {@link yfiles.styles.TemplateLabelStyleRenderer#label} properties, calls {@link yfiles.styles.TemplateLabelStyleRenderer#configure} and returns this. - * @param label The label to query hit test with. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplateLabelStyleRenderer#isHit - */ - getHitTestable(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.input.IHitTestable; - /** - * Configures the {@link yfiles.styles.TemplateLabelStyleRenderer#style} and {@link yfiles.styles.TemplateLabelStyleRenderer#label} properties, calls {@link yfiles.styles.TemplateLabelStyleRenderer#configure} and returns this. - * @param label The label to query marquee intersection tests. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplateLabelStyleRenderer#isInBox - */ - getMarqueeTestable(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.input.IMarqueeTestable; - /** - * Gets the normalized outline by delegating to {@link yfiles.styles.TemplateLabelStyleBase#normalizedOutline}. - * @param style - * @returns - * @protected - */ - getNormalizedOutline(style:yfiles.styles.TemplateLabelStyleBase):yfiles.geometry.GeneralPath; - /** - * Calculates the preferred size for the given label and style. - * @param label The label instance. - * @param style The style instance to apply. - * @returns The preferred size for the given label and style. - * @see yfiles.styles.TemplateLabelStyleRenderer#getPreferredSizeCore - */ - getPreferredSize(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.geometry.Size; - /** - * Gets the size of the preferred for the current configuration using the provided context. - * @param context The context. - * @returns - * @protected - */ - getPreferredSizeCore(context:yfiles.view.IRenderContext):yfiles.geometry.Size; - /** - * Calculates the preferred size for the given label and style. - * @param context - * @param label The label instance. - * @param style The style instance to apply. - * @returns The preferred size for the given label and style. - * @see yfiles.styles.TemplateLabelStyleRenderer#getPreferredSizeCore - */ - getPreferredSizeWithContext(context:yfiles.view.IRenderContext,label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.geometry.Size; - /** - * Configures the {@link yfiles.styles.TemplateLabelStyleRenderer#style} and {@link yfiles.styles.TemplateLabelStyleRenderer#label} properties, does not call {@link yfiles.styles.TemplateLabelStyleRenderer#configure} and returns this. - *

- * Unlike most of the other methods this implementation does not call {@link yfiles.styles.TemplateLabelStyleRenderer#configure}. If - * the subclass implementation depends on this instance to be configured, it needs to call Configure in - * {@link yfiles.styles.TemplateLabelStyleRenderer#isVisible}. - *

- * @param label The label to query visibility tests. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplateLabelStyleRenderer#isVisible - */ - getVisibilityTestable(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.view.IVisibilityTestable; - /** - * Configures the {@link yfiles.styles.TemplateLabelStyleRenderer#style} and {@link yfiles.styles.TemplateLabelStyleRenderer#label} properties, calls {@link yfiles.styles.TemplateLabelStyleRenderer#configure} and returns this. - * @param label The label to retrieve the {@link } for. The value will be stored in the {@link #label} property. - * @param style The style to associate with the label. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplateLabelStyleRenderer#createVisual - * @see yfiles.styles.TemplateLabelStyleRenderer#updateVisual - */ - getVisualCreator(label:yfiles.graph.ILabel,style:yfiles.styles.ILabelStyle):yfiles.view.IVisualCreator; - /** - * Delegates to the {@link yfiles.styles.TemplateLabelStyleBase}'s {@link yfiles.styles.TemplateLabelStyleBase#autoFlip} property. - * @param style - * @returns - * @protected - */ - isAutoFlip(style:yfiles.styles.TemplateLabelStyleBase):boolean; - /** - * - * @param context - * @param location - * @returns - */ - isHit(context:yfiles.input.IInputModeContext,location:yfiles.geometry.Point):boolean; - /** - * - * @param context - * @param rectangle - * @returns - */ - isInBox(context:yfiles.input.IInputModeContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Uses the {@link yfiles.graph.ILabel#layout layout} to determine whether the clip intersects. - * @param context - * @param rectangle - * @returns - */ - isVisible(context:yfiles.view.ICanvasContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Delegates to the {@link yfiles.styles.TemplateLabelStyleBase#contextLookup} of the {@link yfiles.styles.ILabelStyle}. - * @param type The type to query an instance for. - * @returns The implementation or null. - */ - lookup(type:yfiles.lang.Class):any; - /** - * Delegates to the {@link yfiles.styles.TemplateLabelStyleBase}'s {@link yfiles.styles.TemplateLabelStyleBase#contextLookup}. - * @param style The style to look up the context for. - * @param label The current label. - * @param type The type to look up. - * @returns The result from the context or null. - * @protected - */ - lookupContext(style:yfiles.styles.TemplateLabelStyleBase,label:yfiles.graph.ILabel,type:yfiles.lang.Class):any; - /** - * Updates the visual correspondingly. - * @param context The context for the creation. - * @param oldVisual The currently rendered visual. - * @returns The visual that is used for rendering the label. - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual):yfiles.view.Visual; - /** - * Gets the layout of the current label. - *

- * This value is set during {@link yfiles.styles.TemplateLabelStyleRenderer#configure} to the label's {@link yfiles.graph.ILabel#layout layout} - *

- * @protected - * @type {yfiles.geometry.IOrientedRectangle} - */ - layout:yfiles.geometry.IOrientedRectangle; - /** - * Gets or sets the currently configured style. - * @protected - * @type {yfiles.styles.TemplateLabelStyleBase} - */ - style:yfiles.styles.TemplateLabelStyleBase; - /** - * Gets or sets the currently configured label. - * @protected - * @type {yfiles.graph.ILabel} - */ - label:yfiles.graph.ILabel; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.TemplateLabelStyleRenderer; - } - /** - * Base class for node styles that use a SVG snippet as template for the visualization of {@link yfiles.graph.INode}s. - * @see yfiles.styles.TemplateNodeStyle - * @see yfiles.styles.StringTemplateNodeStyle - * @class - * @implements {yfiles.styles.INodeStyle} - * @implements {yfiles.lang.IPropertyObservable} - * @implements {yfiles.lang.ICloneable} - */ - export interface TemplateNodeStyleBase extends yfiles.lang.Object,yfiles.styles.INodeStyle,yfiles.lang.IPropertyObservable,yfiles.lang.ICloneable{} - export class TemplateNodeStyleBase { - /** - * Constructs a new instance using the provided renderer. - * @param renderer - * @protected - */ - constructor(renderer:yfiles.styles.TemplateNodeStyleRenderer); - /** - * Constructs a new instance of this style with default values. - * @protected - */ - constructor(); - /** - * Performs a shallow clone of this instance, except for the value of {@link yfiles.styles.TemplateNodeStyleBase#styleTag} which is cloned, too, if it can be cloned. - * @returns A clone of this instance. - */ - clone():any; - /** - * Factory method that is called by the {@link yfiles.styles.TemplateNodeStyleRenderer} to create the visual that will be used for - * the display of the node. - * @param context The context for which the visual should be created. - * @param node The node that will be rendered. - * @returns The readily styled visual. - */ - createTemplate(context:yfiles.view.IRenderContext,node:yfiles.graph.INode):yfiles.view.SvgVisual; - /** - * Convenience method that determines the preferred size of the node if this style was applied. - * @param context The context for which the size should be calculated. Can be obtained through - * {@link #createRenderContext}. - * @param node The node to determine the preferred size of. Can be a live node or an {@link }. - * @returns The preferred size. - * @see yfiles.view.CanvasComponent#createRenderContext - */ - getPreferredSize(context:yfiles.view.IRenderContext,node:yfiles.graph.INode):yfiles.geometry.Size; - /** - * Loads all template script elements that have not been parsed, yet, and creates the respective template cache objects. - *

- * This method can be called to perform the template loading at a certain point in time, for example during application - * startup. By default, a template is loaded lazily when the first visual using this template is built. - *

- * @static - */ - static loadAllTemplates():void; - /** - * Raises the {@link yfiles.styles.TemplateNodeStyleBase#addPropertyChangedListener PropertyChanged} event. - * @param evt The {@link } instance containing the event data. - * @protected - */ - onPropertyChanged(evt:yfiles.lang.PropertyChangedEventArgs):void; - /** - * Adds the given listener for the PropertyChanged event that occurs when a property value changes. - * @param listener The listener to add. - * @see yfiles.styles.TemplateNodeStyleBase#removePropertyChangedListener - */ - addPropertyChangedListener(listener:(sender:any,args:yfiles.lang.PropertyChangedEventArgs)=>void):void; - /** - * Removes the given listener for the PropertyChanged event that occurs when a property value changes. - * @param listener The listener to remove. - * @see yfiles.styles.TemplateNodeStyleBase#addPropertyChangedListener - */ - removePropertyChangedListener(listener:(sender:any,args:yfiles.lang.PropertyChangedEventArgs)=>void):void; - /** - * Gets or sets the tag that is associated with this style instance. - *

- * The various style renderer implementations can use this tag to make it accessible in the context of the instantiated - * templates and controls. The framework does not make any assumptions about the value of this property. It is there for - * convenient use in the process of data binding the templates. This property supports {@link yfiles.lang.IPropertyObservable property change notification} and can - * thus be data bound easily. - *

- * @default null - * @type {any} - */ - styleTag:any; - /** - * Gets or sets an implementation of {@link yfiles.graph.IContextLookup} that can be used to satisfy queries that are made to the - * implementation which is returned by calls to {@link yfiles.styles.INodeStyleRenderer#getContext} that are made on the style - * renderer that is associated with this style instance. - *

- * This can be used to conveniently customize the lookup behavior of the style renderers that are associated with this - * instance. E.g. it is possible to provide customized implementations of {@link yfiles.view.ISelectionIndicatorInstaller}, - * {@link yfiles.view.IHighlightIndicatorInstaller}, {@link yfiles.input.IHandleProvider}, {@link yfiles.input.INodeSizeConstraintProvider}, and - * {@link yfiles.input.INodeInsetsProvider}. Simple style implementations can use {@link yfiles.graph.IContextLookup#EMPTY_CONTEXT_LOOKUP} - * but may not use null for this property. The default value is {@link yfiles.graph.IContextLookup#EMPTY_CONTEXT_LOOKUP} - *

- * @default 'Lookups.EmptyContextLookup' - * @type {yfiles.graph.IContextLookup} - */ - contextLookup:yfiles.graph.IContextLookup; - /** - * Gets or sets the insets the {@link yfiles.input.INodeInsetsProvider} implementation for {@link yfiles.graph.INode} should yield for this - * instance. - *

- * This is especially useful if this style is used for {@link yfiles.graph.IGraph#createGroupNode group nodes}, as they require insets for the calculation of the - * bounds. The insets can be used to make sure that child nodes do not cover visual elements of the style inside the - * insets. The default value is an {@link yfiles.geometry.Insets} insets with 5 for all insets. - *

- * @see yfiles.input.INodeInsetsProvider - * @see yfiles.styles.INodeStyleRenderer#getContext - * @default '5' - * @type {yfiles.geometry.Insets} - */ - insets:yfiles.geometry.Insets; - /** - * Gets or sets the minimum size an {@link yfiles.input.INodeSizeConstraintProvider} implementation for {@link yfiles.graph.INode} should - * yield. - *

- * The default value is {@link yfiles.geometry.Size#EMPTY}. - *

- * @see yfiles.input.INodeSizeConstraintProvider - * @default 'Empty' - * @type {yfiles.geometry.Size} - */ - minimumSize:yfiles.geometry.Size; - /** - * Gets or sets the normalized outline of a node that will be displayed using the created visual. - *

- * This shape will be used to satisfy requests to {@link yfiles.input.IMarqueeTestable#isInBox}, {@link yfiles.input.IHitTestable#isHit}, - * as well as for {@link yfiles.styles.IShapeGeometry} methods (which affect edge cropping at the node outline). - *

- *

- * This property may be left at or set to null to indicate default (rectangular) behavior. - *

- *

- * The default value is null. - *

- * @default null - * @type {yfiles.geometry.GeneralPath} - */ - normalizedOutline:yfiles.geometry.GeneralPath; - /** - * - * @type {yfiles.styles.INodeStyleRenderer} - */ - renderer:yfiles.styles.INodeStyleRenderer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.TemplateNodeStyleBase; - } - /** - * A {@link yfiles.styles.INodeStyle} implementation that uses an SVG snippet as template for the visualization of - * {@link yfiles.graph.INode}s. - *

- * The {@link yfiles.styles.TemplateNodeStyle#styleResourceKey} is used to determine the template that will be applied to the {@link yfiles.view.Visual}. The template must be specified in - * the DOM in a script tag with type='text/yfiles-template'. - *

- *

- * The SVG template snippet can contain bindings in the form attribute="{Binding propertyName}" that bind the attribute - * value to the value of the property with the given name in the node's tag. - *

- *

- * TemplateBindings in the form attribute="{TemplateBinding propertyName}" bind the attribute value to a set of - * well-defined properties of the node that are provided by the style. The available template binding properties are: - *

- *
    - *
  • width: The width of the graph element
  • - *
  • height: The height of the graph element
  • - *
  • bounds: The bounding rectangle of the graph element
  • - *
  • canvas: The {@link yfiles.view.GraphComponent} the element is rendered in
  • - *
  • itemSelected: Whether the element is selected
  • - *
  • itemFocused: Whether the element has the focus
  • - *
  • itemHighlighted: Whether the element is highlighted
  • - *
  • styleTag: The tag associated with the element's style instance
  • - *
- *

Related demos:

- *
    - *
  • Demo: OrgChart Demo, Demo.yFiles.Graph.OrgChart
  • - *
  • Demo: Collapse Demo, Demo.yFiles.Graph.Collapse
  • - *
- * @class - * @extends {yfiles.styles.TemplateNodeStyleBase} - */ - export interface TemplateNodeStyle extends yfiles.styles.TemplateNodeStyleBase{} - export class TemplateNodeStyle { - /** - * Creates a new instance using the given render template id and a custom renderer instance. - * @param renderTemplateId The id of the SVG snippet that will be used for the component. - * @param renderer The custom renderer for this instance. - */ - constructor(renderTemplateId:string,renderer:yfiles.styles.TemplateNodeStyleRenderer); - /** - * Creates a new instance using the given render template id and a custom renderer instance. - * @param {Object} options The parameters to pass. - * @param options.renderTemplateId The id of the SVG snippet that will be used for the component. - * @param options.renderer The custom renderer for this instance. - * @param {yfiles.geometry.Insets} options.insets The insets the {@link yfiles.input.INodeInsetsProvider} implementation for {@link yfiles.graph.INode} should yield for this instance. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#insets} property on the created object. - *

- * @param {yfiles.geometry.Size} options.minimumSize The minimum size an {@link yfiles.input.INodeSizeConstraintProvider} implementation for {@link yfiles.graph.INode} should yield. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#minimumSize} property on the created object. - *

- * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a node that will be displayed using the created visual. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#normalizedOutline} property on the created object. - *

- */ - constructor(options:{renderTemplateId:string,renderer:yfiles.styles.TemplateNodeStyleRenderer,insets?:yfiles.geometry.Insets,minimumSize?:yfiles.geometry.Size,normalizedOutline?:yfiles.geometry.GeneralPath}); - /** - * Creates a new instance using the given render template id and {@link yfiles.styles.TemplateNodeStyleRenderer} as renderer. - * @param renderTemplateId The id of the SVG snippet that will be used for the component. - */ - constructor(renderTemplateId:string); - /** - * Creates a new instance using the given render template id and {@link yfiles.styles.TemplateNodeStyleRenderer} as renderer. - * @param {Object} options The parameters to pass. - * @param options.renderTemplateId The id of the SVG snippet that will be used for the component. - * @param {yfiles.geometry.Insets} options.insets The insets the {@link yfiles.input.INodeInsetsProvider} implementation for {@link yfiles.graph.INode} should yield for this instance. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#insets} property on the created object. - *

- * @param {yfiles.geometry.Size} options.minimumSize The minimum size an {@link yfiles.input.INodeSizeConstraintProvider} implementation for {@link yfiles.graph.INode} should yield. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#minimumSize} property on the created object. - *

- * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a node that will be displayed using the created visual. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#normalizedOutline} property on the created object. - *

- */ - constructor(options:{renderTemplateId:string,insets?:yfiles.geometry.Insets,minimumSize?:yfiles.geometry.Size,normalizedOutline?:yfiles.geometry.GeneralPath}); - /** - * Creates a new instance with no render template id key and {@link yfiles.styles.TemplateNodeStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {yfiles.geometry.Insets} options.insets The insets the {@link yfiles.input.INodeInsetsProvider} implementation for {@link yfiles.graph.INode} should yield for this instance. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#insets} property on the created object. - *

- * @param {yfiles.geometry.Size} options.minimumSize The minimum size an {@link yfiles.input.INodeSizeConstraintProvider} implementation for {@link yfiles.graph.INode} should yield. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#minimumSize} property on the created object. - *

- * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a node that will be displayed using the created visual. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#normalizedOutline} property on the created object. - *

- * @param {string} options.styleResourceKey The {@link string} that will be used to look up the template that is applied to the component. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyle#styleResourceKey} property on the created object. - *

- */ - constructor(options?:{insets?:yfiles.geometry.Insets,minimumSize?:yfiles.geometry.Size,normalizedOutline?:yfiles.geometry.GeneralPath,styleResourceKey?:string}); - /** - * Gets or sets the {@link string} that will be used to look up the template that is applied to the component. - *

- * The default value is null. - *

- * @default null - * @type {string} - */ - styleResourceKey:string; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.TemplateNodeStyle; - } - /** - * A {@link yfiles.styles.INodeStyle} that uses an SVG snippet as template for the visualization of {@link yfiles.graph.INode}s. - *

- * In contrast to {@link yfiles.styles.TemplateNodeStyle}, the SVG template used by this style must be encoded as string and set to - * the {@link yfiles.styles.StringTemplateNodeStyle#svgContent} property. - *

- *

- * It is vital that the {@link yfiles.styles.StringTemplateNodeStyle#svgContent SVG snippet} does not declare the SVG namespace itself. Its content is parsed in a dummy namespace - * in order to avoid immediate validation of the result. The resulting SVG elements are automatically created in the SVG - * namespace before they are added to the DOM. - *

- *

- * The SVG template snippet can contain bindings in the form attribute="{Binding propertyName}" that bind the attribute - * value to the value of the property with the given name in the node's tag. - *

- *

- * TemplateBindings in the form attribute="{TemplateBinding propertyName}" bind the attribute value to a set of - * well-defined properties of the node that are provided by the style. The available template binding properties are: - *

- *
    - *
  • width: The width of the graph element
  • - *
  • height: The height of the graph element
  • - *
  • bounds: The bounding rectangle of the graph element
  • - *
  • canvas: The {@link yfiles.view.GraphComponent} the element is rendered in
  • - *
  • itemSelected: Whether the element is selected
  • - *
  • itemFocused: Whether the element has the focus
  • - *
  • itemHighlighted: Whether the element is highlighted
  • - *
  • styleTag: The tag associated with the element's style instance
  • - *
- * @class - * @extends {yfiles.styles.TemplateNodeStyleBase} - */ - export interface StringTemplateNodeStyle extends yfiles.styles.TemplateNodeStyleBase{} - export class StringTemplateNodeStyle { - /** - * Creates a new instance using the given SVG template and a custom renderer instance. - * @param svgContent The SVG snippet that will be used as a template for the component. - * @param renderer The custom renderer for this instance. - */ - constructor(svgContent:string,renderer:yfiles.styles.TemplateNodeStyleRenderer); - /** - * Creates a new instance using the given SVG template and a custom renderer instance. - * @param {Object} options The parameters to pass. - * @param options.svgContent The SVG snippet that will be used as a template for the component. - * @param options.renderer The custom renderer for this instance. - * @param {yfiles.geometry.Insets} options.insets The insets the {@link yfiles.input.INodeInsetsProvider} implementation for {@link yfiles.graph.INode} should yield for this instance. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#insets} property on the created object. - *

- * @param {yfiles.geometry.Size} options.minimumSize The minimum size an {@link yfiles.input.INodeSizeConstraintProvider} implementation for {@link yfiles.graph.INode} should yield. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#minimumSize} property on the created object. - *

- * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a node that will be displayed using the created visual. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#normalizedOutline} property on the created object. - *

- */ - constructor(options:{svgContent:string,renderer:yfiles.styles.TemplateNodeStyleRenderer,insets?:yfiles.geometry.Insets,minimumSize?:yfiles.geometry.Size,normalizedOutline?:yfiles.geometry.GeneralPath}); - /** - * Creates a new instance using the given SVG template and {@link yfiles.styles.TemplateNodeStyleRenderer} as renderer. - * @param svgContent The SVG snippet that will be used as a template for the component. - */ - constructor(svgContent:string); - /** - * Creates a new instance using the given SVG template and {@link yfiles.styles.TemplateNodeStyleRenderer} as renderer. - * @param {Object} options The parameters to pass. - * @param options.svgContent The SVG snippet that will be used as a template for the component. - * @param {yfiles.geometry.Insets} options.insets The insets the {@link yfiles.input.INodeInsetsProvider} implementation for {@link yfiles.graph.INode} should yield for this instance. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#insets} property on the created object. - *

- * @param {yfiles.geometry.Size} options.minimumSize The minimum size an {@link yfiles.input.INodeSizeConstraintProvider} implementation for {@link yfiles.graph.INode} should yield. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#minimumSize} property on the created object. - *

- * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a node that will be displayed using the created visual. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#normalizedOutline} property on the created object. - *

- */ - constructor(options:{svgContent:string,insets?:yfiles.geometry.Insets,minimumSize?:yfiles.geometry.Size,normalizedOutline?:yfiles.geometry.GeneralPath}); - /** - * Creates a new instance with no SVG template and {@link yfiles.styles.TemplateNodeStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {yfiles.geometry.Insets} options.insets The insets the {@link yfiles.input.INodeInsetsProvider} implementation for {@link yfiles.graph.INode} should yield for this instance. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#insets} property on the created object. - *

- * @param {yfiles.geometry.Size} options.minimumSize The minimum size an {@link yfiles.input.INodeSizeConstraintProvider} implementation for {@link yfiles.graph.INode} should yield. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#minimumSize} property on the created object. - *

- * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a node that will be displayed using the created visual. - *

- * This option sets the {@link yfiles.styles.TemplateNodeStyleBase#normalizedOutline} property on the created object. - *

- * @param {string} options.svgContent The SVG content that is the template for the node visualization. - *

- * This option sets the {@link yfiles.styles.StringTemplateNodeStyle#svgContent} property on the created object. - *

- */ - constructor(options?:{insets?:yfiles.geometry.Insets,minimumSize?:yfiles.geometry.Size,normalizedOutline?:yfiles.geometry.GeneralPath,svgContent?:string}); - /** - * Gets or sets the SVG content that is the template for the node visualization. - * @default null - * @type {string} - */ - svgContent:string; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.StringTemplateNodeStyle; - } - /** - * An implementation of the {@link yfiles.styles.INodeStyleRenderer} interface that can render {@link yfiles.styles.TemplateNodeStyleBase} - * instances. - * @see yfiles.styles.TemplateNodeStyle - * @see yfiles.styles.StringTemplateNodeStyle - * @class - * @implements {yfiles.styles.INodeStyleRenderer} - * @implements {yfiles.styles.IShapeGeometry} - * @implements {yfiles.view.IBoundsProvider} - * @implements {yfiles.view.IVisibilityTestable} - * @implements {yfiles.input.IMarqueeTestable} - * @implements {yfiles.input.IHitTestable} - * @implements {yfiles.graph.ILookup} - * @implements {yfiles.view.IVisualCreator} - */ - export interface TemplateNodeStyleRenderer extends yfiles.lang.Object,yfiles.styles.INodeStyleRenderer,yfiles.styles.IShapeGeometry,yfiles.view.IBoundsProvider,yfiles.view.IVisibilityTestable,yfiles.input.IMarqueeTestable,yfiles.input.IHitTestable,yfiles.graph.ILookup,yfiles.view.IVisualCreator{} - export class TemplateNodeStyleRenderer { - /** - * Prepares this instance for subsequent calls after the style and node have been initialized. - *

- * Upon invocation the {@link yfiles.styles.TemplateNodeStyleRenderer#style} and {@link yfiles.styles.TemplateNodeStyleRenderer#node} properties have been populated by the - * {@link yfiles.styles.TemplateNodeStyleRenderer#getVisualCreator}, {@link yfiles.styles.TemplateNodeStyleRenderer#getBoundsProvider}, - * {@link yfiles.styles.TemplateNodeStyleRenderer#getHitTestable}, or {@link yfiles.styles.TemplateNodeStyleRenderer#getMarqueeTestable} - * methods. - *

- *

- * This is an empty implementation. Subclasses might have to override this method. - *

- * @protected - */ - configure():void; - /** - * Creates the visual by delegating to {@link yfiles.styles.TemplateNodeStyleBase#createTemplate} and then initializing the control - * with the context. - * @param context The context for the creation. - * @returns The visual that is used for rendering the node. - */ - createVisual(context:yfiles.view.IRenderContext):yfiles.view.Visual; - /** - * Returns the layout bounds as an upper bound for the painting bound. - *

- * This implementation simply sets the {@link yfiles.styles.TemplateNodeStyleRenderer#layout}'s bounds to the scratch variable and returns. - *

- * @param context the context to calculate the bounds for - * @returns the bounds or null to indicate an unbound area - */ - getBounds(context:yfiles.view.ICanvasContext):yfiles.geometry.Rect; - /** - * Provides a {@link yfiles.view.IBoundsProvider bounds calculation} implementation for the given style and node. - *

- * If {@link yfiles.styles.TemplateNodeStyleBase#contextLookup} provides an implementation of the {@link yfiles.view.IBoundsProvider} interface than this instance will be returned, - * otherwise the default (rectangular) behavior will be used. - *

- * @param node The node to query the provider for. - * @param style The style whose provider is queried. - * @returns An implementation that can calculate visual bounds. - */ - getBoundsProvider(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IBoundsProvider; - /** - * Configures the style and node parameters, does not call {@link yfiles.styles.TemplateNodeStyleRenderer#configure} and returns - * this. - *

- * As this method may be called often it will not automatically call {@link yfiles.styles.TemplateNodeStyleRenderer#configure}, - * instead subclasses should ensure that in the {@link yfiles.styles.TemplateNodeStyleRenderer#lookup} method call they should call - * {@link yfiles.styles.TemplateNodeStyleRenderer#configure} only if needed, i.e. if they decide to return this or an instance that - * depends on a correctly configured this. - *

- * @param node The node to query the context for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplateNodeStyleRenderer#lookup - */ - getContext(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.graph.ILookup; - /** - * Gets the context by delegating to {@link yfiles.styles.TemplateNodeStyleBase#contextLookup}. - * @param style - * @returns - * @protected - */ - getContextLookup(style:yfiles.styles.TemplateNodeStyleBase):yfiles.graph.IContextLookup; - /** - * Provides a {@link yfiles.input.IHitTestable hit testing} implementation for the given style and node. - *

- * If {@link yfiles.styles.TemplateNodeStyleBase#contextLookup} provides an implementation of the {@link yfiles.input.IHitTestable} interface than this instance will be returned, otherwise - * the {@link yfiles.styles.TemplateNodeStyleRenderer#getNormalizedOutline outline shape} will be used to perform the hit testing. - *

- * @param node The node to query the tester for. - * @param style The style whose tester is queried. - * @returns An implementation that can perform the hit testing. - * @see yfiles.styles.TemplateNodeStyleRenderer#isHit - */ - getHitTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IHitTestable; - /** - * Gets the insets by delegating to {@link yfiles.styles.TemplateNodeStyleBase#insets}. - * @param style - * @returns - * @protected - */ - getInsets(style:yfiles.styles.TemplateNodeStyleBase):yfiles.geometry.Insets; - /** - * Tries to use the {@link yfiles.styles.TemplateNodeStyleRenderer#getNormalizedOutline outline shape} to perform the intersection calculation, otherwise reverts to default (rectangular) - * behavior. - * @param inner - * @param outer - * @returns - */ - getIntersection(inner:yfiles.geometry.Point,outer:yfiles.geometry.Point):yfiles.geometry.Point; - /** - * Provides a {@link yfiles.input.IMarqueeTestable marquee testing} implementation for the given style and node. - *

- * If {@link yfiles.styles.TemplateNodeStyleBase#contextLookup} provides an implementation of the {@link yfiles.input.IMarqueeTestable} interface than this instance will be returned, - * otherwise the {@link yfiles.styles.TemplateNodeStyleRenderer#getNormalizedOutline outline shape} will be used to determine the marquee intersection test with the visual representation of - * the node. - *

- * @param node The node to query the tester for. - * @param style The style whose tester is queried. - * @returns An implementation that can test for marquee intersections. - * @see yfiles.styles.TemplateNodeStyleRenderer#isInBox - */ - getMarqueeTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.input.IMarqueeTestable; - /** - * Gets the minimum size by delegating to {@link yfiles.styles.TemplateNodeStyleBase#minimumSize}. - * @param style - * @returns - * @protected - */ - getMinimumSize(style:yfiles.styles.TemplateNodeStyleBase):yfiles.geometry.Size; - /** - * Gets the normalized outline by delegating to {@link yfiles.styles.TemplateNodeStyleBase#normalizedOutline}. - * @param style - * @returns - * @protected - */ - getNormalizedOutline(style:yfiles.styles.TemplateNodeStyleBase):yfiles.geometry.GeneralPath; - /** - * Tries to use the {@link yfiles.styles.TemplateNodeStyleRenderer#getNormalizedOutline outline shape} to create the outline shape path, otherwise reverts to default (rectangular) behavior. - * @returns - */ - getOutline():yfiles.geometry.GeneralPath; - /** - * Calculates the preferred size for the given node and style in the provided context. - * @param context The context for which the preferred size should be calculated. - * @param node The node instance. - * @param style The style instance to apply. - * @returns The preferred size for the given label and style. - * @see yfiles.styles.TemplateNodeStyleRenderer#getPreferredSizeCore - */ - getPreferredSize(context:yfiles.view.IRenderContext,node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.geometry.Size; - /** - * Calculates the preferred size for the given node and style. - * @param node The node instance. - * @param style The style instance to apply. - * @returns The preferred size for the given label and style. - * @see yfiles.styles.TemplateNodeStyleRenderer#getPreferredSizeCore - */ - getPreferredSize(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.geometry.Size; - /** - * Calculates the preferred size given the current state of the renderer for the given context. - * @param context The render context for which the preferred size should be calculated. - * @returns The size as suggested by this renderer. - * @protected - */ - getPreferredSizeCore(context:yfiles.view.IRenderContext):yfiles.geometry.Size; - /** - * Provides the geometry for the visual representation. - *

- * If {@link yfiles.styles.TemplateNodeStyleBase#contextLookup} provides an implementation of the {@link yfiles.styles.IShapeGeometry} interface than this instance will be returned, - * otherwise the {@link yfiles.styles.TemplateNodeStyleRenderer#getNormalizedOutline outline shape} will be used to determine the outline of the visual representation of a node. - *

- * @param node The node to query the geometry for. - * @param style The style for which the geometry is queried. - * @returns An implementation that describes the outline geometry of the shape. - * @see yfiles.styles.TemplateNodeStyleRenderer#isInside - * @see yfiles.styles.TemplateNodeStyleRenderer#getOutline - */ - getShapeGeometry(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.styles.IShapeGeometry; - /** - * Configures the style and node parameters, does not call {@link yfiles.styles.TemplateNodeStyleRenderer#configure} and returns - * this. - *

- * Unlike most of the other methods this implementation does not call {@link yfiles.styles.TemplateNodeStyleRenderer#configure}. If - * the subclass implementation depends on this instance to be configured, it needs to call Configure in - * {@link yfiles.styles.TemplateNodeStyleRenderer#isVisible}. - *

- * @param node The node to query visibility tests. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplateNodeStyleRenderer#isVisible - */ - getVisibilityTestable(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisibilityTestable; - /** - * Configures the style and node parameters, calls {@link yfiles.styles.TemplateNodeStyleRenderer#configure} and returns this. - * @param node The node to retrieve the {@link } for. The value will be stored in the {@link #node} property. - * @param style The style to associate with the node. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplateNodeStyleRenderer#createVisual - * @see yfiles.styles.TemplateNodeStyleRenderer#updateVisual - */ - getVisualCreator(node:yfiles.graph.INode,style:yfiles.styles.INodeStyle):yfiles.view.IVisualCreator; - /** - * Tries to use the {@link yfiles.styles.TemplateNodeStyleRenderer#getNormalizedOutline outline shape} to perform the hit test analysis, otherwise reverts to default (rectangular) behavior. - * @param context the context the hit test is performed in - * @param location the hit point in world coordinates - * @returns whether something has been hit - */ - isHit(context:yfiles.input.IInputModeContext,location:yfiles.geometry.Point):boolean; - /** - * Tries to use the {@link yfiles.styles.TemplateNodeStyleRenderer#getNormalizedOutline outline shape} to perform the marquee intersection analysis, otherwise reverts to default (rectangular) - * behavior. - * @param context - * @param rectangle - * @returns - */ - isInBox(context:yfiles.input.IInputModeContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Tries to use the {@link yfiles.styles.TemplateNodeStyleRenderer#getNormalizedOutline outline shape} to perform the contains test, otherwise reverts to default (rectangular) behavior. - * @param location - * @returns - */ - isInside(location:yfiles.geometry.Point):boolean; - /** - * Determines visibility by checking for an intersection with the {@link yfiles.styles.TemplateNodeStyleRenderer#layout}. - * @param context The context. - * @param rectangle The current clip - * @returns Whether the {@link #layout} is visible in the clip. - */ - isVisible(context:yfiles.view.ICanvasContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Implementation of the {@link yfiles.graph.ILookup#lookup} method. - *

- * Delegates to the lookup returned by {@link yfiles.styles.TemplateNodeStyleRenderer#getContextLookup}, first. Returns special {@link yfiles.input.INodeInsetsProvider} - * or {@link yfiles.input.INodeSizeConstraintProvider} implementations if asked for. Last, it returns this class if it implements - * the queried type. - *

- * @param type The type to query an instance for. - * @returns The implementation or null. - */ - lookup(type:yfiles.lang.Class):any; - /** - * Updates the component correspondingly. - * @param context The context for the creation. - * @param oldVisual The currently rendered visual. - * @returns The visual that is used for rendering the node. - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual):yfiles.view.Visual; - /** - * Gets or sets the currently configured style. - * @protected - * @type {yfiles.styles.TemplateNodeStyleBase} - */ - style:yfiles.styles.TemplateNodeStyleBase; - /** - * Gets or sets the currently configured node. - * @protected - * @type {yfiles.graph.INode} - */ - node:yfiles.graph.INode; - /** - * Gets the {@link yfiles.graph.INode#layout} of the node this renderer is currently configured for. - *

- * Returns Node.Layout. - *

- * @type {yfiles.geometry.IRectangle} - */ - layout:yfiles.geometry.IRectangle; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.TemplateNodeStyleRenderer; - } - /** - * Base class for port styles that use a SVG snippet as template for the visualization of {@link yfiles.graph.IPort}s. - * @see yfiles.styles.TemplatePortStyle - * @see yfiles.styles.TemplatePortStyle - * @class - * @implements {yfiles.styles.IPortStyle} - * @implements {yfiles.lang.IPropertyObservable} - * @implements {yfiles.lang.ICloneable} - */ - export interface TemplatePortStyleBase extends yfiles.lang.Object,yfiles.styles.IPortStyle,yfiles.lang.IPropertyObservable,yfiles.lang.ICloneable{} - export class TemplatePortStyleBase { - /** - * Constructs a new instance using the provided renderer. - * @param renderer - * @protected - */ - constructor(renderer:yfiles.styles.TemplatePortStyleRenderer); - /** - * Constructs a new instance of this style with default values. - * @protected - */ - constructor(); - /** - * Performs a shallow clone of this instance, except for the value of {@link yfiles.styles.TemplatePortStyleBase#styleTag} which is cloned, too, if it can be cloned. - * @returns A clone of this instance. - */ - clone():any; - /** - * Factory method that is called by the {@link yfiles.styles.TemplatePortStyleRenderer} to create the visual that will be used for - * the display of the port. - * @param context The context for which the visual should be created. - * @param port The port that will be rendered. - * @returns The readily styled visual. - */ - createTemplate(context:yfiles.view.IRenderContext,port:yfiles.graph.IPort):yfiles.view.SvgVisual; - /** - * Convenience method that determines the preferred {@link yfiles.styles.TemplatePortStyleBase#renderSize} of the port if this style was applied. - * @param context The context for which the size should be calculated. - * @param port The port to determine the preferred size of. - * @returns The preferred size. - */ - getPreferredSize(context:yfiles.view.IRenderContext,port:yfiles.graph.IPort):yfiles.geometry.Size; - /** - * Loads all template script elements that have not been parsed, yet, and creates the respective template cache objects. - *

- * This method can be called to perform the template loading at a certain point in time, for example during application - * startup. By default, a template is loaded lazily when the first visual using this template is built. - *

- * @static - */ - static loadAllTemplates():void; - /** - * Raises the {@link yfiles.styles.TemplatePortStyleBase#addPropertyChangedListener PropertyChanged} event. - * @param evt The {@link } instance containing the event data. - * @protected - */ - onPropertyChanged(evt:yfiles.lang.PropertyChangedEventArgs):void; - /** - * Adds the given listener for the PropertyChanged event that occurs when a property value changes. - * @param listener The listener to add. - * @see yfiles.styles.TemplatePortStyleBase#removePropertyChangedListener - */ - addPropertyChangedListener(listener:(sender:any,args:yfiles.lang.PropertyChangedEventArgs)=>void):void; - /** - * Removes the given listener for the PropertyChanged event that occurs when a property value changes. - * @param listener The listener to remove. - * @see yfiles.styles.TemplatePortStyleBase#addPropertyChangedListener - */ - removePropertyChangedListener(listener:(sender:any,args:yfiles.lang.PropertyChangedEventArgs)=>void):void; - /** - * Gets or sets the tag that is associated with this style instance. - *

- * The various style renderer implementations can use this tag to make it accessible in the context of the instantiated - * templates and controls. The framework does not make any assumptions about the value of this property. It is there for - * convenient use in the process of data binding the templates. This property supports {@link yfiles.lang.IPropertyObservable property change notification} and can - * thus be data bound easily. - *

- * @default null - * @type {any} - */ - styleTag:any; - /** - * Gets or sets an implementation of {@link yfiles.graph.IContextLookup} that can be used to satisfy queries that are made to the - * implementation which is returned by calls to {@link yfiles.styles.IPortStyleRenderer#getContext} that are made on the style - * renderer that is associated with this style instance. - *

- * This can be used to conveniently customize the lookup behavior of the style renderers that are associated with this - * instance. E.g. it is possible to provide customized implementations of {@link yfiles.view.ISelectionIndicatorInstaller}, - * {@link yfiles.view.IHighlightIndicatorInstaller}, {@link yfiles.input.IHandleProvider}, {@link yfiles.input.INodeSizeConstraintProvider}, and - * {@link yfiles.input.INodeInsetsProvider}. Simple style implementations can use {@link yfiles.graph.IContextLookup#EMPTY_CONTEXT_LOOKUP} - * but may not use null for this property. The default value is {@link yfiles.graph.IContextLookup#EMPTY_CONTEXT_LOOKUP} - *

- * @default 'Lookups.EmptyContextLookup' - * @type {yfiles.graph.IContextLookup} - */ - contextLookup:yfiles.graph.IContextLookup; - /** - * Gets or sets the {@link yfiles.geometry.Size size} of the of a port that will be displayed using the {@link yfiles.styles.TemplatePortStyleBase#createTemplate created visual}. - *

- * This size will be used to arrange the visual correctly. The default value is (5,5). - *

- * @default '5,5' - * @type {yfiles.geometry.Size} - */ - renderSize:yfiles.geometry.Size; - /** - * Gets or sets the normalized outline of a port that will be displayed using the {@link yfiles.styles.TemplatePortStyleBase#createTemplate created visual}. - *

- * The shape will automatically be arranged and transformed to have the bounds of the port. This shape will be used to - * satisfy requests to {@link yfiles.input.IMarqueeTestable#isInBox} and {@link yfiles.input.IHitTestable#isHit} and may be left null to - * indicate default (rectangular) behavior. - *

- *

- * The default value is null. - *

- * @default null - * @type {yfiles.geometry.GeneralPath} - */ - normalizedOutline:yfiles.geometry.GeneralPath; - /** - * - * @type {yfiles.styles.IPortStyleRenderer} - */ - renderer:yfiles.styles.IPortStyleRenderer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.TemplatePortStyleBase; - } - /** - * An {@link yfiles.styles.IPortStyle} that uses an SVG snippet as template for the visualization of {@link yfiles.graph.IPort}s. - *

- * The {@link yfiles.styles.TemplatePortStyle#styleResourceKey} is used to determine the template that will be applied to the component. The template must be specified in the DOM - * in a script tag with type='text/yfiles-template'. - *

- *

- * Note that the {@link yfiles.styles.TemplatePortStyleBase#renderSize} should be specified to match the size of the visual's template. - *

- *

- * The SVG template snippet can contain bindings in the form attribute="{Binding propertyName}" that bind the attribute - * value to the value of the property with the given name in the node's tag. - *

- *

- * TemplateBindings in the form attribute="{TemplateBinding propertyName}" bind the attribute value to a set of - * well-defined properties of the port that are provided by the style. The available template binding properties are: - *

- *
    - *
  • width: The width of the graph element
  • - *
  • height: The height of the graph element
  • - *
  • bounds: The bounding rectangle of the graph element
  • - *
  • canvas: The {@link yfiles.view.GraphComponent} the element is rendered in
  • - *
  • itemSelected: Whether the element is selected
  • - *
  • itemFocused: Whether the element has the focus
  • - *
  • itemHighlighted: Whether the element is highlighted
  • - *
  • styleTag: The tag associated with the element's style instance
  • - *
- * @class - * @extends {yfiles.styles.TemplatePortStyleBase} - */ - export interface TemplatePortStyle extends yfiles.styles.TemplatePortStyleBase{} - export class TemplatePortStyle { - /** - * Creates a new instance using the given render template id and a custom renderer instance. - * @param renderTemplateId The id of the SVG snippet that will be used for the component. - * @param renderer The custom renderer for this style instance. - */ - constructor(renderTemplateId:string,renderer:yfiles.styles.TemplatePortStyleRenderer); - /** - * Creates a new instance using the given render template id and a custom renderer instance. - * @param {Object} options The parameters to pass. - * @param options.renderTemplateId The id of the SVG snippet that will be used for the component. - * @param options.renderer The custom renderer for this style instance. - * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a port that will be displayed using the {@link yfiles.styles.TemplatePortStyleBase#createTemplate created visual}. - *

- * This option sets the {@link yfiles.styles.TemplatePortStyleBase#normalizedOutline} property on the created object. - *

- * @param {yfiles.geometry.Size} options.renderSize The {@link yfiles.geometry.Size size} of the of a port that will be displayed using the {@link yfiles.styles.TemplatePortStyleBase#createTemplate created visual}. - *

- * This option sets the {@link yfiles.styles.TemplatePortStyleBase#renderSize} property on the created object. - *

- */ - constructor(options:{renderTemplateId:string,renderer:yfiles.styles.TemplatePortStyleRenderer,normalizedOutline?:yfiles.geometry.GeneralPath,renderSize?:yfiles.geometry.Size}); - /** - * Creates a new instance using the given resource key and a custom renderer instance.{@link yfiles.styles.TemplatePortStyleRenderer} - * as renderer. - * @param renderTemplateId The id of the SVG snippet that will be used for the component. - */ - constructor(renderTemplateId:string); - /** - * Creates a new instance using the given resource key and a custom renderer instance.{@link yfiles.styles.TemplatePortStyleRenderer} - * as renderer. - * @param {Object} options The parameters to pass. - * @param options.renderTemplateId The id of the SVG snippet that will be used for the component. - * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a port that will be displayed using the {@link yfiles.styles.TemplatePortStyleBase#createTemplate created visual}. - *

- * This option sets the {@link yfiles.styles.TemplatePortStyleBase#normalizedOutline} property on the created object. - *

- * @param {yfiles.geometry.Size} options.renderSize The {@link yfiles.geometry.Size size} of the of a port that will be displayed using the {@link yfiles.styles.TemplatePortStyleBase#createTemplate created visual}. - *

- * This option sets the {@link yfiles.styles.TemplatePortStyleBase#renderSize} property on the created object. - *

- */ - constructor(options:{renderTemplateId:string,normalizedOutline?:yfiles.geometry.GeneralPath,renderSize?:yfiles.geometry.Size}); - /** - * Creates a new instance with no render template id and {@link yfiles.styles.TemplatePortStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a port that will be displayed using the {@link yfiles.styles.TemplatePortStyleBase#createTemplate created visual}. - *

- * This option sets the {@link yfiles.styles.TemplatePortStyleBase#normalizedOutline} property on the created object. - *

- * @param {yfiles.geometry.Size} options.renderSize The {@link yfiles.geometry.Size size} of the of a port that will be displayed using the {@link yfiles.styles.TemplatePortStyleBase#createTemplate created visual}. - *

- * This option sets the {@link yfiles.styles.TemplatePortStyleBase#renderSize} property on the created object. - *

- * @param {string} options.styleResourceKey The {@link string} that will be used to look up the template that is applied to the component. - *

- * This option sets the {@link yfiles.styles.TemplatePortStyle#styleResourceKey} property on the created object. - *

- */ - constructor(options?:{normalizedOutline?:yfiles.geometry.GeneralPath,renderSize?:yfiles.geometry.Size,styleResourceKey?:string}); - /** - * Gets or sets the {@link string} that will be used to look up the template that is applied to the component. - *

- * The default value is null. - *

- * @default null - * @type {string} - */ - styleResourceKey:string; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.TemplatePortStyle; - } - /** - * An implementation of the {@link yfiles.styles.IPortStyleRenderer} interface that can render {@link yfiles.styles.TemplatePortStyleBase} - * instances. - * @see yfiles.styles.TemplatePortStyle - * @see yfiles.styles.StringTemplatePortStyle - * @class - * @implements {yfiles.styles.IPortStyleRenderer} - * @implements {yfiles.view.IBoundsProvider} - * @implements {yfiles.view.IVisibilityTestable} - * @implements {yfiles.input.IMarqueeTestable} - * @implements {yfiles.input.IHitTestable} - * @implements {yfiles.graph.ILookup} - * @implements {yfiles.view.IVisualCreator} - */ - export interface TemplatePortStyleRenderer extends yfiles.lang.Object,yfiles.styles.IPortStyleRenderer,yfiles.view.IBoundsProvider,yfiles.view.IVisibilityTestable,yfiles.input.IMarqueeTestable,yfiles.input.IHitTestable,yfiles.graph.ILookup,yfiles.view.IVisualCreator{} - export class TemplatePortStyleRenderer { - constructor(); - /** - * Prepares this instance for subsequent calls after the style and port have been initialized. - *

- * Upon invocation the {@link yfiles.styles.TemplatePortStyleRenderer#style} and {@link yfiles.styles.TemplatePortStyleRenderer#port} properties have been populated by the - * {@link yfiles.styles.TemplatePortStyleRenderer#getVisualCreator}, {@link yfiles.styles.TemplatePortStyleRenderer#getBoundsProvider}, - * {@link yfiles.styles.TemplatePortStyleRenderer#getHitTestable}, or {@link yfiles.styles.TemplatePortStyleRenderer#getMarqueeTestable} - * methods. - *

- * @protected - */ - configure():void; - /** - * Creates the visual by delegating to {@link yfiles.styles.TemplatePortStyleBase#createTemplate} and then initializing the visual - * with the context. - * @param context The context for the creation. - * @returns The visual that is used for rendering the port. - */ - createVisual(context:yfiles.view.IRenderContext):yfiles.view.Visual; - /** - * - * @param context - * @returns - */ - getBounds(context:yfiles.view.ICanvasContext):yfiles.geometry.Rect; - /** - * Configures the style and port parameters, calls {@link yfiles.styles.TemplatePortStyleRenderer#configure} and returns this. - * @param port The port to retrieve the bounds provider for. The value will be stored in the {@link #port} property. - * @param style The style to associate with the port. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplatePortStyleRenderer#getBounds - */ - getBoundsProvider(port:yfiles.graph.IPort,style:yfiles.styles.IPortStyle):yfiles.view.IBoundsProvider; - /** - * Configures the style and port parameters, does not call {@link yfiles.styles.TemplatePortStyleRenderer#configure} and returns - * this. - *

- * As this method may be called often it will not automatically call {@link yfiles.styles.TemplatePortStyleRenderer#configure}, - * instead subclasses should ensure that in the {@link yfiles.styles.TemplatePortStyleRenderer#lookup} method call they should call - * {@link yfiles.styles.TemplatePortStyleRenderer#configure} only if needed, i.e. if they decide to return this or an instance that - * depends on a correctly configured this. - *

- * @param port The port to query the context for. The value will be stored in the {@link #port} property. - * @param style The style to associate with the port. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplatePortStyleRenderer#lookup - */ - getContext(port:yfiles.graph.IPort,style:yfiles.styles.IPortStyle):yfiles.graph.ILookup; - /** - * Configures the style and port parameters, calls {@link yfiles.styles.TemplatePortStyleRenderer#configure} and returns this. - * @param port The port to query hit test with. The value will be stored in the {@link #port} property. - * @param style The style to associate with the port. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplatePortStyleRenderer#isHit - */ - getHitTestable(port:yfiles.graph.IPort,style:yfiles.styles.IPortStyle):yfiles.input.IHitTestable; - /** - * Configures the style and port parameters, calls {@link yfiles.styles.TemplatePortStyleRenderer#configure} and returns this. - * @param port The port to query marquee intersection tests. The value will be stored in the {@link #port} property. - * @param style The style to associate with the port. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplatePortStyleRenderer#isInBox - */ - getMarqueeTestable(port:yfiles.graph.IPort,style:yfiles.styles.IPortStyle):yfiles.input.IMarqueeTestable; - /** - * Gets the normalized outline by delegating to {@link yfiles.styles.TemplatePortStyleBase#normalizedOutline}. - * @param style - * @returns - * @protected - */ - getNormalizedOutline(style:yfiles.styles.TemplatePortStyleBase):yfiles.geometry.GeneralPath; - /** - * Calculates the preferred size for the given port and style. - * @param context The render context which can be null. - * @param port The port instance. - * @param style The style instance to apply. - * @returns The preferred size for the given port and style. - * @see yfiles.styles.TemplatePortStyleRenderer#getPreferredSizeCore - */ - getPreferredSize(context:yfiles.view.IRenderContext,port:yfiles.graph.IPort,style:yfiles.styles.TemplatePortStyleBase):yfiles.geometry.Size; - /** - * Gets the preferred size for the current configuration. - * @param context - * @returns The preferred size. - * @protected - */ - getPreferredSizeCore(context:yfiles.view.IRenderContext):yfiles.geometry.Size; - /** - * Gets the size of the rendering from the style. - * @returns The {@link #renderSize}. - * @protected - */ - getRenderSize():yfiles.geometry.Size; - /** - * Configures the style and port parameters, does not call {@link yfiles.styles.TemplatePortStyleRenderer#configure} and returns - * this. - *

- * Unlike most of the other methods this implementation does not call {@link yfiles.styles.TemplatePortStyleRenderer#configure}. If - * the subclass implementation depends on this instance to be configured, it needs to call Configure in - * {@link yfiles.styles.TemplatePortStyleRenderer#isVisible}. - *

- * @param port The port to query visibility tests. The value will be stored in the {@link #port} property. - * @param style The style to associate with the port. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplatePortStyleRenderer#isVisible - */ - getVisibilityTestable(port:yfiles.graph.IPort,style:yfiles.styles.IPortStyle):yfiles.view.IVisibilityTestable; - /** - * Configures the style and port parameters, calls {@link yfiles.styles.TemplatePortStyleRenderer#configure} and returns this. - * @param port The port to retrieve the {@link } for. The value will be stored in the {@link #port} property. - * @param style The style to associate with the port. The value will be stored in the {@link #style} property. - * @returns this - * @see yfiles.styles.TemplatePortStyleRenderer#createVisual - * @see yfiles.styles.TemplatePortStyleRenderer#updateVisual - */ - getVisualCreator(port:yfiles.graph.IPort,style:yfiles.styles.IPortStyle):yfiles.view.IVisualCreator; - /** - * - * @param context - * @param location - * @returns - */ - isHit(context:yfiles.input.IInputModeContext,location:yfiles.geometry.Point):boolean; - /** - * - * @param context - * @param rectangle - * @returns - */ - isInBox(context:yfiles.input.IInputModeContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Calls {@link yfiles.styles.TemplatePortStyleRenderer#configure} and test the {@link yfiles.styles.TemplatePortStyleRenderer#port} using the {@link yfiles.styles.TemplatePortStyleRenderer#style} for a visible intersection with the - * clip bounds. - *

- * This simple implementation uses {@link yfiles.styles.TemplatePortStyleRenderer#getBounds} to determine the visibility. - * Subclasses may choose to override this behavior for improved performance but need to make sure to call {@link yfiles.styles.TemplatePortStyleRenderer#configure} if they depend on a configured - * instance. - *

- * @param context the current canvas context - * @param rectangle the clip bounds - * @returns true if the port may be painted within the clip bounds. - * @see yfiles.styles.TemplatePortStyleRenderer#getVisibilityTestable - */ - isVisible(context:yfiles.view.ICanvasContext,rectangle:yfiles.geometry.Rect):boolean; - /** - * Implements the {@link yfiles.graph.ILookup} interface. - *

- * This method will be used by default if {@link yfiles.styles.TemplatePortStyleRenderer#getContext} has been queried for a lookup - * implementation. Note that it cannot be assumed that {@link yfiles.styles.TemplatePortStyleRenderer#configure} has already been - * invoked. However, normally {@link yfiles.styles.TemplatePortStyleRenderer#port} and {@link yfiles.styles.TemplatePortStyleRenderer#style} will be correctly configured if invoked directly after GetContext. Subclass - * implementations should make sure to configure this instance before they return this as a result of a successful lookup. - * This implementation will check if type.IsInstanceOfType(this) and will call {@link yfiles.styles.TemplatePortStyleRenderer#configure} - * on success and return this. - *

- * @param type The type to query for. - * @returns An implementation or null. - */ - lookup(type:yfiles.lang.Class):any; - /** - * Delegates to the {@link yfiles.styles.TemplatePortStyleBase}'s {@link yfiles.styles.TemplatePortStyleBase#contextLookup}. - * @param style - * @param port - * @param type - * @returns - * @protected - */ - lookupContext(style:yfiles.styles.TemplatePortStyleBase,port:yfiles.graph.IPort,type:yfiles.lang.Class):any; - /** - * Updates the component correspondingly. - * @param context The context for the creation. - * @param oldVisual The currently rendered visual. - * @returns The visual that is used for rendering the port. - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual):yfiles.view.Visual; - /** - * Gets the center of the port. - * @protected - * @type {yfiles.geometry.Point} - */ - center:yfiles.geometry.Point; - /** - * Gets or sets the currently configured style. - * @protected - * @type {yfiles.styles.TemplatePortStyleBase} - */ - style:yfiles.styles.TemplatePortStyleBase; - /** - * Gets or sets the currently configured port. - * @protected - * @type {yfiles.graph.IPort} - */ - port:yfiles.graph.IPort; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.TemplatePortStyleRenderer; - } - /** - * A {@link yfiles.styles.TemplatePortStyleBase} that uses an SVG snippet as template for the visualization of - * {@link yfiles.graph.IPort}s. - *

- * In contrast to {@link yfiles.styles.TemplatePortStyle}, the SVG template used by this style must be encoded as string and set to - * the {@link yfiles.styles.StringTemplatePortStyle#svgContent} property. Note that the RenderSize should be specified to match the size of the visual's template. - *

- *

- * It is vital that the {@link yfiles.styles.StringTemplatePortStyle#svgContent SVG snippet} does not declare the SVG namespace itself. Its content is parsed in a dummy namespace - * in order to avoid immediate validation of the result. The resulting SVG elements are automatically created in the SVG - * namespace before they are added to the DOM. - *

- *

- * The SVG template snippet can contain bindings in the form attribute="{Binding propertyName}" that bind the attribute - * value to the value of the property with the given name in the node's tag. - *

- *

- * TemplateBindings in the form attribute="{TemplateBinding propertyName}" bind the attribute value to a set of - * well-defined properties of the port that are provided by the style. The available template binding properties are: - *

- *
    - *
  • width: The width of the graph element
  • - *
  • height: The height of the graph element
  • - *
  • bounds: The bounding rectangle of the graph element
  • - *
  • canvas: The {@link yfiles.view.GraphComponent} the element is rendered in
  • - *
  • itemSelected: Whether the element is selected
  • - *
  • itemFocused: Whether the element has the focus
  • - *
  • itemHighlighted: Whether the element is highlighted
  • - *
  • styleTag: The tag associated with the element's style instance
  • - *
- * @class - * @extends {yfiles.styles.TemplatePortStyleBase} - */ - export interface StringTemplatePortStyle extends yfiles.styles.TemplatePortStyleBase{} - export class StringTemplatePortStyle { - /** - * Creates a new instance using the provided renderer. - * @param renderer The custom renderer for this style instance. - */ - constructor(renderer:yfiles.styles.TemplatePortStyleRenderer); - /** - * Creates a new instance using the provided renderer. - * @param {Object} options The parameters to pass. - * @param options.renderer The custom renderer for this style instance. - * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a port that will be displayed using the {@link yfiles.styles.TemplatePortStyleBase#createTemplate created visual}. - *

- * This option sets the {@link yfiles.styles.TemplatePortStyleBase#normalizedOutline} property on the created object. - *

- * @param {yfiles.geometry.Size} options.renderSize The {@link yfiles.geometry.Size size} of the of a port that will be displayed using the {@link yfiles.styles.TemplatePortStyleBase#createTemplate created visual}. - *

- * This option sets the {@link yfiles.styles.TemplatePortStyleBase#renderSize} property on the created object. - *

- */ - constructor(options:{renderer:yfiles.styles.TemplatePortStyleRenderer,normalizedOutline?:yfiles.geometry.GeneralPath,renderSize?:yfiles.geometry.Size}); - /** - * Initializes a new instance of this class and sets the given string as its {@link yfiles.styles.StringTemplatePortStyle#svgContent}. - * @param svgContent The SVG snippet to use as template. - */ - constructor(svgContent:string); - /** - * Initializes a new instance of this class and sets the given string as its {@link yfiles.styles.StringTemplatePortStyle#svgContent}. - * @param {Object} options The parameters to pass. - * @param options.svgContent The SVG snippet to use as template. - * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a port that will be displayed using the {@link yfiles.styles.TemplatePortStyleBase#createTemplate created visual}. - *

- * This option sets the {@link yfiles.styles.TemplatePortStyleBase#normalizedOutline} property on the created object. - *

- * @param {yfiles.geometry.Size} options.renderSize The {@link yfiles.geometry.Size size} of the of a port that will be displayed using the {@link yfiles.styles.TemplatePortStyleBase#createTemplate created visual}. - *

- * This option sets the {@link yfiles.styles.TemplatePortStyleBase#renderSize} property on the created object. - *

- */ - constructor(options:{svgContent:string,normalizedOutline?:yfiles.geometry.GeneralPath,renderSize?:yfiles.geometry.Size}); - /** - * Creates a new instance using {@link yfiles.styles.TemplatePortStyleRenderer} as renderer. - * @param {Object} [options=null] The parameters to pass. - * @param {yfiles.geometry.GeneralPath} options.normalizedOutline The normalized outline of a port that will be displayed using the {@link yfiles.styles.TemplatePortStyleBase#createTemplate created visual}. - *

- * This option sets the {@link yfiles.styles.TemplatePortStyleBase#normalizedOutline} property on the created object. - *

- * @param {yfiles.geometry.Size} options.renderSize The {@link yfiles.geometry.Size size} of the of a port that will be displayed using the {@link yfiles.styles.TemplatePortStyleBase#createTemplate created visual}. - *

- * This option sets the {@link yfiles.styles.TemplatePortStyleBase#renderSize} property on the created object. - *

- * @param {string} options.svgContent The SVG content that is the template for the port visualization. - *

- * This option sets the {@link yfiles.styles.StringTemplatePortStyle#svgContent} property on the created object. - *

- */ - constructor(options?:{normalizedOutline?:yfiles.geometry.GeneralPath,renderSize?:yfiles.geometry.Size,svgContent?:string}); - /** - * Gets or sets the SVG content that is the template for the port visualization. - * @default null - * @type {string} - */ - svgContent:string; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.StringTemplatePortStyle; - } - /** - * Style implementation for {@link yfiles.graph.IStripe} instances in an {@link yfiles.graph.ITable}. - *

- * It is up to the implementation to interpret the visual appearance of a stripe. The framework uses the associated, - * possibly shared {@link yfiles.styles.IStripeStyle#renderer} to perform the actual rendering of this style for a given stripe. This interface extends the {@link yfiles.lang.ICloneable} - * interface. This allows clients to obtain a persistent copy of the current state of this style. Immutable style - * implementations may return themselves. - *

- *

Related demos:

- *
    - *
  • Demo: TableNodeStyle, Demo.yFiles.Graph.TableNodeStyle
  • - *
- * @interface - * @implements {yfiles.lang.ICloneable} - */ - export interface IStripeStyle extends yfiles.lang.Object,yfiles.lang.ICloneable{ - /** - * Gets the renderer implementation that can be queried for implementations that provide details about the visual - * appearance and visual behavior for a given stripe and this style instance. - *

- * The idiom for retrieving, e.g. an {@link yfiles.view.IVisualCreator} implementation for a given stripe is: - *

- * @abstract - * @type {yfiles.styles.IStripeStyleRenderer} - */ - renderer:yfiles.styles.IStripeStyleRenderer; - } - var IStripeStyle:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.styles.IStripeStyle; - }; - /** - * Interface used by {@link yfiles.styles.IStripeStyle} implementations that can be used to query the actual {@link yfiles.view.IVisualCreator} - * implementation for a stripe and an associated style. - *

- * Implementations of this interface should be designed to be sharable between multiple style instances and should - * therefore not contain style specific state. - *

- * @see yfiles.styles.IStripeStyle - * @see yfiles.graph.IStripe - * @interface - */ - export interface IStripeStyleRenderer extends yfiles.lang.Object{ - /** - * Gets a temporary context instance that can be used to query additional information for the stripe's style. - *

- * Implementations may return {@link yfiles.graph.ILookup#EMPTY} if they don't support this, but may not return null. - *

- * @param stripe The stripe to provide a context instance for. - * @param style The style to use for the context. - * @returns An non-null lookup implementation. - * @see yfiles.graph.ILookup#EMPTY - * @see yfiles.graph.ILookup - * @abstract - */ - getContext(stripe:yfiles.graph.IStripe,style:yfiles.styles.IStripeStyle):yfiles.graph.ILookup; - /** - * Gets an implementation of the {@link yfiles.view.IVisualCreator} interface that can handle the provided stripe and its - * associated style. - *

- * This method may return a flyweight implementation, but never null. - *

- * @param stripe The nstripeode to provide an instance for - * @param style The style to use for the creation of the visual - * @returns An implementation that may be used to subsequently create or update the visual for the stripe. Clients should not cache - * this instance and must always call this method immediately before using the value returned. This enables the use of the - * flyweight design pattern for implementations. This method may not return null but should yield a {@link #INSTANCE void} implementation - * instead. - * @see yfiles.view.VoidVisualCreator#INSTANCE - * @abstract - */ - getVisualCreator(stripe:yfiles.graph.IStripe,style:yfiles.styles.IStripeStyle):yfiles.view.IVisualCreator; - } - var IStripeStyleRenderer:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.styles.IStripeStyleRenderer; - }; - /** - * A void implementation of a stripe style that does nothing and behaves like an invisible style. - *

- * This class implements the singleton pattern. Use the shared static {@link yfiles.styles.VoidStripeStyle#INSTANCE} of this class - * instead of null where null is not allowed. For example you cannot assign null to the {@link yfiles.graph.IStripe#style} property of an - * {@link yfiles.graph.IStripe}. - *

- * @class - * @implements {yfiles.styles.IStripeStyle} - * @final - */ - export interface VoidStripeStyle extends yfiles.lang.Object,yfiles.styles.IStripeStyle{} - export class VoidStripeStyle { - /** - * Returns this. - * @returns this - */ - clone():any; - /** - * The {@link yfiles.styles.VoidStripeStyle} singleton. - * @const - * @static - * @type {yfiles.styles.VoidStripeStyle} - */ - static INSTANCE:yfiles.styles.VoidStripeStyle; - /** - * Gets the {@link yfiles.styles.VoidStripeStyleRenderer#INSTANCE VoidStripeStyleRenderer instance}. - * @see yfiles.styles.IStripeStyle#renderer - * @type {yfiles.styles.IStripeStyleRenderer} - */ - renderer:yfiles.styles.IStripeStyleRenderer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.VoidStripeStyle; - } - /** - * A void implementation of a stripe style renderer that does nothing. - *

- * This class implements the singleton pattern. Use the shared static {@link yfiles.styles.VoidStripeStyleRenderer#INSTANCE} of - * this class instead of null where null is not allowed. For example you cannot assign null to the {@link yfiles.styles.IStripeStyle#renderer} property of an - * {@link yfiles.styles.IStripeStyle}. - *

- * @class - * @implements {yfiles.styles.IStripeStyleRenderer} - * @final - */ - export interface VoidStripeStyleRenderer extends yfiles.lang.Object,yfiles.styles.IStripeStyleRenderer{} - export class VoidStripeStyleRenderer { - /** - * Yields the {@link yfiles.graph.ILookup#EMPTY} that will not yield anything. - * @param stripe - * @param style - * @returns - */ - getContext(stripe:yfiles.graph.IStripe,style:yfiles.styles.IStripeStyle):yfiles.graph.ILookup; - /** - * Yields the {@link yfiles.view.VoidVisualCreator#INSTANCE} that will do nothing. - * @param stripe - * @param style - * @returns - */ - getVisualCreator(stripe:yfiles.graph.IStripe,style:yfiles.styles.IStripeStyle):yfiles.view.IVisualCreator; - /** - * The {@link yfiles.styles.VoidStripeStyleRenderer} singleton. - * @const - * @static - * @type {yfiles.styles.IStripeStyleRenderer} - */ - static INSTANCE:yfiles.styles.IStripeStyleRenderer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.VoidStripeStyleRenderer; - } - /** - * A stripe style decorator that uses a node style instance to render the stripe. - *

- * The renderer of the {@link yfiles.styles.NodeStyleStripeStyleAdapter#nodeStyle} used by this class must create {@link yfiles.view.SvgVisual}s. - *

- * @class - * @implements {yfiles.styles.IStripeStyle} - */ - export interface NodeStyleStripeStyleAdapter extends yfiles.lang.Object,yfiles.styles.IStripeStyle{} - export class NodeStyleStripeStyleAdapter { - /** - * Creates a stripe style that uses the provided node style to render the stripe. - *

- * Note that the styles will be stored by reference, thus modifying the style will directly affect the rendering of this - * instance. - *

- * @param nodeStyle The node style to use for rendering the stripe. - */ - constructor(nodeStyle:yfiles.styles.INodeStyle); - /** - * Initializes a new instance of the {@link yfiles.styles.NodeStyleStripeStyleAdapter} class. - *

- * This constructor uses an rectangular {@link yfiles.styles.ShapeNodeStyle} with a transparent brush and a black pen for the {@link yfiles.styles.NodeStyleStripeStyleAdapter#nodeStyle} - * property. - *

- * @param {Object} [options=null] The parameters to pass. - * @param {yfiles.styles.INodeStyle} options.nodeStyle The {@link yfiles.styles.INodeStyle} that is used for rendering the stripe. - *

- * This option sets the {@link yfiles.styles.NodeStyleStripeStyleAdapter#nodeStyle} property on the created object. - *

- */ - constructor(options?:{nodeStyle?:yfiles.styles.INodeStyle}); - /** - * - * @returns - */ - clone():any; - /** - * - * @type {yfiles.styles.IStripeStyleRenderer} - */ - renderer:yfiles.styles.IStripeStyleRenderer; - /** - * Gets the {@link yfiles.styles.INodeStyle} that is used for rendering the stripe. - * @type {yfiles.styles.INodeStyle} - */ - nodeStyle:yfiles.styles.INodeStyle; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.NodeStyleStripeStyleAdapter; - } - export enum TableRenderingOrder{ - /** - * Draw columns, then rows - */ - COLUMNS_FIRST, - /** - * Draw rows, then columns - */ - ROWS_FIRST - } - /** - * An abstract base class that makes it possible to easily implement a custom {@link yfiles.styles.IStripeStyle}. - *

- * The only method that needs to be implemented by subclasses is {@link yfiles.styles.StripeStyleBase#createVisual}, however to - * improve rendering performance it is highly recommended to implement at least - * {@link yfiles.styles.StripeStyleBase#updateVisual}, too. - *

- *

- * This implementation differs from the straightforward {@link yfiles.styles.IStripeStyle} implementation in that there is no - * visible separation between the style and its - * {@link yfiles.styles.IStripeStyleRenderer}. Instead the renderer used by the base class is fixed and delegates all calls back to - * the style instance. - *

- * @class - * @implements {yfiles.styles.IStripeStyle} - */ - export interface StripeStyleBase extends yfiles.lang.Object,yfiles.styles.IStripeStyle{} - export class StripeStyleBase { - /** - * Initializes a new instance of the {@link yfiles.styles.StripeStyleBase} class. - * @protected - */ - constructor(); - /** - * Creates a new object that is a copy of the current instance. - *

- * Immutable subclasses should consider returning this. - *

- * @returns A new object that is a copy of this instance using {@link #memberwiseClone}. - */ - clone():any; - /** - * Callback that creates the visual. - *

- * This method is called in response to a {@link yfiles.view.IVisualCreator#createVisual} call to the instance that has been - * queried from the {@link yfiles.styles.StripeStyleBase#renderer}. - *

- * @param context - * @param stripe The stripe to which this style instance is assigned. - * @returns The visual as required by the {@link #createVisual} interface. - * @see yfiles.styles.StripeStyleBase#updateVisual - * @protected - * @abstract - */ - createVisual(context:yfiles.view.IRenderContext,stripe:yfiles.graph.IStripe):yfiles.view.Visual; - /** - * Performs the {@link yfiles.graph.ILookup#lookup} operation for the {@link yfiles.styles.IStripeStyleRenderer#getContext} that has been - * queried from the {@link yfiles.styles.StripeStyleBase#renderer}. - *

- * This implementation yields null for everything but: - *

- *
    - *
  • {@link yfiles.view.IVisualCreator}
  • - *
  • {@link yfiles.graph.ILookup}
  • - *
- *

- * For these interfaces an implementation will be returned that delegates to the methods in this instance. - *

- * @param stripe The stripe to use for the context lookup. - * @param type The type to query. - * @returns An implementation of the type or null. - * @protected - */ - lookup(stripe:yfiles.graph.IStripe,type:yfiles.lang.Class):any; - /** - * Callback that updates the visual previously created by {@link yfiles.styles.StripeStyleBase#createVisual}. - *

- * This method is called in response to a {@link yfiles.view.IVisualCreator#updateVisual} call to the instance that has been - * queried from the {@link yfiles.styles.StripeStyleBase#renderer}. This implementation simply delegates to {@link yfiles.styles.StripeStyleBase#createVisual} so subclasses - * should override to improve rendering performance. - *

- * @param context - * @param oldVisual The visual that has been created in the call to {@link #createVisual}. - * @param stripe The stripe to which this style instance is assigned. - * @returns The visual as required by the {@link #createVisual} interface. - * @see yfiles.styles.StripeStyleBase#createVisual - * @protected - */ - updateVisual(context:yfiles.view.IRenderContext,oldVisual:yfiles.view.Visual,stripe:yfiles.graph.IStripe):yfiles.view.Visual; - /** - * Gets the renderer implementation for this instance. - *

- * The private implementation will delegate all API calls back to this instance. - *

- * @type {yfiles.styles.IStripeStyleRenderer} - */ - renderer:yfiles.styles.IStripeStyleRenderer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.styles.StripeStyleBase; - } - }export namespace binding{ - /** - * This class is an adapter that populates a {@link yfiles.binding.GraphBuilderBase#graph} from custom business data. - *

- * This class can be used when the business data specifies a collection of nodes and the edges are implicitly defined as - * collections of predecessors and successors of each node object. - *

- *

- * The nodes in the graph are determined using the {@link yfiles.binding.GraphBuilderBase#nodesSource}, {@link yfiles.binding.AdjacentNodesGraphBuilder#predecessorsBinding} and {@link yfiles.binding.AdjacentNodesGraphBuilder#successorsBinding} properties. The predecessors and successors bindings define the - * direct neighbors of a node. Edges are automatically added between a node and its predecessors and successors. If a {@link yfiles.binding.GraphBuilderBase#nodeIdBinding} is - * set, the {@link yfiles.binding.AdjacentNodesGraphBuilder#predecessorsBinding} and {@link yfiles.binding.AdjacentNodesGraphBuilder#successorsBinding} should yield these IDs instead of the node business objects. - *

- *

- * The method {@link yfiles.binding.GraphBuilderBase#updateGraph} can be used to update the {@link yfiles.graph.IGraph} when the underlying - * collection of the business objects changed. In this case, the nodes specified by NodesSource are always present. All - * other nodes, that are the ones defined only in the predecessor or successor binding, persist only if they are reachable - * by a sequence of neighborhood bindings that originates at a node specified by NodesSource. Graph components that are no - * longer reachable by a sequence of neighborhood bindings from a node specified by NodesSource are completely removed from - * the graph. - *

- *

- * For assigning nodes to groups the {@link yfiles.binding.GraphBuilderBase#groupBinding} has to be defined. Group nodes can be nested using the {@link yfiles.binding.GraphBuilderBase#parentGroupBinding} property. - *

- *

- * The visual appearance of the graph constructed from the business objects can be configured using the {@link yfiles.graph.IGraph#nodeDefaults}, the {@link yfiles.graph.IGraph#groupNodeDefaults}, and the {@link yfiles.graph.IGraph#edgeDefaults} of - * the {@link yfiles.graph.IGraph}. - *

- * @class - * @extends {yfiles.binding.GraphBuilderBase} - */ - export interface AdjacentNodesGraphBuilder extends yfiles.binding.GraphBuilderBase{} - export class AdjacentNodesGraphBuilder { - /** - * Initializes a new instance of this class using the given graph. - *

- * The graph will be {@link yfiles.graph.IGraph#clear cleared} and re-built from the data in {@link yfiles.binding.GraphBuilderBase#nodesSource} when {@link yfiles.binding.GraphBuilderBase#buildGraph} is called. - *

- * @param graph - */ - constructor(graph:yfiles.graph.IGraph); - /** - * Creates a new edge connecting the given nodes. - *

- * This class calls this method to create all new edges, and customers may override it to customize edge creation. - *

- * @param graph The graph. - * @param source The source node of the edge. - * @param target The target node of the edge. - * @returns The created edge. - * @protected - */ - createEdge(graph:yfiles.graph.IGraph,source:yfiles.graph.INode,target:yfiles.graph.INode):yfiles.graph.IEdge; - /** - * Updates an existing edge connecting the given nodes when {@link yfiles.binding.GraphBuilderBase#updateGraph} is called and the - * edge should remain in the graph. - * @param graph The graph. - * @param edge The edge to update. - * @param source The source node of the edge. - * @param target The target node of the edge. - * @protected - */ - updateEdge(graph:yfiles.graph.IGraph,edge:yfiles.graph.IEdge,source:yfiles.graph.INode,target:yfiles.graph.INode):void; - /** - * Gets or sets the successors binding. - *

- * This binding maps a business object that represents a node to another business object o which specifies the successor - * nodes of this node. Similar to {@link yfiles.binding.GraphBuilderBase#nodesSource}, the object o can either be an array, an {@link yfiles.collections.IEnumerable.}, or a plain JavaScript object and should - * contain business objects that represent nodes. If a {@link yfiles.binding.GraphBuilderBase#nodeIdBinding} is set, this collection should contain the IDs of the objects that - * specifies the nodes instead of the objects themselves. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.GraphBuilderBase#nodesSource - * @see yfiles.binding.AdjacentNodesGraphBuilder#predecessorsBinding - * @type {any} - */ - successorsBinding:any; - /** - * Gets or sets the predecessors binding. - *

- * This binding maps a business object that represents a node to another business object o which specifies the predecessor - * nodes of this node. Similar to {@link yfiles.binding.GraphBuilderBase#nodesSource}, the object o can either be an array, an {@link yfiles.collections.IEnumerable.}, or a plain JavaScript object and should - * contain business objects that represent nodes. If a {@link yfiles.binding.GraphBuilderBase#nodeIdBinding} is set, this collection should contain the IDs of the objects that - * specifies the nodes instead of the objects themselves. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.GraphBuilderBase#nodesSource - * @see yfiles.binding.AdjacentNodesGraphBuilder#successorsBinding - * @type {any} - */ - predecessorsBinding:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.binding.AdjacentNodesGraphBuilder; - } - /** - * This class is an adapter that populates a {@link yfiles.binding.GraphBuilderBase#graph} from custom business data. - *

- * This class can be used when the business data specifies a collection of nodes, a collection of edges, and optionally, a - * collection of groups. The business data can be set using the {@link yfiles.binding.GraphBuilderBase#nodesSource}, {@link yfiles.binding.GraphBuilderBase#groupsSource} and {@link yfiles.binding.GraphBuilder#edgesSource} properties. - *

- *

- * To determine the source and target of an edge, the {@link yfiles.binding.GraphBuilder#sourceNodeBinding} and the {@link yfiles.binding.GraphBuilder#targetNodeBinding} need to be set for business objects that are the source for - * edges. If a {@link yfiles.binding.GraphBuilderBase#nodeIdBinding} is set, the {@link yfiles.binding.GraphBuilder#sourceNodeBinding} and {@link yfiles.binding.GraphBuilder#targetNodeBinding} should yield these IDs instead of the node business objects. - *

- *

- * For assigning nodes to groups the {@link yfiles.binding.GraphBuilderBase#groupBinding} has to be defined. Group nodes can be nested using the {@link yfiles.binding.GraphBuilderBase#parentGroupBinding} property. Labels for the - * edges can be defined by setting a suitable {@link yfiles.binding.GraphBuilder#edgeLabelBinding}. - *

- *

- * The visual appearance of the graph constructed from the business objects can be configured using the {@link yfiles.graph.IGraph#nodeDefaults}, the {@link yfiles.graph.IGraph#groupNodeDefaults}, and the {@link yfiles.graph.IGraph#edgeDefaults} of - * the {@link yfiles.graph.IGraph}. - *

- * @class - * @extends {yfiles.binding.GraphBuilderBase} - */ - export interface GraphBuilder extends yfiles.binding.GraphBuilderBase{} - export class GraphBuilder { - /** - * Initializes a new instance of this class using the given graph. - *

- * The graph will be {@link yfiles.graph.IGraph#clear cleared} and re-built from the data in {@link yfiles.binding.GraphBuilderBase#nodesSource} and {@link yfiles.binding.GraphBuilder#edgesSource} when {@link yfiles.binding.GraphBuilderBase#buildGraph} is - * called. - *

- * @param graph - */ - constructor(graph:yfiles.graph.IGraph); - /** - * Creates a new edge connecting the given nodes and assigns the businessObjectparameter to the edge's {@link yfiles.graph.ITagOwner#tag Tag} property. - *

- * This class calls this method to create all new edges, and customers may override it to customize edge creation. - *

- * @param graph The graph. - * @param source The source node of the edge. - * @param target The target node of the edge. - * @param labelData The optional label data of the edge if an {@link #edgeLabelBinding} is specified. - * @param businessObject The business data associated with the edge. - * @returns The created edge. - * @protected - */ - createEdge(graph:yfiles.graph.IGraph,source:yfiles.graph.INode,target:yfiles.graph.INode,labelData:any,businessObject:any):yfiles.graph.IEdge; - /** - * Retrieves the associated edge in the {@link yfiles.binding.GraphBuilderBase#graph} for a business object from the {@link yfiles.binding.GraphBuilder#edgesSource}. - * @param businessObject A business object from the {@link #edgesSource} to get the edge for. - * @returns The edge associated with the business object or null for unknown objects. - * @see yfiles.binding.GraphBuilderBase#getBusinessObject - * @see yfiles.binding.GraphBuilderBase#getNode - * @see yfiles.binding.GraphBuilderBase#getGroup - */ - getEdge(businessObject:any):yfiles.graph.IEdge; - /** - * Updates an existing edge when {@link yfiles.binding.GraphBuilderBase#updateGraph} is called and the edge should remain in the - * graph. - * @param graph The graph. - * @param edge The edge to update. - * @param labelData The optional label data of the edge if an {@link #edgeLabelBinding} is specified. - * @param businessObject The business data associated with the edge. - * @protected - */ - updateEdge(graph:yfiles.graph.IGraph,edge:yfiles.graph.IEdge,labelData:any,businessObject:any):void; - /** - * Gets or sets a value indicating whether or not the source and target bindings must yield business objects that are - * contained in {@link yfiles.binding.GraphBuilderBase#nodesSource}. - *

- * If this property is set to false, an edge is created if and only if its source and target bindings yield a business - * object that is contained in {@link yfiles.binding.GraphBuilderBase#nodesSource}. Otherwise, if this property is true, an edge is created for each item of {@link yfiles.binding.GraphBuilder#edgesSource} and nodes are - * created for the source and target as needed. - *

- * @see yfiles.binding.GraphBuilderBase#nodesSource - * @see yfiles.binding.GraphBuilder#edgesSource - * @type {boolean} - */ - lazyNodeDefinition:boolean; - /** - * Get or set the business objects to be represented as edges of the {@link yfiles.binding.GraphBuilderBase#graph}. - *

- * This can either be an array of objects, a plain JavaScript object or an {@link yfiles.collections.IEnumerable.} containing the objects to be displayed as - * edges. - *

- *

- * In case the value of this property is a plain JavaScript object, the object's properties are enumerated with Object.getOwnPropertyNames - * and used as the source for the graph edges. - *

- * @type {any} - */ - edgesSource:any; - /** - * Gets or sets the mandatory source node binding. - *

- * This binding maps a business object e that represents an edge to another business object n which represents a node. This - * node will become the source node of the edge. If a {@link yfiles.binding.GraphBuilderBase#nodeIdBinding} is set, the object n should be the ID of the object that specifies - * the node instead of the object itself. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.GraphBuilderBase#nodesSource - * @see yfiles.binding.GraphBuilder#targetNodeBinding - * @see yfiles.binding.GraphBuilder#edgesSource - * @type {any} - */ - sourceNodeBinding:any; - /** - * Gets or sets the mandatory target node binding. - *

- * This binding maps a business object e that represents an edge to another business object n which represents a node. This - * node will become the target node of the edge. If a {@link yfiles.binding.GraphBuilderBase#nodeIdBinding} is set, the object n should be the ID of the object that specifies - * the node instead of the object itself. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.GraphBuilderBase#nodesSource - * @see yfiles.binding.GraphBuilder#sourceNodeBinding - * @see yfiles.binding.GraphBuilder#edgesSource - * @type {any} - */ - targetNodeBinding:any; - /** - * Gets or sets the edge label binding. - *

- * This binding maps a business object that represents an edge to an object that specifies the label data of that edge. By - * default, the label data object must be convertible into a string. This can be customized by overriding {@link yfiles.binding.GraphBuilder#createEdge} - * and {@link yfiles.binding.GraphBuilder#updateEdge}. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.GraphBuilder#edgesSource - * @type {any} - */ - edgeLabelBinding:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.binding.GraphBuilder; - } - /** - * Base class for adapters that populate a {@link yfiles.binding.GraphBuilderBase#graph} from custom business data. - *

- * Customers should not create own implementations based on this class but use one of the ready-made adapters {@link yfiles.binding.GraphBuilder} - * or {@link yfiles.binding.AdjacentNodesGraphBuilder}. - *

- * @class - */ - export interface GraphBuilderBase extends yfiles.lang.Object{} - export class GraphBuilderBase { - /** - * Initializes a new instance of this class using the given graph. - *

- * The graph will be {@link yfiles.graph.IGraph#clear cleared} and re-built from the data in {@link yfiles.binding.GraphBuilderBase#nodesSource} when {@link yfiles.binding.GraphBuilderBase#buildGraph} is called. - *

- * @param graph - * @protected - */ - constructor(graph:yfiles.graph.IGraph); - /** - * Populates the graph instance with items generated from the bound business data. - *

- * First, this method clears the graph, and then it adds new groups, nodes, and edges as specified by the business data and - * bindings. - *

- * @returns The created graph. - * @see yfiles.binding.GraphBuilderBase#updateGraph - */ - buildGraph():yfiles.graph.IGraph; - /** - * Creates a new group node and assigns the businessObjectparameter to the group node's {@link yfiles.graph.ITagOwner#tag Tag} property. - * @param graph The graph. - * @param businessObject The business data associated with the group node. - * @returns The created node. - * @protected - */ - createGroupNode(graph:yfiles.graph.IGraph,businessObject:any):yfiles.graph.INode; - /** - * Creates a new node with the specified parent and assigns the businessObjectparameter to the node's {@link yfiles.graph.ITagOwner#tag Tag} property. - *

- * This class calls this method to create all new nodes, and customers may override it to customize node creation. - *

- * @param graph The graph. - * @param parent The node's parent node. - * @param location The location of the node. - * @param labelData The optional label data of the node if an {@link #nodeLabelBinding} is specified. - * @param businessObject The business data associated with the node. - * @returns The created node. - * @protected - */ - createNode(graph:yfiles.graph.IGraph,parent:yfiles.graph.INode,location:yfiles.geometry.Point,labelData:any,businessObject:any):yfiles.graph.INode; - /** - * Retrieves the associated business object for a given {@link yfiles.graph.IModelItem graph item} from the {@link yfiles.binding.GraphBuilderBase#graph}. - * @param item The item of the graph to get the business object for. - * @returns The business object associated with the graph item. - * @see yfiles.binding.GraphBuilderBase#getNode - * @see yfiles.binding.GraphBuilderBase#getGroup - */ - getBusinessObject(item:yfiles.graph.IModelItem):any; - /** - * Retrieves the associated group node in the {@link yfiles.binding.GraphBuilderBase#graph} for a business object from the {@link yfiles.binding.GraphBuilderBase#groupsSource}. - * @param businessObject A business object from the {@link #groupsSource} to get the group for. - * @returns The group associated with the business object or null for unknown objects. - * @see yfiles.binding.GraphBuilderBase#getBusinessObject - * @see yfiles.binding.GraphBuilderBase#getNode - */ - getGroup(businessObject:any):yfiles.graph.INode; - /** - * Retrieves the associated node in the {@link yfiles.binding.GraphBuilderBase#graph} for a business object from the {@link yfiles.binding.GraphBuilderBase#nodesSource}. - * @param businessObject A business object from the {@link #nodesSource} to get the node for. - * @returns The node associated with the business object or null for unknown objects. - * @see yfiles.binding.GraphBuilderBase#getBusinessObject - * @see yfiles.binding.GraphBuilderBase#getGroup - */ - getNode(businessObject:any):yfiles.graph.INode; - /** - * Updates the graph instance to fit the bound business data. - *

- * This method can be used to update the graph to fit changed business data. In contrast to - * {@link yfiles.binding.GraphBuilderBase#buildGraph}, it does not initially clear the graph. Instead, it keeps graph elements that - * for business objects are still present in the data, creates new elements for new data, and removes obsolete elements. - *

- */ - updateGraph():void; - /** - * Updates an existing group node when {@link yfiles.binding.GraphBuilderBase#updateGraph} is called and the group should remain in - * the graph. - *

- * This class calls this method to create all new groups, and customers may override it to customize group creation. - *

- * @param graph The graph. - * @param groupNode The group node to update. - * @param businessObject The business data associated with the group node. - * @protected - */ - updateGroupNode(graph:yfiles.graph.IGraph,groupNode:yfiles.graph.INode,businessObject:any):void; - /** - * Updates an existing node when {@link yfiles.binding.GraphBuilderBase#updateGraph} is called and the node should remain in the - * graph. - * @param graph The graph. - * @param node The node to update. - * @param parent The node's parent node. - * @param location The location of the node. - * @param labelData The optional label data of the node if an {@link #nodeLabelBinding} is specified. - * @param businessObject The business data associated with the node. - * @protected - */ - updateNode(graph:yfiles.graph.IGraph,node:yfiles.graph.INode,parent:yfiles.graph.INode,location:yfiles.geometry.Point,labelData:any,businessObject:any):void; - /** - * Returns the {@link yfiles.graph.IGraph graph} used by this class. - * @type {yfiles.graph.IGraph} - */ - graph:yfiles.graph.IGraph; - /** - * Gets or sets the business objects to be represented as nodes of the {@link yfiles.binding.GraphBuilderBase#graph}. - *

- * This can either be an array of objects, a plain JavaScript object or an {@link yfiles.collections.IEnumerable.} containing the objects to be displayed as - * nodes. - *

- *

- * In case the value of this property is a plain JavaScript object, the object's properties are enumerated with Object.getOwnPropertyNames - * and used as the source for the graph nodes. - *

- * @type {any} - */ - nodesSource:any; - /** - * Gets or sets the business objects to be represented as group nodes of the {@link yfiles.binding.GraphBuilderBase#graph}. - *

- * This can either be an array of objects, a plain JavaScript object or an {@link yfiles.collections.IEnumerable.} containing the objects to be displayed as group - * nodes. - *

- *

- * In case the value of this property is a plain JavaScript object, the object's properties are enumerated with Object.getOwnPropertyNames - * and used as the source for the graph nodes. - *

- * @type {any} - */ - groupsSource:any; - /** - * Gets or sets the node ID binding. - *

- * This binding maps a business object that represents a node to its ID. If this binding is set, node IDs can be used in a - * business object that represents an edge to identify the source node and target node of the corresponding edge. The - * binding should not be changed once the graph is built. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.GraphBuilderBase#nodesSource - * @type {any} - */ - nodeIdBinding:any; - /** - * Gets or sets the node label binding. - *

- * This binding maps a business object that represents a node to an object that specifies the label data of that node. - *

- *

- * By default, the label data object must be convertible into a string. This can be customized by overriding {@link yfiles.binding.GraphBuilderBase#createNode} - * and {@link yfiles.binding.GraphBuilderBase#updateNode}. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.GraphBuilderBase#nodesSource - * @type {any} - */ - nodeLabelBinding:any; - /** - * Gets or sets the group node ID binding. - *

- * This binding maps a business object that represents a group to its ID. If this binding is set, group IDs can be used in - * a business object that represents a node to identify the parent group of the corresponding node. The binding should not - * be changed once the graph is built. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. Functions will be called with both this and the first and only argument as the value to convert. - *

- * @see yfiles.binding.GraphBuilderBase#groupsSource - * @type {any} - */ - groupIdBinding:any; - /** - * Gets or sets the group binding. - *

- * This binding maps a business object o1 that represents a group to another object o2 that specifies the parent group of - * o1. If o2 is contained in {@link yfiles.binding.GraphBuilderBase#groupsSource}, then the node for o1 becomes a child node of the group for o2. - *

- *

- * If a {@link yfiles.binding.GraphBuilderBase#groupIdBinding} is set, to object o2 should be the ID of the object that specifies the group instead of the object itself. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.GraphBuilderBase#nodesSource - * @type {any} - */ - groupBinding:any; - /** - * Gets or sets the parent group binding. - *

- * This binding maps a business object o1 that represents a group to another object o2 that specifies the parent group of - * o1. If o2 is contained in {@link yfiles.binding.GraphBuilderBase#groupsSource}, then the group for o1 becomes a child node of the group for o2. - *

- *

- * If a {@link yfiles.binding.GraphBuilderBase#groupIdBinding} is set, to object o2 should be the ID of the object that specifies the group instead of the object itself. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @type {any} - */ - parentGroupBinding:any; - /** - * Gets or sets the binding for determining a node's position on the x-axis. - *

- * This binding maps a business object that represents a node to a number that specifies the x-coordinate of that node. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.GraphBuilderBase#nodesSource - * @type {any} - */ - locationXBinding:any; - /** - * Gets or sets the binding for determining a node's position on the y-axis. - *

- * This binding maps a business object that represents a node to a number that specifies the y-coordinate of that node. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.GraphBuilderBase#nodesSource - * @type {any} - */ - locationYBinding:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.binding.GraphBuilderBase; - } - /** - * This class is an adapter which populates a {@link yfiles.binding.TreeBuilder#graph} from hierarchical business data. - *

- * The nodes in the tree are determined using the {@link yfiles.binding.TreeBuilder#nodesSource} and {@link yfiles.binding.TreeBuilder#childBinding} properties. Optionally, a collection of group nodes can be - * specified with {@link yfiles.binding.TreeBuilder#groupsSource}. - *

- *

- * Graph items will be visualized using the styles defined in the {@link yfiles.graph.IGraph#nodeDefaults}, {@link yfiles.graph.IGraph#edgeDefaults} and {@link yfiles.graph.IGraph#groupNodeDefaults} property of the {@link yfiles.binding.TreeBuilder#graph}. - *

- *

- * The created {@link yfiles.binding.TreeBuilder#graph} is a directed forest, a set of directed trees. Each directed tree has exactly one root node with no - * incoming edges. For every other node v in a directed tree there is exactly one directed path from the root node of the - * directed tree to node v. - *

- *

- * To assign nodes to groups the {@link yfiles.binding.GraphBuilderBase#groupBinding} has to be defined. Group nodes can be nested using the {@link yfiles.binding.GraphBuilderBase#parentGroupBinding} property. Labels for the edges - * can be defined by setting a suitable {@link yfiles.binding.TreeBuilder#edgeLabelBinding}, which is resolved on the target (child) node. - *

- *

- * This class can be used to {@link yfiles.binding.TreeBuilder#updateGraph update} the {@link yfiles.binding.TreeBuilder#graph} when the underlying collection of the business objects ({@link yfiles.binding.TreeBuilder#nodesSource} and {@link yfiles.binding.TreeBuilder#childBinding}) changes. - *

- * @see yfiles.binding.TreeBuilder#nodesSource - * @see yfiles.binding.TreeBuilder#childBinding - * @class - */ - export interface TreeBuilder extends yfiles.lang.Object{} - export class TreeBuilder { - /** - * Creates a new empty instance using the given graph. - *

- * The graph will be {@link yfiles.graph.IGraph#clear cleared} and re-built from the data in {@link yfiles.binding.TreeBuilder#nodesSource} when {@link yfiles.binding.TreeBuilder#buildGraph} is called. The {@link yfiles.binding.TreeBuilder#childBinding} - * needs to be set in order to actually create a tree. - *

- * @param graph - */ - constructor(graph:yfiles.graph.IGraph); - /** - * Populates the graph instance with items generated from the bound business data. - *

- * First, this method clears the graph, and then it adds new groups, nodes, and edges as specified by the business data and - * bindings. - *

- * @returns The created graph. - * @see yfiles.binding.TreeBuilder#updateGraph - */ - buildGraph():yfiles.graph.IGraph; - /** - * Creates an edge between the source and target node. - * @param graph The graph. - * @param source The source node of the edge. - * @param target The target node of the edge. - * @param labelData The optional label data of the edge if an {@link #edgeLabelBinding} is specified. - * @returns The created edge. - * @protected - */ - createEdge(graph:yfiles.graph.IGraph,source:yfiles.graph.INode,target:yfiles.graph.INode,labelData:any):yfiles.graph.IEdge; - /** - * Creates a new group node and assigns the businessObjectparameter to the group node's {@link yfiles.graph.ITagOwner#tag Tag} property. - * @param graph The graph. - * @param businessObject The business data associated with the group node. - * @returns The created node. - * @protected - */ - createGroupNode(graph:yfiles.graph.IGraph,businessObject:any):yfiles.graph.INode; - /** - * Creates a node with the specified parent and assigns the businessObject parameter to the node's {@link yfiles.graph.ITagOwner#tag Tag} property. - * @param graph The graph. - * @param parent The node's parent node. - * @param location The location of the node. - * @param labelData The optional label data of the node if an {@link #nodeLabelBinding} is specified. - * @param businessObject The business data associated with the node. - * @returns The created node. - * @protected - */ - createNode(graph:yfiles.graph.IGraph,parent:yfiles.graph.INode,location:yfiles.geometry.Point,labelData:any,businessObject:any):yfiles.graph.INode; - /** - * Retrieves the associated business object for a given {@link yfiles.graph.INode node} from the {@link yfiles.binding.TreeBuilder#graph}. - * @param item The node of the graph to get the business object for. - * @returns The business object associated with the graph element. - * @see yfiles.binding.TreeBuilder#getNode - */ - getBusinessObject(item:yfiles.graph.IModelItem):any; - /** - * Retrieves the associated node in the {@link yfiles.binding.TreeBuilder#graph} for a business object from the {@link yfiles.binding.TreeBuilder#nodesSource}. - * @param businessObject A business object from the {@link #nodesSource} to get the node for. - * @returns The node associated with the business object or null for unknown objects. - * @see yfiles.binding.TreeBuilder#getBusinessObject - */ - getNode(businessObject:any):yfiles.graph.INode; - /** - * Updates an edge with the given data. - * @param graph The graph. - * @param edge The edge to update. - * @param source The edge's source node. - * @param target The edge's target node. - * @param labelData The business data associated with the edge. - * @protected - */ - updateEdge(graph:yfiles.graph.IGraph,edge:yfiles.graph.IEdge,source:yfiles.graph.INode,target:yfiles.graph.INode,labelData:any):void; - /** - * Updates the graph instance to fit the bound business data. - *

- * This method can be used to update the graph to fit changed business data. In contrast to - * {@link yfiles.binding.TreeBuilder#buildGraph}, it does not initially clear the graph. Instead, it keeps graph elements that for - * business objects are still present in the data, creates new elements for new data, and removes obsolete elements. - *

- */ - updateGraph():void; - /** - * Updates an existing group node when {@link yfiles.binding.TreeBuilder#updateGraph} is called and the group should remain in the - * graph. - *

- * This class calls this method to create all new groups, and customers may override it to customize group creation. - *

- * @param graph The graph. - * @param groupNode The group node to update. - * @param businessObject The business data associated with the group node. - * @protected - */ - updateGroupNode(graph:yfiles.graph.IGraph,groupNode:yfiles.graph.INode,businessObject:any):void; - /** - * Updates a node with the given data. - * @param graph The graph. - * @param node The node to update. - * @param parent The node's parent node. - * @param location The location of the node. - * @param labelData The optional label data of the edge if an {@link #nodeLabelBinding} is specified. - * @param businessObject The business data associated with the node. - * @protected - */ - updateNode(graph:yfiles.graph.IGraph,node:yfiles.graph.INode,parent:yfiles.graph.INode,location:yfiles.geometry.Point,labelData:any,businessObject:any):void; - /** - * Returns the {@link yfiles.graph.IGraph graph} used by this instance. - * @type {yfiles.graph.IGraph} - */ - graph:yfiles.graph.IGraph; - /** - * Gets or sets the business objects to be represented as nodes. - *

- * This can either be an array of objects, a plain JavaScript object, or an {@link yfiles.collections.IEnumerable.} containing the objects to be displayed as - * nodes - *

- *

- * Note that it is not necessary to include all nodes in this property, if they can be reached via the - * {@link yfiles.binding.TreeBuilder#childBinding}. In this case it suffices to include all root nodes. - *

- *

- * If the nodes source contains more than just the root nodes, some node sources are visited more than once during the - * construction of the - * {@link yfiles.binding.TreeBuilder#graph}. In order to avoid duplicate nodes, the tree source keeps track of node sources for which nodes have already been - * constructed. - *

- *

- * In case the value of this property is a plain JavaScript object, the object's properties are enumerated with Object.getOwnPropertyNames - * and used as the source for the tree nodes. - *

- * @type {any} - */ - nodesSource:any; - /** - * Gets or sets the business objects to be represented as group nodes of the {@link yfiles.binding.TreeBuilder#graph}. - *

- * This can either be an array of objects, a plain JavaScript object or an {@link yfiles.collections.IEnumerable.} containing the objects to be displayed as group - * nodes. - *

- *

- * In case the value of this property is a plain JavaScript object, the object's properties are enumerated with Object.getOwnPropertyNames - * and used as the source for the graph nodes. - *

- * @type {any} - */ - groupsSource:any; - /** - * Gets or sets the binding for the children of a node. - *

- * This binding maps a business object that represents a node to another business object o which specifies the children of - * this node. Similar to {@link yfiles.binding.GraphBuilderBase#nodesSource}, the object o can either be an array, an {@link yfiles.collections.IEnumerable.}, or a plain JavaScript object and should contain - * business objects that represent nodes. If a {@link yfiles.binding.GraphBuilderBase#nodeIdBinding} is set, these collection should contain the IDs of the objects that - * specifies the nodes instead of the objects themselves. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.GraphBuilderBase#nodesSource - * @type {any} - */ - childBinding:any; - /** - * Gets or sets the node ID binding. - *

- * This binding maps a business object that represents a node to its ID. If this binding is set, node IDs can be used in a - * business object that represents an edge to identify the source node and target node of the corresponding edge. The - * binding should not be changed once the graph is built. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.TreeBuilder#nodesSource - * @type {any} - */ - idBinding:any; - /** - * Gets or sets the edge label binding. - *

- * This binding maps a business object that represents a node to an object that specifies the label data of the incoming - * edge of that node. By default, the label data object must be convertible into a string. This can be customized by - * overriding {@link yfiles.binding.TreeBuilder#createEdge} and {@link yfiles.binding.TreeBuilder#updateEdge}. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @type {any} - */ - edgeLabelBinding:any; - /** - * Gets or sets the node label binding. - *

- * This binding maps a business object that represents a node to an object that specifies the label data of that node. - *

- *

- * By default, the label data object must be convertible into a string. This can be customized by overriding {@link yfiles.binding.TreeBuilder#createNode} - * and {@link yfiles.binding.TreeBuilder#updateNode}. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.TreeBuilder#nodesSource - * @type {any} - */ - nodeLabelBinding:any; - /** - * Gets or sets the binding for determining a node's position on the x-axis. - *

- * This binding maps a business object that represents a node to a number that specifies the x-coordinate of that node. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.TreeBuilder#nodesSource - * @type {any} - */ - locationXBinding:any; - /** - * Gets or sets the binding for determining a node's position on the y-axis. - *

- * This binding maps a business object that represents a node to a number that specifies the y-coordinate of that node. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.TreeBuilder#nodesSource - * @type {any} - */ - locationYBinding:any; - /** - * Gets or sets the group node ID binding. - *

- * This binding maps a business object that represents a group to its ID. If this binding is set, group IDs can be used in - * a business object that represents a node to identify the parent group of the corresponding node. The binding should not - * be changed once the graph is built. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.TreeBuilder#groupsSource - * @type {any} - */ - groupIdBinding:any; - /** - * Gets or sets the group binding. - *

- * This binding maps a business object o1 that represents a group to another object o2 that specifies the parent group of - * o1. If o2 is contained in {@link yfiles.binding.TreeBuilder#groupsSource}, then the node for o1 becomes a child node of the group for o2. - *

- *

- * If a {@link yfiles.binding.TreeBuilder#groupIdBinding} is set, to object o2 should be the ID of the object that specifies the group instead of the object itself. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @see yfiles.binding.TreeBuilder#nodesSource - * @type {any} - */ - groupBinding:any; - /** - * Gets or sets the parent group binding. - *

- * This binding maps a business object o1 that represents a group to another object o2 that specifies the parent group of - * o1. If o2 is contained in {@link yfiles.binding.TreeBuilder#groupsSource}, then the group for o1 becomes a child node of the group for o2. - *

- *

- * If a {@link yfiles.binding.TreeBuilder#groupIdBinding} is set, to object o2 should be the ID of the object that specifies the group instead of the object itself. - *

- *

- * The binding can either be a plain JavaScript function, a String, null, or an array which contains the same types - * recursively. A function is called with the business object to convert as first and only parameter, and the function's this - * is set to the business object, too. - *

- * @type {any} - */ - parentGroupBinding:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.binding.TreeBuilder; - } - }export namespace algorithms{ - /** - * This class provides a means for early termination of graph algorithms. - *

- * Instances of this class may be attached to and retrieved from a graph and may receive requests for stopping and - * canceling an algorithm that is currently executed on the given graph. - *

- *

- * Client Code Usage - *

- *

- * An instance of this class can be attached to a graph using method {@link yfiles.algorithms.AbortHandler#createForGraph}. The - * handler's {@link yfiles.algorithms.AbortHandler#stopDuration} and {@link yfiles.algorithms.AbortHandler#cancelDuration} methods can be used to automatically stop or cancel an algorithm after a specified period of time has - * elapsed. Algorithms can check for these requests and handle them appropriately. - *

- *
    - *
  • - * Stop – The algorithm should terminate gracefully, delivering a consistent result. Although the termination will be early, it - * will usually not be immediate. - *
  • - *
  • Cancel – The algorithm should terminate immediately and all work done so far will be discarded.
  • - *
- *

- * If a graph with an attached handler is processed by multiple algorithms (or multiple times by the same algorithm), the - * attached handler has to be {@link yfiles.algorithms.AbortHandler#reset} between algorithm runs. Otherwise, previous requests for - * early termination may lead to an undesired early termination of the next algorithm run. - *

- *

- * Usage in Algorithms - *

- *

- * Algorithms have to retrieve an instance of this class from the graph that is processed using method - * {@link yfiles.algorithms.AbortHandler#getFromGraph}. Then, the algorithm needs to query the retrieved instance of this class for - * stop or cancel requests using method {@link yfiles.algorithms.AbortHandler#check}. - *

- *

- * Alternatively, convenience method {@link yfiles.algorithms.AbortHandler#check} for one-time checks is available. For performance - * critical code that checks repeatedly, it is recommended to follow the first approach, though. - *

- *

- * When handling a stop request, algorithms should ensure that the resulting graph is still in a consistent state. - *

- * @class - */ - export interface AbortHandler extends yfiles.lang.Object{} - export class AbortHandler { - /** - * Creates a new {@link yfiles.algorithms.AbortHandler} instance. - * @see yfiles.algorithms.AbortHandler#stopDuration - * @see yfiles.algorithms.AbortHandler#cancelDuration - * @see yfiles.algorithms.AbortHandler#reset - */ - constructor(); - /** - * Determines whether or not an algorithm should terminate immediately. - *

- * This method returns true if the algorithm should terminate gracefully and ensures that the processed graph remains in a - * consistent state. - *

- * @returns true, if the algorithm should terminate immediately, false otherwise - * @throws {yfiles.algorithms.AlgorithmAbortedError} if the algorithm should terminate immediately - * @see yfiles.algorithms.AbortHandler#stop - */ - check():boolean; - /** - * Determines whether or not an algorithm should terminate immediately. - *

- * This method returns true if the algorithm should terminate gracefully and ensures that the processed graph remains in a - * consistent state. - *

- *

- * This convenience method is meant for one-time checks only. For performance critical code that needs to check repeatedly, - * it is recommended to retrieve the given graph's attached handler once and only call the handler's {@link yfiles.algorithms.AbortHandler#check} - * method repeatedly. - *

- * @param graph - * @returns true, if the algorithm should stop immediately while still providing some valid result, false otherwise - * @throws {yfiles.algorithms.AlgorithmAbortedError} if the algorithm should terminate immediately - * @throws {Stubs.Exceptions.ArgumentError} if the given graph is null - * @see yfiles.algorithms.AbortHandler#check - * @see yfiles.algorithms.AbortHandler#stop - * @static - */ - static check(graph:yfiles.algorithms.Graph):boolean; - /** - * Attaches the {@link yfiles.algorithms.AbortHandler} instance of the given source graph to the target graph as well. - * @param source the graph whose handler is attached to the target graph - * @param target the graph to which the handler of the source graph is attached - * @throws {Stubs.Exceptions.ArgumentError} if the given source is null - * @static - */ - static copyHandler(source:yfiles.algorithms.Graph,target:yfiles.algorithms.Graph):void; - /** - * Creates an {@link yfiles.algorithms.AbortHandler handler} instance and attaches it to the given graph. - *

- * If the given graph has already an attached handler instance, this is the instance that will be returned and this method - * will not create a new {@link yfiles.algorithms.AbortHandler}. - *

- *

- * This method should be called by client code prior to starting a graph algorithm that may be terminated early. - *

- * @param graph the graph to which the handler will be attached - * @returns the {@link } instance for the given graph - * @throws {Stubs.Exceptions.ArgumentError} if the given graph is null. - * @see yfiles.algorithms.AbortHandler#hasHandler - * @static - */ - static createForGraph(graph:yfiles.algorithms.Graph):yfiles.algorithms.AbortHandler; - /** - * Returns an {@link yfiles.algorithms.AbortHandler} instance for the given graph. - *

- * If {@link yfiles.algorithms.AbortHandler#createForGraph} has been used for attaching a new handler to the given graph, this is - * the instance that will be returned. Otherwise, a non-functional instance is returned whose methods do nothing. Use {@link yfiles.algorithms.AbortHandler#hasHandler} - * to check whether or not a handler has been already attached to the given graph. - *

- * @param graph the given graph - * @returns an {@link } for the given graph or a non-functional instance if no handler has been previously - * created - * @throws {Stubs.Exceptions.ArgumentError} if the given graph is null - * @see yfiles.algorithms.AbortHandler#createForGraph - * @see yfiles.algorithms.AbortHandler#hasHandler - * @static - */ - static getFromGraph(graph:yfiles.algorithms.Graph):yfiles.algorithms.AbortHandler; - /** - * Determines whether or not an {@link yfiles.algorithms.AbortHandler} instance is attached to the given graph. - * @param graph the given graph - * @returns true if a handler is attached to the given graph, false otherwise - * @throws {Stubs.Exceptions.ArgumentError} if the given graph is null - * @static - */ - static hasHandler(graph:yfiles.algorithms.Graph):boolean; - /** - * Removes any attached {@link yfiles.algorithms.AbortHandler} instance from the given graph. - * @param graph the given graph - * @throws {Stubs.Exceptions.ArgumentError} if the given graph is null. - * @static - */ - static removeFromGraph(graph:yfiles.algorithms.Graph):void; - /** - * Resets the state of the {@link yfiles.algorithms.AbortHandler handler}. - *

- * Resetting the {@link yfiles.algorithms.AbortHandler handler} discards any previous stop or cancel requests. Moreover, the handler's internal timestamp that is - * used for determining whether or not an algorithm should be stopped or cancelled automatically is reset as well. - *

- *

- * This method should be called whenever a graph with an attached handler is processed an additional time to prevent - * previous requests for early termination to result in an undesired early termination of the next algorithm run. - *

- * @see yfiles.algorithms.AbortHandler#cancelDuration - * @see yfiles.algorithms.AbortHandler#stopDuration - */ - reset():void; - /** - * Schedules a stop request. - *

- * Algorithms that detect stop requests should terminate gracefully and ensure that the processed graph remains in a - * consistent state. - *

- *

- * If a Cancel request has already been scheduled for this handler, the stop request is ignored. If a Cancel request is - * scheduled later on, the stop request is overridden. - *

- * @see yfiles.algorithms.AbortHandler#check - * @see yfiles.algorithms.AbortHandler#cancelDuration - */ - stop():void; - /** - * Determines the remaining time (in milliseconds) until an algorithm that {@link yfiles.algorithms.AbortHandler#check checks} this handler is cancelled automatically. - * @returns the remaining time until the algorithm is cancelled automatically. - * @see yfiles.algorithms.AbortHandler#cancelDuration - * @see yfiles.algorithms.AbortHandler#reset - * @see yfiles.algorithms.AbortHandler#cancelDuration - */ - timeToCancel():yfiles.lang.TimeSpan; - /** - * Determines the remaining time until an algorithm that {@link yfiles.algorithms.AbortHandler#check checks} this handler is stopped automatically. - *

- * If the {@link yfiles.algorithms.AbortHandler#stopDuration stop duration} is less than or equal to zero, -1 will be returned which means that the algorithm may run - * unrestricted. - *

- * @returns the remaining time until the algorithm is stopped automatically or -1 if the algorithm may run unrestricted - * @see yfiles.algorithms.AbortHandler#stopDuration - * @see yfiles.algorithms.AbortHandler#reset - * @see yfiles.algorithms.AbortHandler#stop - */ - timeToStop():yfiles.lang.TimeSpan; - /** - * Data provider key for attaching an AbortHandler instance to a graph - *

- * Only instances of {@link yfiles.algorithms.AbortHandler} should be assigned to this {@link yfiles.algorithms.IDataProvider}, otherwise a - * {@link yfiles.lang.Exception} will occur. Layout algorithms will use the attached handler to check for requests to cancel or - * stop the layout process. - *

- * @const - * @static - * @type {yfiles.algorithms.GraphDpKey.} - */ - static ABORT_HANDLER_DP_KEY:yfiles.algorithms.GraphDpKey; - /** - * Returns whether or not a stop request was scheduled explicitly with the {@link yfiles.algorithms.AbortHandler#stop} method. - * @type {boolean} - */ - stopRequested:boolean; - /** - * Gets or sets the duration an algorithm may run before being stopped automatically. - *

- * An algorithm is terminated gracefully, if the time in between {@link yfiles.algorithms.AbortHandler creating} or {@link yfiles.algorithms.AbortHandler#reset resetting} this handler and calling {@link yfiles.algorithms.AbortHandler#check} - * exceeds the stop duration. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the duration is negative - * @see yfiles.algorithms.AbortHandler#timeToStop - * @see yfiles.algorithms.AbortHandler#reset - * @see yfiles.algorithms.AbortHandler#stop - * @type {yfiles.lang.TimeSpan} - */ - stopDuration:yfiles.lang.TimeSpan; - /** - * Gets or sets the duration an algorithm may run before being cancelled automatically. - *

- * An algorithm is terminated immediately, if the time in between {@link yfiles.algorithms.AbortHandler creating} or {@link yfiles.algorithms.AbortHandler#reset resetting} this handler and calling {@link yfiles.algorithms.AbortHandler#check} - * exceeds the cancel duration. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the duration is negative - * @see yfiles.algorithms.AbortHandler#reset - * @see yfiles.algorithms.AbortHandler#cancelDuration - * @type {yfiles.lang.TimeSpan} - */ - cancelDuration:yfiles.lang.TimeSpan; - /** - * Gets whether or not methods {@link yfiles.algorithms.AbortHandler#check} or {@link yfiles.algorithms.AbortHandler#check} were called - * after a stop or cancel event. - *

- * More precisely, it returns true if one of the check methods either threw an {@link yfiles.lang.Exception} or returned true to - * indicate that the calling algorithm should terminate gracefully. Otherwise, this method returns false. - *

- * @see yfiles.algorithms.AbortHandler#check - * @see yfiles.algorithms.AbortHandler#check - * @type {boolean} - */ - checkFailed:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.AbortHandler; - } - /** - * This class provides services that center around breadth first search (BFS). - *

- * Breadth first search starts at a given set of nodes and explores the neighboring nodes first, before visiting the next - * level neighbors. - *

- *

- * A breadth first search run can be either directed or undirected. All methods require a list of nodes that are considered - * as the core nodes from which the breadth first search starts. These nodes can be identified either with a {@link yfiles.algorithms.NodeList} - * or with a {@link yfiles.algorithms.IDataProvider} that returns true for core nodes and false for all other nodes. The output is - * given as an array of {@link yfiles.algorithms.NodeList}s each of which contains the nodes of a particular layer. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":0},"n":[[-35,-35,1,[[-25.34,-10.65,10.67,18.7,"0"]]],[-35,85,[[-25.34,109.35,10.67,18.7,"1"]]],[85,-35,[[94.66,-10.65,10.67,18.7,"1"]]],[85,85,[[94.66,109.35,10.67,18.7,"2"]]],[205,-35,[[214.66,-10.65,10.67,18.7,"3"]]],[205,85,[[214.66,109.35,10.67,18.7,"4"]]]],"e":[[4,3],[2,0],[0,1],[1,3],[2,3],[4,5]],"vp":[-35.0,-35.0,270.0,150.0]}} Example for a BFS run. The marked node is the core node from which BFS starts while node labels indicate the resulting - * layers. - *

- * @class - * @static - */ - export interface Bfs extends yfiles.lang.Object{} - export class Bfs { - /** - * Returns the layers of nodes constructed by a directed/undirected breadth first search where the maximum number of layers - * is restricted. - *

- * The first of these layers contains all nodes within the given {@link yfiles.algorithms.NodeList}. These nodes are the core nodes - * from which a breadth first search to the other nodes starts. The algorithm fills the provided {@link yfiles.algorithms.INodeMap} - * with an integer indicating the layer of each node. - *

- *

- * In the i-th layer are previously unassigned nodes that are connected to nodes in the (i-1)-th layer. - *

- * @param graph the given graph - * @param coreNodes the list of core nodes - * @param direction one of the predefined direction specifiers - * @param layerIDMap the {@link } that will be filled during the BFS execution and holds the zero-based index of the BFS - * layer to which each node belongs or -1 if the node is not reachable - * @param [maxLayers=0] the number of layers that will be returned or 0 if all layers are required - * @returns an array of {@link }s each of which contains the nodes of a particular layer - * @throws {Stubs.Exceptions.ArgumentError} if the given direction is not supported - * @static - */ - static getLayers(graph:yfiles.algorithms.Graph,coreNodes:yfiles.algorithms.NodeList,direction:yfiles.algorithms.BfsDirection,layerIDMap:yfiles.algorithms.INodeMap,maxLayers?:number):yfiles.algorithms.NodeList[]; - /** - * Returns the layers of nodes constructed by a directed/undirected breadth first search where the maximum number of layers - * is restricted. - *

- * The first of these layers contains all nodes within the given {@link yfiles.algorithms.NodeList}. These nodes are the core nodes - * from which either a directed or undirected breadth first search to the other nodes starts. The algorithm fills the - * provided {@link yfiles.algorithms.INodeMap} with an integer indicating the layer of each node. - *

- *

- * In the i-th layer are previously unassigned nodes that are connected to nodes in the (i-1)-th layer. - *

- * @param graph the given graph - * @param coreNodes the list of core nodes from which the BFS starts - * @param directed true if the graph should be considered directed, false otherwise - * @param layerIDMap the {@link } that will be filled during the BFS execution and holds the zero-based index of the BFS - * layer to which each node belongs or -1 if the node is not reachable - * @param [maxLayers=0] the number of layers that will be returned or 0 if all layers are required - * @returns an array of {@link }s each of which contains the nodes of a particular layer - * @static - */ - static getLayers(graph:yfiles.algorithms.Graph,coreNodes:yfiles.algorithms.NodeList,directed:boolean,layerIDMap:yfiles.algorithms.INodeMap,maxLayers?:number):yfiles.algorithms.NodeList[]; - /** - * Returns the layers of nodes constructed by a breadth first search. - *

- * The first of these layers contains all nodes within the given {@link yfiles.algorithms.NodeList}. These nodes are the core nodes - * from which an undirected breadth first search to the other nodes starts. The algorithm fills the provided {@link yfiles.algorithms.INodeMap} - * with an integer indicating the layer of each node. - *

- *

- * In the i-th layer are previously unassigned nodes that are connected to nodes in the (i-1)-th layer. - *

- * @param graph the given graph - * @param coreNodes the list of core nodes from which the BFS starts - * @param layerIDMap the {@link } that will be filled during the BFS execution and holds the zero-based index of the BFS - * layer to which each node belongs or -1 if the node is not reachable - * @returns an array of {@link }s each of which contains the nodes of a particular layer - * @static - */ - static getLayers(graph:yfiles.algorithms.Graph,coreNodes:yfiles.algorithms.NodeList,layerIDMap:yfiles.algorithms.INodeMap):yfiles.algorithms.NodeList[]; - /** - * Returns the layers of nodes constructed by a breadth first search. - *

- * The first of these layers contains all nodes for which the given {@link yfiles.algorithms.IDataProvider} returns true. These - * nodes are the core nodes from which an undirected breadth first search to the other nodes starts. The algorithm fills - * the provided {@link yfiles.algorithms.INodeMap} with an integer indicating the layer of each node. - *

- *

- * In the i-th layer are previously unassigned nodes that are connected to nodes in the (i-1)-th layer. - *

- * @param graph the given graph - * @param isCoreNode the {@link } that contains the nodes from which the BFS starts; core nodes are marked with a true - * value - * @param layerIDMap the {@link } that will be filled during the BFS execution and holds the zero-based index of the BFS - * layer to which each node belongs or -1 if the node is not reachable - * @returns an array of {@link }s each of which contains the nodes of a particular layer - * @static - */ - static getLayers(graph:yfiles.algorithms.Graph,isCoreNode:yfiles.algorithms.IDataProvider,layerIDMap:yfiles.algorithms.INodeMap):yfiles.algorithms.NodeList[]; - /** - * Returns the layers of nodes calculated by a breadth first search. - *

- * The first of these layers contains all nodes within the given - * {@link yfiles.algorithms.NodeList}. These nodes are the core nodes from which an undirected breadth first search to the other - * nodes starts. - *

- *

- * In the i-th layer are previously unassigned nodes that are connected to nodes in the (i-1)-th layer. - *

- * @param graph the given graph - * @param coreNodes the list of core nodes from which the BFS starts - * @returns an array of {@link }s each of which contains the nodes of a particular layer - * @static - */ - static getLayers(graph:yfiles.algorithms.Graph,coreNodes:yfiles.algorithms.NodeList):yfiles.algorithms.NodeList[]; - /** - * Returns the layers of nodes constructed by a breadth first search. - *

- * The first of these layers contains all nodes for which the given {@link yfiles.algorithms.IDataProvider} returns - * true. These nodes are the core nodes from which an undirected breadth first search to the other nodes starts. - *

- *

- * In the i-th layer are previously unassigned nodes that are connected to nodes in the (i-1)-th layer. - *

- * @param graph the given graph - * @param isCoreNode the {@link } that contains the nodes from which the BFS starts; core nodes are marked with a true - * value - * @returns an array of {@link }s each of which contains the nodes of a particular layer - * @static - */ - static getLayers(graph:yfiles.algorithms.Graph,isCoreNode:yfiles.algorithms.IDataProvider):yfiles.algorithms.NodeList[]; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Bfs; - } - /** - * This class provides methods to determine whether a graph is bipartite and to obtain the corresponding partitions. - *

- * A bipartite graph is a graph whose nodes can be partitioned into two sets such that each edges connects two nodes of different - * sets. In other words, there are no edges connecting nodes that belong to the same partition. - *

- *

- * The two sets/partitions are represented by two {@link any} constants i.e., {@link yfiles.algorithms.Bipartitions#RED} or - * {@link yfiles.algorithms.Bipartitions#BLUE}. - *

- *

- * {@graph {"ann":{"s":[40,40],"d":0, "b":0},"styles":{"6":{"c":1, "b":0}},"n":[[365,205,6],[365,305,6],[365,405,6],[505,205],[505,305],[505,405]],"e":[[0,4],[0,3],[0,5],[1,4],[2,3],[2,5],[1,5]],"vp":[365.0,200.0,170.0,250.0]}} Example of a bipartite graph. Circular and rectangular nodes represent the two partitions. - *

- * @class - * @static - */ - export interface Bipartitions extends yfiles.lang.Object{} - export class Bipartitions { - /** - * Calculates a bipartition of the given graph, if one exists. - *

- * If the graph is bipartite, then for all nodes of the given graph either {@link yfiles.algorithms.Bipartitions#RED} or {@link yfiles.algorithms.Bipartitions#BLUE} - * objects will be set in the given {@link yfiles.algorithms.INodeMap}, depending on the partition to which each node belongs. - *

- * @param graph the given graph - * @param markMap the {@link } that will be filled during the BFS execution and returns the partition (either {@link #RED} - * or {@link #BLUE}) to which each node belongs - * @returns true if the graph is bipartite, false otherwise - * @static - */ - static getBipartition(graph:yfiles.algorithms.Graph,markMap:yfiles.algorithms.INodeMap):boolean; - /** - * Determines whether or not the given graph is bipartite. - * @param graph the given graph - * @returns true if the graph is bipartite, false otherwise - * @static - */ - static isBipartite(graph:yfiles.algorithms.Graph):boolean; - /** - * A constant for marking a node that belongs to the red partition. - * @const - * @static - * @type {any} - */ - static RED:any; - /** - * A constant for marking a node that belongs to the blue partition. - * @const - * @static - * @type {any} - */ - static BLUE:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Bipartitions; - } - /** - * This class provides methods to determine various centrality indices of nodes or edges of a graph. - *

- * Centrality indices serve to quantify an intuitive feeling that in most networks some nodes or edges are "more central" - * than others. The provided methods assign a double value to each node or edge of a graph that represents its centrality. - * The higher an assigned value, the more central the element is considered by the algorithm. - *

- *

- * Also, this class provides convenience methods that normalize the returned centrality values such that they lie within - * the interval [0,1]. - *

- *

- * Definitions - *

- *
    - *
  • Betweenness centrality is a measure for how often a node/edge lies on a shortest path between each pair of nodes in the graph.
  • - *
  • Closeness centrality is the reciprocal of the sum of shortest path distances of a node to all other nodes in the graph.
  • - *
  • Graph centrality is the reciprocal of the maximum of all shortest path distances from a node to all other nodes in the graph.
  • - *
  • - * Degree centrality is the number of the incoming, outgoing or overall edges incident to a node (measures incoming, outgoing and overall - * degree). - *
  • - *
  • Weight centrality measures the weight associated with incoming, outgoing, or all edges of a node.
  • - *
- * @class - * @static - */ - export interface Centrality extends yfiles.lang.Object{} - export class Centrality { - /** - * Computes the closeness centrality for the nodes of a graph. - *

- * Closeness centrality is defined as the reciprocal of the sum of shortest path distances of a node to all other nodes in the graph. - * Therefore, a node with high closeness centrality has short distances to all other nodes of a graph. If the sum of the - * shortest path distances is 0, the closeness of a node is set to {@link number#POSITIVE_INFINITY}. - *

- * @param graph the input graph - * @param closeness the {@link } that will be filled during the execution and returns a double value (centrality) for each - * node - * @param directed true if the graph should be considered as directed, false otherwise - * @param edgeCosts the {@link } that returns a positive double value (cost) or null if the edges are of equal cost - * @static - */ - static closenessCentrality(graph:yfiles.algorithms.Graph,closeness:yfiles.algorithms.INodeMap,directed:boolean,edgeCosts:yfiles.algorithms.IDataProvider):void; - /** - * Computes the degree centrality for the nodes of a given graph. - *

- * Degree centrality is the number of the incoming, outgoing or overall edges incident to a node (measures incoming, outgoing and overall - * degree). - *

- * @param graph the input graph - * @param centrality the {@link } that will be filled during the execution and returns a double value (centrality) for each - * node - * @param considerInEdges true if the incoming edges should be considered, false otherwise - * @param considerOutEdges true if the outgoing edges should be considered, false otherwise - * @static - */ - static degreeCentrality(graph:yfiles.algorithms.Graph,centrality:yfiles.algorithms.INodeMap,considerInEdges:boolean,considerOutEdges:boolean):void; - /** - * Computes betweenness centrality for each edge of a given graph. - *

- * Betweenness centrality is a measure for how often an edge lies on a shortest path between each pair of nodes in the graph. Removing a central - * edge will cause many shortest paths to change. - *

- * @param graph the input graph - * @param centrality the {@link } that will be filled during the execution and returns a double value (centrality) for each - * edge - * @param directed true if the graph should be considered as directed, false otherwise - * @param edgeCosts the {@link } that returns a positive double value (cost) or null if the edges are of equal cost; - * for invalid input values the algorithm uses cost 1.0 - * @static - */ - static edgeBetweenness(graph:yfiles.algorithms.Graph,centrality:yfiles.algorithms.IEdgeMap,directed:boolean,edgeCosts:yfiles.algorithms.IDataProvider):void; - /** - * Computes the graph centrality for the nodes of a graph. - *

- * Graph centrality is defined as the reciprocal of the maximum of all shortest path distances from a node to all other nodes in the graph. - * Nodes with high graph centrality have short distances to all other nodes in the graph. - *

- * @param graph the input graph - * @param centrality the {@link } that will be filled during the execution and returns a double value (centrality) for each - * node - * @param directed true if the graph should be considered as directed, false otherwise - * @param edgeCosts the {@link } that returns a positive double value (cost) or null if the edges are of equal cost - * @static - */ - static graphCentrality(graph:yfiles.algorithms.Graph,centrality:yfiles.algorithms.INodeMap,directed:boolean,edgeCosts:yfiles.algorithms.IDataProvider):void; - /** - * Computes betweenness centrality for each node of a given graph. - *

- * Betweenness centrality is a measure for how often a node lies on a shortest path between each pair of nodes in the graph. Removing a central - * edge will cause many shortest paths to change. - *

- * @param graph the input graph - * @param centrality the {@link } that will be filled during the execution and returns a double value (centrality) for each - * node - * @param directed true if the graph should be considered as directed, false otherwise - * @param edgeCosts the {@link } that returns a positive double value (cost) or null if the edges are of equal cost; - * for invalid input values the algorithm uses cost 1.0 - * @static - */ - static nodeBetweenness(graph:yfiles.algorithms.Graph,centrality:yfiles.algorithms.INodeMap,directed:boolean,edgeCosts:yfiles.algorithms.IDataProvider):void; - /** - * Computes betweenness centrality for each node and edge of a given graph. - *

- * Betweenness centrality is a measure for how often a node/edge lies on a shortest path between each pair of nodes in the graph. Removing a - * central node/edge will cause many shortest paths to change. - *

- * @param graph the input graph - * @param nodeCentrality the {@link } that will be filled during the execution and returns a double value (centrality) for each - * node - * @param edgeCentrality the {@link } that will be filled during the execution and returns a double value (centrality) for each - * edge - * @param directed true if the graph should be considered as directed, false otherwise - * @param edgeCosts the {@link } that returns a positive double value (cost) or null if the edges are of equal cost; - * for invalid input values the algorithm uses cost 1.0 - * @static - */ - static nodeEdgeBetweenness(graph:yfiles.algorithms.Graph,nodeCentrality:yfiles.algorithms.INodeMap,edgeCentrality:yfiles.algorithms.IEdgeMap,directed:boolean,edgeCosts:yfiles.algorithms.IDataProvider):void; - /** - * Normalizes the double values of a given {@link yfiles.algorithms.IEdgeMap} by dividing each of them by the maximum of all values - * (maximum norm). - * @param graph the input graph - * @param map the {@link } that will be filled during the execution and returns a double value from [0,1] interval - * @static - */ - static normalizeEdgeMap(graph:yfiles.algorithms.Graph,map:yfiles.algorithms.IEdgeMap):void; - /** - * Normalizes the double values of a given {@link yfiles.algorithms.INodeMap} by dividing each of them by the maximum of all values - * (maximum norm). - * @param graph the input graph - * @param map the {@link } that will be filled during the execution and returns a double value from [0,1] interval - * @static - */ - static normalizeNodeMap(graph:yfiles.algorithms.Graph,map:yfiles.algorithms.INodeMap):void; - /** - * Computes the weight centrality for the nodes of a graph. - *

- * Weight centrality measures the weight associated with incoming, outgoing, or all edges of a node. - *

- * @param graph the input graph - * @param centrality the {@link } that will be filled during the execution and returns a double value (centrality) for each - * node - * @param considerInEdges true if the incoming edges should be considered, false otherwise - * @param considerOutEdges true if the outgoing edges should be considered, false otherwise - * @param edgeWeights the {@link } that returns a positive double value (weight) or null if the edges are considered to - * have uniform weight of 1.0 - * @static - */ - static weightCentrality(graph:yfiles.algorithms.Graph,centrality:yfiles.algorithms.INodeMap,considerInEdges:boolean,considerOutEdges:boolean,edgeWeights:yfiles.algorithms.IDataProvider):void; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Centrality; - } - /** - * This class is responsible for finding cycles within a graph that have certain properties. - *

- * Definitions - *

- *
    - *
  • - * An edge path with vertices v0, v1, v2, ... , vk (with k > 0 and (vi-1,vi), 0 < i <= k is edge of the given graph) is - * called simple if no vertex appears more than once. - *
  • - *
  • An edge path forms a cycle if v0 = vk.
  • - *
  • A cycle is called simple if no vertex appears more than once.
  • - *
  • A graph that contains no cycles is called acyclic.
  • - *
- *

- * {@graph {"ann":{"s":[30,30],"d":1, "c":1},"n":[[45,5],[105,65],[-15,65],[45,125],[185,65],[-95,65]],"e":[[0,1],[0,2],[1,3],[2,3],[1,4],[2,5]],"vp":[-95.0,5.0,310.0,150.0]}} Example of an acyclic directed graph (edge directions are considered) {@graph {"ann":{"s":[30,30],"d":1, "c":1},"n":[[305,185],[385,125],[345,285],[505,125],[545,225],[465,305]],"e":[[0,1],[1,3],[4,5,1],[5,2,1],[2,0,1],[0,4,1]],"vp":[305.0,125.0,270.0,210.0]}} Example of a graph containing a cycle. Marked - * edges form a directed cycle. - *

- * @class - * @static - */ - export interface Cycles extends yfiles.lang.Object{} - export class Cycles { - /** - * Returns an {@link yfiles.algorithms.EdgeList} that contains all the edges that are part of at least one directed or undirected - * simple cycle. - * @param graph the input graph - * @param directed true if the graph should be considered directed, false otherwise - * @returns an {@link } that contains all the edges that are part of at least one directed or undirected simple - * cycle - * @static - */ - static findAllCycleEdges(graph:yfiles.algorithms.Graph,directed:boolean):yfiles.algorithms.EdgeList; - /** - * Returns an {@link yfiles.algorithms.EdgeList} that contains the edges of a cycle found in the given graph. - *

- * The edges are returned in the order they appear in the detected cycle. - *

- *

- * If the returned cycle is empty, no cycle has been found in the given graph. - *

- * @param graph the given graph - * @param directed true if the graph should be considered directed, false otherwise - * @returns an {@link } containing the edges of a cycle or an empty {@link } if the graph is - * acyclic - * @static - */ - static findCycle(graph:yfiles.algorithms.Graph,directed:boolean):yfiles.algorithms.EdgeList; - /** - * Marks the edges of a given graph whose removal or reversal would make the graph acyclic while trying to minimize the - * cost associated with the marked edges. - *

- * This minimization is performed heuristically, since it is a well known hard problem to come up with an optimal - * solution. - *

- *

- * The costs are assigned using a {@link yfiles.algorithms.IDataProvider} that holds a non-negative double value for each edge. - *

- * @param graph the given graph - * @param cycleEdges the {@link } that will be filled during the execution and returns whether an edge is a detected cycle - * edge - * @param [costDP=null] the {@link } that holds the non-negative {@link } reversal cost for each edge - * @static - */ - static findCycleEdges(graph:yfiles.algorithms.Graph,cycleEdges:yfiles.algorithms.IEdgeMap,costDP?:yfiles.algorithms.IDataProvider):void; - /** - * Marks the edges of a given graph whose removal or reversal would make the graph acyclic based on a depth first search. - *

- * The number of marked cycle edges is expected to be slightly greater than when using - * {@link yfiles.algorithms.Cycles#findCycleEdges}. The advantage of this method is that the result set is more stable when edges - * are added or removed over time. - *

- * @param graph the given graph - * @param cycleEdges the {@link } that will be filled during the execution and returns a boolean value indicating whether - * or not an edge is a detected cycle edge - * @static - */ - static findCycleEdgesDFS(graph:yfiles.algorithms.Graph,cycleEdges:yfiles.algorithms.IEdgeMap):void; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Cycles; - } - /** - * Represents a dart of a face of a {@link yfiles.algorithms.PlanarEmbedding}. - *

- * For each edge there exist two darts, one that represents the edge in its original direction (i.e., from source to - * target) and one that represents its reverse. Each dart is associated with a {@link yfiles.algorithms.Dart#face face}. - *

- * @class - * @final - */ - export interface Dart extends yfiles.lang.Object{} - export class Dart { - /** - * Gets the edge associated with this dart. - * @type {yfiles.algorithms.Edge} - */ - associatedEdge:yfiles.algorithms.Edge; - /** - * Gets whether this dart represents the original edge or its reverse. - * @type {boolean} - */ - reversed:boolean; - /** - * Gets the opposite dart. - *

- * The opposite dart is associated with the same edge as this dart but with a different {@link yfiles.algorithms.Dart#reversed direction}. - *

- * @type {yfiles.algorithms.Dart} - */ - oppositeDart:yfiles.algorithms.Dart; - /** - * Gets the face list associated with this dart. - * @type {yfiles.collections.IList.} - */ - face:yfiles.collections.IList; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Dart; - } - /** - * Framework class for implementing depth first search (DFS) based algorithms. - *

- * A depth first search starts from a specified node and traverses the neighbors within a branch as deeply as possible - * (i.e., without visiting any vertex twice) before backtracking. - *

- *

- * A depth first search traversal induces a DFS forest that may consist of more than one DFS tree. Based on these trees, - * the edges are divided into four categories (see example): - *

- *
    - *
  • Tree Edges: The edges of the DFS forest.
  • - *
  • Back edges: Non-tree edges that connect nodes with their ancestors in the DFS tree. Self-loops are also considered as back edges.
  • - *
  • Forward edges: Edges that connect nodes of the DFS tree to one of their descendants.
  • - *
  • Cross edges: All other edges.
  • - *
- *

- * During a DFS run each node of the graph can be in one of the following states: - *

- *
    - *
  • Undiscovered: A node that has not been visited yet.
  • - *
  • - * Discovered but not finished: A node that has been already visited, but has not been completed yet, i.e. it is still part of an active path of the - * DFS tree. - *
  • - *
  • - * Finished: A node that has been completed, i.e. it has been visited before and is not part of an active path of the DFS tree - * anymore. - *
  • - *
- *

- * Graph algorithms, which are based on a depth first search, can extend this class and override appropriate callback - * methods provided by this class. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1, "c":1},"styles" : {"6" : {"s" : "#000000", "d" : 1, "l" : [3] }, "7" : {"s" : "#000000", "d" : 1, "l" : [1,4] }, "8" : {"s" : "#000000", "d" : 1, "l" : [7] }},"n":[[145,-15,[[154.66,9.35,10.67,18.7,"1"]]],[65,65,[[74.66,89.35,10.67,18.7,"2"]]],[185,65,[[194.66,89.35,10.67,18.7,"8"]]],[45,225,[[54.66,249.35,10.67,18.7,"5"]]],[125,145,[[134.66,169.35,10.67,18.7,"7"]]],[65,145,[[74.66,169.35,10.67,18.7,"6"]]],[-35,225,[[-25.34,249.35,10.67,18.7,"4"]]],[5,145,[[14.66,169.35,10.67,18.7,"3"]]],[185,145,[[194.66,169.35,10.67,18.7,"9"]]]],"e":[[0,1],[1,7],[0,2],[7,3],[1,4],[1,5],[7,6],[2,1,6,[],[[118.33,72.85,35.34,18.7,"Cross"]]],[6,1,8,[-60,100,-60,100],[[-95.2,149.04,30.68,18.7,2.4492935982947064E-16,-1.0,"Back"]]],[0,3,7,[360,140],[[270.38,202.85,48.01,18.7,2.4492935982947064E-16,-1.0,"Forward"]]],[2,8]],"vp":[-96.0,-15.0,456.0,270.0]}} Example of a DFS traversal. Node labels indicate the order in which nodes are visited. Solid edges are the edges of the - * DFS tree while dashed edges represent back, forward and cross edges. - *

- * @class - */ - export interface Dfs extends yfiles.lang.Object{} - export class Dfs { - /** - * Creates a new {@link yfiles.algorithms.Dfs} instance with default settings. - */ - constructor(); - /** - * Cancels the depth first search. - *

- * It may be overridden to support custom implementations. - *

- */ - cancel():void; - /** - * Callback method that will be invoked whenever DFS continues its search at a new root node. - *

- * By default, this method does nothing. It may be overridden to support custom implementations. - *

- * @param v the new root node - * @protected - */ - lookFurther(v:yfiles.algorithms.Node):void; - /** - * Callback method that will be invoked after the DFS has returned from the given node. - *

- * By default, this method does nothing. It may be overridden to support custom implementations. - *

- * @param edge the given edge - * @param node the node that has been reached via the given edge - * @protected - */ - postTraverse(edge:yfiles.algorithms.Edge,node:yfiles.algorithms.Node):void; - /** - * Callback method that will be invoked whenever a node visit has been completed. - *

- * By default, this method does nothing. It may be overridden to support custom implementations. - *

- * @param node the given node - * @param dfsNumber the DFS number of the given node - * @param compNumber the completion number of the given node - * @protected - */ - postVisit(node:yfiles.algorithms.Node,dfsNumber:number,compNumber:number):void; - /** - * Callback method that will be invoked if the given edge will be considered the first (and only) time during the DFS. - *

- * By default, this method does nothing. It may be overridden to support custom implementations. - *

- * @param edge the given edge - * @param node the node to be visited next only if treeEdge == true - * @param treeEdge true if the node will be visited, false otherwise - * @protected - */ - preTraverse(edge:yfiles.algorithms.Edge,node:yfiles.algorithms.Node,treeEdge:boolean):void; - /** - * Callback method that will be invoked whenever a formerly unvisited node gets visited for the first time. - *

- * By default, this method does nothing. It may be overridden to support custom implementations. - *

- * @param node the given node - * @param dfsNumber the DFS number of the given node - * @protected - */ - preVisit(node:yfiles.algorithms.Node,dfsNumber:number):void; - /** - * Starts a depth first search from a given {@link yfiles.algorithms.Node} of the input graph. - * @param graph the input graph - * @param start the given start node - */ - start(graph:yfiles.algorithms.Graph,start:yfiles.algorithms.Node):void; - /** - * Starts a depth first search on the given graph. - *

- * The first node of the graph will be visited first. - *

- * @param graph the input graph - */ - start(graph:yfiles.algorithms.Graph):void; - /** - * A {@link yfiles.algorithms.INodeMap} that holds for each {@link yfiles.algorithms.Node} an {@link any} indicating the current state of the given - * node as it is visited by this algorithm. - *

- * Each node will be assigned one of the {@link yfiles.algorithms.Dfs#WHITE WHITE}, {@link yfiles.algorithms.Dfs#GRAY GRAY} or {@link yfiles.algorithms.Dfs#BLACK BLACK} objects that describe the state of the nodes. - *

- * @protected - * @type {yfiles.algorithms.INodeMap} - */ - stateMap:yfiles.algorithms.INodeMap; - /** - * A constant indicating a node has not been visited yet. - * @protected - * @const - * @static - * @type {any} - */ - static WHITE:any; - /** - * A constant indicating a node has already been visited, but has not been completed yet. - *

- * Such a node is still part of an active path of the DFS tree. - *

- * @protected - * @const - * @static - * @type {any} - */ - static GRAY:any; - /** - * A constant indicating a node has been completed. - *

- * Such a node has been visited before and is no longer part of an active path of the DFS tree. - *

- * @protected - * @const - * @static - * @type {any} - */ - static BLACK:any; - /** - * Sets whether or not to interpret the edges of the graph as directed. - * @type {boolean} - */ - directedMode:boolean; - /** - * Sets whether or not to continue the depth first search after all nodes reachable from the first node have been visited. - * @type {boolean} - */ - lookFurtherMode:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Dfs; - } - /** - * This is the base class of all look-up keys that are used to register {@link yfiles.algorithms.IDataProvider} with a - * {@link yfiles.algorithms.Graph}. - * Type parameter TValue: The type of the values that are returned by the {@link yfiles.algorithms.IDataProvider} registered with this class. - * @see yfiles.algorithms.Graph#addDataProvider - * @see yfiles.algorithms.Graph#getDataProvider - * @see yfiles.algorithms.Graph#removeDataProvider - * @class - * @template TValue - */ - export interface DpKeyBase extends yfiles.lang.Object{} - export class DpKeyBase { - /** - * Initializes a new instance of the {@link yfiles.algorithms.DpKeyBase.} class. - * @param valueType The type of the values that are returned by the {@link } registered with this class. - * @param declaringType Type that declares this key. - * @param name The name of this key. - */ - constructor(valueType:yfiles.lang.Class,declaringType:yfiles.lang.Class,name:string); - /** - * Returns whether this key is equal to the specified other. - * @param other The other key to compare with this instance. - * @returns true if the specified key is equal to this instance; otherwise, false. - * @protected - */ - equalsCore(other:yfiles.algorithms.DpKeyBase):boolean; - /** - * Gets the type that declares this key. - * @type {yfiles.lang.Class} - */ - declaringType:yfiles.lang.Class; - /** - * Gets the name of this key. - * @type {string} - */ - name:string; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.DpKeyBase; - } - /** - * This class is used as look-up key for registering {@link yfiles.algorithms.IDataProvider} for {@link yfiles.algorithms.Edge}s with a - * {@link yfiles.algorithms.Graph}. - * Type parameter TValue: The type of the values that are returned by the {@link yfiles.algorithms.IDataProvider} registered with this class. - * @see yfiles.algorithms.Graph#addDataProvider - * @see yfiles.algorithms.Graph#getDataProvider - * @see yfiles.algorithms.Graph#removeDataProvider - * @class - * @extends {yfiles.algorithms.DpKeyBase.} - * @template TValue - */ - export interface EdgeDpKey extends yfiles.algorithms.DpKeyBase{} - export class EdgeDpKey { - /** - * Initializes a new instance of the {@link yfiles.algorithms.EdgeDpKey.} class. - * @param valueType The type of the values that are returned by the {@link } registered with this class. - * @param declaringType Type that declares this key. - * @param name The name of this key. - */ - constructor(valueType:yfiles.lang.Class,declaringType:yfiles.lang.Class,name:string); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.EdgeDpKey; - } - /** - * This class is used as look-up key for registering {@link yfiles.algorithms.IDataProvider} for the {@link yfiles.algorithms.Graph} itself - * with a graph. - * Type parameter TValue: The type of the values that are returned by the {@link yfiles.algorithms.IDataProvider} registered with this class. - * @see yfiles.algorithms.Graph#addDataProvider - * @see yfiles.algorithms.Graph#getDataProvider - * @see yfiles.algorithms.Graph#removeDataProvider - * @class - * @extends {yfiles.algorithms.DpKeyBase.} - * @template TValue - */ - export interface GraphDpKey extends yfiles.algorithms.DpKeyBase{} - export class GraphDpKey { - /** - * Initializes a new instance of the {@link yfiles.algorithms.GraphDpKey.} class. - * @param valueType The type of the values that are returned by the {@link } registered with this class. - * @param declaringType Type that declares this key. - * @param name The name of this key. - */ - constructor(valueType:yfiles.lang.Class,declaringType:yfiles.lang.Class,name:string); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.GraphDpKey; - } - /** - * This class is used as look-up key for registering {@link yfiles.algorithms.IDataProvider} for {@link yfiles.algorithms.GraphObject}s - * with a {@link yfiles.algorithms.Graph}. - * Type parameter TValue: The type of the values that are returned by the {@link yfiles.algorithms.IDataProvider} registered with this class. - * @see yfiles.algorithms.Graph#addDataProvider - * @see yfiles.algorithms.Graph#getDataProvider - * @see yfiles.algorithms.Graph#removeDataProvider - * @class - * @extends {yfiles.algorithms.DpKeyBase.} - * @template TValue - */ - export interface GraphObjectDpKey extends yfiles.algorithms.DpKeyBase{} - export class GraphObjectDpKey { - /** - * Initializes a new instance of the {@link yfiles.algorithms.GraphObjectDpKey.} class. - * @param valueType The type of the values that are returned by the {@link } registered with this class. - * @param declaringType Type that declares this key. - * @param name The name of this key. - */ - constructor(valueType:yfiles.lang.Class,declaringType:yfiles.lang.Class,name:string); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.GraphObjectDpKey; - } - /** - * This class is used as look-up key for registering {@link yfiles.algorithms.IDataProvider} for IEdgeLabelLayouts with a - * {@link yfiles.algorithms.Graph}. - * Type parameter TValue: The type of the values that are returned by the {@link yfiles.algorithms.IDataProvider} registered with this class. - * @see yfiles.algorithms.Graph#addDataProvider - * @see yfiles.algorithms.Graph#getDataProvider - * @see yfiles.algorithms.Graph#removeDataProvider - * @class - * @extends {yfiles.algorithms.DpKeyBase.} - * @template TValue - */ - export interface IEdgeLabelLayoutDpKey extends yfiles.algorithms.DpKeyBase{} - export class IEdgeLabelLayoutDpKey { - /** - * Initializes a new instance of the {@link yfiles.algorithms.IEdgeLabelLayoutDpKey.} class. - * @param valueType The type of the values that are returned by the {@link } registered with this class. - * @param declaringType Type that declares this key. - * @param name The name of this key. - */ - constructor(valueType:yfiles.lang.Class,declaringType:yfiles.lang.Class,name:string); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.IEdgeLabelLayoutDpKey; - } - /** - * This class is used as look-up key for registering {@link yfiles.algorithms.IDataProvider} for INodeLabelLayouts with a - * {@link yfiles.algorithms.Graph}. - * Type parameter TValue: The type of the values that are returned by the {@link yfiles.algorithms.IDataProvider} registered with this class. - * @see yfiles.algorithms.Graph#addDataProvider - * @see yfiles.algorithms.Graph#getDataProvider - * @see yfiles.algorithms.Graph#removeDataProvider - * @class - * @extends {yfiles.algorithms.DpKeyBase.} - * @template TValue - */ - export interface INodeLabelLayoutDpKey extends yfiles.algorithms.DpKeyBase{} - export class INodeLabelLayoutDpKey { - /** - * Initializes a new instance of the {@link yfiles.algorithms.INodeLabelLayoutDpKey.} class. - * @param valueType The type of the values that are returned by the {@link } registered with this class. - * @param declaringType Type that declares this key. - * @param name The name of this key. - */ - constructor(valueType:yfiles.lang.Class,declaringType:yfiles.lang.Class,name:string); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.INodeLabelLayoutDpKey; - } - /** - * This class is used as look-up key for registering {@link yfiles.algorithms.IDataProvider} for ILabelLayouts with a - * {@link yfiles.algorithms.Graph}. - * Type parameter TValue: The type of the values that are returned by the {@link yfiles.algorithms.IDataProvider} registered with this class. - * @see yfiles.algorithms.Graph#addDataProvider - * @see yfiles.algorithms.Graph#getDataProvider - * @see yfiles.algorithms.Graph#removeDataProvider - * @class - * @extends {yfiles.algorithms.DpKeyBase.} - * @template TValue - */ - export interface ILabelLayoutDpKey extends yfiles.algorithms.DpKeyBase{} - export class ILabelLayoutDpKey { - /** - * Initializes a new instance of the {@link yfiles.algorithms.ILabelLayoutDpKey.} class. - * @param valueType The type of the values that are returned by the {@link } registered with this class. - * @param declaringType Type that declares this key. - * @param name The name of this key. - */ - constructor(valueType:yfiles.lang.Class,declaringType:yfiles.lang.Class,name:string); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.ILabelLayoutDpKey; - } - /** - * This class is used as look-up key for registering {@link yfiles.algorithms.IDataProvider} for {@link yfiles.algorithms.Node}s with a - * {@link yfiles.algorithms.Graph}. - * Type parameter TValue: The type of the values that are returned by the {@link yfiles.algorithms.IDataProvider} registered with this class. - * @see yfiles.algorithms.Graph#addDataProvider - * @see yfiles.algorithms.Graph#getDataProvider - * @see yfiles.algorithms.Graph#removeDataProvider - * @class - * @extends {yfiles.algorithms.DpKeyBase.} - * @template TValue - */ - export interface NodeDpKey extends yfiles.algorithms.DpKeyBase{} - export class NodeDpKey { - /** - * Initializes a new instance of the {@link yfiles.algorithms.NodeDpKey.} class. - * @param valueType The type of the values that are returned by the {@link } registered with this class. - * @param declaringType Type that declares this key. - * @param name The name of this key. - */ - constructor(valueType:yfiles.lang.Class,declaringType:yfiles.lang.Class,name:string); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.NodeDpKey; - } - /** - * Represents an edge, i.e., a directed connection between two nodes (represented by instances of class - * {@link yfiles.algorithms.Node}) in the directed graph data type {@link yfiles.algorithms.Graph}. - *

- *
The directed stems from the fact that an edge has a distinct source node and a distinct target node. Using pair notation, an - * edge would be written as (<source node>, <target node>). - *

- *

- * Most notably, an edge provides access to its source node ({@link yfiles.algorithms.Edge#source}) and its target node ({@link yfiles.algorithms.Edge#target}). Note that an edge can have the same - * node as its source and target. Such an edge is then called "self-loop" and method {@link yfiles.algorithms.Edge#selfLoop} yields true. - *

- *

- * Important: Class Graph is the single authority for any structural changes to the graph data type. Specifically, this means that - * there is no way to create or delete a node or an edge without using an actual Graph instance. - *

- * @class - * @extends {yfiles.algorithms.GraphObject} - */ - export interface Edge extends yfiles.algorithms.GraphObject{} - export class Edge { - /** - * Creates a new edge that belongs to the given graph. - *

- * The new edge e has source node v and target node w. - *
- * - *
- * Edge e is inserted in such a way that an iteration over the edges at node v returns e - *

- *
    - *
  • after e1, if d1 == AFTER
  • - *
  • before e1, if d1 == BEFORE,
  • - *
- *

- * and an iteration over the edges at w returns e - *

- *
    - *
  • after e2, if d2 == AFTER
  • - *
  • before e2, if d2 == BEFORE.
  • - *
- * @param v The source node of the edge. - * @param e1 An edge with source node v. - * @param w The target node of the edge. - * @param e2 An edge with target node w. - * @param d1 One of the object insertion specifiers {@link #BEFORE} or - * {@link #AFTER}. - * @param d2 One of the object insertion specifiers {@link #BEFORE} or - * {@link #AFTER}. - * @param g - */ - constructor(g:yfiles.algorithms.Graph,v:yfiles.algorithms.Node,e1:yfiles.algorithms.Edge,w:yfiles.algorithms.Node,e2:yfiles.algorithms.Edge,d1:yfiles.algorithms.GraphElementInsertion,d2:yfiles.algorithms.GraphElementInsertion); - /** - * Creates a copy of this edge that will be inserted into the given graph connecting the given source and target nodes. - * @param g The graph the created edge will belong to. - * @param v The source node of the created edge. - * @param w The target node of the created edge. - * @returns The newly created Edge object. - */ - createCopy(g:yfiles.algorithms.Graph,v:yfiles.algorithms.Node,w:yfiles.algorithms.Node):yfiles.algorithms.Edge; - /** - * Callback method that is invoked from a graph just before this edge will be reinserted into that graph. - */ - onReinsert():void; - /** - * Returns the node at the opposite edge end with respect to the given node. - *

- * Note that self-loops have the same node at both edge ends. - *

- * @param v - * @returns - */ - opposite(v:yfiles.algorithms.Node):yfiles.algorithms.Node; - /** - * Gets the graph this edge belongs to. - *

- * If the edge does not belong to a graph, because it was removed or hidden from it, this method returns null. - *

- * @type {yfiles.algorithms.Graph} - */ - graph:yfiles.algorithms.Graph; - /** - * Gets the index of this edge within its graph G. - *

- * Edge indices represent the ordering of standard edge iteration on G. The value of an index is >= 0 and - * < G.edgeCount(). - *

- *

- * Note that indices are subject to change whenever the sequence of edges in a graph is modified by either removing, - * hiding, reinserting, or unhiding an edge, or by explicitly changing its position in the sequence. - *

- * @see yfiles.algorithms.Graph#removeEdge - * @see yfiles.algorithms.Graph#hide - * @see yfiles.algorithms.Graph#reInsertEdge - * @see yfiles.algorithms.Graph#unhide - * @see yfiles.algorithms.Graph#moveToFirst - * @see yfiles.algorithms.Graph#moveToLast - * @type {number} - */ - index:number; - /** - * Gets the source node connected to this edge. - * @see yfiles.algorithms.Edge#target - * @type {yfiles.algorithms.Node} - */ - source:yfiles.algorithms.Node; - /** - * Gets the target node connected to this edge. - * @see yfiles.algorithms.Edge#source - * @type {yfiles.algorithms.Node} - */ - target:yfiles.algorithms.Node; - /** - * Gets true if and only if this edge is a self-loop. - *

- * An edge is called a self-loop, if it is adjacent to only one node, i.e., source node and target node are the same. - *

- * @type {boolean} - */ - selfLoop:boolean; - /** - * Gets the successor of this edge in the list of outgoing edges at its source node. - *

- * If this edge is the last outgoing edge at its source node, then null is returned. - *

- * @see yfiles.algorithms.Edge#prevOutEdge - * @see yfiles.algorithms.Edge#nextInEdge - * @type {yfiles.algorithms.Edge} - */ - nextOutEdge:yfiles.algorithms.Edge; - /** - * Gets the successor of this edge in the list of incoming edges at its target node. - *

- * If this edge is the last incoming edge at its target node, then null is returned. - *

- * @see yfiles.algorithms.Edge#prevInEdge - * @see yfiles.algorithms.Edge#nextOutEdge - * @type {yfiles.algorithms.Edge} - */ - nextInEdge:yfiles.algorithms.Edge; - /** - * Gets the predecessor of this edge in the list of outgoing edges at its source node. - *

- * If this edge is the first outgoing edge at its source node, then null is returned. - *

- * @see yfiles.algorithms.Edge#nextOutEdge - * @see yfiles.algorithms.Edge#prevInEdge - * @type {yfiles.algorithms.Edge} - */ - prevOutEdge:yfiles.algorithms.Edge; - /** - * Gets the predecessor of this edge in the list of incoming edges at its target node. - *

- * If this edge is the first incoming edge at its target node, then null is returned. - *

- * @see yfiles.algorithms.Edge#nextInEdge - * @see yfiles.algorithms.Edge#prevOutEdge - * @type {yfiles.algorithms.Edge} - */ - prevInEdge:yfiles.algorithms.Edge; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Edge; - } - /** - * Specialized list implementation for instances of type {@link yfiles.algorithms.Edge}. - * @class - * @extends {yfiles.algorithms.YList} - * @implements {yfiles.collections.IEnumerable.} - */ - export interface EdgeList extends yfiles.algorithms.YList{} - export class EdgeList { - /** - * Creates a list that is initialized with an EdgeList. - * @param edgeList - */ - constructor(edgeList:yfiles.algorithms.EdgeList); - /** - * Creates a list that is initialized with a single edge provided. - * @param e - */ - constructor(e:yfiles.algorithms.Edge); - /** - * Creates a list that is initialized with those edges from the given EdgeCursor object for which the given data provider - * returns true upon calling its {@link yfiles.algorithms.IDataProvider#getBoolean getBool} method. - * @param ec An edge cursor providing edges that should be added to this list. - * @param predicate A data provider that acts as a inclusion predicate for each edge accessible by the given edge cursor. - */ - constructor(ec:yfiles.algorithms.IEdgeCursor,predicate:yfiles.algorithms.IDataProvider); - /** - * Creates a list that is initialized with the edges provided by the given array of edges. - * @param a - */ - constructor(a:yfiles.algorithms.Edge[]); - /** - * Creates a list that is initialized with the edges provided by the given EdgeCursor object. - * @param c - */ - constructor(c:yfiles.algorithms.IEdgeCursor); - /** - * Creates an empty edge list. - */ - constructor(); - /** - * Returns an edge cursor for this edge list. - * @returns An edge cursor granting access to the edges within this list. - */ - edges():yfiles.algorithms.IEdgeCursor; - /** - * Returns the first edge in this list, or null when the list is empty. - * @returns The first edge in the list. - */ - firstEdge():yfiles.algorithms.Edge; - /** - * Returns an enumerator for this collection. - * @returns - */ - getEnumerator():yfiles.collections.IEnumerator; - /** - * Returns the last edge in this list, or null when the list is empty. - * @returns The last edge in the list. - */ - lastEdge():yfiles.algorithms.Edge; - /** - * Removes the first edge from this list and returns it. - * @returns The first edge from the list. - */ - popEdge():yfiles.algorithms.Edge; - /** - * Returns an edge array containing all elements of this list in the canonical order. - * @returns - */ - toEdgeArray():yfiles.algorithms.Edge[]; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.EdgeList; - } - export enum BfsDirection{ - /** - * An edge direction specifier for incoming edges. - * @see yfiles.algorithms.Bfs#getLayers - */ - PREDECESSOR, - /** - * An edge direction specifier for outgoing edges. - * @see yfiles.algorithms.Bfs#getLayers - */ - SUCCESSOR, - /** - * An edge direction specifier for both incoming and outgoing edges. - * @see yfiles.algorithms.Bfs#getLayers - */ - BOTH - } - export enum GraphElementInsertion{ - /** - * Object insertion specifier. An object gets inserted before another one. - */ - BEFORE, - /** - * Object insertion specifier. An object gets inserted after another one. - */ - AFTER - } - export enum GraphEventType{ - /** - * Type constant that identifies an event that gets fired immediately after a node has been created. The data of the event - * is the newly created node. - */ - NODE_CREATION, - /** - * Type constant that identifies an event that gets fired immediately after an edge has been created. The data of the event - * is the newly created edge. - */ - EDGE_CREATION, - /** - * Type constant that identifies an event that gets fired immediately before a node will be removed from the graph. The - * data of the event is the node to be removed. - */ - PRE_NODE_REMOVAL, - /** - * Type constant that identifies an event that gets fired immediately after a node has been removed from the graph. The - * data of the event is the removed node. - */ - POST_NODE_REMOVAL, - /** - * Type constant that identifies an event that gets fired immediately before an edge will be removed from the graph. The - * data of the event is the edge to be removed. - */ - PRE_EDGE_REMOVAL, - /** - * Type constant that identifies an event that gets fired immediately after an edge has been removed from the graph. The - * data of the event is the removed edge. - */ - POST_EDGE_REMOVAL, - /** - * Type constant that identifies an event that gets fired immediately after a node has been reinserted into the graph. The - * data of the event is the reinserted node. - */ - NODE_REINSERTION, - /** - * Type constant that identifies an event that gets fired immediately after an edge has been reinserted into the graph. The - * data of the event is the reinserted edge. - */ - EDGE_REINSERTION, - /** - * Type constant that identifies an event that gets fired immediately before the end points of an edge will be changed. The - * data of the event is the edge to be redefined. - */ - PRE_EDGE_CHANGE, - /** - * Type constant that identifies an event that gets fired immediately after the end points of an edge have been changed. - * The data of the event is the redefined edge. - */ - POST_EDGE_CHANGE, - /** - * Type constant that identifies an event that gets fired after a subgraph of a graph G has been moved to the emitting - * graph. The data of the event is a {@link yfiles.algorithms.NodeList} containing the nodes that induce the moved subgraph. - *

- * This event gets fired just after the {@link yfiles.algorithms.GraphEventType#SUBGRAPH_REMOVAL} event got fired on the subgraph's - * original graph G. Note that at the time the event gets fired, the nodes from the node list are already part of the - * emitting graph. - *

- */ - SUBGRAPH_INSERTION, - /** - * Type constant that identifies an event that gets fired after a subgraph of the emitting graph has been moved to a graph - * G. The data of the event is a {@link yfiles.algorithms.NodeList} containing the nodes that induce the moved subgraph. - *

- * This event gets fired just before the {@link yfiles.algorithms.GraphEventType#SUBGRAPH_INSERTION} event will be fired on the - * subgraph's new graph G. Note that at the time the event gets fired, the nodes from the node list are already part of - * graph G. - *

- */ - SUBGRAPH_REMOVAL, - /** - * Type constant that signals the start of a some logically coherent event sequence. If specified, the data of this event - * is its ID. - */ - PRE_EVENT, - /** - * Type constant that signals the end of a some logically coherent event sequence. If specified, the data of this event is - * its ID. - */ - POST_EVENT - } - export enum DistanceMetric{ - /** - * A specifier for euclidean distance metric. - * @see yfiles.algorithms.Groups#kMeansClustering - */ - EUCLIDEAN, - /** - * A specifier for euclidean squared distance metric. - * @see yfiles.algorithms.Groups#kMeansClustering - */ - EUCLIDEAN_SQUARED, - /** - * A specifier for Manhattan distance metric. - * @see yfiles.algorithms.Groups#kMeansClustering - */ - MANHATTAN, - /** - * A specifier for Chebychev distance metric. - * @see yfiles.algorithms.Groups#kMeansClustering - */ - CHEBYCHEV - } - export enum Linkage{ - /** - * A specifier for single-linkage clustering. - *

- * At the beginning, each element belongs to its own cluster. At each step of the clustering algorithm the two most - * "similar" clusters are merged together until all nodes belong to the same cluster. - *

- * @see yfiles.algorithms.Groups#hierarchicalClustering - * @see yfiles.algorithms.Groups#hierarchicalClustering - * @see yfiles.algorithms.Groups#hierarchicalClustering - */ - SINGLE, - /** - * A specifier for complete-linkage clustering. - *

- * At the beginning, each element belongs to its own cluster. At each step of the clustering algorithm the two most - * "dissimilar" clusters are merged and the distance equals to the distance of those two nodes that are farthest away from - * each other. The algorithm continues until all nodes belong to the same cluster. - *

- * @see yfiles.algorithms.Groups#hierarchicalClustering - * @see yfiles.algorithms.Groups#hierarchicalClustering - * @see yfiles.algorithms.Groups#hierarchicalClustering - */ - COMPLETE, - /** - * A specifier for average-linkage clustering. - *

- * At the beginning, each element belongs to its own cluster. At each step of the clustering algorithm the two most - * "similar" clusters are combined and the distance between them is defined as the average all distances between the nodes - * that belong to the two clusters that are combined. The algorithm continues until all nodes belong to the same cluster. - *

- * @see yfiles.algorithms.Groups#hierarchicalClustering - * @see yfiles.algorithms.Groups#hierarchicalClustering - * @see yfiles.algorithms.Groups#hierarchicalClustering - */ - AVERAGE - } - /** - * This class represents a line in the 2D-dimensional affine space. - *

- * The line is defined by the equation ax + by + c = 0 - *

- * @class - */ - export interface AffineLine extends yfiles.lang.Object{} - export class AffineLine { - /** - * Creates an affine line which is defined by two points. - * @param p1 - * @param p2 - */ - constructor(p1:yfiles.algorithms.YPoint,p2:yfiles.algorithms.YPoint); - /** - * Creates an affine line which is defined by a point and a vector. - * @param p1 - * @param v - */ - constructor(p1:yfiles.algorithms.YPoint,v:yfiles.algorithms.YVector); - /** - * Returns the crossing of two lines. - *

- * If the lines are parallel, null is returned. - *

- * @param l1 - * @param l2 - * @returns - * @static - */ - static getCrossing(l1:yfiles.algorithms.AffineLine,l2:yfiles.algorithms.AffineLine):yfiles.algorithms.YPoint; - /** - * Projects an point on the line in direction of the X-axis. - * @param p - * @returns - */ - getXProjection(p:yfiles.algorithms.YPoint):yfiles.algorithms.YPoint; - /** - * Projects an point on the line in direction of the Y-axis. - * @param p - * @returns - */ - getYProjection(p:yfiles.algorithms.YPoint):yfiles.algorithms.YPoint; - /** - * Gets a from ax+by+c = 0 - * @type {number} - */ - a:number; - /** - * Gets b from ax+by+c = 0 - * @type {number} - */ - b:number; - /** - * Gets c from ax+by+c = 0 - * @type {number} - */ - c:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.AffineLine; - } - /** - * The handle of a segment of a borderline. - * @class - */ - export interface BorderLineSegment extends yfiles.lang.Object{} - export class BorderLineSegment { - /** - * Returns the segment's value at the given position. - *

- * Note: In case the position lies outside the segments range, the calculated value might be invalid. As the segment is not - * aware of any offsets the position also must not include any offsets. - *

- * @param position the position the value is retrieved for. - * @returns the segment's value at the given position. - */ - getValueAt(position:number):number; - /** - * Returns the next segment or null if there is no such segment. - * @returns - */ - next():yfiles.algorithms.BorderLineSegment; - /** - * Returns the previous segment or null if there is no such segment. - * @returns - */ - prev():yfiles.algorithms.BorderLineSegment; - /** - * Gets the end of this segment. - * @type {number} - */ - end:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.BorderLineSegment; - } - /** - * This class can be used to easily model an orthogonal border line or sky-line. - *

- * It provides methods for measuring the distance between different BorderLine instances, merging multiple instances, - * modifying and efficiently moving them around. - *

- * @class - */ - export interface BorderLine extends yfiles.lang.Object{} - export class BorderLine { - /** - * Creates a new BorderLine from a single segment. - * @param min the beginning of this borderline - * @param max the ending of this borderline - * @param valueAtMin the value of the segment at the beginning of this borderline - * @param valueAtMax the value of the segment at the ending of this borderline - */ - constructor(min:number,max:number,valueAtMin:number,valueAtMax:number); - /** - * Creates a new BorderLine from a single segment. - * @param min the beginning of this borderline - * @param max the ending of this borderline - * @param value the value of the segment - */ - constructor(min:number,max:number,value:number); - /** - * Creates a new BorderLine with the given value from -Double.MAX_VALUE to Double.MAX_VALUE. - * @param value the value of the segment - */ - constructor(value:number); - /** - * Adds the given offset to the segments' positions. - *

- * This method has complexity O(1). - *

- * @param delta the delta to add to the positions - */ - addOffset(delta:number):void; - /** - * Adds the given offset to the current values of the whole borderline. - *

- * This method has complexity O(1). - *

- * @param delta the delta to add to the values - */ - addValueOffset(delta:number):void; - /** - * Convenience method that copies the actual data from the given argument to this instance. - * @param other the argument to retrieve the values from - */ - adoptValues(other:yfiles.algorithms.BorderLine):void; - /** - * Creates a copy of this borderline. - *

- * Optionally negates the values or offsets. - *

- * @param negateValues whether the values are negated - * @param negateOffsets whether the offsets are negated - * @returns the copy of the borderline - */ - createCopy(negateValues:boolean,negateOffsets:boolean):yfiles.algorithms.BorderLine; - /** - * Merges this borderline with the given borderline using the "maximum" policy. - *

- * That means the resulting borderline will have greater value of both borderline on each position. If you imagine each - * borderline as a the upper border of a plane, the resulting borderline will be the upper border of the merged planes. - *

- * @param other the other borderline - * @returns a new borderline that is the result of the merge - */ - createMax(other:yfiles.algorithms.BorderLine):yfiles.algorithms.BorderLine; - /** - * Merges this borderline with the given borderline using the "minimum" policy. - *

- * That means the resulting borderline will have smaller value of both borderline on each position. If you imagine each - * borderline as a the lower border of a plane, the resulting borderline will be the lower border of the merged planes. - *

- * @param other the other borderline - * @returns a new borderline that is the result of the merge - */ - createMin(other:yfiles.algorithms.BorderLine):yfiles.algorithms.BorderLine; - /** - * Returns the first segment or null if there is no such segment. - * @returns - */ - firstSegment():yfiles.algorithms.BorderLineSegment; - /** - * Calculates the minimal distance between this borderline and the other one. - *

- * The other one is treated as if the values were all greater. - *

- * @param greater - * @returns - */ - getDistanceTo(greater:yfiles.algorithms.BorderLine):number; - /** - * Returns the maximum position of the given segment. - * @param s the segment - * @returns - */ - getMax(s:yfiles.algorithms.BorderLineSegment):number; - /** - * Calculates the maximum value in the interval from->to. - * @param from - * @param to - * @returns - */ - getMaxValue(from:number,to:number):number; - /** - * Returns the minimum position of the given segment. - * @param s the segment - * @returns - */ - getMin(s:yfiles.algorithms.BorderLineSegment):number; - /** - * Calculates the minimum value in the interval from->to. - * @param from - * @param to - * @returns - */ - getMinValue(from:number,to:number):number; - /** - * Returns the segment at the given position. - * @param pos the position - * @returns - */ - getSegmentAt(pos:number):yfiles.algorithms.BorderLineSegment; - /** - * Returns the slope of the given segment. - * @param s the segment - * @returns - */ - getSlope(s:yfiles.algorithms.BorderLineSegment):number; - /** - * Returns the value of the minimum of the given segment. - *

- * If the segment's slope is 0, it's the value of the whole segment. In case the slope differs from 0, it's the value of - * the start of the slope. - *

- * @param s the segment - * @returns - */ - getValue(s:yfiles.algorithms.BorderLineSegment):number; - /** - * Returns the value that is set on this borderline at the specified position. - *

- * The position must lie within the range of the segment. - *

- * @param segment The segment whose value shall be returned. - * @param pos the position where the value will be retrieved. - * @returns the value - * @throws {Stubs.Exceptions.ArgumentError} if pos is outside the segment's range. - */ - getValueAt(segment:yfiles.algorithms.BorderLineSegment,pos:number):number; - /** - * Returns the value that is set on this borderline at the specified position. - *

- * The position must lie within the range of the segment that is stored in cell. - *

- * @param cell The list cell containing the segment whose value shall be returned. - * @param pos the position - * @returns the value - * @throws {Stubs.Exceptions.ArgumentError} if pos is outside the segment's range that is stored in cell. - */ - getValueAt(cell:yfiles.algorithms.ListCell,pos:number):number; - /** - * Returns the value that is set on this borderline at the specified position. - * @param pos the position - * @returns the value - * @throws {Stubs.Exceptions.IndexOutOfRangeError} if the position is outside of the borderline. - */ - getValueAt(pos:number):number; - /** - * Grows this BorderLine horizontally, so that the {@link yfiles.algorithms.BorderLine#getValueAt values} of the BorderLine stay the same however their {@link yfiles.algorithms.BorderLine#getMin start} and {@link yfiles.algorithms.BorderLine#getMax end} - * points are moved in the direction of toMin and toMax. - *

- * This is useful for scenarios where a BorderLine is needed that consists of an enlarged border. - *

- *

- * Note that this method normalizes the segments, i.e., it transforms each segment with slope != 0 to a segment with slope - * == 0. - *

- * @param toMin the delta by which the border should be extended towards -Infinity - * @param toMax the delta by which the border should be extended towards +Infinity - * @param positive whether the BorderLine should be interpreted to point in positive direction. This influences the direction into which a - * segment's border is extended. - */ - grow(toMin:number,toMax:number,positive:boolean):void; - /** - * Returns the last segment or null if there is no such segment. - * @returns - */ - lastSegment():yfiles.algorithms.BorderLineSegment; - /** - * Merges this borderline with the given borderline using the "maximum" policy. - * @param other the other borderline - */ - mergeWithMax(other:yfiles.algorithms.BorderLine):void; - /** - * Merges this borderline with the given borderline using the "minimum" policy. - * @param other the other borderline - */ - mergeWithMin(other:yfiles.algorithms.BorderLine):void; - /** - * Returns the next segment or null if there is no such segment. - * @param s - * @returns - */ - next(s:yfiles.algorithms.BorderLineSegment):yfiles.algorithms.BorderLineSegment; - /** - * Returns the previous segment or null if there is no such segment. - * @param s - * @returns - */ - prev(s:yfiles.algorithms.BorderLineSegment):yfiles.algorithms.BorderLineSegment; - /** - * Assures that all values in the given interval are greater or equal than the given value. - * @param min the lower end of the interval - * @param max the upper end of the interval - * @param value the smallest possible value for the interval - */ - setMaxValue(min:number,max:number,value:number):void; - /** - * Assures that all values in the given interval are less or equal than the given value. - * @param min the lower end of the interval - * @param max the upper end of the interval - * @param value the greatest possible value for the interval - */ - setMinValue(min:number,max:number,value:number):void; - /** - * Sets a specific interval to a slope starting at a given value. - * @param min the left side of the interval. - * @param max the right side of the interval. - * @param value the value at min where the slope starts. - * @param slope the slope of the segment in the given interval. - * @throws {Stubs.Exceptions.ArgumentError} if min is greater than max. - */ - setSloped(min:number,max:number,value:number,slope:number):void; - /** - * Sets a specific interval described by min and max to a given value. - * @param min the left side of the interval. - * @param max the right side of the interval. - * @param value the value for the whole interval. - */ - setValue(min:number,max:number,value:number):void; - /** - * Gets the smallest position of this borderline - * @type {number} - */ - min:number; - /** - * Gets the greatest position of this borderline - * @type {number} - */ - max:number; - /** - * Gets the minimum value that is set on this borderline - * @type {number} - */ - minValue:number; - /** - * Gets the maximum value that is set on this borderline - * @type {number} - */ - maxValue:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.BorderLine; - } - /** - * This class provides useful geometric primitives and advanced geometric algorithms. - * @class - * @static - */ - export interface Geom extends yfiles.lang.Object{} - export class Geom { - /** - * Calculates the convex hull for a set of points. - * @param points a list of {@link } objects - * @returns a list of {@link } objects that constitute the convex hull of the given points. The list contains points - * in counter clockwise order around the hull. The first point is the one with the smallest x coordinate. If two such - * points exist then of these points the one with the smallest y coordinate is chosen as the first one. - * @static - */ - static calcConvexHull(points:yfiles.algorithms.YList):yfiles.algorithms.YList; - /** - * Calculates the intersection point of two affine lines. - *

- * Each line is given by two points. - *

- * @param p1 one point on the first line. - * @param p2 another point on the first line. - * @param p3 one point on the second line. - * @param p4 another point on the second line. - * @returns the intersection point of the specified lines or null if there is no intersection. - * @static - */ - static calcIntersection(p1:yfiles.algorithms.YPoint,p2:yfiles.algorithms.YPoint,p3:yfiles.algorithms.YPoint,p4:yfiles.algorithms.YPoint):yfiles.algorithms.YPoint; - /** - * Calculates the intersection point of two affine lines. - *

- * Each line is given by a point and a direction vector. - *

- * @param p1 origin point of the first line. - * @param d1 direction vector of the first line. - * @param p2 origin point of the second line. - * @param d2 direction vector of the second line. - * @returns the intersection point of the specified lines or null if there is no intersection. - * @static - */ - static calcIntersection(p1:yfiles.algorithms.YPoint,d1:yfiles.algorithms.YVector,p2:yfiles.algorithms.YPoint,d2:yfiles.algorithms.YVector):yfiles.algorithms.YPoint; - /** - * Calculates the intersection point of two affine lines. - *

- * Each line is given by the coordinates of two points. - *

- * @param x1 x-coordinate of one point on the first line. - * @param y1 y-coordinate of one point on the first line. - * @param x2 x-coordinate of another point on the first line. - * @param y2 y-coordinate of another point on the first line. - * @param x3 x-coordinate of one point on the second line. - * @param y3 y-coordinate of one point on the second line. - * @param x4 x-coordinate of another point on the second line. - * @param y4 y-coordinate of another point on the second line. - * @returns the intersection point of the specified lines or null if there is no intersection. - * @static - */ - static calcIntersection(x1:number,y1:number,x2:number,y2:number,x3:number,y3:number,x4:number,y4:number):yfiles.algorithms.YPoint; - /** - * Intersects the pair of specified source Rectangle2D objects and puts the result into the specified destination Rectangle2D - * object. - *

- * If one or both of the source rectangles have negative width or height, the resulting rectangle will be located at (0,0) - * with a width and height of -1. One of the source rectangles can also be the destination to avoid creating a third - * Rectangle2D object, but in this case the original points of this source rectangle will be overwritten by this method. - *

- * @param r1 the first of a pair of Rectangle2D objects to be intersected with each other - * @param r2 the second of a pair of Rectangle2D objects to be intersected with each other - * @param dest the Rectangle2D that holds the results of the intersection of r1 and r2 - * @returns - * @static - */ - static calcIntersection(r1:yfiles.algorithms.Rectangle2D,r2:yfiles.algorithms.Rectangle2D,dest:yfiles.algorithms.Rectangle2D):yfiles.algorithms.Rectangle2D; - /** - * Unions the pair of source Rectangle2D objects and puts the result into the specified destination Rectangle2D object. - *

- * If one of the source rectangles has negative width or height, it is excluded from the union. If both source rectangles - * have negative width or height, the destination rectangle will become a copy of r1. One of the source rectangles can also - * be the destination to avoid creating a third Rectangle2D object, but in this case the original points of this source - * rectangle will be overwritten by this method. If the destination is null, a new Rectangle2D is created. - *

- * @param r1 the first of a pair of Rectangle2D objects to be combined with each other - * @param r2 the second of a pair of Rectangle2D objects to be combined with each other - * @param dest the Rectangle2D that holds the results of the union of r1 and r2 - * @returns - * @static - */ - static calcUnion(r1:yfiles.algorithms.Rectangle2D,r2:yfiles.algorithms.Rectangle2D,dest:yfiles.algorithms.Rectangle2D):yfiles.algorithms.Rectangle2D; - /** - * Returns true iff the given points are collinear, i.e. - *

- * all three points lie on a common line. - *

- *

- * Same as {@link yfiles.algorithms.Geom#orientation orientation(p,q,r) == 0} - *

- * @param p - * @param q - * @param r - * @returns - * @static - */ - static collinear(p:yfiles.algorithms.YPoint,q:yfiles.algorithms.YPoint,r:yfiles.algorithms.YPoint):boolean; - /** - * Determines the distance of the point p to the line segment [l1, l2]. - * @param pointX the x coordinate of p - * @param pointY the y coordinate of p - * @param lineX1 the x coordinate of l1 - * @param lineY1 the y coordinate of l1 - * @param lineX2 the x coordinate of l2 - * @param lineY2 the y coordinate of l2 - * @returns - * @static - */ - static distanceToLineSegment(pointX:number,pointY:number,lineX1:number,lineY1:number,lineX2:number,lineY2:number):number; - /** - * Same as {@link yfiles.algorithms.Geom#orientation orientation(p,q,r) > 0} - * @param p - * @param q - * @param r - * @returns - * @static - */ - static leftTurn(p:yfiles.algorithms.YPoint,q:yfiles.algorithms.YPoint,r:yfiles.algorithms.YPoint):boolean; - /** - * Returns whether the two lines defined by the given coordinates intersect or not. - * @param x1 - * @param y1 - * @param x2 - * @param y2 - * @param x3 - * @param y3 - * @param x4 - * @param y4 - * @returns - * @static - */ - static linesIntersect(x1:number,y1:number,x2:number,y2:number,x3:number,y3:number,x4:number,y4:number):boolean; - /** - * Same as {@link yfiles.algorithms.Geom#orientation} with double values as arguments. - * @param px - * @param py - * @param qx - * @param qy - * @param rx - * @param ry - * @returns - * @static - */ - static orientation(px:number,py:number,qx:number,qy:number,rx:number,ry:number):number; - /** - * Returns the orientation of point r relative to the directed line from point p to point q. - *

- * The given tuple of points is said to have positive orientation if p and q are distinct and r lies to the left of the - * oriented line passing through p and q and oriented from p to q. - *

- *

- * The tuple is said to have negative orientation if p and q are distinct and r lies to the right of the line, and the - * tuple is said to have orientation zero if the three points are collinear. - *

- * @param p - * @param q - * @param r - * @returns +1 in the case of positive orientation, -1 in the case of negative orientation and 0 in the case of zero orientation. - * @static - */ - static orientation(p:yfiles.algorithms.YPoint,q:yfiles.algorithms.YPoint,r:yfiles.algorithms.YPoint):number; - /** - * Determines the projection of the point p onto the line segment [l1, l2]. - *

- * The resulting point is - *

- *
    - *
  • the orthogonal projection of p onto the line through l1 and l2, iff the projection lies on the line segment [l1, l2]
  • - *
  • the end point of the line segment [l1, l2] that is closest to p, otherwise
  • - *
- * @param pointX the x coordinate of p - * @param pointY the y coordinate of p - * @param lineX1 the x coordinate of l1 - * @param lineY1 the y coordinate of l1 - * @param lineX2 the x coordinate of l2 - * @param lineY2 the y coordinate of l2 - * @returns - * @static - */ - static projection(pointX:number,pointY:number,lineX1:number,lineY1:number,lineX2:number,lineY2:number):yfiles.algorithms.YPoint; - /** - * Same as {@link yfiles.algorithms.Geom#orientation orientation(p,q,r) < 0} - * @param p - * @param q - * @param r - * @returns - * @static - */ - static rightTurn(p:yfiles.algorithms.YPoint,q:yfiles.algorithms.YPoint,r:yfiles.algorithms.YPoint):boolean; - /** - * Returns +1 if point d lies left of the directed circle through points a, b, and c, 0 if a,b,c and d are cocircular, and - * -1 otherwise. - * @param a - * @param b - * @param c - * @param d - * @returns - * @static - */ - static sideOfCircle(a:yfiles.algorithms.YPoint,b:yfiles.algorithms.YPoint,c:yfiles.algorithms.YPoint,d:yfiles.algorithms.YPoint):number; - /** - * Converts the given degree value from radian to angular - * @param angrad - * @returns - * @static - */ - static toDegrees(angrad:number):number; - /** - * Converts the given degree value from angular to radian. - * @param angdeg - * @returns - * @static - */ - static toRadians(angdeg:number):number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Geom; - } - /** - * This is an interface for a sequence of instances of LineSegment. - * @interface - * @implements {yfiles.algorithms.ICursor} - */ - export interface ILineSegmentCursor extends yfiles.lang.Object,yfiles.algorithms.ICursor{ - /** - * Gets the instance of LineSegment the cursor is currently pointing on. - * @abstract - * @type {yfiles.algorithms.LineSegment} - */ - lineSegment:yfiles.algorithms.LineSegment; - } - var ILineSegmentCursor:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.algorithms.ILineSegmentCursor; - }; - /** - * This interface describes a 2-dimensional object which has a finite bounding box. - * @interface - */ - export interface IPlaneObject extends yfiles.lang.Object{ - /** - * Gets the smallest Rectangle which contains the object. - * @abstract - * @type {yfiles.algorithms.YRectangle} - */ - boundingBox:yfiles.algorithms.YRectangle; - } - var IPlaneObject:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.algorithms.IPlaneObject; - }; - /** - * This is an interface for a sequence of instances of YPoint. - * @interface - * @implements {yfiles.algorithms.ICursor} - */ - export interface IPointCursor extends yfiles.lang.Object,yfiles.algorithms.ICursor{ - /** - * Gets the instance of YPoint the cursor is currently pointing on. - * @abstract - * @type {yfiles.algorithms.YPoint} - */ - point:yfiles.algorithms.YPoint; - } - var IPointCursor:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.algorithms.IPointCursor; - }; - /** - * Double-precision immutable insets representation. - * @class - * @implements {yfiles.lang.ICloneable} - */ - export interface Insets extends yfiles.lang.Object,yfiles.lang.ICloneable{} - export class Insets { - /** - * Creates a new instance with the given values - * @param top The new top inset value - * @param left The new left inset value - * @param bottom The new bottom inset value - * @param right The new right inset value - */ - constructor(top:number,left:number,bottom:number,right:number); - /** - * - * @returns - */ - clone():any; - /** - * Creates a {@link yfiles.geometry.Insets} from a given {@link yfiles.algorithms.Insets}. - * @returns The {@link }. - */ - toInsets():yfiles.geometry.Insets; - /** - * The inset from the top. - * @const - * @type {number} - */ - top:number; - /** - * The inset from the left. - * @const - * @type {number} - */ - left:number; - /** - * The inset from the bottom. - * @const - * @type {number} - */ - bottom:number; - /** - * The inset from the right. - * @const - * @type {number} - */ - right:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Insets; - } - /** - * An instance of this interface handles intersections found by the IntersectionAlgorithm, - * @interface - */ - export interface IIntersectionHandler extends yfiles.lang.Object{ - /** - * This method is called at every intersection. - * @param a - * @param b - * @abstract - */ - checkIntersection(a:any,b:any):void; - } - var IIntersectionHandler:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.algorithms.IIntersectionHandler; - }; - /** - * This class calculates the intersection of rectangles in the plane with the help of a sweep-line algorithm. - *

- *
The complexity is O(n log n + s) where n is the number of rectangles and s the number of intersections. - *

- * @class - * @static - */ - export interface IntersectionAlgorithm extends yfiles.lang.Object{} - export class IntersectionAlgorithm { - /** - * Calculates the intersections of rectangles in the plane. - *

- * Every found intersection is reported to an - * IntersectionHandler. Rectangles with negative size are completely ignored by this implementation (i.e. never generate - * intersections) - *

- * @param objects a list of PlaneObject objects. - * @param iHandler intersections are reported to this class. - * @static - */ - static intersect(objects:yfiles.algorithms.YList,iHandler:yfiles.algorithms.IIntersectionHandler):void; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.IntersectionAlgorithm; - } - /** - * This class represents a line segment in the plane. - *

- * A line segment is defined by its two end points. - *

- * @class - * @implements {yfiles.algorithms.IPlaneObject} - */ - export interface LineSegment extends yfiles.lang.Object,yfiles.algorithms.IPlaneObject{} - export class LineSegment { - /** - * Returns a new LineSegment. - * @param p1 the first end point of the line segment. - * @param p2 the second end point of the line segment. - */ - constructor(p1:yfiles.algorithms.YPoint,p2:yfiles.algorithms.YPoint); - /** - * Checks whether a line segment intersects a paraxial box. - *

- * Implemented using the Cohen-Sutherland algorithm. - *

- * @param boxX1 x-coordinate of the upper left corner of the box - * @param boxY1 y-coordinate of the upper left corner of the box - * @param boxX2 x-coordinate of the lower right corner of the box - * @param boxY2 y-coordinate of the lower right corner of the box - * @param sX1 x-coordinate of the first end point of the line segment - * @param sY1 y-coordinate of the first end point of the line segment - * @param sX2 x-coordinate of the second end point of the line segment - * @param sY2 y-coordinate of the second end point of the line segment - * @returns true if the line segment intersects the box, false otherwise. - * @static - */ - static boxIntersectsSegment(boxX1:number,boxY1:number,boxX2:number,boxY2:number,sX1:number,sY1:number,sX2:number,sY2:number):boolean; - /** - * Checks whether a line segment intersects a box. - *

- * Implemented using the Cohen-Sutherland algorithm. - *

- * @param box A rectangle - * @param x1 x-coordinate of the first end point of the line segment - * @param y1 y-coordinate of the first end point of the line segment - * @param x2 x-coordinate of the second end point of the line segment - * @param y2 y-coordinate of the second end point of the line segment - * @returns true if the line segment intersects the box, false otherwise. - * @static - */ - static boxIntersectsSegment(box:yfiles.algorithms.YRectangle,x1:number,y1:number,x2:number,y2:number):boolean; - /** - * Checks whether a line segment intersects a box. - * @param box A rectangle. - * @param s first end point of the line segment. - * @param t second end point of the line segment. - * @returns true if the line segments intersects the box, false otherwise. - * @static - */ - static boxIntersectsSegment(box:yfiles.algorithms.YRectangle,s:yfiles.algorithms.YPoint,t:yfiles.algorithms.YPoint):boolean; - /** - * Checks whether a given point lies on this line segment. - * @param point an arbitrary point. - * @returns true if the line segments intersects the box, false otherwise. - */ - contains(point:yfiles.algorithms.YPoint):boolean; - /** - * Returns intersection point between the two line segments, if there is one or null if the two line segments do not - * intersect. - * @param s1 first line segment - * @param s2 second line segment - * @returns - * @static - */ - static getIntersection(s1:yfiles.algorithms.LineSegment,s2:yfiles.algorithms.LineSegment):yfiles.algorithms.YPoint; - /** - * Checks whether the line segment intersects a point. - * @param p a point - * @returns true if the line segments intersects the given point, false otherwise. - */ - intersects(p:yfiles.algorithms.YPoint):boolean; - /** - * Checks whether the line segment intersects a box. - * @param box A rectangle. - * @returns true if the line segments intersects the box, false otherwise. - */ - intersects(box:yfiles.algorithms.YRectangle):boolean; - /** - * Determines if the given points define a horizontal line segment. - *

- * This methods allows for y-coordinate differences of up to 1e-8. - *

- * @param p1 - * @param p2 - * @returns true if the given points define a horizontal line segment; false otherwise. - * @static - */ - static isHorizontalSegment(p1:yfiles.algorithms.YPoint,p2:yfiles.algorithms.YPoint):boolean; - /** - * Returns if the projection on the X axis of the line segment covers a certain point on the X Axis. - * @param x - * @returns - */ - isInXIntervall(x:number):boolean; - /** - * Returns if the projection on the Y axis of the line segment covers a certain point on the Y Axis. - * @param y - * @returns - */ - isInYIntervall(y:number):boolean; - /** - * Determines if the given points define a vertical line segment. - *

- * This methods allows for x-coordinate differences of up to 1e-8. - *

- * @param p1 - * @param p2 - * @returns true if the given points define a vertical line segment; false otherwise. - * @static - */ - static isVerticalSegment(p1:yfiles.algorithms.YPoint,p2:yfiles.algorithms.YPoint):boolean; - /** - * Returns the length of the line segment, this is the value of the Euclidean norm. - * @returns an value > 0. - */ - length():number; - /** - * Returns the affine line defined by the end points of the line segment. - * @returns - */ - toAffineLine():yfiles.algorithms.AffineLine; - /** - * Returns the vector pointing from the first end point to the second end point of the line segment. - * @returns - */ - toYVector():yfiles.algorithms.YVector; - /** - * Gets if this segment is considered vertical, i.e. - *

- * the x values of the end point differ less then 0.00000001 - *

- * @type {boolean} - */ - isVertical:boolean; - /** - * Gets if the interval is horizontal. - * @type {boolean} - */ - isHorizontal:boolean; - /** - * Gets the first end point of the line segment. - * @type {yfiles.algorithms.YPoint} - */ - firstEndPoint:yfiles.algorithms.YPoint; - /** - * Gets the second end point of the line segment. - * @type {yfiles.algorithms.YPoint} - */ - secondEndPoint:yfiles.algorithms.YPoint; - /** - * Gets the y value of the line on x coordinate 0. - * @type {number} - */ - xOffset:number; - /** - * Gets the slope of the line segment. - * @type {number} - */ - slope:number; - /** - * Gets the smallest Rectangle which contains the object. - * @type {yfiles.algorithms.YRectangle} - */ - boundingBox:yfiles.algorithms.YRectangle; - /** - * Gets the distance from start to end point in x-coordinates. - * @type {number} - */ - deltaX:number; - /** - * Gets the distance from start to end point in y-coordinates. - * @type {number} - */ - deltaY:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.LineSegment; - } - /** - * Represents a two-dimensional point located at (x, y). - * @class - * @implements {yfiles.lang.ICloneable} - */ - export interface Point2D extends yfiles.lang.Object,yfiles.lang.ICloneable{} - export class Point2D { - /** - * Creates a new instance at the given location. - * @param x The x coordinate of the new point - * @param y The x coordinate of the new point - */ - constructor(x:number,y:number); - /** - * Creates a new instance that is located at (0, 0) - */ - constructor(); - /** - * Creates a new instance of this class that has the same values as this objects. - * @returns a new instance of this class that has the same values as this objects. - */ - clone():any; - /** - * Calculates the distance between this points and another one, given as its coordinates. - * @param px The x coordinate of the second point. - * @param py The y coordinate of the second point. - * @returns the distance between this points and another one, given as its coordinates. - */ - distance(px:number,py:number):number; - /** - * Calculates the distance between this points and another one. - * @param p The second point. - * @returns the distance between this points and another one. - */ - distance(p:yfiles.algorithms.Point2D):number; - /** - * Calculates the distance between two points, given as their coordinates. - * @param x1 The x coordinate of the first point. - * @param y1 The y coordinate of the first point. - * @param x2 The x coordinate of the second point. - * @param y2 The y coordinate of the second point. - * @returns the distance between two points, given as their coordinates. - * @static - */ - static distance(x1:number,y1:number,x2:number,y2:number):number; - /** - * Calculates the squared distance between this points and another one, given as its coordinates. - * @param px The x coordinate of the second point. - * @param py The y coordinate of the second point. - * @returns the squared distance between this points and another one, given as its coordinates. - */ - distanceSq(px:number,py:number):number; - /** - * Calculates the squared distance between this points and another one. - * @param p The second point. - * @returns the squared distance between this points and another one. - */ - distanceSq(p:yfiles.algorithms.Point2D):number; - /** - * Calculates the squared distance between two points, given as their coordinates. - * @param x1 The x coordinate of the first point. - * @param y1 The y coordinate of the first point. - * @param x2 The x coordinate of the second point. - * @param y2 The y coordinate of the second point. - * @returns the squared distance between two points, given as their coordinates. - * @static - */ - static distanceSq(x1:number,y1:number,x2:number,y2:number):number; - /** - * Sets the location of this point to the given coordinates. - * @param x the new x coordinate - * @param y the new y coordinate - */ - setLocation(x:number,y:number):void; - /** - * Creates a {@link yfiles.geometry.Point} from a given {@link yfiles.algorithms.Point2D}. - * @returns The {@link }. - */ - toPoint():yfiles.geometry.Point; - /** - * Sets the location of this point to the same values as for the given point. - * @type {yfiles.algorithms.Point2D} - */ - location:yfiles.algorithms.Point2D; - /** - * Gets the x coordinate of this point. - * @type {number} - */ - x:number; - /** - * Gets the y coordinate of this point. - * @type {number} - */ - y:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Point2D; - } - /** - * Represents a two-dimensional rectangle of size (width x height), located at the point (x, y). - * @class - * @implements {yfiles.lang.ICloneable} - */ - export interface Rectangle2D extends yfiles.lang.Object,yfiles.lang.ICloneable{} - export class Rectangle2D { - /** - * Creates a new rectangle of the specified size at the specified location. - * @param x the x-coordinate of the upper left corner of the created rectangle. - * @param y the y-coordinate of the upper left corner of the created rectangle. - * @param width the width of the created rectangle. - * @param height the height of the created rectangle. - */ - constructor(x:number,y:number,width:number,height:number); - /** - * Creates a new rectangle of size (0 x 0) at the location (0, 0). - */ - constructor(); - /** - * Adds a point, specified by its coordinates, to this rectangle. - *

- * The rectangle will be grown if necessary. Note that for points that would lie on the right or bottom border of the - * rectangle, {@link yfiles.algorithms.Rectangle2D#contains} will still return false for the added point. - *

- * @param px the x coordinate of the point to add - * @param py the y coordinate of the point to add - */ - add(px:number,py:number):void; - /** - * Adds a rectangle to this rectangle. - *

- * The rectangle will be grown to the union of both rectangles - *

- * @param r the rectangle to add - */ - add(r:yfiles.algorithms.Rectangle2D):void; - /** - * Creates a new instance of this class that has the same values as this objects. - * @returns a new instance of this class that has the same values as this objects. - */ - clone():any; - /** - * Checks whether this rectangle completely contains the second specified rectangle. - * @param x the x coordinate of the second rectangle. - * @param y the y coordinate of the second rectangle. - * @param width the width coordinate of the second rectangle. - * @param height the height coordinate of the second rectangle. - * @returns true if this rectangle contains the second one - */ - contains(x:number,y:number,width:number,height:number):boolean; - /** - * Checks if the point specified by the given coordinates is contained in this rectangle. - * @param x the x-coordinate of the point. - * @param y the y-coordinate of the point. - * @returns true if the specified point is contained in this rectangle; false otherwise. - */ - contains(x:number,y:number):boolean; - /** - * Checks whether this rectangle completely contains the second specified rectangle. - * @param rect the rectangle to check for containment - * @returns true if this rectangle contains the second one - */ - contains(rect:yfiles.algorithms.Rectangle2D):boolean; - /** - * Calculates the intersection of this rectangle with the given rectangle and returns the result as new rectangle. - * @param r a rectangle to intersect with this rectangle. - * @returns a new rectangle that represents the calculated intersection. - */ - createIntersection(r:yfiles.algorithms.Rectangle2D):yfiles.algorithms.Rectangle2D; - /** - * Calculates the union of this rectangle with the given rectangle and returns the result as new rectangle. - * @param r a rectangle to union with this rectangle. - * @returns a new rectangle that represents the calculated union. - */ - createUnion(r:yfiles.algorithms.Rectangle2D):yfiles.algorithms.Rectangle2D; - /** - * Calculates the intersection of the first and second specified rectangle and sets the resulting location and size to the - * third rectangle. - * @param src1 the first rectangle to intersect. - * @param src2 the second rectangle to intersect. - * @param dst the rectangle to which the result is set. - * @static - */ - static intersect(src1:yfiles.algorithms.Rectangle2D,src2:yfiles.algorithms.Rectangle2D,dst:yfiles.algorithms.Rectangle2D):void; - /** - * Checks whether this rectangle and the second specified rectangle intersect. - * @param x the x coordinate of the second rectangle. - * @param y the y coordinate of the second rectangle. - * @param width the width coordinate of the second rectangle. - * @param height the height coordinate of the second rectangle. - * @returns true if both rectangles intersect - */ - intersects(x:number,y:number,width:number,height:number):boolean; - /** - * Checks whether this rectangle and the second specified rectangle intersect. - * @param rect the rectangle to check for intersection - * @returns true if both rectangles intersect - */ - intersects(rect:yfiles.algorithms.Rectangle2D):boolean; - /** - * Checks if the line segment specified by the given coordinates intersects this rectangle. - * @param x1 the x-coordinate of the first end point of the line. - * @param y1 the y-coordinate of the first end point of the line. - * @param x2 the x-coordinate of the other end point of the line. - * @param y2 the y-coordinate of the other end point of the line. - * @returns true if the specified line intersects this rectangle; false otherwise. - */ - intersectsLine(x1:number,y1:number,x2:number,y2:number):boolean; - /** - * Sets the outer bounds of this rectangle based on the specified location and size. - * @param x the new x-coordinate of the upper left corner. - * @param y the new y-coordinate of the upper left corner. - * @param width the new width. - * @param height the new height. - */ - setFrame(x:number,y:number,width:number,height:number):void; - /** - * Sets the outer bounds of this rectangle based on the specified new center and corner. - * @param centerX the x-coordinate of the new center of this rectangle. - * @param centerY the y-coordinate of the new center of this rectangle. - * @param cornerX the x-coordinate of any new corner of this rectangle. - * @param cornerY the y-coordinate of any new corner of this rectangle. - */ - setFrameFromCenter(centerX:number,centerY:number,cornerX:number,cornerY:number):void; - /** - * Sets the outer bounds of this rectangle based on the specified new center and corner. - * @param center the new center of this rectangle. - * @param corner any new corner of this rectangle. - */ - setFrameFromCenter(center:yfiles.algorithms.Point2D,corner:yfiles.algorithms.Point2D):void; - /** - * Sets the outer bounds of this rectangle based on the end points of one of its diagonals. - * @param x1 the x-coordinate of the first end point of a diagonal. - * @param y1 the y-coordinate of the first end point of a diagonal. - * @param x2 the x-coordinate of the other end point of a diagonal. - * @param y2 the y-coordinate of the other end point of a diagonal. - */ - setFrameFromDiagonal(x1:number,y1:number,x2:number,y2:number):void; - /** - * Sets the outer bounds of this rectangle based on the end points of one of its diagonals. - * @param p1 the first end point of a diagonal. - * @param p2 the other end point of a diagonal. - */ - setFrameFromDiagonal(p1:yfiles.algorithms.Point2D,p2:yfiles.algorithms.Point2D):void; - /** - * Sets the location and size of this rectangle to the specified values. - * @param x the new x-coordinate of the upper left corner. - * @param y the new y-coordinate of the upper left corner. - * @param width the new width. - * @param height the new height. - */ - setRect(x:number,y:number,width:number,height:number):void; - /** - * Creates a {@link yfiles.geometry.Rect} from a given {@link yfiles.algorithms.Rectangle2D}. - * @returns The {@link }. - */ - toRect():yfiles.geometry.Rect; - /** - * Calculates the union of the first and second specified rectangle and sets the resulting location and size to the third - * rectangle. - * @param src1 the first rectangle to union. - * @param src2 the second rectangle to union. - * @param dst the rectangle to which the result is set. - * @static - */ - static union(src1:yfiles.algorithms.Rectangle2D,src2:yfiles.algorithms.Rectangle2D,dst:yfiles.algorithms.Rectangle2D):void; - /** - * Gets or sets the outer bounds of this rectangle in double coordinates. - * @type {yfiles.algorithms.Rectangle2D} - */ - frame:yfiles.algorithms.Rectangle2D; - /** - * Sets the location and size of this rectangle to be similar to the specified rectangle. - * @type {yfiles.algorithms.Rectangle2D} - */ - rect:yfiles.algorithms.Rectangle2D; - /** - * Gets the x coordinate of the upper left corner. - * @type {number} - */ - x:number; - /** - * Gets the y coordinate of the upper left corner. - * @type {number} - */ - y:number; - /** - * Gets the width of this rectangle. - * @type {number} - */ - width:number; - /** - * Gets the height of this rectangle. - * @type {number} - */ - height:number; - /** - * Gets whether this instance is empty, i.e. - *

- * covers no area. - *

- * @type {boolean} - */ - empty:boolean; - /** - * Gets the smallest x coordinate of this rectangle. - * @type {number} - */ - minX:number; - /** - * Gets the smallest y coordinate of this rectangle. - * @type {number} - */ - minY:number; - /** - * Gets the largest x coordinate of this rectangle. - * @type {number} - */ - maxX:number; - /** - * Gets the largest y coordinate of this rectangle. - * @type {number} - */ - maxY:number; - /** - * Gets the x coordinate of the center point of this rectangle. - * @type {number} - */ - centerX:number; - /** - * Gets the y coordinate of the center point of this rectangle. - * @type {number} - */ - centerY:number; - /** - * Gets the bounds of this instance in double precision. - * @type {yfiles.algorithms.Rectangle2D} - */ - bounds2D:yfiles.algorithms.Rectangle2D; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Rectangle2D; - } - /** - * This class provides algorithms for the triangulation of point sets in the plane. - * @class - * @static - */ - export interface Triangulator extends yfiles.lang.Object{} - export class Triangulator { - /** - * Computes a Delauney triangulation of the given points. - *

- * A Delauney triangulation is a triangulation such that none of the given points is inside the circumcircle of any of the - * calculated triangles. - *

- *

- * The calculated triangulation is represented by an embedded graph, i.e. to each edge there exists a reverse edge and the - * outedges around each node are in embedded order. The returned edge and the (optional) reverseEdgeMap can be used to - * construct all faces of the plane graph and to determine its outer face. - *

- * @param result a graph whose nodes represent the points that need to be triangulated. - * @param pointData must provide the location (YPoint) for each node in the given graph. - * @param revMap a node map that will contain for each edge its reverse edge. If this argument is null then no reverse edge information - * will be available. - * @returns an edge on the outer face of the result graph. - * @static - */ - static calcDelauneyTriangulation(result:yfiles.algorithms.Graph,pointData:yfiles.algorithms.IDataProvider,revMap:yfiles.algorithms.IEdgeMap):yfiles.algorithms.Edge; - /** - * Computes a triangulation of the given points. - *

- * The calculated triangulation is represented by an embedded graph, i.e. to each edge there exists a reverse edge and the - * outedges around each node are in embedded order. The returned edge and the (optional) reverseEdgeMap can be used to - * construct all faces of the plane graph and to determine its outer face. - *

- * @param points the point set to be triangulated. The points must be provided as a YList of YPoints. - * @param result the resulting triangulation - * @param resultMap the node map that forms the link between a point and a node. - * @param reverseEdgeMap a node map that will contain for each edge its reverse edge. If this argument is null then no reverse edge information - * will be available. - * @returns an edge on the outer face of the result graph. - * @static - */ - static triangulatePoints(points:yfiles.algorithms.YList,result:yfiles.algorithms.Graph,resultMap:yfiles.algorithms.INodeMap,reverseEdgeMap:yfiles.algorithms.IEdgeMap):yfiles.algorithms.Edge; - /** - * Computes a triangulation of the given points. - *

- * The calculated triangulation is represented by an embedded graph, i.e. to each edge there exists a reverse edge and the - * outedges around each node are in embedded order. The returned edge and the (optional) reverseEdgeMap can be used to - * construct all faces of the plane graph and to determine its outer face. - *

- * @param result a graph whose nodes represent the points that need to be triangulated. - * @param pointData must provide the location (YPoint) for each node in the given graph. - * @param reverseEdgeMap a node map that will contain for each edge its reverse edge. If this argument is null then no reverse edge information - * will be available. - * @returns an edge on the outer face of the result graph. - * @static - */ - static triangulatePoints(result:yfiles.algorithms.Graph,pointData:yfiles.algorithms.IDataProvider,reverseEdgeMap:yfiles.algorithms.IEdgeMap):yfiles.algorithms.Edge; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Triangulator; - } - /** - * This class represents the size of an object. - *

- * An instance of this class implements the immutable design pattern. - *

- * @class - * @implements {yfiles.lang.IComparable} - */ - export interface YDimension extends yfiles.lang.Object,yfiles.lang.IComparable{} - export class YDimension { - /** - * Creates a new YDimension2D object for given size. - * @param width - * @param height - */ - constructor(width:number,height:number); - /** - * - * @param o - * @returns - */ - compareTo(o:any):number; - /** - * Creates a {@link yfiles.geometry.Size} from a given {@link yfiles.algorithms.YDimension}. - * @returns The {@link }. - */ - toSize():yfiles.geometry.Size; - /** - * Gets the width of the dimension object. - * @type {number} - */ - width:number; - /** - * Gets the height of the dimension object. - * @type {number} - */ - height:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.YDimension; - } - /** - * An oriented rectangle in 2D coordinate space with double precision coordinates. - *

- * The rectangle's height extends from its {@link yfiles.algorithms.YOrientedRectangle#anchor anchor point} in the direction of its up - * vector ({@link yfiles.algorithms.YOrientedRectangle#upX ux}, {@link yfiles.algorithms.YOrientedRectangle#upY uy}). Its width extends from its {@link yfiles.algorithms.YOrientedRectangle#anchor anchor point} in - * direction (-uy, ux) (i.e. perpendicular to the up vector). This means that an oriented rectangle with anchor point (0, 0) width - * 100, height 10, and up vector (0, -1) is a paraxial rectangle with upper left corner (0, -10) and lower right corner - * (100, 0). - *

- * @class - * @implements {yfiles.algorithms.IPlaneObject} - */ - export interface YOrientedRectangle extends yfiles.lang.Object,yfiles.algorithms.IPlaneObject{} - export class YOrientedRectangle { - /** - * Creates a new instance using the provided rectangle's values to initialize anchor, size, and up vector. - * @param rect the provided rectangle. - */ - constructor(rect:yfiles.algorithms.YOrientedRectangle); - /** - * Creates a new instance using the provided rectangle's values to initialize anchor and size. - *

- * The oriented rectangle's up vector will be (0, -1). - *

- * @param rect the provided rectangle. - */ - constructor(rect:yfiles.algorithms.YRectangle); - /** - * Creates a new instance using the provided values to initialize anchor, size, and up vector. - * @param anchorX The x coordinate of the anchor of the oriented rectangle. - * @param anchorY The y coordinate of the anchor of the oriented rectangle. - * @param width The width of the rectangle. - * @param height The height of the rectangle. - * @param upX The x component of the up vector. - * @param upY The y component of the up vector. - */ - constructor(anchorX:number,anchorY:number,width:number,height:number,upX:number,upY:number); - /** - * Creates a new instance using the provided values to initialize anchor and size. - *

- * The oriented rectangle's up vector will be (0, -1). - *

- * @param anchorX The x coordinate of the anchor of the oriented rectangle. - * @param anchorY The y coordinate of the anchor of the oriented rectangle. - * @param width The width of the rectangle. - * @param height The height of the rectangle. - */ - constructor(anchorX:number,anchorY:number,width:number,height:number); - /** - * Creates a new instance using the provided values to initialize anchor, size, and up vector. - * @param position The provider for the dynamic anchor of this instance. - * @param size The provider for the dynamic size of this instance. - * @param upVector The up vector. - */ - constructor(position:yfiles.algorithms.YPoint,size:yfiles.algorithms.YDimension,upVector:yfiles.algorithms.YVector); - /** - * Creates a new instance using the provided values to initialize the anchor and size. - *

- * The oriented rectangle's up vector will be (0, -1). - *

- * @param anchor The provider for the dynamic anchor of this instance. - * @param size The provider for the dynamic size of this instance. - */ - constructor(anchor:yfiles.algorithms.YPoint,size:yfiles.algorithms.YDimension); - /** - * Copies the actual values from the given OrientedRectangle to this instance. - * @param other the OrientedRectangle to retrieve the values from - */ - adoptValues(other:yfiles.algorithms.YOrientedRectangle):void; - /** - * Determines the four corner points of an oriented rectangle. - * @param rect The rectangle to determine the bounds. - * @returns the array of corner points. - * @static - */ - static calcPoints(rect:yfiles.algorithms.YOrientedRectangle):yfiles.algorithms.YPoint[]; - /** - * Determines the coordinates of the four corners of an oriented rectangle. - * @param rect The rectangle to determine the bounds. - * @returns the array of coordinates of the corner points in which each even index has the x-coordinate and each odd index the - * y-coordinate - * @static - */ - static calcPointsInDouble(rect:yfiles.algorithms.YOrientedRectangle):number[]; - /** - * Determines whether or not the specified point lies inside this oriented rectangle. - * @param x the x-coordinate of the point to check. - * @param y the y-coordinate of the point to check. - * @param [closed=false] if true, all points on the border of the rectangle are considered to be contained. - * @returns true iff the specified point lies inside; false otherwise. - */ - contains(x:number,y:number,closed?:boolean):boolean; - /** - * Determines whether the given rectangle r1 contains rectangle r2, using an epsilon value. - * @param r1 The first rectangle. - * @param r2 The second rectangle. - * @param eps A positive value allows for fuzzy hit testing. If the point lies outside the given object but it's distance is less than - * or equal to that value, it will be considered a hit. - * @returns true iff the r1 contains r2. - * @static - */ - static contains(r1:yfiles.algorithms.YOrientedRectangle,r2:yfiles.algorithms.YOrientedRectangle,eps:number):boolean; - /** - * Determines whether the given oriented rectangle contains the provided point, using an epsilon value. - * @param rect The rectangle. - * @param p The point to test. - * @param eps fuzziness range. A positive value allows for fuzzy hit testing. If a point lies outside the given rectangle, but its - * distance is less than or equal to that value, it will be considered a hit. - * @returns true if the point lies inside the rectangle; false otherwise. - * @static - */ - static contains(rect:yfiles.algorithms.YOrientedRectangle,p:yfiles.algorithms.YPoint,eps:number):boolean; - /** - * Determines whether the given oriented rectangle contains the provided point, using an epsilon value. - * @param rect The rectangle. - * @param x x-coordinate of the point to test. - * @param y y-coordinate of the point to test. - * @param eps fuzziness range. A positive value allows for fuzzy hit testing. If a point lies outside the given rectangle, but its - * distance is less than or equal to that value, it will be considered a hit. - * @returns true if the point lies inside the rectangle; false otherwise. - * @static - */ - static contains(rect:yfiles.algorithms.YOrientedRectangle,x:number,y:number,eps:number):boolean; - /** - * Creates a new OrientedRectangle instance whose anchor point is moved by the specified distance values, but has the same - * width, height, and up vector as this rectangle. - * @param dx the distance to move the anchor point in x-direction. A positive value means "move" to the right, a negative value means - * "move" to the left. - * @param dy the distance to move the anchor point in y-direction. A positive value means "move" downwards, a negative value means - * "move" upwards. - * @returns a new OrientedRectangle instance whose anchor point is moved by the specified distance values. - */ - getMovedInstance(dx:number,dy:number):yfiles.algorithms.YOrientedRectangle; - /** - * Creates a new OrientedRectangle instance that has the specified width and height, but has the same anchor point and up - * vector as this rectangle. - * @param width the width of the new rectangle. - * @param height the height of the new rectangle. - * @returns a new OrientedRectangle instance that has the specified width and height. - */ - getResizedInstance(width:number,height:number):yfiles.algorithms.YOrientedRectangle; - /** - * Determines an intersection point of the specified oriented rectangle and the specified line segment. - *

- * Note: there might be more than one intersection point. However this method only returns one intersection point or null - * if there is no intersection. - *

- * @param rect - * @param line - * @param eps - * @returns an intersection point of the specified oriented rectangle and the specified line segment or null if the rectangle and - * the segment do not intersect. - * @static - */ - static intersectionPoint(rect:yfiles.algorithms.YOrientedRectangle,line:yfiles.algorithms.LineSegment,eps:number):yfiles.algorithms.YPoint; - /** - * Determines whether or not the specified oriented rectangle and the specified line segment intersect. - * @param rect - * @param line - * @param eps - * @returns true if the rectangle and the segment intersect and false otherwise. - * @static - */ - static intersects(rect:yfiles.algorithms.YOrientedRectangle,line:yfiles.algorithms.LineSegment,eps:number):boolean; - /** - * Determines whether a rectangle intersects an oriented rectangle, given an epsilon. - * @param orientedRectangle The oriented rectangle to test. - * @param rectangle The rectangle to test. - * @param eps A positive value allows for fuzzy hit testing. If the point lies outside the given object but it's distance is less than - * or equal to that value, it will be considered a hit. - * @returns Whether they have a non-empty intersection. - * @static - */ - static intersects(orientedRectangle:yfiles.algorithms.YOrientedRectangle,rectangle:yfiles.algorithms.YRectangle,eps:number):boolean; - /** - * Moves this rectangle by applying the offset to the anchor. - * @param dx The x offset to move the rectangle's position by. - * @param dy The y offset to move the rectangle's position by. - */ - moveBy(dx:number,dy:number):void; - /** - * Sets the anchor of this rectangle. - * @param x the new x-coordinate of the anchor point. - * @param y the new y-coordinate of the anchor point. - */ - setAnchor(x:number,y:number):void; - /** - * Sets the anchor of the OrientedRectangle so that the center of the rectangle coincides with the given coordinate pair. - * @param cx The x coordinate of the center. - * @param cy The y coordinate of the center. - */ - setCenter(cx:number,cy:number):void; - /** - * Sets the size of this rectangle. - * @param width the new width. - * @param height the new height. - */ - setSize(width:number,height:number):void; - /** - * Sets the components of the up vector to the new values. - * @param upX The x component of the normalized up vector. - * @param upY The y component of the normalized up vector. - */ - setUpVector(upX:number,upY:number):void; - /** - * Creates an immutable {@link yfiles.geometry.IOrientedRectangle} from a given {@link yfiles.algorithms.YOrientedRectangle}. - * @returns The {@link }. - */ - toImmutableOrientedRectangle():yfiles.geometry.IOrientedRectangle; - /** - * Gets whether this instance has negative width or height. - * @type {boolean} - */ - empty:boolean; - /** - * Gets or sets the anchor of this oriented rectangle. - * @type {yfiles.algorithms.YPoint} - */ - anchor:yfiles.algorithms.YPoint; - /** - * Gets the x-coordinate of this rectangle's anchor point. - * @type {number} - */ - anchorX:number; - /** - * Gets the y-coordinate of this rectangle's anchor point. - * @type {number} - */ - anchorY:number; - /** - * Gets or sets the size of this rectangle. - * @type {yfiles.algorithms.YDimension} - */ - size:yfiles.algorithms.YDimension; - /** - * Gets the width of this rectangle. - * @type {number} - */ - width:number; - /** - * Gets the height of this rectangle. - * @type {number} - */ - height:number; - /** - * Gets the x-component of this rectangle's up vector. - * @type {number} - */ - upX:number; - /** - * Gets the y-component of this rectangle's up vector. - * @type {number} - */ - upY:number; - /** - * Gets or sets the angle (measured in radians) of this rectangle. - *

- * The angle of an oriented rectangle is the angle between the vector (0, -1) and the rectangle's up vector in counter - * clockwise order. An angle of 0 means the up vector points up in direction (0, -1). - *

- * @type {number} - */ - angle:number; - /** - * Gets or sets the current center of the oriented rectangle. - * @type {yfiles.algorithms.YPoint} - */ - center:yfiles.algorithms.YPoint; - /** - * Calculates the paraxial bounding box of this oriented rectangle. - * @type {yfiles.algorithms.YRectangle} - */ - boundingBox:yfiles.algorithms.YRectangle; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.YOrientedRectangle; - } - /** - * This class represents a point in the plane with double coordinates. - *

- * This class implements the immutable design pattern. - *

- * @class - * @implements {yfiles.lang.IComparable} - * @final - */ - export interface YPoint extends yfiles.lang.Object,yfiles.lang.IComparable{} - export class YPoint { - /** - * Creates a new YPoint object for a given position. - * @param x the x coordinate of the point. - * @param y the y coordinate of the point. - */ - constructor(x:number,y:number); - /** - * Creates a new YPoint at location (0,0) - */ - constructor(); - /** - * Adds two points and returns the result. - * @param p1 an arbitrary instance of YPoint. - * @param p2 an arbitrary instance of YPoint. - * @returns - * @static - */ - static add(p1:yfiles.algorithms.YPoint,p2:yfiles.algorithms.YPoint):yfiles.algorithms.YPoint; - /** - * Comparable implementation. - *

- * YPoints are ordered by ascending x-coordinates. If the x-coordinates of two points equal, then these points are ordered - * by ascending y-coordinates. - *

- * @param o - * @returns - */ - compareTo(o:any):number; - /** - * Returns the euclidean distance between two points. - * @param x1 x-coordinate of first point - * @param y1 y-coordinate of first point - * @param x2 x-coordinate of second point - * @param y2 y-coordinate of second point - * @returns the euclidean distance between first and second point - * @static - */ - static distance(x1:number,y1:number,x2:number,y2:number):number; - /** - * Returns the euclidean distance between two points. - * @param p1 an arbitrary point - * @param p2 an arbitrary point - * @returns the Euclidean distance between p1 and p2. - * @static - */ - static distance(p1:yfiles.algorithms.YPoint,p2:yfiles.algorithms.YPoint):number; - /** - * Returns the euclidean distance between this point and a given point. - * @param x the x coordinate of an arbitrary point - * @param y the y coordinate of an arbitrary point - * @returns the Euclidean distance between this point and the point (x,y). - */ - distanceTo(x:number,y:number):number; - /** - * Returns the euclidean distance between this point and a given point. - * @param p an arbitrary point - * @returns the Euclidean distance between this point and p. - */ - distanceTo(p:yfiles.algorithms.YPoint):number; - /** - * Returns a point that geometrically lies in in the middle of the line formed by the given points. - * @param p1 an arbitrary instance of YPoint. - * @param p2 an arbitrary instance of YPoint. - * @returns - * @static - */ - static midPoint(p1:yfiles.algorithms.YPoint,p2:yfiles.algorithms.YPoint):yfiles.algorithms.YPoint; - /** - * Returns the point, got by moving this point to another position. - * @param x the value which is added on the x-coordinate of the point. - * @param y the value which is added on the y-coordinate of the point. - * @returns a new instance of YPoint which is the result of the moving operation. - */ - moveBy(x:number,y:number):yfiles.algorithms.YPoint; - /** - * Subtracts two points (p1 - p2) and returns the result. - * @param p1 an arbitrary instance of YPoint. - * @param p2 an arbitrary instance of YPoint. - * @returns - * @static - */ - static subtract(p1:yfiles.algorithms.YPoint,p2:yfiles.algorithms.YPoint):yfiles.algorithms.YPoint; - /** - * Returns a copy of the given point with exchanged x- and y-coordinates. - * @param p an arbitrary instance of YPoint. - * @returns - * @static - */ - static swap(p:yfiles.algorithms.YPoint):yfiles.algorithms.YPoint; - /** - * Creates a {@link yfiles.geometry.Point} from a given {@link yfiles.algorithms.YPoint}. - * @returns The {@link }. - */ - toPoint():yfiles.geometry.Point; - /** - * A YPoint constant with coordinates (0,0). - * @const - * @static - * @type {yfiles.algorithms.YPoint} - */ - static ORIGIN:yfiles.algorithms.YPoint; - /** - * Gets the x-coordinate of the point object. - * @type {number} - */ - x:number; - /** - * Gets the y-coordinate of the point object. - * @type {number} - */ - y:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.YPoint; - } - /** - * This class represents an ordered list of points in the plane. - * @class - * @final - */ - export interface YPointPath extends yfiles.lang.Object{} - export class YPointPath { - /** - * Creates a new path from an array of points. - * @param path - */ - constructor(path:yfiles.algorithms.YPoint[]); - /** - * Creates a new path from a list of points. - * @param l a list of {@link } instances. - */ - constructor(l:yfiles.collections.IList); - /** - * Creates a new empty path. - */ - constructor(); - /** - * Calculate the (geometric) length of the path. - *

- * The length of the path is the sum of lengths of all line segments making up the path. - *

- * @returns the (geometric) length of the path - */ - calculateLength():number; - /** - * Create a point path with reverse ordering of the points. - * @returns - */ - createReverse():yfiles.algorithms.YPointPath; - /** - * Get the points in the path. - * @returns - */ - cursor():yfiles.algorithms.ICursor; - /** - * Returns a line segment in the path. - * @param i - * @returns - */ - getLineSegment(i:number):yfiles.algorithms.LineSegment; - /** - * Get the number of points in the path. - * @returns - */ - length():number; - /** - * Get the points in the path. - * @returns - */ - lineSegments():yfiles.algorithms.ILineSegmentCursor; - /** - * Get the points in the path. - * @returns - */ - points():yfiles.algorithms.IPointCursor; - /** - * Get the points in the list as array. - * @returns - */ - toArray():yfiles.algorithms.YPoint[]; - /** - * Get the points in the path as list. - * @returns a list of {@link } instances. - */ - toList():yfiles.collections.IList; - /** - * Defines a path with no points. - * @const - * @static - * @type {yfiles.algorithms.YPointPath} - */ - static EMPTY_PATH:yfiles.algorithms.YPointPath; - /** - * Gets the first point in the path. - * @type {yfiles.algorithms.YPoint} - */ - first:yfiles.algorithms.YPoint; - /** - * Gets the last point in the path. - * @type {yfiles.algorithms.YPoint} - */ - last:yfiles.algorithms.YPoint; - /** - * Gets the number of line segments in the path. - * @type {number} - */ - lineSegmentCount:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.YPointPath; - } - /** - * This class defines a rectangle and provides utility methods for it. - * @class - * @extends {yfiles.algorithms.YDimension} - * @implements {yfiles.algorithms.IPlaneObject} - */ - export interface YRectangle extends yfiles.algorithms.YDimension,yfiles.algorithms.IPlaneObject{} - export class YRectangle { - /** - * Creates a new rectangle with given upper left corner and size. - * @param x x-coordinate of upper left corner of the rectangle. - * @param y y-coordinate of upper left corner of the rectangle. - * @param width width of the rectangle. - * @param height height of the rectangle. - */ - constructor(x:number,y:number,width:number,height:number); - /** - * Creates a new rectangle with given upper left corner and size. - * @param pos upper left corner of the rectangle. - * @param size size of the rectangle. - */ - constructor(pos:yfiles.algorithms.YPoint,size:yfiles.algorithms.YDimension); - /** - * Creates a new rectangle with upper left corner (0,0) and size (0,0). - */ - constructor(); - /** - * Checks whether or not this YRectangle contains the given rectangle. - * @param p - * @returns - */ - contains(p:yfiles.algorithms.YRectangle):boolean; - /** - * Checks whether or not this YRectangle contains the given point. - * @param p - * @returns - */ - contains(p:yfiles.algorithms.YPoint):boolean; - /** - * Checks whether or not this YRectangle contains the rectangle defined by the given frame. - * @param x - * @param y - * @param width - * @param height - * @returns - */ - contains(x:number,y:number,width:number,height:number):boolean; - /** - * Checks whether or not this YRectangle contains the given point. - * @param x the x-coordinate of the point to check. - * @param y the x-coordinate of the point to check. - * @returns true if the point lies inside the rectangle; false otherwise. - */ - contains(x:number,y:number):boolean; - /** - * Determines whether the specified rectangle contains the specified point. - * @param rx the x-coordinate of the upper left corner of the rectangle. - * @param ry the y-coordinate of the upper left corner of the rectangle. - * @param rw the width of the rectangle. - * @param rh the height of the rectangle. - * @param x the x-coordinate of the point to check. - * @param y the x-coordinate of the point to check. - * @param [closed=false] if true, all points on the border of the rectangle are considered to be contained. - * @returns true if the point lies inside the rectangle; false otherwise. - * @static - */ - static contains(rx:number,ry:number,rw:number,rh:number,x:number,y:number,closed?:boolean):boolean; - /** - * Returns the Euclidean distance to the passed rectangle. - *

- * If they overlap, the distance is 0. - *

- * @param other the second rectangle. - * @returns the distance to the given rectangle. - */ - getEuclideanDistance(other:yfiles.algorithms.YRectangle):number; - /** - * Returns the Manhattan distance to the passed rectangle. - *

- * If they overlap the distance is 0. - *

- * @param other the second rectangle. - * @returns the distance to the given rectangle. - */ - getManhattanDistance(other:yfiles.algorithms.YRectangle):number; - /** - * Returns whether or not the given rectangles intersect. - * @param r1 - * @param r2 - * @returns - * @static - */ - static intersects(r1:yfiles.algorithms.YRectangle,r2:yfiles.algorithms.YRectangle):boolean; - /** - * Creates a {@link yfiles.geometry.Rect} from a given {@link yfiles.algorithms.YRectangle}. - * @returns The {@link }. - */ - toRect():yfiles.geometry.Rect; - /** - * Gets x-coordinate of upper left corner. - * @type {number} - */ - x:number; - /** - * Gets y-coordinate of upper left corner. - * @type {number} - */ - y:number; - /** - * Gets coordinates of upper left corner. - * @type {yfiles.algorithms.YPoint} - */ - location:yfiles.algorithms.YPoint; - /** - * Gets this object. - * @type {yfiles.algorithms.YRectangle} - */ - boundingBox:yfiles.algorithms.YRectangle; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.YRectangle; - } - /** - * This class represents a vector in the 2-dimensional real vector space. - *

- * This vector is an ordered 2 tuple and is defined by two doubles. - *

- * @class - */ - export interface YVector extends yfiles.lang.Object{} - export class YVector { - /** - * Creates a new vector, whose direction is given by two points. - *

- * The vector is defined by p1 - p2. - *

- * @param p1 The first point. - * @param [p2=null] The second point. If no point is spcified, (0,0) is used instead. - */ - constructor(p1:yfiles.algorithms.YPoint,p2?:yfiles.algorithms.YPoint); - /** - * Creates a new vector which is a copy of another vector. - * @param v the vector, whose values are copied. - */ - constructor(v:yfiles.algorithms.YVector); - /** - * Creates a new vector, whose direction is given by two points. - *

- * The vector is defined by (x1 - x2, y1 - y2). - *

- * @param x1 the X-coordinate of the first point. - * @param y1 the Y-coordinate of the first point. - * @param x2 the X-coordinate of the second point. - * @param y2 the Y-coordinate of the second point. - */ - constructor(x1:number,y1:number,x2:number,y2:number); - /** - * Creates a new vector with given direction. - * @param dx the first coordinate - * @param dy the second coordinate - */ - constructor(dx:number,dy:number); - /** - * Adds a vector to this vector. - * @param v the vector to add. - */ - add(v:yfiles.algorithms.YVector):void; - /** - * Adds the vector to a point and returns the resulting point. - * @param p a point. - * @param v the vector to add to the point. - * @returns p+v - * @static - */ - static add(p:yfiles.algorithms.YPoint,v:yfiles.algorithms.YVector):yfiles.algorithms.YPoint; - /** - * Adds two vectors and returns the result. - * @param v first vector to sum. - * @param w second vector to sum. - * @returns v+w - * @static - */ - static add(v:yfiles.algorithms.YVector,w:yfiles.algorithms.YVector):yfiles.algorithms.YVector; - /** - * Returns the result of the addition of two angles between 0 and 2*Pi. - *

- * The result is calculated modulo 2*Pi. - *

- * @param a1 a value in [0,2Pi). - * @param a2 a value in [0,2Pi). - * @returns The sum of a1 and a2 modulo 2*Pi. - * @static - */ - static addAngle(a1:number,a2:number):number; - /** - * Returns the angle (measured in radians) between two vectors in clockwise order (with regards to screen coordinates) from - * v1 to v2. - *

- * Screen coordinates mean positive x-direction is from left to right and positive y-direction is from top to bottom. - *

- * @param v1 - * @param v2 - * @returns - * @static - */ - static angle(v1:yfiles.algorithms.YVector,v2:yfiles.algorithms.YVector):number; - /** - * Returns this vector with unit length. - * @param v - * @returns - * @static - */ - static getNormal(v:yfiles.algorithms.YVector):yfiles.algorithms.YVector; - /** - * Returns the length of the vector, this is the value of the euclidean norm. - * @returns a value > 0. - */ - length():number; - /** - * Assigns unit length to the vector. - *
- */ - norm():void; - /** - * Returns the vector which is orthogonal to the given one and has unit length. - * @param v a vector. - * @returns a vector which is orthogonal to v with unit length. - * @static - */ - static orthoNormal(v:yfiles.algorithms.YVector):yfiles.algorithms.YVector; - /** - * Returns true if vector v1 is on the right side of v2. - * @param v1 - * @param v2 - * @returns - * @static - */ - static rightOf(v1:yfiles.algorithms.YVector,v2:yfiles.algorithms.YVector):boolean; - /** - * Returns a new YVector instance that is obtained by rotating this vector by the given angle (measured in radians) in - * clockwise direction (with regards to screen coordinates). - *

- * Screen coordinates mean positive x-direction is from left to right and positive y-direction is from top to bottom. - *

- * @param angle the angle of rotation in radians. - * @returns the rotated vector. - */ - rotate(angle:number):yfiles.algorithms.YVector; - /** - * Returns the value of the scalar product of two vectors. - * @param v1 the first vector. - * @param v2 the second vector. - * @returns v1.x * v2.x + v1.y * v2.y - * @static - */ - static scalarProduct(v1:yfiles.algorithms.YVector,v2:yfiles.algorithms.YVector):number; - /** - * Scales the vector by an factor. - * @param factor the scale factor, with which the length is multiplied. - */ - scale(factor:number):void; - /** - * Creates a {@link yfiles.geometry.Point} from a given {@link yfiles.algorithms.YVector}. - * @returns The {@link }. - */ - toPoint():yfiles.geometry.Point; - /** - * Gets the first coordinate of the vector. - * @type {number} - */ - x:number; - /** - * Gets the second coordinate of the vector. - * @type {number} - */ - y:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.YVector; - } - /** - * This class implements a directed graph structure. - *

- * Basically, a directed graph consists of a set of objects called "nodes" (represented by instances of class - * {@link yfiles.algorithms.Node}) and a set of node pairs which are called "edges" (represented by instances of class - * {@link yfiles.algorithms.Edge}). - *
- * The directed stems from the fact that all edges in the graph have direction, i.e., they have a distinct source node and a - * distinct target node. Using the aforementioned pair notation, an edge would be written as (<source node>, <target node>). - *

- *

- * Class Graph presents a proper data type that provides support for all essential operations like element creation, - * removal, access, and iteration. - *
- * Important: Class Graph is the single authority for any structural changes to the graph data type. Specifically, this means that - * there is no way to create or delete a node or an edge without using an actual Graph instance. - *

- *

- * Furthermore, this class is also responsible for providing access to its elements. This is done by means of bidirectional - * cursors that present a read-only view on the node set (interface {@link yfiles.algorithms.INodeCursor}) and edge set (interface - * {@link yfiles.algorithms.IEdgeCursor}). - *

- *

- * Class Graph fires notification events that signal structural changes, like, e.g., creation, removal, reinsertion, or - * modification of graph elements. - *

- *

- * This class provides direct support for the notion of data accessors. It allows to register so-called data providers - * (implementations of interface {@link yfiles.algorithms.IDataProvider}) that hold arbitrary data which is associated to its nodes - * and/or edges. - *
- * Also, it serves as a factory to create so-called maps ({@link yfiles.algorithms.INodeMap}, - * {@link yfiles.algorithms.IEdgeMap}) that can be utilized to bind arbitrary data to nodes and edges. - *

- * @class - */ - export interface Graph extends yfiles.lang.Object{} - export class Graph { - /** - * Instantiates a new Graph object as a partial copy of the given graph. - *

- * Only the subgraph induced by the given cursor will be copied to the new Graph instance. If no cursor is specified, the - * complete graph is copied. Values bound to the argument graph via node and edge keys are available in the new Graph - * instance with the keys registered with graph. Only references to these values are copied. - *

- *

- * The new Graph instance also inherits all graph listeners registered with the given graph. - *

- * @param graph The graph to be (partially) copied. - * @param [subNodes=null] A cursor to iterate over the nodes that actually induce the subgraph to be copied. - */ - constructor(graph:yfiles.algorithms.Graph,subNodes?:yfiles.algorithms.ICursor); - /** - * Instantiates an empty Graph object. - */ - constructor(); - /** - * Registers the given data provider using the given look-up key. - *

- * If there is already a data provider registered with that key, then it will be overwritten with the new one. - *

- * @param providerKey - * @param data - */ - addDataProvider(providerKey:any,data:yfiles.algorithms.IDataProvider):void; - /** - * Redefines an edge's end points and fires corresponding notification events to inform registered listeners. - *

- * Edge e has source node v := sourceReference.source() or v := newSource, if sourceReference == null and target node w := targetReference.target() - * or w := newTarget, if targetReference == null. - *
- * - *
- * Edge e is inserted in such a way that an iteration over the edges at v returns e - *

- *
    - *
  • after sourceReference, if sourceD == AFTER
  • - *
  • before sourceReference, if sourceD == BEFORE,
  • - *
- *

- * and an iteration over the edges at w returns e - *

- *
    - *
  • after targetReference, if targetD == AFTER
  • - *
  • before targetReference, if targetD == BEFORE.
  • - *
- * @param e The edge to be changed. - * @param newSource The new source node. - * @param sourceReference Reference edge for insertion at the new source node. - * @param sourceD One of the object insertion specifiers {@link #BEFORE} or - * {@link #AFTER}. - * @param newTarget The new target node. - * @param targetReference Reference edge for insertion at the new target node. - * @param targetD One of the object insertion specifiers {@link #BEFORE} or - * {@link #AFTER}. - */ - changeEdge(e:yfiles.algorithms.Edge,newSource:yfiles.algorithms.Node,sourceReference:yfiles.algorithms.Edge,sourceD:yfiles.algorithms.GraphElementInsertion,newTarget:yfiles.algorithms.Node,targetReference:yfiles.algorithms.Edge,targetD:yfiles.algorithms.GraphElementInsertion):void; - /** - * Redefines an edge's end points and fires corresponding notification events to inform registered listeners. - *

- * Edge e has source node v := e1.source() and target node w := e2.target(). - *
- * - *
- * Edge e is inserted in such a way that an iteration over the edges at v returns e - *

- *
    - *
  • after e1, if d1 == AFTER
  • - *
  • before e1, if d1 == BEFORE,
  • - *
- *

- * and an iteration over the edges at w returns e - *

- *
    - *
  • after e2, if d2 == AFTER
  • - *
  • before e2, if d2 == BEFORE.
  • - *
- * @param e The edge to be changed. - * @param e1 Reference edge for insertion at a new source node. - * @param e2 Reference edge for insertion at a new target node. - * @param d1 One of the object insertion specifiers {@link #BEFORE} or - * {@link #AFTER}. - * @param d2 One of the object insertion specifiers {@link #BEFORE} or - * {@link #AFTER}. - */ - changeEdge(e:yfiles.algorithms.Edge,e1:yfiles.algorithms.Edge,e2:yfiles.algorithms.Edge,d1:yfiles.algorithms.GraphElementInsertion,d2:yfiles.algorithms.GraphElementInsertion):void; - /** - * Redefines an edge's end points and fires corresponding notification events to inform registered listeners. - *

- * The edge is appended to the lists of incoming and outgoing edges at the given source node and target node, - * respectively. - *

- * @param e The edge to be changed. - * @param newSource The new source node of the given edge. - * @param newTarget The new target node of the given edge. - */ - changeEdge(e:yfiles.algorithms.Edge,newSource:yfiles.algorithms.Node,newTarget:yfiles.algorithms.Node):void; - /** - * Removes all nodes and edges from this graph and fires corresponding notification events to inform registered listeners. - */ - clear():void; - /** - * Whether or not this graph contains the given edge. - * @param e - * @returns - */ - contains(e:yfiles.algorithms.Edge):boolean; - /** - * Whether or not this graph contains the given node. - * @param v - * @returns - */ - contains(v:yfiles.algorithms.Node):boolean; - /** - * Returns whether or not this graph contains an edge that connects the given nodes. - * @param source The source node. - * @param target The target node. - * @returns - * @see yfiles.algorithms.Node#getEdgeTo - * @see yfiles.algorithms.Node#getEdgeFrom - * @see yfiles.algorithms.Node#getEdge - */ - containsEdge(source:yfiles.algorithms.Node,target:yfiles.algorithms.Node):boolean; - /** - * Creates a copy of this graph. - *

- * Invokes {@link yfiles.algorithms.Graph#Graph}. - *

- * @returns The newly created Graph object. - */ - createCopy():yfiles.algorithms.Graph; - /** - * Creates a new edge in this graph to be ordered before or after a given edge and fires a corresponding notification event - * to inform registered listeners. - *

- * The new edge e has source node v and target node w, i.e., would be written as edge e = (v, w). - *
- * - *
- * Edge e is inserted in such a way that an iteration over the edges at node v returns e - *

- *
    - *
  • after e1, if d1 == AFTER
  • - *
  • before e1, if d1 == BEFORE,
  • - *
- *

- * and an iteration over the edges at w returns e - *

- *
    - *
  • after e2, if d2 == AFTER
  • - *
  • before e2, if d2 == BEFORE.
  • - *
- * @param v The source node of the edge. - * @param e1 An edge with source node v. - * @param w The target node of the edge. - * @param e2 An edge with target node w. - * @param d1 One of the object insertion specifiers {@link #BEFORE} or - * {@link #AFTER}. - * @param d2 One of the object insertion specifiers {@link #BEFORE} or - * {@link #AFTER}. - * @returns The newly created Edge object. - */ - createEdge(v:yfiles.algorithms.Node,e1:yfiles.algorithms.Edge,w:yfiles.algorithms.Node,e2:yfiles.algorithms.Edge,d1:yfiles.algorithms.GraphElementInsertion,d2:yfiles.algorithms.GraphElementInsertion):yfiles.algorithms.Edge; - /** - * Creates a new edge in this graph and fires a corresponding notification event to inform registered listeners. - *

- * The new edge has source node v and target node w, i.e., would be written as edge e = (v, w). - *

- *

- * The edge is appended to the lists of incoming and outgoing edges at the source node and target node, respectively. - *

- * @param v The source node of the edge. - * @param w The target node of the edge. - * @returns The newly created Edge object. - */ - createEdge(v:yfiles.algorithms.Node,w:yfiles.algorithms.Node):yfiles.algorithms.Edge; - /** - * Returns a newly created edge map that is valid for the edges in this graph. - *

- * The implementation returned by this method can be used for any edge that is part of this Graph instance at any point of - * time, i.e., it is safe to modify the graph structure (add and remove nodes and edges) freely. - *

- *

- * The implementation returned uses O(m) memory at all times and provides true O(1) read and write access for each edge. - *

- *

- * In order to release the resources held by this map, {@link yfiles.algorithms.Graph#disposeEdgeMap} has to be called. - *

- * @returns - */ - createEdgeMap():yfiles.algorithms.IEdgeMap; - /** - * Creates an empty base object of the same type as this graph. - *

- * Subclasses should override this method. - *

- * @returns - */ - createGraph():yfiles.algorithms.Graph; - /** - * Creates a new node in this graph and fires a corresponding notification event to inform registered listeners. - * @returns The newly created Node object. - */ - createNode():yfiles.algorithms.Node; - /** - * Returns a newly created node map that is valid for the nodes in this graph. - *

- * The implementation returned by this method can be used for any node that is part of this Graph instance at any point of - * time, i.e., it is safe to modify the graph structure (add and remove nodes and edges) freely. - *

- *

- * The implementation returned uses O(n) memory at all times and provides true O(1) read and write access for each node. - *

- *

- * In order to release the resources held by this map, {@link yfiles.algorithms.Graph#disposeNodeMap} has to be called. - *

- * @returns - */ - createNodeMap():yfiles.algorithms.INodeMap; - /** - * Informs the graph that the given edge map is no longer needed. - *

- * This method is used for EdgeMap implementations that have been obtained using the {@link yfiles.algorithms.Graph#createEdgeMap} - * factory method. - *

- *

- * Calling this method will destroy the edge map and associated resources can be freed. It is strongly recommended to - * dispose of all edge maps that are not needed anymore using this method. - *

- * @param map - */ - disposeEdgeMap(map:yfiles.algorithms.IEdgeMap):void; - /** - * Informs the graph that the given node map is no longer needed. - *

- * This method is used for NodeMap implementations that have been obtained using the {@link yfiles.algorithms.Graph#createNodeMap} - * factory method. - *

- *

- * Calling this method will destroy the node map and associated resources can be freed. It is strongly recommended to - * dispose of all node maps that are not needed anymore using this method. - *

- * @param map - */ - disposeNodeMap(map:yfiles.algorithms.INodeMap):void; - /** - * Low-level iteration support for adjacent edges. - * @param v - * @returns - * @protected - * @static - */ - static firstOutEdge(v:yfiles.algorithms.Node):yfiles.algorithms.Edge; - /** - * Returns the data provider that is registered with the graph using the given look-up key. - *

- * The look-up domain of a returned data provider normally consists of either the nodes of the graph, or its edges, or - * both. - *

- * @param providerKey - * @returns - */ - getDataProvider(providerKey:any):yfiles.algorithms.IDataProvider; - /** - * Returns an array containing all edges of this graph. - * @returns - */ - getEdgeArray():yfiles.algorithms.Edge[]; - /** - * Provides access to the edges of the graph. - * @returns An EdgeCursor to iterate over the edges in the graph. - */ - getEdgeCursor():yfiles.algorithms.IEdgeCursor; - /** - * Returns an array containing all nodes of this graph. - * @returns - */ - getNodeArray():yfiles.algorithms.Node[]; - /** - * Provides access to the nodes of the graph. - * @returns A NodeCursor to iterate over the nodes in the graph. - */ - getNodeCursor():yfiles.algorithms.INodeCursor; - /** - * Hides the given node from this graph. - *

- * Hiding a node means to (temporarily) remove the node from the graph. - *

- *

- * The only difference to a proper node removal as performed by {@link yfiles.algorithms.Graph#removeNode} is that no event will be - * emitted that signals the structural change (i.e. the node's removal). - *

- *

- * Generally, hiding should only be used in the sense of temporarily removing an object that will be reinserted shortly after. - *

- *

- * To reinsert a hidden node use {@link yfiles.algorithms.Graph#unhide}. - *

- * @param v - * @see yfiles.algorithms.Graph#hide - * @see yfiles.algorithms.Graph#unhide - */ - hide(v:yfiles.algorithms.Node):void; - /** - * Hides the given edge from this graph. - *

- * Hiding an edge means to (temporarily) remove the edge from the graph. - *

- *

- * The only difference to a proper edge removal as performed by {@link yfiles.algorithms.Graph#removeEdge} is that no event will be - * emitted that signals the structural change (i.e. the edge's removal). - *

- *

- * Generally, hiding should only be used in the sense of temporarily removing an object that will be reinserted shortly after. - *

- *

- * To reinsert a hidden edge use {@link yfiles.algorithms.Graph#unhide}. - *

- * @param e - * @see yfiles.algorithms.Graph#hide - * @see yfiles.algorithms.Graph#unhide - */ - hide(e:yfiles.algorithms.Edge):void; - /** - * Moves the given edge to the first position within the sequence of edges in this graph. - * @param e - */ - moveToFirst(e:yfiles.algorithms.Edge):void; - /** - * Moves the given node to the first position within the sequence of nodes in this graph. - * @param v - */ - moveToFirst(v:yfiles.algorithms.Node):void; - /** - * Moves the given edge to the last position within the sequence of edges in this graph. - * @param e - */ - moveToLast(e:yfiles.algorithms.Edge):void; - /** - * Moves the given node to the last position within the sequence of nodes in this graph. - * @param v - */ - moveToLast(v:yfiles.algorithms.Node):void; - /** - * For internal debugging purposes only. - */ - printNodeSlotSize():void; - /** - * Reinserts a formerly removed edge into this graph and fires a corresponding notification event to inform registered - * listeners. - *

- * The reinserted edge is appended to the sequence of edges in this graph, i.e., normally, its new position does not match - * the position before its removal. The same holds for the edge's positions in the list of incoming and outgoing edges at - * its source node and target node, respectively. - *

- *

- * Note that reinserting an edge whose source/target is not in the graph (e.g., because it's currently hidden/removed) - * causes an exception. Hence, in such cases, you first have to unhide/reinsert the corresponding endpoints. - *

- * @param e The edge to be reinserted. - * @see yfiles.algorithms.Graph#removeEdge - */ - reInsertEdge(e:yfiles.algorithms.Edge):void; - /** - * Reinserts a formerly removed node into this graph and fires a corresponding notification event to inform registered - * listeners. - *

- * The reinserted node is appended to the sequence of nodes in this graph, i.e., normally, its new position does not match - * the position before its removal. - *

- * @param v The node to be reinserted. - * @see yfiles.algorithms.Graph#removeNode - */ - reInsertNode(v:yfiles.algorithms.Node):void; - /** - * Removes the data provider that is registered using the given look-up key. - * @param providerKey - */ - removeDataProvider(providerKey:any):void; - /** - * Removes the given edge from this graph and fires a corresponding notification event to inform registered listeners. - *

- * The edge will be deselected before it gets removed. - *

- * @param e The edge to be removed. - */ - removeEdge(e:yfiles.algorithms.Edge):void; - /** - * Removes the given node from this graph. - *

- * All edges connecting to the given node are removed as well (preceding the actual node removal). Corresponding - * notification events are fired to inform registered listeners. - *

- *

- * The node will be deselected before it gets removed. - *

- * @param v The node to be removed from this graph. - */ - removeNode(v:yfiles.algorithms.Node):void; - /** - * Reverses the given edge and fires corresponding notification events to inform registered listeners. - *

- * This operation exchanges source and target node of the edge. - *

- * @param e - */ - reverseEdge(e:yfiles.algorithms.Edge):void; - /** - * Sorts incoming and outgoing edges at each node of the graph. - *

- * If a given comparator is null, then the corresponding edges (i.e., incoming/outgoing) will not be sorted. This sorts the - * order of the edges as returned by {@link yfiles.algorithms.Node#getOutEdgeCursor} and {@link yfiles.algorithms.Node#getInEdgeCursor} - * respectively. - *

- * @param inComparer The comparator used for the incoming edges at each node. - * @param outComparer The comparator used for the outgoing edges at each node. - */ - sortEdges(inComparer:yfiles.collections.IComparer,outComparer:yfiles.collections.IComparer):void; - /** - * Sorts the internally held list of edges. - *

- * If the given comparator is null, then the edges will not be sorted. This list determines the order of the edges as - * returned by {@link yfiles.algorithms.Graph#getEdgeCursor}. - *

- * @param comparer The comparator used for the edges. - */ - sortEdges(comparer:yfiles.collections.IComparer):void; - /** - * Sorts the internally held list of nodes. - *

- * If the given comparator is null, then the nodes will not be sorted. This list determines the order of the nodes as - * returned by {@link yfiles.algorithms.Graph#getNodeCursor}. - *

- * @param comparer The comparator used for the nodes. - */ - sortNodes(comparer:yfiles.collections.IComparer):void; - /** - * Unhides the given node in this graph. - *

- * Unhiding a node means to reinsert a node that was formerly hidden from this graph by a call to - * {@link yfiles.algorithms.Graph#hide}. - *

- *

- * The only difference to a proper node reinsertion as performed by {@link yfiles.algorithms.Graph#reInsertNode} is that no event - * will be emitted that signals the structural change (i.e. the node's reinsertion). - *

- * @param v - */ - unhide(v:yfiles.algorithms.Node):void; - /** - * Unhides the given edge in this graph. - *

- * Unhiding an edge means to reinsert an edge that was formerly hidden from this graph by a call to - * {@link yfiles.algorithms.Graph#hide}. - *

- *

- * The only difference to a proper edge reinsertion as performed by {@link yfiles.algorithms.Graph#reInsertEdge} is that no event - * will be emitted that signals the structural change (i.e. the edge's reinsertion). - *

- *

- * Note that unhiding an edge whose source/target is not in the graph (e.g., because it's currently hidden/removed) causes - * an exception. Hence, in such cases, you first have to unhide/reinsert the corresponding endpoints. - *

- * @param e - * @see yfiles.algorithms.Graph#hide - * @see yfiles.algorithms.Graph#unhide - */ - unhide(e:yfiles.algorithms.Edge):void; - /** - * Gets the number of nodes in this graph. - *

- * Same as {@link yfiles.algorithms.Graph#nodeCount}. - *

- * @type {number} - */ - n:number; - /** - * Gets the number of nodes in this graph. - * @type {number} - */ - nodeCount:number; - /** - * Gets the number of edges in this graph. - *

- * Same as {@link yfiles.algorithms.Graph#edgeCount}. - *

- * @type {number} - */ - e:number; - /** - * Gets the number of edges in this graph. - * @type {number} - */ - edgeCount:number; - /** - * Gets true if this graph contains no nodes. - * @type {boolean} - */ - empty:boolean; - /** - * Gets the first node in this graph. - * @type {yfiles.algorithms.Node} - */ - firstNode:yfiles.algorithms.Node; - /** - * Gets the first edge in this graph. - * @type {yfiles.algorithms.Edge} - */ - firstEdge:yfiles.algorithms.Edge; - /** - * Gets the last node in this graph. - * @type {yfiles.algorithms.Node} - */ - lastNode:yfiles.algorithms.Node; - /** - * Gets the last edge in this graph. - * @type {yfiles.algorithms.Edge} - */ - lastEdge:yfiles.algorithms.Edge; - /** - * Gets all node maps that have been created by this graph but have not yet been disposed. - * @see yfiles.algorithms.Graph#createNodeMap - * @see yfiles.algorithms.Graph#disposeNodeMap - * @type {Array.} - */ - registeredNodeMaps:yfiles.algorithms.INodeMap[]; - /** - * Gets all edge maps that have been created by this graph but have not yet been disposed. - * @see yfiles.algorithms.Graph#createEdgeMap - * @see yfiles.algorithms.Graph#disposeEdgeMap - * @type {Array.} - */ - registeredEdgeMaps:yfiles.algorithms.IEdgeMap[]; - /** - * Gets an array of all data provider look-up keys that are registered with this graph. - * @type {Array.} - */ - dataProviderKeys:any[]; - /** - * Yields a dynamic {@link yfiles.collections.IEnumerable.} for - * {@link yfiles.algorithms.Node}s that can be used to iterate over the nodes that are contained in this instance. - *

- * This is a live enumerable and will thus reflect the current state of the graph. Note that changes to the graph structure - * during the traversal should be carried out with great care. - *

- * @type {yfiles.collections.IEnumerable.} - */ - nodes:yfiles.collections.IEnumerable; - /** - * Yields a dynamic {@link yfiles.collections.IEnumerable.} for - * {@link yfiles.algorithms.Edge}s that can be used to iterate over the edges that are contained in this instance. - *

- * This is a live enumerable and will thus reflect the current state of the graph. Note that changes to the graph structure - * during the traversal should be carried out with great care. - *

- * @type {yfiles.collections.IEnumerable.} - */ - edges:yfiles.collections.IEnumerable; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Graph; - } - /** - * This class provides methods that check structural properties of a given graph. - *

- * Definitions - *

- *
    - *
  • Cycle: An edge path with vertices v0, v1, v2, ... , vk forms a cycle if v0 = vk and consists of at least one edge.
  • - *
  • Acyclic graph: A graph that contains no directed cycle.
  • - *
  • Cyclic graph: A graph that contains a directed cycle.
  • - *
  • Connected graph: A graph in which there exists an undirected path of edges between every pair of nodes.
  • - *
  • Strongly connected graph: A graph in which there exists a directed path between each pair of nodes.
  • - *
  • Biconnected graph: A graph that has no cut vertex or articulation point (i.e., a node whose removal disconnects the graph).
  • - *
  • Bipartite graph: A graph whose nodes can be partitioned into two sets such that each edge connects two nodes of different sets.
  • - *
  • - * Tree graph: An acyclic graph, in which any pair of vertices is connected through a path. If one vertex of a tree is distinguished - * from the other vertices, then the tree is called rooted tree. - *
  • - *
  • N-ary tree graph: A directed rooted tree where each node has a maximum of n children.
  • - *
  • Forest graph: A graph whose connected components are trees.
  • - *
  • Simple graph: A graph that contains no self-loops and parallel edges.
  • - *
  • Planar graph: A graph that can be drawn on the plane without edge crossings.
  • - *
- * @class - * @static - */ - export interface GraphChecker extends yfiles.lang.Object{} - export class GraphChecker { - /** - * Checks whether or not the given directed graph is acyclic. - *

- * A graph is called acyclic if it contains no directed cycle. - *

- * @param graph the given graph - * @returns true if the graph is acyclic, false, otherwise - * @static - */ - static isAcyclic(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether or not the given undirected graph is biconnected. - *

- * A graph is called biconnected if it has no cut vertex or articulation point, i.e., no node whose removal disconnects the graph. - *

- * @param graph the given undirected graph - * @returns true if the graph is biconnected, false otherwise - * @static - */ - static isBiconnected(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether or not the given undirected graph is bipartite. - *

- * A graph is called bipartite if its nodes can be partitioned into two sets such that each edge connects two nodes of different - * sets. - *

- * @param graph the given undirected graph - * @returns true if the graph is bipartite, false otherwise - * @static - */ - static isBipartite(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether or not the given graph is connected. - *

- * A graph is called connected if there exists an undirected path of edges between every pair of nodes. - *

- * @param graph the given graph - * @returns true if the graph is connected, false otherwise - * @static - */ - static isConnected(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether or not the given directed graph is cyclic. - *

- * A graph is called cyclic if it contains a directed cycle. - *

- * @param graph the given graph - * @returns true if the graph is cyclic, false, otherwise - * @static - */ - static isCyclic(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether the given graph is a forest. - *

- * A graph is a forest if its connected components are trees. - *

- * @param graph the given graph - * @returns true if the graph is a forest, false otherwise - * @static - */ - static isForest(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether or not the given undirected graph contains no multiple edges. - *

- * More precisely, the method returns true if the graph contains no two distinct edges e1, e2 that connect the same pairs - * of nodes in either direction. - *

- * @param graph the given undirected graph - * @returns true if the graph contains no multiple edges, false otherwise - * @static - */ - static isMultipleEdgeFree(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether or not the given graph is a directed rooted tree where each node has a maximum of n children. - * @param graph the given graph - * @param n - * @returns true if the graph is a directed rooted tree where each node has at most n children, false otherwise - * @static - */ - static isNaryTree(graph:yfiles.algorithms.Graph,n:number):boolean; - /** - * Checks whether or not the given directed graph is a directed rooted tree. - * @param graph the given graph - * @returns true if the graph is a directed rooted tree, false otherwise - * @static - */ - static isRootedTree(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether or not the given graph contains no self-loops. - * @param graph the given graph - * @returns true if the graph contains no self-loops, false otherwise - * @static - */ - static isSelfLoopFree(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether or not the given directed graph is simple. - *

- * A graph is called simple if it contains no two distinct edges e1, e2 where - * e1.source() == e2.source() && e1.target() == e2.target(). - *

- * @param graph the given directed graph - * @returns true if the graph is simple, false otherwise - * @static - */ - static isSimple(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether or not the given directed graph is strongly connected. - *

- * A graph is called strongly connected if there exists a directed path between each pair of nodes. - *

- * @param graph the given directed graph - * @returns true if the graph is strongly connected, false, otherwise - * @static - */ - static isStronglyConnected(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether or not the given graph is an undirected tree. - * @param graph the given graph - * @returns true if the graph is an undirected tree, false otherwise - * @static - */ - static isTree(graph:yfiles.algorithms.Graph):boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.GraphChecker; - } - /** - * This class provides algorithms for determining certain connectivity components within a graph. - *

- * It also provides convenience methods for working with these components. - *

- *

- * Definitions - *

- *
    - *
  • Connected graph: A graph is called connected if there exists an undirected path of edges between every pair of nodes.
  • - *
  • Strongly connected graph: A graph is called strongly connected if there exists a directed path between each pair of nodes.
  • - *
  • - * Biconnected graph: A graph is called biconnected if it has no cut vertex or articulation point (i.e., a node whose removal disconnects the - * remaining graph). - *
  • - *
- * @class - * @static - */ - export interface GraphConnectivity extends yfiles.lang.Object{} - export class GraphConnectivity { - /** - * Calculates the biconnected components and the articulation points of a given undirected graph and returns the number of - * biconnected components. - *

- * Articulation points are returned in the form of a {@link yfiles.algorithms.INodeMap} that returns for each node a boolean value - * indicating whether or not it is an articulation point. - *

- * @param graph the input graph - * @param compNum the {@link } that will be filled during the execution and returns the zero-based index of the - * biconnected component to which each edge belongs or -1 for self-loops - * @param [aPoint=null] the {@link } that will be filled during the execution and returns a boolean value indicating whether - * or not a given node is an articulation point - * @returns the number of biconnected components - * @see yfiles.algorithms.GraphConnectivity#biconnectedComponents - * @see yfiles.algorithms.GraphConnectivity#biconnectedComponents - * @static - */ - static biconnectedComponents(graph:yfiles.algorithms.Graph,compNum:yfiles.algorithms.IEdgeMap,aPoint?:yfiles.algorithms.INodeMap):number; - /** - * Calculates the biconnected components of a given undirected graph. - *

- * The result is returned as an array of - * {@link yfiles.algorithms.EdgeList}s each containing all edges that belong to the same biconnected component. - *

- * @param graph the input graph - * @returns an array of {@link }s each containing all edges that belong to the same biconnected component - * @see yfiles.algorithms.GraphConnectivity#biconnectedComponents - * @static - */ - static biconnectedComponents(graph:yfiles.algorithms.Graph):yfiles.algorithms.EdgeList[]; - /** - * Calculates the connected components of a given graph and returns their number. - *

- * A graph G is called connected if there exists an undirected path of edges between every pair of nodes. - *

- *

- * The connected components of a graph are the maximal connected subgraphs of which the graph consists. - *

- * @param compNum the {@link } that will be filled during the execution and returns the zero-based index of the - * connected component to which each node belongs - * @param graph - * @returns the number of connected components of the given graph - * @static - */ - static connectedComponents(graph:yfiles.algorithms.Graph,compNum:yfiles.algorithms.INodeMap):number; - /** - * Calculates the connected components of a given graph. - *

- * A graph G is called connected if there exists an undirected path of edges between every pair of nodes. - *

- *

- * The connected components of a graph are the maximal connected subgraphs of which the graph consists. - *

- * @param graph the input graph - * @returns an array of {@link }s each of which contains the nodes that belong to the same connected component - * @static - */ - static connectedComponents(graph:yfiles.algorithms.Graph):yfiles.algorithms.NodeList[]; - /** - * Determines the direct or indirect neighbors of a given set of nodes. - *
    - *
  • A direct neighbor of a node is directly connected by an edge to that node.
  • - *
  • An indirect neighbor of a node is directly connected to another direct or indirect neighbor of a node.
  • - *
- *

- * The order of the returned nodes is determined by a breadth first search. No start node will be part of the resulting - * set. - *

- *

- * To obtain the result, an integer value should be given as input that limits the distance between a start node and a - * returned node. For all returned nodes there must be a path to a start node that has a length equal to or smaller than - * this distance. - *

- *

- * Setting the maximum distance to 1 will only yield the direct neighbors of all start nodes. On the other hand, setting - * the maximum distance to graph.N() or larger will yield all neighbors of all start nodes. - *

- * @param graph - * @param startNodes - * @param maxDistance - * @returns a {@link } that contains all direct and indirect neighbors of a node - * @static - */ - static getNeighbors(graph:yfiles.algorithms.Graph,startNodes:yfiles.algorithms.NodeList,maxDistance:number):yfiles.algorithms.NodeList; - /** - * Determines the direct or indirect predecessors of a given list of nodes. - *
    - *
  • A direct predecessor of a node is the source node of an incoming edge connected to a node.
  • - *
  • An indirect predecessor of a node is a direct predecessor to another predecessor of a node.
  • - *
- *

- * The order of the returned nodes is determined by a breadth first search. No start node will be part of the resulting - * set. - *

- *

- * To obtain the result, an integer value should be given as input that limits the distance between a start node and a - * returned node. For all returned nodes there must be a path to a start node that has a length equal to or smaller than - * this distance. - *

- *

- * Setting the maximum distance to 1 will only yield the direct predecessors of all start nodes. On the other hand, setting - * the maximum distance to graph.N() or larger will yield all predecessors of all start nodes. - *

- * @param graph the given graph - * @param startNodes a {@link } containing the nodes from which the search starts - * @param maxDistance an integer value that limits the distance between a start node and a returned node - * @returns a {@link } that contains all direct and indirect predecessors of a node - * @static - */ - static getPredecessors(graph:yfiles.algorithms.Graph,startNodes:yfiles.algorithms.NodeList,maxDistance:number):yfiles.algorithms.NodeList; - /** - * Determines the direct or indirect successors of a given list of nodes. - *
    - *
  • A direct successor of a node is the target node of an outgoing edge connected to a node.
  • - *
  • An indirect successor of a node is a direct successor to another successor of a node.
  • - *
- *

- * The order of the returned nodes is determined by a breadth first search. No start node will be part of the resulting - * set. - *

- *

- * To obtain the result, an integer value should be given as input that limits the distance between a start node and a - * returned node. For all returned nodes there must be a path to a start node that has a length equal to or smaller than - * this distance. - *

- *

- * Setting the maximum distance to 1 will only yield the direct successors of all start nodes. On the other hand, setting - * the maximum distance to graph.N() or larger will yield all successors of all start nodes. - *

- * @param graph the given graph - * @param startNodes a {@link } containing the nodes from which the search starts - * @param maxDistance an integer value that limits the distance between a start node and a returned node - * @returns a {@link } that contains all direct and indirect successors of a node - * @static - */ - static getSuccessors(graph:yfiles.algorithms.Graph,startNodes:yfiles.algorithms.NodeList,maxDistance:number):yfiles.algorithms.NodeList; - /** - * Checks whether or not the given undirected graph is biconnected. - *

- * A graph is called biconnected if it has no cut vertex or articulation point, i.e., no node whose removal disconnects the graph. - *

- * @param graph the given undirected graph - * @returns true if the graph is biconnected, false otherwise - * @static - */ - static isBiconnected(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether or not the given graph is connected. - *

- * A graph is called connected if there exists an undirected path of edges between every pair of nodes. - *

- * @param graph the given graph - * @returns true if the graph is connected, false otherwise - * @static - */ - static isConnected(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether or not the given directed graph is strongly connected. - *

- * A graph is called strongly connected if there exists a directed path between each pair of nodes. - *

- * @param graph the given directed graph - * @returns true if the graph is strongly connected, false, otherwise - * @static - */ - static isStronglyConnected(graph:yfiles.algorithms.Graph):boolean; - /** - * Makes the given graph biconnected by inserting a minimum number of edges in the graph. - *

- * The given graph is considered to be undirected. - *

- * @param graph the input graph - * @returns an {@link } containing the edges added to the graph - * @static - */ - static makeBiconnected(graph:yfiles.algorithms.Graph):yfiles.algorithms.EdgeList; - /** - * Makes a graph connected by adding additional edges to the graph. - *

- * The number of edges that will be added equals the number of separate components of the original graph minus 1. - *

- * @param graph the input graph - * @returns an {@link } containing the edges added to the graph - * @static - */ - static makeConnected(graph:yfiles.algorithms.Graph):yfiles.algorithms.EdgeList; - /** - * Determines the set of nodes that are reachable from a given node when a set of edges that cannot be traversed is - * specified. - *

- * The result is based on a depth first search. - *

- * @param graph the given graph - * @param start the node from which the search starts - * @param directed true if the edges should be traversed from source to target, false if edges can be traversed in both directions - * @param [forbidden=null] an array that holds for each {@link } a {@link } value indicating whether or not an edge can be traversed; an edge - * e is marked as forbidden if forbidden[e.index()] == true - * @param reached an array that will be filled during the execution and returns for each {@link } a {@link } value based on whether - * the node can be reached during the DFS; if a node v is reachable, then reached[v.index()] = true - * @static - */ - static reachable(graph:yfiles.algorithms.Graph,start:yfiles.algorithms.Node,directed:boolean,reached:boolean[],forbidden?:boolean[]):void; - /** - * Calculates the strongly connected components of a given graph and returns their number. - *

- * A graph is called strongly connected if there exists a directed path between each pair of nodes. - *

- *

- * The strongly connected components of a graph are the strongly connected subgraphs of which it consists. - *

- * @param graph the input graph - * @param compNum the {@link } that will be filled during the execution and returns the zero-based index of the - * connected component to which each node belongs - * @returns the number of strongly connected components of the given graph - * @see yfiles.algorithms.GraphConnectivity#stronglyConnectedComponents - * @static - */ - static stronglyConnectedComponents(graph:yfiles.algorithms.Graph,compNum:yfiles.algorithms.INodeMap):number; - /** - * Calculates the strongly connected components of a given graph. - *

- * A graph is called strongly connected if there exists a directed path between each pair of nodes. - *

- *

- * The strongly connected components of a graph are the strongly connected subgraphs of which it consists. - *

- * @param graph the input graph - * @returns an array of - * {@link }s each of which contains the nodes that belong to the same strongly connected component - * @see yfiles.algorithms.GraphConnectivity#stronglyConnectedComponents - * @static - */ - static stronglyConnectedComponents(graph:yfiles.algorithms.Graph):yfiles.algorithms.NodeList[]; - /** - * Transforms the return values of {@link yfiles.algorithms.GraphConnectivity#biconnectedComponents} to an array of - * {@link yfiles.algorithms.EdgeList}s, like it is returned by {@link yfiles.algorithms.GraphConnectivity#biconnectedComponents}. - * @param graph the input graph - * @param compNum the {@link } that will be filled during the execution and returns the zero-based index of the - * connected component to which each edge belongs - * @param maxCompNum the maximum number of biconnected components - * @returns an array of {@link }s each containing all edges that belong to the same biconnected component - * @static - */ - static toEdgeListArray(graph:yfiles.algorithms.Graph,compNum:yfiles.algorithms.IEdgeMap,maxCompNum:number):yfiles.algorithms.EdgeList[]; - /** - * Transforms the return values of method {@link yfiles.algorithms.GraphConnectivity#connectedComponents} to an array of - * {@link yfiles.algorithms.NodeList}s, like it is returned by {@link yfiles.algorithms.GraphConnectivity#connectedComponents}. - * @param graph the input graph - * @param compNum the {@link } that will be filled during the execution and returns the zero-based index of the - * connected component to which each node belongs - * @param maxCompNum the maximum number of connected components - * @returns an array of {@link }s each of which contains the nodes that belong to the same connected component - * @static - */ - static toNodeListArray(graph:yfiles.algorithms.Graph,compNum:yfiles.algorithms.INodeMap,maxCompNum:number):yfiles.algorithms.NodeList[]; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.GraphConnectivity; - } - /** - * Common base type for both {@link yfiles.algorithms.Node} and {@link yfiles.algorithms.Edge}. - *

- * This type does not add public functionality to its base type. - *

- * @class - */ - export interface GraphObject extends yfiles.lang.Object{} - export class GraphObject { - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.GraphObject; - } - /** - * This class provides the result of hierarchical clustering algorithms by means of a binary tree structure. - *

- * The dendrogram is created using the agglomerative strategy (i.e., a bottom-up approach) based on the following steps: - *

- *
    - *
  • - * At the beginning (i.e., at level - * 0), each node belongs to its own cluster. At this point, each node of the original graph (the one that will be - * clustered) is mapped to one of the dendrogram nodes that represent a leaf node (i.e., a node with no children). - *
  • - *
  • - * At each step, pairs of clusters are merged while moving up to the hierarchy. In this case, a new dendrogram node is - * created and the corresponding dissimilarity value between the two merged clusters can be obtained using - * {@link yfiles.algorithms.Dendrogram#getDissimilarityValue}. The dissimilarity values are monotone increasing starting from zero - * which corresponds to the leaf nodes of the dendrogram. - *
  • - *
  • - * The algorithm continues until all nodes belong to the same cluster. At this point, the root of the dendrogram is reached - * and can be obtained using method {@link yfiles.algorithms.Dendrogram#root}. - *
  • - *
- *

- * The dendrogram is a binary tree that is directed from the root to the leaves. This means that one can iterate the - * dendrogram starting with the {@link yfiles.algorithms.Dendrogram#root root node}, moving on to its {@link yfiles.algorithms.Dendrogram#getChildren children}, then moving on to their children and so on. - *

- *

- * From each node of the dendrogram, it is possible to retrieve the set of nodes of the original graph that belong to this - * dendrogram node using {@link yfiles.algorithms.Dendrogram#getClusterNodes}. This method returns an array of - * {@link yfiles.algorithms.NodeList}s that contain the nodes of all clusters that are merged when this dendrogram node was - * created. For example, say that clusters C1 = {v1, v2} and C2 = {v3, v4} are merged, where {v1, v2, v3, v4} are nodes of - * the original graph. Say that dendrogram node u is created by this merging. Then, the cluster nodes of u will be returned - * as two {@link yfiles.algorithms.NodeList}s where the first contains nodes v1, v2 and the second v3, v4. - *

- * @see yfiles.algorithms.Groups#hierarchicalClustering - * @see yfiles.algorithms.Groups#hierarchicalClustering - * @see yfiles.algorithms.Groups#hierarchicalClustering - * @class - */ - export interface Dendrogram extends yfiles.lang.Object{} - export class Dendrogram { - /** - * Returns a {@link yfiles.algorithms.NodeList} that contains the child nodes of the given parent node. - *

- * If the given node is a {@link yfiles.algorithms.Dendrogram#isLeaf leaf} node, the returned list will be empty. - *

- * @param parent the parent node for which to retrieve the child nodes - * @returns the list of child nodes of the given parent node - */ - getChildren(parent:yfiles.algorithms.Node):yfiles.algorithms.NodeList; - /** - * Returns an array of - * {@link yfiles.algorithms.NodeList}s that contain the nodes of the original graph that are associated with the given dendrogram - * node. - *

- * Each such {@link yfiles.algorithms.NodeList} represents nodes that belong to the same cluster. For example, say that clusters C1 = {v1, v2} - * and C2 = {v3, v4} are merged, where {v1, v2, v3, v4} are nodes of the original graph. Say that dendrogram node u is - * created by this merging. Then, the cluster nodes of u will be returned as two {@link yfiles.algorithms.NodeList}s where the - * first contains nodes v1, v2 and the second v3, v4. - *

- * @param node the given dendrogram node - * @returns an array of - * {@link }s that contain the nodes of the original graph that are associated with the given dendrogram - * node - */ - getClusterNodes(node:yfiles.algorithms.Node):yfiles.algorithms.NodeList[]; - /** - * Returns the dissimilarity value associated with the given node of the dendrogram. - * @param node the given dendrogram node - * @returns the dissimilarity value associated with the given dendrogram node - */ - getDissimilarityValue(node:yfiles.algorithms.Node):number; - /** - * Returns the level of the given node of the dendrogram. - * @param node the given dendrogram node - * @returns the level of the given dendrogram node - */ - getLevel(node:yfiles.algorithms.Node):number; - /** - * Returns the node of the dendrogram that belongs to the given level index. - *

- * If the given level index is greater than the {@link yfiles.algorithms.Dendrogram#levelCount number of levels}, then this method will return null. - *

- * @param level the given level index - * @returns the node of the dendrogram that belongs to the given level index or null if there exists no level with the given index. - * @throws {Stubs.Exceptions.ArgumentError} if the given level is negative or greater than the {@link yfiles.algorithms.Dendrogram#nodeCount node count} minus one. - */ - getNodeAtLevel(level:number):yfiles.algorithms.Node; - /** - * Returns the node of original graph that is mapped with the given leaf node of the dendrogram. - * @param node the given leaf node - * @returns the node of original graph that is mapped with the given leaf node or null if the given node is an inner dendrogram - * node - */ - getOriginalNode(node:yfiles.algorithms.Node):yfiles.algorithms.Node; - /** - * Returns whether or not the given dendrogram node is a leaf node. - *

- * A leaf node has no further children and represents a node of the original graph. The original node can be retrieved via - * {@link yfiles.algorithms.Dendrogram#getOriginalNode}. - *

- * @param node a dendrogram node - * @returns true if the given node is a leaf node, false otherwise - */ - isLeaf(node:yfiles.algorithms.Node):boolean; - /** - * Gets the root node of the dendrogram. - *

- * A dendrogram traversal can be implemented by starting from this node, then moving on to its children using method - * {@link yfiles.algorithms.Dendrogram#getChildren}, and so on. - *

- * @type {yfiles.algorithms.Node} - */ - root:yfiles.algorithms.Node; - /** - * Gets the number of nodes in this dendrogram. - * @type {number} - */ - nodeCount:number; - /** - * Gets the number of levels this dendrogram has. - * @type {number} - */ - levelCount:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Dendrogram; - } - /** - * An interface that determines the distance between two nodes of a graph. - *

- * It is used by the hierarchical clustering algorithm in order to determine the distance between any two nodes of a - * graph. - *

- * @see yfiles.algorithms.Groups#hierarchicalClustering - * @see yfiles.algorithms.Groups#hierarchicalClustering - * @see yfiles.algorithms.Groups#hierarchicalClustering - * @interface - */ - export interface INodeDistanceProvider extends yfiles.lang.Object{ - /** - * Returns the distance between two given nodes of a graph. - *

- * Implementations of this method have to guarantee that the returned value is greater or equal to zero. Furthermore, the - * distances between two nodes have to be symmetric, i.e., the distance between node n1 and n2 is equal to the distance - * between node n2 and n1. - *

- * @param n1 the first node - * @param n2 the second node - * @returns the distance between the two given nodes - * @abstract - */ - getDistance(n1:yfiles.algorithms.Node,n2:yfiles.algorithms.Node):number; - } - var INodeDistanceProvider:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.algorithms.INodeDistanceProvider; - }; - /** - * This class provides methods for automatically partitioning nodes of a graph into groups. - *

- * Partitions can be defined using edge betweenness centrality, biconnectivity, k-means clustering or hierarchical - * clustering. - *

- *

- * Definitions - *

- *
    - *
  • Betweenness centrality is a measure for how often a node lies on a shortest path between each pair of nodes in the graph.
  • - *
  • Biconnected graph is a graph that has no cut vertex or articulation point (i.e., a node whose removal disconnects the graph).
  • - *
  • K-means clustering algorithm partitions the nodes of a graph into k-clusters based on their positions on the plane and a given distance metric.
  • - *
  • Hierarchical clustering creates a hierarchy of clusters in a bottom-to-top approach based on some distance metric and linkage.
  • - *
- * @class - * @static - */ - export interface Groups extends yfiles.lang.Object{} - export class Groups { - /** - * This method partitions the graph by analyzing its biconnected components. - *

- * Nodes will be grouped such that the nodes within each group are biconnected. Nodes that belong to multiple biconnected - * components will be assigned to exactly one of these components. - *

- * @param graph the input graph - * @param groupIDs the {@link } that will be filled during the execution and returns an integer value (cluster ID) for - * each node - * @returns the resulting number of different groups - * @static - */ - static biconnectedComponentGrouping(graph:yfiles.algorithms.Graph,groupIDs:yfiles.algorithms.INodeMap):number; - /** - * Partitions the graph into groups using edge betweenness clustering proposed by Girvan and Newman. - *

- * In each iteration the edge with the highest betweenness centrality is removed from the graph. The method stops, if there - * are no more edges to remove or if the requested maximum number of groups is found. The clustering with the best quality - * reached during the process is returned. - *

- *

- * The algorithm includes several heuristic speed-up techniques available through the quality/time ratio. For the highest - * quality setting, it is used almost unmodified. The fast betweenness approximation of Brandes and Pich (Centrality Estimation in Large Networks) is employed for - * values around 0.5. Typically, this results in a tiny decrease in quality but a large speed-up and is the recommended - * setting. To achieve the lowest running time, a local betweenness calculation is used (Gregory: Local Betweenness for Finding Communities in Networks). - *

- *

- * The method requires the maximum number of groups that will be returned. The smaller this value is, the faster the - * overall computation time. The upper bound on the number of groups is - * graph.N(). Also, the number of returned groups is never smaller than the number of connected components of the graph. - *

- * @param graph the input graph - * @param clusterIDs the {@link } that will be filled during the execution and returns an integer value (cluster ID) for - * each node - * @param qualityTimeRatio a value between 0.0 (low quality, fast) and 1.0 (high quality, slow); the recommended value is 0.5 - * @param minGroupCount the minimum number of groups that will be returned - * @param maxGroupCount the maximum number of groups that will be returned - * @param refine true if the algorithm refines the current grouping, false if the algorithm discards the current grouping - * @returns the resulting number of different groups - * @throws {Stubs.Exceptions.ArgumentError} if minGroupCount > maxGroupCount or minGroupCount > graph.N() or maxGroupCount <= 0 - * @static - */ - static edgeBetweennessClustering(graph:yfiles.algorithms.Graph,clusterIDs:yfiles.algorithms.INodeMap,qualityTimeRatio:number,minGroupCount:number,maxGroupCount:number,refine:boolean):number; - /** - * Partitions the graph into groups using edge betweenness centrality. - *

- * In each iteration the edge with the highest betweenness centrality is removed from the graph. The method stops, if there - * are no more edges to remove. The clustering with the best quality reached during the process will be returned. - *

- *

- * The method requires the maximum number of groups that will be returned. The smaller this value is, the faster the - * overall computation time. The upper bound on the number of groups is - * graph.N(). Also, the number of returned groups is never smaller than the number of connected components of the graph. - *

- * @param graph the input graph - * @param clusterIDs the {@link } that will be filled during the execution and returns an integer value (cluster ID) for - * each node - * @param directed true if the graph should be considered as directed, false otherwise - * @param minGroupCount the minimum number of groups that will be returned - * @param maxGroupCount the maximum number of groups that will be returned - * @param edgeCosts the {@link } that holds a positive {@link } cost or null if the edges of the graph are considered to be - * of equal cost - * @returns the resulting number of different groups - * @throws {Stubs.Exceptions.ArgumentError} if minGroupCount > maxGroupCount or minGroupCount > graph.N() or maxGroupCount <= 0 - * @static - */ - static edgeBetweennessClustering(graph:yfiles.algorithms.Graph,clusterIDs:yfiles.algorithms.INodeMap,directed:boolean,minGroupCount:number,maxGroupCount:number,edgeCosts:yfiles.algorithms.IDataProvider):number; - /** - * Partitions the graph into clusters based on hierarchical clustering, while the dendrogram is cut based on a given - * maximum number of clusters. - *

- * The clustering is performed using the agglomerative strategy i.e., a bottom-up approach according to which at the - * beginning each node belongs to its own cluster. At each step pairs of clusters are merged while moving up to the - * hierarchy. The dissimilarity between clusters is determined based on the given linkage and the given node distances. The - * algorithm continues until all nodes belong to the same cluster. - *

- *

- * The result will be given based on the given maximum number of clusters value that is used for cutting the hierarchical - * tree at a point such that the number of remaining clusters equals to this value. - *

- *

- * The maximum number of clusters needs to be greater than zero and less than the number of the nodes of the graph. - *

- * @param graph the input graph - * @param maxCluster the maximum number of clusters that determines where to cut the hierarchic tree into clusters - * @param clusterIDs the {@link } that will be filled during the execution and returns an integer value (cluster ID) for - * each node - * @param distances a given {@link } object that determines the distance between any two graph nodes - * @param linkage one of the predefined linkage values - * @returns the resulting number of clusters - * @throws {Stubs.Exceptions.ArgumentError} if an unknown linkage is given or if the maximum number of clusters is less than or equal to zero or greater than the - * number of nodes of the graph - * @static - */ - static hierarchicalClustering(graph:yfiles.algorithms.Graph,maxCluster:number,clusterIDs:yfiles.algorithms.INodeMap,distances:yfiles.algorithms.INodeDistanceProvider,linkage:yfiles.algorithms.Linkage):number; - /** - * Partitions the graph into clusters based on hierarchical clustering, while the dendrogram is cut based on a given - * cut-off value. - *

- * The clustering is performed using the agglomerative strategy i.e., a bottom-up approach according to which at the - * beginning each node belongs to its own cluster. At each step pairs of clusters are merged while moving up to the - * hierarchy. The dissimilarity between clusters is determined based on the given linkage and the given node distances. The - * algorithm continues until all nodes belong to the same cluster. - *

- *

- * The result will be given based on the given cut-off value that is used for cutting the hierarchical tree at a point such - * that the dissimilarity values of the nodes that remain at the dendrogram are less than this value. - *

- * @param graph the input graph - * @param clusterIDs the {@link } that will be filled during the execution and returns an integer value (cluster ID) for - * each node - * @param distances a given {@link } object that determines the distance between any two nodes - * @param linkage one of the predefined linkage values - * @param cutOff the cut-off value that determines where to cut the hierarchic tree into clusters - * @returns the resulting number of clusters - * @throws {Stubs.Exceptions.ArgumentError} if an unknown linkage is used - * @static - */ - static hierarchicalClustering(graph:yfiles.algorithms.Graph,clusterIDs:yfiles.algorithms.INodeMap,distances:yfiles.algorithms.INodeDistanceProvider,linkage:yfiles.algorithms.Linkage,cutOff:number):number; - /** - * Partitions the graph into clusters based on hierarchical clustering. - *

- * The clustering is performed using the agglomerative strategy i.e., a bottom-up approach according to which at the - * beginning each node belongs to its own cluster. At each step pairs of clusters are merged while moving up to the - * hierarchy. The dissimilarity between clusters is determined based on the given linkage and the given node distances - * metric. The algorithm continues until all nodes belong to the same cluster. - *

- *

- * The result is returned as a {@link yfiles.algorithms.Dendrogram} object which represents the result of the clustering algorithm - * as a binary tree structure. It can easily be traversed by starting from the {@link yfiles.algorithms.Dendrogram#root root node} and moving on to nodes of the next - * level via method {@link yfiles.algorithms.Dendrogram#getChildren}. - *

- * @param graph the input graph - * @param distances a given {@link } object that determines the distance between any two nodes - * @param linkage one of the predefined linkage values - * @returns a {@link } which represents the result of the clustering as a binary tree - * @throws {Stubs.Exceptions.ArgumentError} if an unknown linkage is given - * @static - */ - static hierarchicalClustering(graph:yfiles.algorithms.Graph,distances:yfiles.algorithms.INodeDistanceProvider,linkage:yfiles.algorithms.Linkage):yfiles.algorithms.Dendrogram; - /** - * Partitions the graph into clusters using k-means clustering algorithm. - *

- * The nodes of the graph will be partitioned in k clusters based on their positions such that their distance from the - * cluster's mean (centroid) is minimized. - *

- *

- * The distance can be defined using diverse metrics as euclidean distance, euclidean-squared distance, manhattan distance - * or chebychev distance. - *

- * @param graph the input graph - * @param clusterIDs the {@link } that will be filled during the execution and returns an integer value (cluster ID) for - * each node - * @param nodePositions the {@link } that holds a {@link point} representing the current position of each node in the graph - * @param distanceMetric one of the predefined distance metrics - * @param k the number of clusters - * @param [iterations=100] the maximum number of iterations performed by the algorithm for convergence - * @param [centroids=null] the initial centroids - * @returns the number of resulting (non-empty) clusters - * @throws {Stubs.Exceptions.ArgumentError} if the given distance metric is not supported - * @static - */ - static kMeansClustering(graph:yfiles.algorithms.Graph,clusterIDs:yfiles.algorithms.INodeMap,nodePositions:yfiles.algorithms.IDataProvider,distanceMetric:yfiles.algorithms.DistanceMetric,k:number,iterations?:number,centroids?:yfiles.algorithms.YPoint[]):number; - /** - * Partitions the graph into clusters using k-means clustering algorithm. - *

- * The nodes of the graph will be partitioned in k clusters based on their positions such that their distance from the - * cluster's mean (centroid) is minimized. - *

- *

- * The distance can be defined using diverse metrics as euclidean distance, euclidean-squared distance, manhattan distance - * or chebychev distance. - *

- * @param {Object} options The parameters to pass. - * @param options.graph the input graph - * @param options.clusterIDs the {@link } that will be filled during the execution and returns an integer value (cluster ID) for - * each node - * @param options.nodePositions the {@link } that holds a {@link point} representing the current position of each node in the graph - * @param options.distanceMetric one of the predefined distance metrics - * @param options.k the number of clusters - * @param [options.iterations=100] the maximum number of iterations performed by the algorithm for convergence - * @param [options.centroids=null] the initial centroids - * @returns the number of resulting (non-empty) clusters - * @throws {Stubs.Exceptions.ArgumentError} if the given distance metric is not supported - * @static - */ - static kMeansClustering(options:{graph:yfiles.algorithms.Graph,clusterIDs:yfiles.algorithms.INodeMap,nodePositions:yfiles.algorithms.IDataProvider,distanceMetric:yfiles.algorithms.DistanceMetric,k:number,iterations?:number,centroids?:yfiles.algorithms.YPoint[]}):number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Groups; - } - /** - * A general interface for iterating over a collection of objects. - *

- * It can be regarded as a read-only view of such a collection. - *

- *

- * A YCursor acts like a movable pointer on the elements of a collection. The pointer can be moved forward and backward and - * the element currently pointed on can be accessed. The removal of elements can only be performed on the provider of the - * cursor, not on the cursor itself. (That's why the cursor presents a read-only view.) - *

- *

- * Implementations of this interface do not need to support operations marked "optional." - *

- * @interface - */ - export interface ICursor extends yfiles.lang.Object{ - /** - * Moves this cursor one position forward. - * @abstract - */ - next():void; - /** - * Moves this cursor one position backward (optional). - * @abstract - */ - prev():void; - /** - * Moves this cursor to the first valid cursor position (optional). - * @abstract - */ - toFirst():void; - /** - * Moves this cursor to the last valid cursor position (optional). - * @abstract - */ - toLast():void; - /** - * Gets true if the current cursor position is valid. - * @abstract - * @type {boolean} - */ - ok:boolean; - /** - * Gets the object currently pointed on. - * @abstract - * @type {any} - */ - current:any; - /** - * Gets the number of elements that can be accessed with this cursor. - * @abstract - * @type {number} - */ - size:number; - } - var ICursor:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.algorithms.ICursor; - }; - /** - * A general interface for setting data. - *

- * A data acceptor associates data with data holders. It constitutes a write-only view on particular data. - *

- * @interface - */ - export interface IDataAcceptor extends yfiles.lang.Object{ - /** - * Sets an object value associated with the given data holder. - *

- * This method may throw an UnsupportedOperationException. - *

- * @param dataHolder - * @param value - * @abstract - */ - set(dataHolder:any,value:any):void; - /** - * Sets a boolean value associated with the given data holder. - *

- * This method may throw an UnsupportedOperationException. - *

- * @param dataHolder - * @param value - * @abstract - */ - setBoolean(dataHolder:any,value:boolean):void; - /** - * Sets an integer value associated with the given data holder. - *

- * This method may throw an UnsupportedOperationException. - *

- * @param dataHolder - * @param value - * @abstract - */ - setInt(dataHolder:any,value:number):void; - /** - * Sets a double value associated with the given data holder. - *

- * This method may throw an UnsupportedOperationException. - *

- * @param dataHolder - * @param value - * @abstract - */ - setNumber(dataHolder:any,value:number):void; - } - var IDataAcceptor:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.algorithms.IDataAcceptor; - }; - /** - * Interface that combines the {@link yfiles.algorithms.IDataProvider} and {@link yfiles.algorithms.IDataAcceptor} interfaces. - *

- * This interface does not declare any additional methods. - *

- * @interface - * @implements {yfiles.algorithms.IDataProvider} - * @implements {yfiles.algorithms.IDataAcceptor} - */ - export interface IDataMap extends yfiles.lang.Object,yfiles.algorithms.IDataProvider,yfiles.algorithms.IDataAcceptor{ - } - var IDataMap:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.algorithms.IDataMap; - }; - /** - * A general interface for data provision. - *

- * A data provider grants access to data associated with one or more data holders. It constitutes a read-only view on - * particular data. - *

- * @interface - */ - export interface IDataProvider extends yfiles.lang.Object{ - /** - * Returns an object value associated with the given data holder. - *

- * This method may throw an UnsupportedOperationException. - *

- * @param dataHolder - * @returns - * @abstract - */ - get(dataHolder:any):any; - /** - * Returns a boolean value associated with the given data holder. - *

- * This method may throw an UnsupportedOperationException. - *

- * @param dataHolder - * @returns - * @abstract - */ - getBoolean(dataHolder:any):boolean; - /** - * Returns an integer value associated with the given data holder. - *

- * This method may throw an UnsupportedOperationException. - *

- * @param dataHolder - * @returns - * @abstract - */ - getInt(dataHolder:any):number; - /** - * Returns a double value associated with the given data holder. - *

- * This method may throw an UnsupportedOperationException. - *

- * @param dataHolder - * @returns - * @abstract - */ - getNumber(dataHolder:any):number; - } - var IDataProvider:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.algorithms.IDataProvider; - }; - /** - * A cursor interface for iterating over edges. - * @interface - * @implements {yfiles.algorithms.ICursor} - */ - export interface IEdgeCursor extends yfiles.lang.Object,yfiles.algorithms.ICursor{ - /** - * Moves the cursor to the cyclic next element of the underlying sequence. - *

- * This is the next element if available, else it is the first element. - *

- * @abstract - */ - cyclicNext():void; - /** - * Moves the cursor to the cyclic previous element of the underlying sequence. - *

- * This is the previous element if available, else it is the last element. - *

- * @abstract - */ - cyclicPrev():void; - /** - * Gets the edge at the current location of the cursor. - *

- * This method is the typed variant of {@link yfiles.algorithms.ICursor#current}. - *

- * @abstract - * @type {yfiles.algorithms.Edge} - */ - edge:yfiles.algorithms.Edge; - } - var IEdgeCursor:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.algorithms.IEdgeCursor; - }; - /** - * Provides access to data associated with an edge. - *

- * An edge map can be considered as a map that allows only edges as keys. Edge keys of an edge map must belong to the same - * graph. - *

- *

- * There are data access methods defined for the most common typed values as well. - *

- *

- * The edge values are initialized with Java(TM) default values (null, 0, 0.0, false) upon initialization. - *

- * @interface - * @implements {yfiles.algorithms.IDataProvider} - * @implements {yfiles.algorithms.IDataAcceptor} - * @implements {yfiles.algorithms.IDataMap} - */ - export interface IEdgeMap extends yfiles.lang.Object,yfiles.algorithms.IDataProvider,yfiles.algorithms.IDataAcceptor,yfiles.algorithms.IDataMap{ - } - var IEdgeMap:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.algorithms.IEdgeMap; - }; - /** - * A cursor interface for iterating over nodes. - * @interface - * @implements {yfiles.algorithms.ICursor} - */ - export interface INodeCursor extends yfiles.lang.Object,yfiles.algorithms.ICursor{ - /** - * Moves the cursor to the cyclic next element of the underlying sequence. - *

- * This is the next element if available, else it is the first element. - *

- * @abstract - */ - cyclicNext():void; - /** - * Moves the cursor to the cyclic previous element of the underlying sequence. - *

- * This is the previous element if available, else it is the last element. - *

- * @abstract - */ - cyclicPrev():void; - /** - * Gets the node at the current location of the cursor. - *

- * This method is the typed variant of {@link yfiles.algorithms.ICursor#current}. - *

- * @abstract - * @type {yfiles.algorithms.Node} - */ - node:yfiles.algorithms.Node; - } - var INodeCursor:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.algorithms.INodeCursor; - }; - /** - * Provides access to data associated with a node. - *

- * A node map can be considered as a map that allows only nodes as keys. Node keys of a node map must belong to the same - * graph. - *

- *

- * There are data access methods defined for the most common typed values as well. - *

- *

- * The node values are initialized with Java(TM) default values (null, 0, 0.0, false) upon initialization. - *

- * @interface - * @implements {yfiles.algorithms.IDataProvider} - * @implements {yfiles.algorithms.IDataAcceptor} - * @implements {yfiles.algorithms.IDataMap} - */ - export interface INodeMap extends yfiles.lang.Object,yfiles.algorithms.IDataProvider,yfiles.algorithms.IDataAcceptor,yfiles.algorithms.IDataMap{ - } - var INodeMap:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.algorithms.INodeMap; - }; - /** - * This is a generic interface for classes that provide an ordering for the nodes of a graph. - * @interface - */ - export interface INodeSequencer extends yfiles.lang.Object{ - /** - * Returns a cursor that grants access to all nodes of the given graph in some order. - * @param graph the input graph - * @returns a {@link } that grants access to all nodes of a graph - * @abstract - */ - nodes(graph:yfiles.algorithms.Graph):yfiles.algorithms.INodeCursor; - } - var INodeSequencer:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.algorithms.INodeSequencer; - }; - /** - * This class provides methods for calculating independent sets. - *

- * An independent set is a set of nodes in a graph, in which no two nodes are adjacent. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":0, "c":0},"styles":{"6":{"s":[35,35],"c":1, "f":"#FF0000", "b":0}},"n":[[425,305,6],[645,305],[425,525],[645,525,6],[485,365],[585,365,6],[485,465,6],[585,465]],"e":[[0,4],[0,1],[1,3],[3,2],[2,0],[4,6],[6,2],[6,7],[7,5],[5,4],[5,1],[7,3]],"vp":[425.0,305.0,250.0,250.0]}} Circular nodes represent one of the independent sets of the given graph - *

- * @class - * @static - */ - export interface IndependentSets extends yfiles.lang.Object{} - export class IndependentSets { - /** - * Calculates an independent set for a given graph. - *

- * A greedy heuristic is applied which tries to find a large independent set. - *

- * @param conflictGraph the input graph - * @returns a {@link } containing an independent set of nodes - * @see yfiles.algorithms.IndependentSets#getIndependentSet - * @static - */ - static getIndependentSet(conflictGraph:yfiles.algorithms.Graph):yfiles.algorithms.NodeList; - /** - * Partitions the set of nodes of the given graph into independent sets. - *

- * The method iteratively calls method {@link yfiles.algorithms.IndependentSets#getIndependentSet}. - *

- * @param conflictGraph the input graph - * @returns an array of {@link }s each of which contains an independent set of nodes - * @see yfiles.algorithms.IndependentSets#getIndependentSet - * @static - */ - static getIndependentSets(conflictGraph:yfiles.algorithms.Graph):yfiles.algorithms.NodeList[]; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.IndependentSets; - } - /** - * Represents a so-called "cell" or "link" of the doubly linked list implementation {@link yfiles.algorithms.YList}. - *

- * It may be used to perform fast access and remove operations on that type of list. - *

- * @class - * @final - */ - export interface ListCell extends yfiles.lang.Object{} - export class ListCell { - /** - * Returns the predecessor cell of this cell. - *

- * If there is no predecessor, then null is returned. - *

- * @returns - */ - pred():yfiles.algorithms.ListCell; - /** - * Returns the successor cell of this cell. - *

- * If there is no successor, then null is returned. - *

- * @returns - */ - succ():yfiles.algorithms.ListCell; - /** - * Gets or sets the element stored in this cell. - * @type {any} - */ - info:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.ListCell; - } - /** - * This class provides sophisticated algorithms for solving classical network flow problems. - *

- * Definitions - *

- *
    - *
  • - * Maximum flow problem: – Given a directed graph in which each edge has a capacity and given a source node s and a sink node t, find a flow of - * maximum value from s to t. - *
  • - *
  • - * Minimum cut problem: – Given a directed graph in which each edge has a capacity and given a source node s and a sink node t, find an s-t cut of - * minimum capacity (i.e., a set of edges of minimum capacity whose removal would disconnect t from s). - *
  • - *
  • - * Minimum cost flow problem: – Given a directed graph in which each edge has a cost and a capacity and each node has a supply or demand, find a flow of - * minimum total cost that satisfies the edge capacities and the node balances. - *
  • - *
  • - * Minimum cost maximum flow problem: – Given a directed graph in which each edge has a cost and a capacity and given a source node s and a sink node t, find a - * flow of maximum value from s to t that has the minimum total cost. - *
  • - *
- * @class - * @static - */ - export interface NetworkFlows extends yfiles.lang.Object{} - export class NetworkFlows { - /** - * Solves a maximum flow problem using the preflow-push method. - *

- * The implementation is based on - *

- *
    - *
  • Mehlhorn, Naeher: LEDA: a platform for combinatorial and geometric computing, Cambridge University Press, 2000, pp. 443-488.
  • - *
- *

- * The worst case running time is O(mdeg * n^2 * m^(1/2)), where n is the number of nodes in the network, m the number of - * edges and mdeg the maximal degree of any node. - *

- *

- * Edges may have infinite capacity, which is denoted by the value 0x7FFFFFFF. - *

- * @param graph the given network - * @param source the source node of the network - * @param sink the sink node of the network - * @param eCapDP the {@link } that returns the integer capacity of each edge or null if no bound is specified - * @param flowEM the {@link } that will be filled during the execution with an integer flow for each edge - * @returns the maximum flow value - * @see yfiles.algorithms.NetworkFlows#calcMaxFlowMinCut - * @static - */ - static calcMaxFlow(graph:yfiles.algorithms.Graph,source:yfiles.algorithms.Node,sink:yfiles.algorithms.Node,eCapDP:yfiles.algorithms.IDataProvider,flowEM:yfiles.algorithms.IEdgeMap):number; - /** - * Solves a maximum flow problem using the preflow-push method but additionally marks all nodes that belong to the minimum - * cut set that is associated with the source of the network. - * @param graph the given network - * @param source the source node of the network - * @param sink the sink node of the network - * @param eCapDP the {@link } that returns the integer capacity of each edge or null if no bound is specified - * @param flowEM the {@link } that will be filled during the execution with an integer flow for each edge - * @param sourceCutNM the {@link } that will be filled during the execution and returns a boolean value indicating whether - * or not a node belongs to the cut set associated with the source of the network - * @returns the maximum flow value - * @see yfiles.algorithms.NetworkFlows#calcMaxFlow - * @static - */ - static calcMaxFlowMinCut(graph:yfiles.algorithms.Graph,source:yfiles.algorithms.Node,sink:yfiles.algorithms.Node,eCapDP:yfiles.algorithms.IDataProvider,flowEM:yfiles.algorithms.IEdgeMap,sourceCutNM:yfiles.algorithms.INodeMap):number; - /** - * Solves a minimum cost maximum flow problem. - * @param graph the given network - * @param s the source node of the network - * @param t the sink node of the network - * @param uCapDP the {@link } that returns the integer capacity of each edge or null if no bound is specified - * @param cost0DP the {@link } that returns a double value (cost) for each edge - * @param flowEM the {@link } that will be filled during the execution with an integer flow for each edge - * @param dualsNM the {@link } that will be filled during the execution with an integer value (dual value) for each node - * or null if no such values occur; dual values are also referred as potentials - * @returns the total cost of the flow - * @see yfiles.algorithms.NetworkFlows#minCostFlow - * @see yfiles.algorithms.NetworkFlows#minCostFlow - * @static - */ - static minCostFlow(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,t:yfiles.algorithms.Node,uCapDP:yfiles.algorithms.IDataProvider,cost0DP:yfiles.algorithms.IDataProvider,flowEM:yfiles.algorithms.IEdgeMap,dualsNM:yfiles.algorithms.INodeMap):number; - /** - * Solves a minimum cost flow problem with a capacity scaling algorithm. - *

- * This algorithm is a variant of the successive shortest path algorithm (see Ahuja,Magnanti,Orlin: Network flows, Prentice Hall, 1993, - * pp.320-324). It has the pseudo-polynomial running time O(m*log U*(m+n log n)) where n is the number of nodes in the - * network, m the number of edges and U the maximal edge capacity. - *

- *

- * Edges may have infinite capacity, which is denoted by the value 0x7FFFFFFF. - *

- *

- * There are no restriction for the costs. In particular, they can also be negative. - *

- * @param graph the given network - * @param lCapDP the {@link } that returns the integer lower bound for the capacity of each edge or null if no - * bound is specified - * @param uCapDP the {@link } that returns the integer upper bound for the capacity of each edge or null if no - * bound is specified - * @param cost0DP the {@link } that returns a double value (cost) of each edge - * @param supplyDP the {@link } that returns the supply/demand of each node; supply is denoted by a positive value, - * demand by a negative value - * @param flowEM the {@link } that will be filled during the execution with an integer flow for each edge - * @param dualsNM the {@link } that will be filled during the execution with an integer value (dual value) for each node - * or null if no such values occur; dual values are also referred as potentials - * @returns the total cost of the flow - * @see yfiles.algorithms.NetworkFlows#minCostFlow - * @see yfiles.algorithms.NetworkFlows#minCostFlow - * @static - */ - static minCostFlow(graph:yfiles.algorithms.Graph,lCapDP:yfiles.algorithms.IDataProvider,uCapDP:yfiles.algorithms.IDataProvider,cost0DP:yfiles.algorithms.IDataProvider,supplyDP:yfiles.algorithms.IDataProvider,flowEM:yfiles.algorithms.IEdgeMap,dualsNM:yfiles.algorithms.INodeMap):number; - /** - * Uses method {@link yfiles.algorithms.NetworkFlows#minCostFlow} to solve a minimum cost flow problem. - * @param graph the given network - * @param uCapDP the {@link } that returns the integer capacity of each edge or null if no bound is specified - * @param cost0DP the {@link } that returns a double value (cost) for each edge - * @param supplyDP the {@link } that returns the supply/demand of each node; supply is denoted by a positive value, - * demand by a negative value - * @param flowEM the {@link } that will be filled during the execution with an integer flow for each edge - * @param dualsNM the {@link } that will be filled during the execution with an integer value (dual value) for each node - * or null if no such values occur; dual values are also referred as potentials - * @returns the total cost of the flow - * @see yfiles.algorithms.NetworkFlows#minCostFlow - * @see yfiles.algorithms.NetworkFlows#minCostFlow - * @static - */ - static minCostFlow(graph:yfiles.algorithms.Graph,uCapDP:yfiles.algorithms.IDataProvider,cost0DP:yfiles.algorithms.IDataProvider,supplyDP:yfiles.algorithms.IDataProvider,flowEM:yfiles.algorithms.IEdgeMap,dualsNM:yfiles.algorithms.INodeMap):number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.NetworkFlows; - } - /** - * Represents a so-called node in the directed graph data type {@link yfiles.algorithms.Graph}. - *

- * Most notably, a node provides access to its adjacent edges (represented by instances of class - * {@link yfiles.algorithms.Edge}). These can be distinguished into the sets of incoming and outgoing edges. - *

- *

- * Iteration over all three sets of edges is provided by means of bidirectional cursors that present a read-only view of - * the respective set ({@link yfiles.algorithms.Node#getEdgeCursor}, {@link yfiles.algorithms.Node#getInEdgeCursor}, - * {@link yfiles.algorithms.Node#getOutEdgeCursor}). Also supported is iteration over all nodes at opposite ends of either incoming - * edges or outgoing edges ({@link yfiles.algorithms.Node#getPredecessorCursor}, {@link yfiles.algorithms.Node#getSuccessorCursor}). - *

- *

- * The number of overall edges at a node is called its degree ({@link yfiles.algorithms.Node#degree}), which is the sum of incoming and outgoing edges ({@link yfiles.algorithms.Node#inDegree}, {@link yfiles.algorithms.Node#outDegree}). - *

- *

- * Important: Class Graph is the single authority for any structural changes to the graph data type. Specifically, this means that - * there is no way to create or delete a node or an edge without using an actual Graph instance. - *

- * @class - * @extends {yfiles.algorithms.GraphObject} - */ - export interface Node extends yfiles.algorithms.GraphObject{} - export class Node { - /** - * Instantiates a new Node object that will be part of the given graph. - * @param g The graph that the created node will belong to. - */ - constructor(g:yfiles.algorithms.Graph); - /** - * Creates a copy of this node that will be inserted into the given graph. - * @param g The graph that the created node will belong to. - * @returns The newly created Node object. - */ - createCopy(g:yfiles.algorithms.Graph):yfiles.algorithms.Node; - /** - * Returns an edge that connects this node with the given node, if such an edge exists. - *

- * Otherwise null is returned. - *

- *

- * Note that the first matching edge is returned, and that outgoing edges are tested prior to incoming edges. - *

- * @param opposite - * @returns - * @see yfiles.algorithms.Node#getEdgeFrom - * @see yfiles.algorithms.Node#getEdgeTo - */ - getEdge(opposite:yfiles.algorithms.Node):yfiles.algorithms.Edge; - /** - * Returns an edge cursor for all incoming and outgoing edges at this node. - * @returns - * @see yfiles.algorithms.Node#getInEdgeCursor - * @see yfiles.algorithms.Node#getOutEdgeCursor - */ - getEdgeCursor():yfiles.algorithms.IEdgeCursor; - /** - * Returns an incoming edge that connects the given node with this node, if such an edge exists. - *

- * Otherwise null is returned. - *

- * @param source - * @returns - * @see yfiles.algorithms.Node#getEdge - * @see yfiles.algorithms.Node#getEdgeTo - */ - getEdgeFrom(source:yfiles.algorithms.Node):yfiles.algorithms.Edge; - /** - * Returns an outgoing edge that connects this node with the given node, if such an edge exists. - *

- * Otherwise null is returned. - *

- * @param target - * @returns - * @see yfiles.algorithms.Node#getEdge - * @see yfiles.algorithms.Node#getEdgeFrom - */ - getEdgeTo(target:yfiles.algorithms.Node):yfiles.algorithms.Edge; - /** - * Returns an edge cursor for incoming edges at this node. - *

- * If an edge is specified, the cursor starts at the given edge, and the cyclic sequence order is the same as returned by - * {@link yfiles.algorithms.Node#getInEdgeCursor}. - *

- * @param [startEdge=null] The first edge being accessed by the returned cursor. - * @returns - * @see yfiles.algorithms.Node#getOutEdgeCursor - */ - getInEdgeCursor(startEdge?:yfiles.algorithms.Edge):yfiles.algorithms.IEdgeCursor; - /** - * Returns a node cursor for all neighbor nodes of this node. - *

- * Neighbor nodes are those at the opposite ends of both incoming and outgoing edges. - *

- * @returns - * @see yfiles.algorithms.Node#getPredecessorCursor - * @see yfiles.algorithms.Node#getSuccessorCursor - */ - getNeighborCursor():yfiles.algorithms.INodeCursor; - /** - * Returns an edge cursor for outgoing edges at this node. - *

- * If an edge is specified, the cursor starts at the given edge, and the cyclic sequence order is the same as returned by - * {@link yfiles.algorithms.Node#getOutEdgeCursor}. - *

- * @param [startEdge=null] The first edge being accessed by the returned cursor. - * @returns - * @see yfiles.algorithms.Node#getInEdgeCursor - */ - getOutEdgeCursor(startEdge?:yfiles.algorithms.Edge):yfiles.algorithms.IEdgeCursor; - /** - * Returns a node cursor for all predecessor nodes of this node. - *

- * Predecessor nodes are those at the opposite ends of incoming edges. - *

- * @returns - * @see yfiles.algorithms.Node#getSuccessorCursor - */ - getPredecessorCursor():yfiles.algorithms.INodeCursor; - /** - * Returns a node cursor for all successor nodes of this node. - *

- * Successor nodes are those at the opposite ends of outgoing edges. - *

- * @returns - * @see yfiles.algorithms.Node#getPredecessorCursor - */ - getSuccessorCursor():yfiles.algorithms.INodeCursor; - /** - * Sorts incoming edges at this node according to the given comparator. - * @param c - * @see yfiles.algorithms.Node#sortOutEdges - */ - sortInEdges(c:yfiles.collections.IComparer):void; - /** - * Sorts outgoing edges at this node according to the given comparator. - * @param c - * @see yfiles.algorithms.Node#sortInEdges - */ - sortOutEdges(c:yfiles.collections.IComparer):void; - /** - * Gets the overall number of incoming and outgoing edges at this node. - *

- * Note that self-loops are counted twice. - *

- * @see yfiles.algorithms.Edge - * @see yfiles.algorithms.Node#inDegree - * @see yfiles.algorithms.Node#outDegree - * @type {number} - */ - degree:number; - /** - * Gets the number of incoming edges at this node. - * @see yfiles.algorithms.Node#degree - * @see yfiles.algorithms.Node#outDegree - * @type {number} - */ - inDegree:number; - /** - * Gets the number of outgoing edges at this node. - * @see yfiles.algorithms.Node#degree - * @see yfiles.algorithms.Node#inDegree - * @type {number} - */ - outDegree:number; - /** - * Gets the index of this node within its graph G. - *

- * Node indices represent the ordering of standard node iteration on G. The value of an index is >= 0 and - * < G.nodeCount(). - *

- *

- * Note that indices are subject to change whenever the sequence of nodes in a graph is modified by either removing, - * hiding, reinserting, or unhiding a node, or by explicitly changing its position in the sequence. - *

- * @see yfiles.algorithms.Graph#removeNode - * @see yfiles.algorithms.Graph#hide - * @see yfiles.algorithms.Graph#reInsertNode - * @see yfiles.algorithms.Graph#unhide - * @see yfiles.algorithms.Graph#moveToFirst - * @see yfiles.algorithms.Graph#moveToLast - * @type {number} - */ - index:number; - /** - * Gets the graph this node belongs to. - *

- * If the node does not belong to a graph, because it was removed or hidden from it, this method returns null. - *

- * @type {yfiles.algorithms.Graph} - */ - graph:yfiles.algorithms.Graph; - /** - * Gets the first outgoing edge at this node, or null if it does not exist. - * @see yfiles.algorithms.Node#firstInEdge - * @see yfiles.algorithms.Node#lastOutEdge - * @type {yfiles.algorithms.Edge} - */ - firstOutEdge:yfiles.algorithms.Edge; - /** - * Gets the first incoming edge at this node, or null if it does not exist. - * @see yfiles.algorithms.Node#firstOutEdge - * @see yfiles.algorithms.Node#lastInEdge - * @type {yfiles.algorithms.Edge} - */ - firstInEdge:yfiles.algorithms.Edge; - /** - * Gets the last outgoing edge at this node, or null if it does not exist. - * @see yfiles.algorithms.Node#firstOutEdge - * @see yfiles.algorithms.Node#lastInEdge - * @type {yfiles.algorithms.Edge} - */ - lastOutEdge:yfiles.algorithms.Edge; - /** - * Gets the last incoming edge at this node, or null if it does not exist. - * @see yfiles.algorithms.Node#firstInEdge - * @see yfiles.algorithms.Node#lastOutEdge - * @type {yfiles.algorithms.Edge} - */ - lastInEdge:yfiles.algorithms.Edge; - /** - * Yields a dynamic {@link yfiles.collections.IEnumerable.} for {@link yfiles.algorithms.Edge}s that can be used to iterate over outgoing edges at this instance. - *

- * This is a live enumerable and will thus reflect the current state of the node's adjacency. Note that changes to the - * graph structure during the traversal should be carried out with great care. Note that self-loop edges are reported, - * too. - *

- * @type {yfiles.collections.IEnumerable.} - */ - outEdges:yfiles.collections.IEnumerable; - /** - * Yields a dynamic {@link yfiles.collections.IEnumerable.} for {@link yfiles.algorithms.Edge}s that can be used to iterate over ingoing edges at this instance. - *

- * This is a live enumerable and will thus reflect the current state of the node's adjacency. Note that changes to the - * graph structure during the traversal should be carried out with great care. Note that self-loop edges are reported, - * too. - *

- * @type {yfiles.collections.IEnumerable.} - */ - inEdges:yfiles.collections.IEnumerable; - /** - * Yields a dynamic {@link yfiles.collections.IEnumerable.} for {@link yfiles.algorithms.Edge}s that can be used to iterate over the adjacent edges at this instance. - *

- * This is a live enumerable and will thus reflect the current state of the node's adjacency. Note that changes to the - * graph structure during the traversal should be carried out with great care. Note that self-loop edges are reported twice - * (as in edge and as out edge). - *

- * @type {yfiles.collections.IEnumerable.} - */ - edges:yfiles.collections.IEnumerable; - /** - * Yields a dynamic {@link yfiles.collections.IEnumerable.} for - * {@link yfiles.algorithms.Node}s that can be used to iterate over the opposite sides of adjacent outgoing edges at this - * instance. - *

- * This is a live enumerable and will thus reflect the current state of the node's adjacency. Note that changes to the - * graph structure during the traversal should be carried out with great care. Note that for self-loop edges this node - * itself will be reported as a successor. - *

- * @type {yfiles.collections.IEnumerable.} - */ - successors:yfiles.collections.IEnumerable; - /** - * Yields a dynamic {@link yfiles.collections.IEnumerable.} for - * {@link yfiles.algorithms.Node}s that can be used to iterate over the opposite sides of adjacent incoming edges at this - * instance. - *

- * This is a live enumerable and will thus reflect the current state of the node's adjacency. Note that changes to the - * graph structure during the traversal should be carried out with great care. Note that for self-loop edges this node - * itself will be reported as a predecessor. - *

- * @type {yfiles.collections.IEnumerable.} - */ - predecessors:yfiles.collections.IEnumerable; - /** - * Yields a dynamic {@link yfiles.collections.IEnumerable.} for - * {@link yfiles.algorithms.Node}s that can be used to iterate over the opposite sides of adjacent adjacent edges at this - * instance. - *

- * This is a live enumerable and will thus reflect the current state of the node's adjacency. Note that changes to the - * graph structure during the traversal should be carried out with great care. Note that for self-loop edges this node - * itself will be reported as a neighbor, twice. - *

- * @type {yfiles.collections.IEnumerable.} - */ - neighbors:yfiles.collections.IEnumerable; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Node; - } - /** - * Specialized list implementation for instances of type {@link yfiles.algorithms.Node}. - * @class - * @extends {yfiles.algorithms.YList} - * @implements {yfiles.collections.IEnumerable.} - */ - export interface NodeList extends yfiles.algorithms.YList{} - export class NodeList { - /** - * Creates a list that is initialized with the entries of the given list. - * @param list the values are added to the new list - */ - constructor(list:yfiles.algorithms.NodeList); - /** - * Creates a list that is initialized with a single node provided. - * @param v - */ - constructor(v:yfiles.algorithms.Node); - /** - * Creates a list that is initialized with the nodes provided by the given array of nodes. - * @param a - */ - constructor(a:yfiles.algorithms.Node[]); - /** - * Creates a list that is initialized with those nodes from the given NodeCursor object for which the given data provider - * returns true upon calling its {@link yfiles.algorithms.IDataProvider#getBoolean getBool} method. - * @param nc A node cursor providing nodes that should be added to this list. - * @param predicate A data provider that acts as a inclusion predicate for each node accessible by the given node cursor. - */ - constructor(nc:yfiles.algorithms.INodeCursor,predicate:yfiles.algorithms.IDataProvider); - /** - * Creates a list that is initialized with the nodes provided by the given NodeCursor object. - * @param c - */ - constructor(c:yfiles.algorithms.INodeCursor); - /** - * Creates an empty node list. - */ - constructor(); - /** - * Returns the first node in this list, or null when the list is empty. - * @returns The first node in the list. - */ - firstNode():yfiles.algorithms.Node; - /** - * Returns an enumerator for this collection. - * @returns - */ - getEnumerator():yfiles.collections.IEnumerator; - /** - * Returns the last node in this list, or null when the list is empty. - * @returns The last node in the list. - */ - lastNode():yfiles.algorithms.Node; - /** - * Returns a node cursor for this node list. - * @returns A node cursor granting access to the nodes within this list. - */ - nodes():yfiles.algorithms.INodeCursor; - /** - * Removes the first node from this list and returns it. - * @returns The first node from the list. - */ - popNode():yfiles.algorithms.Node; - /** - * Returns a node array containing all elements of this list in the canonical order. - * @returns - */ - toNodeArray():yfiles.algorithms.Node[]; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.NodeList; - } - /** - * This class provides algorithms that order the nodes of a graph using specific criteria. - *

- * Definitions - *

- *
    - *
  • - * A topological ordering of the nodes of a directed graph is a linear ordering of the nodes such that for each directed edge (u,v), node u lies - * before v in the ordering. - *
  • - *
  • A DFS completion ordering of the nodes of a graph is a node ordering identical to the order of node completion events in a {@link yfiles.algorithms.Dfs depth first search}.
  • - *
  • An st-ordering (v_1,v_2,....,v_n) of a biconnected graph is a node ordering which guarantees that:
  • - *
- * @class - * @static - */ - export interface NodeOrders extends yfiles.lang.Object{} - export class NodeOrders { - /** - * Calculates an ordering of the nodes identical to the order of node completion events in a depth first search. - *

- * This ordering is a reversed topological ordering in case the input graph is acyclic. - *

- * @param graph the input graph - * @param order an array of {@link }s that returns for each {@link } v, its zero-based index within the calculated ordering, i.e., - * order[v.index()] == 5 means that v is the 6-th node within the ordering - * @see yfiles.algorithms.NodeOrders#topological - * @see yfiles.algorithms.NodeOrders#dfsCompletion - * @static - */ - static dfsCompletion(graph:yfiles.algorithms.Graph,order:number[]):void; - /** - * Calculates an ordering of the nodes identical to the order of node completion events in a depth first search. - *

- * Like {@link yfiles.algorithms.NodeOrders#dfsCompletion} but the result is returned as a {@link yfiles.algorithms.NodeList}. - *

- *

- * This ordering is a reversed topological ordering in case the input graph is acyclic. - *

- * @param graph the input graph - * @returns a {@link } containing the nodes of the graph in the order identical to the order of node completion - * events in a depth first search - * @see yfiles.algorithms.NodeOrders#topological - * @see yfiles.algorithms.NodeOrders#dfsCompletion - * @static - */ - static dfsCompletion(graph:yfiles.algorithms.Graph):yfiles.algorithms.NodeList; - /** - * Assigns an st-ordering to the nodes of a biconnected graph given the edge between source node s and sink node t. - *

- * An st-ordering (v_1,v_2,....,v_n) of a biconnected graph is a node ordering which guarantees that: - *

- *
    - *
  • Source node s and sink node t are connected by an edge.
  • - *
  • For each node v_i in the ordering other than s or t, there are neighbors v_j and v_k with j < i and k > i.
  • - *
- * @param graph the input graph - * @param stOrder an array of {@link }s that will be filled during the execution and returns for each {@link } v, its zero-based - * index within the calculated ordering, i.e., stOrder[v.index()] == 5 means that v is the 6-th node within the ordering - * @param [stEdge=null] an {@link } that connects source node s and sink node t - * @see yfiles.algorithms.NodeOrders#st - * @see yfiles.algorithms.NodeOrders#st - * @static - */ - static st(graph:yfiles.algorithms.Graph,stOrder:number[],stEdge?:yfiles.algorithms.Edge):void; - /** - * Assigns an st-ordering to the nodes of a biconnected graph. - *

- * Like {@link yfiles.algorithms.NodeOrders#st} but the result is returned as a {@link yfiles.algorithms.NodeList}. - *

- *

- * An st-ordering (v_1,v_2,....,v_n) of a biconnected graph is a node ordering which guarantees that: - *

- *
    - *
  • Source node s and sink node t are connected by an edge.
  • - *
  • For each node v_i in the ordering other than s or t, there are neighbors v_j and v_k with j < i and k > i.
  • - *
- * @param graph the input graph - * @returns a {@link } containing the nodes of the graph in the order defined by the st-ordering - * @see yfiles.algorithms.NodeOrders#st - * @static - */ - static st(graph:yfiles.algorithms.Graph):yfiles.algorithms.NodeList; - /** - * Converts an array-based result returned by a method of this class to a {@link yfiles.algorithms.NodeList} that contains all - * nodes in the order provided by the given array. - * @param graph the input graph - * @param order an array of {@link }s that will be filled during the execution and returns for each {@link } v, its zero-based - * index within the calculated ordering, i.e., order[v.index()] == 5 means that v is the 6-th node within the ordering - * @returns a {@link } containing the nodes of the graph in the order provided by the given array - * @static - */ - static toNodeList(graph:yfiles.algorithms.Graph,order:number[]):yfiles.algorithms.NodeList; - /** - * Copies an array-based result returned by a method of this class to a {@link yfiles.algorithms.INodeMap} that will provide values - * of basic type int. - * @param graph the input graph - * @param order an array of {@link }s that returns for each {@link } v, its zero-based index within the calculated ordering, i.e., - * order[v.index()] == 5 means that v is the 6-th node within the ordering - * @param result the {@link } that will be filled during the execution with the zero-based index of each node within - * the calculated ordering - * @static - */ - static toNodeMap(graph:yfiles.algorithms.Graph,order:number[],result:yfiles.algorithms.INodeMap):void; - /** - * Copies a {@link yfiles.algorithms.NodeList}-based result returned by a method of this class to a {@link yfiles.algorithms.INodeMap} that - * will provide values of basic type int. - * @param order a {@link } containing the nodes of the graph in the appropriate order - * @param result the {@link } that will be filled during the execution with the zero-based index of each node within - * the calculated ordering - * @static - */ - static toNodeMap(order:yfiles.algorithms.NodeList,result:yfiles.algorithms.INodeMap):void; - /** - * Assigns a topological ordering to the nodes of a directed acyclic graph. - *

- * A topological ordering of the nodes of a directed graph is a linear ordering of the nodes such that for each directed - * edge (u,v), node u lies before v in the ordering. - *

- * @param graph the input graph - * @param order an array of {@link }s that will be filled during the execution and returns for each {@link } v, its zero-based - * index within the calculated ordering, i.e., order[v.index()] == 5 means that v is the 6-th node within the ordering - * @returns true if the graph is acyclic, false otherwise - * @see yfiles.algorithms.NodeOrders#topological - * @static - */ - static topological(graph:yfiles.algorithms.Graph,order:number[]):boolean; - /** - * Returns a topological ordering of the nodes of a directed acyclic graph. - * @param graph the input graph - * @returns a {@link } containing the nodes of the graph in the order they appear in the topological ordering - * @throws {Stubs.Exceptions.ArgumentError} if the graph is cyclic - * @see yfiles.algorithms.NodeOrders#topological - * @static - */ - static topological(graph:yfiles.algorithms.Graph):yfiles.algorithms.NodeList; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.NodeOrders; - } - /** - * This class provides methods for finding paths within a graph that have certain properties. - *

- * Definitions - *

- *
    - *
  • - * A path of length k from node u to node v in a graph is a sequence v0, v1, v2, ... , vk of nodes such that u = v0, v = vk and - * (vi-1, vi) in E, for each i = 1, 2, .. , k. - *
  • - *
  • A path is called simple if no node appears twice.
  • - *
  • A chain is a path of maximum length in which each internal node has degree 2.
  • - *
  • - * The longest path problem is the problem of finding a simple path of maximum length in a given graph. The longest path problem is - * NP-hard for undirected graphs, but can be solved in linear time for directed acyclic graphs. - *
  • - *
- * @class - * @static - */ - export interface Paths extends yfiles.lang.Object{} - export class Paths { - /** - * Constructs a {@link yfiles.algorithms.NodeList path of nodes} from a given {@link yfiles.algorithms.EdgeList path of edges}. - *

- * The returned node path has length path.size()+1, if the given path is not empty. Otherwise, the returned path will be - * empty. The i-th node in the returned path will be either source or target node of the i-th edge in the given path. - *

- * @param path the given {@link path of edges} - * @returns a {@link path of nodes} from the given {@link path of edges} - * @static - */ - static constructNodePath(path:yfiles.algorithms.EdgeList):yfiles.algorithms.NodeList; - /** - * Returns all chains present in the given graph. - *

- * A chain is a path of maximum length in which each internal node has degree 2. - *

- *

- * The internal nodes on directed chains all have in-degree 1 and out-degree 1. - *

- * @param graph the input graph - * @param directed true if the chain should be considered as directed, false otherwise - * @returns an array of {@link }s each of which contains the edges (at least two) that make up a chain - * @see yfiles.algorithms.Paths#constructNodePath - * @static - */ - static findAllChains(graph:yfiles.algorithms.Graph,directed:boolean):yfiles.algorithms.EdgeList[]; - /** - * A variant of {@link yfiles.algorithms.Paths#findAllPaths} which returns all simple directed or undirected paths between two - * given nodes and, additionally, allows to specify a filter for the paths to be returned. - * @param graph the input graph - * @param startNode the given start node - * @param endNode the given end node - * @param directed true if the path should be considered as directed, false otherwise - * @param filter a predicate that accepts or rejects a found {@link } and adds it to the result - * @returns an array of {@link }s each of which represents a path between the start and end node. - * @static - */ - static findAllPaths(graph:yfiles.algorithms.Graph,startNode:yfiles.algorithms.Node,endNode:yfiles.algorithms.Node,directed:boolean,filter:(obj:yfiles.algorithms.EdgeList)=>boolean):yfiles.algorithms.EdgeList[]; - /** - * Returns all simple directed or undirected paths that connect a start node with an end node. - * @param graph the input graph - * @param startNode the given start node - * @param endNode the given end node - * @param directed true if the path should be considered as directed, false otherwise - * @returns an array of {@link }s each of which represents a path between the start and end node - * @static - */ - static findAllPaths(graph:yfiles.algorithms.Graph,startNode:yfiles.algorithms.Node,endNode:yfiles.algorithms.Node,directed:boolean):yfiles.algorithms.EdgeList[]; - /** - * Finds all edges that belong to a directed path from a start node to an end node. - * @param graph the input graph - * @param startNode the given start node - * @param endNode the given end node - * @param pathEdges the {@link } that will be filled during the execution with a boolean value indicating whether or not - * an edge belongs to a path connecting the two given nodes - * @static - */ - static findAllPaths(graph:yfiles.algorithms.Graph,startNode:yfiles.algorithms.Node,endNode:yfiles.algorithms.Node,pathEdges:yfiles.algorithms.IEdgeMap):void; - /** - * A variant of - * {@link yfiles.algorithms.Paths#findAllPaths}, which returns all simple directed or undirected paths between two given nodes as a - * special cursor that calculates the next path in the sequence, only when needed. - *

- * The returned cursor only supports the operation {@link yfiles.algorithms.ICursor#ok}, {@link yfiles.algorithms.ICursor#current}, {@link yfiles.algorithms.ICursor#size} and {@link yfiles.algorithms.ICursor#next}. - *

- * @param graph the input graph - * @param startNode the given start node - * @param endNode the given end node - * @param directed true if the path should be considered as directed, false otherwise - * @returns a {@link } that calculates the next path in the sequence - * @static - */ - static findAllPathsCursor(graph:yfiles.algorithms.Graph,startNode:yfiles.algorithms.Node,endNode:yfiles.algorithms.Node,directed:boolean):yfiles.algorithms.ICursor; - /** - * Returns the longest directed path in a given acyclic weighted graph. - *

- * All edges of the graph have an integral length associated with them. The longest path is defined as one of all directed - * paths within the graph for which the edge lengths of all contained edges sum up to a maximum. - *

- * @param graph a directed acyclic graph - * @param [edgeLength=null] the {@link } that returns the non-negative integer length of each edge - * @returns an {@link } containing the edges of the longest directed path - * @static - */ - static findLongestPath(graph:yfiles.algorithms.Graph,edgeLength?:yfiles.algorithms.IDataProvider):yfiles.algorithms.EdgeList; - /** - * Calculates the longest path from a given node to all other node in a given directed acyclic graph. - * @param graph a directed acyclic graph - * @param startNode the node for which the distances are calculated - * @param dist the {@link } that returns the distance (i.e. weight) of type double for each edge - * @param maxDist the {@link } that will be filled during the execution and holds the maximum distance between the given - * node and all other nodes - * @param predicate the {@link } that returns a boolean value indicating whether or not an edge should be considered - * during the path search - * @static - */ - static findLongestPaths(graph:yfiles.algorithms.Graph,startNode:yfiles.algorithms.Node,dist:yfiles.algorithms.IEdgeMap,maxDist:yfiles.algorithms.INodeMap,predicate:yfiles.algorithms.IEdgeMap):void; - /** - * Returns an {@link yfiles.algorithms.EdgeList} containing the edges of an undirected simple path within the given graph. - *

- * The edges are returned in the order that they appear in the found path. - *

- *

- * A heuristic is used for finding a path that is long. It is not guaranteed, though, that the returned path is actually - * the longest path within the given graph, since that is a well known hard problem. - *

- * @param graph the given graph - * @returns an {@link } containing the edges of an undirected simple path - * @static - */ - static findLongPath(graph:yfiles.algorithms.Graph):yfiles.algorithms.EdgeList; - /** - * Returns whether or not a directed path from a start node to another node in an acyclic graph exists. - * @param graph an acyclic graph which contains the two nodes - * @param topSort a {@link list} of nodes sorted in topological order - * @param predicate the {@link } that returns a boolean value indicating whether or not an edge should be considered - * during the path search - * @param startNode - * @param endNode - * @returns true if a directed path from a start node to another node exists, false otherwise - * @static - */ - static findPath(graph:yfiles.algorithms.Graph,topSort:yfiles.algorithms.NodeList,startNode:yfiles.algorithms.Node,endNode:yfiles.algorithms.Node,predicate:yfiles.algorithms.IEdgeMap):boolean; - /** - * Returns an {@link yfiles.algorithms.EdgeList} containing the edges of a path from the given start node to the given end node, if - * such a path exists. - *

- * The edges are returned in the order that they appear in the found path. If the returned path is empty, no path between - * the given nodes was found. - *

- * @param graph the input graph - * @param startNode the first node of the path - * @param endNode the last node of the path - * @param directed true if the path should be directed, false otherwise - * @returns an {@link } containing the path edges between the start node and the end node - * @static - */ - static findPath(graph:yfiles.algorithms.Graph,startNode:yfiles.algorithms.Node,endNode:yfiles.algorithms.Node,directed:boolean):yfiles.algorithms.EdgeList; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Paths; - } - /** - * Represents an embedding of a planar graph. - *

- * A planar embedding is represented by a {@link yfiles.algorithms.PlanarEmbedding#faces list of faces}. Each face is represented by a list of {@link yfiles.algorithms.Dart darts} which describe the - * border of the face. - *

- * @class - * @final - */ - export interface PlanarEmbedding extends yfiles.lang.Object{} - export class PlanarEmbedding { - /** - * Creates a new embedding for the specified planar graph. - * @param graph a planar graph - * @throws {Stubs.Exceptions.ArgumentError} if the specified graph is not planar - */ - constructor(graph:yfiles.algorithms.Graph); - /** - * Returns the cyclic next dart of the given dart. - * @param dart a dart - * @returns the cyclic next dart of the given dart - */ - getCyclicNext(dart:yfiles.algorithms.Dart):yfiles.algorithms.Dart; - /** - * Returns the cyclic previous dart of the given dart. - * @param dart a dart - * @returns the cyclic previous dart of the given dart - */ - getCyclicPrevious(dart:yfiles.algorithms.Dart):yfiles.algorithms.Dart; - /** - * Returns the two darts associated with the given edge. - * @param edge an edge - * @returns the two darts associated with the given edge - */ - getDarts(edge:yfiles.algorithms.Edge):yfiles.algorithms.Dart[]; - /** - * Returns a {@link yfiles.collections.IList.} containing the (cyclic ordered) outgoing darts of the specified node. - * @param node a node - * @returns a {@link } containing the (cyclic ordered) outgoing darts - */ - getOutgoingDarts(node:yfiles.algorithms.Node):yfiles.collections.IList; - /** - * Return whether or not the given graph is planar. - * @param graph the input graph - * @returns true if the given graph is planar, false otherwise - * @static - */ - static isPlanar(graph:yfiles.algorithms.Graph):boolean; - /** - * Gets a {@link yfiles.collections.IList.} of face lists. - *

- * More precisely, each entry of this list is another list that contains all {@link yfiles.algorithms.Dart darts} of a face. - *

- * @type {yfiles.collections.IList.>} - */ - faces:yfiles.collections.IList>; - /** - * Gets the {@link yfiles.collections.IList.} that represents the outer face. - * @see yfiles.algorithms.PlanarEmbedding#faces - * @type {yfiles.collections.IList.} - */ - outerFace:yfiles.collections.IList; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.PlanarEmbedding; - } - /** - * This class provides algorithms for solving the rank assignment problem. - *

- * Definitions Let G=(V,E) be a directed acyclic graph. Let length(e) denote the minimum length and weight(e) the weight of an edge - * e. - *

- *

- * The rank assignment problem is the problem of finding integer values rank(v) for all v in V, such that: - *

- *
    - *
  • rank(v) - rank(w) >= length(v,w), for all (v,w) in E and,
  • - *
  • the sum ∑(weight(v,w) * (rank(v) - rank(w))) over all (v,w) in E is minimized.
  • - *
- * @class - * @static - */ - export interface RankAssignments extends yfiles.lang.Object{} - export class RankAssignments { - /** - * Like {@link yfiles.algorithms.RankAssignments#simple}, but arrays are used instead of {@link yfiles.algorithms.INodeMap}s and - * {@link yfiles.algorithms.IEdgeMap}s. - *

- * Minimum edge length and weights should be non-negative. - *

- * @param graph the input graph in which all the edges have directions, such that rank[source] < rank[target] and - * rank[target] - rank[source] >= minlength[edge] - * @param rank an array that will be filled with the ranking r of each node v such that rank[v.index] == r - * @param minLength an array holding a non-negative value len of each edge e such that minLength[e.index] == len - * @param [maximalDuration=0x7FFFFFFFFFFFFFFF] a preferred time limit for the algorithm (in milliseconds) - * @returns the number of layers - * @see yfiles.algorithms.RankAssignments#simple - * @static - */ - static simple(graph:yfiles.algorithms.Graph,rank:number[],minLength:number[],maximalDuration?:number):number; - /** - * This method quickly calculates a tight tree given a maximum time duration for the algorithm. - *

- * The algorithm is using a highly optimized version of Gansner's algorithm: - *

- *
    - *
  • E.R. Gansner et al., A Technique for Drawing Directed Graphs, IEEE Transactions on Software Engineering, Vol.19, No.3, March 1993.
  • - *
- *

- * Minimum edge length and weights should be non-negative. - *

- * @param graph the input graph in which all the edges have directions, such that rank[source] < rank[target] and - * rank[target] - rank[source] >= minlength[edge] - * @param rank the {@link } that will be filled during the execution and returns the integer ranking of each node - * @param minLength the {@link } that returns an integer value (minimum/tight length) of each edge - * @param [maximalDuration=0x7FFFFFFFFFFFFFFF] a preferred time limit for the algorithm (in milliseconds) - * @returns - * @see yfiles.algorithms.RankAssignments#simple - * @static - */ - static simple(graph:yfiles.algorithms.Graph,rank:yfiles.algorithms.INodeMap,minLength:yfiles.algorithms.IEdgeMap,maximalDuration?:number):number; - /** - * Similar to {@link yfiles.algorithms.RankAssignments#simplex} but, additionally, it is possible to provide a valid initial tree - * solution for the problem. - *

- * Minimum edge length and weights should be non-negative. - *

- * @param graph the given graph - * @param layer the {@link } that will be filled during the execution and returns the zero-based ranking index for - * each node - * @param w the {@link } that returns an integer value (weight) of each edge - * @param minLength the {@link } that returns an integer value (minimum length) of each edge - * @param tree the {@link } that returns a boolean value indicating whether or not an edge is a tree edge - * @param _root the given root node of the tree solution - * @param validRanking true if the argument layer contains a valid ranking, false otherwise - * @param [maximalDuration=0x7FFFFFFFFFFFFFFF] a preferred time limit for the algorithm (in milliseconds) - * @returns the number of layers - * @see yfiles.algorithms.RankAssignments#simplex - * @see yfiles.algorithms.RankAssignments#simplex - * @static - */ - static simplex(graph:yfiles.algorithms.Graph,layer:yfiles.algorithms.INodeMap,w:yfiles.algorithms.IDataProvider,minLength:yfiles.algorithms.IDataProvider,tree:yfiles.algorithms.IEdgeMap,_root:yfiles.algorithms.Node,validRanking:boolean,maximalDuration?:number):number; - /** - * Solves the rank assignment problem using the simplex method given a maximum time duration for the algorithm. - *

- * This method assigns a minimum rank to the nodes in a acyclic graph. - *

- *

- * Although its time complexity has not been proven polynomial, in practice it takes few iterations and runs quickly. - *

- *

- * The algorithm is based on: - *

- *
    - *
  • E.R. Gansner et al., A Technique for Drawing Directed Graphs, IEEE Transactions on Software Engineering, Vol.19, No.3, March 1993.
  • - *
- *

- * Minimum edge length and weights should be non-negative. - *

- * @param graph the given graph - * @param layer the {@link } that will be filled during the execution and returns the zero-based ranking index for - * each node - * @param w the {@link } that returns an integer value (weight) of each edge - * @param minLength the {@link } that returns an integer value (minimum length) of each edge - * @param [maximalDuration=0x7FFFFFFFFFFFFFFF] a preferred time limit for the algorithm (in milliseconds) - * @returns the number of layers - * @see yfiles.algorithms.RankAssignments#simplex - * @see yfiles.algorithms.RankAssignments#simplex - * @static - */ - static simplex(graph:yfiles.algorithms.Graph,layer:yfiles.algorithms.INodeMap,w:yfiles.algorithms.IDataProvider,minLength:yfiles.algorithms.IDataProvider,maximalDuration?:number):number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.RankAssignments; - } - /** - * This class provides diverse algorithms and helper methods for solving the shortest path problem on weighted graphs. - *

- * Definitions Given a weighted directed/undirected graph: - *

- *
    - *
  • The shortest path problem is the problem of finding a shortest path between a source node s - * and a target node t such that the sum of the edge costs is minimized.
  • - *
  • The k-shortest path problem is the problem of finding k shortest paths between a source - * node s and a target node t such that the sum of the edge costs is minimized.
  • - *
  • The single-source shortest path problem is the problem of finding shortest paths from a source node - * s to all other nodes such that the sum of the edge costs is minimized.
  • - *
  • The single-source single-sink shortest path problem is the problem of finding shortest paths from a source node s to a target node t such that the sum of the edge costs is minimized.
  • - *
  • The all-pairs shortest path problem is the problem of finding shortest paths between every pair of - * nodes such that the sum of the edge costs is minimized.
  • - *
- * @class - * @static - */ - export interface ShortestPaths extends yfiles.lang.Object{} - export class ShortestPaths { - /** - * Solves the single-source shortest path problem for acyclic directed graphs. - *

- * Each edge is associated with an arbitrary double value that represents the cost of that edge. - *

- *

- * This method yields the shortest distance from a given node s to all other nodes. - *

- * @param graph the input graph - * @param s the node from which the shortest path search starts - * @param cost an array of double values that returns the costs for traversing each edge; edge e has cost cost[e.index()] - * @param dist an array of values that will be filled during the execution and returns the shortest distance from node s to all other - * nodes. The distance from s to v is dist[v.index()]. If there is no path from s to v, then - * dist[v.index()] == Double.POSITIVE_INFINITY. - * @param [pred=null] an array of {@link }s that will be filled during the execution and returns for each node t the shortest - * path edge pred[t.index()] which is the last edge on the shortest path from s to t. If t == s or if there is no shortest - * path from s to t, then pred[t.index()] == null. - * @returns true if the input graph is acyclic, false otherwise - * @see yfiles.algorithms.ShortestPaths#acyclic - * @see yfiles.algorithms.ShortestPaths#constructNodePath - * @see yfiles.algorithms.ShortestPaths#constructEdgePath - * @static - */ - static acyclic(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,cost:number[],dist:number[],pred?:yfiles.algorithms.Edge[]):boolean; - /** - * Solves the single-source shortest path problem for acyclic directed graphs. - *

- * Each edge is associated with an arbitrary double value that represents the cost of that edge. - *

- *

- * This method yields the shortest distance from a given node s to all other nodes. - *

- * @param graph the input graph - * @param s the node from which the shortest path search starts - * @param cost the {@link } that returns the double value (cost) for traversing each edge - * @param dist the {@link } that will be filled during the execution and returns a double value (shortest distance) - * from node s to all other nodes or {@link #POSITIVE_INFINITY} if no such paths exist - * @param pred the {@link } that will be filled during the execution and returns for each node t the last edge on the - * shortest path from s to t or null if t == s or no shortest path from s to t exists - * @returns true if the input graph is acyclic, false otherwise - * @see yfiles.algorithms.ShortestPaths#acyclic - * @static - */ - static acyclic(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,cost:yfiles.algorithms.IDataProvider,dist:yfiles.algorithms.INodeMap,pred:yfiles.algorithms.INodeMap):boolean; - /** - * This method solves the all-pairs shortest path problem for graphs with arbitrary edge costs. - *

- * If the given graph contains a negative-cost cycle, then false is returned and the values returned in dist are left - * unspecified. - *

- * @param graph the input graph - * @param directed true if the graph should be considered as directed, false otherwise - * @param cost an array of double values that returns the costs for traversing each edge; edge e has cost cost[e.index()] - * @param dist an array of values that will be filled during the execution and returns the shortest path distances from all pairs of - * nodes s and t in the graph. The distance from s to t is dist[s.index()][t.index()]. If there is no path from s to t, - * then dist[s.index()][t.index()] == Double.POSITIVE_INFINITY. - * @returns true if the given graph does not contain a negative-cost cycle, false otherwise - * @static - */ - static allPairs(graph:yfiles.algorithms.Graph,directed:boolean,cost:number[],dist:number[][]):boolean; - /** - * Solves the single-source shortest path problem for arbitrary graphs. - *

- * Each edge is associated with an arbitrary double value that represents the cost of this edge. - *

- *

- * In case the given weighted graph contains no negative-cost cycles, this method will yield the shortest distance from a given node s to all - * other nodes. If, on the other hand, the given graph contains negative-cost cycles, this method will yield no reasonable - * result which will be indicated by the return value false. - *

- * @param graph the input graph - * @param s the source node - * @param directed true if the graph should be considered as directed, false otherwise - * @param cost the {@link } that returns the double value (cost) for traversing each edge - * @param dist the {@link } that will be filled during the execution and returns a double value (shortest distance) - * from node s to all other nodes or {@link #POSITIVE_INFINITY} if no such paths exist - * @param pred the {@link } that will be filled during the execution and returns for each node t the last edge on the - * shortest path from s to t or null if t == s or no shortest path from s to t exists - * @returns - * @see yfiles.algorithms.ShortestPaths#bellmanFord - * @static - */ - static bellmanFord(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,directed:boolean,cost:yfiles.algorithms.IDataProvider,dist:yfiles.algorithms.INodeMap,pred:yfiles.algorithms.INodeMap):boolean; - /** - * Solves the single-source shortest path problem for arbitrary graphs. - *

- * Each edge is associated with an arbitrary double value that represents the cost of this edge. - *

- *

- * In case the given weighted graph contains no negative cost cycles, this method will yield the shortest distance from a given node s to all - * other nodes. If, on the other hand, the given graph contains negative-cost cycles, this method will yield no reasonable - * result which will be indicated by the return value false. - *

- * @param graph the input graph - * @param s the node from which the shortest path search starts - * @param directed true if the graph should be considered as directed, false otherwise - * @param cost an array of double values that returns the costs for traversing each edge; edge e has cost cost[e.index()] - * @param dist an array of values that will be filled during the execution and returns the shortest distance from node s to all other - * nodes. The distance from s to v is dist[v.index()]. If there is no path from s to v, then - * dist[v.index()] == Double.POSITIVE_INFINITY. - * @param [pred=null] an array of {@link }s that will be filled during the execution and returns for each node t the shortest - * path edge pred[t.index()] which is the last edge on the shortest path from s to t. If t == s or if there is no shortest - * path from s to t, then pred[t.index()] == null. - * @returns - * @see yfiles.algorithms.ShortestPaths#constructNodePath - * @see yfiles.algorithms.ShortestPaths#constructEdgePath - * @see yfiles.algorithms.ShortestPaths#bellmanFord - * @static - */ - static bellmanFord(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,directed:boolean,cost:number[],dist:number[],pred?:yfiles.algorithms.Edge[]):boolean; - /** - * Convenience method that constructs an explicit {@link yfiles.algorithms.EdgeList path of edges} from the result returned by one of the shortest paths - * methods defined in this class. - *

- * If there is no path from node s to t, then an empty list is returned. - *

- * @param s the start node of the shortest path which must be the same start node that was specified when pred was calculated - * @param t the target node of the path - * @param pred an array of {@link }s that will be filled during the execution and returns for each node t the shortest - * path edge pred[t.index()] which is the last edge on the shortest path from s to t. If t == s or if there is no shortest - * path from s to t, then pred[t.index()] == null. - * @returns a {@link list} containing the edges on the shortest path from s to t in the correct order - * @see yfiles.algorithms.ShortestPaths#constructEdgePath - * @static - */ - static constructEdgePath(s:yfiles.algorithms.Node,t:yfiles.algorithms.Node,pred:yfiles.algorithms.Edge[]):yfiles.algorithms.EdgeList; - /** - * Like {@link yfiles.algorithms.ShortestPaths#constructEdgePath} but the path edges are given by a - * {@link yfiles.algorithms.IDataProvider}. - *

- * If there is no path from node s to t, then an empty list is returned. - *

- * @param s the start node of the shortest path which must be the same start node that was specified when pred was calculated - * @param t the target node of the path - * @param pred the {@link } that will be filled during the execution and returns for each node t the last edge on the - * shortest path from s to t or null if t == s or no shortest path from s to t exists - * @returns a {@link list} containing the edges on the shortest path from s to t in the correct order - * @see yfiles.algorithms.ShortestPaths#constructEdgePath - * @static - */ - static constructEdgePath(s:yfiles.algorithms.Node,t:yfiles.algorithms.Node,pred:yfiles.algorithms.IDataProvider):yfiles.algorithms.EdgeList; - /** - * Convenience method that constructs an explicit {@link yfiles.algorithms.NodeList path of nodes} from the result returned by one of the shortest paths - * methods defined in this class. - *

- * If there is no path from node s to t, then an empty list is returned. - *

- * @param s the start node of the shortest path which must be the same start node that was specified when pred was calculated - * @param t the target node of the path - * @param pred an array of {@link }s that will be filled during the execution and returns for each node t the shortest - * path edge pred[t.index()] which is the last edge on the shortest path from s to t. If t == s or if there is no shortest - * path from s to t, then pred[t.index()] == null. - * @returns a {@link list} containing the nodes on the shortest path from s to t in the correct order - * @see yfiles.algorithms.ShortestPaths#constructNodePath - * @static - */ - static constructNodePath(s:yfiles.algorithms.Node,t:yfiles.algorithms.Node,pred:yfiles.algorithms.Edge[]):yfiles.algorithms.NodeList; - /** - * Like {@link yfiles.algorithms.ShortestPaths#constructNodePath} but the path edges are given by a - * {@link yfiles.algorithms.IDataProvider}. - *

- * If there is no path from node s to t, then an empty list is returned. - *

- * @param s the start node of the shortest path which must be the same start node that was specified when pred was calculated - * @param t the target node of the path - * @param pred the {@link } that will be filled during the execution and returns for each node t the last edge on the - * shortest path from s to t or null if t == s or no shortest path from s to t exists - * @returns a {@link list} containing the nodes on the shortest path from s to t in the correct order - * @see yfiles.algorithms.ShortestPaths#constructNodePath - * @static - */ - static constructNodePath(s:yfiles.algorithms.Node,t:yfiles.algorithms.Node,pred:yfiles.algorithms.IDataProvider):yfiles.algorithms.NodeList; - /** - * Solves the single-source shortest path problem for arbitrary graphs. - *

- * Each edge is associated with a non-negative double value that represents the cost of the edge. - *

- *

- * This method yields the shortest distance from a given node s to all other nodes. - *

- *

- * The costs should be non-negative. - *

- * @param graph the input graph - * @param s the node from which the shortest path search starts - * @param directed true if the graph should be considered as directed, false otherwise - * @param cost an array of double values that returns the costs for traversing each edge; edge e has cost cost[e.index()] - * @param dist an array of values that will be filled during the execution and returns the shortest distance from node s to all other - * nodes. The distance from s to v is dist[v.index()]. If there is no path from s to v, then - * dist[v.index()] == Double.POSITIVE_INFINITY. - * @param [pred=null] an array of {@link }s that will be filled during the execution and returns for each node t the shortest - * path edge pred[t.index()] which is the last edge on the shortest path from s to t. If t == s or if there is no shortest - * path from s to t, then pred[t.index()] == null. - * @see yfiles.algorithms.ShortestPaths#constructNodePath - * @see yfiles.algorithms.ShortestPaths#constructEdgePath - * @see yfiles.algorithms.ShortestPaths#dijkstra - * @static - */ - static dijkstra(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,directed:boolean,cost:number[],dist:number[],pred?:yfiles.algorithms.Edge[]):void; - /** - * Solves the single-source shortest path problem for arbitrary graphs. - *

- * Each edge is associated with a non-negative double value that represents the cost of the edge. - *

- *

- * This method yields the shortest distance from a given node s to all other nodes. - *

- *

- * The costs should be non-negative. - *

- * @param graph the input graph - * @param s the node from which the shortest path search starts - * @param directed true if the graph should be considered as directed, false otherwise - * @param cost the {@link } that returns the double value (cost) for traversing each edge - * @param dist the {@link } that will be filled during the execution and returns a double value (shortest distance) - * from node s to all other nodes or {@link #POSITIVE_INFINITY} if no such paths exist - * @param pred the {@link } that will be filled during the execution and returns for each node t the last edge on the - * shortest path from s to t or null if t == s or no shortest path from s to t exists - * @see yfiles.algorithms.ShortestPaths#constructNodePath - * @see yfiles.algorithms.ShortestPaths#constructEdgePath - * @see yfiles.algorithms.ShortestPaths#dijkstra - * @static - */ - static dijkstra(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,directed:boolean,cost:yfiles.algorithms.IDataProvider,dist:yfiles.algorithms.INodeMap,pred:yfiles.algorithms.INodeMap):void; - /** - * Finds all nodes and edges that belong to a shortest path from a start node to a set of target nodes in the graph not - * farther away than a given distance. - *

- * This method assumes that each edge of the input graph has a cost of 1.0. - *

- * @param graph the input graph - * @param start the start node - * @param targetMap the {@link } that returns a boolean value indicating whether or not a node belongs to the set of - * target nodes - * @param directed true if the graph should be considered as directed, false otherwise - * @param maxLength the maximum edge length of the shortest paths - * @param pathEdges a {@link list} that will be filled during the execution and returns the edges on the shortest path from s to t in the correct - * order - * @param pathNodes a {@link list} that will be filled during the execution and returns the nodes on the shortest path from s to t in the correct - * order - * @static - */ - static findShortestUniformPaths(graph:yfiles.algorithms.Graph,start:yfiles.algorithms.Node,targetMap:yfiles.algorithms.IDataProvider,directed:boolean,maxLength:number,pathEdges:yfiles.algorithms.EdgeList,pathNodes:yfiles.algorithms.NodeList):void; - /** - * Marks all edges that belong to a shortest path from start node to target node. - *

- * This method assumes that each edge of the input graph has a cost of 1.0. - *

- * @param graph the input graph - * @param start the start node - * @param end the target node - * @param directed true if the graph should be considered as directed, false otherwise - * @param pathMap the {@link } that will be filled during the execution and returns a boolean value indicating whether - * or not the edge belongs to a shortest path connecting the two nodes - * @static - */ - static findShortestUniformPaths(graph:yfiles.algorithms.Graph,start:yfiles.algorithms.Node,end:yfiles.algorithms.Node,directed:boolean,pathMap:yfiles.algorithms.IEdgeMap):void; - /** - * This method finds the k shortest paths connecting a pair of nodes in a directed graph with non-negative edge costs. - *

- * The result will be returned as a list of {@link yfiles.algorithms.EdgeList} objects. - *

- *

- * The cost should be non-negative. - *

- * @param graph the input graph - * @param costDP the {@link } that returns a double value (cost) for traversing each edge - * @param start the given start node - * @param end the given target node - * @param k a non-negative integer value - * @returns a {@link list} of {@link } objects each of which represents a path from start node to target node. The i-th - * path in the list contains the i-th shortest path between the start and target node. - * @static - */ - static kShortestPaths(graph:yfiles.algorithms.Graph,costDP:yfiles.algorithms.IDataProvider,start:yfiles.algorithms.Node,end:yfiles.algorithms.Node,k:number):yfiles.algorithms.YList; - /** - * A variant of {@link yfiles.algorithms.ShortestPaths#kShortestPaths} that returns the result as a special cursor that calculates - * the next path in the sequence only when needed. - *

- * The returned cursor only supports the operation {@link yfiles.algorithms.ICursor#ok}, {@link yfiles.algorithms.ICursor#current} and {@link yfiles.algorithms.ICursor#next}. - *

- *

- * The cost should be non-negative. - *

- * @param graph the input graph - * @param costDP the {@link } that returns a double value (cost) for traversing each edge - * @param start the given start node - * @param end the given target node - * @param k a non-negative integer value - * @returns a {@link cursor} that calculates the next path in the sequence only when needed - * @static - */ - static kShortestPathsCursor(graph:yfiles.algorithms.Graph,costDP:yfiles.algorithms.IDataProvider,start:yfiles.algorithms.Node,end:yfiles.algorithms.Node,k:number):yfiles.algorithms.ICursor; - /** - * Returns two edge-disjoint paths in a non-negatively weighted directed graph, such that both paths connect nodes s and t - * and have minimum total length. - * @param graph the input graph - * @param source the source node of the shortest pair - * @param target the target node of the shortest pair - * @param directed true if the graph should be considered as directed, false otherwise - * @param costDP the {@link } that returns a double value (cost) for traversing each edge - * @returns a two-dimensional array of {@link }s holding the resulting edge-disjoint paths or null if no such - * edge-disjoint paths exist - * @static - */ - static shortestPair(graph:yfiles.algorithms.Graph,source:yfiles.algorithms.Node,target:yfiles.algorithms.Node,directed:boolean,costDP:yfiles.algorithms.IDataProvider):yfiles.algorithms.EdgeList[]; - /** - * This method solves the single-source shortest path problem for arbitrary graphs. - * @param graph the input graph - * @param s the node from which the shortest path search starts - * @param directed true if the graph should be considered as directed, false otherwise - * @param cost an array of double values that returns the costs for traversing each edge; edge e has cost cost[e.index()] - * @param dist an array of values that will be filled during the execution and returns the shortest distance from node s to all other - * nodes. The distance from s to v is dist[v.index()]. If there is no path from s to v, then - * dist[v.index()] == Double.POSITIVE_INFINITY. - * @param [pred=null] an array of {@link }s that will be filled during the execution and returns for each node t the shortest - * path edge pred[t.index()] which is the last edge on the shortest path from s to t. If t == s or if there is no shortest - * path from s to t, then pred[t.index()] == null. - * @returns true if the weighted graph does not contain a negative-cost cycle, false otherwise - * @see yfiles.algorithms.ShortestPaths#constructNodePath - * @see yfiles.algorithms.ShortestPaths#constructEdgePath - * @see yfiles.algorithms.ShortestPaths#singleSource - * @static - */ - static singleSource(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,directed:boolean,cost:number[],dist:number[],pred?:yfiles.algorithms.Edge[]):boolean; - /** - * This method solves the single-source shortest path problem for arbitrary graphs. - * @param graph the input graph - * @param s the source node - * @param directed true if the graph should be considered as directed, false otherwise - * @param cost the {@link } that returns the double value (cost) for traversing each edge - * @param dist the {@link } that will be filled during the execution and returns a double value (shortest distance) - * from node s to all other nodes or {@link #POSITIVE_INFINITY} if no such paths exist - * @param pred the {@link } that will be filled during the execution and returns for each node t the last edge on the - * shortest path from s to t or null if t == s or no shortest path from s to t exists - * @returns true if the weighted graph does not contain a negative-cost cycle, false otherwise - * @see yfiles.algorithms.ShortestPaths#constructNodePath - * @see yfiles.algorithms.ShortestPaths#constructEdgePath - * @see yfiles.algorithms.ShortestPaths#singleSource - * @static - */ - static singleSource(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,directed:boolean,cost:yfiles.algorithms.IDataProvider,dist:yfiles.algorithms.INodeMap,pred:yfiles.algorithms.INodeMap):boolean; - /** - * This method solves the single-source single-sink shortest path problem for arbitrary graphs. - *

- * Each edge is associated with a non-negative double value that represents the cost of the edge. - *

- *

- * This method returns the shortest distance from node s to node - * t. It also returns information to construct the actual path between these two nodes. - *

- *

- * The costs should be non-negative. - *

- * @param graph the input graph - * @param s the source node - * @param t the sink node - * @param directed true if the graph should be considered as directed, false otherwise - * @param cost an array of double values that returns the costs for traversing each edge; edge e has cost cost[e.index()] - * @param pred an array of {@link }s that will be filled during the execution and returns for each node t the shortest - * path edge pred[t.index()] which is the last edge on the shortest path from s to t. If t == s or if there is no shortest - * path from s to t, then pred[t.index()] == null. - * @returns the distance between sand t if a path between these two nodes exists or Double.POSITIVE_INFINITY otherwise - * @see yfiles.algorithms.ShortestPaths#constructNodePath - * @see yfiles.algorithms.ShortestPaths#constructEdgePath - * @see yfiles.algorithms.ShortestPaths#singleSourceSingleSink - * @see yfiles.algorithms.ShortestPaths#singleSourceSingleSink - * @see yfiles.algorithms.ShortestPaths#singleSourceSingleSink - * @static - */ - static singleSourceSingleSink(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,t:yfiles.algorithms.Node,directed:boolean,cost:number[],pred:yfiles.algorithms.Edge[]):number; - /** - * Like {@link yfiles.algorithms.ShortestPaths#singleSourceSingleSink} but uses {@link yfiles.algorithms.INodeMap}s and - * {@link yfiles.algorithms.IDataProvider}s instead of arrays. - *

- * Each edge is associated with a non-negative double value that represents the cost of the edge. - *

- *

- * The costs should be non-negative. - *

- * @param graph the input graph - * @param s the source node - * @param t the sink node - * @param directed true if the graph should be considered as directed, false otherwise - * @param cost the {@link } that returns the double value (cost) for traversing each edge - * @param pred the {@link } that will be filled during the execution and returns for each node t the last edge on the - * shortest path from s to t or null if t == s or no shortest path from s to t exists - * @returns a shortest {@link path of edges} between source and sink - * @see yfiles.algorithms.ShortestPaths#singleSourceSingleSink - * @see yfiles.algorithms.ShortestPaths#singleSourceSingleSink - * @see yfiles.algorithms.ShortestPaths#singleSourceSingleSink - * @static - */ - static singleSourceSingleSink(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,t:yfiles.algorithms.Node,directed:boolean,cost:yfiles.algorithms.IDataProvider,pred:yfiles.algorithms.INodeMap):number; - /** - * Similar to {@link yfiles.algorithms.ShortestPaths#singleSourceSingleSink} but instead of returning the shortest distance between - * the source and sink the actual shortest edge path between these nodes will be returned. - *

- * Each edge is associated with a non-negative double value that represents the cost of the edge. - *

- *

- * If the returned path is empty, then there is no path between the nodes. - *

- *

- * The costs should be non-negative. - *

- * @param graph the input graph - * @param s the source node - * @param t the sink node - * @param directed true if the graph should be considered as directed, false otherwise - * @param cost an array of double values that returns the costs for traversing each edge; edge e has cost cost[e.index()] - * @returns a shortest {@link path of edges} between source and sink - * @see yfiles.algorithms.ShortestPaths#singleSourceSingleSink - * @see yfiles.algorithms.ShortestPaths#singleSourceSingleSink - * @see yfiles.algorithms.ShortestPaths#singleSourceSingleSink - * @static - */ - static singleSourceSingleSink(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,t:yfiles.algorithms.Node,directed:boolean,cost:number[]):yfiles.algorithms.EdgeList; - /** - * Similar to {@link yfiles.algorithms.ShortestPaths#singleSourceSingleSink} but instead of returning the shortest distance between - * the source and sink the actual shortest edge path between these nodes will be returned. - *

- * Each edge is associated with a non-negative double value that represents the cost of the edge. - *

- *

- * If the returned path is empty, then there is no path between the nodes. - *

- *

- * The costs should be non-negative. - *

- * @param graph the input graph - * @param s the source node - * @param t the sink node - * @param directed true if the graph should be considered as directed, false otherwise - * @param cost the {@link } that returns the double value (cost) for traversing each edge - * @returns a shortest {@link path of edges} between source and sink - * @see yfiles.algorithms.ShortestPaths#singleSourceSingleSink - * @see yfiles.algorithms.ShortestPaths#singleSourceSingleSink - * @see yfiles.algorithms.ShortestPaths#singleSourceSingleSink - * @static - */ - static singleSourceSingleSink(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,t:yfiles.algorithms.Node,directed:boolean,cost:yfiles.algorithms.IDataProvider):yfiles.algorithms.EdgeList; - /** - * Solves the single-source shortest path problem for arbitrary graphs in which each edge has a uniform cost of - * 1.0. - * @param graph the input graph - * @param s the node from which the shortest path search starts - * @param directed true if the graph should be considered as directed, false otherwise - * @param dist an array of values that will be filled during the execution and returns the shortest distance from node s to all other - * nodes. The distance from s to v is dist[v.index()]. If there is no path from s to v, then - * dist[v.index()] == Double.POSITIVE_INFINITY. - * @param [pred=null] an array of {@link }s that will be filled during the execution and returns for each node t the shortest - * path edge pred[t.index()] which is the last edge on the shortest path from s to t. If t == s or if there is no shortest - * path from s to t, then pred[t.index()] == null. - * @see yfiles.algorithms.ShortestPaths#constructNodePath - * @see yfiles.algorithms.ShortestPaths#constructEdgePath - * @static - */ - static uniform(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,directed:boolean,dist:number[],pred?:yfiles.algorithms.Edge[]):void; - /** - * Like {@link yfiles.algorithms.ShortestPaths#uniform} but uses {@link yfiles.algorithms.INodeMap}s instead of arrays. - * @param graph the input graph - * @param s the node from which the shortest path search starts - * @param directed true if the graph should be considered as directed, false otherwise - * @param dist the {@link } that will be filled during the execution and returns a double value (shortest distance) - * from node s to all other nodes or {@link #POSITIVE_INFINITY} if no such paths exist - * @param pred the {@link } that will be filled during the execution and returns for each node t the last edge on the - * shortest path from s to t or null if t == s or no shortest path from s to t exists - * @see yfiles.algorithms.ShortestPaths#uniform - * @see yfiles.algorithms.ShortestPaths#constructNodePath - * @see yfiles.algorithms.ShortestPaths#constructEdgePath - * @static - */ - static uniform(graph:yfiles.algorithms.Graph,s:yfiles.algorithms.Node,directed:boolean,dist:yfiles.algorithms.INodeMap,pred:yfiles.algorithms.INodeMap):void; - /** - * Convenience method that returns an array containing uniform edge costs of 1.0 for each edge of the given graph. - * @param graph the input graph - * @returns an array that contains uniform edge costs of value 1.0 (i.e., for each edge e: cost[e.index()] == 1.0) - * @static - */ - static uniformCost(graph:yfiles.algorithms.Graph):number[]; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.ShortestPaths; - } - /** - * This class provides methods for efficiently sorting graph elements in graph structures. - * @class - * @static - */ - export interface Sorting extends yfiles.lang.Object{} - export class Sorting { - /** - * Sorts the nodes of a given graph by degree in ascending order. - * @param graph the given graph - * @returns an array of {@link }s sorted by degree in ascending order - * @static - */ - static sortNodesByDegree(graph:yfiles.algorithms.Graph):yfiles.algorithms.Node[]; - /** - * Sorts the nodes of a given graph by an integer key associated with each node through a {@link yfiles.algorithms.IDataProvider}. - *

- * The nodes are sorted in ascending order. - *

- * @param graph the given graph - * @param keys the {@link } that returns the keys based on which the nodes will be sorted - * @returns an array of {@link }s sorted by an integer key in ascending order - * @static - */ - static sortNodesByIntKey(graph:yfiles.algorithms.Graph,keys:yfiles.algorithms.IDataProvider):yfiles.algorithms.Node[]; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Sorting; - } - /** - * This class provides (minimum) spanning tree algorithms for graphs. - *

- * Definitions - *

- *
    - *
  • A spanning tree of an undirected connected graph is a subset of its edges that induce a tree that connects all nodes of the graph.
  • - *
  • - * A minimum spanning tree of a weighted connected graph is a spanning tree whose edges have minimum overall cost among all spanning trees of - * that graph. - *
  • - *
- * @class - * @static - */ - export interface SpanningTrees extends yfiles.lang.Object{} - export class SpanningTrees { - /** - * Returns the overall cost of a previously calculated minimum spanning tree. - * @param treeEdges the given {@link list} of edges that form a minimum spanning tree - * @param edgeCost the {@link } that returns a double value (cost) for each tree edge - * @returns the overall cost of the tree edges - * @static - */ - static cost(treeEdges:yfiles.algorithms.EdgeList,edgeCost:yfiles.algorithms.IDataProvider):number; - /** - * Calculates a minimum spanning tree for the given graph. - *

- * The implementation is based on an algorithm originally published in: - *

- *
    - *
  • J.B. Kruskal. On the shortest spanning subtree of a graph and the traveling salesman problem. Proceedings of the American Mathematical Society, pages 48-50, 1956.
  • - *
- * @param graph the input graph - * @param cost the {@link } that returns a double value (cost) for each edge - * @returns a {@link list} containing the edges that form the minimum spanning tree - * @static - */ - static kruskal(graph:yfiles.algorithms.Graph,cost:yfiles.algorithms.IDataProvider):yfiles.algorithms.EdgeList; - /** - * Calculates a minimum spanning tree for the given graph. - *

- * Currently, the result is obtained by calling {@link yfiles.algorithms.SpanningTrees#prim}. - *

- * @param graph the input graph - * @param cost the {@link } that returns a double value (cost) for each edge - * @returns a {@link list} containing the edges that form the minimum spanning tree - * @static - */ - static minimum(graph:yfiles.algorithms.Graph,cost:yfiles.algorithms.IDataProvider):yfiles.algorithms.EdgeList; - /** - * Calculates a minimum spanning tree for the given graph. - *

- * The implementation is based on an algorithm originally published in: - *

- *
    - *
  • R.C. Prim. Shortest connection networks and some generalizations. Bell System Technical Journal, 36:1389-1401, 1957.
  • - *
- * @param graph the input graph - * @param cost the {@link } that returns a double value (cost) for each edge - * @returns a {@link list} containing the edges that form the minimum spanning tree - * @static - */ - static prim(graph:yfiles.algorithms.Graph,cost:yfiles.algorithms.IDataProvider):yfiles.algorithms.EdgeList; - /** - * Calculates a spanning tree for the given graph in which each edge has a uniform cost of 1.0. - * @param graph the input graph - * @returns a {@link list} containing the edges that form the minimum spanning tree - * @static - */ - static uniform(graph:yfiles.algorithms.Graph):yfiles.algorithms.EdgeList; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.SpanningTrees; - } - /** - * This class provides algorithms to compute reachability information for directed, acyclic graphs. - *

- * Definitions - *

- *
    - *
  • - * Reflexive, transitive closure: Let G = (V,E) be a directed acyclic graph. The reflexive, transitive closure of G is a graph which contains edge (v,w) only if there exists a path - * from v to w in G. - *
  • - *
  • - * Transitive reduction: Let G = (V,E) be a directed acyclic graph. The transitive reduction of G is a graph which contains edge (v,w) only if there exists no path - * from v to w in G of length 2 or more. - *
  • - *
- * @class - * @static - */ - export interface Transitivity extends yfiles.lang.Object{} - export class Transitivity { - /** - * Calculates the transitive closure for a directed acyclic graph. - *

- * Given a G = (V,E) be a directed acyclic graph. The reflexive, transitive closure of G is a graph which contains edge (v,w) only if there exists a - * path from v to w in G. - *

- * @param graph the input graph to which this method will add transitive edges, if necessary - * @param [addedEdges=null] a {@link list} that will be filled during the execution and contains the edges that have been added to the graph by this method - * @static - */ - static transitiveClosure(graph:yfiles.algorithms.Graph,addedEdges?:yfiles.algorithms.EdgeList):void; - /** - * Calculates the transitive reduction for a directed acyclic graph. - *

- * The transitive edges in the graph will be removed by this method. - *

- *

- * Given G = (V,E) be a directed acyclic graph. The transitive reduction of G is a graph which contains edge (v,w) only if there exists no path - * from v to w in G of length 2 or more. - *

- * @param graph the input graph - * @param [transitiveEdges=null] a {@link list} that will be filled during the execution and contains all transitive edges of the given graph; removal of these - * edges will yield the transitive reduction of the graph - * @static - */ - static transitiveReduction(graph:yfiles.algorithms.Graph,transitiveEdges?:yfiles.algorithms.EdgeList):void; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Transitivity; - } - /** - * This class provides diverse algorithms and services for tree-structured graphs or subgraphs. - *

- * Definitions - *

- *
    - *
  • - * Tree: An acyclic graph, in which any pair of vertices (nodes) is connected through a path. If one vertex of a tree is - * distinguished from the other vertices, then this vertex is called the root and the tree is called a rooted tree. - *
  • - *
  • Directed rooted tree: A rooted tree where edges are directed from the root to the leaves.
  • - *
  • Depth: The depth of a vertex in a rooted tree is the number of edges of the unique path between this vertex and the root.
  • - *
  • - * Parent: In a rooted tree a vertex v is called parent of a vertex w if v and w are adjacent (i.e. connected by an edge) and the - * unique path between w and the root contains v. Note that each vertex except the root has exactly one parent. - *
  • - *
  • Children: In a rooted tree a vertex w is called child of a vertex v if v is the parent of w. A vertex may have several children.
  • - *
  • N-ary tree: A directed rooted tree where each node has a maximum of n children.
  • - *
  • Forest: A graph whose connected components are trees.
  • - *
  • - * Leaf: A leaf v is a node with out-degree (i.e., the number of edges having v as a target) zero if the input is a directed - * rooted tree, and a node with degree (i.e., the number of edges incident to v) one, otherwise. - *
  • - *
  • Subtree: A subtree of a tree T is a subgraph of T which is also a tree.
  • - *
  • - * Nearest or Lowest or Least common ancestor: The nearest common ancestor of two nodes u and v in a tree graph is the shared ancestor of u and v that is located - * farthest from the root. - *
  • - *
  • Eccentricity: The eccentricity of a tree node is the maximum distance to any other node.
  • - *
  • Center node: The center of a tree is the set of nodes that have minimal eccentricity.
  • - *
- * @class - * @static - */ - export interface Trees extends yfiles.lang.Object{} - export class Trees { - static collectSubtree(root:yfiles.algorithms.Node,nodes:yfiles.algorithms.NodeList):void; - /** - * Converts the given tree to a directed rooted tree with the given node as root element by reversing some edges. - *

- * A list of all reversed edges will be returned by this method. - *

- * @param tree the given tree - * @param [root=null] the given root element - * @returns an {@link } containing the reversed edges - * @static - */ - static directTree(tree:yfiles.algorithms.Graph,root?:yfiles.algorithms.Node):yfiles.algorithms.EdgeList; - /** - * Returns the center node of an undirected tree. - *

- * The center node has the property of inducing a minimum depth tree when being used as the root of that tree. - *

- * @param tree the given undirected tree - * @returns the center node of the given undirected tree - * @static - */ - static getCenterRoot(tree:yfiles.algorithms.Graph):yfiles.algorithms.Node; - /** - * Returns all leaf nodes of the given tree. - *

- * A leaf node is a node with outdegree == 0 if the input is a directed rooted tree, and a node with - * degree == 1, otherwise. - *

- * @param tree the given tree - * @param directedRootedTree true if the algorithm should consider the tree as directed, false otherwise - * @returns a {@link } that contains all leaf nodes of the given tree - * @static - */ - static getLeafNodes(tree:yfiles.algorithms.Graph,directedRootedTree:boolean):yfiles.algorithms.NodeList; - /** - * Returns the nearest common ancestor of a subset of nodes within a directed rooted tree. - *

- * It is not part of the given subset. - *

- * @param tree the given directed rooted tree - * @param root the root of the tree - * @param rootedDownward true if the tree is directed from the root to the leaves, false otherwise - * @param nodes the subset of nodes - * @returns the {@link nearest common ancestor} of the given subset of nodes - * @static - */ - static getNearestCommonAncestor(tree:yfiles.algorithms.Graph,root:yfiles.algorithms.Node,rootedDownward:boolean,nodes:yfiles.algorithms.NodeList):yfiles.algorithms.Node; - /** - * Returns a possible root for the given (undirected) tree. - *

- * More precisely: - *

- *
    - *
  • If the input is a directed rooted tree or reversed directed rooted tree, it returns the corresponding root node.
  • - *
  • - * If the input is a tree, the method returns a maximum weight center node as defined in - * {@link yfiles.algorithms.Trees#getWeightedCenterNode}. - *
  • - *
  • If the input is not a tree, a node with indegree == 0 (or outdegree == 0) is returned.
  • - *
- * @param tree the given tree - * @returns a possible root for the given tree - * @static - */ - static getRoot(tree:yfiles.algorithms.Graph):yfiles.algorithms.Node; - /** - * Returns the depths of each subtree of a rooted directed tree. - * @param tree a rooted directed tree graph - * @param subtreeDepthMap the {@link } that will be filled during the execution with the depth of the subtree rooted at each - * node - * @static - */ - static getSubTreeDepths(tree:yfiles.algorithms.Graph,subtreeDepthMap:yfiles.algorithms.INodeMap):void; - /** - * Returns the size (number of nodes) of each subtree of a rooted directed tree. - * @param tree a rooted directed tree graph - * @param subtreeSizeMap the {@link } that will be filled during the execution with the size of the subtree rooted at each - * node - * @static - */ - static getSubTreeSizes(tree:yfiles.algorithms.Graph,subtreeSizeMap:yfiles.algorithms.INodeMap):void; - /** - * Returns an array of {@link yfiles.algorithms.EdgeList} objects each containing edges that belong to a maximal directed subtree - * of the given graph. - *

- * This method can also be applied to the result obtained by - * {@link yfiles.algorithms.Trees#getUndirectedTreeNodes}. In this case, the subtrees are considered to be undirected. - *

- * @param graph the given graph - * @param [treeNodes=null] an array of {@link }s previously calculated by {@link #getTreeNodes} - * @returns an array of {@link } objects each containing edges that belong to a maximal subtree - * @static - */ - static getTreeEdges(graph:yfiles.algorithms.Graph,treeNodes?:yfiles.algorithms.NodeList[]):yfiles.algorithms.EdgeList[]; - /** - * Returns an array of {@link yfiles.algorithms.NodeList} objects each containing nodes that belong to a maximal directed subtree - * of the given graph. - *

- * For each list of tree nodes, the first node element is the root of a tree. On each such root, all outgoing edges connect - * to nodes in the subtree and each in-degree of the root is at least two. - *

- * @param graph the given graph - * @returns an array of {@link } objects each containing nodes that belong to a maximal directed subtree - * @static - */ - static getTreeNodes(graph:yfiles.algorithms.Graph):yfiles.algorithms.NodeList[]; - /** - * Returns an array of {@link yfiles.algorithms.NodeList} objects each containing nodes that belong to a maximal undirected subtree - * of the given graph. - *

- * For each list of tree nodes, the first node is the only node of the subtree that may be incident to non-tree edges. - *

- * @param graph the given graph - * @returns an array of {@link } objects each containing nodes that belong to a maximal undirected subtree - * @static - */ - static getUndirectedTreeNodes(graph:yfiles.algorithms.Graph):yfiles.algorithms.NodeList[]; - /** - * Finds a node used by the greatest number of all (undirected) paths interconnecting all nodes with each other. - *

- * The number of paths per node are stored in the given {@link yfiles.algorithms.INodeMap}. - *

- * @param tree the given tree - * @param [intWeight=null] the {@link } that holds the number of paths per node - * @returns a {@link } used by the greatest number of all undirected paths - * @static - */ - static getWeightedCenterNode(tree:yfiles.algorithms.Graph,intWeight?:yfiles.algorithms.INodeMap):yfiles.algorithms.Node; - /** - * Checks whether or not the given graph is a forest. - *

- * If - * directedRootedTree == true, each component has to be a directed rooted tree. Otherwise, each component has to be an - * undirected tree. - *

- * @param graph the given graph - * @param directedRootedTree true if the algorithm should check for directed rooted trees, false otherwise - * @returns true if the given graph is a forest, false otherwise - * @static - */ - static isForest(graph:yfiles.algorithms.Graph,directedRootedTree:boolean):boolean; - /** - * Checks whether or not the given graph is a forest, that is, a graph whose connected components are directed rooted - * trees. - * @param graph the given graph - * @returns true if the given graph is a forest, false otherwise - * @static - */ - static isForest(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether or not the given graph is a directed rooted tree in which each node has a maximum of n children. - * @param graph the given graph - * @param n the allowed maximum of children - * @returns true if the given graph is a n-ary tree, false otherwise - * @static - */ - static isNaryTree(graph:yfiles.algorithms.Graph,n:number):boolean; - /** - * Checks whether or not the given graph is a directed rooted tree. - * @param graph the given graph - * @returns true if the given graph is a directed rooted tree, false otherwise - * @static - */ - static isRootedTree(graph:yfiles.algorithms.Graph):boolean; - /** - * Checks whether or not the given graph is an undirected tree. - * @param graph the given graph - * @returns true if the given graph is an undirected tree, false otherwise - * @static - */ - static isTree(graph:yfiles.algorithms.Graph):boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Trees; - } - /** - * This class provides access to some Comparator instances that are commonly used in yFiles. - * @class - * @static - */ - export interface Comparers extends yfiles.lang.Object{} - export class Comparers { - /** - * Compares the specified floating point numbers. - *

- * Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than - * the second. - *

- *

- * Warning: This method does not handle NaN! If you need NaN-safe comparison, use {@link yfiles.lang.Object#compare} instead. - *

- * @param d1 the first number to compare. - * @param d2 the second number to compare. - * @returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the - * second. - * @see yfiles.collections.IComparer.#compare - * @static - */ - static compare(d1:number,d2:number):number; - /** - * Returns a {@link yfiles.collections.IComparer.} that compares to Objects of type Comparable. - * @returns - * @static - */ - static createComparableComparer():yfiles.collections.IComparer; - /** - * Returns a {@link yfiles.collections.IComparer.} that compares objects of arbitrary type. - *

- * Two objects are compared by comparing the {@link yfiles.lang.IComparable} instances the given data provider returns for each of - * these objects. - *

- * @param dp a data provider that must return a {@link } for each object that is being compared by this comparator. - * @returns a {@link } that compares arbitrary objects. - * @static - */ - static createComparableDataComparer(dp:yfiles.algorithms.IDataProvider):yfiles.collections.IComparer; - /** - * Returns a {@link yfiles.collections.IComparer.} that compares objects of arbitrary type. - *

- * Two objects are compared by comparing the int value the given data provider returns for each of these objects. - *

- * @param dp a data provider that must return an int value for each object that is being compared by this comparator. - * @returns a {@link } that compares arbitrary objects. - * @static - */ - static createIntDataComparer(dp:yfiles.algorithms.IDataProvider):yfiles.collections.IComparer; - /** - * Returns a {@link yfiles.collections.IComparer.} that compares objects of type {@link yfiles.algorithms.Edge}. - *

- * Two edges are compared by comparing their source nodes. Each source node e.source() in turn is compared by the int value - * provided by the given data provider: dp.getInt(e.source()). - *

- * @param dp a data provider that must return an int value for the source node of each edge being compared. - * @returns a {@link } that compares edges. - * @static - */ - static createIntDataSourceComparer(dp:yfiles.algorithms.IDataProvider):yfiles.collections.IComparer; - /** - * Returns a {@link yfiles.collections.IComparer.} that compares objects of type {@link yfiles.algorithms.Edge}. - *

- * Two edges are compared by comparing their target nodes. Each target node e.target() in turn is compared by the int value - * provided by the given data provider: dp.getInt(e.target()). - *

- * @param dp a data provider that must return an int value for the target node of each edge being compared. - * @returns a {@link } that compares edges. - * @static - */ - static createIntDataTargetComparer(dp:yfiles.algorithms.IDataProvider):yfiles.collections.IComparer; - /** - * Returns a {@link yfiles.collections.IComparer.} that compares objects of arbitrary type. - *

- * Two objects are compared by comparing the double value the given data provider returns for each of these objects. - *

- * @param dp a data provider that must return a double value for each object that is being compared by this comparator. - * @returns a {@link } that compares arbitrary objects. - * @static - */ - static createNumberDataComparer(dp:yfiles.algorithms.IDataProvider):yfiles.collections.IComparer; - /** - * Returns a {@link yfiles.collections.IComparer.} that compares objects of type {@link yfiles.algorithms.Edge}. - *

- * Two edges are compared by comparing their source nodes. Each source node e.source() in turn is compared by the double - * value provided by the given data provider: dp.getDouble(e.source()). - *

- * @param dp a data provider that must return a double value for the source node of each edge being compared. - * @returns a {@link } that compares edges. - * @static - */ - static createNumberDataSourceComparer(dp:yfiles.algorithms.IDataProvider):yfiles.collections.IComparer; - /** - * Returns a {@link yfiles.collections.IComparer.} that compares objects of type {@link yfiles.algorithms.Edge}. - *

- * Two edges are compared by comparing their target nodes. Each target node e.target() in turn is compared by the double - * value provided by the given data provider: dp.getDouble(e.target()). - *

- * @param dp a data provider that must return a double value for the target node of each edge being compared. - * @returns a {@link } that compares edges. - * @static - */ - static createNumberDataTargetComparer(dp:yfiles.algorithms.IDataProvider):yfiles.collections.IComparer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Comparers; - } - /** - * Provides utility methods for working with {@link yfiles.algorithms.ICursor cursors}. - * @class - * @static - */ - export interface Cursors extends yfiles.lang.Object{} - export class Cursors { - /** - * Creates a new cursor that provides a logical view on the concatenation of the two given cursors. - * @param c1 - first concatenation argument - * @param c2 - second concatenation argument - * @returns - * @static - */ - static concatenate(c1:yfiles.algorithms.ICursor,c2:yfiles.algorithms.ICursor):yfiles.algorithms.ICursor; - /** - * Creates a cursor view of the given collection. - *

- * Creates an ICursor view of the given collection. - *

- *

- * Note that the returned cursor does not support the {@link yfiles.algorithms.ICursor#prev prev} and {@link yfiles.algorithms.ICursor#toLast toLast} operations. - *

- * Type parameter T. - * @param c The collection. - * @returns The cursor view of the given collection. - * @template T - * @static - */ - static createCursor(c:yfiles.collections.ICollection):yfiles.algorithms.ICursor; - /** - * Creates a cursor view of the given collection. - *

- * Note that the returned cursor does not support the operations {@link yfiles.algorithms.ICursor#prev prev}, {@link yfiles.algorithms.ICursor#toLast toLast}, and - * {@link yfiles.algorithms.IEdgeCursor#cyclicPrev}. - *

- * Type parameter T. - * @param c The collection. - * @returns an {@link } view of the given collection. - * @template T - * @static - */ - static createEdgeCursor(c:yfiles.collections.ICollection):yfiles.algorithms.IEdgeCursor; - /** - * Creates a cursor view of the given collection. - *

- * Note that the returned cursor does not support the operations {@link yfiles.algorithms.ICursor#prev prev}, {@link yfiles.algorithms.ICursor#toLast toLast}, and - * {@link yfiles.algorithms.INodeCursor#cyclicPrev}. - *

- * Type parameter T. - * @param c The collection. - * @returns an {@link } view of the given collection. - * @template T - * @static - */ - static createNodeCursor(c:yfiles.collections.ICollection):yfiles.algorithms.INodeCursor; - /** - * Creates or fills an array with the values provided by the cursor - * @param cursor the cursor - * @param dest the array to fill with the values or null if the method should create the array itself - * @returns dest or a newly created array filled with the values from cursor - * @static - */ - static toArray(cursor:yfiles.algorithms.ICursor,dest:any[]):any[]; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Cursors; - } - /** - * An abstract adapter class for providing data. - *

- * The data provision methods in this class throw a {@link yfiles.lang.Exception} and {@link yfiles.algorithms.DataProviderAdapter#defined} - * always returns false. - *

- *

- * This class exists as a convenience for creating data provider objects. - *

- *

- * Extend this class to provide either typed or untyped data for a certain lookup domain. - *

- * @class - * @implements {yfiles.algorithms.IDataProvider} - */ - export interface DataProviderAdapter extends yfiles.lang.Object,yfiles.algorithms.IDataProvider{} - export class DataProviderAdapter { - /** - * Returns false for all data holders. - *

- * Subclasses should override this method to make clear for which data holders there is a value accessible via this data - * provider. - *

- * @param dataHolder - * @returns false. - */ - defined(dataHolder:any):boolean; - /** - * Subclasses may override this method to provide access to object values. - * @param dataHolder - * @returns - * @throws {Stubs.Exceptions.NotSupportedError} unless overwritten. - */ - get(dataHolder:any):any; - /** - * Subclasses may override this method to provide access to boolean values. - * @param dataHolder - * @returns - * @throws {Stubs.Exceptions.NotSupportedError} unless overwritten. - */ - getBoolean(dataHolder:any):boolean; - /** - * Subclasses may override this method to provide access to integer values. - * @param dataHolder - * @returns - * @throws {Stubs.Exceptions.NotSupportedError} unless overwritten. - */ - getInt(dataHolder:any):number; - /** - * Subclasses may override this method to provide access to double values. - * @param dataHolder - * @returns - * @throws {Stubs.Exceptions.NotSupportedError} unless overwritten. - */ - getNumber(dataHolder:any):number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.DataProviderAdapter; - } - /** - * This class provides convenience and transformation services for DataProviders. - * @class - * @static - */ - export interface DataProviders extends yfiles.lang.Object{} - export class DataProviders { - /** - * Returns a DataProvider that returns the given value for each key. - * @param data constant Object data returned by the created data provider. - * @returns a data provider view of a single value. - * @static - */ - static createConstantDataProvider(data:any):yfiles.algorithms.IDataProvider; - /** - * Returns a DataProvider view of an Object array defined for edges. - *

- * The Object value data[edge.index()] will be returned by the data provider upon the method call get(edge). - *

- * @param data array data for each edge of a static graph - * @returns a data provider view of the given array - * @static - */ - static createEdgeDataProvider(data:any[]):yfiles.algorithms.IDataProvider; - /** - * Returns a DataProvider view of a double, int, boolean and Object array defined for edges. - *

- * The double value doubleData[edge.index()] will be returned by the data provider upon the method call getDouble(edge). - *

- *

- * The int value intData[edge.index()] will be returned by the data provider upon the method call getInt(edge). - *

- *

- * The boolean value boolData[edge.index()] will be returned by the data provider upon the method call getBool(edge). - *

- *

- * The Object value objectData[edge.index()] will be returned by the data provider upon the method call get(edge). - *

- * @param doubleData double data for each edge of a static graph - * @param intData int data for each edge of a static graph - * @param boolData boolean data for each edge of a static graph - * @param objectData Object data for each edge of a static graph - * @returns a data provider view of the given arrays - * @static - */ - static createEdgeDataProviderForArrays(doubleData:number[],intData:number[],boolData:boolean[],objectData:any[]):yfiles.algorithms.IDataProvider; - /** - * Returns a DataProvider view of a boolean array defined for edges. - *

- * The boolean value data[edge.index()] will be returned by the data provider upon the method call getBool(edge). - *

- * @param data array data for each edge of a static graph - * @returns a data provider view of the given array - * @static - */ - static createEdgeDataProviderForBoolean(data:boolean[]):yfiles.algorithms.IDataProvider; - /** - * Returns a DataProvider view of an int array defined for edges. - *

- * The int value data[edge.index()] will be returned by the data provider upon the method call getInt(edge). - *

- * @param data array data for each edge of a static graph - * @returns a data provider view of the given array - * @static - */ - static createEdgeDataProviderForInt(data:number[]):yfiles.algorithms.IDataProvider; - /** - * Returns a DataProvider view of a double array defined for edges. - *

- * The double value data[edge.index()] will be returned by the data provider upon the method call getDouble(edge). - *

- * @param data array data for each edge of a static graph - * @returns a data provider view of the given array - * @static - */ - static createEdgeDataProviderForNumber(data:number[]):yfiles.algorithms.IDataProvider; - /** - * Returns a DataProvider that returns the negated boolean values provided by another data provider. - * @param data - * @returns - * @static - */ - static createNegatedDataProvider(data:yfiles.algorithms.IDataProvider):yfiles.algorithms.IDataProvider; - /** - * Returns a DataProvider view of an Object array defined for nodes. - *

- * The Object value data[node.index()] will be returned by the data provider upon the method call get(node). - *

- * @param data array data for each node of a static graph - * @returns a data provider view of the given array - * @static - */ - static createNodeDataProvider(data:any[]):yfiles.algorithms.IDataProvider; - /** - * Returns a DataProvider view of a boolean array defined for nodes. - *

- * The boolean value data[node.index()] will be returned by the data provider upon the method call getBool(node). - *

- * @param data array data for each node of a static graph - * @returns a data provider view of the given array - * @static - */ - static createNodeDataProviderForBoolean(data:boolean[]):yfiles.algorithms.IDataProvider; - /** - * Returns a DataProvider view of an int array defined for nodes. - *

- * The int value data[node.index()] will be returned by the data provider upon the method call getInt(node). - *

- * @param data array data for each node of a static graph - * @returns a data provider view of the given array - * @static - */ - static createNodeDataProviderForInt(data:number[]):yfiles.algorithms.IDataProvider; - /** - * Returns a DataProvider view of a double array defined for nodes. - *

- * The double value data[node.index()] will be returned by the data provider upon the method call getDouble(node). - *

- * @param data array data for each node of a static graph - * @returns a data provider view of the given array - * @static - */ - static createNodeDataProviderForNumber(data:number[]):yfiles.algorithms.IDataProvider; - /** - * Returns a DataProvider view of a double, int, boolean and Object array defined for nodes. - *

- * The double value doubleData[node.index()] will be returned by the data provider upon the method call getDouble(node). - *

- *

- * The int value intData[node.index()] will be returned by the data provider upon the method call getInt(node). - *

- *

- * The boolean value boolData[node.index()] will be returned by the data provider upon the method call getBool(node). - *

- *

- * The Object value objectData[node.index()] will be returned by the data provider upon the method call get(node). - *

- * @param doubleData double data for each node of a static graph - * @param intData int data for each node of a static graph - * @param boolData boolean data for each node of a static graph - * @param objectData Object data for each node of a static graph - * @returns a data provider view of the given arrays - * @static - */ - static createNodeDataProviderWithArrays(doubleData:number[],intData:number[],boolData:boolean[],objectData:any[]):yfiles.algorithms.IDataProvider; - /** - * Returns a DataProvider for edges that return the data provider values bound to their source nodes. - * @param nodeData - * @returns - * @static - */ - static createSourceDataProvider(nodeData:yfiles.algorithms.IDataProvider):yfiles.algorithms.IDataProvider; - /** - * Returns a DataProvider for edges that return the data provider values bound to their target nodes. - * @param nodeData - * @returns - * @static - */ - static createTargetDataProvider(nodeData:yfiles.algorithms.IDataProvider):yfiles.algorithms.IDataProvider; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.DataProviders; - } - /** - * Provides functionality to hide and unhide partitions of nodes and their adjacent edges of a graph temporarily for - * algorithmic operations. - *

- * This class can be used to temporarily hide away certain elements of a graph and to unhide that parts at a later time - * again. Instances of this class keep track of graph elements that were hidden from a graph in order to make them visible - * again at a later time. - *

- *

- * Note that this class should not be used to hide elements from a Graph2D for pure hiding purposes. Since this class will - * by default prevent the graph instance from firing events, other code might cease to work correctly. Use this class for - * short term removal of nodes and edges, only. - *

- * @class - */ - export interface GraphPartitionManager extends yfiles.lang.Object{} - export class GraphPartitionManager { - /** - * Instantiates a new GraphPartitionManager for the given graph. - *

- * All non-static hiding and unhiding methods will refer to the given graph. - *

- * @param graph - * @param partitionId - */ - constructor(graph:yfiles.algorithms.Graph,partitionId:yfiles.algorithms.IDataProvider); - /** - * Assures that only nodes are visible in the graph that are associated with the given partitionId. - * @param partitionId the partitionId for the nodes that will be made visible - */ - displayPartition(partitionId:any):void; - /** - * Hides the given list of nodes from the graph. - *

- * The hidden nodes and adjacent edges will be stored so that they can be unhidden again at a later time. - *

- * @param nl - */ - hide(nl:yfiles.algorithms.NodeList):void; - /** - * Hides the given list of edges from the graph. - *

- * The hidden edges will be stored so that they can be unhidden again at a later time. - *

- * @param el - */ - hide(el:yfiles.algorithms.EdgeList):void; - /** - * Hides the given edge from the graph. - *

- * The hidden edge will be stored so that they can be unhidden again at a later time. - *

- * @param e - */ - hide(e:yfiles.algorithms.Edge):void; - /** - * Hides the given node and all it's adjacent edges from the graph. - *

- * The hidden elements will be stored so that they can be unhidden again at a later time. - *

- * @param v - */ - hide(v:yfiles.algorithms.Node):void; - /** - * Hides all nodes and edges from this graph. - *

- * The hidden elements will be stored so that they can be unhidden again at a later time. - *

- */ - hideAll():void; - /** - * Hides the given edges from the graph. - *

- * The hidden edges will be stored so that they can be unhidden again at a later time. - *

- * @param ec - */ - hideEdgeCursor(ec:yfiles.algorithms.IEdgeCursor):void; - /** - * Hides all edges from this graph. - *

- * The hidden edges will be stored so that they can be unhidden again at a later time. - *

- */ - hideEdges():void; - /** - * Hides the given elements from the graph. - *

- * The hidden nodes and adjacent edges will be stored so that they can be unhidden again at a later time. - *

- * @param cursor - */ - hideItemCursor(cursor:yfiles.algorithms.ICursor):void; - /** - * Hides multiple edges from the graph. - *

- * If there are multiple edges connecting two nodes then all but one (representative) of these edges will be hidden. The - * hidden edges will be stored so that they can be unhidden again at a later time. - *

- */ - hideMultipleEdges():void; - /** - * Hides the given nodes from the graph. - *

- * The hidden nodes and adjacent edges will be stored so that they can be unhidden again at a later time. - *

- * @param nc - */ - hideNodeCursor(nc:yfiles.algorithms.INodeCursor):void; - /** - * Hides nodes and adjacent edges that have the given partitionId associated. - * @param partitionId the id - */ - hidePartition(partitionId:any):void; - /** - * Hides all self-loop edges from this graph. - *

- * The hidden edges will be stored so that they can be unhidden again at a later time. - *

- */ - hideSelfLoops():void; - /** - * Initializes internal data structures using the new DataProvider. - *

- * This method must also be called whenever the content of the given DataProvider changes. - *

- * @param partitionId the data provider that holds the partitionIds for all elements. - */ - initPartitions(partitionId:yfiles.algorithms.IDataProvider):void; - /** - * Hides all self-loops and multiple edges from the graph. - *

- * The overall effect of this method is that the minimum number of edges are hidden from the graph such that it contains no - * self-loops and no multiple edges anymore. The hidden edges will be stored so that they can be unhidden again at a later - * time. - *

- */ - simplifyGraph():void; - /** - * This method will be called whenever the partition manager is requested to unhide the given node from the graph. - * @param v - * @protected - */ - unhide(v:yfiles.algorithms.Node):void; - /** - * This method will be called whenever the partition manager is requested to unhide the given edge from the graph. - * @param e - * @protected - */ - unhide(e:yfiles.algorithms.Edge):void; - /** - * Unhides all formerly hidden elements in the graph. - */ - unhideAll():void; - /** - * Unhides all formerly hidden edges in the graph. - */ - unhideEdges():void; - /** - * Unhides all formerly hidden nodes in the graph. - *

- * Note that this method does not unhide hidden edges. - *

- */ - unhideNodes():void; - /** - * Unhides nodes that have the given partitionId associated. - * @param partitionId the id - */ - unhidePartition(partitionId:any):void; - /** - * Gets or sets whether or not this partition manager should fire graph events. - *

- * By default the partition manager does not fire graph events. - *

- * @type {boolean} - */ - fireGraphEventsEnabled:boolean; - /** - * Gets the Graph for which this partition manager was created. - * @type {yfiles.algorithms.Graph} - */ - graph:yfiles.algorithms.Graph; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.GraphPartitionManager; - } - /** - * Provides functionality to hide and unhide nodes and edges of a graph temporarily for algorithmic operations. - *

- * This class can be used to temporarily hide away certain elements of a graph and to unhide that parts at a later time - * again. Instances of this class keep track of graph elements that were hidden from a graph in order to make them visible - * again at a later time. - *

- *

- * Note that this class should not be used to hide elements from a Graph2D for pure hiding purposes. Since this class will - * by default prevent the graph instance from firing events, other code might cease to work correctly. Use this class for - * short term removal of nodes and edges, only. - *

- * @class - */ - export interface LayoutGraphHider extends yfiles.lang.Object{} - export class LayoutGraphHider { - /** - * Instantiates a new GraphHider for the given graph. - *

- * All non-static hiding and unhiding methods will refer to the given graph. - *

- * @param g - */ - constructor(g:yfiles.algorithms.Graph); - /** - * The edges that are currently hidden - * @returns a cursor of the currently hidden edges - */ - getHiddenEdgeCursor():yfiles.algorithms.IEdgeCursor; - /** - * The nodes that are currently hidden - * @returns a cursor of the currently hidden nodes - */ - getHiddenNodeCursor():yfiles.algorithms.INodeCursor; - /** - * Hides the given list of nodes from the graph. - *

- * The hidden nodes and adjacent edges will be stored so that they can be unhidden again at a later time. - *

- * @param nl - */ - hide(nl:yfiles.algorithms.NodeList):void; - /** - * Hides the given list of edges from the graph. - *

- * The hidden edges will be stored so that they can be unhidden again at a later time. - *

- * @param el - */ - hide(el:yfiles.algorithms.EdgeList):void; - /** - * Hides the given edge from the graph. - *

- * The hidden edge will be stored so that they can be unhidden again at a later time. - *

- * @param e - */ - hide(e:yfiles.algorithms.Edge):void; - /** - * Hides the given node and all it's adjacent edges from the graph. - *

- * The hidden elements will be stored so that they can be unhidden again at a later time. - *

- * @param v - */ - hide(v:yfiles.algorithms.Node):void; - /** - * Hides all nodes and edges from this graph. - *

- * The hidden elements will be stored so that they can be unhidden again at a later time. - *

- */ - hideAll():void; - /** - * Hides the given edges from the graph. - *

- * The hidden edges will be stored so that they can be unhidden again at a later time. - *

- * @param ec - */ - hideEdgeCursor(ec:yfiles.algorithms.IEdgeCursor):void; - /** - * Hides all edges from this graph. - *

- * The hidden edges will be stored so that they can be unhidden again at a later time. - *

- */ - hideEdges():void; - /** - * Hides the given elements from the graph. - *

- * The hidden nodes and adjacent edges will be stored so that they can be unhidden again at a later time. - *

- * @param cursor - */ - hideItemCursor(cursor:yfiles.algorithms.ICursor):void; - /** - * Hides multiple edges from the graph. - *

- * If there are multiple edges connecting two nodes then all but one (representative) of these edges will be hidden. The - * hidden edges will be stored so that they can be unhidden again at a later time. - *

- */ - hideMultipleEdges():void; - /** - * Hides the given nodes from the graph. - *

- * The hidden nodes and adjacent edges will be stored so that they can be unhidden again at a later time. - *

- * @param nc - */ - hideNodeCursor(nc:yfiles.algorithms.INodeCursor):void; - /** - * Hides all self-loop edges from this graph. - *

- * The hidden edges will be stored so that they can be unhidden again at a later time. - *

- */ - hideSelfLoops():void; - /** - * Hides the subgraph induced by the given edges from the given graph. - *

- * The induced subgraph defined by the given edges consists of the given edges and all nodes that are solely connected to - * the rest of the graph by the given edges. - *

- * @param graph - * @param ec - * @static - */ - static hideSubgraph(graph:yfiles.algorithms.Graph,ec:yfiles.algorithms.IEdgeCursor):void; - /** - * Hides all self-loops and multiple edges from the graph. - *

- * The overall effect of this method is that the minimum number of edges are hidden from the graph such that it contains no - * self-loops and no multiple edges anymore. The hidden edges will be stored so that they can be unhidden again at a later - * time. - *

- */ - simplifyGraph():void; - /** - * This method will be called whenever the hider is requested to unhide the given node from the graph. - * @param v - * @protected - */ - unhide(v:yfiles.algorithms.Node):void; - /** - * This method will be called whenever the hider is requested to unhide the given edge from the graph. - * @param e - * @protected - */ - unhide(e:yfiles.algorithms.Edge):void; - /** - * Unhides all formerly hidden elements in the graph. - */ - unhideAll():void; - /** - * Unhides the given edge. - *

- * Also updates {@link yfiles.algorithms.LayoutGraphHider#hiddenEdges}. - *

- *

- * Note that unhiding an edge whose source/target is not in the graph (e.g., because it's currently hidden/removed) causes - * an exception. Hence, in such cases, you first have to unhide/reinsert the corresponding endpoints. - *

- * @param e the edge that will be unhidden - */ - unhideEdge(e:yfiles.algorithms.Edge):void; - /** - * Unhides the given edges. - *

- * Also updates {@link yfiles.algorithms.LayoutGraphHider#hiddenEdges}. - *

- *

- * Note that unhiding an edge whose source/target is not in the graph (e.g., because it's currently hidden/removed) causes - * an exception. Hence, in such cases, you first have to unhide/reinsert the corresponding endpoints. - *

- * @param edges the edges that will be unhidden - */ - unhideEdges(edges:yfiles.algorithms.EdgeList):void; - /** - * Unhides all formerly hidden edges in the graph. - */ - unhideEdges():void; - /** - * Unhides the given node and if requested its adjacent edges. - *

- * Also updates {@link yfiles.algorithms.LayoutGraphHider#hiddenNodes} and {@link yfiles.algorithms.LayoutGraphHider#hiddenEdges}. - *

- * @param v the node that will be unhidden - * @param unhideAdjacentEdges whether of not to unhide previously hidden edges connected at v whose other end point is not hidden, i.e. it is part of - * the graph. - */ - unhideNode(v:yfiles.algorithms.Node,unhideAdjacentEdges:boolean):void; - /** - * Unhides the given nodes and if requested its adjacent edges. - *

- * Also updates {@link yfiles.algorithms.LayoutGraphHider#hiddenNodes} and {@link yfiles.algorithms.LayoutGraphHider#hiddenEdges}. - *

- * @param nodes the nodes that will be unhidden - * @param unhideAdjacentEdges whether of not to unhide previously hidden edges connected at the given nodes whose other end point is not hidden, i.e. - * it is part of the graph. - */ - unhideNodes(nodes:yfiles.algorithms.NodeList,unhideAdjacentEdges:boolean):void; - /** - * Unhides all formerly hidden nodes in the graph. - *

- * Note that this method does not unhide hidden edges. - *

- */ - unhideNodes():void; - /** - * Unhides the subgraph induced by the given edges in the given graph. - *

- * The induced subgraph defined by the given edges consists of the given edges and all nodes that are either source or - * target of at least one of the given edges. - *

- *

- * Parts of the subgraph that are already contained in the given graph will not be unhidden and pose no problem to this - * method. - *

- * @param graph - * @param ec - * @static - */ - static unhideSubgraph(graph:yfiles.algorithms.Graph,ec:yfiles.algorithms.IEdgeCursor):void; - /** - * holds the list of the hidden edges in stack order - * @protected - * @type {yfiles.algorithms.EdgeList} - */ - hiddenEdges:yfiles.algorithms.EdgeList; - /** - * holds the list of the hidden nodes in stack order - * @protected - * @type {yfiles.algorithms.NodeList} - */ - hiddenNodes:yfiles.algorithms.NodeList; - /** - * Gets or sets whether or not this hider should fire graph events. - *

- * By default the hider does not fire graph events. - *

- * @type {boolean} - */ - fireGraphEvents:boolean; - /** - * Gets the Graph for which this GraphHider was created. - * @type {yfiles.algorithms.Graph} - */ - graph:yfiles.algorithms.Graph; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.LayoutGraphHider; - } - /** - * This class provides convenience and transformation services for Node- and EdgeMaps and other layout-related collection - * types. - * @class - * @static - */ - export interface Maps extends yfiles.lang.Object{} - export class Maps { - /** - * Create a DataMap view of the given map. - *

- * Accessing basic value types is solved by storing the corresponding wrapper types Double, Integer and Boolean within the - * given Map. - *

- * @param map - * @returns - * @static - */ - static createDataMap(map:yfiles.collections.IMap):yfiles.algorithms.IDataMap; - /** - * Create an EdgeMap view of the given map. - *

- * Accessing basic value types is solved by storing the corresponding wrapper types Double, Integer and Boolean within the - * given Map. - *

- * @param map - * @returns - * @static - */ - static createEdgeMap(map:yfiles.collections.IMap):yfiles.algorithms.IEdgeMap; - /** - * Creates a DataMap that is based on hashing. - *

- * The preconditions specified in java.util.HashMap apply for the keys and values of this map. - *

- * @returns - * @static - */ - static createHashedDataMap():yfiles.algorithms.IDataMap; - /** - * Creates an EdgeMap that is based on hashing. - *

- * The preconditions specified in java.util.HashMap apply for the keys and values of this map. - *

- * @returns - * @static - */ - static createHashedEdgeMap():yfiles.algorithms.IEdgeMap; - /** - * Creates a NodeMap that is based on hashing. - *

- * The preconditions specified in java.util.HashMap apply for the keys and values of this map. - *

- * @returns - * @static - */ - static createHashedNodeMap():yfiles.algorithms.INodeMap; - /** - * Factory method that creates a {@link yfiles.collections.IMap.} that is a special hash map implementation mainly used by the layout algorithms. - * Type parameter K. - * Type parameter V. - * @param [entries=null] The items to optionally populate the set with initially. - * @returns A new instance. - * @template K,V - * @static - */ - static createHashMap(entries?:yfiles.collections.ICollection>):yfiles.collections.IMap; - /** - * Factory method that creates an {@link yfiles.collections.ICollection.} implementation with set semantics that is a special hash map based implementation mainly - * used by the layout algorithms. - * Type parameter T. - * @param [items=null] The items to optionally populate the set with initially. - * @returns A new instance. - * @template T - * @static - */ - static createHashSet(items?:yfiles.collections.IEnumerable):yfiles.collections.ICollection; - /** - * Creates a resettable high performance map for values of type double. - *

- * A high performance map is a facade to another map which will allow to reset all bound values to a default value in - * constant time. - *

- * @param backingProvider - * @param backingAcceptor - * @param defaultValue - * @returns - * @static - */ - static createHighPerformanceDoubleMap(backingProvider:yfiles.algorithms.IDataProvider,backingAcceptor:yfiles.algorithms.IDataAcceptor,defaultValue:number):yfiles.algorithms.INodeMap; - /** - * Creates a resettable high performance map for values of type double. - *

- * A high performance map is a facade to another map which will allow to reset all bound values to a default value in - * constant time. - *

- * @param backingMap - * @param defaultValue - * @returns - * @static - */ - static createHighPerformanceDoubleMap(backingMap:yfiles.algorithms.IDataMap,defaultValue:number):yfiles.algorithms.INodeMap; - /** - * Creates a resettable high performance map for values of type int. - *

- * A high performance map is a facade to another map which will allow to reset all bound values to a default value in - * constant time. - *

- * @param backingProvider - * @param backingAcceptor - * @param defaultValue - * @returns - * @static - */ - static createHighPerformanceIntMap(backingProvider:yfiles.algorithms.IDataProvider,backingAcceptor:yfiles.algorithms.IDataAcceptor,defaultValue:number):yfiles.algorithms.INodeMap; - /** - * Creates a resettable high performance map for values of type int. - *

- * A high performance map is a facade to another map which will allow to reset all bound values to a default value in - * constant time. - *

- * @param backingMap - * @param defaultValue - * @returns - * @static - */ - static createHighPerformanceIntMap(backingMap:yfiles.algorithms.IDataMap,defaultValue:number):yfiles.algorithms.INodeMap; - /** - * Creates a resettable high performance map for values of type Object. - *

- * A high performance map is a facade to another map which will allow to reset all bound values to a default value in - * constant time. - *

- * @param backingProvider - * @param backingAcceptor - * @param defaultValue - * @returns - * @static - */ - static createHighPerformanceMap(backingProvider:yfiles.algorithms.IDataProvider,backingAcceptor:yfiles.algorithms.IDataAcceptor,defaultValue:any):yfiles.algorithms.INodeMap; - /** - * Creates a resettable high performance map for values of type Object. - *

- * A high performance map is a facade to another map which will allow to reset all bound values to a default value in - * constant time. - *

- * @param backingMap - * @param defaultValue - * @returns - * @static - */ - static createHighPerformanceMap(backingMap:yfiles.algorithms.IDataMap,defaultValue:any):yfiles.algorithms.INodeMap; - /** - * Returns a EdgeMap view of an Object array defined for edges. - *

- * The Object value data[edge.index()] will be accessed by the EdgeMap upon the method calls get(edge) and - * set(edge,value). - *

- *

- * Warning! The indices of the accessed edges must not change during the use of this EdgeMap. - *

- * @param data array data for each edge of a static graph - * @returns a EdgeMap view of the given array - * @static - */ - static createIndexEdgeMap(data:any[]):yfiles.algorithms.IEdgeMap; - /** - * Returns a EdgeMap view of a boolean array defined for edges. - *

- * The boolean value data[edge.index()] will be accessed by the EdgeMap upon the method calls getBool(edge) and - * setBool(edge,value). - *

- *

- * Warning! The indices of the accessed edges must not change during the use of this EdgeMap. - *

- * @param data array data for each edge of a static graph - * @returns a EdgeMap view of the given array - * @static - */ - static createIndexEdgeMapForBoolean(data:boolean[]):yfiles.algorithms.IEdgeMap; - /** - * Returns a EdgeMap view of an int array defined for edges. - *

- * The int value data[edge.index()] will be accessed by the EdgeMap upon the method calls getInt(edge) and - * setInt(edge,value). - *

- *

- * Warning! The indices of the accessed edges must not change during the use of this EdgeMap. - *

- * @param data array data for each edge of a static graph - * @returns a EdgeMap view of the given array - * @static - */ - static createIndexEdgeMapForInt(data:number[]):yfiles.algorithms.IEdgeMap; - /** - * Returns a EdgeMap view of a double array defined for edges. - *

- * The double value data[edge.index()] will be accessed by the EdgeMap upon the method calls getDouble(edge) and - * setDouble(edge,value). - *

- *

- * Warning! The indices of the accessed edges must not change during the use of this EdgeMap. - *

- * @param data array data for each edge of a static graph - * @returns a EdgeMap view of the given array - * @static - */ - static createIndexEdgeMapForNumber(data:number[]):yfiles.algorithms.IEdgeMap; - /** - * Returns a EdgeMap view of a double, int, boolean and Object array defined for edges. - *

- * The double value doubleData[edge.index()] will be accessed by the EdgeMap upon the method calls getDouble(edge) and - * setDouble(edge,value). - *

- *

- * The int value intData[edge.index()] will be accessed by the EdgeMap upon the method calls getInt(edge) and - * setInt(edge,value). - *

- *

- * The boolean value boolData[edge.index()] will be accessed by the EdgeMap upon the method calls getBool(edge) and - * setBool(edge,value). - *

- *

- * The Object value objectData[edge.index()] will be accessed by the EdgeMap upon the method calls get(edge) and - * set(edge,value). - *

- *

- * Warning! The indices of the accessed edges must not change during the use of this EdgeMap. - *

- * @param doubleData double data for each edge of a static graph - * @param intData int data for each edge of a static graph - * @param boolData boolean data for each edge of a static graph - * @param objectData Object data for each edge of a static graph - * @returns a EdgeMap view of the given arrays - * @static - */ - static createIndexEdgeMapFromArrays(doubleData:number[],intData:number[],boolData:boolean[],objectData:any[]):yfiles.algorithms.IEdgeMap; - /** - * Returns a NodeMap view of an Object array defined for nodes. - *

- * The Object value data[node.index()] will be accessed by the NodeMap upon the method calls get(node) and set(node,value). - * Warning! The indices of the accessed nodes must not change during the use of this NodeMap. - *

- * @param data array data for each node of a static graph - * @returns a NodeMap view of the given array - * @static - */ - static createIndexNodeMap(data:any[]):yfiles.algorithms.INodeMap; - /** - * Returns a NodeMap view of a boolean array defined for nodes. - *

- * The boolean value data[node.index()] will be accessed by the NodeMap upon the method calls getBool(node) and - * setBool(node,value). - *

- * @param data array data for each node of a static graph - * @returns a NodeMap view of the given array - * @static - */ - static createIndexNodeMapForBoolean(data:boolean[]):yfiles.algorithms.INodeMap; - /** - * Returns a NodeMap view of an int array defined for nodes. - *

- * The int value data[node.index()] will be accessed by the NodeMap upon the method calls getInt(node) and - * setInt(node,value). Warning! The indices of the accessed nodes must not change during the use of this NodeMap. - *

- * @param data array data for each node of a static graph - * @returns a NodeMap view of the given array - * @static - */ - static createIndexNodeMapForInt(data:number[]):yfiles.algorithms.INodeMap; - /** - * Returns a NodeMap view of a double array defined for nodes. - *

- * The double value data[node.index()] will be accessed by the NodeMap upon the method calls getDouble(node) and - * setDouble(node,value). - *

- *

- * Warning! The indices of the accessed nodes must not change during the use of this NodeMap. - *

- * @param data array data for each node of a static graph - * @returns a NodeMap view of the given array - * @static - */ - static createIndexNodeMapForNumber(data:number[]):yfiles.algorithms.INodeMap; - /** - * Returns a NodeMap view of a double, int, boolean and Object array defined for nodes. - *

- * The double value doubleData[node.index()] will be accessed by the NodeMap upon the method calls getDouble(node) and - * setDouble(node,value). - *

- *

- * The int value intData[node.index()] will be accessed by the NodeMap upon the method calls getInt(node) and - * setInt(node,value). - *

- *

- * The boolean value boolData[node.index()] will be accessed by the NodeMap upon the method calls getBool(node) and - * setBool(node,value). - *

- *

- * The Object value objectData[node.index()] will be accessed by the NodeMap upon the method calls get(node) and - * set(node,value). - *

- *

- * Warning! The indices of the accessed nodes must not change during the use of this NodeMap. - *

- * @param doubleData double data for each node of a static graph - * @param intData int data for each node of a static graph - * @param boolData boolean data for each node of a static graph - * @param objectData Object data for each node of a static graph - * @returns a NodeMap view of the given arrays - * @static - */ - static createIndexNodeMapFromArrays(doubleData:number[],intData:number[],boolData:boolean[],objectData:any[]):yfiles.algorithms.INodeMap; - /** - * Create a NodeMap view of the given map. - *

- * Accessing basic value types is solved by storing the corresponding wrapper types Double, Integer and Boolean within the - * given Map. - *

- * @param map - * @returns - * @static - */ - static createNodeMap(map:yfiles.collections.IMap):yfiles.algorithms.INodeMap; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.Maps; - } - /** - * An implementation of a doubly linked list that provides direct access to the cells that store the elements. - *

- * The cells are represented by class {@link yfiles.algorithms.ListCell}. - *

- *

- * This class supports fast access and removal operations, specifically, it is possible to remove an element in constant - * time (i.e. O(1)) given a reference to its list cell. - *

- *

- * Class YList supports iteration over the elements either by using the list cells directly (methods {@link yfiles.algorithms.YList#firstCell}/{@link yfiles.algorithms.YList#lastCell} together with - * {@link yfiles.algorithms.YList#succCell}/{@link yfiles.algorithms.YList#predCell}, respectively) or by means of a cursor - * ({@link yfiles.algorithms.YList#cursor}). - *

- *

- * Furthermore, YList offers its own {@link yfiles.algorithms.YList#sort} method. Note that this class also provides all relevant - * methods to use the list like a stack data type. - *

- *

- * This implementation permits null as values. It implements the {@link yfiles.collections.IList.} interface but does not support the {@link yfiles.algorithms.YList#subList} - * method. The implementation of this method will throw an {@link yfiles.lang.Exception} if invoked. The {@link yfiles.algorithms.YList#cursor} - * returned by instances of this class is not fail fast. - *

- * @class - * @implements {yfiles.collections.IList.} - */ - export interface YList extends yfiles.lang.Object,yfiles.collections.IList{} - export class YList { - /** - * Creates a list that is initialized with the elements provided by the given array of objects. - * @param a - */ - constructor(a:any[]); - /** - * Creates a list that is initialized with those elements from the given YCursor object for which the given data provider - * returns true upon calling its {@link yfiles.algorithms.IDataProvider#getBoolean getBool} method. - * @param c A cursor providing objects that should be added to this list. - * @param predicate A data provider that acts as a inclusion predicate for each object accessible by the given cursor. - */ - constructor(c:yfiles.algorithms.ICursor,predicate:yfiles.algorithms.IDataProvider); - /** - * Creates a list that is initialized with the elements provided by the given Collection object. - * @param c - */ - constructor(c:yfiles.collections.IEnumerable); - /** - * Creates a list that is initialized with the elements provided by the given YCursor object. - * @param c - */ - constructor(c:yfiles.algorithms.ICursor); - /** - * Creates an empty doubly linked list. - */ - constructor(); - /** - * Appends all elements provided by the given cursor to this list. - *

- * The cursor will be moved from its given position to the end. - *

- *

- * Be aware that a statement like aList.append(aList.cursor()) results in an infinite recursion. - *

- * @param c - */ - addAll(c:yfiles.algorithms.ICursor):void; - /** - * Appends all elements provided by the given collection to this list. - * @param collection - * @returns Whether there have been elements appended. - */ - addAll(collection:yfiles.collections.ICollection):boolean; - /** - * - * @param index - * @param c - * @returns - */ - addAll(index:number,c:yfiles.collections.ICollection):boolean; - /** - * Inserts the given object at the head of this list. - * @param o - * @returns The newly created ListCell object that stores the given object. - */ - addFirst(o:any):yfiles.algorithms.ListCell; - /** - * Adds a formerly removed ListCell object at the head of this list. - *

- * Attention: If the ListCell object is still part of any list, then that list will be corrupted afterwards. - *

- * @param cell A list cell which is not part of any list. - */ - addFirstCell(cell:yfiles.algorithms.ListCell):void; - /** - * Inserts the given object at the tail of this list. - * @param o - * @returns The newly created ListCell object that stores the given object. - */ - addLast(o:any):yfiles.algorithms.ListCell; - /** - * Adds a formerly removed ListCell object at the tail of this list. - *

- * Attention: If the ListCell object is still part of any list, then that list will be corrupted afterwards. - *

- * @param cell A list cell which is not part of any list. - */ - addLastCell(cell:yfiles.algorithms.ListCell):void; - /** - * Removes all elements from this list. - */ - clear():void; - /** - * Whether or not this list contains all the elements in the given collection. - *

- * Equality of elements is defined by the {@link any#equals} method. - *

- * @param collection - * @returns - */ - containsAll(collection:yfiles.collections.ICollection):boolean; - /** - * Copies the elements of this collection to an array, starting at the specified array index. - * @param array The one-dimensional array that is the destination of the elements copied from this collection. - * @param arrayIndex The zero-based index in array at which copying begins. - */ - copyTo(array:any[],arrayIndex:number):void; - /** - * Returns a cursor for this list. - *

- * All cursor operations are supported. This cursor implementation is not fail-fast and continues to work if this list is - * modified during the traversal as long as the current ListCell the cursor points at is this in this list or has been - * removed from this list but has not been added to another instance since then. - *

- * @returns - */ - cursor():yfiles.algorithms.ICursor; - /** - * Returns the cyclic predecessor cell of the given list cell. - *

- * The last cell is returned as the cyclic predecessor of the first list cell. - *

- * @param c - * @returns - */ - cyclicPred(c:yfiles.algorithms.ListCell):yfiles.algorithms.ListCell; - /** - * Returns the cyclic successor cell of the given list cell. - *

- * The first cell is returned as the cyclic successor of the last list cell. - *

- * @param c - * @returns - */ - cyclicSucc(c:yfiles.algorithms.ListCell):yfiles.algorithms.ListCell; - /** - * Returns the i-th element of this list. - * @param i - * @returns - */ - elementAt(i:number):any; - /** - * Returns the {@link yfiles.algorithms.ListCell} where object o is stored. - *

- * This operation returns null, if no such cell exists. Equality of elements is defined by the {@link any#equals} method. The first - * element in the list that matches that criteria is returned. - *

- * @param o - * @returns the ListCell that contains the element or null if no such ListCell was found - */ - findCell(o:any):yfiles.algorithms.ListCell; - /** - * Gets the element at the specified index. - * @param index The zero-based index of the element to get or set. - * @returns The element at the specified index. - * @see yfiles.algorithms.YList#set - */ - get(index:number):any; - /** - * Gets the cell at the given index. - * @param index the zero-based index of the cell in this list. - * @returns The cell. - * @throws {Stubs.Exceptions.IndexOutOfRangeError} if the index is negative or greater or equal than the {@link yfiles.algorithms.YList#size} - */ - getCell(index:number):yfiles.algorithms.ListCell; - /** - * Returns an enumerator that iterates through this collection. - * @returns An {@link } that can be used to iterate through this collection. - */ - getEnumerator():yfiles.collections.IEnumerator; - /** - * Returns the element stored in the given list cell. - * @param c - * @returns - */ - getInfo(c:yfiles.algorithms.ListCell):any; - /** - * Whether or not this list contains the given element. - *

- * Equality of elements is defined by the {@link any#equals} method. - *

- * @param o - * @returns - */ - includes(o:any):boolean; - /** - * Returns the zero-based index of the given element in this list. - *

- * If the given element is not in the list, -1 is returned. - *

- * @param obj - * @returns - */ - indexOf(obj:any):number; - /** - * - * @param index - * @param element - */ - insert(index:number,element:any):void; - /** - * Inserts the given object into this list with respect to a given reference list cell. - *

- * The (newly created) list cell that stores the object is inserted right after the reference list cell refCell. - *

- *

- * If refCell == null, the given object is inserted at the head of the list. - *

- * @param o The object to be inserted. - * @param refCell The list cell used to reference the position. - * @returns The newly created ListCell object that stores object o. - */ - insertAfter(o:any,refCell:yfiles.algorithms.ListCell):yfiles.algorithms.ListCell; - /** - * Inserts the given object into this list with respect to a given reference list cell. - *

- * The (newly created) list cell that stores the object is inserted right before the reference list cell refCell. - *

- *

- * If refCell == null, the given object is appended to the list. - *

- * @param o The object to be inserted. - * @param refCell The list cell used to reference the position. - * @returns The newly created ListCell object that stores object o. - */ - insertBefore(o:any,refCell:yfiles.algorithms.ListCell):yfiles.algorithms.ListCell; - /** - * Inserts a formerly removed ListCell object into this list with respect to a given reference list cell. - *

- * The ListCell object is inserted right after the reference list cell refCell. - *

- *

- * Attention: If the ListCell object is still part of any list, then that list will be corrupted afterwards. - *

- * @param cellToInsert A list cell which is not part of any list. - * @param refCell The list cell used to reference the position. - */ - insertCellAfter(cellToInsert:yfiles.algorithms.ListCell,refCell:yfiles.algorithms.ListCell):void; - /** - * Inserts a formerly removed ListCell object into this list with respect to a given reference list cell. - *

- * The ListCell object is inserted right before the reference list cell refCell. - *

- *

- * Attention: If the ListCell object is still part of any list, then that list will be corrupted afterwards. - *

- * @param cellToInsert A list cell which is not part of any list. - * @param refCell The list cell used to reference the position. - */ - insertCellBefore(cellToInsert:yfiles.algorithms.ListCell,refCell:yfiles.algorithms.ListCell):void; - /** - * Checks whether this list contains elements. - * @returns - */ - isEmpty():boolean; - /** - * - * @param o - * @returns - */ - lastIndexOf(o:any):number; - /** - * Equivalent to {@link yfiles.algorithms.YList#firstObject}. - * @returns - */ - peek():any; - /** - * Removes the first element from this list and returns it. - * @returns - */ - pop():any; - /** - * Removes the last element from this list and returns it. - * @returns - */ - popLast():any; - /** - * Returns the predecessor cell of the given list cell. - * @param c - * @returns - */ - predCell(c:yfiles.algorithms.ListCell):yfiles.algorithms.ListCell; - /** - * Equivalent to {@link yfiles.algorithms.YList#addFirst}. - * @param o - * @returns - */ - push(o:any):yfiles.algorithms.ListCell; - /** - * Removes the given object from this list. - *

- * Only the first element for which equality to o holds gets removed. - *

- * @param o - * @returns - */ - remove(o:any):boolean; - /** - * Removes the given collection of objects from this list. - * @param collection - * @returns Whether there have been elements removed. - */ - removeAll(collection:yfiles.collections.ICollection):boolean; - /** - * - * @param index - */ - removeAt(index:number):void; - /** - * Removes the element pointed to by the given YCursor object. - * @param c - * @returns The removed element. - */ - removeAtCursor(c:yfiles.algorithms.ICursor):any; - /** - * Removes the given list cell, and hence the element stored in it, from this list. - * @param c - * @returns The element that is stored in the removed cell. - */ - removeCell(c:yfiles.algorithms.ListCell):any; - /** - * Retains only those elements in this list which are contained in the given collection. - * @param collection - * @returns Whether there have been elements removed. - */ - retainAll(collection:yfiles.collections.ICollection):boolean; - /** - * Reverses the sequence of elements in this list. - */ - reverse():void; - /** - * Sets the element at the specified index. - * @param index The zero-based index of the element to get or set. - * @param value The element at the specified index. - * @see yfiles.algorithms.YList#get - */ - set(index:number,value:any):void; - /** - * Updates the element stored in the given list cell with the given object. - * @param c - * @param value - */ - setInfo(c:yfiles.algorithms.ListCell,value:any):void; - /** - * Sorts the elements in this list according to the given comparator. - *

- * NOTE: The elements will be assigned to different list cells by this method. - *

- * @param comparer - */ - sort(comparer:yfiles.collections.IComparer):void; - /** - * Sorts the elements in this list into ascending order, according to their natural ordering. - *

- * All elements must implement the {@link yfiles.lang.IComparable} interface. Furthermore, all elements in this list must be - * mutually comparable (that is, e1.compareTo(e2) must not throw a ClassCastException for any elements e1 and e2 in this - * list). - *

- *

- * NOTE: The elements will be assigned to different list cells by this method. - *

- */ - sort():void; - /** - * Transfers the contents of the given list to the end of this list. - *

- * The given list will be empty after this operation. - *

- *

- * Note that this operation transfers the list cells of the given list to this list. No new list cells are created by this - * operation. - *

- * @param list - */ - splice(list:yfiles.algorithms.YList):void; - /** - * - * @param fromIndex - * @param toIndex - * @returns - */ - subList(fromIndex:number,toIndex:number):yfiles.collections.IList; - /** - * Returns the successor cell of the given list cell. - * @param c - * @returns - */ - succCell(c:yfiles.algorithms.ListCell):yfiles.algorithms.ListCell; - /** - * Returns an array representation of this list. - * @returns - */ - toArray():any[]; - /** - * Gets the number of elements in this list. - * @type {number} - */ - size:number; - /** - * Gets the first element of this list. - * @type {any} - */ - firstObject:any; - /** - * Gets the last element of this list. - * @type {any} - */ - lastObject:any; - /** - * Gets the first cell of this list. - * @type {yfiles.algorithms.ListCell} - */ - firstCell:yfiles.algorithms.ListCell; - /** - * Gets the last cell of this list. - * @type {yfiles.algorithms.ListCell} - */ - lastCell:yfiles.algorithms.ListCell; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.algorithms.YList; - } - }export namespace layout{ - /** - * {@link yfiles.layout.BendConverter} replaces edge bends with dummy nodes for the {@link yfiles.layout.BendConverter#coreLayout core layout algorithm}. - *

- * Concept Replacing the bends works in three steps: - *

- *
    - *
  1. Replacing the bends and the edge segments between them with dummy nodes and edges
  2. - *
  3. Invoking the {@link yfiles.layout.BendConverter#coreLayout core layout algorithm} on the altered graph
  4. - *
  5. Recreating the bends and removing all dummy elements
  6. - *
- *

- * When the dummy elements have been inserted, edge information about {@link yfiles.layout.BendConverter#adoptPortConstraints port constraints}, {@link yfiles.layout.BendConverter#adoptEdgeGroups edge groups} and {@link yfiles.layout.BendConverter#adoptAffectedEdges selection state} can - * be adopted from the original edges. That way, the {@link yfiles.layout.BendConverter#coreLayout core layout algorithm} can access the mentioned information. - *

- * @class - * @implements {yfiles.layout.ILayoutStage} - */ - export interface BendConverter extends yfiles.lang.Object,yfiles.layout.ILayoutStage{} - export class BendConverter { - /** - * Creates a new {@link yfiles.layout.BendConverter} instance with the given size as the width and height for the dummy nodes. - * @param size the size for the dummy nodes - * @throws {Stubs.Exceptions.ArgumentError} if the given size is negative - */ - constructor(size:number); - /** - * Creates a new instance of {@link yfiles.layout.BendConverter} with the given {@link yfiles.layout.BendConverter#coreLayout core layout algorithm}. - * @param core the core layout algorithm - */ - constructor(core:yfiles.layout.ILayoutAlgorithm); - /** - * Creates a new {@link yfiles.layout.BendConverter} instance with default settings. - */ - constructor(); - /** - * Adds information to newly created dummy nodes. - *

- * This is a callback method that will be invoked after new elements for the given edge have been added to the given graph - * by {@link yfiles.layout.BendConverter#prepare}. At this point, the original edge is still in the graph. - *

- *

- * The current implementation does nothing. - *

- * @param graph the input graph - * @param edge the edge whose bends were replaced by the given dummy nodes - * @param dummyNodes the dummy nodes representing the bends of the edge - * @protected - */ - addedPathForEdge(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge,dummyNodes:yfiles.algorithms.NodeList):void; - /** - * Replaces all bends in the current {@link yfiles.layout.BendConverter#DEFAULT_AFFECTED_EDGES_DP_KEY scope} with dummy nodes before invoking the {@link yfiles.layout.BendConverter#coreLayout core layout algorithm}. - *

- * After the {@link yfiles.layout.BendConverter#coreLayout core layout algorithm} has finished, the edges between the dummy nodes are reconnected and the dummy nodes are - * replaced by bends again. - *

- * @param graph the input graph - */ - applyLayout(graph:yfiles.layout.LayoutGraph):void; - /** - * Prepares the graph before calling the {@link yfiles.layout.BendConverter#coreLayout core layout algorithm}. - *

- * The bends of the edges belonging to the current scope are replaced by dummy nodes and the segments between those dummy - * nodes are replaced by dummy edges. - *

- *

- * Edge-specific information like {@link yfiles.layout.PortConstraint}s, edge groups or selection state can be applied to the dummy - * edges to keep this information for the {@link yfiles.layout.BendConverter#coreLayout core layout algorithm}. - *

- *

- * This method is called by {@link yfiles.layout.BendConverter#applyLayout} before invoking the - * {@link yfiles.layout.BendConverter#coreLayout core layout algorithm}. It may be overridden to extend the edge-specific information that should be adopted by the dummy - * edges. - *

- * @param graph the input graph - * @see yfiles.layout.BendConverter#restore - * @see yfiles.layout.BendConverter#adoptAffectedEdges - * @see yfiles.layout.BendConverter#adoptPortConstraints - * @see yfiles.layout.BendConverter#adoptEdgeGroups - * @protected - */ - prepare(graph:yfiles.layout.LayoutGraph):void; - /** - * Restores the structure of the graph after the {@link yfiles.layout.BendConverter#coreLayout core layout algorithm} has finished. - *

- * This method is called by {@link yfiles.layout.BendConverter#applyLayout} after invoking the {@link yfiles.layout.BendConverter#coreLayout core layout algorithm}. It may be - * overridden to clean up all additional information added in {@link yfiles.layout.BendConverter#prepare}. - *

- * @param graph the graph arranged by the {@link #coreLayout core layout algorithm} - * @see yfiles.layout.BendConverter#prepare - * @see yfiles.layout.BendConverter#adoptAffectedEdges - * @see yfiles.layout.BendConverter#adoptPortConstraints - * @see yfiles.layout.BendConverter#adoptEdgeGroups - * @protected - */ - restore(graph:yfiles.layout.LayoutGraph):void; - /** - * Data provider key for specifying the set of edges for which this stage will replace bends - *

- * Only the bends of the marked edges will be replaced with dummy nodes. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static DEFAULT_AFFECTED_EDGES_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Gets or sets the core layout algorithm that is wrapped by this {@link yfiles.layout.ILayoutStage}. - * @type {yfiles.layout.ILayoutAlgorithm} - */ - coreLayout:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets whether or not edge grouping information of the original edge should be adopted by its replacement edges. - * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @type {boolean} - */ - adoptEdgeGroups:boolean; - /** - * Gets or sets whether or not the associated - * {@link yfiles.layout.PortConstraint}s of the original edge should be adopted by its replacement edges. - * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @type {boolean} - */ - adoptPortConstraints:boolean; - /** - * Gets or sets whether or not the selection state of the original edge should be adopted by its replacement edges. - *

- * The selection state is looked up in a {@link yfiles.algorithms.IDataProvider} registered with the key returned by {@link yfiles.layout.BendConverter#affectedEdgesDpKey}. - *

- * @see yfiles.layout.BendConverter#affectedEdgesDpKey - * @type {boolean} - */ - adoptAffectedEdges:boolean; - /** - * Gets or sets the key to register a {@link yfiles.algorithms.IDataProvider} which identifies edges as selected. - *

- * If {@link yfiles.layout.BendConverter#adoptAffectedEdges the selection is conserved}, the selection state described by the {@link yfiles.algorithms.IDataProvider} registered with this - * key is applied to the according dummy edges. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified key is null - * @see yfiles.layout.BendConverter#adoptAffectedEdges - * @type {any} - */ - affectedEdgesDpKey:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.BendConverter; - } - /** - * A {@link yfiles.layout.BufferedLayout} is a hull algorithm that invokes its {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} on a copy of the input graph. - *

- * After the layout process has finished, the calculated layout will be written back to the original graph. - *

- *

- * This class also provides the possibility to perform arbitrary layout algorithms merely on a graph interface plus - * associated graph layout. This comes in handy if an application has its own graph and only provides a graph interface - * adapter to the yFiles graph layout machinery. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface BufferedLayout extends yfiles.layout.LayoutStageBase{} - export class BufferedLayout { - /** - * Creates a new {@link yfiles.layout.BufferedLayout} instance using the given {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [coreLayouter=null] the core layout routine - */ - constructor(coreLayouter?:yfiles.layout.ILayoutAlgorithm); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.BufferedLayout; - } - /** - * A {@link yfiles.layout.ComponentLayout} arranges the connected components of a graph. - *

- * Layout Style The components can be arranged using different {@link yfiles.layout.ComponentLayout#style styles}. All styles except {@link yfiles.layout.ComponentArrangementStyles#NONE} - * place the components without overlaps. {@graph {"ann":{"s":[30,30],"d":1},"n":[[552,150],[477,75],[75,150],[150,375],[150,225],[150,300],[351,150],[150,75],[0,150],[552,75],[477,0],[426,75],[351,225],[552,225],[150,150],[351,0],[276,75],[351,75],[75,300],[426,150],[225,150],[75,75],[225,300],[150,0],[477,351],[477,276],[553,351],[553,276],[150,450],[327,402],[276,402],[378,402],[429,402]],"e":[[0,1,-15,0,0,15,[492,165]],[3,5,0,-15,0,15],[5,4,0,-15,0,15],[8,2,15,0,-15,0],[0,9,0,-15,0,15],[9,1,-15,0,15,0],[1,10,0,-15,0,15],[12,6,0,-15,0,15],[0,13,0,15,0,-15],[4,14,0,-15,0,15],[14,2,-15,0,15,0],[14,7,0,-15,0,15],[16,15,0,-15,-15,0,[291,15]],[15,17,0,15,0,-15],[17,11,15,0,-15,0],[17,6,0,15,0,-15],[17,16,-15,0,15,0],[18,5,15,0,-15,0],[6,19,15,0,-15,0],[19,11,0,-15,0,15],[20,14,-15,0,15,0],[2,21,0,-15,0,15],[22,5,-15,0,15,0],[22,20,0,-15,0,15],[23,7,0,15,0,-15],[24,25,0,-15,0,15],[24,26],[26,27,0,-15,0,15],[25,27],[3,28,0,15,0,-15],[30,29],[31,32]],"vp":[0.0,0.0,583.0,480.0]}} - *

- *

- * Layout with orthogonal components using {@link yfiles.layout.ComponentArrangementStyles#MULTI_ROWS_COMPACT} - *

- *

- * Concept - *

- *

- * {@link yfiles.layout.ComponentLayout} is a {@link yfiles.layout.ILayoutStage} that can wrap another {@link yfiles.layout.ILayoutAlgorithm layout algorithm}. That way, it - * allows handling disconnected graphs for the wrapped {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *

- *

- * The following steps outline the concept of {@link yfiles.layout.ComponentLayout}: - *

- *
    - *
  1. Determine the connected components of the graph
  2. - *
  3. Hide all graph components
  4. - *
  5. Apply the following steps to each component separately
  6. - *
  7. Unhide all graph components
  8. - *
  9. {@link yfiles.layout.ComponentLayout#componentArrangement Optionally arrange} the components
  10. - *
- *

- * Features - *

- *

- * To arrange the subgraphs of the components, {@link yfiles.layout.ComponentLayout} uses the specified {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. If - * there is no {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} specified, it will keep the locations in the subgraph and arrange the components as - * they are. - *

- *

- * Hierarchically grouped graphs are handled in a special way. The contents of a group node will always belong to the same - * component as the group node itself. To change that behavior {@link yfiles.layout.ComponentLayout#considerGrouping grouping} can be disabled. - *

- *

- * By default, the components consist of the connected nodes in a graph. To choose custom subgraphs to form components, - * register a {@link yfiles.algorithms.IDataProvider} with {@link yfiles.layout.ComponentLayout#COMPONENT_ID_DP_KEY} and assign component - * IDs to the nodes. - *

- * @see yfiles.layout.MultiStageLayout - * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface ComponentLayout extends yfiles.layout.LayoutStageBase{} - export class ComponentLayout { - /** - * Creates a new {@link yfiles.layout.ComponentLayout} instance with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [coreLayouter=null] The core layout algortihm. - */ - constructor(coreLayouter?:yfiles.layout.ILayoutAlgorithm); - /** - * Produces a component graph layout. - *

- * This method is called by {@link yfiles.layout.ComponentLayout#applyLayout} in case {@link yfiles.layout.ComponentLayout#componentArrangement component arrangement} is enabled. It moves - * the graph's components such that their bounding boxes do not overlap. Subclasses may want to override this method to - * introduce custom component arrangement styles. - *

- * @param graph the input graph - * @param nodes the nodes of the components; the i-th list contains the nodes of the i-th component - * @param edges the edges of the components; the i-th list contains the edges of the i-th component - * @param bbox the bounds of the components; the i-th rectangle describes the bounding box of the i-th component - * @param boxes the extended bounds of the components; the i-th rectangle describes the bounding box of the i-th component extended by - * the spacing between components. The method arranges these boxes in such a way that they do not overlap. Then, the i-th - * graph component must be placed inside the i-th box - * @see yfiles.layout.ComponentLayout#arrangeFields - * @see yfiles.layout.LayoutGraphUtilities#arrangeRectangleRows - * @see yfiles.layout.LayoutGraphUtilities#arrangeRectangleMultiRows - * @protected - */ - arrangeComponents(graph:yfiles.layout.LayoutGraph,nodes:yfiles.algorithms.NodeList[],edges:yfiles.algorithms.EdgeList[],bbox:yfiles.algorithms.YRectangle[],boxes:yfiles.algorithms.Rectangle2D[]):void; - /** - * Arranges the bounding boxes of the components. - *

- * This method is called by {@link yfiles.layout.ComponentLayout#arrangeComponents} if the {@link yfiles.layout.ComponentLayout#style style} is set to - * {@link yfiles.layout.ComponentArrangementStyles#PACKED_RECTANGLE}, - * {@link yfiles.layout.ComponentArrangementStyles#PACKED_COMPACT_RECTANGLE}, {@link yfiles.layout.ComponentArrangementStyles#PACKED_CIRCLE} - * or - * {@link yfiles.layout.ComponentArrangementStyles#PACKED_COMPACT_CIRCLE}. It may be overridden to adjust the component arrangement - * strategy of the mentioned styles. - *

- * @param graph the input graph - * @param nodes the nodes of the components; the i-th list contains the nodes of the i-th component - * @param edges the edges of the components; the i-th list contains the edges of the i-th component - * @param bbox the bounds of the components; the i-th rectangle describes the bounding box of the i-th component - * @param boxes the extended bounds of the components; the i-th rectangle describes the bounding box of the i-th component - * @param circular true if the arrangement should be circular, false if it should be rectangular - * @param fill true if it is allowed to place components in empty spaces inside other - * components, false otherwise - * @param fromSketch true if the initial coordinates should be considered, false otherwise - * @protected - */ - arrangeFields(graph:yfiles.layout.LayoutGraph,nodes:yfiles.algorithms.NodeList[],edges:yfiles.algorithms.EdgeList[],bbox:yfiles.algorithms.YRectangle[],boxes:yfiles.algorithms.Rectangle2D[],circular:boolean,fill:boolean,fromSketch:boolean):void; - /** - * Calculates the bounding box of a graph component including {@link yfiles.layout.NodeHalo}s. - *

- * This method will be invoked for each component of the graph. Depending on the state of property - * {@link yfiles.layout.ComponentLayout#considerLabels}, the returned bounding box will also include node and edge labels. It may be overridden to extend the bounds to reserve - * space for other elements. - *

- * @param graph the subgraph containing the nodes and edges of a component - * @returns the bounding box of the component - * @see yfiles.layout.ComponentLayout#considerLabels - * @protected - */ - calculateBounds(graph:yfiles.layout.LayoutGraph):yfiles.algorithms.Rectangle2D; - /** - * Determines which nodes belong to the same graph component. - *

- * This implementation uses the graph connectivity to sort the nodes into different components. Nodes that are not - * connected by a path will be in separate components. - *

- *

- * This method is called by {@link yfiles.layout.ComponentLayout#applyLayout}. It may be overridden to choose another approach to - * find components that will be passed to the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. However, most of the layout algorithms cannot handle disconnected graphs. Also, edges between - * custom components will be ignored. - *

- * @param graph the input graph - * @param compNumber a map that will be filled with the zero-based index of the component to which the node belongs - * @returns the number of connected components of this graph - * @see yfiles.algorithms.GraphConnectivity#connectedComponents - * @protected - */ - findGraphComponents(graph:yfiles.layout.LayoutGraph,compNumber:yfiles.algorithms.INodeMap):number; - /** - * Moves the subgraph containing the given nodes and edges to the specified origin. - *

- * This method is called by {@link yfiles.layout.ComponentLayout#arrangeComponents} and {@link yfiles.layout.ComponentLayout#arrangeFields} - * to move the components to overlap-free positions. - *

- * @param graph the input graph - * @param nodes the nodes in the moving subgraph - * @param edges the edges in the moving subgraph - * @param origin the new origin of the graph - * @param rectangle the current bounds of the subgraph - * @protected - */ - setOrigin(graph:yfiles.layout.LayoutGraph,nodes:yfiles.algorithms.NodeList,edges:yfiles.algorithms.EdgeList,origin:yfiles.algorithms.YPoint,rectangle:yfiles.algorithms.YRectangle):void; - /** - * Data provider key for specifying which nodes should be arranged - *

- * If no {@link yfiles.algorithms.IDataProvider} is registered with this key, all components will be laid out by the core layout - * algorithm. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static AFFECTED_COMPONENTS_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for specifying custom graph components - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static COMPONENT_ID_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets or sets the preferred size of the layout. - *

- * The layout size also defines the desired aspect ratio (width/height). - *

- *

- * The width and height need to be greater than zero. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified width or height is negative or zero. - * @type {yfiles.algorithms.YDimension} - */ - preferredSize:yfiles.algorithms.YDimension; - /** - * Gets or sets whether or not to take node and edge labels into account when calculating the bounding box of the graph - * components. - * @see yfiles.layout.ComponentLayout#calculateBounds - * @type {boolean} - */ - considerLabels:boolean; - /** - * Gets or sets whether or not the separately arranged components of the input graph should be arranged relative to each - * other. - *

- * If enabled, the components are arranged using a specific {@link yfiles.layout.ComponentLayout#style style} without producing overlaps between components (except for - * {@link yfiles.layout.ComponentArrangementStyles#NONE}). Otherwise, the layout algorithm will keep the components at their - * location. Then, the components may overlap. - *

- * @type {boolean} - */ - componentArrangement:boolean; - /** - * Gets or sets the current grid spacing. - *

- * Components will be moved by multiples of this value, thus keeping their offset to the grid. That way, components or - * parts of them that were placed on a grid before, will stay on their original grid. The grid spacing also influences the - * distance between the components. - *

- *

- * The spacing needs to be a non-negative value. If the grid spacing is set to 0, the grid won't be considered at all. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given spacing is negative - * @type {number} - */ - gridSpacing:number; - /** - * Gets or sets the distance between the bounding boxes of the components. - *

- * The spacing needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the spacing is negative - * @type {number} - */ - componentSpacing:number; - /** - * Gets or sets whether or not grouping information bound to the graph should be considered when determining the graph - * components. - * @type {boolean} - */ - considerGrouping:boolean; - /** - * Gets or sets how the components are arranged. - * @throws {Stubs.Exceptions.ArgumentError} if the specified style is unknown - * @type {yfiles.layout.ComponentArrangementStyles} - */ - style:yfiles.layout.ComponentArrangementStyles; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.ComponentLayout; - } - /** - * {@link yfiles.layout.CompositeLayoutStage} allows for combining multiple {@link yfiles.layout.ILayoutStage}s. - *

- * The {@link yfiles.layout.ILayoutStage}s are organized in a pipeline where additional {@link yfiles.layout.ILayoutStage}s can be {@link yfiles.layout.CompositeLayoutStage#prependStage prepended} - * or {@link yfiles.layout.CompositeLayoutStage#appendStage appended}. - *

- *

- * Each {@link yfiles.layout.ILayoutStage} in the pipeline executes its pre-processing code before calling its successor - * {@link yfiles.layout.ILayoutStage}. Then, after all subsequent - * {@link yfiles.layout.ILayoutStage}s have finished, it will execute its post-processing code. - *

- *

- * Note that the pipeline only works when all {@link yfiles.layout.ILayoutStage}s call their core layout algorithm which is the - * next {@link yfiles.layout.ILayoutStage} in the pipeline. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface CompositeLayoutStage extends yfiles.layout.LayoutStageBase{} - export class CompositeLayoutStage { - /** - * Creates a new {@link yfiles.layout.CompositeLayoutStage} instance with two {@link yfiles.layout.ILayoutStage}s in the pipeline. - *

- * The inner {@link yfiles.layout.ILayoutStage} will be wrapped by the outer {@link yfiles.layout.ILayoutStage}. - *

- * @param outerStage the wrapping {@link } - * @param innerStage the wrapped {@link } - */ - constructor(outerStage:yfiles.layout.ILayoutStage,innerStage:yfiles.layout.ILayoutStage); - /** - * Creates a new {@link yfiles.layout.CompositeLayoutStage} instance with an empty pipeline. - */ - constructor(); - /** - * Appends a {@link yfiles.layout.ILayoutStage} to the previously added {@link yfiles.layout.ILayoutStage}s. - *

- * The added {@link yfiles.layout.ILayoutStage} will be invoked just before the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} will be invoked. Its - * pre-processing code will be executed after the already added {@link yfiles.layout.ILayoutStage}s' pre-processing code, while its - * post-processing code will be executed before the post-processing code of all the other {@link yfiles.layout.ILayoutStage}s. - *

- * @param stage the stage to append - */ - appendStage(stage:yfiles.layout.ILayoutStage):void; - /** - * Prepends a {@link yfiles.layout.ILayoutStage} to the previously added {@link yfiles.layout.ILayoutStage}s. - *

- * The added {@link yfiles.layout.ILayoutStage} will be invoked before any other {@link yfiles.layout.ILayoutStage}. Its pre-processing - * code will be executed before the already added {@link yfiles.layout.ILayoutStage}s' pre-processing code, while its - * post-processing code will be executed after the post-processing code of all the other {@link yfiles.layout.ILayoutStage}s. - *

- * @param stage the stage to prepend - */ - prependStage(stage:yfiles.layout.ILayoutStage):void; - /** - * Gets the complete pipeline of {@link yfiles.layout.ILayoutStage}s that were added to this {@link yfiles.layout.CompositeLayoutStage}. - * @type {yfiles.collections.IList.} - */ - layoutStages:yfiles.collections.IList; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.CompositeLayoutStage; - } - /** - * A {@link yfiles.layout.CopiedLayoutGraph} is a {@link yfiles.layout.LayoutGraph} that serves as a copy of another graph with layout information. - *

- * A {@link yfiles.layout.CopiedLayoutGraph} comes to use if a {@link yfiles.layout.ILayoutAlgorithm layout algorithm} should not run directly on the original graph. - * Using a copy, the calculated layout will not be applied to the original graph before the layout algorithm finished - * successfully. This can prevent inconsistencies in case something goes wrong during layout calculations. - *

- *

- * Concept {@link yfiles.layout.CopiedLayoutGraph} contains corresponding nodes and edges for each node and edge in the original graph and - * copies the labels of the original nodes and edges. It also delegates all - * {@link yfiles.algorithms.IDataProvider}s registered with the original graph. - *

- *

- * To preserve the relations between the original elements and the copied elements in this graph, {@link yfiles.layout.CopiedLayoutGraph} - * updates mappings between those elements. - *

- *

- * If there are structural changes to the original graph, they can be transferred to this copied graph using - * {@link yfiles.layout.CopiedLayoutGraph#syncStructure}. Then the copied graph will be altered, adding and removing elements, - * until it corresponds to the original again. - *

- *

- * Method {@link yfiles.layout.CopiedLayoutGraph#commitLayoutToOriginalGraph} will transfer updated layout information to the - * original graph. The original graph will stay unchanged until this method is called. - *

- * @see yfiles.layout.BufferedLayout - * @class - * @extends {yfiles.layout.LayoutGraph} - */ - export interface CopiedLayoutGraph extends yfiles.layout.LayoutGraph{} - export class CopiedLayoutGraph { - /** - * Creates a new {@link yfiles.layout.CopiedLayoutGraph} instance which is a copy of the given graph. - * @param graph the original graph - */ - constructor(graph:yfiles.layout.LayoutGraph); - /** - * Writes the current layout information of all elements of this copied graph to the original graph. - */ - commitLayoutToOriginalGraph():void; - /** - * Creates an edge in the copied graph that corresponds to the given original edge. - *

- * The edge will connect to the copies of the source and target of the original edge. All labels of the original edge will - * be also copied and assigned to this edge. - *

- *

- * The mappings are updated. Hence, it is possible to look up the newly created edge by using {@link yfiles.layout.CopiedLayoutGraph#getCopiedEdge} - * or the original edge by using {@link yfiles.layout.CopiedLayoutGraph#getOriginalEdge}. - *

- *

- * This method can be used for keeping the {@link yfiles.layout.CopiedLayoutGraph} in sync with the original graph. - *

- * @param originalEdge the original edge - * @returns the copy of the original edge - */ - createCopiedEdge(originalEdge:any):yfiles.algorithms.Edge; - /** - * Creates a node in the copied graph that corresponds to the given original node. - *

- * All labels of the original node will be copied and assigned to this node. - *

- *

- * The mappings are updated. Hence, it is possible to look up the newly created node by using {@link yfiles.layout.CopiedLayoutGraph#getCopiedNode} - * or the original node by using {@link yfiles.layout.CopiedLayoutGraph#getOriginalNode}. - *

- *

- * This method can be used for keeping the {@link yfiles.layout.CopiedLayoutGraph} in sync with the original graph. - *

- * @param originalNode the original node - * @returns the copy of the original node - */ - createCopiedNode(originalNode:any):yfiles.algorithms.Node; - /** - * Returns the copied edge that corresponds to the given original edge. - * @param originalEdge an edge of the original graph whose copy resides in this graph - * @returns an edge in this graph that is the copy of the given original edge - */ - getCopiedEdge(originalEdge:any):yfiles.algorithms.Edge; - /** - * Returns the copied node that corresponds to the given original node. - * @param originalNode a node of the original graph whose copy resides in this graph - * @returns a node in this graph that is the copy of the given original node - */ - getCopiedNode(originalNode:any):yfiles.algorithms.Node; - /** - * Returns the original edge that corresponds to the given copied edge. - * @param copiedEdge the edge in this graph that is a copy of the returned edge - * @returns the edge in the original graph whose copy is the given edge - */ - getOriginalEdge(copiedEdge:yfiles.algorithms.Edge):any; - /** - * Returns the original node that corresponds to the given copied node. - * @param copiedNode the node in this graph that is a copy of the returned node - * @returns the node in the original graph whose copy is the given node - */ - getOriginalNode(copiedNode:yfiles.algorithms.Node):any; - /** - * Synchronizes the structure of the {@link yfiles.layout.CopiedLayoutGraph} with the actual structure of the underlying original - * graph. - */ - syncStructure():void; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.CopiedLayoutGraph; - } - /** - * {@link yfiles.layout.CurveFittingLayoutStage} fits a piecewise cubic bezier curve to given arbitrary edge paths. - *

- * Concept - *

- *

- * The {@link yfiles.layout.LayoutGraph#getPath path} of an edge, i.e., its start and end point as well as the intermediate control points, are interpreted as the - * set of input points. A cubic bezier curve is then fitted to these points. - *

- *

- * After the fitting, the points of the processed edges can be interpreted as cubic bezier control points. Each four - * consecutive points form a bezier curve, where the first and last of the four points represent the start and end of the - * curve and the second and third point are the control points defining how the curve looks. The second and third point do - * not necessarily lie on the actual curve. - *

- *

- * There are two exceptions to the stated rules: - *

- *
    - *
  • If an input edge only consists of a source and a target point, it will be ignored by this stage.
  • - *
  • - * Self-loop edges with only one intermediate control point are also ignored. Note that self-loops with more control points - * are, however, handled by this stage. - *
  • - *
- *

- * Features - *

- *

- * The {@link yfiles.layout.CurveFittingLayoutStage#maximumError maximum allowed error} for the fitting process can be selected to control how high the precision should be. A high - * allowed error means that the approximation process has a lot of freedom. Curves are only loosely bound to the original - * edge path. If this is not desired, e.g., because no new intersection with other graph elements should be introduced, - * then a rather low error value should be specified. The lower the error value, the larger the number of bend points of an - * approximated edge will be. - *

- *

- * It is possible to define the set of edges that should be processed by this layout stage. Therefore, only paths of a - * sub-set of edges can be changed. Use a {@link yfiles.algorithms.IDataProvider} registered with the specified {@link yfiles.layout.CurveFittingLayoutStage#affectedEdgesDpKey selection key} to - * mark edges which should be part of the considered sub-set. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface CurveFittingLayoutStage extends yfiles.layout.LayoutStageBase{} - export class CurveFittingLayoutStage { - /** - * Creates a new {@link yfiles.layout.CurveFittingLayoutStage} with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [core=null] The core layout algorithm. - */ - constructor(core?:yfiles.layout.ILayoutAlgorithm); - /** - * Data provider key for selecting edges for curve fitting - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static DEFAULT_AFFECTED_EDGES_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Gets or sets the maximum allowed error for the fitting process. - *

- * The error is defined as the minimum distance between an original input control point (i.e. bend) of and edge and the - * fitted bezier curve. - *

- *

- * The maximum error must be greater than or equal to zero. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified maximum error is negative - * @type {number} - */ - maximumError:number; - /** - * Gets or sets the ratio that defines the distance between the intermediate control points and the end points of a cubic - * segment which actually represents a straight line, i.e., in case the four points are collinear. - *
    - *
  • 0.33 - the second and third control point are equally distributed between te first and fourth point.
  • - *
  • 0.0 - the first and second control point as well as the third and fourth point are equal.
  • - *
  • 0.5 - the second and third control point are equal and exactly the mid-point between the first and fourth point.
  • - *
- *

- * The control point ratio is defined to be within the interval [0.0, 0.5]. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified ratio is outside the interval [0.0, 0.5] - * @type {number} - */ - straightControlPointRatio:number; - /** - * Gets or sets the {@link yfiles.algorithms.IDataProvider} key to look up the selection state of the edges that defines whether or - * not an edge's path should be approximated by a bezier curve. - *

- * If there is a {@link yfiles.algorithms.IDataProvider} registered with the input graph with this key, then only marked edges are - * processed by this layout stage. Otherwise, all edges are processed. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.algorithms.IDataProvider} key is null - * @type {any} - */ - affectedEdgesDpKey:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.CurveFittingLayoutStage; - } - /** - * {@link yfiles.layout.DefaultLayoutGraph} is a default implementation of {@link yfiles.layout.LayoutGraph} which holds the complete - * layout information about the graph and its elements. - * @class - * @extends {yfiles.layout.LayoutGraph} - */ - export interface DefaultLayoutGraph extends yfiles.layout.LayoutGraph{} - export class DefaultLayoutGraph { - /** - * Creates a new {@link yfiles.layout.DefaultLayoutGraph} instance which is a copy of the given subgraph. - * @param graph the original graph - * @param nodeSubset the nodes that induce a subgraph of the original graph - */ - constructor(graph:yfiles.layout.LayoutGraph,nodeSubset:yfiles.algorithms.ICursor); - /** - * Creates a new {@link yfiles.layout.DefaultLayoutGraph} instance which is a copy of the given graph. - * @param argGraph the original graph - */ - constructor(argGraph:yfiles.layout.LayoutGraph); - /** - * Creates a new {@link yfiles.layout.DefaultLayoutGraph} instance with default settings. - */ - constructor(); - /** - * Creates a new implementation of {@link yfiles.layout.IEdgeLayout}. - *

- * This method is called by {@link yfiles.layout.DefaultLayoutGraph#getLayout} if there is no layout information assigned to an - * edge, yet. It may be overridden to create custom {@link yfiles.layout.IEdgeLayout}s. - *

- * @returns the layout of an edge - * @protected - */ - createEdgeLayout():yfiles.layout.IEdgeLayout; - /** - * Creates a new implementation of {@link yfiles.layout.INodeLayout}. - *

- * This method is called by {@link yfiles.layout.DefaultLayoutGraph#getLayout} if there is no layout information assigned to a - * node, yet. It may be overridden to create custom {@link yfiles.layout.INodeLayout}s. - *

- * @returns the layout of a node - * @protected - */ - createNodeLayout():yfiles.layout.INodeLayout; - /** - * Specifies the layout information for all associated labels of the given edge. - *

- * The layout information consists of the location, size and orientation of the label. - *

- * @param edge the edge - * @param layout the layout information for the labels of the edge - */ - setLabelLayout(edge:yfiles.algorithms.Edge,layout:yfiles.layout.IEdgeLabelLayout[]):void; - /** - * Specifies the layout information for all associated labels of the given node. - *

- * The layout information consists of the location, size and orientation of the label. - *

- * @param node the node - * @param layout the layout information for the labels of the node - */ - setLabelLayout(node:yfiles.algorithms.Node,layout:yfiles.layout.INodeLabelLayout[]):void; - /** - * Specifies the layout information for all associated labels of the given node in case there is only one label. - *

- * The layout information consists of the location, size and orientation of the label. - *

- * @param node the node - * @param layout the layout information for the label of the node - */ - setLabelLayout(node:yfiles.algorithms.Node,layout:yfiles.layout.INodeLabelLayout):void; - /** - * Specifies the layout information for the given edge. - *

- * The layout information consists of the locations of the control and end points of the edge. - *

- * @param edge the edge - * @param layout the layout information for the edge - */ - setLayout(edge:yfiles.algorithms.Edge,layout:yfiles.layout.IEdgeLayout):void; - /** - * Specifies the layout information for the given node. - *

- * The layout information consists of the location and size of the node. - *

- * @param node the node - * @param layout the layout information for the node - */ - setLayout(node:yfiles.algorithms.Node,layout:yfiles.layout.INodeLayout):void; - /** - * A {@link yfiles.algorithms.INodeMap} associating {@link yfiles.layout.INodeLabelLayout}s with the nodes of this graph. - * @see yfiles.layout.DefaultLayoutGraph#setLabelLayout - * @type {yfiles.algorithms.INodeMap} - */ - nodeLabelMap:yfiles.algorithms.INodeMap; - /** - * An {@link yfiles.algorithms.IEdgeMap} associating {@link yfiles.layout.IEdgeLabelLayout}s with the edges of this graph. - * @see yfiles.layout.DefaultLayoutGraph#setLabelLayout - * @type {yfiles.algorithms.IEdgeMap} - */ - edgeLabelMap:yfiles.algorithms.IEdgeMap; - /** - * A {@link yfiles.collections.IMap.} associating the owner of a node label with the node label itself. - * @type {yfiles.collections.IMap.} - */ - nodeLabelFeatureMap:yfiles.collections.IMap; - /** - * A {@link yfiles.collections.IMap.} associating the owner of an edge label with the edge label itself. - * @type {yfiles.collections.IMap.} - */ - edgeLabelFeatureMap:yfiles.collections.IMap; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.DefaultLayoutGraph; - } - /** - * {@link yfiles.layout.Direction} provides four main directions and some methods to work with them. - * @class - * @final - */ - export interface Direction extends yfiles.lang.Object{} - export class Direction { - /** - * Returns the direction encoded as an integer value. - * @returns 0 for direction {@link #UP}, 1 for {@link #RIGHT}, 2 for {@link #DOWN}, and - * 3 for {@link #LEFT} - */ - getDirection():number; - /** - * Decodes the up direction. - * @const - * @static - * @type {yfiles.layout.Direction} - */ - static UP:yfiles.layout.Direction; - /** - * Decodes the right direction. - * @const - * @static - * @type {yfiles.layout.Direction} - */ - static RIGHT:yfiles.layout.Direction; - /** - * Decodes the down direction. - * @const - * @static - * @type {yfiles.layout.Direction} - */ - static DOWN:yfiles.layout.Direction; - /** - * Decodes the left direction. - * @const - * @static - * @type {yfiles.layout.Direction} - */ - static LEFT:yfiles.layout.Direction; - /** - * Gets the direction that follows this direction in clockwise order. - *

- * The new direction is turned 90 degrees in clockwise direction compared to this instance. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the current direction value is invalid - * @type {yfiles.layout.Direction} - */ - turnCW:yfiles.layout.Direction; - /** - * Gets the direction that follows this direction in counterclockwise order. - *

- * The new direction is turned 90 degrees in counterclockwise direction compared to this instance. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the current direction value is invalid - * @type {yfiles.layout.Direction} - */ - turnCCW:yfiles.layout.Direction; - /** - * Gets the mirror direction. - *

- * The new direction is turned 180 degrees compared to this instance. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the current direction value is invalid - * @type {yfiles.layout.Direction} - */ - mirror:yfiles.layout.Direction; - /** - * Gets whether or not this direction is horizontal ({@link yfiles.layout.Direction#RIGHT} or {@link yfiles.layout.Direction#LEFT}). - * @type {boolean} - */ - horizontal:boolean; - /** - * Gets whether or not this direction is vertical ({@link yfiles.layout.Direction#UP} or {@link yfiles.layout.Direction#DOWN}). - * @type {boolean} - */ - vertical:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.Direction; - } - /** - * {@link yfiles.layout.DiscreteEdgeLabelLayoutModel} describes the placement of rotated labels at some predefined positions along - * the edge. - *

- * {@graph {"ann":{"s":[30,30],"d":1,"lblB":1},"n":[[0,0],[200,0]],"e":[[0,1,[],[[35,-13.59,33.36,18.7,0.7071067811865475,-0.7071067811865476,"Label"],[158.19,-13.59,33.36,18.7,0.7071067811865475,-0.7071067811865476,"Label"],[96.59,-13.59,33.36,18.7,0.7071067811865475,-0.7071067811865476,"Label"],[35,33.22,33.36,18.7,0.7071067811865475,-0.7071067811865476,"Label"],[158.19,33.22,33.36,18.7,0.7071067811865475,-0.7071067811865476,"Label"],[96.59,33.22,33.36,18.7,0.7071067811865475,-0.7071067811865476,"Label"],[35,9.82,33.36,18.7,0.7071067811865475,-0.7071067811865476,"Label"],[96.59,9.82,33.36,18.7,0.7071067811865475,-0.7071067811865476,"Label"],[158.19,9.82,33.36,18.7,0.7071067811865475,-0.7071067811865476,"Label"]]]],"vp":[0.0,-27.0,230.0,84.0]}} - *

- *

- * The predefined positions in this model - *

- *

- * It's possible to specify a distance value that controls the distance between label and edge. - *

- *

- * Furthermore, there's the possibility to mask out arbitrary edge label candidates. This can either be done by specifying - * predefined candidate masks or combining several label positions with a logical or-operation to a user-defined mask. - *

- * @class - * @implements {yfiles.layout.IEdgeLabelLayoutModel} - */ - export interface DiscreteEdgeLabelLayoutModel extends yfiles.lang.Object,yfiles.layout.IEdgeLabelLayoutModel{} - export class DiscreteEdgeLabelLayoutModel { - /** - * Creates a new instance of {@link yfiles.layout.DiscreteEdgeLabelLayoutModel} using the given candidate mask. - *

- * The candidates mask can either describe multiple or single valid positions. - *

- * @param candidateMask the position mask that defines the allowed positions for an edge label - */ - constructor(candidateMask:yfiles.layout.DiscreteEdgeLabelPositions); - /** - * Creates a new instance of {@link yfiles.layout.DiscreteEdgeLabelLayoutModel} with default settings. - */ - constructor(); - /** - * - * @param labelBounds - * @param edgeLayout - * @param sourceNode - * @param targetNode - * @returns - */ - createModelParameter(labelBounds:yfiles.algorithms.YOrientedRectangle,edgeLayout:yfiles.layout.IEdgeLayout,sourceNode:yfiles.layout.INodeLayout,targetNode:yfiles.layout.INodeLayout):any; - /** - * Returns a model parameter that encodes the specified position. - *

- * This model parameter can be passed to {@link yfiles.layout.DiscreteEdgeLabelLayoutModel#getLabelPlacement} to determine the - * label's position. - *

- * @param position one of the valid positions - * @returns a model parameter that encodes the specified position - * @throws {Stubs.Exceptions.ArgumentError} if the specified position is unknown - * @static - */ - static createPositionParameter(position:number):any; - /** - * - * @param label - * @param edgeLayout - * @param sourceNode - * @param targetNode - * @returns - */ - getLabelCandidates(label:yfiles.layout.IEdgeLabelLayout,edgeLayout:yfiles.layout.IEdgeLayout,sourceNode:yfiles.layout.INodeLayout,targetNode:yfiles.layout.INodeLayout):yfiles.algorithms.YList; - /** - * - * @param labelSize - * @param edgeLayout - * @param sourceNode - * @param targetNode - * @param param - * @returns - */ - getLabelPlacement(labelSize:yfiles.algorithms.YDimension,edgeLayout:yfiles.layout.IEdgeLayout,sourceNode:yfiles.layout.INodeLayout,targetNode:yfiles.layout.INodeLayout,param:any):yfiles.algorithms.YOrientedRectangle; - /** - * Returns the oriented box of the label for the given label position. - *

- * This method is called by {@link yfiles.layout.DiscreteEdgeLabelLayoutModel#getLabelPlacement} and {@link yfiles.layout.DiscreteEdgeLabelLayoutModel#getLabelCandidates} - * to retrieve a valid position. - *

- * @param labelSize the size of the label that should be placed - * @param edgeLayout the layout of the edge to which the label belongs - * @param sourceLayout the layout of the source node of the label-owning edge - * @param targetLayout the layout of the target node of the label-owning edge - * @param position the label position that is valid in this model - * @returns the oriented box of the label - * @protected - */ - getLabelPlacementForPosition(labelSize:yfiles.algorithms.YDimension,edgeLayout:yfiles.layout.IEdgeLayout,sourceLayout:yfiles.layout.INodeLayout,targetLayout:yfiles.layout.INodeLayout,position:yfiles.layout.DiscreteEdgeLabelPositions):yfiles.algorithms.YOrientedRectangle; - /** - * Returns the position specifier that is encoded by the given model parameter. - * @param parameter the model parameter - * @returns the position specifier - * @throws {Stubs.Exceptions.ArgumentError} if the specified model parameter is not valid for this model - * @static - */ - static getPosition(parameter:any):number; - /** - * Checks whether or not the given model parameter encodes a valid edge label position for this model. - *

- * If the model parameter describes a position that is accepted by the candidate mask, this is a valid parameter. - *

- * @param parameter the model parameter - * @returns true if the label position described by the given model parameter is allowed, false otherwise - */ - isParameterValid(parameter:any):boolean; - /** - * Gets the candidate mask which specifies the valid positions for edge labels. - * @type {yfiles.layout.DiscreteEdgeLabelPositions} - */ - candidateMask:yfiles.layout.DiscreteEdgeLabelPositions; - /** - * Gets or sets whether or not the label position mask should be interpreted relative to the edge segment. - *

- * If this option is disabled, the position mask is interpreted in a geometric sense. - *

- * @type {boolean} - */ - positionRelativeToSegment:boolean; - /** - * Gets or sets whether or not edge labels are automatically rotated according to the angle of the corresponding reference - * edge segment. - * @type {boolean} - */ - autoRotationEnabled:boolean; - /** - * Gets or sets whether or not edge labels get flipped if they would be upside down in their current position. - * @type {boolean} - */ - autoFlipping:boolean; - /** - * Gets or sets the angle (measured in radians) of the label model. - *

- * The angle is applied in clockwise direction. - *

- * @type {number} - */ - angle:number; - /** - * Gets or sets the distance between the label's bounding box and the edge path. - *

- * The distance must be a non-negative value. - *

- * @type {number} - */ - distance:number; - /** - * Gets a model parameter that encodes the default position of this model's allowed edge label positions. - *

- * Default positions are (in descending order): - *

- *
    - *
  • {@link yfiles.layout.DiscreteEdgeLabelPositions#CENTER}
  • - *
  • {@link yfiles.layout.DiscreteEdgeLabelPositions#SOURCE_CENTER}
  • - *
  • {@link yfiles.layout.DiscreteEdgeLabelPositions#TAIL}
  • - *
  • {@link yfiles.layout.DiscreteEdgeLabelPositions#SOURCE_TAIL}
  • - *
- *

- * Descending order means that whenever two or more of the above default positions are part of the allowed positions, then - * the model parameter encodes the one that is listed first. - *

- * @type {any} - */ - defaultParameter:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.DiscreteEdgeLabelLayoutModel; - } - /** - * {@link yfiles.layout.DiscreteNodeLabelLayoutModel} allows placing labels at eight positions around a node and at nine positions - * inside the node. - *

- * {@graph {"ann":{"s":[120,80],"d":1,"lblB":1},"n":[[-11.9,13.17,[[31.42,9.17,33.36,18.7,"Label"],[112.1,111.88,33.36,18.7,"Label"],[112.1,62.53,33.36,18.7,"Label"],[31.42,115.88,33.36,18.7,"Label"],[-49.27,111.88,33.36,18.7,"Label"],[-49.27,62.53,33.36,18.7,"Label"],[112.1,13.17,33.36,18.7,"Label"],[-49.27,13.17,33.36,18.7,"Label"],[31.42,62.53,33.36,18.7,"Label"],[-7.9,62.53,33.36,18.7,"Label"],[-7.9,89.17,33.36,18.7,"Label"],[31.42,89.17,33.36,18.7,"Label"],[70.73,89.17,33.36,18.7,"Label"],[-7.9,35.88,33.36,18.7,"Label"],[70.73,62.53,33.36,18.7,"Label"],[70.73,35.88,33.36,18.7,"Label"],[31.42,35.88,33.36,18.7,"Label"]]]],"e":[],"vp":[-50.0,-10.0,196.0,126.0]}} - *

- *

- * The predefined positions in this model - *

- *

- * It's possible to specify an insets value that controls the distance between label and node. - *

- *

- * Furthermore, there's the possibility to mask out arbitrary node label candidates. This can either be done by specifying - * predefined candidate masks or a combination of valid positions of this model using a logical or-operation. - *

- * @class - * @implements {yfiles.layout.INodeLabelLayoutModel} - */ - export interface DiscreteNodeLabelLayoutModel extends yfiles.lang.Object,yfiles.layout.INodeLabelLayoutModel{} - export class DiscreteNodeLabelLayoutModel { - /** - * Creates a new instance of {@link yfiles.layout.DiscreteNodeLabelLayoutModel} using the given candidate mask and insets. - *

- * The specified mask can also describe a single position. - *

- * @param candidateMask the position mask that defines the allowed positions for a node label - * @param [inset=4.0] the inset value that defines the internal label distance to the node's border - */ - constructor(candidateMask:yfiles.layout.DiscreteNodeLabelPositions,inset?:number); - /** - * Creates a new instance of {@link yfiles.layout.DiscreteNodeLabelLayoutModel} with default settings. - */ - constructor(); - /** - * - * @param labelBounds - * @param nodeLayout - * @returns - */ - createModelParameter(labelBounds:yfiles.algorithms.YOrientedRectangle,nodeLayout:yfiles.layout.INodeLayout):any; - /** - * - * @param labelLayout - * @param nodeLayout - * @returns - */ - getLabelCandidates(labelLayout:yfiles.layout.INodeLabelLayout,nodeLayout:yfiles.layout.INodeLayout):yfiles.algorithms.YList; - /** - * - * @param labelSize - * @param nodeLayout - * @param parameter - * @returns - */ - getLabelPlacement(labelSize:yfiles.algorithms.YDimension,nodeLayout:yfiles.layout.INodeLayout,parameter:any):yfiles.algorithms.YOrientedRectangle; - /** - * Returns the oriented box of the label for the given label position. - *

- * This method is called by {@link yfiles.layout.DiscreteNodeLabelLayoutModel#getLabelPlacement} and {@link yfiles.layout.DiscreteNodeLabelLayoutModel#getLabelCandidates} - * to retrieve a valid position. - *

- * @param labelSize the size of the label that should be placed - * @param nodeLayout the layout of the node to which the label belongs - * @param position the label position that is valid in this model - * @returns the oriented box of the label - * @protected - */ - getLabelPlacementForPosition(labelSize:yfiles.algorithms.YDimension,nodeLayout:yfiles.layout.INodeLayout,position:yfiles.layout.DiscreteNodeLabelPositions):yfiles.algorithms.YOrientedRectangle; - /** - * Checks whether or not the given model parameter encodes a valid node label position for this model. - *

- * If the model parameter describes a position that is accepted by the candidate mask, this is a valid parameter. - *

- * @param parameter the model parameter - * @returns true if the label position described by the given model parameter is allowed, false otherwise - */ - isParameterValid(parameter:any):boolean; - /** - * Gets the candidate mask which specifies the valid positions for node labels. - * @type {yfiles.layout.DiscreteNodeLabelPositions} - */ - candidateMask:yfiles.layout.DiscreteNodeLabelPositions; - /** - * Gets or sets the distance between the label's bounding box and the node. - *

- * The distance must be a non-negative value. - *

- * @type {number} - */ - distance:number; - /** - * Gets a model parameter that encodes the default position of this model's allowed node label positions. - *

- * Default positions are (in descending order): - *

- *
    - *
  • {@link yfiles.layout.DiscreteNodeLabelPositions#CENTER}
  • - *
  • {@link yfiles.layout.DiscreteNodeLabelPositions#NORTH_EAST}
  • - *
  • {@link yfiles.layout.DiscreteNodeLabelPositions#NORTH}
  • - *
  • {@link yfiles.layout.DiscreteNodeLabelPositions#EAST}
  • - *
- *

- * Descending order means that whenever two or more of the above default positions are part of the allowed positions, then - * the model parameter encodes the one that is listed first. - *

- * @type {any} - */ - defaultParameter:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.DiscreteNodeLabelLayoutModel; - } - /** - * An {@link yfiles.layout.EdgeBundleDescriptor} defines the {@link yfiles.layout.EdgeBundling bundling} settings of an edge. - *

- * The defined settings will be considered by {@link yfiles.layout.ILayoutAlgorithm layout algorithms} which support edge bundling. - *

- *

- * Each {@link yfiles.layout.EdgeBundleDescriptor} can either be specified for a single edge or shared by several edges. It is - * assigned to an edge by registering a {@link yfiles.algorithms.IDataProvider} with key {@link yfiles.layout.EdgeBundling#EDGE_BUNDLE_DESCRIPTOR_DP_KEY} - * to the input graph. - *

- * @see yfiles.layout.EdgeBundling - * @see yfiles.layout.EdgeBundling#EDGE_BUNDLE_DESCRIPTOR_DP_KEY - * @class - */ - export interface EdgeBundleDescriptor extends yfiles.lang.Object{} - export class EdgeBundleDescriptor { - /** - * Creates a new {@link yfiles.layout.EdgeBundleDescriptor} representing a copy of the given other descriptor instance. - * @param descriptor the descriptor to copy - */ - constructor(descriptor:yfiles.layout.EdgeBundleDescriptor); - /** - * Creates a new {@link yfiles.layout.EdgeBundleDescriptor} with default settings. - */ - constructor(); - /** - * Gets or sets whether or not the direction of the edge associated to this descriptor should be considered. - *

- * During the bundling procedure, the edges are bundled based on their direction such that the incoming edges of a node are - * bundled separately from its outgoing edges. If the direction of edges adjacent to a node is not considered, then they - * are not bundled separately. - *

- *

- * If the direction of some edges is taken into consideration while the direction of some others (adjacent to the same - * node) is ignored, the undirected edges are also bundled separately. This is done to distinguish them from the incoming - * and outgoing edges of the particular node. - *

- * @type {boolean} - */ - considerDirection:boolean; - /** - * Gets or sets whether or not an edge associated to this descriptor should be bundled. - * @type {boolean} - */ - bundled:boolean; - /** - * Gets or sets whether or not a bezier curve should be fit to an edge associated to this descriptor. - *

- * If disabled, the edges resemble B-splines where points of the path are actually curve points. Therefore, this - * representation requires a high number of bends to model curves. - *

- *

- * If this feature is enabled, a bezier curve is fitted to the start and end point as well as the intermediate control - * points of the edge. After the fitting, the points of the edge can be interpreted as cubic bezier control points. Each - * four consecutive points form a bezier curve, where the first and last of the four points represent the start and end of - * the curve and the second and third point are the control points defining how the curve looks. The second and third point - * do not necessarily lie on the actual curve. - *

- * @type {boolean} - */ - bezierFitting:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.EdgeBundleDescriptor; - } - /** - * An {@link yfiles.layout.EdgeBundling} instance defines if and how the edges of a graph should be bundled by a - * {@link yfiles.layout.ILayoutAlgorithm layout algorithm}, given that the algorithm supports edge bundling. - *

- * Bundling together multiple edges means that their common parts are to some degree merged into a bundled part. At the - * source and target point, the edges are again clearly split. Edge bundling is useful to increase the readability of graph - * drawings with a high number of edges that connect a comparably small number of nodes. Without bundling, such drawings - * can often contain visual clutter and feature bad readability. - *

- *

- * The bundling {@link yfiles.layout.EdgeBundling#bundlingStrength strength} and {@link yfiles.layout.EdgeBundling#bundlingQuality quality} are global settings for the bundling process. On the other hand, each edge can get - * specific settings by assigning a {@link yfiles.layout.EdgeBundleDescriptor} to it. A {@link yfiles.algorithms.IDataProvider} can be - * registered with the input graph with key {@link yfiles.layout.EdgeBundling#EDGE_BUNDLE_DESCRIPTOR_DP_KEY} to assign descriptors - * to edges. This allows, for example, to define which edges should actually be bundled. - *

- * @see yfiles.layout.EdgeBundleDescriptor - * @see yfiles.circular.CircularLayout#edgeBundling - * @class - */ - export interface EdgeBundling extends yfiles.lang.Object{} - export class EdgeBundling { - /** - * Creates a new {@link yfiles.layout.EdgeBundling} instance with the given {@link yfiles.layout.EdgeBundling#bundlingStrength bundling strength} and {@link yfiles.layout.EdgeBundling#bundlingQuality bundling quality}. - * @param bundlingStrength the bundling strength from the interval [0,1] - * @param bundlingQuality the bundling quality from the interval [0,1] - * @throws {Stubs.Exceptions.ArgumentError} if the given bundling strength or quality is not within [0,1] - */ - constructor(bundlingStrength:number,bundlingQuality:number); - /** - * Creates a new {@link yfiles.layout.EdgeBundling} instance with default settings. - */ - constructor(); - /** - * Data provider key for specifying individual bundling settings for edges - *

- * If no {@link yfiles.layout.EdgeBundleDescriptor} is mapped to an edge, the {@link yfiles.layout.EdgeBundling#defaultBundleDescriptor default descriptor} is used by the layout algorithm to - * obtain the bundling setup of that edge. - *

- * @see yfiles.layout.EdgeBundling#defaultBundleDescriptor - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static EDGE_BUNDLE_DESCRIPTOR_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Gets or sets the desired quality of the calculated edge bundling. - *

- * Higher quality indicates that the bundling procedure uses more sophisticated methods to compute the actual bundles and - * the routing of the edges. This may lead to a significantly higher running time, especially for large graphs. On the - * other hand, a low quality indicates that run-time is more important than highly optimized bundling results, leading to, - * for example, more crossings between different bundles. - *

- *

- * The quality is defined to lie within [0,1], where higher values stand for higher quality. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given quality value is not within [0,1] - * @type {number} - */ - bundlingQuality:number; - /** - * Gets or sets the strength of the edge bundling. - *

- * The strength controls how tightly the edges are bundled and influences the shape of the curves of bundled edges. Low - * values lead to only slightly bundled edges; results will mostly show individual node-to-node connectivity information. - * High values show the connectivity on a higher level, strongly bundling edges together and generating highly curved edge - * paths. - *

- *

- * The bundling strength is defined as a value from the interval [0,1]. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given strength is less than 0 or greater than 1 - * @type {number} - */ - bundlingStrength:number; - /** - * Gets or sets the default {@link yfiles.layout.EdgeBundleDescriptor} used for all edges which do not have a specific descriptor - * assigned via a {@link yfiles.algorithms.IDataProvider} registered with key - * {@link yfiles.layout.EdgeBundling#EDGE_BUNDLE_DESCRIPTOR_DP_KEY}. - * @throws {Stubs.Exceptions.ArgumentError} if the given descriptor is null - * @see yfiles.layout.EdgeBundling#EDGE_BUNDLE_DESCRIPTOR_DP_KEY - * @type {yfiles.layout.EdgeBundleDescriptor} - */ - defaultBundleDescriptor:yfiles.layout.EdgeBundleDescriptor; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.EdgeBundling; - } - /** - * An {@link yfiles.layout.EdgeLabelCandidate} describes one valid placement for an edge label considering the label model. - * @class - * @extends {yfiles.layout.LabelCandidate} - */ - export interface EdgeLabelCandidate extends yfiles.layout.LabelCandidate{} - export class EdgeLabelCandidate { - /** - * Creates a new instance of {@link yfiles.layout.EdgeLabelCandidate} described by location, size, model parameter and internal - * flag. - * @param pos the location of the upper left corner of the candidate - * @param size the size of the candidate - * @param param the parameters of the label model associated with this candidate - * @param owner the label associated with the candidate - * @param [internal=false] true if the candidate is allowed to overlap with its owner, false otherwise - */ - constructor(pos:yfiles.algorithms.YPoint,size:yfiles.algorithms.YDimension,param:any,owner:yfiles.layout.IEdgeLabelLayout,internal?:boolean); - /** - * Creates a new instance of {@link yfiles.layout.EdgeLabelCandidate} described by its box, model parameter and internal flag. - * @param labelBox the box that specifies the candidate's size and position - * @param param the parameters of the label model associated with this candidate - * @param owner the label associated with the candidate - * @param [internal=false] true if the candidate is allowed to overlap with its owner, false otherwise - */ - constructor(labelBox:yfiles.algorithms.YOrientedRectangle,param:any,owner:yfiles.layout.IEdgeLabelLayout,internal?:boolean); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.EdgeLabelCandidate; - } - /** - * {@link yfiles.layout.EdgeLabelOrientationSupport} provides orientation and mirroring support for {@link yfiles.layout.ILayoutAlgorithm layout algorithms} with - * integrated edge labeling. - *

- * To calculate the position and orientation of edge labels whose placements are defined with the - * {@link yfiles.layout.PreferredPlacementDescriptor}, the {@link yfiles.layout.OrientationLayout} would need the direction of the - * associated edge. Since this direction is not available to the {@link yfiles.layout.OrientationLayout}, because it is a wrapper, - * the calculation must be done in the core layout algorithm itself with the help of the - * {@link yfiles.layout.EdgeLabelOrientationSupport}. - *

- *

- * Important: Since layout algorithms with integrated edge labeling cannot deal with ambiguous preferred placement - * descriptors (combinations of the same setting, e.g., source or target for the {@link yfiles.layout.PreferredPlacementDescriptor#placeAlongEdge}), {@link yfiles.layout.EdgeLabelOrientationSupport#preProcessLabel} - * removes combinations and replaces the original descriptor with a non-ambiguous one during the layout calculation. - *

- * @class - */ - export interface EdgeLabelOrientationSupport extends yfiles.lang.Object{} - export class EdgeLabelOrientationSupport { - /** - * Creates a new {@link yfiles.layout.EdgeLabelOrientationSupport} instance. - * @see yfiles.layout.OrientationLayout#considerEdgeLabels - */ - constructor(); - /** - * Creates and returns a non-ambiguous {@link yfiles.layout.PreferredPlacementDescriptor} of the given potentially ambiguous one. - *

- * The created descriptor will be one without any combinations of settings, e.g., source or target for the {@link yfiles.layout.PreferredPlacementDescriptor#placeAlongEdge}. - *

- * @param ambiguous an ambiguous {@link } - * @returns a non-ambiguous version of the given ambiguous {@link } - * @protected - */ - createNonAmbiguous(ambiguous:yfiles.layout.PreferredPlacementDescriptor):yfiles.layout.PreferredPlacementDescriptor; - /** - * Calculates the up vector of an edge label considering the preferred placement of the label as well as the direction of - * the edge segment the label is attached to. - * @param descriptor the data describing the preferred label orientation - * @param segmentDirection the direction the edge segment is pointing to - * @returns the up vector for the edge label that considers the preferred placement of the label as well as the direction of the - * edge segment the label is attached to - * @static - */ - static getEdgeLabelUpVector(descriptor:yfiles.layout.PreferredPlacementDescriptor,segmentDirection:yfiles.layout.Direction):yfiles.algorithms.YVector; - /** - * Calculates the up vector for a label whose right vector is rotated clockwise by the given angle. - *

- * The up vector starts in the lower-left corner of the label and points up. If the label is paraxial it is (0, -1). The - * right vector starts at the same point and points right. In a paraxial label it is (1, 0). - *

- * @param rightVectorAngle the angle in radians the right vector is rotated by - * @returns the up vector for a label whose right vector is rotated clockwise by the given angle - * @static - */ - static getLabelUpVector(rightVectorAngle:number):yfiles.algorithms.YVector; - /** - * Transforms a direction of the layout to the oriented layout direction. - * @param direction direction in the layout - * @param orientation the orientation of the layout - * @param mirrorMask the mask to determine whether or not the orientation is mirrored - * @returns the direction in the oriented layout - * @static - */ - static getOrientedDirection(direction:yfiles.layout.Direction,orientation:yfiles.layout.LayoutOrientation,mirrorMask:yfiles.layout.MirrorModes):yfiles.layout.Direction; - /** - * Returns whether or not the orientation is mirrored. - * @param orientation the orientation of the layout - * @param mirrorMask the mask to determine whether or not the orientation is mirrored - * @returns true if the orientation is mirrored, false otherwise - * @static - */ - static isOrientationMirrored(orientation:yfiles.layout.LayoutOrientation,mirrorMask:yfiles.layout.MirrorModes):boolean; - /** - * Marks the given port label for a non-port placement (fallback). - *

- * The given edge label's {@link yfiles.layout.PreferredPlacementDescriptor} will internally be changed such that its {@link yfiles.layout.PreferredPlacementDescriptor#placeAlongEdge placement along edge} - * is either {@link yfiles.layout.LabelPlacements#AT_SOURCE} or {@link yfiles.layout.LabelPlacements#AT_TARGET}. - *

- *

- * Algorithms that are executed after this call and before {@link yfiles.layout.EdgeLabelOrientationSupport#resetAmbiguousLabelDescriptors} - * will handle port labels like normal source or target labels. - *

- * @param portLabel an edge label that had a {@link #AT_SOURCE_PORT} or {@link #AT_TARGET_PORT} - * placement preference - * @throws {Stubs.Exceptions.InvalidOperationError} if {@link yfiles.layout.EdgeLabelOrientationSupport#replaceAmbiguousLabelDescriptors} was never called for the graph containing - * the given label. - * @see yfiles.layout.LabelPlacements#AT_SOURCE_PORT - * @see yfiles.layout.LabelPlacements#AT_TARGET_PORT - */ - markPortLabelForFallbackPlacement(portLabel:yfiles.layout.LabelLayoutData):void; - /** - * Restores the original preferred placement and updates the label rotation according to the layout orientation. - *

- * The original {@link yfiles.layout.LabelLayoutData#preferredPlacementDescriptor} that has been replaced in {@link yfiles.layout.EdgeLabelOrientationSupport#preProcessLabel} gets restored. Then it - * moves and rotates the {@link yfiles.layout.LabelLayoutData#bounds label box} in respect of the orientation. - *

- *

- * This method is called by the core layout algorithm with the integrated edge labeling for each edge label after the - * location of the label is determined. - *

- * @param graph the graph to get the orientation information from - * @param label the information about the edge label whose location is determined - */ - postProcessLabel(graph:yfiles.algorithms.Graph,label:yfiles.layout.LabelLayoutData):void; - /** - * Prepares the label for the core layout algorithm. - *

- * First, the {@link yfiles.layout.LabelLayoutData#preferredPlacementDescriptor preferred placement} of the edge label is replaced by a non-ambiguous {@link yfiles.layout.PreferredPlacementDescriptor} - * that has only relative references. This descriptor is orientation independent and can be used in the core layout - * algorithm. Second, the method rotates the {@link yfiles.layout.LabelLayoutData#bounds label box} in respect of its {@link yfiles.layout.PreferredPlacementDescriptor} and the - * direction of the segment to which it belongs. After that call, the core layout algorithm can use the geometry ({@link yfiles.layout.LabelLayoutData#width} and - * {@link yfiles.layout.LabelLayoutData#height}) of the label to calculate its location. - *

- *

- * This method is called by the core layout algorithm with the integrated edge labeling for each edge label before the - * layout algorithm uses the geometry of labels. It should be called as soon as the direction of the segment the label - * belongs to is determined. - *

- * @param graph the graph to get the orientation information from - * @param label the information about the edge label whose segment direction is determined - * @param segmentDirection the direction of the segment the edge label belongs to - */ - preProcessLabel(graph:yfiles.algorithms.Graph,label:yfiles.layout.LabelLayoutData,segmentDirection:yfiles.layout.Direction):void; - /** - * Replaces the - * {@link yfiles.layout.PreferredPlacementDescriptor}s of all edge labels in the given graph with non-ambiguous descriptors. - *

- * The non-ambiguous descriptors are retrieved from the original descriptors. They describe only one of the possible - * placements. - *

- *

- * This method should be called by a layout algorithm at the beginning of the layout calculation to assure that the label's - * placement is handled consistently. - *

- * @param graph the input graph - */ - replaceAmbiguousLabelDescriptors(graph:yfiles.algorithms.Graph):void; - /** - * Restores the - * {@link yfiles.layout.PreferredPlacementDescriptor}s of all edge labels in the given graph with their original descriptors. - *

- * This method should be called by a layout algorithm at the end of the layout calculation to assure that the original - * state of the graph is not corrupted. - *

- * @param graph the input graph - */ - resetAmbiguousLabelDescriptors(graph:yfiles.algorithms.Graph):void; - /** - * Calculates and sets the up vector of an edge label considering the preferred placement of the label as well as the - * direction of the edge segment the label is attached to. - * @param label the data that describes the label orientation and is used for setting the new up vector - * @param segmentDirection the direction the edge segment is pointing to - * @see yfiles.layout.EdgeLabelOrientationSupport#getEdgeLabelUpVector - * @static - */ - static updateLabelOrientation(label:yfiles.layout.LabelLayoutData,segmentDirection:yfiles.layout.Direction):void; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.EdgeLabelOrientationSupport; - } - /** - * {@link yfiles.layout.FixNodeLayoutStage} fixes the initial position of either a single node or the alignment of the bounding box of - * several nodes (but not the positions of the individual nodes). - *

- * The absolute coordinates of the {@link yfiles.layout.FixNodeLayoutStage#calculateFixPoint fix point} are the same before and after invoking the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. However, the - * relative coordinates of the nodes are altered by the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface FixNodeLayoutStage extends yfiles.layout.LayoutStageBase{} - export class FixNodeLayoutStage { - /** - * Creates a new {@link yfiles.layout.FixNodeLayoutStage} instance with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [coreLayouter=null] The core layout algorithm. - */ - constructor(coreLayouter?:yfiles.layout.ILayoutAlgorithm); - /** - * Calculates the bounding box of the specified nodes. - *

- * The calculated bounds may contain {@link yfiles.layout.FixNodeLayoutStage#includingEdges edges} and/or {@link yfiles.layout.FixNodeLayoutStage#includingLabels labels}. - *

- *

- * This method is called by {@link yfiles.layout.FixNodeLayoutStage#calculateFixPoint} and may be overridden to customize the size - * of the bounds. - *

- * @param graph the graph associated with the specified nodes - * @param fixed the list of nodes for which to determine the bounding box - * @returns the bounding box of the specified nodes - * @see yfiles.layout.FixNodeLayoutStage#includingEdges - * @see yfiles.layout.FixNodeLayoutStage#includingLabels - * @see yfiles.layout.FixNodeLayoutStage#calculateFixPoint - * @protected - */ - calculateBounds(graph:yfiles.layout.LayoutGraph,fixed:yfiles.algorithms.NodeList):yfiles.algorithms.Rectangle2D; - /** - * Calculates the fix point for the specified nodes in the specified graph. - *

- * The default implementation calls {@link yfiles.layout.FixNodeLayoutStage#calculateBounds} and - * {@link yfiles.layout.FixNodeLayoutStage#calculateFixPoint}. - *

- *

- * This method is called by {@link yfiles.layout.FixNodeLayoutStage#applyLayout} to determine the point that will have the same - * coordinates before and after invoking the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. It may be overridden to introduce a custom policy for retrieving the fix point. - *

- * @param graph the graph associated with the specified nodes - * @param fixed the list of nodes for which a fix point has to be determined - * @returns the fix point for the specified nodes in the specified graph - * @see yfiles.layout.FixNodeLayoutStage#fixPointPolicy - * @see yfiles.layout.FixNodeLayoutStage#calculateBounds - * @see yfiles.layout.FixNodeLayoutStage#calculateFixPoint - * @protected - */ - calculateFixPoint(graph:yfiles.layout.LayoutGraph,fixed:yfiles.algorithms.NodeList):yfiles.algorithms.YPoint; - /** - * Calculates the fix point of the specified rectangle according to the policy returned by {@link yfiles.layout.FixNodeLayoutStage#fixPointPolicy}. - *

- * If the specified rectangle is null or the rectangle has negative width or negative height then null will be returned. - *

- *

- * This method is called by - * {@link yfiles.layout.FixNodeLayoutStage#calculateFixPoint}. It may be overridden to introduce a custom policy for retrieving the - * fix point. - *

- * @param bounds the rectangle for which to determine the fix point - * @returns the fix point of the specified rectangle or null if nothing should be fixed - * @throws {Stubs.Exceptions.ArgumentError} if the current fix point policy is invalid - * @see yfiles.layout.FixNodeLayoutStage#fixPointPolicy - * @protected - */ - calculateFixPoint(bounds:yfiles.algorithms.Rectangle2D):yfiles.algorithms.YPoint; - /** - * Data provider key for determining the nodes that should be considered fixed - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static FIXED_NODE_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets or sets the fix point calculation policy used in {@link yfiles.layout.FixNodeLayoutStage#calculateFixPoint} to determine - * which point in the corresponding rectangle should be considered fixed. - * @throws {Stubs.Exceptions.ArgumentError} if the specified policy is unknown - * @type {yfiles.layout.FixPointPolicy} - */ - fixPointPolicy:yfiles.layout.FixPointPolicy; - /** - * Gets or sets whether or not subgraph edges are taken into account when calculating the bounding box of the fixed nodes. - * @see yfiles.layout.FixNodeLayoutStage#calculateBounds - * @type {boolean} - */ - includingEdges:boolean; - /** - * Gets or sets whether or not label geometries are taken into account when calculating the bounding box of the fixed - * nodes. - * @see yfiles.layout.FixNodeLayoutStage#calculateBounds - * @type {boolean} - */ - includingLabels:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.FixNodeLayoutStage; - } - /** - * {@link yfiles.layout.FixPortLocationStage} ensures that layout algorithms that cannot handle port constraints keep the ports of - * edges with strong {@link yfiles.layout.PortConstraint}s. - *

- * Without this stage, the port locations get lost. - *

- *

- * For each edge with strong {@link yfiles.layout.PortConstraint}s, this stage simply stores the original port and restores it - * after applying the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. Therefore, it either replaces the source/target port by the original port or - * adds the original port to the edge path calculated by the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} (see method {@link yfiles.layout.FixPortLocationStage#keepCalculatedPorts}). - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface FixPortLocationStage extends yfiles.layout.LayoutStageBase{} - export class FixPortLocationStage { - /** - * Creates a new {@link yfiles.layout.FixPortLocationStage} with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [coreLayouter=null] The core layout algorithm. - */ - constructor(coreLayouter?:yfiles.layout.ILayoutAlgorithm); - /** - * Gets or sets whether or not the final edge routes should contain the ports calculated by the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *

- * If this option is disabled, this stage simply replaces the current source/target ports (calculated by the core layout - * algorithm) by the original ports (for strong ports only). Otherwise, the calculated ports are still contained in the - * edge paths. - *

- * @type {boolean} - */ - keepCalculatedPorts:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.FixPortLocationStage; - } - /** - * This model parameter encodes a label position within {@link yfiles.layout.FreeEdgeLabelLayoutModel}. - *

- * It represents every possible location in relation to the source point of the edge. The radius describes the distance of - * the label center from the source point. There is an angle theta which defines the location on the circle with the given - * radius. It is the angle between the first segment of the underlying edge and the imaginary line to the center of the - * label. Finally, there is a second angle that describes the rotation of the label box. - *

- * @see yfiles.layout.FreeEdgeLabelLayoutModelParameter#setPoint - * @see yfiles.layout.FreeEdgeLabelLayoutModelParameter#angle - * @class - */ - export interface FreeEdgeLabelLayoutModelParameter extends yfiles.lang.Object{} - export class FreeEdgeLabelLayoutModelParameter { - /** - * Creates a new instance of {@link yfiles.layout.FreeEdgeLabelLayoutModelParameter} with the given radius, angle and rotation - * angle. - * @param radius the distance of the label from the source node of the underlying edge - * @param theta the angle in radians between the first segment of the underlying edge and the imaginary line to the center of the label - * @param [angle=0] the rotation angle of the label - */ - constructor(radius:number,theta:number,angle?:number); - /** - * Creates a new instance of {@link yfiles.layout.FreeEdgeLabelLayoutModelParameter} with radius 50 and angle 0. - */ - constructor(); - /** - * Specifies a point that represents the location of the label's center in relation to the source point of the edge. - *

- * The x-coordinate corresponds to the radius which describes the distance of the label to the source point. The - * y-coordinate corresponds to the angle between the first segment of the underlying edge and the imaginary line to the - * center of the label. - *

- * @param radius the distance to the source point - * @param theta the location on the radius - */ - setPoint(radius:number,theta:number):void; - /** - * Gets or sets the rotation angle of the label that is placed using this model parameter. - * @type {number} - */ - angle:number; - /** - * Gets a point that represents the location of the label's center in relation to the source point of the edge. - *

- * The x-coordinate corresponds to the radius which describes the distance of the label to the source point. The - * y-coordinate corresponds to the angle between the first segment of the underlying edge and the imaginary line to the - * center of the label. - *

- * @type {yfiles.algorithms.YPoint} - */ - point:yfiles.algorithms.YPoint; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.FreeEdgeLabelLayoutModelParameter; - } - /** - * {@link yfiles.layout.FreeEdgeLabelLayoutModel} allows placing edge labels at any location. - * @class - * @implements {yfiles.layout.IEdgeLabelLayoutModel} - */ - export interface FreeEdgeLabelLayoutModel extends yfiles.lang.Object,yfiles.layout.IEdgeLabelLayoutModel{} - export class FreeEdgeLabelLayoutModel { - /** - * Creates a new instance of {@link yfiles.layout.FreeEdgeLabelLayoutModel}. - */ - constructor(); - /** - * Creates a model parameter that represents the given edge label position within this model. - *

- * The created model parameter represents the current location of the given label. - *

- *

- * This parameter can be passed to {@link yfiles.layout.FreeEdgeLabelLayoutModel#getLabelPlacement} to retrieve the current label - * box. - *

- * @param labelBounds the oriented box of the label the parameter represents - * @param edgeLayout the layout of the edge to which the label belongs - * @param sourceLayout the layout of the source node of the label-owning edge - * @param targetLayout the layout of the target node of the label-owning edge - * @returns the model parameter representing the given label location - * @throws {Stubs.Exceptions.ArgumentError} if one or more of the given bounds' values are invalid, i.e., NaN - * @see yfiles.layout.FreeEdgeLabelLayoutModel#getLabelPlacement - */ - createModelParameter(labelBounds:yfiles.algorithms.YOrientedRectangle,edgeLayout:yfiles.layout.IEdgeLayout,sourceLayout:yfiles.layout.INodeLayout,targetLayout:yfiles.layout.INodeLayout):any; - /** - * Returns the {@link yfiles.layout.EdgeLabelCandidate} that describes the current label position. - * @param labelLayout the label for which candidates should be generated - * @param edgeLayout the layout of the edge to which the label belongs - * @param sourceLayout the layout of the source node of the label-owning edge - * @param targetLayout the layout of the target node of the label-owning edge - * @returns a list of {@link } instances - */ - getLabelCandidates(labelLayout:yfiles.layout.IEdgeLabelLayout,edgeLayout:yfiles.layout.IEdgeLayout,sourceLayout:yfiles.layout.INodeLayout,targetLayout:yfiles.layout.INodeLayout):yfiles.algorithms.YList; - /** - * - * @param labelSize - * @param edgeLayout - * @param sourceNode - * @param targetNode - * @param param - * @returns - */ - getLabelPlacement(labelSize:yfiles.algorithms.YDimension,edgeLayout:yfiles.layout.IEdgeLayout,sourceNode:yfiles.layout.INodeLayout,targetNode:yfiles.layout.INodeLayout,param:any):yfiles.algorithms.YOrientedRectangle; - /** - * Gets the model parameter that encodes the default position of {@link yfiles.layout.FreeEdgeLabelLayoutModel}. - *

- * The distance of the label to the edge's source point will be 20. The angle between the line to the center of the label - * and the first segment is 20 radians. The label is not rotated. - *

- *

- * This parameter can be passed to {@link yfiles.layout.FreeEdgeLabelLayoutModel#getLabelPlacement} to retrieve the corresponding - * label box. - *

- * @type {any} - */ - defaultParameter:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.FreeEdgeLabelLayoutModel; - } - /** - * The model parameter that encodes a label position within {@link yfiles.layout.FreeNodeLabelLayoutModel}. - *

- * It represents every possible location in relation to the node. The point describes the offset of the label's center to - * the upper-left corner of the node. - *

- * @see yfiles.layout.FreeNodeLabelLayoutModelParameter#setPoint - * @class - */ - export interface FreeNodeLabelLayoutModelParameter extends yfiles.lang.Object{} - export class FreeNodeLabelLayoutModelParameter { - /** - * Creates a new instance of {@link yfiles.layout.FreeNodeLabelLayoutModelParameter} with the given offset. - * @param dx the horizontal offset - * @param dy the vertical offset - */ - constructor(dx:number,dy:number); - /** - * Creates a new instance of {@link yfiles.layout.FreeNodeLabelLayoutModelParameter}. - *

- * It has no offset, i.e., the upper-left corners of both node label and node are at the same location. - *

- */ - constructor(); - /** - * Specifies the offset of the label's center to the upper-left corner of the node. - * @param dx the horizontal offset - * @param dy the vertical offset - */ - setPoint(dx:number,dy:number):void; - /** - * Gets the offset of the label's center to the upper-left corner of the node. - * @type {yfiles.algorithms.YPoint} - */ - point:yfiles.algorithms.YPoint; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.FreeNodeLabelLayoutModelParameter; - } - /** - * {@link yfiles.layout.FreeNodeLabelLayoutModel} allows placing node labels at any desired position. - *

- * The location of the label does not need to satisfy any constraints. The {@link yfiles.layout.FreeNodeLabelLayoutModel#createModelParameter model parameter} describes a fixed offset between - * the upper-left corner of the node and the center of the label. - *

- * @class - * @implements {yfiles.layout.INodeLabelLayoutModel} - */ - export interface FreeNodeLabelLayoutModel extends yfiles.lang.Object,yfiles.layout.INodeLabelLayoutModel{} - export class FreeNodeLabelLayoutModel { - /** - * Returns a new instance of {@link yfiles.layout.FreeNodeLabelLayoutModel}. - */ - constructor(); - /** - * Creates a model parameter that represents the given node label position within this model. - *

- * The created model parameter represents the current location of the given label. - *

- *

- * This parameter can be passed to {@link yfiles.layout.FreeNodeLabelLayoutModel#getLabelPlacement} to retrieve the current label - * box. - *

- * @param labelBounds the bounds of the label the parameter represents - * @param nodeLayout the layout of the node to which the label belongs - * @returns the model parameter - * @throws {Stubs.Exceptions.ArgumentError} if one or more of the given bounds' values are invalid, i.e., NaN - * @see yfiles.layout.FreeNodeLabelLayoutModel#getLabelPlacement - */ - createModelParameter(labelBounds:yfiles.algorithms.YOrientedRectangle,nodeLayout:yfiles.layout.INodeLayout):any; - /** - * Returns the {@link yfiles.layout.NodeLabelCandidate} that describes the current label position. - * @param labelLayout the label for which candidates should be generated - * @param nodeLayout the layout of the node to which the label belongs - * @returns a list of {@link } instances - */ - getLabelCandidates(labelLayout:yfiles.layout.INodeLabelLayout,nodeLayout:yfiles.layout.INodeLayout):yfiles.algorithms.YList; - /** - * - * @param labelSize - * @param nodeLayout - * @param param - * @returns - */ - getLabelPlacement(labelSize:yfiles.algorithms.YDimension,nodeLayout:yfiles.layout.INodeLayout,param:any):yfiles.algorithms.YOrientedRectangle; - /** - * Gets a model parameter that encodes the default position of {@link yfiles.layout.INodeLabelLayoutModel}. - *

- * The node label's upper-left corner is placed 20 pixels to the left and 20 pixels above the node. - *

- *

- * This parameter can be passed to {@link yfiles.layout.FreeNodeLabelLayoutModel#getLabelPlacement} to retrieve the corresponding - * label box. - *

- * @type {any} - */ - defaultParameter:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.FreeNodeLabelLayoutModel; - } - export enum ComponentArrangementStyles{ - /** - * Style specifier describing no special component arrangement at all. Components will be centered at the same position - * they resided at before the layout started. If combined with the style modifier - * {@link yfiles.layout.ComponentArrangementStyles#MODIFIER_NO_OVERLAP}, components might get moved so that they don't overlap - * after the layout. - * @see yfiles.layout.ComponentLayout#style - */ - NONE, - /** - * Style specifier describing a component arrangement strategy that places components in multiple rows so that the overall - * aspect ratio of the whole graph gets as close to the aspect ratio of the preferred layout size as possible. - * @see yfiles.layout.ComponentLayout#style - * @see yfiles.layout.ComponentLayout#preferredSize - */ - ROWS, - /** - * Style specifier describing a component arrangement strategy that places all components next to each other in a single - * row. If combined with the style modifier - * {@link yfiles.layout.ComponentArrangementStyles#MODIFIER_AS_IS}, components will be placed in the same order as they were placed - * before the layout. - * @see yfiles.layout.ComponentLayout#style - */ - SINGLE_ROW, - /** - * Style specifier describing a component arrangement strategy that places components above each other in a single column. - * If combined with the style modifier - * {@link yfiles.layout.ComponentArrangementStyles#MODIFIER_AS_IS}, components will be placed in the same order as they were placed - * before the layout. - * @see yfiles.layout.ComponentLayout#style - */ - SINGLE_COLUMN, - /** - * Style specifier describing a component arrangement strategy that places components in a rectangular cloud around the - * biggest component. Entities of different components will not overlap, however the bounding boxes of the components may - * overlap. - *

- * The aspect ratio of the rectangle is defined by the {@link yfiles.layout.ComponentLayout#preferredSize preferred size} of the graph. - *

- * @see yfiles.layout.ComponentLayout#style - * @see yfiles.layout.ComponentLayout#preferredSize - */ - PACKED_RECTANGLE, - /** - * Style specifier describing a component arrangement strategy that places components in a rectangular cloud around the - * biggest component. Entities of different components will not overlap, however the bounding boxes of the components may - * overlap. - *

- * In contrast to - * {@link yfiles.layout.ComponentArrangementStyles#PACKED_RECTANGLE}, components might even be placed in empty spaces inside other - * components. - *

- *

- * The aspect ratio of the rectangle is defined by the {@link yfiles.layout.ComponentLayout#preferredSize preferred size} of the graph. - *

- * @see yfiles.layout.ComponentLayout#style - * @see yfiles.layout.ComponentLayout#preferredSize - */ - PACKED_COMPACT_RECTANGLE, - /** - * Style specifier describing a component arrangement strategy that places components in a circular cloud around the - * biggest component. Entities of different components will not overlap, however the bounding boxes of the components may - * overlap. - * @see yfiles.layout.ComponentLayout#style - */ - PACKED_CIRCLE, - /** - * Style specifier describing a component arrangement strategy that places components in a circular compact cloud around - * the biggest component. Entities of different components will not overlap, however the bounding boxes of the components - * may overlap. - *

- * In contrast to - * {@link yfiles.layout.ComponentArrangementStyles#PACKED_CIRCLE}, components might even be placed in empty spaces inside other - * components. - *

- * @see yfiles.layout.ComponentLayout#style - */ - PACKED_COMPACT_CIRCLE, - /** - * Style specifier describing a component arrangement strategy that places components in multiple rows. - *

- * The strategy tries to arrange the components such that the aspect ratio of the final component placement gets as close - * as possible to the aspect ratio of the preferred layout size, configurable using {@link yfiles.layout.ComponentLayout#preferredSize}. - *

- *

- * In contrast to - * {@link yfiles.layout.ComponentArrangementStyles#ROWS}, each row may also be divided into further sub-rows, which is especially - * useful if there are few very large components and many significantly smaller ones. - *

- * @see yfiles.layout.ComponentLayout#style - * @see yfiles.layout.ComponentLayout#preferredSize - */ - MULTI_ROWS, - /** - * Style specifier describing a component arrangement strategy that places components in multiple rows. - *

- * The strategy tries to arrange the components such that the aspect ratio of the final component placement gets close to - * the aspect ratio of the preferred layout size, configurable using {@link yfiles.layout.ComponentLayout#preferredSize}. But in contrast to - * {@link yfiles.layout.ComponentArrangementStyles#MULTI_ROWS}, this strategy does not always try to come as close to the preferred - * view ratio, if a ratio close to the preferred ratio only induces a lot of unused view space. This unused space will be - * minimized. - *

- *

- * In contrast to - * {@link yfiles.layout.ComponentArrangementStyles#ROWS}, each row may also be divided into further sub-rows, which is especially - * useful if there are few very large components and many significantly smaller ones. - *

- * @see yfiles.layout.ComponentLayout#style - * @see yfiles.layout.ComponentLayout#preferredSize - */ - MULTI_ROWS_COMPACT, - /** - * Style specifier describing a component arrangement strategy that places the components in {@link yfiles.layout.ComponentArrangementStyles#MULTI_ROWS} - * with a restricted height. The resulting height does not exceed the preferred height ({@link yfiles.layout.ComponentLayout#preferredSize}). - *

- * In contrast to - * {@link yfiles.layout.ComponentArrangementStyles#MULTI_ROWS_HEIGHT_CONSTRAINT_COMPACT}, the result will be an arrangement which - * uses as much height as possible, even if that means that all components will be arranged in one single column. - *

- * @see yfiles.layout.ComponentLayout#style - * @see yfiles.layout.ComponentLayout#preferredSize - */ - MULTI_ROWS_HEIGHT_CONSTRAINT, - /** - * Style specifier describing a component arrangement strategy that places the components in {@link yfiles.layout.ComponentArrangementStyles#MULTI_ROWS} - * with a restricted height and as compact as possible. The resulting height does not exceed the preferred height ({@link yfiles.layout.ComponentLayout#preferredSize}). - *

- * In comparison with - * {@link yfiles.layout.ComponentArrangementStyles#MULTI_ROWS_HEIGHT_CONSTRAINT}, the result will be compacted, which means that an - * arrangement with the minimum width such that the height constraint is still fulfilled will be realized. - *

- * @see yfiles.layout.ComponentLayout#style - * @see yfiles.layout.ComponentLayout#preferredSize - */ - MULTI_ROWS_HEIGHT_CONSTRAINT_COMPACT, - /** - * Style specifier describing a component arrangement strategy that places the components in {@link yfiles.layout.ComponentArrangementStyles#MULTI_ROWS} - * with a restricted width. The resulting width does not exceed the preferred width ({@link yfiles.layout.ComponentLayout#preferredSize}). - *

- * In contrast to {@link yfiles.layout.ComponentArrangementStyles#MULTI_ROWS_WIDTH_CONSTRAINT_COMPACT} the result will be an - * arrangement which uses as much space in width as possible, even if that means that all components will be arranged in a - * single row. - *

- * @see yfiles.layout.ComponentLayout#style - * @see yfiles.layout.ComponentLayout#preferredSize - */ - MULTI_ROWS_WIDTH_CONSTRAINT, - /** - * Style specifier describing a component arrangement strategy that places the components in {@link yfiles.layout.ComponentArrangementStyles#MULTI_ROWS} - * with a restricted width and as compact as possible. The resulting width does not exceed the preferred width ({@link yfiles.layout.ComponentLayout#preferredSize}). - *

- * In comparison with {@link yfiles.layout.ComponentArrangementStyles#MULTI_ROWS_HEIGHT_CONSTRAINT} the result will be compacted, - * in order to minimize unused view space induced by components that are large in height. - *

- * @see yfiles.layout.ComponentLayout#style - * @see yfiles.layout.ComponentLayout#preferredSize - */ - MULTI_ROWS_WIDTH_CONSTRAINT_COMPACT, - /** - * A constant for masking actual style constants from style modifiers. - * @see yfiles.layout.ComponentLayout#style - */ - MASK, - /** - * A modifier that can be added to normal style specifiers to indicate that the arrangement strategy should take the - * initial positions of the components into account. - *

- * Combining this modifier is supported with the following styles: {@link yfiles.layout.ComponentArrangementStyles#SINGLE_ROW}, - * {@link yfiles.layout.ComponentArrangementStyles#SINGLE_COLUMN}, {@link yfiles.layout.ComponentArrangementStyles#PACKED_RECTANGLE}, - * {@link yfiles.layout.ComponentArrangementStyles#PACKED_COMPACT_RECTANGLE}, {@link yfiles.layout.ComponentArrangementStyles#PACKED_CIRCLE} - * and {@link yfiles.layout.ComponentArrangementStyles#PACKED_COMPACT_CIRCLE}. - *

- * @see yfiles.layout.ComponentLayout#style - */ - MODIFIER_AS_IS, - /** - * A modifier that can be added to normal style specifiers to indicate that the arrangement strategy should produce a - * non-overlapping component layout. - *

- * Combining this modifier is not supported with {@link yfiles.layout.ComponentArrangementStyles#NONE}. - *

- * @see yfiles.layout.ComponentLayout#style - */ - MODIFIER_NO_OVERLAP - } - export enum DiscreteEdgeLabelPositions{ - /** - * Position specifier that describes a label placement near the source, left/above the edge's path. - */ - SOURCE_HEAD, - /** - * Position specifier that describes a label placement near the middle of the edge, left/above the edge's path. - */ - HEAD, - /** - * Position specifier that describes a label placement near the target, left/above the edge's path. - */ - TARGET_HEAD, - /** - * Position specifier that describes a label placement near the source, right/below the edge's path. - */ - SOURCE_TAIL, - /** - * Position specifier that describes a label placement near the middle of the edge, right/below the edge's path. - */ - TAIL, - /** - * Position specifier that describes a label placement near the target, right/below the edge's path. - */ - TARGET_TAIL, - /** - * Position specifier that describes a label placement near the source, directly on the edge's path. - */ - SOURCE_CENTER, - /** - * Position specifier that describes a label placement near the middle of the edge, directly on the edge's path. - */ - CENTER, - /** - * Position specifier that describes a label placement near the target, directly on the edge's path. - */ - TARGET_CENTER, - /** - * Position mask that constrains the allowed positions to the two locations near the middle of the edge beside the edge's - * path. - * @see yfiles.layout.DiscreteEdgeLabelPositions#HEAD - * @see yfiles.layout.DiscreteEdgeLabelPositions#TAIL - */ - TWO_POS, - /** - * Position mask that constrains the allowed positions to the {@link yfiles.layout.DiscreteEdgeLabelPositions#CENTER} of the edge's - * path. - * @see yfiles.layout.DiscreteEdgeLabelPositions#CENTER - */ - CENTERED, - /** - * Position mask that constrains the allowed positions to a set of six positions beside the edge path. - *

- * Two of the positions are near the source and two others are near the target. The remaining positions are in the middle - * of the edge. - *

- * @see yfiles.layout.DiscreteEdgeLabelPositions#SOURCE_HEAD - * @see yfiles.layout.DiscreteEdgeLabelPositions#SOURCE_TAIL - * @see yfiles.layout.DiscreteEdgeLabelPositions#HEAD - * @see yfiles.layout.DiscreteEdgeLabelPositions#TAIL - * @see yfiles.layout.DiscreteEdgeLabelPositions#TARGET_HEAD - * @see yfiles.layout.DiscreteEdgeLabelPositions#TARGET_TAIL - */ - SIX_POS, - /** - * Position mask that constrains the allowed positions to a set of three positions directly on the edge's path. - * @see yfiles.layout.DiscreteEdgeLabelPositions#SOURCE_CENTER - * @see yfiles.layout.DiscreteEdgeLabelPositions#CENTER - * @see yfiles.layout.DiscreteEdgeLabelPositions#TARGET_CENTER - */ - THREE_CENTER - } - export enum DiscreteNodeLabelPositions{ - /** - * Position specifier that describes a label placement north of the node. - */ - NORTH, - /** - * Position specifier that describes a label placement north-west of the node. - */ - NORTH_WEST, - /** - * Position specifier that describes a label placement north-east of the node. - */ - NORTH_EAST, - /** - * Position specifier that describes a label placement east of the node. - */ - EAST, - /** - * Position specifier that describes a label placement west of the node. - */ - WEST, - /** - * Position specifier that describes a label placement south of the node. - */ - SOUTH, - /** - * Position specifier that describes a label placement south-west of the node. - */ - SOUTH_WEST, - /** - * Position specifier that describes a label placement south-east of the node. - */ - SOUTH_EAST, - /** - * Position specifier that describes a label placement at the center of the node. - */ - CENTER, - /** - * Position specifier that describes a label placement at the bottom inside the node. - */ - BOTTOM, - /** - * Position specifier that describes a label placement at the top inside the node. - */ - TOP, - /** - * Position specifier that describes a label placement at the left inside the node. - */ - LEFT, - /** - * Position specifier that describes a label placement at the right inside the node. - */ - RIGHT, - /** - * Position specifier that describes a label placement at the top-left inside the node. - */ - TOP_LEFT, - /** - * Position specifier that describes a label placement at the top-right inside the node. - */ - TOP_RIGHT, - /** - * Position specifier that describes a label placement at the bottom-left inside the node. - */ - BOTTOM_LEFT, - /** - * Position specifier that describes a label placement at the bottom-right inside the node. - */ - BOTTOM_RIGHT, - /** - * Position mask that constrains the positions to {@link yfiles.layout.DiscreteNodeLabelPositions#NORTH above} and {@link yfiles.layout.DiscreteNodeLabelPositions#SOUTH below} the node. - * @see yfiles.layout.DiscreteNodeLabelPositions#NORTH - * @see yfiles.layout.DiscreteNodeLabelPositions#SOUTH - */ - SANDWICH_MASK, - /** - * Position mask that constrains the positions to the nine node-internal positions. - * @see yfiles.layout.DiscreteNodeLabelPositions#CENTER - * @see yfiles.layout.DiscreteNodeLabelPositions#TOP - * @see yfiles.layout.DiscreteNodeLabelPositions#BOTTOM - * @see yfiles.layout.DiscreteNodeLabelPositions#LEFT - * @see yfiles.layout.DiscreteNodeLabelPositions#RIGHT - * @see yfiles.layout.DiscreteNodeLabelPositions#TOP_LEFT - * @see yfiles.layout.DiscreteNodeLabelPositions#TOP_RIGHT - * @see yfiles.layout.DiscreteNodeLabelPositions#BOTTOM_LEFT - * @see yfiles.layout.DiscreteNodeLabelPositions#BOTTOM_RIGHT - */ - INTERNAL_MASK, - /** - * Position mask that constrains the positions to the node's four sides. - * @see yfiles.layout.DiscreteNodeLabelPositions#EAST - * @see yfiles.layout.DiscreteNodeLabelPositions#WEST - * @see yfiles.layout.DiscreteNodeLabelPositions#NORTH - * @see yfiles.layout.DiscreteNodeLabelPositions#SOUTH - */ - SIDES_MASK, - /** - * Position mask that constrains the positions to the corners outside the node. - * @see yfiles.layout.DiscreteNodeLabelPositions#NORTH_EAST - * @see yfiles.layout.DiscreteNodeLabelPositions#NORTH_WEST - * @see yfiles.layout.DiscreteNodeLabelPositions#SOUTH_EAST - * @see yfiles.layout.DiscreteNodeLabelPositions#SOUTH_WEST - */ - CORNER_MASK, - /** - * Position mask that constraints the positions to the eight node-external positions. - * @see yfiles.layout.DiscreteNodeLabelPositions#NORTH - * @see yfiles.layout.DiscreteNodeLabelPositions#EAST - * @see yfiles.layout.DiscreteNodeLabelPositions#SOUTH - * @see yfiles.layout.DiscreteNodeLabelPositions#WEST - * @see yfiles.layout.DiscreteNodeLabelPositions#NORTH_EAST - * @see yfiles.layout.DiscreteNodeLabelPositions#NORTH_WEST - * @see yfiles.layout.DiscreteNodeLabelPositions#SOUTH_EAST - * @see yfiles.layout.DiscreteNodeLabelPositions#SOUTH_WEST - */ - EIGHT_POS_MASK - } - export enum FixPointPolicy{ - /** - * Fix point calculation policy specifying that the center of a rectangle containing all fixed nodes is considered the fix - * point. - * @see yfiles.layout.FixNodeLayoutStage#fixPointPolicy - */ - CENTER, - /** - * Fix point calculation policy specifying that the upper left corner of a rectangle containing all fixed nodes is considered the fix - * point. - * @see yfiles.layout.FixNodeLayoutStage#fixPointPolicy - */ - UPPER_LEFT, - /** - * Fix point calculation policy specifying that the upper right corner of a rectangle containing all fixed nodes is considered the fix - * point. - * @see yfiles.layout.FixNodeLayoutStage#fixPointPolicy - */ - UPPER_RIGHT, - /** - * Fix point calculation policy specifying that the lower right corner of a rectangle containing all fixed nodes is considered the fix - * point. - * @see yfiles.layout.FixNodeLayoutStage#fixPointPolicy - */ - LOWER_RIGHT, - /** - * Fix point calculation policy specifying that the lower left corner of a rectangle containing all fixed nodes is considered the fix - * point. - * @see yfiles.layout.FixNodeLayoutStage#fixPointPolicy - */ - LOWER_LEFT - } - export enum LabelPlacements{ - /** - * Preferred placement specifier for edge labels which expresses that the label should be placed near the source node of an - * edge. - */ - AT_SOURCE, - /** - * Preferred placement specifier for edge labels which expresses that the label should be placed near the target node of an - * edge. - */ - AT_TARGET, - /** - * Preferred placement specifier for edge labels which expresses that the label should be placed near the center of the - * edge path. - */ - AT_CENTER, - /** - * Preferred placement specifier for edge labels which expresses that the label should be placed directly at the source - * port of the edge. - */ - AT_SOURCE_PORT, - /** - * Preferred placement specifier for edge labels which expresses that the label should be placed directly at the target - * port of the edge. - */ - AT_TARGET_PORT, - /** - * Placement specifier mask that masks all placement specifiers that describe the placement along the edge. - */ - ALONG_EDGE_MASK, - /** - * Preferred placement specifier for edge labels which expresses that the label should be placed on the path of the edge. - */ - ON_EDGE, - /** - * Preferred placement specifier for edge labels which expresses that the label should be placed on the left hand side of - * the edge path. - *

- * The side is interpreted relative to the direction of the edge, if no different {@link yfiles.layout.PreferredPlacementDescriptor#sideReference side reference} is defined. - *

- */ - LEFT_OF_EDGE, - /** - * Preferred placement specifier for edge labels which expresses that the label should be placed on the right hand side of - * the edge path. - *

- * The side is interpreted relative to the direction of the edge, if no different {@link yfiles.layout.PreferredPlacementDescriptor#sideReference side reference} is defined. - *

- */ - RIGHT_OF_EDGE, - /** - * Placement specifier mask that masks all placement specifiers that describe the side of the edge. - */ - ON_SIDE_OF_EDGE_MASK, - /** - * Preferred placement specifier for edge labels which expresses that the label can be placed anywhere along the edge or on - * any side of the edge. - */ - ANYWHERE - } - export enum LayoutOrientation{ - /** - * Orientation specifier which defines that the main layout orientation is from top to bottom. This is the default for all - * layout algorithms. - */ - TOP_TO_BOTTOM, - /** - * Orientation specifier which defines that the main layout orientation is from left to right. The layout will be rotated - * by 90 degrees counterclockwise. - */ - LEFT_TO_RIGHT, - /** - * Orientation specifier which defines that the main layout orientation is from right to left. The layout will be rotated - * by 90 degrees clockwise. - */ - RIGHT_TO_LEFT, - /** - * Orientation specifier which defines that the main layout orientation is from bottom to top. The layout will be flipped - * along the x-axis. - */ - BOTTOM_TO_TOP - } - export enum RowAlignment{ - /** - * Row alignment specifier which defines that each row will be aligned with its left border. - * @see yfiles.layout.LayoutGraphUtilities#arrangeRectangleRows - */ - LEADING, - /** - * Row alignment specifier which defines that each row will be aligned with its right border. - * @see yfiles.layout.LayoutGraphUtilities#arrangeRectangleRows - */ - TRAILING, - /** - * Row alignment specifier which defines that each row will be aligned with its left border and its right border. - *

- * Rectangles in smaller rows will be distributed over the row, so that the row aligns with both sides. - *

- * @see yfiles.layout.LayoutGraphUtilities#arrangeRectangleRows - */ - JUSTIFIED, - /** - * Row alignment specifier which defines that each row will be aligned with its center. - * @see yfiles.layout.LayoutGraphUtilities#arrangeRectangleRows - */ - CENTER - } - export enum MultiRowConstraint{ - /** - * Constraint specifier for a multi-row rectangle arrangement that is unconstrained. Both, height and width, are not - * limited in size. The rectangles will be arranged in a way that the view ratio defined by the preferred height and width - * will be achieved. - * @see yfiles.layout.LayoutGraphUtilities#arrangeRectangleMultiRows - */ - NONE, - /** - * Constraint specifier for a multi-row rectangle arrangement that constrains the height of the layout. Limits the height - * of the arrangement to the given preferred height value. If some rectangles are higher than allowed, then they are placed - * nevertheless, but the constraint will still be considered for the rest and not weakened to the height of the higher - * rectangles. Having one rectangle being higher than the constraint does always result in arrangements consisting only of - * a single top-level row. - * @see yfiles.layout.LayoutGraphUtilities#arrangeRectangleMultiRows - */ - HEIGHT, - /** - * Constraint specifier for a multi-row rectangle arrangement that constrains the width of the layout. Limits the width of - * the arrangement to the given preferred width value. If a rectangle is wider than allowed, then it will nevertheless be - * placed (in a row containing the rectangle alone), but the constraint will be still considered for other rows and not - * weakened. - * @see yfiles.layout.LayoutGraphUtilities#arrangeRectangleMultiRows - */ - WIDTH - } - export enum EdgeFlow{ - /** - * Edge flow specifier which defines that the flow direction of most edges is up. - * @see yfiles.layout.LayoutGraphUtilities#determineEdgeFlowDirection - */ - UP, - /** - * Edge flow specifier which defines that the flow direction of most edges is down. - * @see yfiles.layout.LayoutGraphUtilities#determineEdgeFlowDirection - */ - DOWN, - /** - * Edge flow specifier which defines that the flow direction of most edges is left. - * @see yfiles.layout.LayoutGraphUtilities#determineEdgeFlowDirection - */ - LEFT, - /** - * Edge flow specifier which defines that the flow direction of most edges is right. - * @see yfiles.layout.LayoutGraphUtilities#determineEdgeFlowDirection - */ - RIGHT, - /** - * Edge flow specifier that defines that there is no main flow direction. - * @see yfiles.layout.LayoutGraphUtilities#determineEdgeFlowDirection - */ - NONE - } - export enum NodeAlignment{ - /** - * Node alignment policy that results in top-aligned nodes for vertical alignment and left-aligned nodes for horizontal - * alignments. - * @see yfiles.layout.LayoutGraphUtilities#alignNodeLayouts - */ - LEADING, - /** - * Node alignment policy that results in center-aligned nodes. - * @see yfiles.layout.LayoutGraphUtilities#alignNodeLayouts - */ - CENTERED, - /** - * Node alignment policy that results in bottom-aligned nodes for vertical alignment and right-aligned nodes for horizontal - * alignments. - * @see yfiles.layout.LayoutGraphUtilities#alignNodeLayouts - */ - TRAILING, - /** - * Node alignment policy that results in vertically or horizontally distributed nodes. In this context, distributed means that the - * vertical (or horizontal) extensions of nodes do not overlap, independent of their horizontal (or vertical) position. - * @see yfiles.layout.LayoutGraphUtilities#alignNodeLayouts - */ - DISTRIBUTED - } - export enum MirrorModes{ - /** - * Mirroring specifier that can be used for preventing any mirroring of layout orientations. - * @see yfiles.layout.OrientationLayout#mirrorMode - * @see yfiles.layout.OrientationLayout#orientation - */ - NONE, - /** - * Mirroring specifier that defines that layout orientation {@link yfiles.layout.LayoutOrientation#TOP_TO_BOTTOM} will be - * mirrored. - *

- * This specifier can be used for creating a mirror mask that defines which layout orientations shall be mirrored at their - * corresponding axis. It can be combined with the other mirroring specifiers to mirror several orientations. - *

- * @see yfiles.layout.OrientationLayout#mirrorMode - * @see yfiles.layout.OrientationLayout#orientation - */ - TOP_TO_BOTTOM, - /** - * Mirroring specifier that defines that layout orientation {@link yfiles.layout.LayoutOrientation#RIGHT_TO_LEFT} will be - * mirrored. - *

- * This specifier can be used for creating a mirror mask that defines which layout orientations shall be mirrored at their - * corresponding axis. It can be combined with the other mirroring specifiers to mirror several orientations. - *

- * @see yfiles.layout.OrientationLayout#mirrorMode - * @see yfiles.layout.OrientationLayout#orientation - */ - RIGHT_TO_LEFT, - /** - * Mirroring specifier that defines that layout orientation {@link yfiles.layout.LayoutOrientation#BOTTOM_TO_TOP} will be - * mirrored. - *

- * This specifier can be used for creating a mirror mask that defines which layout orientations shall be mirrored at their - * corresponding axis. It can be combined with the other mirroring specifiers to mirror several orientations. - *

- * @see yfiles.layout.OrientationLayout#mirrorMode - * @see yfiles.layout.OrientationLayout#orientation - */ - BOTTOM_TO_TOP, - /** - * Mirroring specifier that defines that layout orientation {@link yfiles.layout.LayoutOrientation#LEFT_TO_RIGHT} will be - * mirrored. - *

- * This specifier can be used to create a mirror mask that defines which layout orientations shall be mirrored at their - * corresponding axis. It can be combined with the other mirroring specifiers to mirror several orientations. - *

- * @see yfiles.layout.OrientationLayout#mirrorMode - * @see yfiles.layout.OrientationLayout#orientation - */ - LEFT_TO_RIGHT - } - export enum PortDirections{ - /** - * A port direction specifier indicating a port on the north (i.e., top) side of a node. - */ - NORTH, - /** - * A port direction specifier indicating a port on the east (i.e., right) side of a node. - */ - EAST, - /** - * A port direction specifier indicating a port on the west (i.e., left) side of a node. - */ - WEST, - /** - * A port direction specifier indicating a port on the south (i.e., bottom) side of a node. - */ - SOUTH, - /** - * A port direction specifier indicating a port lying in the direction of the main flow of the edge or of the overall - * layout. - *

- * The exact direction is domain-specific. - *

- */ - WITH_THE_FLOW, - /** - * A port direction specifier indicating a port lying in the opposite direction of the main flow of the edge or of the - * overall layout. - *

- * The exact direction is domain-specific. - *

- */ - AGAINST_THE_FLOW, - /** - * A port direction specifier indicating a port lying left of the direction of the main flow of the edge or of the overall - * layout. - *

- * The exact direction is domain-specific. - *

- */ - LEFT_IN_FLOW, - /** - * A port direction specifier indicating a port lying right of the direction of the main flow of the edge or of the overall - * layout. - *

- * The exact direction is domain-specific. - *

- */ - RIGHT_IN_FLOW, - /** - * A combination of all possible direction specifiers indicating that edges can connect to any side of a node. - */ - ANY - } - export enum PortSide{ - /** - * A weak constraint indicating that edges can connect to any side of a node. - * @see yfiles.layout.PortConstraint#create - */ - ANY, - /** - * A weak constraint indicating that edges can connect to the north side (i.e. top side) of a node. - * @see yfiles.layout.PortConstraint#create - */ - NORTH, - /** - * A weak constraint indicating that edges can connect to the south side (i.e. bottom side) of a node. - * @see yfiles.layout.PortConstraint#create - */ - SOUTH, - /** - * A weak constraint indicating that edges can connect to the east side (i.e. right side) of a node. - * @see yfiles.layout.PortConstraint#create - */ - EAST, - /** - * A weak constraint indicating that edges can connect to the west side (i.e. left side) of a node. - * @see yfiles.layout.PortConstraint#create - */ - WEST - } - export enum LabelSideReferences{ - /** - * Side placement specifier for edge labels which expresses that the preferred side of the edge is interpreted relative to - * the edge flow. - * @see yfiles.layout.PreferredPlacementDescriptor#sideReference - * @see yfiles.layout.PreferredPlacementDescriptor#sideOfEdge - */ - RELATIVE_TO_EDGE_FLOW, - /** - * Side placement specifier for edge labels which defines that the preferred side for the label is interpreted - * independently of the edge direction placing {@link yfiles.layout.LabelPlacements#LEFT_OF_EDGE left labels} above horizontal segments. - *

- * For vertical segments the label is placed {@link yfiles.layout.LabelPlacements#LEFT_OF_EDGE left} or {@link yfiles.layout.LabelPlacements#RIGHT_OF_EDGE right} of the edge. In case the segment is horizontal, the label is - * placed above the segment if it should be left of the edge, otherwise below the segment. - *

- * @see yfiles.layout.PreferredPlacementDescriptor#sideReference - * @see yfiles.layout.PreferredPlacementDescriptor#sideOfEdge - */ - ABSOLUTE_WITH_LEFT_IN_NORTH, - /** - * Side placement specifier for edge labels which defines that the preferred side for the label is interpreted - * independently of the edge direction placing {@link yfiles.layout.LabelPlacements#RIGHT_OF_EDGE left labels} above horizontal segments. - *

- * For vertical segments the label is placed {@link yfiles.layout.LabelPlacements#LEFT_OF_EDGE left} or {@link yfiles.layout.LabelPlacements#RIGHT_OF_EDGE right} of the edge. In case the segment is horizontal, the label is - * placed above the segment if it should be right of the edge, otherwise below the segment. - *

- * @see yfiles.layout.PreferredPlacementDescriptor#sideReference - * @see yfiles.layout.PreferredPlacementDescriptor#sideOfEdge - */ - ABSOLUTE_WITH_RIGHT_IN_NORTH - } - export enum LabelAngleReferences{ - /** - * Angle interpretation specifier for edge labels which expresses that the rotation angle should be interpreted absolute - * and not relative to the edge slope. - * @see yfiles.layout.PreferredPlacementDescriptor#angleReference - * @see yfiles.layout.PreferredPlacementDescriptor#angle - */ - ABSOLUTE, - /** - * Angle interpretation specifier for edge labels which expresses that the rotation angle should be interpreted relative to - * the edge slope. - * @see yfiles.layout.PreferredPlacementDescriptor#angleReference - * @see yfiles.layout.PreferredPlacementDescriptor#angle - */ - RELATIVE_TO_EDGE_FLOW - } - export enum LabelAngleOnRightSideRotations{ - /** - * Angle interpretation specifier which expresses that the rotation angle should be interpreted clockwise. - *

- * Therefore, edge labels whose descriptor {@link yfiles.layout.PreferredPlacementDescriptor#isRightOfEdge} will be co-rotating with the angle of labels that are placed left of or - * centered on the edge. - *

- * @see yfiles.layout.PreferredPlacementDescriptor#angleRotationOnRightSide - * @see yfiles.layout.PreferredPlacementDescriptor#angle - * @see yfiles.layout.PreferredPlacementDescriptor#sideOfEdge - */ - CLOCKWISE, - /** - * Angle interpretation specifier which expresses that the rotation angle should be interpreted counter-clockwise. - *

- * Therefore, edge labels whose descriptor {@link yfiles.layout.PreferredPlacementDescriptor#isRightOfEdge} will be counter-rotating with the angle of labels that are placed left of or - * centered on the edge. - *

- * @see yfiles.layout.PreferredPlacementDescriptor#angleRotationOnRightSide - * @see yfiles.layout.PreferredPlacementDescriptor#angle - * @see yfiles.layout.PreferredPlacementDescriptor#sideOfEdge - */ - COUNTER_CLOCKWISE - } - export enum LabelAngleOnRightSideOffsets{ - /** - * Angle offset specifier for edge labels which expresses that no additional offset should be added to the angle. - * @see yfiles.layout.PreferredPlacementDescriptor#angleOffsetOnRightSide - * @see yfiles.layout.PreferredPlacementDescriptor#angle - * @see yfiles.layout.PreferredPlacementDescriptor#sideOfEdge - */ - NONE, - /** - * Angle offset specifier for edge labels which expresses that an additional offset of 180 degrees should be added to the - * angle. That way, point-symmetric label placements left and right of the edge can be attained. - * @see yfiles.layout.PreferredPlacementDescriptor#angleOffsetOnRightSide - * @see yfiles.layout.PreferredPlacementDescriptor#angle - * @see yfiles.layout.PreferredPlacementDescriptor#sideOfEdge - */ - SEMI - } - export enum SliderMode{ - /** - * Slider mode specifier which describes continuous label positions directly on the edge path. - * @see yfiles.layout.SliderEdgeLabelLayoutModel#mode - */ - CENTER, - /** - * Slider mode specifier which describes continuous label positions along the sides of the edge path. - * @see yfiles.layout.SliderEdgeLabelLayoutModel#mode - */ - SIDE, - /** - * Slider mode specifier which describes continuous label positions along one side of the edge path. - * @see yfiles.layout.SliderEdgeLabelLayoutModel#mode - */ - SINGLE_SIDE - } - export enum SelfLoopStyle{ - /** - * Self-loop style specifier which defines that the routes of self-loops are orthogonal. - *

- * The routes consist of an alternating sequence of horizontal and vertical line segments. - *

- * @see yfiles.layout.SelfLoopRouter#layoutStyle - */ - ORTHOGONAL, - /** - * Self-loop style specifier which defines that the routes of self-loops are rounded. - *

- * The {@link yfiles.layout.SelfLoopRouter#lineDistance distance between incident self-loops} and {@link yfiles.layout.SelfLoopRouter#cornerApproximationPointsCount rounding of the corners} can be customized for rounded self-loops. - *

- * @see yfiles.layout.SelfLoopRouter#layoutStyle - * @see yfiles.layout.SelfLoopRouter#lineDistance - * @see yfiles.layout.SelfLoopRouter#cornerApproximationPointsCount - */ - ROUNDED - } - export enum SwimlanesMode{ - /** - * Swimlane ordering mode specifier defining that node grouping is ignored during the swimlane ordering optimization. - * @see yfiles.layout.Swimlanes#arrangeSwimlanes - */ - IGNORE_GROUPS, - /** - * Swimlane ordering mode specifier defining that only node grouping is considered during the swimlane ordering - * optimization. - * @see yfiles.layout.Swimlanes#arrangeSwimlanes - */ - ONLY_GROUPS, - /** - * Swimlane ordering mode specifier defining that both node grouping and edge length are considered during the swimlane - * ordering optimization. - * @see yfiles.layout.Swimlanes#arrangeSwimlanes - */ - MIXED - } - /** - * {@link yfiles.layout.GraphLayoutLineWrapper} can line-wrap or column-wrap a graph layout. - *

- * This {@link yfiles.layout.ILayoutStage} supports both wrapping a layout at a given width (height) and wrapping a layout - * automatically at some width (height) such that the resulting overall aspect ratio is close to a desired {@link yfiles.layout.GraphLayoutLineWrapper#targetRatio target ratio}. - *

- *

- * The {@link yfiles.layout.GraphLayoutLineWrapper} can be used on an existing graph layout or on the result of the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface GraphLayoutLineWrapper extends yfiles.layout.LayoutStageBase{} - export class GraphLayoutLineWrapper { - /** - * Creates a new {@link yfiles.layout.GraphLayoutLineWrapper} instance with default settings. - */ - constructor(); - /** - * Gets or sets the space that should be kept between edges. - *

- * The spacing must be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given spacing is a negative value - * @type {number} - */ - edgeSpacing:number; - /** - * Gets or sets whether this {@link yfiles.layout.ILayoutStage} wraps lines/rows or columns. - *

- * If this mode is enabled, the layout is wrapped vertically and new columns are appended to the right of the first column. - * Otherwise, the layout is wrapped horizontally and new rows are appended below the first row. - *

- *

- * Also, the {@link yfiles.layout.GraphLayoutLineWrapper#fixedWidth} property will be interpreted as a fixed height if this mode is enabled. - *

- * @see yfiles.layout.GraphLayoutLineWrapper#fixedWidth - * @type {boolean} - */ - columnMode:boolean; - /** - * Gets or sets the space between adjacent lines of the wrapped graph layout. - *

- * If the {@link yfiles.layout.GraphLayoutLineWrapper#columnMode column mode} is enabled, this spacing defines the distance between adjacent columns. - *

- *

- * The spacing should be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the spacing is negative - * @type {number} - */ - spacing:number; - /** - * Gets or sets whether or not every other line is mirrored. - *

- * When breaking a line and placing the remaining line below, this remainder can be rotated by 180 degrees. Then, the edges - * connecting both lines - * stay short. In case the remainder is not rotated, the edges are routed between the two lines to connect to the front of the - * non-mirrored line. - *

- * @type {boolean} - */ - mirror:boolean; - /** - * Gets or sets whether the algorithm should use the {@link yfiles.layout.GraphLayoutLineWrapper#fixedWidth fixed width} or {@link yfiles.layout.GraphLayoutLineWrapper#targetRatio target aspect ratio} to determine line breaks. - * @see yfiles.layout.GraphLayoutLineWrapper#fixedWidth - * @see yfiles.layout.GraphLayoutLineWrapper#targetRatio - * @type {boolean} - */ - fixedWidthLineBreaks:boolean; - /** - * Gets or sets the desired target aspect ratio for the layout. - *

- * The aspect ratio needs to be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the target ratio is 0 or less - * @see yfiles.layout.GraphLayoutLineWrapper#fixedWidthLineBreaks - * @type {number} - */ - targetRatio:number; - /** - * Gets or sets the desired width of the lines. - *

- * The {@link yfiles.layout.GraphLayoutLineWrapper} breaks the lines at the specified width. - *

- *

- * In {@link yfiles.layout.GraphLayoutLineWrapper#columnMode column mode}, the fixed width is interpreted as fixed height for a column. - *

- * @see yfiles.layout.GraphLayoutLineWrapper#fixedWidthLineBreaks - * @see yfiles.layout.GraphLayoutLineWrapper#columnMode - * @type {number} - */ - fixedWidth:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.GraphLayoutLineWrapper; - } - /** - * This class represents a column of a {@link yfiles.layout.PartitionGrid partition grid} structure. - *

- * The results of the calculation of the geometry of the column will be placed into the instances of this class after the - * layout. - *

- * @see yfiles.layout.PartitionGrid - * @class - * @implements {yfiles.lang.IComparable} - */ - export interface ColumnDescriptor extends yfiles.lang.Object,yfiles.lang.IComparable{} - export class ColumnDescriptor { - /** - * Compares this {@link yfiles.layout.ColumnDescriptor} instance with a given other {@link yfiles.layout.ColumnDescriptor} instance based - * on the indices of the two instances. - * @param o the {@link } to compare to - * @returns -1, 0 or 1 if this {@link } is less than, equal to, or greater than the given other - * {@link } - */ - compareTo(o:any):number; - /** - * Gets the index of the column within the {@link yfiles.layout.PartitionGrid partition grid}. - * @type {number} - */ - index:number; - /** - * Gets or sets the minimum width of the column. - *

- * The minimum width is defined to be at least 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum width is negative - * @type {number} - */ - minimumWidth:number; - /** - * Gets or sets the left column inset in which no element will lie in the resulting layout. - *

- * The column inset must be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the left inset is negative - * @type {number} - */ - leftInset:number; - /** - * Gets or sets the right column inset in which no element will lie in the resulting layout. - *

- * The column inset must be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the right inset is negative - * @type {number} - */ - rightInset:number; - /** - * Gets or sets the computed width of the column after the layout has been calculated. - *

- * The computed width needs to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the computed width is negative - * @type {number} - */ - computedWidth:number; - /** - * Gets or sets the original width of the column. - *

- * The original width should be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the original width is negative - * @type {number} - */ - originalWidth:number; - /** - * Gets or sets the original position (smallest x-coordinate) of the column. - * @type {number} - */ - originalPosition:number; - /** - * Gets or sets the computed position (smallest x-coordinate) of the column after the layout has been calculated. - * @type {number} - */ - computedPosition:number; - /** - * Gets or sets the tightness factor of this column. - *

- * This value must lie within the interval [0,1]. - *

- *

- * The larger the value, the more the column will be forced to obtain its minimum width: - *

- *
    - *
  • a value of 0.0d will disable the compression of the column.
  • - *
  • a value of 1.0d will try to force the column to obtain its specified {@link yfiles.layout.ColumnDescriptor#minimumWidth minimum width}.
  • - *
- * @throws {Stubs.Exceptions.ArgumentError} if the tightness value is outside the interval [0,1] - * @type {number} - */ - tightness:number; - /** - * Gets or sets whether the index of the column is fixed or it should be chosen automatically in order to minimize edge - * lengths. - *

- * For all columns where this property is enabled, the relative ordering given by the indices is preserved. The remaining - * columns may be sorted again so that the overall edge lengths are minimized. - *

- * @type {boolean} - */ - indexFixed:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.ColumnDescriptor; - } - /** - * This class represents a single partition cell, i.e., a pair consisting of a row and a column. - * @class - * @implements {yfiles.lang.IComparable} - * @final - */ - export interface PartitionCellIdEntry extends yfiles.lang.Object,yfiles.lang.IComparable{} - export class PartitionCellIdEntry { - /** - * Compares this {@link yfiles.layout.PartitionCellIdEntry} instance with a given other {@link yfiles.layout.PartitionCellIdEntry} - * instance. - *

- * The comparison is based on the indices of the {@link yfiles.layout.PartitionCellIdEntry#row rows} and {@link yfiles.layout.PartitionCellIdEntry#column columns} of the two pairs. A {@link yfiles.layout.PartitionCellIdEntry} is - * considered to be smaller than another pair if its {@link yfiles.layout.RowDescriptor#index row index} is smaller than the row index of the other pair. If the row - * indices are equal, the {@link yfiles.layout.PartitionCellIdEntry} with the smaller {@link yfiles.layout.ColumnDescriptor#index column index} is said to be smaller. Hence, - * two {@link yfiles.layout.PartitionCellIdEntry} instances are equal, if the row and column indices are equal. - *

- * @param o the {@link } to be compared - * @returns -1, 0 or 1 if this {@link } is smaller than, equal to, or greater than the given other {@link } - * instance - */ - compareTo(o:any):number; - /** - * Gets the {@link yfiles.layout.RowDescriptor} associated with this {@link yfiles.layout.PartitionCellId partition cell}. - * @type {yfiles.layout.RowDescriptor} - */ - row:yfiles.layout.RowDescriptor; - /** - * Gets the {@link yfiles.layout.ColumnDescriptor} associated with this {@link yfiles.layout.PartitionCellId partition cell}. - * @type {yfiles.layout.ColumnDescriptor} - */ - column:yfiles.layout.ColumnDescriptor; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.PartitionCellIdEntry; - } - /** - * {@link yfiles.layout.PartitionCellId} represents an identifier for partition cells of a {@link yfiles.layout.PartitionGrid partition grid} structure. - * @see yfiles.layout.PartitionGrid - * @class - */ - export interface PartitionCellId extends yfiles.lang.Object{} - export class PartitionCellId { - /** - * Gets a {@link yfiles.collections.ICollection. collection} of elements of type {@link yfiles.layout.PartitionCellIdEntry}. - *

- * Each pair consists of a {@link yfiles.layout.ColumnDescriptor column} and a {@link yfiles.layout.RowDescriptor row} defining a single {@link yfiles.layout.PartitionCellId partition cell}. - *

- * @type {yfiles.collections.IEnumerable.} - */ - cells:yfiles.collections.IEnumerable; - /** - * Gets whether or not this {@link yfiles.layout.PartitionCellId} represents a multi-cell, i.e., a cell spanning multiple - * rows/columns. - *

- * This means that it was created using {@link yfiles.layout.PartitionGrid#createCellSpanId}, - * {@link yfiles.layout.PartitionGrid#createCellSpanId}, {@link yfiles.layout.PartitionGrid#createCellSpanId}, {@link yfiles.layout.PartitionGrid#createColumnSpanId} - * or {@link yfiles.layout.PartitionGrid#createRowSpanId}. - *

- * @type {boolean} - */ - isSpanning:boolean; - /** - * Gets the first {@link yfiles.layout.RowDescriptor row} associated with this {@link yfiles.layout.PartitionCellId partition cell} identifier. - * @type {yfiles.layout.RowDescriptor} - */ - row:yfiles.layout.RowDescriptor; - /** - * Gets the first {@link yfiles.layout.ColumnDescriptor column} associated with this {@link yfiles.layout.PartitionCellId partition cell} identifier. - * @type {yfiles.layout.ColumnDescriptor} - */ - column:yfiles.layout.ColumnDescriptor; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.PartitionCellId; - } - /** - * This class represents a partition grid that partitions the drawing area into rectangular partition cells. - *

- * Such a structure allows, for example, to model vertical/horizontal swimlanes which are often used in flow diagrams to - * separate logical units. - *

- *

- * The grid consists of rows and columns that are created using the corresponding constructors of this class or methods {@link yfiles.layout.PartitionGrid#addRow} - * and {@link yfiles.layout.PartitionGrid#addColumn}. The {@link yfiles.layout.PartitionGrid} object has to be registered with the graph - * using the {@link yfiles.algorithms.IDataProvider} key {@link yfiles.layout.PartitionGrid#PARTITION_GRID_DP_KEY}. - *

- *

- * Each node can be assigned to a {@link yfiles.layout.PartitionCellId} which represents a set of partition cells. The mapping has - * to be registered with the graph using {@link yfiles.algorithms.IDataProvider} key - * {@link yfiles.layout.PartitionGrid#PARTITION_CELL_ID_DP_KEY}. Simple partition cell identifiers which represent a single - * partition cell, i.e., a row/column pair, can be created using method {@link yfiles.layout.PartitionGrid#createCellId} or - * {@link yfiles.layout.PartitionGrid#createCellId}. - *

- *

- * Nodes can also be mapped to a partition cell identifier that represents a multi-cell, i.e., a cell spanning multiple - * columns and rows. Please note, however, that multi-cells are not allowed to overlap each other. This means that the user - * has to ensure that each partition cell (row/column pair) is associated with at most one partition cell identifier. The - * multi-cell identifier can be created using methods {@link yfiles.layout.PartitionGrid#createCellSpanId}, - * {@link yfiles.layout.PartitionGrid#createCellSpanId}, {@link yfiles.layout.PartitionGrid#createCellSpanId}, - * {@link yfiles.layout.PartitionGrid#createColumnSpanId}, and {@link yfiles.layout.PartitionGrid#createRowSpanId}. - *

- *

- * {@graph {"ann":{"s":[60,30],"d":1, "lblB" : 1, "lblFont" : "16px sans-serif"},"n":[[265,290,230,142,2,[[265,313.6,230,23.6,5,"Column 0"]]],[311.5,386.5,[[336.16,410.85,10.67,18.7]]],[411.5,346.5,[[436.16,370.85,10.67,18.7]]],[505,289,299,144,2,[[505,312.6,299,23.6,5,"Column 1"]]],[631.5,366.5,[[656.16,390.85,10.67,18.7]]],[731.5,326.5,[[756.16,350.85,10.67,18.7]]],[531.5,326.5,[[556.16,350.85,10.67,18.7]]],[819,290,250,140,2,[[819,313.6,250,23.6,5,"Column 2"]]],[831.5,326.5,[[856.16,350.85,10.67,18.7]]],[265,449,230,123,2],[411.5,466.5,[[436.16,490.85,10.67,18.7]]],[411.5,526.5,[[436.16,550.85,10.67,18.7]]],[505,449,299,123,2],[819,449,250,123,2],[931.5,466.5,[[956.16,490.85,10.67,18.7]]],[505,589,299,104,2],[819,589,250,104,2],[531.5,606.5,[[552.83,630.85,17.35,18.7]]],[265,589,230,104,2],[411.5,606.5,[[432.83,630.85,17.35,18.7]]],[831.5,606.5,[[852.83,630.85,17.35,18.7]]],[105,348.2,150,23.6,2,[[105,371.8,150,23.6,5,"Row 0"]]],[105,488.2,150,23.6,2,[[105,511.8,150,23.6,5,"Row 1"]]],[105,628.2,150,23.6,2,[[105,651.8,150,23.6,5,"Row 2"]]]],"e":[[1,2,30,-10,-30,-0,[381.5,391.5,381.5,361.5]],[1,4,30,-0,-30,10,[581.5,401.5,581.5,391.5]],[2,4,30,7.5,-30,-0,[481.5,369,481.5,381.5]],[4,5,30,-0,-30,7.5,[701.5,381.5,701.5,349]],[2,6,30,-7.5,-30,-0,[481.5,354,481.5,341.5]],[6,4,30,7.5,-30,-10,[601.5,349,601.5,371.5]],[6,5,30,-7.5,-30,-7.5,[621.5,334,621.5,341.5,681.5,341.5,681.5,334]],[5,8,30,-0,-30,-0],[8,14,30,-0,-30,-7.5,[901.5,341.5,901.5,474]],[10,14,30,-0,-30,7.5,[881.5,481.5,881.5,489]],[1,17,30,10,-30,10,[381.5,411.5,381.5,661.5,481.5,661.5,481.5,631.5]],[11,17,30,-0,-30,-10,[481.5,541.5,481.5,611.5]],[19,17,30,-0,-30,-0],[17,20,30,-0,-30,-0]],"vp":[105.0,289.0,964.0,404.0]}} Sample output of a layout algorithm with a partition grid - *

- * @class - */ - export interface PartitionGrid extends yfiles.lang.Object{} - export class PartitionGrid { - /** - * Creates an instance of {@link yfiles.layout.PartitionGrid} with the given number of rows and columns as well as with given - * insets and minimum sizes. - * @param rowCount the number of rows - * @param columnCount the number of columns - * @param rowInsets the top and bottom insets of the rows - * @param columnInsets the left and right insets of the columns - * @param minRowSize the minimum row height - * @param minColumnSize the minimum column width - */ - constructor(rowCount:number,columnCount:number,rowInsets:number,columnInsets:number,minRowSize:number,minColumnSize:number); - /** - * Creates an instance of {@link yfiles.layout.PartitionGrid} with the given number of rows and columns. - * @param rowCount the number of rows - * @param columnCount the number of columns - */ - constructor(rowCount:number,columnCount:number); - /** - * Creates a new empty instance of {@link yfiles.layout.PartitionGrid}. - */ - constructor(); - /** - * Adds a new {@link yfiles.layout.ColumnDescriptor column} to the {@link yfiles.layout.PartitionGrid} instance. - *

- * The index of the column (as returned by {@link yfiles.layout.ColumnDescriptor#index}) is equal to the size of the list returned by {@link yfiles.layout.PartitionGrid#columns}. - *

- * @returns a new {@link } instance - */ - addColumn():yfiles.layout.ColumnDescriptor; - /** - * Adds a new {@link yfiles.layout.RowDescriptor row} to the {@link yfiles.layout.PartitionGrid} instance. - *

- * The index of the row (as returned by {@link yfiles.layout.RowDescriptor#index}) is equal to the size of the list returned by {@link yfiles.layout.PartitionGrid#rows}. - *

- * @returns a new {@link } instance - */ - addRow():yfiles.layout.RowDescriptor; - /** - * Creates a {@link yfiles.layout.PartitionCellId partition cell} identifier that represents the cell defined by the given column and row index. - * @param rowIndex the row index of the row defining the cell - * @param columnIndex the column index of the column defining the cell - * @returns a {@link } instance - * @throws {Stubs.Exceptions.ArgumentError} if the given column/row index is not valid - */ - createCellId(rowIndex:number,columnIndex:number):yfiles.layout.PartitionCellId; - /** - * Creates a {@link yfiles.layout.PartitionCellId partition cell} identifier that represents the cell defined by the given {@link yfiles.layout.ColumnDescriptor column} and {@link yfiles.layout.RowDescriptor row}. - * @param rd the row defining the cell - * @param cd the column defining the cell - * @returns a {@link } instance - * @throws {Stubs.Exceptions.ArgumentError} if the given column/row is null - */ - createCellId(rd:yfiles.layout.RowDescriptor,cd:yfiles.layout.ColumnDescriptor):yfiles.layout.PartitionCellId; - /** - * Creates a {@link yfiles.layout.PartitionCellId partition cell} identifier that represents a multi-cell spanning multiple columns and rows. - *

- * The partition cell identifier represents all cells defined by a row between fromRow and toRow (both including) and a - * column between fromRow and toCol (both including). - *

- *

- * A group node mapped to such a partition cell identifier represents the multi-cell, i.e., its boundary corresponds to the - * smallest rectangle containing all partition cells specified by the partition cell identifier. The boundary does not - * depend on the partition cells associated with the group's descendants. Hence, each non-group descendant has to be - * manually assigned to one of the partition cells. Furthermore, edges incident to such a group node are not considered - * during the layout. - *

- * @param fromRow the topmost row defining the cell - * @param fromCol the leftmost column defining the cell - * @param toRow the bottommost row defining the cell - * @param toCol the rightmost column defining the cell - * @returns a {@link } instance - */ - createCellSpanId(fromRow:yfiles.layout.RowDescriptor,fromCol:yfiles.layout.ColumnDescriptor,toRow:yfiles.layout.RowDescriptor,toCol:yfiles.layout.ColumnDescriptor):yfiles.layout.PartitionCellId; - /** - * Creates a {@link yfiles.layout.PartitionCellId partition cell} identifier that represents a multi-cell spanning multiple columns and rows. - *

- * The partition cell identifier represents all cells defined by a row with index between fromRowIndex and toRowIndex (both - * including) and a column with index between fromColIndex and toColIndex (both including). - *

- *

- * A group node mapped to such a partition cell identifier represents the multi-cell, i.e., its boundary corresponds to the - * smallest rectangle containing all partition cells specified by the partition cell identifier. The boundary does not - * depend on the partition cells associated with the group's descendants. Hence, each non-group descendant has to be - * manually assigned to one of the partition cells. Furthermore, edges incident to such a group node are not considered - * during the layout. - *

- * @param fromRowIndex the row index of the topmost row defining the cell - * @param fromColIndex the column index of the leftmost column defining the cell - * @param toRowIndex the row index of the bottommost row defining the cell - * @param toColIndex the column index of the rightmost column defining the cell - * @returns a {@link } instance - */ - createCellSpanId(fromRowIndex:number,fromColIndex:number,toRowIndex:number,toColIndex:number):yfiles.layout.PartitionCellId; - /** - * Creates a {@link yfiles.layout.PartitionCellId partition cell} identifier that represents a multi-cell spanning multiple columns and rows. - *

- * The partition cell identifier represents all cells spanned by the columns of columnList and rows of rowList. - *

- *

- * A group node mapped to such a partition cell identifier represents the multi-cell, i.e., its boundary corresponds to the - * smallest rectangle containing all partition cells specified by the partition cell identifier. The boundary does not - * depend on the partition cells associated with the group's descendants. Hence, each non-group descendant has to be - * manually assigned to one of the partition cells. Furthermore, edges incident to such a group node are not considered - * during the layout. - *

- * @param rowList the {@link rows} defining the cell - * @param columnList the {@link columns} defining the cell - * @returns a {@link } instance - */ - createCellSpanId(rowList:yfiles.collections.ICollection,columnList:yfiles.collections.ICollection):yfiles.layout.PartitionCellId; - /** - * Creates a {@link yfiles.layout.PartitionCellId partition cell} identifier that represents a cell spanning a whole column. - *

- * A group node mapped to such a partition cell identifier represents the column, i.e., its enclosing boundary corresponds - * to that of the column. The boundary does not depend on the partition cells associated with the group's descendants. - * Hence, each non-group descendant has to be manually assigned to one of the partition cells. Furthermore, edges incident - * to such a group node are not considered during the layout. - *

- * @param columnIndex the column index of the column defining the cell - * @returns a {@link } instance - */ - createColumnSpanId(columnIndex:number):yfiles.layout.PartitionCellId; - /** - * Creates a {@link yfiles.layout.PartitionCellId partition cell} identifier that represents a cell spanning a whole row. - *

- * A group node mapped to such a partition cell identifier represents the row, i.e., its enclosing boundary corresponds to - * that of the row. The boundary does not depend on the partition cells associated with the group's descendants. Hence, - * each non-group descendant has to be manually assigned to one of the partition cells. Furthermore, edges incident to such - * a group node are not considered during the layout. - *

- * @param rowIndex the row index of the row defining the cell - * @returns a {@link } instance - */ - createRowSpanId(rowIndex:number):yfiles.layout.PartitionCellId; - /** - * Finalizes the orientation changes and is called at the end of the {@link yfiles.layout.OrientationLayout} stage. - *

- * Points are transferred to their final positions through {@link yfiles.layout.OrientationLayout#completeTransform}. - *

- * @param orientationLayouter an {@link } instance - * @see yfiles.layout.OrientationLayout - */ - finalizeOrientationChange(orientationLayouter:yfiles.layout.OrientationLayout):void; - /** - * Returns the {@link yfiles.layout.ColumnDescriptor column} with the given index. - * @param index the index of the column to be returned - * @returns the {@link column} with the given index or null if no such column exists - */ - getColumn(index:number):yfiles.layout.ColumnDescriptor; - /** - * Returns the {@link yfiles.layout.PartitionGrid} instance associated with the given graph. - * @param graph the given graph - * @returns the {@link } of the graph or null if the graph has no associated partition grid - * @static - */ - static getPartitionGrid(graph:yfiles.algorithms.Graph):yfiles.layout.PartitionGrid; - /** - * Returns the {@link yfiles.layout.RowDescriptor row} with the given index. - * @param index the index of the row to be returned - * @returns the {@link row} with the given index or null if no such row exists - */ - getRow(index:number):yfiles.layout.RowDescriptor; - static hasAtLeastTwoNonEmptyRows(graph:yfiles.algorithms.Graph):boolean; - /** - * Prepares for the orientation changes and is called at the beginning of the {@link yfiles.layout.OrientationLayout} stage. - *

- * Original points are transferred to their temporary positions through {@link yfiles.layout.OrientationLayout#prepareTransform}. - *

- * @param orientationLayouter an {@link } instance - * @see yfiles.layout.OrientationLayout - */ - prepareOrientationChange(orientationLayouter:yfiles.layout.OrientationLayout):void; - /** - * Data provider key for storing the partition grid structure - *

- * If the {@link yfiles.algorithms.IDataProvider} contains a partition grid structure, this structure will be considered during - * layout (provided that the layout algorithm supports such constraints). - *

- * @const - * @static - * @type {yfiles.algorithms.GraphDpKey.} - */ - static PARTITION_GRID_DP_KEY:yfiles.algorithms.GraphDpKey; - /** - * Data provider key for storing a set of partition cells for each node - *

- * Each node is placed inside the columns/rows defined by the corresponding {@link yfiles.layout.PartitionCellId} identifier. - * Instances can be shared among multiple nodes, but don't have to be shared. - *

- * @see yfiles.layout.PartitionCellId - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static PARTITION_CELL_ID_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets or sets whether or not the order of the columns should be chosen automatically to minimize edge lengths. - *

- * For all columns where {@link yfiles.layout.ColumnDescriptor#indexFixed} is set to - * true, the relative ordering given by the indices is preserved. The remaining columns may be sorted again so that the - * overall edge lengths are minimized. - *

- * @type {boolean} - */ - optimizeColumnOrder:boolean; - /** - * Gets or sets whether or not the order of the rows should be chosen automatically to minimize edge lengths. - *

- * For all rows where {@link yfiles.layout.RowDescriptor#indexFixed} is set to - * true, the relative ordering given by the indices is preserved. The remaining rows may be sorted again so that the - * overall edge lengths are minimized. - *

- * @type {boolean} - */ - optimizeRowOrder:boolean; - /** - * Gets the list of rows of the {@link yfiles.layout.PartitionGrid partition grid}. - * @type {yfiles.algorithms.YList} - */ - rows:yfiles.algorithms.YList; - /** - * Gets the columns of the {@link yfiles.layout.PartitionGrid partition grid}. - * @type {yfiles.algorithms.YList} - */ - columns:yfiles.algorithms.YList; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.PartitionGrid; - } - /** - * This class represents a row of a {@link yfiles.layout.PartitionGrid partition grid} structure. - *

- * The results of the calculation of the geometry of the row will be placed into the instances of this class after the - * layout. - *

- * @see yfiles.layout.PartitionGrid - * @class - * @implements {yfiles.lang.IComparable} - */ - export interface RowDescriptor extends yfiles.lang.Object,yfiles.lang.IComparable{} - export class RowDescriptor { - /** - * Compares this {@link yfiles.layout.RowDescriptor} instance with a given other {@link yfiles.layout.RowDescriptor} instance based on the - * indices of the two instances. - * @param o the {@link } to compare to - * @returns -1, 0 or 1 if this {@link } is less than, equal to, or greater than the given other - * {@link } - */ - compareTo(o:any):number; - /** - * Gets the index of the row within the {@link yfiles.layout.PartitionGrid partition grid}. - * @type {number} - */ - index:number; - /** - * Gets or sets the minimum height of the row. - *

- * The minimum height is defined to be at least 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum height is negative - * @type {number} - */ - minimumHeight:number; - /** - * Gets or sets the top inset in which no element will lie in the resulting layout. - *

- * The inset value needs to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given top inset is negative - * @type {number} - */ - topInset:number; - /** - * Gets or sets the bottom inset in which no element will lie in the resulting layout. - *

- * The inset value needs to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given bottom inset is negative - * @type {number} - */ - bottomInset:number; - /** - * Gets or sets the computed height of the row after the layout has been calculated. - *

- * The computed height needs to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the computed height is negative - * @type {number} - */ - computedHeight:number; - /** - * Gets or sets the original position (smallest y-coordinate) of the row. - * @type {number} - */ - originalPosition:number; - /** - * Gets or sets the original height of the row. - *

- * The original height needs to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the original height is negative - * @type {number} - */ - originalHeight:number; - /** - * Gets or sets the computed position (smallest y-coordinate) of the row after the layout has been calculated. - * @type {number} - */ - computedPosition:number; - /** - * Gets or sets the tightness factor of this row. - *

- * This value must lie within the interval [0,1]. - *

- *

- * The larger the value, the more the row will be forced to obtain its minimum height: - *

- *
    - *
  • a value of 0.0d will disable the compression of the row.
  • - *
  • a value of 1.0d will try to force the row to obtain its specified {@link yfiles.layout.RowDescriptor#minimumHeight minimum height}.
  • - *
- * @throws {Stubs.Exceptions.ArgumentError} if the tightness value is outside the interval [0,1] - * @type {number} - */ - tightness:number; - /** - * Gets or sets whether the index of the row is fixed or it should be chosen automatically in order to minimize edge - * lengths. - *

- * For all rows where this property is enabled, the relative ordering given by the indices is preserved. The remaining rows - * may be sorted again so that the overall edge lengths are minimized. - *

- * @type {boolean} - */ - indexFixed:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.RowDescriptor; - } - export enum InterEdgeRoutingStyle{ - /** - * An inter-edge routing style based on which the edge layout of inter-edges will be adopted from the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @see yfiles.layout.FixGroupLayoutStage#interEdgeRoutingStyle - */ - ADOPT, - /** - * An inter-edge routing style based on which inter-edges are routed in an orthogonal style. - * @see yfiles.layout.FixGroupLayoutStage#interEdgeRoutingStyle - * @see yfiles.layout.FixGroupLayoutStage#interEdgeRouter - */ - ORTHOGONAL, - /** - * An inter-edge routing style based on which inter-edges are routed as straight lines. - * @see yfiles.layout.FixGroupLayoutStage#interEdgeRoutingStyle - * @see yfiles.layout.FixGroupLayoutStage#interEdgeRouter - */ - STRAIGHTLINE - } - /** - * This interface defines {@link yfiles.algorithms.IDataProvider} keys for those layout algorithms that can handle hierarchically - * grouped graphs. - *

- * There are two groups of {@link yfiles.algorithms.IDataProvider} keys. {@link yfiles.algorithms.IDataProvider}s registered with - * {@link yfiles.layout.GroupingKeys#NODE_ID_DP_KEY}, {@link yfiles.layout.GroupingKeys#GROUP_DP_KEY} and {@link yfiles.layout.GroupingKeys#PARENT_NODE_ID_DP_KEY} - * define the relationship of nodes within the hierarchy. A parent node is defined for each node in the graph. This parent - * is the containing group node. For top-level nodes, this parent is null. - *

- *

- * {@link yfiles.layout.GroupingKeys#GROUP_NODE_INSETS_DP_KEY} and {@link yfiles.layout.GroupingKeys#MINIMUM_NODE_SIZE_DP_KEY} are used for - * registering - * {@link yfiles.algorithms.IDataProvider}s that add layout information to group nodes such as the insets and the minimum size - * respectively. - *

- * @see yfiles.layout.GroupingSupport - * @class - * @static - */ - export interface GroupingKeys extends yfiles.lang.Object{} - export class GroupingKeys { - /** - * Data provider key for assigning a unique ID for each node - *

- * The IDs of the nodes need to differ based on {@link any#hashCode} and {@link any#equals}. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static NODE_ID_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for describing the hierarchy of nodes in the graph - * @see yfiles.layout.GroupingKeys#NODE_ID_DP_KEY - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static PARENT_NODE_ID_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for distinguishing normal nodes from group nodes - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static GROUP_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for assigning insets for group nodes - *

- * Insets reserve space around the contents of a group node. Labels and other visual decorations may be placed inside this - * space. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static GROUP_NODE_INSETS_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for assigning minimum sizes for group nodes - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static MINIMUM_NODE_SIZE_DP_KEY:yfiles.algorithms.NodeDpKey; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.GroupingKeys; - } - /** - * This class provides convenient and efficient access to the hierarchic graph structure. - *

- * The grouping information is provided through {@link yfiles.algorithms.IDataProvider}s registered with the graph with keys - * {@link yfiles.layout.GroupingKeys#NODE_ID_DP_KEY}, {@link yfiles.layout.GroupingKeys#PARENT_NODE_ID_DP_KEY} and - * {@link yfiles.layout.GroupingKeys#GROUP_DP_KEY}. It describes the hierarchy as a tree where a group node is the parent of the - * nodes that it contains. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[444,-37.38,62,82.38,2,[[444,-15,62,22.38,"9"]]],[460,0,[[469.66,24.35,10.67,18.7,"5"]]],[536,0,[[545.66,24.35,10.67,18.7,"6"]]],[384,0,[[393.66,24.35,10.67,18.7,"4"]]],[596,-10,50,50,2,[[596,12.38,50,22.38,"7"]]],[140,-74.75,214,134.75,2,[[140,-52.38,214,22.38,"10"]]],[156,0,[[165.66,24.35,10.67,18.7,"1"]]],[216,-37.38,122,82.38,2,[[216,-15,122,22.38,"8"]]],[232,0,[[241.66,24.35,10.67,18.7,"2"]]],[292,0,[[301.66,24.35,10.67,18.7,"3"]]]],"e":[],"vp":[140.0,-75.0,506.0,135.0]}} This is an example graph that contains group nodes. {@graph {"ann":{"s":[30,30],"d":1},"n":[[34.5,70,42,52.38,2,[[34.5,92.38,42,22.38,"10"]]],[200,162.38,42,52.38,2,[[200,184.75,42,22.38,"9"]]],[150,277.13,[[159.66,301.48,10.67,18.7,"4"]]],[179.25,0,[[160.9,22.7,66.7,18.7,"Virtual Root"]]],[0,277.13,[[9.66,301.48,10.67,18.7,"1"]]],[206,277.13,[[215.66,301.48,10.67,18.7,"5"]]],[69,162.38,42,52.38,2,[[69,184.75,42,22.38,"8"]]],[50,277.13,[[59.66,301.48,10.67,18.7,"2"]]],[100,277.13,[[109.66,301.48,10.67,18.7,"3"]]],[312,254.75,42,52.38,2,[[312,277.13,42,22.38,"7"]]],[262,277.13,[[271.66,301.48,10.67,18.7,"6"]]]],"e":[[3,0,[194.25,50,55.5,50]],[3,2,[194.25,50,165,50]],[3,1,[194.25,50,221,50]],[0,4,[55.5,142.38,15,142.38]],[1,5],[0,6,[55.5,142.38,90,142.38]],[6,7,[90,234.75,65,234.75]],[6,8,[90,234.75,115,234.75]],[3,9,[194.25,50,333,50]],[3,10,[194.25,50,277,50]]],"vp":[0.0,0.0,354.0,308.0]}} The hierarchy tree of the grouped graph reveals the relationship - * among the nodes. The corresponding nodes have the same labels as in the grouped graph. Group nodes are considered as the - * parents of their content which can consist of group nodes and/or normal nodes. Top-level nodes are children of a - * {@link yfiles.layout.GroupingSupport#root virtual root}. Leaf nodes can either be normal nodes or empty groups. - *

- * @class - */ - export interface GroupingSupport extends yfiles.lang.Object{} - export class GroupingSupport { - /** - * Creates a new {@link yfiles.layout.GroupingSupport} instance that represents the hierarchy of the graph. - *

- * The hierarchy information is cached during the constructor call. Later modifications to the graph are not considered and - * may lead to errors when using this {@link yfiles.layout.GroupingSupport} instance. - *

- * @param graph the graph instance from which the hierarchy information is obtained - */ - constructor(graph:yfiles.algorithms.Graph); - /** - * Creates a {@link yfiles.algorithms.INodeMap} to store hierarchy information for each node. - *

- * This method is called in {@link yfiles.layout.GroupingSupport#init} and may be overridden to customize how the {@link yfiles.algorithms.INodeMap} - * is created. - *

- * @param graph the current graph - * @returns the new instance of {@link } - * @see yfiles.layout.GroupingSupport#init - * @see yfiles.layout.GroupingSupport#disposeInfoMap - * @protected - */ - createInfoMap(graph:yfiles.algorithms.Graph):yfiles.algorithms.INodeMap; - /** - * Disposes of all internal data structures held by this {@link yfiles.layout.GroupingSupport instance}. - *

- * {@link yfiles.layout.GroupingSupport} should be disposed of when it is not needed anymore, or if the state of the graph changes - * (e.g. new nodes are added). - *

- */ - dispose():void; - /** - * Disposes of the {@link yfiles.algorithms.INodeMap} created to store hierarchy information for each node. - *

- * This method is called in {@link yfiles.layout.GroupingSupport#dispose} and may be overridden to revert changes from - * {@link yfiles.layout.GroupingSupport#createInfoMap}. - *

- * @param graph the current graph - * @param infoMap the {@link } which contains the hierarchy information for each node - * @see yfiles.layout.GroupingSupport#dispose - * @see yfiles.layout.GroupingSupport#createInfoMap - * @protected - */ - disposeInfoMap(graph:yfiles.algorithms.Graph,infoMap:yfiles.algorithms.INodeMap):void; - /** - * Returns the direct children of the given group node. - *

- * If the {@link yfiles.layout.GroupingSupport#root virtual root of the hierarchy tree} is passed, all top-level nodes are returned. - *

- * @param parent the group node - * @returns a set of child nodes of the given parent node - * @see yfiles.layout.GroupingSupport#root - * @see yfiles.layout.GroupingSupport#getParent - * @see yfiles.layout.GroupingSupport#getDescendants - */ - getChildren(parent:yfiles.algorithms.Node):yfiles.algorithms.NodeList; - /** - * Returns all descendants of the given group node. - *

- * All nodes in the subtree rooted at this group node are collected recursively. - *

- *

- * If the {@link yfiles.layout.GroupingSupport#root virtual root of the hierarchy tree} is passed, all nodes in the graph are returned. - *

- * @param parent the group node - * @returns a set of nodes that belong to a subtree of the hierarchy tree rooted at the given parent - * @see yfiles.layout.GroupingSupport#root - * @see yfiles.layout.GroupingSupport#getParent - * @see yfiles.layout.GroupingSupport#getChildren - */ - getDescendants(parent:yfiles.algorithms.Node):yfiles.algorithms.NodeList; - /** - * Returns all edges crossing the bounds of the given group node such that their targets are inside the group node while - * their sources lie outside the group node. - * @param group the group node whose bounds are crossed - * @returns a set of edges that cross the bounds of the group node starting outside the group node - * @see yfiles.layout.GroupingSupport#getEdgesGoingOut - * @see yfiles.layout.GroupingSupport#isNormalEdge - */ - getEdgesGoingIn(group:yfiles.algorithms.Node):yfiles.algorithms.EdgeList; - /** - * Returns all edges crossing the bounds of the given group node such that their sources are inside the group node while - * their targets lie outside the group node. - * @param group the group node whose bounds are crossed - * @returns a set of edges that cross the bounds of the group node starting inside the group node - * @see yfiles.layout.GroupingSupport#getEdgesGoingIn - * @see yfiles.layout.GroupingSupport#isNormalEdge - */ - getEdgesGoingOut(group:yfiles.algorithms.Node):yfiles.algorithms.EdgeList; - /** - * Returns the nearest common ancestor of the given nodes in the hierarchy structure. - *

- * The nearest common ancestor is the local root of the smallest subtree in the hierarchy tree that contains both nodes. - * This group is the first node that contains these two nodes. If no such node exists, the {@link yfiles.layout.GroupingSupport#root virtual root} is returned. - *

- *

- * Common ancestors in special cases: - *

- *
    - *
  • node1 == node2: the parent of node1/node2
  • - *
  • node1 is parent of node2: the parent of node1
  • - *
  • node2 is parent of node1: the parent of node2
  • - *
- * @param node1 one of the two nodes whose common ancestor is determined - * @param node2 one of the two nodes whose common ancestor is determined - * @returns the nearest common ancestor node or {@link #root} - */ - getNearestCommonAncestor(node1:yfiles.algorithms.Node,node2:yfiles.algorithms.Node):yfiles.algorithms.Node; - /** - * Returns the parent for the given node. - *

- * The parent is the containing group node. - *

- * @param node the node for which the parent is determined - * @returns the parent of the given node or null for a top-level node - * @throws {Stubs.Exceptions.ArgumentError} if the given node is null - * @see yfiles.layout.GroupingSupport#getChildren - * @see yfiles.layout.GroupingSupport#getDescendants - * @see yfiles.layout.GroupingSupport#getNearestCommonAncestor - */ - getParent(node:yfiles.algorithms.Node):yfiles.algorithms.Node; - /** - * Returns an immediate child of the group node that represents the given node. - *

- * If this node is already a child of the group node, the group node will be its representative. In case the node is - * located further down in the hierarchy, the child of the group node, which is also an ancestor of the node, is used. - * There is no representative if the node is not a descendant of the group. - *

- * @param node the node for which a representative is searched - * @param group the group node to which the representative should belong - * @returns the representative or null if the node is not a descendant of the group - * @throws {Stubs.Exceptions.ArgumentError} if the given node is null - */ - getRepresentative(node:yfiles.algorithms.Node,group:yfiles.algorithms.Node):yfiles.algorithms.Node; - /** - * Determines whether or not the given node is a group node with children. - *

- * Normal nodes never have children. - *

- * @param node the potential parent - * @returns true if the given node has children, false otherwise - * @see yfiles.layout.GroupingSupport#getChildren - * @see yfiles.layout.GroupingSupport#isGroupNode - */ - hasChildren(node:yfiles.algorithms.Node):boolean; - /** - * Initializes internal data structures. - *

- * This method is called from {@link yfiles.layout.GroupingSupport} and retrieves the state of the hierarchic graph at the moment - * of invocation. It may be overridden to append additional information used for group handling. - *

- * @see yfiles.layout.GroupingSupport#dispose - * @protected - */ - init():void; - /** - * Returns whether or not the given graph is flat. - *

- * A graph is considered to be flat if there exist no group nodes or there exist group nodes but none of them has children. - *

- * @param graph the input graph - * @returns true if there are no groups or only empty groups in the graph, false otherwise - * @see yfiles.layout.GroupingSupport#isGrouped - * @static - */ - static isFlat(graph:yfiles.algorithms.Graph):boolean; - /** - * Returns whether or not the given graph is grouped. - *

- * A graph is considered to be grouped if there are {@link yfiles.algorithms.IDataProvider}s registered with the graph with keys - * {@link yfiles.layout.GroupingKeys#GROUP_DP_KEY}, {@link yfiles.layout.GroupingKeys#NODE_ID_DP_KEY} and - * {@link yfiles.layout.GroupingKeys#PARENT_NODE_ID_DP_KEY}. - *

- * @param graph the input graph - * @returns true if the graph contains hierarchic information, false otherwise - * @see yfiles.layout.GroupingSupport#isFlat - * @static - */ - static isGrouped(graph:yfiles.algorithms.Graph):boolean; - /** - * Determines whether or not the given node is a group node. - *

- * While group nodes may have children, normal nodes never have children. - *

- * @param node the potential group node - * @returns true if the given node is a group node, false otherwise - * @see yfiles.layout.GroupingSupport#hasChildren - */ - isGroupNode(node:yfiles.algorithms.Node):boolean; - /** - * Determines whether or not the given edge is a normal edge as opposed to an edge that crosses any group node bounds. - *

- * Source and target of a normal edge are part of the same hierarchy level and share the same parent node. - *

- * @param edge the edge to check - * @returns true if the given edge is normal, false otherwise - * @see yfiles.layout.GroupingSupport#getEdgesGoingIn - * @see yfiles.layout.GroupingSupport#getEdgesGoingOut - */ - isNormalEdge(edge:yfiles.algorithms.Edge):boolean; - /** - * Gets the {@link yfiles.algorithms.Graph} instance for which this {@link yfiles.layout.GroupingSupport} object provides hierarchy - * information. - * @type {yfiles.algorithms.Graph} - */ - graph:yfiles.algorithms.Graph; - /** - * Gets a {@link yfiles.algorithms.Node} instance associated with the virtual root of the hierarchy tree. - *

- * This instance can be given to the {@link yfiles.layout.GroupingSupport#getChildren} to obtain the nodes of the top level of the - * hierarchy. - *

- * @see yfiles.layout.GroupingSupport#getChildren - * @type {yfiles.algorithms.Node} - */ - root:yfiles.algorithms.Node; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.GroupingSupport; - } - /** - * A {@link yfiles.layout.ILayoutStage layout stage} that hides the group nodes of hierarchically grouped graphs. - *

- * This stage removes all group nodes and adjacent edges from the graph before passing it to the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. After the core layout algorithm has arranged the graph, the hidden elements will be reinserted. - *

- *

- * This stage is used by layout algorithms that cannot handle grouped graphs (e.g. {@link yfiles.circular.CircularLayout}). - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface HideGroupsStage extends yfiles.layout.LayoutStageBase{} - export class HideGroupsStage { - /** - * Creates an instance of {@link yfiles.layout.HideGroupsStage} with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [coreLayouter=null] The core layout algorithm. - */ - constructor(coreLayouter?:yfiles.layout.ILayoutAlgorithm); - /** - * Hides the group nodes and their incident edges of the input graph. - *

- * Furthermore, this method removes all grouping-related {@link yfiles.algorithms.IDataProvider}s from the input graph. - *

- * @param graph the input graph - * @see yfiles.layout.GroupingKeys#NODE_ID_DP_KEY - * @see yfiles.layout.GroupingKeys#PARENT_NODE_ID_DP_KEY - * @see yfiles.layout.GroupingKeys#GROUP_DP_KEY - * @see yfiles.layout.HideGroupsStage#unhideGroupNodes - */ - hideGroupNodes(graph:yfiles.layout.LayoutGraph):void; - /** - * Un-hides the group nodes and their incident edges of the input graph that were previously hidden using method - * {@link yfiles.layout.HideGroupsStage#hideGroupNodes}. - *

- * Furthermore, this method restores all previously removed grouping related - * {@link yfiles.algorithms.IDataProvider}s on the input graph. - *

- * @param graph the given graph - * @see yfiles.layout.GroupingKeys#NODE_ID_DP_KEY - * @see yfiles.layout.GroupingKeys#PARENT_NODE_ID_DP_KEY - * @see yfiles.layout.GroupingKeys#GROUP_DP_KEY - * @see yfiles.layout.HideGroupsStage#hideGroupNodes - */ - unhideGroupNodes(graph:yfiles.layout.LayoutGraph):void; - /** - * Gets or sets whether or not empty group nodes, i.e., group nodes without children, will be hidden by this stage. - * @type {boolean} - */ - hidingEmptyGroupNodes:boolean; - /** - * Gets or sets the {@link yfiles.layout.IGroupBoundsCalculator} instance for calculating the sizes of group nodes. - *

- * For every group which is in its open state, the {@link yfiles.layout.IGroupBoundsCalculator} will be asked to calculate the - * bounds for the group's child nodes. The resulting size will be used during the ongoing layout calculation. - *

- * @type {yfiles.layout.IGroupBoundsCalculator} - */ - groupBoundsCalculator:yfiles.layout.IGroupBoundsCalculator; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.HideGroupsStage; - } - /** - * A {@link yfiles.layout.IGroupBoundsCalculator} is responsible for calculating the bounds of a group node during a layout - * process. - * @interface - */ - export interface IGroupBoundsCalculator extends yfiles.lang.Object{ - /** - * Calculates the bounds of the given group node that contains the given list of child nodes. - *

- * This method is called during the layout process. - *

- * @param graph the input graph - * @param groupNode the group node whose bounds will be calculated - * @param children a {@link } containing the nodes that reside inside the group node - * @returns a {@link } instance that describes the bounds of the group node - * @abstract - */ - calculateBounds(graph:yfiles.layout.LayoutGraph,groupNode:yfiles.algorithms.Node,children:yfiles.algorithms.NodeList):yfiles.algorithms.Rectangle2D; - } - var IGroupBoundsCalculator:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.IGroupBoundsCalculator; - }; - /** - * This {@link yfiles.layout.IGroupBoundsCalculator} calculates the bounds of group nodes and allows to specify custom insets for - * each group node. - *

- * {@link yfiles.algorithms.Insets Insets} are provided by a {@link yfiles.algorithms.IDataProvider} that must have been registered with the graph using the - * specified {@link yfiles.layout.InsetsGroupBoundsCalculator#groupNodeInsetsDpKey insets key} prior to the invocation of the layout algorithm. - *

- * @class - * @implements {yfiles.layout.IGroupBoundsCalculator} - */ - export interface InsetsGroupBoundsCalculator extends yfiles.lang.Object,yfiles.layout.IGroupBoundsCalculator{} - export class InsetsGroupBoundsCalculator { - /** - * Constructs an instance of {@link yfiles.layout.InsetsGroupBoundsCalculator} using the given {@link yfiles.algorithms.IDataProvider} key - * as {@link yfiles.layout.InsetsGroupBoundsCalculator#groupNodeInsetsDpKey group node insets key} and the given insets as {@link yfiles.layout.InsetsGroupBoundsCalculator#defaultInsets default insets}. - * @param [groupNodeInsetsDPKey=null] the {@link } key to use as {@link #groupNodeInsetsDpKey insets key} - * @param [defaultInsets=null] the insets to use as {@link #defaultInsets default insets} - */ - constructor(groupNodeInsetsDPKey?:any,defaultInsets?:yfiles.algorithms.Insets); - /** - * Constructs an instance of {@link yfiles.layout.InsetsGroupBoundsCalculator} using the given {@link yfiles.algorithms.IDataProvider} key - * as {@link yfiles.layout.InsetsGroupBoundsCalculator#groupNodeInsetsDpKey group node insets key} and the given insets as {@link yfiles.layout.InsetsGroupBoundsCalculator#defaultInsets default insets}. - * @param {Object} options The parameters to pass. - * @param [options.groupNodeInsetsDPKey=null] the {@link } key to use as {@link #groupNodeInsetsDpKey insets key} - * @param [options.defaultInsets=null] the insets to use as {@link #defaultInsets default insets} - */ - constructor(options:{groupNodeInsetsDPKey?:Object,defaultInsets?:yfiles.algorithms.Insets}); - /** - * Calculates the bounds of the given group node and enlarges the bounds by the insets associated with the group node. - *

- * The {@link yfiles.algorithms.Insets insets} associated with the group node will be retrieved from a {@link yfiles.algorithms.IDataProvider} registered with the - * graph with the current {@link yfiles.layout.InsetsGroupBoundsCalculator#groupNodeInsetsDpKey insets key}. - *

- * @param graph the input graph - * @param groupNode the group node whose bounds will be calculated - * @param children a {@link } containing the nodes that reside inside the group node - * @returns a {@link } instance that describes the bounds of the group node - */ - calculateBounds(graph:yfiles.layout.LayoutGraph,groupNode:yfiles.algorithms.Node,children:yfiles.algorithms.NodeList):yfiles.algorithms.Rectangle2D; - /** - * Enlarges the given graph bounds by the insets associated with the given group node. - *

- * The {@link yfiles.algorithms.Insets insets} associated with the group node will be retrieved from a {@link yfiles.algorithms.IDataProvider} registered with the - * graph with the current {@link yfiles.layout.InsetsGroupBoundsCalculator#groupNodeInsetsDpKey insets key}. - *

- *

- * This method is called while {@link yfiles.layout.InsetsGroupBoundsCalculator#calculateBounds calculating the group bounds} to realize the support for custom insets. It may be overridden - * to change the way specific insets influence the group node bounds. - *

- * @param graph the input graph - * @param groupNode the group node whose bounds should be enlarged - * @param children the list of nodes that the given group node contains - * @param bounds a {@link } instance representing the bounds of the given group node - * @returns a {@link } instance representing the enlarged bounds of the given group node - */ - createEnlargedBounds(graph:yfiles.layout.LayoutGraph,groupNode:yfiles.algorithms.Node,children:yfiles.algorithms.NodeList,bounds:yfiles.algorithms.Rectangle2D):yfiles.algorithms.Rectangle2D; - /** - * Gets or sets whether or not the labels of nodes contained in a group are considered while calculating the bounds of the - * group node. - * @type {boolean} - */ - considerNodeLabels:boolean; - /** - * Gets or sets whether or not the labels of edges contained in a group are considered while calculating the bounds of the - * group node. - * @type {boolean} - */ - considerEdgeLabels:boolean; - /** - * Gets or sets whether or not the calculation of the bounds of a group node considers the {@link yfiles.layout.NodeHalo NodeHalos} associated with the - * group's child nodes. - * @type {boolean} - */ - considerNodeHalos:boolean; - /** - * Gets or sets the default insets that will be used if the {@link yfiles.algorithms.IDataProvider} registered with the {@link yfiles.layout.InsetsGroupBoundsCalculator#groupNodeInsetsDpKey insets key} - * does not contain a mapping for a specific node. - * @type {yfiles.algorithms.Insets} - */ - defaultInsets:yfiles.algorithms.Insets; - /** - * Gets or sets the key to register a {@link yfiles.algorithms.IDataProvider} that is used to access the insets for the group - * nodes. - *

- * The {@link yfiles.algorithms.IDataProvider} registered with this key must provide a mapping from each group node to a {@link yfiles.algorithms.Insets} - * (or {@link yfiles.algorithms.Insets}) instance. - *

- * @type {any} - */ - groupNodeInsetsDpKey:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.InsetsGroupBoundsCalculator; - } - /** - * A special {@link yfiles.layout.ComponentLayout} implementation that allows to lay out isolated subgraphs within a group as - * separate components. - *

- * {@link yfiles.orthogonal.OrthogonalLayout OrthogonalLayout} uses this layout stage to arrange components. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":0},"n":[[-5,16,210,336.38,2],[10,110,1],[10,35,1],[85,35,1],[160,35,1],[160,110,1],[10,285],[85,285],[85,210]],"e":[[1,2,0,-15,0,15],[2,3,15,0,-15,0],[3,4,15,0,-15,0],[4,5,0,15,0,-15],[5,1,-15,0,15,0],[6,8,0,-15,-15,0,[25,225]],[8,7,0,15,0,-15],[7,6,-15,0,15,0]],"vp":[-5.0,16.0,210.0,337.0]}} Example of a hierarchically grouped graph with two components that are laid out by {@link yfiles.orthogonal.OrthogonalLayout OrthogonalLayout} as separate - * components. - *

- * @class - * @extends {yfiles.layout.ComponentLayout} - */ - export interface IsolatedGroupComponentLayout extends yfiles.layout.ComponentLayout{} - export class IsolatedGroupComponentLayout { - /** - * Creates an instance of {@link yfiles.layout.IsolatedGroupComponentLayout} with the given layout algorithm as - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [coreLayouter=null] the core layout algorithm that will be invoked for each component of the graph - */ - constructor(coreLayouter?:yfiles.layout.ILayoutAlgorithm); - /** - * Determines the nodes that belong to the same graph component. - *

- * Unlike - * {@link yfiles.layout.ComponentLayout}, this implementation additionally identifies isolated subgraphs within a group as separate - * components. - *

- * @param graph the input graph - * @param compNumber the {@link } that will be filled by the layout algorithm, such that it contains the zero-based index - * of the component number to which each node belongs - * @returns the number of separate components - * @protected - */ - findIsolatedGraphComponents(graph:yfiles.layout.LayoutGraph,compNumber:yfiles.algorithms.INodeMap):number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.IsolatedGroupComponentLayout; - } - /** - * This {@link yfiles.layout.IGroupBoundsCalculator} allows custom insets for group nodes and guarantees that their provided - * minimum sizes will be maintained. - *

- * As a subclass of {@link yfiles.layout.InsetsGroupBoundsCalculator}, this class supports custom insets for each group node. - * Furthermore, it guarantees that a desired minimum size is maintained. The minimum sizes are provided by a {@link yfiles.algorithms.IDataProvider} - * registered with the graph using the specified {@link yfiles.layout.MinimumSizeGroupBoundsCalculator#minimumNodeSizeDpKey minimum node size key}. - *

- * @class - * @extends {yfiles.layout.InsetsGroupBoundsCalculator} - */ - export interface MinimumSizeGroupBoundsCalculator extends yfiles.layout.InsetsGroupBoundsCalculator{} - export class MinimumSizeGroupBoundsCalculator { - /** - * Creates a new instance of {@link yfiles.layout.MinimumSizeGroupBoundsCalculator} with the given key as {@link yfiles.layout.MinimumSizeGroupBoundsCalculator#minimumNodeSizeDpKey minimum node size key}. - * @param minSizeDataProviderKey the {@link } key to use as {@link #minimumNodeSizeDpKey minimum size key} - */ - constructor(minSizeDataProviderKey:any); - /** - * Creates a new instance of {@link yfiles.layout.MinimumSizeGroupBoundsCalculator} with default settings. - */ - constructor(); - /** - * Gets or sets how the nodes are resized horizontally if the calculated width is smaller than the preferred minimum width - * of a group node. - *

- * The alignment is defined to be a value between 0 and 1, such that: - *

- *
    - *
  • A value of 0 means that the nodes grow to the right while the left border remains unchanged.
  • - *
  • A value of 1 means that the nodes grow to the left while the right border remains unchanged.
  • - *
- * @throws {Stubs.Exceptions.ArgumentError} if the given value does not lie within [0,1] - * @type {number} - */ - xAlignment:number; - /** - * Gets or sets how the nodes are resized vertically if the calculated height is smaller than the preferred minimum height - * of a group node. - *

- * The alignment is defined to be a value between 0 and 1, such that: - *

- *
    - *
  • A value of 0 means that the nodes grow downwards while the top border remains unchanged.
  • - *
  • A value of 1 means that the nodes grow upwards while the bottom border remains unchanged.
  • - *
- * @throws {Stubs.Exceptions.ArgumentError} if the given value does not lie within [0,1] - * @type {number} - */ - yAlignment:number; - /** - * Gets or sets the key to register a {@link yfiles.algorithms.IDataProvider} that is used to access the minimum sizes for the - * group nodes. - *

- * The {@link yfiles.algorithms.IDataProvider} registered with this key must provide a mapping from each group node to a {@link yfiles.algorithms.YDimension} - * object defining the minimum width and height of the group node. - *

- * @see yfiles.layout.MinimumSizeGroupBoundsCalculator#defaultMinimumNodeSize - * @type {any} - */ - minimumNodeSizeDpKey:any; - /** - * Gets or sets the default minimum size (width and height) for group nodes. - *

- * The default minimum size is used if the {@link yfiles.algorithms.IDataProvider} registered with the {@link yfiles.layout.MinimumSizeGroupBoundsCalculator#minimumNodeSizeDpKey minimum size key} does not - * contain a mapping for a group node. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given {@link yfiles.algorithms.YDimension} is null - * @see yfiles.layout.MinimumSizeGroupBoundsCalculator#minimumNodeSizeDpKey - * @type {yfiles.algorithms.YDimension} - */ - defaultMinimumNodeSize:yfiles.algorithms.YDimension; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.MinimumSizeGroupBoundsCalculator; - } - /** - * This layout algorithm recursively traverses a hierarchically organized graph in a bottom-up fashion and applies a - * specified layout algorithm to the contents (direct children) of each group node. - *

- * Layout Style The way a graph is arranged depends on the {@link yfiles.layout.ILayoutAlgorithm layout algorithms} which are applied to the different group nodes. {@link yfiles.layout.RecursiveGroupLayout} - * is able to produce different layout styles for the content of each group node. - *

- *

- * This layout algorithm can be either applied if a {@link yfiles.layout.ILayoutAlgorithm layout algorithm} cannot handle grouped graphs by itself or if the - * content of (some) group nodes should be arranged differently. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"styles":{"6":{"c":1}},"n":[[-17.5,755,335,340,2],[166.25,770],[247.5,840],[85,840],[172.5,910],[272.5,910],[72.5,910],[272.5,980],[222.5,910],[97.5,980],[47.5,980],[-2.5,910],[147.5,980],[122.5,1050],[172.5,1050],[197.5,980],[-2.5,980],[-2.5,1050],[929.97,593,673.03,664,2],[1028.43,230.79,493.13,238.42,2],[1451.74,249.79,54.83,54.83],[1043.43,336.11,54.83,54.83],[1376.74,346.07],[1143.26,334.82],[1223.95,267.93,37.09,37.09],[1223.95,335.02,37.09,37.09],[1223.95,402.12,37.09,37.09],[1306.05,338.57],[351.41,46.3,547.17,607.39,2],[392.91,738,464.18,374,2],[600.69,849.79,44.43,44.43],[803.73,927.82,38.37,38.37],[600.69,1024.79,44.43,44.43],[707.91,932],[707.91,1032],[507.91,757],[503.73,852.82,38.37,38.37],[407.91,857],[1329,1038,6],[1269,795,6],[1472,612,6],[1411,1025,6],[1427,744,6],[1355,779,6],[1157,888,6],[1108,838,6],[1230,723,6],[1351,946,6],[1185,810,6],[1387,847,6],[1185,956,6],[1221,1212,6],[1311,715,6],[962,988,6],[1558,700,6],[1053,639,6],[1264,993,6],[1509,1121,6],[1143,742,6],[1453,871,6],[1248,1077,6],[1430,943,6],[1093,947,6],[1173,1025,6],[1249.93,858.93,83.14,83.14,6],[406.42,266.45,6],[535.29,224.58,6],[407.4,568.81,54.23,54.23,6],[366.41,92.7,54.23,54.23,6],[464.05,443.83,6],[450.74,65.3,54.23,54.23,6],[464.05,224.58,6],[592.93,401.96,6],[714.87,571.77,41.35,41.35,6],[842.24,530.39,41.35,41.35,6],[793.59,463.42,41.35,41.35,6],[793.59,597.35,41.35,41.35,6],[614.94,334.2,6],[535.29,443.83,6],[714.87,489,41.35,41.35,6],[406.42,401.96,6],[592.93,266.45,6],[384.4,334.2,6],[595.06,86,54.23,54.23,6],[668.28,135.99,54.23,54.23,6],[720.4,207.72,54.23,54.23,6],[745.32,292.81,54.23,54.23,6]],"e":[[1,2],[1,3],[3,4],[2,5],[3,6],[5,7],[2,8],[6,9],[6,10],[3,11],[4,12],[12,13],[12,14],[4,15],[11,16],[16,17],[0,19,0,-170,0,-119.21,[150,0,1275,0]],[21,22,27.41,13.71,-15,7.5,[1108.26,377.23,1158.26,454.21,1336.05,454.21,1361.74,368.57]],[22,20,15,-0,-27.41,18.28,[1416.74,361.07,1436.74,295.48]],[21,23,27.41,-13.71,-15,-0],[23,20,15,-11.25,-27.41,-18.28,[1183.26,338.57,1208.95,252.93,1391.74,252.93,1436.74,258.93]],[23,24,15,-3.75,-18.55,-0,[1183.26,346.07,1208.95,286.48]],[24,20,18.55,-9.27,-27.41,-0],[23,25,15,3.75,-18.55,-0],[23,26,15,11.25,-18.55,-0,[1183.26,361.07,1208.95,420.66]],[25,27,18.55,-0,-15,-0],[24,27,18.55,9.27,-15,-10,[1271.05,295.75,1291.05,343.57]],[26,27,18.55,-0,-15,10,[1271.05,420.66,1291.05,363.57]],[27,22,15,-0,-15,-7.5],[29,28,0,-187,0,303.7],[31,30,0,-19.18,22.21,0,[822.91,872]],[31,32,0,19.18,0,22.21,[822.91,1097,622.91,1097]],[2,32],[32,30,0,-22.21,0,22.21],[31,33,-19.18,0,15,0],[33,32,-15,0,12.5,-22.21,[635.41,947]],[33,34,0,15,0,-15],[34,32,-15,0,22.21,0],[34,31,15,0,-12.5,19.18,[810.41,1047]],[35,30,15,0,0,-22.21,[622.91,772]],[35,36,0,15,0,-19.18],[32,36,-22.21,-12.5,0,19.18,[522.91,1034.5]],[36,30,19.18,0,-22.21,0],[36,37,-19.18,0,15,0],[32,37,-22.21,0,0,15,[422.91,1047]],[37,35,0,-15,-15,0,[422.91,772]],[42,40],[42,54],[41,57],[58,55],[60,51],[62,53],[64,38],[64,39],[64,41,[1330.6,964.06,1337.99,974.52,1346.6,984.13,1356.64,992.4]],[64,42,[1301.28,892.93,1380.34,828.69,1390.42,819.61,1400.14,810]],[64,43],[64,44],[64,45],[64,46,[1257.8,823.49,1254.58,812.63,1252.57,801.6]],[64,47],[64,48],[64,49],[64,50],[64,52,[1313.2,816.82,1315.29,805.72]],[64,56],[64,58,[1227.75,807.43,1218.48,798.12,1198.26,783.57]],[64,59,[1401.91,896.21,1413.4,895.03]],[64,60,[1249.83,992.24,1246.96,1005.02,1247.3,1018.2]],[64,61],[64,62],[64,63],[40,19],[69,67],[65,71],[66,71],[71,70],[71,69],[71,68],[72,21],[73,74],[75,74],[73,76],[74,76],[77,72],[77,71],[71,78],[78,72],[78,69],[72,79],[79,75],[79,73],[69,80],[72,80],[66,81],[81,77],[65,82],[82,81],[82,80],[82,77],[83,81],[84,81],[85,81],[86,81],[51,33]],"vp":[-18.0,0.0,1621.0,1257.0]}}Concept - *

- *

- * {@link yfiles.layout.RecursiveGroupLayout} uses a hierarchy tree representation of the grouped graph in which the content nodes - * are the children of their containing group node. That way, it can traverse the tree recursively while arranging only the - * direct children of each group node. The layout algorithm starts by arranging the leaves in the hierarchy tree, then - * works its way up to the root computing the layout for each group node in the tree. - *

- *

- * All nodes other than the direct children are temporarily hidden. The layout algorithm performs two steps for each group - * node. - *

- *
    - *
  1. - * It arranges the direct children using either the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} or a special layout algorithm retrieved from a {@link yfiles.algorithms.IDataProvider} - * registered with - * {@link yfiles.layout.RecursiveGroupLayout#GROUP_NODE_LAYOUT_DP_KEY}. The content of group nodes among the children is already - * arranged at this time and will be ignored. These group nodes are handled like normal nodes with a size that encloses the - * content. - *
  2. - *
  3. - * Then {@link yfiles.layout.RecursiveGroupLayout} computes the final size of the group node using an implementation of - * {@link yfiles.layout.IGroupBoundsCalculator}. Customized {@link yfiles.layout.IGroupBoundsCalculator}s can be specified using - * {@link yfiles.layout.RecursiveGroupLayout#groupBoundsCalculator}. Aside from the resulting layout, this size is used in the following iteration. - *
  4. - *
- *

- * After a layout is applied to all group nodes, the layout algorithm computes routes for the edges whose source node is - * located at a different hierarchy level than its target node. The edge routing algorithm for these so-called inter-edges - * can be {@link yfiles.layout.RecursiveGroupLayout#interEdgeRouter customized}. - *

- *

- * Note that {@link yfiles.layout.RecursiveGroupLayout} can run without a - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. In this case no layout is calculated, instead the group node bounds are merely adjusted to fit - * their respective contents. - *

- *

- * Features There are two alternatives for applying different layout styles to the contents of group nodes: - *

- *
    - *
  1. - * Mapping each group node to a corresponding {@link yfiles.layout.ILayoutAlgorithm layout algorithm} by registering a {@link yfiles.algorithms.IDataProvider} with key - * {@link yfiles.layout.RecursiveGroupLayout#GROUP_NODE_LAYOUT_DP_KEY}. The content of the hierarchy root is arranged with the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *
  2. - *
  3. Using {@link yfiles.layout.LayoutMultiplexer} as {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}.
  4. - *
- *

- * Since {@link yfiles.layout.RecursiveGroupLayout} delegates the actual arrangement of the graph to other layout algorithms, it - * will support the same features as the currently used layout algorithm. - *

- *

- * The improvement of the routing of inter-edges is based on the {@link yfiles.layout.RecursiveGroupLayout#autoAssignPortCandidates insertion} of {@link yfiles.layout.PortCandidate}s or the {@link yfiles.layout.RecursiveGroupLayout#replacePortConstraints conversion} - * of {@link yfiles.layout.PortConstraint}s into {@link yfiles.layout.PortCandidate}s. Hence, they only work well if the applied layout - * algorithm supports {@link yfiles.layout.PortCandidate}s. - *

- *

- * This algorithm also provides a {@link yfiles.layout.RecursiveGroupLayout#fromSketchMode From Sketch mode} that should be activated if the applied layout algorithm runs in From - * Sketch mode, too. Otherwise, the initial coordinates may not be considered correctly. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface RecursiveGroupLayout extends yfiles.layout.LayoutStageBase{} - export class RecursiveGroupLayout { - /** - * Creates a new instance of {@link yfiles.layout.RecursiveGroupLayout} with default settings using the given {@link yfiles.layout.ILayoutAlgorithm layout algorithm} and - * {@link yfiles.layout.IGroupBoundsCalculator} implementation. - * @param core the layout algorithm that is applied in each step of the recursion - * @param gbc the {@link } for calculating group sizes - */ - constructor(core:yfiles.layout.ILayoutAlgorithm,gbc:yfiles.layout.IGroupBoundsCalculator); - /** - * Creates a new instance of {@link yfiles.layout.RecursiveGroupLayout} with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [core=null] The layout algorithm that is applied in each recursion step. - */ - constructor(core?:yfiles.layout.ILayoutAlgorithm); - /** - * Reroutes the given inter-edges using the current {@link yfiles.layout.RecursiveGroupLayout#interEdgeRouter edge routing algorithm}. - *

- * This method is called after calculating the overall layout when the positions of all nodes and normal edges are fixed. - *

- *

- * If no {@link yfiles.layout.RecursiveGroupLayout#interEdgeRouter inter-edge router} is specified, this method {@link yfiles.layout.LayoutGraphUtilities#resetPath resets the path} of all inter-edges that don't connect to the proper - * location within the group. This may happen for inter-edges without - * {@link yfiles.layout.PortCandidate}s or if the applied layout algorithm doesn't support such constraints. - *

- * @param graph the input graph - * @param interEdges the edges which traverse the boundary of a group node - * @see yfiles.layout.RecursiveGroupLayout#autoAssignPortCandidates - * @see yfiles.layout.RecursiveGroupLayout#replacePortConstraints - * @see yfiles.layout.RecursiveGroupLayout#interEdgeRouter - * @protected - */ - routeInterEdges(graph:yfiles.layout.LayoutGraph,interEdges:yfiles.algorithms.EdgeList):void; - /** - * Data provider key for arranging the content of each group node with an individual layout algorithm - *

- * The specified layouter instance is applied to the content of the group node. To arrange the top level elements the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} - * is used. - *

- * @see yfiles.layout.RecursiveGroupLayout#NULL_LAYOUT - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static GROUP_NODE_LAYOUT_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for assigning source split ids to edges connecting to group nodes - *

- * The edges will be aligned with edges that connect to the same group node and have the same split id at their source - * (preferably) or target. - *

- * @see yfiles.layout.RecursiveGroupLayout#TARGET_SPLIT_ID_DP_KEY - * @see yfiles.hierarchic.HierarchicLayout - * @see yfiles.hierarchic.EdgeLayoutDescriptor#directGroupContentEdgeRouting - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static SOURCE_SPLIT_ID_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for assigning target split ids to edges connecting to group nodes - *

- * The edges will be aligned with edges that connect to the same group node and have the same split id at their source or - * target (preferably). - *

- * @see yfiles.layout.RecursiveGroupLayout#SOURCE_SPLIT_ID_DP_KEY - * @see yfiles.hierarchic.HierarchicLayout - * @see yfiles.hierarchic.EdgeLayoutDescriptor#directGroupContentEdgeRouting - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static TARGET_SPLIT_ID_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * A constant that represents a {@link yfiles.layout.ILayoutAlgorithm} implementation that does nothing. - *

- * This implementation can be assigned to group nodes to keep their content unchanged. The layout algorithm will still - * calculate the sizes of the group nodes. - *

- * @const - * @static - * @type {yfiles.layout.ILayoutAlgorithm} - */ - static NULL_LAYOUT:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets whether or not to consider the initial coordinates of the graph elements. - *

- * When using the initial coordinates, {@link yfiles.layout.RecursiveGroupLayout} sets the coordinates of the nodes to their - * initial position before the corresponding {@link yfiles.layout.ILayoutAlgorithm layout algorithm} is called. - *

- * @type {boolean} - */ - fromSketchMode:boolean; - /** - * Gets or sets whether or not temporary {@link yfiles.layout.PortCandidate}s are inserted to improve the routing of inter-edges. - *

- * If enabled, {@link yfiles.layout.RecursiveGroupLayout} will insert {@link yfiles.layout.PortCandidate}s for all inter-edges that cross a - * group node border. Those {@link yfiles.layout.PortCandidate}s are located at the relative position of the real source/target - * node. Inter-edges that connect to such {@link yfiles.layout.PortCandidate}s will be routed when the layout of the containing - * group node is calculated and will not be {@link yfiles.layout.RecursiveGroupLayout#routeInterEdges rerouted} later. This may produce more suitable edge routes but cannot prevent - * edges from crossing nodes. - *

- *

- * Without temporary or user specified {@link yfiles.layout.PortCandidate}s, inter-edges will always end at the border/center of - * the corresponding group node. Thus, they are rerouted afterwards using an {@link yfiles.layout.RecursiveGroupLayout#interEdgeRouter edge routing algorithm}. - *

- * @see yfiles.layout.RecursiveGroupLayout#routeInterEdges - * @see yfiles.layout.RecursiveGroupLayout#interEdgeRouter - * @see yfiles.layout.PortCandidate - * @type {boolean} - */ - autoAssignPortCandidates:boolean; - /** - * Gets or sets whether or not {@link yfiles.layout.PortConstraint}s of inter-edges are temporarily replaced by - * {@link yfiles.layout.PortCandidate}s. - *

- * If disabled, inter-edges will always end at the border/center of the corresponding group node, even if those edges have - * port constraints. Thus, they are {@link yfiles.layout.RecursiveGroupLayout#routeInterEdges rerouted} later without considering the constraint. Enabling this settings may produce - * more suitable edge routes but cannot prevent edges from crossing nodes. - *

- *

- * Port candidates are automatically redirected to their original location. Hence, enabling this option may produce more - * suitable edge routes if the layout algorithm applied to the content of a group node can handle port candidates. - *

- * @see yfiles.layout.RecursiveGroupLayout#routeInterEdges - * @see yfiles.layout.PortCandidate - * @type {boolean} - */ - replacePortConstraints:boolean; - /** - * Gets or sets whether empty group nodes are handled like group nodes with content or like normal nodes. - *

- * If they are handled like other group nodes, {@link yfiles.layout.RecursiveGroupLayout} will resize them according to their - * (non-existing) content. This results in small empty group nodes. Handled like normal nodes, empty group nodes will keep - * their initial size. - *

- * @type {boolean} - */ - considerEmptyGroups:boolean; - /** - * Gets or sets the current edge routing algorithm for handling inter-edges. - *

- * During layout, edges that connect from outside a group node to the content inside (inter-edges) are temporarily - * connected to the group node itself. Hence, these edges have to be routed after restoring the original graph structure - * using this edge routing algorithm. - *

- *

- * It is required that a suitable {@link yfiles.layout.RecursiveGroupLayout#interEdgesDpKey selection key} is specified. The same selection key must be used for setting the sphere of - * action for the edge router. - *

- * @see yfiles.layout.RecursiveGroupLayout#interEdgesDpKey - * @type {yfiles.layout.ILayoutAlgorithm} - */ - interEdgeRouter:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets the key for marking the inter-edges to be routed. - *

- * The key should be used by the specified {@link yfiles.layout.RecursiveGroupLayout#interEdgeRouter inter-edge routing algorithm} to obtain the edges to be routed. This layouter - * automatically marks these edges and registers the {@link yfiles.algorithms.IDataProvider} using the specified key. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified key is null - * @see yfiles.layout.RecursiveGroupLayout#interEdgeRouter - * @type {any} - */ - interEdgesDpKey:any; - /** - * Gets or sets a {@link yfiles.layout.IGroupBoundsCalculator} which computes the sizes of all group nodes. - *

- * This {@link yfiles.layout.IGroupBoundsCalculator} is used each time after calculating the layout for a content graph. - *

- * @type {yfiles.layout.IGroupBoundsCalculator} - */ - groupBoundsCalculator:yfiles.layout.IGroupBoundsCalculator; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.RecursiveGroupLayout; - } - /** - * A {@link yfiles.layout.ILayoutStage} that temporarily removes all nodes and edges with NaN-coordinates. - *

- * This layout stage may be necessary when a {@link yfiles.layout.ILayoutAlgorithm} takes the initial coordinates into account. In - * this case initial coordinates containing NaN-values, can cause exceptions or strange results. - *

- *

- * Layouters that consider initial coordinates: - *

- *
    - *
  • {@link yfiles.hierarchic.HierarchicLayout} in incremental mode
  • - *
  • {@link yfiles.orthogonal.OrthogonalLayout} with activated from sketch drawing
  • - *
  • {@link yfiles.organic.OrganicLayout} for a subset of nodes
  • - *
  • {@link yfiles.tree.TreeLayout} when using a from sketch comparator.
  • - *
  • {@link yfiles.tree.BalloonLayout} in incremental mode
  • - *
  • {@link yfiles.partial.PartialLayout}
  • - *
  • - * all edge routing algorithms: {@link yfiles.router.EdgeRouter}, {@link yfiles.router.ChannelEdgeRouter}, {@link yfiles.router.BusRouter}, - * {@link yfiles.router.OrganicEdgeRouter} - *
  • - *
- *

- * Since this stage only hides the invalid graph elements and doesn't apply any new coordinates, it is not defined where - * those nodes and edges will be placed within the calculated layout. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface HandleNaNCoordinatesStage extends yfiles.layout.LayoutStageBase{} - export class HandleNaNCoordinatesStage { - constructor(); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.HandleNaNCoordinatesStage; - } - /** - * {@link yfiles.layout.IEdgeLabelLayout} defines the properties of one edge label from the perspective of a labeling algorithm. - *

- * Note: To avoid inconsistencies, changing the {@link yfiles.layout.ILabelLayout#modelParameter model parameter} should always be combined with updating the corresponding - * {@link yfiles.layout.ILabelLayout#orientedBox oriented box}. - *

- * @interface - * @implements {yfiles.layout.ILabelLayout} - */ - export interface IEdgeLabelLayout extends yfiles.lang.Object,yfiles.layout.ILabelLayout{ - /** - * Gets the label model that describes the valid locations for this label. - * @abstract - * @type {yfiles.layout.IEdgeLabelLayoutModel} - */ - labelModel:yfiles.layout.IEdgeLabelLayoutModel; - /** - * Gets the preferred placement for this edge label, which can be considered by {@link yfiles.layout.ILayoutAlgorithm layout algorithms}. - * @abstract - * @type {yfiles.layout.PreferredPlacementDescriptor} - */ - preferredPlacementDescriptor:yfiles.layout.PreferredPlacementDescriptor; - } - var IEdgeLabelLayout:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.IEdgeLabelLayout; - }; - /** - * This interface defines the properties of the model associated with an {@link yfiles.layout.IEdgeLabelLayout}. - *

- * An {@link yfiles.layout.IEdgeLabelLayoutModel} provides a set of possible candidates for the placement of an edge label. It also defines a - * parameter that describes the current location of the label. - *

- *

- * It is important that all state information is encapsulated in the {@link yfiles.layout.IEdgeLabelLayoutModel#createModelParameter model parameter}. {@link yfiles.layout.IEdgeLabelLayoutModel} - * instances may be shared between multiple edge labels but produce different parameters for labels with different - * locations. - *

- * @interface - */ - export interface IEdgeLabelLayoutModel extends yfiles.lang.Object{ - /** - * Creates a model parameter that represents the given edge label position within this model. - *

- * The created model parameter is the closest parameter representation of the given label location that can be achieved - * within this model. - *

- *

- * This parameter can be passed to {@link yfiles.layout.IEdgeLabelLayoutModel#getLabelPlacement} to retrieve the current label - * box. - *

- *

- * A model parameter can be an arbitrary {@link any}. However it must contain all information to allow restoring of the encoded - * location with this {@link yfiles.layout.IEdgeLabelLayoutModel}. - *

- * @param labelBounds the oriented box of the label, encoding the label location for which the parameter should be created - * @param edgeLayout the layout of the edge to which the label belongs - * @param sourceLayout the layout of the source node of the label-owning edge - * @param targetLayout the layout of the target node of the label-owning edge - * @returns the model parameter representing the given label location - * @see yfiles.layout.IEdgeLabelLayoutModel#getLabelPlacement - * @abstract - */ - createModelParameter(labelBounds:yfiles.algorithms.YOrientedRectangle,edgeLayout:yfiles.layout.IEdgeLayout,sourceLayout:yfiles.layout.INodeLayout,targetLayout:yfiles.layout.INodeLayout):any; - /** - * Returns all {@link yfiles.layout.EdgeLabelCandidate}s that describe valid label positions within this model. - *

- * In case the implementing {@link yfiles.layout.IEdgeLabelLayoutModel} allows every possible location, this method always returns - * the current location as a {@link yfiles.layout.LabelCandidate}. - *

- * @param labelLayout the label for which candidates should be generated - * @param edgeLayout the layout of the edge to which the label belongs - * @param sourceLayout the layout of the source node of the label-owning edge - * @param targetLayout the layout of the target node of the label-owning edge - * @returns a list of {@link } instances - * @abstract - */ - getLabelCandidates(labelLayout:yfiles.layout.IEdgeLabelLayout,edgeLayout:yfiles.layout.IEdgeLayout,sourceLayout:yfiles.layout.INodeLayout,targetLayout:yfiles.layout.INodeLayout):yfiles.algorithms.YList; - /** - * Returns the oriented box of the label for the position encoded by the given model parameter. - * @param labelSize the width and height of the label - * @param edgeLayout the layout of the edge to which the label belongs - * @param sourceLayout the layout of the source node of the label-owning edge - * @param targetLayout the layout of the target node of the label-owning edge - * @param parameter the model parameter that describes the abstract position of the label within this model - * @returns the oriented bounds of the label - * @abstract - */ - getLabelPlacement(labelSize:yfiles.algorithms.YDimension,edgeLayout:yfiles.layout.IEdgeLayout,sourceLayout:yfiles.layout.INodeLayout,targetLayout:yfiles.layout.INodeLayout,parameter:any):yfiles.algorithms.YOrientedRectangle; - /** - * Gets a model parameter that encodes the default position of this model's allowed edge label positions. - *

- * This parameter can be passed to {@link yfiles.layout.IEdgeLabelLayoutModel#getLabelPlacement} to retrieve the corresponding - * label box. - *

- * @abstract - * @type {any} - */ - defaultParameter:any; - } - var IEdgeLabelLayoutModel:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.IEdgeLabelLayoutModel; - }; - /** - * An {@link yfiles.layout.IEdgeLayout} encapsulates the layout information for an edge. - *

- * The layout information consists of the two end points of the edge layout and a sequence of control points that determine - * the visual path of the edge. - *

- * @interface - */ - export interface IEdgeLayout extends yfiles.lang.Object{ - /** - * Adds a control point to the end of the control point sequence. - * @param x the absolute x-coordinate of the new control point - * @param y the absolute y-coordinate of the new control point - * @abstract - */ - addPoint(x:number,y:number):void; - /** - * Removes all control points from this edge layout. - *

- * The {@link yfiles.layout.IEdgeLayout} still keeps the {@link yfiles.layout.IEdgeLayout#sourcePoint source point} and the {@link yfiles.layout.IEdgeLayout#targetPoint target point}. - *

- * @abstract - */ - clearPoints():void; - /** - * Returns the control point at the given position in the sequence of control points. - *

- * The first control point in the sequence has index 0 and the last control point has index {@link yfiles.layout.IEdgeLayout#pointCount} - * -1. - *

- * @param index the position of the control point in the control point sequence - * @returns the absolute coordinates of the control point at the given index - * @see yfiles.layout.IEdgeLayout#setPoint - * @abstract - */ - getPoint(index:number):yfiles.algorithms.YPoint; - /** - * Returns the number of control points of the edge. - *

- * The source and target points are not included in the point count. - *

- * @returns the number of control points - * @abstract - */ - pointCount():number; - /** - * Sets the absolute coordinates of the control point at the given position in the sequence of control points. - *

- * The first control point in the sequence has index 0 and the last control point has index {@link yfiles.layout.IEdgeLayout#pointCount} - * -1. - *

- * @param index the position of the changing control point in the sequence - * @param x the new absolute x-coordinate of the control point at the given index - * @param y the new absolute y-coordinate of the control point at the given index - * @abstract - */ - setPoint(index:number,x:number,y:number):void; - /** - * Gets or sets the relative coordinates of the first end point of this layout. - *

- * These coordinates are relative to the center location of the edge's source node. To obtain the absolute coordinates of - * the end point, the relative coordinates have to be added to the center coordinates of the source - * {@link yfiles.layout.INodeLayout}. - *

- * @see yfiles.layout.LayoutGraph#getCenterX - * @see yfiles.layout.LayoutGraph#getCenterY - * @see yfiles.layout.INodeLayout#x - * @see yfiles.layout.INodeLayout#y - * @abstract - * @type {yfiles.algorithms.YPoint} - */ - sourcePoint:yfiles.algorithms.YPoint; - /** - * Gets or sets the relative coordinates of the second end point of this layout. - *

- * These coordinates are relative to the center location of the edge's target node. To obtain the absolute coordinates of - * the end point, the relative coordinates have to be added to the center coordinates of the target - * {@link yfiles.layout.INodeLayout}. - *

- * @see yfiles.layout.LayoutGraph#getCenterX - * @see yfiles.layout.LayoutGraph#getCenterY - * @see yfiles.layout.INodeLayout#x - * @see yfiles.layout.INodeLayout#y - * @abstract - * @type {yfiles.algorithms.YPoint} - */ - targetPoint:yfiles.algorithms.YPoint; - } - var IEdgeLayout:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.IEdgeLayout; - }; - /** - * An {@link yfiles.layout.IIntersectionCalculator} is responsible for calculating the intersection point between an edge and the - * visual representation of its source or target node. - *

- * This interface is especially useful in conjunction with {@link yfiles.layout.PortCalculator} when adjusting the final port - * locations after the layout is calculated. - *

- * @see yfiles.layout.PortCalculator - * @interface - */ - export interface IIntersectionCalculator extends yfiles.lang.Object{ - /** - * Calculates an intersection point between the edge and the given {@link yfiles.layout.INodeLayout}. - *

- * Implementing classes use a point on the connecting edge segment (specified with an offset to the node's center) along - * with a direction pointing to the node and calculate the intersection between this line and the node. - *

- * @param nodeLayout the layout information of the node - * @param xOffset the x-coordinate of a point on the last line segment relative to the node's center - * @param yOffset the y-coordinate of a point on the last line segment relative to the node's center - * @param dx the x-component of the normalized direction vector indicating the direction of the segment pointing towards the node - * @param dy the y-component of the normalized direction vector indicating the direction of the segment pointing towards the node - * @returns the intersection coordinates relative to the node's center or null if no such intersection was found - * @abstract - */ - calculateIntersectionPoint(nodeLayout:yfiles.layout.INodeLayout,xOffset:number,yOffset:number,dx:number,dy:number):yfiles.algorithms.YPoint; - } - var IIntersectionCalculator:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.IIntersectionCalculator; - }; - /** - * Helper class that declares several keys for {@link yfiles.algorithms.IDataProvider} that provide - * {@link yfiles.layout.IIntersectionCalculator}. - * @class - * @static - */ - export interface IntersectionCalculatorKeys extends yfiles.lang.Object{} - export class IntersectionCalculatorKeys { - /** - * Data provider key for providing an individual intersection calculation for each edge source in the graph - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static SOURCE_INTERSECTION_CALCULATOR_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for providing an individual intersection calculation for each edge target in the graph - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static TARGET_INTERSECTION_CALCULATOR_DP_KEY:yfiles.algorithms.EdgeDpKey; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.IntersectionCalculatorKeys; - } - /** - * {@link yfiles.layout.ILabelLayout} defines the properties of a label from the perspective of a labeling algorithm. - *

- * Both node and edge labels need to implement this interface. It describes the size and position of a label. - *

- *

- * Note: To avoid inconsistencies, changing the {@link yfiles.layout.ILabelLayout#modelParameter model parameter} should always be combined with updating the corresponding - * {@link yfiles.layout.ILabelLayout#orientedBox oriented box}. - *

- * @interface - */ - export interface ILabelLayout extends yfiles.lang.Object{ - /** - * Gets the bounding box of the label. - *

- * The bounding box is the smallest, paraxial rectangle that contains the whole label. - *

- * @abstract - * @type {yfiles.algorithms.YRectangle} - */ - boundingBox:yfiles.algorithms.YRectangle; - /** - * Gets the box of the label. - *

- * This box matches the area that is covered by the label. The {@link yfiles.algorithms.YOrientedRectangle#setUpVector up vector} of the rectangle encodes the orientation of the - * label. - *

- * @abstract - * @type {yfiles.algorithms.YOrientedRectangle} - */ - orientedBox:yfiles.algorithms.YOrientedRectangle; - /** - * Gets or sets the label model parameter that describes the position of this label. - *

- * The model parameter must fit the according label model. - *

- * @abstract - * @type {any} - */ - modelParameter:any; - } - var ILabelLayout:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.ILabelLayout; - }; - /** - * {@link yfiles.layout.ILabelLayoutFactory} provides methods to create, add and remove node/edge labels for - * {@link yfiles.layout.LayoutGraph}s. - *

- * It can be used, e.g., to temporarily add labels during layout calculation. - *

- *

- * Note that original labels which are removed during a layout calculation have to be re-added when the layout calculation - * is done. - *

- *

- * An instance of this factory can be obtained with method {@link yfiles.layout.LayoutGraphUtilities#getLabelFactory}. This method - * uses the {@link yfiles.layout.LayoutGraph#createLabelFactory} method to create the factory. - *

- *

- * Note that each factory instance is bound to a specific graph instance, i.e., you can only create, add and remove labels - * for the graph which was given to method {@link yfiles.layout.LayoutGraphUtilities#getLabelFactory}. - *

- * @interface - */ - export interface ILabelLayoutFactory extends yfiles.lang.Object{ - /** - * Adds the given {@link yfiles.layout.IEdgeLabelLayout} to the given edge. - *

- * The given {@link yfiles.layout.ILabelLayout} has to be created with method {@link yfiles.layout.ILabelLayoutFactory#createLabelLayout} - * or {@link yfiles.layout.ILabelLayoutFactory#createLabelLayout}. - *

- * @param edge the edge - * @param labelLayout the edge label layout that should be added to the given edge - * @throws {Stubs.Exceptions.ArgumentError} if the given label layout has already been added to the graph - * @see yfiles.layout.ILabelLayoutFactory#createLabelLayout - * @see yfiles.layout.ILabelLayoutFactory#createLabelLayout - * @abstract - */ - addLabelLayout(edge:yfiles.algorithms.Edge,labelLayout:yfiles.layout.IEdgeLabelLayout):void; - /** - * Adds the given node label layout to the given node. - *

- * The given label layout has to be created with method {@link yfiles.layout.ILabelLayoutFactory#createLabelLayout} or - * {@link yfiles.layout.ILabelLayoutFactory#createLabelLayout}. - *

- * @param node the node - * @param labelLayout the node label layout that should be added to the given node - * @throws {Stubs.Exceptions.ArgumentError} if the given label layout has already been added to the graph - * @see yfiles.layout.ILabelLayoutFactory#createLabelLayout - * @see yfiles.layout.ILabelLayoutFactory#createLabelLayout - * @abstract - */ - addLabelLayout(node:yfiles.algorithms.Node,labelLayout:yfiles.layout.INodeLabelLayout):void; - /** - * Creates a new {@link yfiles.layout.ILabelLayout} for the given edge. - * @param edge the edge - * @param orientedBox the box specifying the size and location of the label - * @param model specifies the model of the created edge label - * @param descriptor specifies the preferred placement descriptor of the created label. If this value is - * null, the default descriptor is used - * @returns a new edge label layout - * @see yfiles.layout.ILabelLayoutFactory#addLabelLayout - * @abstract - */ - createLabelLayout(edge:yfiles.algorithms.Edge,orientedBox:yfiles.algorithms.YOrientedRectangle,model:yfiles.layout.IEdgeLabelLayoutModel,descriptor:yfiles.layout.PreferredPlacementDescriptor):yfiles.layout.IEdgeLabelLayout; - /** - * Creates a new {@link yfiles.layout.ILabelLayout} for the given node. - * @param node the node - * @param orientedBox the box specifying the size and location of the label - * @param model specifies the model of the created node label - * @returns a new node label layout - * @see yfiles.layout.ILabelLayoutFactory#addLabelLayout - * @abstract - */ - createLabelLayout(node:yfiles.algorithms.Node,orientedBox:yfiles.algorithms.YOrientedRectangle,model:yfiles.layout.INodeLabelLayoutModel):yfiles.layout.INodeLabelLayout; - /** - * Creates a new {@link yfiles.layout.ILabelLayout} for the given edge. - *

- * This method should create a {@link yfiles.layout.ILabelLayout} with an {@link yfiles.layout.IEdgeLabelLayoutModel} that supports the - * desired oriented label box exactly as given. - *

- * @param edge the edge - * @param orientedBox the box specifying the size and location of the label - * @returns a new edge label layout - * @see yfiles.layout.ILabelLayoutFactory#addLabelLayout - * @abstract - */ - createLabelLayout(edge:yfiles.algorithms.Edge,orientedBox:yfiles.algorithms.YOrientedRectangle):yfiles.layout.IEdgeLabelLayout; - /** - * Creates a new {@link yfiles.layout.ILabelLayout} for the given node. - *

- * This method should create a {@link yfiles.layout.ILabelLayout} with a {@link yfiles.layout.INodeLabelLayoutModel} that supports the - * desired oriented label box exactly as given. - *

- * @param node the node - * @param orientedBox the box specifying the size and location of the label - * @returns a new node label layout - * @see yfiles.layout.ILabelLayoutFactory#addLabelLayout - * @abstract - */ - createLabelLayout(node:yfiles.algorithms.Node,orientedBox:yfiles.algorithms.YOrientedRectangle):yfiles.layout.INodeLabelLayout; - /** - * Removes the given {@link yfiles.layout.IEdgeLabelLayout} from the given edge. - * @param edge the edge - * @param labelLayout the label layout that should be removed from the given edge - * @see yfiles.layout.ILabelLayoutFactory#addLabelLayout - * @abstract - */ - removeLabelLayout(edge:yfiles.algorithms.Edge,labelLayout:yfiles.layout.IEdgeLabelLayout):void; - /** - * Removes the given node label layout from the given node. - * @param node the node - * @param labelLayout the label layout that should be removed from the given node - * @see yfiles.layout.ILabelLayoutFactory#addLabelLayout - * @abstract - */ - removeLabelLayout(node:yfiles.algorithms.Node,labelLayout:yfiles.layout.INodeLabelLayout):void; - /** - * Gets the graph associated with this label factory instance. - * @abstract - * @type {yfiles.layout.LayoutGraph} - */ - graph:yfiles.layout.LayoutGraph; - } - var ILabelLayoutFactory:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.ILabelLayoutFactory; - }; - /** - * {@link yfiles.layout.ILayoutAlgorithm} describes the general interface for algorithms that perform a layout process on a - * {@link yfiles.layout.LayoutGraph}. - *

- * The main method for invoking the layout calculation is - * {@link yfiles.layout.ILayoutAlgorithm#applyLayout}. Implementing classes will arrange the graph there. - *

- *

- * This class also provides keys to register {@link yfiles.algorithms.IDataProvider}s with the graph that contain information about - * the nodes and edges in the graph. {@link yfiles.algorithms.IDataProvider}s registered with {@link yfiles.layout.LayoutKeys#NODE_ID_DP_KEY} - * and {@link yfiles.layout.LayoutKeys#EDGE_ID_DP_KEY} contain unique identifiers for both nodes and edges. These identifiers allow - * for ensuring consistent results even if the order of nodes and edges was changed between two layout runs. - *
- * The selection state of nodes and edges is stored in {@link yfiles.algorithms.IDataProvider}s registered with the keys {@link yfiles.layout.LayoutKeys#AFFECTED_NODES_DP_KEY} - * and - * {@link yfiles.layout.LayoutKeys#AFFECTED_EDGES_DP_KEY}. Based on this information, the layout algorithm may reduce its - * calculations to the selected subset of nodes or edges. - *

- * @interface - */ - export interface ILayoutAlgorithm extends yfiles.lang.Object{ - /** - * Main layout routine that assigns new layout information to the given graph. - *

- * The call to this routine will only succeed if the layout algorithm can handle the input graph. - *

- * @param graph the input graph - * @abstract - */ - applyLayout(graph:yfiles.layout.LayoutGraph):void; - } - var ILayoutAlgorithm:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.ILayoutAlgorithm; - }; - /** - * Helper class that provides unique identifiers for some general purpose {@link yfiles.algorithms.IDataProvider data providers}. - * @class - * @static - */ - export interface LayoutKeys extends yfiles.lang.Object{} - export class LayoutKeys { - /** - * Data provider key for looking up a unique identifier for each node in a graph - *

- * Layout algorithms may use this information to provide consistent layouts for multiple runs. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static NODE_ID_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for looking up a unique identifier for each edge in a graph - *

- * Layout algorithms may use this information to provide consistent layouts for multiple runs. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static EDGE_ID_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for looking up the selected state of the nodes in the graph - *

- * A layout algorithm can retrieve a {@link yfiles.algorithms.IDataProvider} registered with this key to apply a special handling - * to the selected nodes. For example, the layout algorithm may restrict its scope, i.e., it only arranges the selected - * nodes. - *

- *

- * However, it is often more convenient to use a specific {@link yfiles.algorithms.IDataProvider} key for this purpose, e.g., if - * you want to combine two layout algorithms of the same kind which have to operate on different subsets of the graph. - * Thus, these algorithms may provide a method like setSubgraphNodesDpKey(Object) that customizes the {@link yfiles.algorithms.IDataProvider} - * key allowing to specify different sets of selected nodes for nested layout algorithms. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static AFFECTED_NODES_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for looking up the selected state of the edges in the graph - *

- * A layout algorithm can retrieve a {@link yfiles.algorithms.IDataProvider} registered with this key to apply a special handling - * to the selected edges. For example, the layout algorithm may restrict its scope, i.e., it only routes the selected - * edges. - *

- *

- * However, it is often more convenient to use a specific {@link yfiles.algorithms.IDataProvider} key for this purpose, e.g., if - * you want to combine two layout algorithms of the same kind which have to operate on different subsets of the graph. - * Thus, these algorithms may provide a method like setSubgraphEdgesDpKey(Object) that customizes the {@link yfiles.algorithms.IDataProvider} - * key allowing to specify different sets of selected edges for nested layout algorithms. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static AFFECTED_EDGES_DP_KEY:yfiles.algorithms.EdgeDpKey; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.LayoutKeys; - } - /** - * A {@link yfiles.layout.ILayoutStage} is a layout algorithm that represents a stage of a larger layout process. - *

- * It delegates the core layout process to another {@link yfiles.layout.ILayoutAlgorithm layout algorithm}. Implementing classes may perform pre-processing steps - * before the {@link yfiles.layout.ILayoutStage#coreLayout core layout algorithm} gets called and post-processing steps afterwards. - *

- * @see yfiles.layout.MultiStageLayout - * @interface - * @implements {yfiles.layout.ILayoutAlgorithm} - */ - export interface ILayoutStage extends yfiles.lang.Object,yfiles.layout.ILayoutAlgorithm{ - /** - * Gets or sets the core layout algorithm. - *

- * This algorithm is wrapped by this stage. It is invoked in {@link yfiles.layout.ILayoutAlgorithm#applyLayout}. The {@link yfiles.layout.ILayoutStage} - * may add pre- and post-processing steps before and after calling the core layout algorithm. - *

- * @abstract - * @type {yfiles.layout.ILayoutAlgorithm} - */ - coreLayout:yfiles.layout.ILayoutAlgorithm; - } - var ILayoutStage:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.ILayoutStage; - }; - /** - * {@link yfiles.layout.INodeLabelLayout} defines the properties of one node label from the perspective of a labeling algorithm. - *

- * Note: To avoid inconsistencies, changing the {@link yfiles.layout.ILabelLayout#modelParameter model parameter} should always be combined with updating the corresponding - * {@link yfiles.layout.ILabelLayout#orientedBox oriented box}. - *

- * @interface - * @implements {yfiles.layout.ILabelLayout} - */ - export interface INodeLabelLayout extends yfiles.lang.Object,yfiles.layout.ILabelLayout{ - /** - * Gets the label model that describes the valid locations for this label. - * @abstract - * @type {yfiles.layout.INodeLabelLayoutModel} - */ - labelModel:yfiles.layout.INodeLabelLayoutModel; - } - var INodeLabelLayout:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.INodeLabelLayout; - }; - /** - * {@link yfiles.layout.INodeLabelLayoutModel} defines the properties of the model associated with a - * {@link yfiles.layout.INodeLabelLayout}. - *

- * A {@link yfiles.layout.INodeLabelLayoutModel} provides a set of possible candidates for the placement of a node label. It also defines a parameter - * that describes the current location of the label. - *

- *

- * It is important that all state information is encapsulated in the {@link yfiles.layout.INodeLabelLayoutModel#createModelParameter model parameter}. {@link yfiles.layout.INodeLabelLayoutModel} - * instances may be shared between multiple node labels but produce different parameters for labels with different - * locations. - *

- * @interface - */ - export interface INodeLabelLayoutModel extends yfiles.lang.Object{ - /** - * Creates a model parameter that represents the given node label position within this model. - *

- * The created model parameter is the closest parameter representation of the given label location that can be achieved - * within this model. - *

- *

- * This parameter can be passed to {@link yfiles.layout.INodeLabelLayoutModel#getLabelPlacement} to retrieve the current label - * box. - *

- *

- * A model parameter can be an arbitrary {@link any}. However it must contain all information to allow restoring of the encoded - * location with this {@link yfiles.layout.INodeLabelLayoutModel}. - *

- * @param labelBounds the box of the label, encoding the label location for which the parameter should be created - * @param nodeLayout the layout of the node to which the label belongs - * @returns the model parameter representing the given label location - * @see yfiles.layout.INodeLabelLayoutModel#getLabelPlacement - * @abstract - */ - createModelParameter(labelBounds:yfiles.algorithms.YOrientedRectangle,nodeLayout:yfiles.layout.INodeLayout):any; - /** - * Returns all {@link yfiles.layout.NodeLabelCandidate}s that describe valid label positions within this model. - *

- * In case the implementing {@link yfiles.layout.INodeLabelLayoutModel} allows every possible location, this method always returns - * the current location as a {@link yfiles.layout.LabelCandidate}. - *

- * @param labelLayout the label for which candidates should be generated - * @param nodeLayout the layout of the node to which the label belongs - * @returns a list of {@link } instances - * @abstract - */ - getLabelCandidates(labelLayout:yfiles.layout.INodeLabelLayout,nodeLayout:yfiles.layout.INodeLayout):yfiles.algorithms.YList; - /** - * Returns the bounds of the label for the position encoded by the given model parameter. - * @param labelSize the width and height of the label - * @param nodeLayout the layout of the node to which the label belongs - * @param param the model parameter that describes the abstract position of the label within this model - * @returns the oriented box of the label - * @abstract - */ - getLabelPlacement(labelSize:yfiles.algorithms.YDimension,nodeLayout:yfiles.layout.INodeLayout,param:any):yfiles.algorithms.YOrientedRectangle; - /** - * Gets a model parameter that encodes the default position of this model's allowed node label positions. - *

- * This parameter can be passed to {@link yfiles.layout.INodeLabelLayoutModel#getLabelPlacement} to retrieve the corresponding - * label box. - *

- * @abstract - * @type {any} - */ - defaultParameter:any; - } - var INodeLabelLayoutModel:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.INodeLabelLayoutModel; - }; - /** - * A {@link yfiles.layout.INodeLayout} encapsulates the layout information for a node. - *

- * The layout information consists of the size and position of the node. - *

- * @interface - */ - export interface INodeLayout extends yfiles.lang.Object{ - /** - * Sets the coordinates of the upper-left corner of the node. - * @param x the new x-coordinate of the node - * @param y the new y-coordinate of the node - * @abstract - */ - setLocation(x:number,y:number):void; - /** - * Sets the size of the node. - * @param width the new width of the node - * @param height the new height of the node - * @abstract - */ - setSize(width:number,height:number):void; - /** - * Gets the x-coordinate of the upper-left corner of the node. - *

- * The location of the node is described by the coordinates of the upper-left corner of the node. - *

- * @abstract - * @type {number} - */ - x:number; - /** - * Gets the y-coordinate of the upper-left corner of the node. - *

- * The location of the node is described by the coordinates of the upper-left corner of the node. - *

- * @abstract - * @type {number} - */ - y:number; - /** - * Gets the width of the node. - *

- * The width of the node is the horizontal distance the node spans. - *

- * @abstract - * @type {number} - */ - width:number; - /** - * Gets the height of the node. - *

- * The height of the node is the vertical distance the node spans. - *

- * @abstract - * @type {number} - */ - height:number; - } - var INodeLayout:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.INodeLayout; - }; - /** - * An {@link yfiles.layout.IPartitionInterEdgeRouter} is responsible for routing inter-edges. - *

- * An inter-edge is an edge that connects nodes that belong to different partitions. - *

- * @interface - */ - export interface IPartitionInterEdgeRouter extends yfiles.lang.Object{ - /** - * Routes inter-edges of the partitioned graph. - * @param graph the input graph - * @param partitionIDDP the partition ID for each node in the graph - * @param interEdgeDP the map that marks inter-edges - * @abstract - */ - routeInterEdges(graph:yfiles.layout.LayoutGraph,partitionIDDP:yfiles.algorithms.IDataProvider,interEdgeDP:yfiles.algorithms.IDataProvider):void; - /** - * Gets or sets whether or not to route inter-edges only. - *

- * Inter-edges are edges that connect nodes from different partitions. If this feature is disabled, all edges are routed by - * this routing algorithm. - *

- * @abstract - * @type {boolean} - */ - routeInterEdgesOnly:boolean; - } - var IPartitionInterEdgeRouter:{ - /** - * Routes inter-edges using {@link yfiles.router.ChannelEdgeRouter}. - * @param [router=null] The router instance to use for the edge routing. If not specified, a internal instance is used. - * @returns - * @static - */ - createChannelInterEdgeRouter?(router?:yfiles.router.ChannelEdgeRouter):yfiles.layout.IPartitionInterEdgeRouter; - /** - * Routes inter-edges using {@link yfiles.router.EdgeRouter}. - * @param [router=null] The router instance to use for the edge routing. If not specified, a internal instance is used. - * @returns - * @static - */ - createPolylineInterEdgeRouter?(router?:yfiles.router.EdgeRouter):yfiles.layout.IPartitionInterEdgeRouter; - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.IPartitionInterEdgeRouter; - }; - /** - * A {@link yfiles.layout.IProfitModel} ranks - * {@link yfiles.layout.LabelCandidate}s used for prioritizing certain label locations over others. - *

- * Generic labeling algorithm {@link yfiles.labeling.GenericLabeling} will use the ranking to decide which - * {@link yfiles.layout.LabelCandidate}s to eliminate. - *

- *

- * {@link yfiles.layout.LabelCandidate}s with a high profit will be preferred over - * {@link yfiles.layout.LabelCandidate}s with a low profit. - *

- * @interface - */ - export interface IProfitModel extends yfiles.lang.Object{ - /** - * Returns the profit for placing a label using the given {@link yfiles.layout.LabelCandidate}. - *

- * Higher profit means better candidates. Hence, there is a higher probability that the candidate is chosen by a labeling - * algorithm. - *

- *

- * Profits need to have a value between 0 and 1. - *

- * @param candidate the candidate - * @returns the profit of the candidate - * @abstract - */ - getProfit(candidate:yfiles.layout.LabelCandidate):number; - } - var IProfitModel:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.IProfitModel; - }; - /** - * A {@link yfiles.layout.LabelCandidate} describes one valid placement for a label considering the label model. - *

- * Generic labeling algorithms place labels according to their label model. To get valid locations for the label, the label - * model generates various - * {@link yfiles.layout.LabelCandidate}s. One of these candidates will be chosen to provide the actual placement of the label. - *

- * @see yfiles.layout.INodeLabelLayoutModel - * @see yfiles.layout.IEdgeLabelLayoutModel - * @see yfiles.labeling.GenericLabeling - * @class - * @implements {yfiles.algorithms.IPlaneObject} - */ - export interface LabelCandidate extends yfiles.lang.Object,yfiles.algorithms.IPlaneObject{} - export class LabelCandidate { - /** - * Creates a new instance of {@link yfiles.layout.LabelCandidate} described by location, size, model parameter and internal flag. - * @param pos the location of the upper left corner of the candidate - * @param size the size of the candidate - * @param param the parameters of the label model associated with this candidate - * @param owner the label associated with the candidate - * @param [internal=false] true if the candidate is allowed to overlap with its owner, false otherwise - */ - constructor(pos:yfiles.algorithms.YPoint,size:yfiles.algorithms.YDimension,param:any,owner:yfiles.layout.ILabelLayout,internal?:boolean); - /** - * Creates a new instance of {@link yfiles.layout.LabelCandidate} described by its box, model parameter and internal flag. - * @param labelBox the box that specifies the candidate's size and position - * @param param the parameters of the label model associated with this candidate - * @param owner the label associated with the candidate - * @param [internal=false] true if the candidate is allowed to overlap with its owner, false otherwise - */ - constructor(labelBox:yfiles.algorithms.YOrientedRectangle,param:any,owner:yfiles.layout.ILabelLayout,internal?:boolean); - /** - * Replaces the model parameter and box of the owner with the model parameter and box of this candidate. - *

- * When this candidate is chosen to provide the placement of the label, this method transfers the model parameter and the - * candidate box to the {@link yfiles.layout.ILabelLayout}. - *

- * @see yfiles.layout.LabelCandidate#owner - * @see yfiles.layout.LabelCandidate#modelParameter - * @see yfiles.layout.LabelCandidate#box - */ - propagate():void; - /** - * Gets or sets the custom profit for this candidate. - *

- * The profit describes the priority of this candidate with respect to other candidates. Labeling algorithms will use the - * profit to decide which candidate to choose. - *

- *

- * The value is restricted to the interval [0,1], where 1 specifies the highest possible profit. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified value lies outside of [0,1] - * @type {number} - */ - customProfit:number; - /** - * Gets the model parameter that was used by the underlying model to generate this label candidate. - * @type {any} - */ - modelParameter:any; - /** - * Gets the coordinates of the upper-left corner of the candidate's bounds. - *

- * The bounds are the smallest paraxial box that contains the candidate. - *

- * @see yfiles.layout.LabelCandidate#boundingBox - * @type {yfiles.algorithms.YPoint} - */ - location:yfiles.algorithms.YPoint; - /** - * Gets the width and height of the candidate's bounds. - *

- * The bounds are the smallest paraxial box that contains the candidate. - *

- * @see yfiles.layout.LabelCandidate#boundingBox - * @type {yfiles.algorithms.YDimension} - */ - size:yfiles.algorithms.YDimension; - /** - * Gets the minimum x-coordinate of the candidate's bounds. - *

- * The bounds are the smallest paraxial box that contains the candidate. - *

- * @see yfiles.layout.LabelCandidate#location - * @see yfiles.layout.LabelCandidate#boundingBox - * @type {number} - */ - x:number; - /** - * Gets the minimum y-coordinate of the candidate's bounds. - *

- * The bounds are the smallest paraxial box that contains the candidate. - *

- * @see yfiles.layout.LabelCandidate#location - * @see yfiles.layout.LabelCandidate#boundingBox - * @type {number} - */ - y:number; - /** - * Gets the width of the candidate's bounds. - *

- * The bounds are the smallest paraxial box that contains the candidate. - *

- * @see yfiles.layout.LabelCandidate#size - * @see yfiles.layout.LabelCandidate#boundingBox - * @type {number} - */ - width:number; - /** - * Gets the height of the candidate's bounding box. - *

- * The bounding box is the smallest paraxial box that contains the candidate. - *

- * @see yfiles.layout.LabelCandidate#size - * @see yfiles.layout.LabelCandidate#boundingBox - * @type {number} - */ - height:number; - /** - * Gets the bounding box of this candidate. - *

- * The bounding box describes the smallest paraxial box that contains the candidate. - *

- * @type {yfiles.algorithms.YRectangle} - */ - boundingBox:yfiles.algorithms.YRectangle; - /** - * Gets the oriented box of this candidate. - *

- * If the label is rotated, this box will be oriented accordingly. - *

- * @type {yfiles.algorithms.YOrientedRectangle} - */ - box:yfiles.algorithms.YOrientedRectangle; - /** - * Gets the {@link yfiles.layout.ILabelLayout} for which this candidate was created. - * @type {yfiles.layout.ILabelLayout} - */ - owner:yfiles.layout.ILabelLayout; - /** - * Gets whether or not this candidate describes an internal label. - *

- * Internal labels reside inside the boundaries of a node. - *

- * @type {boolean} - */ - internal:boolean; - /** - * Gets or sets a penalty for a candidate position that overlaps the box of a node. - *

- * The penalty should be a factor between 0 and 1, where 0 means that an overlap is considered unimportant and 1 means that - * an overlap is considered severe. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified penalty is outside [0,1] - * @type {number} - */ - nodeOverlapPenalty:number; - /** - * Gets or sets a penalty for a candidate position that overlaps the path of an edge. - *

- * The penalty should be a factor between 0 and 1, where 0 means that an overlap is considered unimportant and 1 means that - * an overlap is considered severe. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified penalty is outside [0,1] - * @type {number} - */ - edgeOverlapPenalty:number; - /** - * Gets the sum of node overlap penalty and edge overlap penalty. - * @see yfiles.layout.LabelCandidate#edgeOverlapPenalty - * @see yfiles.layout.LabelCandidate#nodeOverlapPenalty - * @type {number} - */ - overlapPenalty:number; - /** - * Gets whether or not this candidate's box had already been chosen by the labeling algorithm. - *

- * If this candidate is propagated, its model parameter and box were transferred to the {@link yfiles.layout.LabelCandidate#owner label}. - *

- * @see yfiles.layout.LabelCandidate#propagate - * @type {boolean} - */ - propagated:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.LabelCandidate; - } - /** - * {@link yfiles.layout.LabelLayoutBase} is the default implementation of the {@link yfiles.layout.ILabelLayout} interface. - * @class - * @implements {yfiles.layout.ILabelLayout} - */ - export interface LabelLayoutBase extends yfiles.lang.Object,yfiles.layout.ILabelLayout{} - export class LabelLayoutBase { - /** - * Creates a new {@link yfiles.layout.LabelLayoutBase} instance. - */ - constructor(); - /** - * Sets the box of the label. - *

- * This box matches the area that is covered by the label. The {@link yfiles.algorithms.YOrientedRectangle#setUpVector up vector} of the rectangle encodes the orientation of the - * label. - *

- * @type {yfiles.algorithms.YOrientedRectangle} - */ - orientedBox:yfiles.algorithms.YOrientedRectangle; - /** - * Sets the bounding box of the label. - *

- * The bounding box is the smallest, paraxial rectangle that contains the whole label. - *

- * @type {yfiles.algorithms.YRectangle} - */ - boundingBox:yfiles.algorithms.YRectangle; - /** - * - * @type {any} - */ - modelParameter:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.LabelLayoutBase; - } - /** - * {@link yfiles.layout.LabelLayoutData} encapsulates layout information for a label. - *

- * The information is used by clients to inform label-aware {@link yfiles.layout.ILayoutAlgorithm layout algorithms} about labeling constraints like label size - * and preferred placement. - *

- *

- * Label-aware algorithms like {@link yfiles.hierarchic.HierarchicLayout} return the calculated label positions by assigning the - * corresponding box to the provided {@link yfiles.layout.LabelLayoutData} instances. - *

- *

- * {@link yfiles.algorithms.IDataProvider DataProviders} are used for associating an array of {@link yfiles.layout.LabelLayoutData} instances with either the nodes or the - * edges of a {@link yfiles.layout.LayoutGraph}. The {@link yfiles.algorithms.IDataProvider DataProviders} must be registered with the input graph using one of the keys - * defined in {@link yfiles.layout.LabelLayoutKeys}. - *

- * @class - */ - export interface LabelLayoutData extends yfiles.lang.Object{} - export class LabelLayoutData { - /** - * Creates a new instance of {@link yfiles.layout.LabelLayoutData} for a label with the given width and height. - * @param width the width of the label - * @param height the height of the label - */ - constructor(width:number,height:number); - /** - * Creates a new instance of {@link yfiles.layout.LabelLayoutData} for a label with the given oriented box and preferred placement - * descriptor. - * @param bounds the box of the label - * @param [preferredPlacement=null] a preferred placement descriptor - * @throws {Stubs.Exceptions.ArgumentError} if the specified descriptor is null - * @see yfiles.layout.PreferredPlacementDescriptor - * @see yfiles.layout.LabelLayoutData#preferredPlacementDescriptor - */ - constructor(bounds:yfiles.algorithms.YOrientedRectangle,preferredPlacement?:yfiles.layout.PreferredPlacementDescriptor); - /** - * Specifies the coordinates of the upper-left corner of the bounding box of the label. - * @param x the new x-coordinate of the upper-left corner - * @param y the new y-coordinate of the upper-left corner - * @see yfiles.layout.LabelLayoutData#x - * @see yfiles.layout.LabelLayoutData#y - * @see yfiles.algorithms.YOrientedRectangle#boundingBox - */ - setLocation(x:number,y:number):void; - /** - * Specifies the width and height of the {@link yfiles.layout.LabelLayoutData#bounds oriented box} of this label. - * @param width the width of the oriented box - * @param height the height of the oriented box - * @see yfiles.layout.LabelLayoutData#bounds - */ - setSize(width:number,height:number):void; - /** - * Gets or sets the {@link yfiles.algorithms.YOrientedRectangle oriented box} of the label. - * @type {yfiles.algorithms.YOrientedRectangle} - */ - bounds:yfiles.algorithms.YOrientedRectangle; - /** - * Gets the width of the label's bounding box. - * @see yfiles.algorithms.YOrientedRectangle#boundingBox - * @type {number} - */ - width:number; - /** - * Gets the height of the label's bounding box. - * @see yfiles.algorithms.YOrientedRectangle#boundingBox - * @type {number} - */ - height:number; - /** - * Gets the x-coordinate of the upper-left corner of the label's bounding box. - * @see yfiles.algorithms.YOrientedRectangle#boundingBox - * @type {number} - */ - x:number; - /** - * Gets the y-coordinate of the upper-left corner of the label's bounding box. - * @see yfiles.algorithms.YOrientedRectangle#boundingBox - * @type {number} - */ - y:number; - /** - * Gets or sets the preferred placement of this label. - * @throws {Stubs.Exceptions.ArgumentError} if the specified descriptor is null - * @type {yfiles.layout.PreferredPlacementDescriptor} - */ - preferredPlacementDescriptor:yfiles.layout.PreferredPlacementDescriptor; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.LabelLayoutData; - } - /** - * {@link yfiles.layout.LabelLayoutKeys} are used for associating - * {@link yfiles.algorithms.IDataProvider}s that contain label-specific information for edge and node labels. - *

- * Label-aware layout algorithms like {@link yfiles.hierarchic.HierarchicLayout} may look for such {@link yfiles.algorithms.IDataProvider}s - * that contain {@link yfiles.layout.LabelLayoutData} for each edge. - *

- *

- * Instead of setting up {@link yfiles.layout.LabelLayoutData} and {@link yfiles.algorithms.IDataProvider}s one can also use {@link yfiles.layout.LabelLayoutTranslator} - * to automatically translate information provided by the standard label layout classes {@link yfiles.layout.IEdgeLabelLayout} and - * {@link yfiles.layout.INodeLabelLayout} to layout data accessible through the keys defined below. - *

- * @class - * @static - */ - export interface LabelLayoutKeys extends yfiles.lang.Object{} - export class LabelLayoutKeys { - /** - * Data provider key for accessing label information of each edge in the input graph - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static EDGE_LABEL_LAYOUT_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for accessing label information of each node in the input graph - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static NODE_LABEL_LAYOUT_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for marking labels that should be ignored by the layout algorithm - *

- * A label is ignored if there is a {@link yfiles.algorithms.IDataProvider} registered with this key which returns true for the - * given {@link yfiles.layout.ILabelLayout}. - *

- *

- * The {@link yfiles.layout.LabelLayoutTranslator} only translates labels that should not be ignored. - *

- * @const - * @static - * @type {yfiles.algorithms.ILabelLayoutDpKey.} - */ - static IGNORED_LABELS_DP_KEY:yfiles.algorithms.ILabelLayoutDpKey; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.LabelLayoutKeys; - } - /** - * {@link yfiles.layout.LabelLayoutTranslator} automatically translates label layout information provided by the standard label - * layout classes {@link yfiles.layout.IEdgeLabelLayout} and {@link yfiles.layout.INodeLabelLayout} to layout data of type {@link yfiles.layout.LabelLayoutData} - * that is accessible by the keys defined in class {@link yfiles.layout.LabelLayoutKeys}. - *

- * One can use this {@link yfiles.layout.ILayoutStage} as label layout algorithm of a label-aware layout algorithm like - * {@link yfiles.hierarchic.HierarchicLayout}. This can be done by assigning the stage by an appropriate call to {@link yfiles.layout.MultiStageLayout#labeling setLabelLayouter}. - *

- *

- * When writing the {@link yfiles.layout.LabelLayoutData}, the {@link yfiles.layout.LabelLayoutData#bounds boxes} are set relative. In case of a node label, the box's {@link yfiles.algorithms.YOrientedRectangle#anchor anchor} is - * relative to the center of the owning node. In case of an edge label the box's anchor is relative to the center of the - * source node of the owning edge. - *

- *

- * If {@link yfiles.layout.LabelLayoutTranslator#writeBackNodeLabels writing back node labels} and/or {@link yfiles.layout.LabelLayoutTranslator#writeBackEdgeLabels writing back edge labels} is enabled, the {@link yfiles.layout.LabelLayoutData} is transferred - * back to the {@link yfiles.layout.INodeLabelLayout}s and/or {@link yfiles.layout.IEdgeLabelLayout}s. - *

- *

- * By default, the {@link yfiles.layout.LabelLayoutData#bounds boxes} are now interpreted absolute but by activating {@link yfiles.layout.LabelLayoutTranslator#writeBackRelativeNodeLabelLocation} and/or {@link yfiles.layout.LabelLayoutTranslator#writeBackRelativeEdgeLabelLocation} this can be changed to interpret them - * relative as explained above. - *

- *

- * Note that care must be taken on the choice of the label model that is used by the classes {@link yfiles.layout.IEdgeLabelLayout} - * and {@link yfiles.layout.INodeLabelLayout}. The calculated label positions must be consistent with the label positions allowed - * by the label model. The best label layout results are achieved by choosing {@link yfiles.layout.FreeEdgeLabelLayoutModel} for - * edge layouts and {@link yfiles.layout.FreeNodeLabelLayoutModel} for node layouts. - *

- * @class - * @implements {yfiles.layout.ILayoutStage} - */ - export interface LabelLayoutTranslator extends yfiles.lang.Object,yfiles.layout.ILayoutStage{} - export class LabelLayoutTranslator { - /** - * Creates a new {@link yfiles.layout.LabelLayoutTranslator} instance with default settings. - */ - constructor(); - /** - * Translates traditional {@link yfiles.layout.ILabelLayout} information to {@link yfiles.algorithms.IDataProvider}-based - * {@link yfiles.layout.LabelLayoutData}. - *

- * Afterwards, the calculated layout data will be written back to the original label layout. - *

- * @param graph the input graph - */ - applyLayout(graph:yfiles.layout.LayoutGraph):void; - /** - * Gets or sets the core layout algorithm that is wrapped by this {@link yfiles.layout.ILayoutStage}. - * @type {yfiles.layout.ILayoutAlgorithm} - */ - coreLayout:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets whether or not this stage should automatically flip edge label content depending on the label's rotation - * angle. - *

- * More precisely, if this option is enabled and the up vector of the {@link yfiles.algorithms.YOrientedRectangle} associated with - * an {@link yfiles.layout.IEdgeLabelLayout} points downwards ({@link yfiles.algorithms.YOrientedRectangle#upY upY} > 0), this {@link yfiles.layout.ILayoutStage} automatically flips the - * label. It rotates the label by 180 degrees without changing the label's center. - *

- * @see yfiles.layout.LayoutGraphUtilities#autoFlipBox - * @see yfiles.layout.ILabelLayout#orientedBox - * @type {boolean} - */ - autoFlippingEnabled:boolean; - /** - * Gets or sets whether or not to reset the orientation of node labels. - *

- * If this option is enabled, the up vector of the corresponding oriented box is set to (0,-1) before adding it to the - * {@link yfiles.algorithms.IDataProvider}. - *

- * @type {boolean} - */ - resettingNodeLabelOrientation:boolean; - /** - * Gets or sets whether or not to reset the orientation of edge labels. - *

- * If this option is enabled, the up vector of the corresponding oriented box is set to (0,-1) before adding it to the - * {@link yfiles.algorithms.IDataProvider}. - *

- * @type {boolean} - */ - resettingEdgeLabelOrientation:boolean; - /** - * Gets or sets whether or not edge label information is written back to the model after core layout. - * @type {boolean} - */ - writeBackEdgeLabels:boolean; - /** - * Gets or sets whether or not edge label {@link yfiles.layout.LabelLayoutData#bounds boxes} are interpreted relative to the edge when writing them back to the model. - * @type {boolean} - */ - writeBackRelativeEdgeLabelLocation:boolean; - /** - * Gets or sets whether or not node label information is written back to the model after the core layout. - * @type {boolean} - */ - writeBackNodeLabels:boolean; - /** - * Gets or sets whether or not node label {@link yfiles.layout.LabelLayoutData#bounds bounds} are interpreted relative to the node when writing them back to the model. - * @type {boolean} - */ - writeBackRelativeNodeLabelLocation:boolean; - /** - * Gets or sets whether or not node label information is translated. - * @type {boolean} - */ - translateNodeLabels:boolean; - /** - * Gets or sets whether or not edge label information is translated. - * @type {boolean} - */ - translateEdgeLabels:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.LabelLayoutTranslator; - } - /** - * A {@link yfiles.layout.LayoutGraph} is a {@link yfiles.algorithms.Graph} with attached layout information that basically represents a - * drawing of a graph. - *

- * It provides access to the layout information for nodes, edges and labels. This layout information consists of - * coordinates for the elements. - *

- *

- * {@link yfiles.layout.ILayoutAlgorithm Layout algorithms} work on {@link yfiles.layout.LayoutGraph}s and arrange their nodes and edges. - *

- * @class - * @extends {yfiles.algorithms.Graph} - */ - export interface LayoutGraph extends yfiles.algorithms.Graph{} - export class LayoutGraph { - /** - * Creates a new {@link yfiles.layout.LayoutGraph} which is a copy of the given subgraph. - * @param graph the original graph - * @param nodeSubset the nodes that induce the subgraph - */ - constructor(graph:yfiles.layout.LayoutGraph,nodeSubset:yfiles.algorithms.ICursor); - /** - * Creates a new {@link yfiles.layout.LayoutGraph} which is a copy of the given subgraph. - * @param subgraph the original subgraph - */ - constructor(subgraph:yfiles.layout.LayoutGraph); - /** - * Creates a new, empty {@link yfiles.layout.LayoutGraph} with default settings. - */ - constructor(); - /** - * Creates a new {@link yfiles.layout.ILabelLayoutFactory} for this {@link yfiles.layout.LayoutGraph} that can be used for copying layout - * information of labels. - * @returns the new {@link } - * @protected - * @abstract - */ - createLabelFactory():yfiles.layout.ILabelLayoutFactory; - /** - * Returns the rectangle describing the bounding box of the given node. - * @param node the node - * @returns the bounds of the node - * @see yfiles.layout.LayoutGraph#getLocation - * @see yfiles.layout.LayoutGraph#getSize - */ - getBoundingBox(node:yfiles.algorithms.Node):yfiles.algorithms.YRectangle; - /** - * Returns the center coordinates of the given node. - * @param node the node - * @returns the location of the node's center - * @see yfiles.layout.INodeLayout - * @see yfiles.layout.LayoutGraph#setCenter - */ - getCenter(node:yfiles.algorithms.Node):yfiles.algorithms.YPoint; - /** - * Returns the x-coordinate of the given node's center. - * @param node the node - * @returns the x-value of the node's center coordinate - * @see yfiles.layout.INodeLayout - */ - getCenterX(node:yfiles.algorithms.Node):number; - /** - * Returns the y-coordinate of the given node's center. - * @param node the node - * @returns the y-value of the node's center coordinate - * @see yfiles.layout.INodeLayout - */ - getCenterY(node:yfiles.algorithms.Node):number; - /** - * Returns the height of the given node. - * @param node the node - * @returns the height of the node - * @see yfiles.layout.INodeLayout#height - */ - getHeight(node:yfiles.algorithms.Node):number; - /** - * Returns the layout information for all labels associated with the given edge. - *

- * The layout information consists of the location, size and orientation of the label. - *

- * @param edge the edge - * @returns the layout information for the edge's labels - * @abstract - */ - getLabelLayout(edge:yfiles.algorithms.Edge):yfiles.layout.IEdgeLabelLayout[]; - /** - * Returns the layout information for all labels associated with the given node. - *

- * The layout information consists of the location, size and orientation of the label. - *

- * @param node the node - * @returns the layout information for the node's labels - * @abstract - */ - getLabelLayout(node:yfiles.algorithms.Node):yfiles.layout.INodeLabelLayout[]; - /** - * Returns the layout information for the given edge. - *

- * The layout information consists of the locations of the control points and end points of the edge. - *

- * @param edge the edge - * @returns the layout information for the edge - * @abstract - */ - getLayout(edge:yfiles.algorithms.Edge):yfiles.layout.IEdgeLayout; - /** - * Returns the layout information for the given node. - *

- * The layout information consists of the location and size of the node. - *

- * @param node the node - * @returns the layout information for the node - * @abstract - */ - getLayout(node:yfiles.algorithms.Node):yfiles.layout.INodeLayout; - /** - * Returns the coordinates of the given node's upper-left corner. - * @param node the node - * @returns the location of the node's upper-left corner - * @see yfiles.layout.INodeLayout#x - * @see yfiles.layout.INodeLayout#y - */ - getLocation(node:yfiles.algorithms.Node):yfiles.algorithms.YPoint; - /** - * Returns the edge to which the given {@link yfiles.layout.IEdgeLabelLayout} belongs. - * @param labelLayout the label's layout information - * @returns the edge that owns the label - * @abstract - */ - getOwnerEdge(labelLayout:yfiles.layout.IEdgeLabelLayout):yfiles.algorithms.Edge; - /** - * Returns the node to which the given {@link yfiles.layout.INodeLabelLayout} belongs. - * @param labelLayout the label's layout information - * @returns the node that owns the label - * @abstract - */ - getOwnerNode(labelLayout:yfiles.layout.INodeLabelLayout):yfiles.algorithms.Node; - /** - * Returns the path of an edge, including the ports. - *

- * The path of an edge is the position of the source port, followed by the positions of the bends, followed by the position - * of the target port. - *

- * @param edge the edge - * @returns the path of the given edge - */ - getPath(edge:yfiles.algorithms.Edge):yfiles.algorithms.YPointPath; - /** - * Returns the path of an edge, including the ports. - *

- * The path of an edge is the position of the source port, followed by the positions of the bends, followed by the position - * of the target port. - *

- * @param edge the edge - * @returns a list of {@link }s representing the path of the given edge - */ - getPathList(edge:yfiles.algorithms.Edge):yfiles.algorithms.YList; - /** - * Returns the control points of an edge. - * @param edge the edge - * @returns a list of {@link }s representing the sequence of control points of the edge - * @see yfiles.layout.IEdgeLayout - */ - getPointList(edge:yfiles.algorithms.Edge):yfiles.algorithms.YList; - /** - * Returns the control points of an edge. - * @param edge the edge - * @returns a {@link } representing the sequence of control points of the edge - * @see yfiles.layout.IEdgeLayout - */ - getPoints(edge:yfiles.algorithms.Edge):yfiles.algorithms.YPointPath; - /** - * Returns the size of the given node. - * @param node the node - * @returns the size of the node - * @see yfiles.layout.INodeLayout#width - * @see yfiles.layout.INodeLayout#height - */ - getSize(node:yfiles.algorithms.Node):yfiles.algorithms.YDimension; - /** - * Returns the absolute coordinates of the source point of the given edge. - * @param edge the edge - * @returns the absolute source point coordinates of the edge - */ - getSourcePointAbs(edge:yfiles.algorithms.Edge):yfiles.algorithms.YPoint; - /** - * Returns the relative coordinates of the source point of the given edge. - *

- * The coordinates are interpreted relative to the center of the source node. - *

- * @param edge the edge - * @returns the relative source point coordinates of the edge - * @see yfiles.layout.IEdgeLayout#sourcePoint - */ - getSourcePointRel(edge:yfiles.algorithms.Edge):yfiles.algorithms.YPoint; - /** - * Returns the absolute coordinates of the target point of the given edge. - * @param edge the edge - * @returns the absolute target point coordinates of the edge - */ - getTargetPointAbs(edge:yfiles.algorithms.Edge):yfiles.algorithms.YPoint; - /** - * Returns the relative coordinates of the target point of the given edge. - *

- * The coordinates are interpreted relative to the center of the target node. - *

- * @param edge the edge - * @returns the relative target point coordinates of the edge - * @see yfiles.layout.IEdgeLayout#targetPoint - */ - getTargetPointRel(edge:yfiles.algorithms.Edge):yfiles.algorithms.YPoint; - /** - * Returns the width of the given node. - * @param node the node - * @returns the width of the node - * @see yfiles.layout.INodeLayout#width - */ - getWidth(node:yfiles.algorithms.Node):number; - /** - * Returns the x-coordinate of the given node's upper-left corner. - * @param node the node - * @returns the x-value of the node's upper-left corner - * @see yfiles.layout.INodeLayout#x - */ - getX(node:yfiles.algorithms.Node):number; - /** - * Returns the y-coordinate of the given node's upper-left corner. - * @param node the node - * @returns the y-value of the node's upper-left corner - * @see yfiles.layout.INodeLayout#y - */ - getY(node:yfiles.algorithms.Node):number; - /** - * Moves the upper-left corner of a node by a given vector. - * @param node the node - * @param dx the x-component of the vector - * @param dy the y-component of the vector - */ - moveBy(node:yfiles.algorithms.Node,dx:number,dy:number):void; - /** - * Specifies the center coordinates of the given node. - * @param node the node - * @param x the new x-coordinate of the node's center - * @param y the new y-coordinate of the node's center - * @see yfiles.layout.INodeLayout - */ - setCenter(node:yfiles.algorithms.Node,x:number,y:number):void; - /** - * Specifies the center coordinates of the given node. - * @param node the node - * @param position the new location of the node's center - * @see yfiles.layout.INodeLayout - * @see yfiles.layout.LayoutGraph#setCenter - */ - setCenter(node:yfiles.algorithms.Node,position:yfiles.algorithms.YPoint):void; - /** - * Specifies the two end points of the given edge in absolute coordinates. - * @param edge the edge - * @param source the port on the source side of the edge - * @param target the port on the target side of the edge - * @see yfiles.layout.LayoutGraph#setSourcePointAbs - * @see yfiles.layout.LayoutGraph#setTargetPointAbs - */ - setEndPointsAbs(edge:yfiles.algorithms.Edge,source:yfiles.algorithms.YPoint,target:yfiles.algorithms.YPoint):void; - /** - * Specifies the coordinates of the upper-left corner of the given node. - * @param node the node - * @param x the new x-coordinate of the upper-left corner - * @param y the new y-coordinate of the upper-left corner - * @see yfiles.layout.INodeLayout#setLocation - */ - setLocation(node:yfiles.algorithms.Node,x:number,y:number):void; - /** - * Specifies the coordinates of the upper-left corner of the given node. - * @param node the node - * @param position the new location of the upper-left corner - * @see yfiles.layout.INodeLayout#setLocation - * @see yfiles.layout.LayoutGraph#setLocation - */ - setLocation(node:yfiles.algorithms.Node,position:yfiles.algorithms.YPoint):void; - /** - * Sets the path of the given edge. - *

- * The path of an edge is the position of the source port, followed by the positions of the bends, followed by the position - * of the target port. - *

- *

- * Both source and target port are expected to be given in absolute coordinates. - *

- * @param edge an edge in the graph - * @param path the list of {@link }s representing the new path sequence of the edge - */ - setPath(edge:yfiles.algorithms.Edge,path:yfiles.algorithms.YList):void; - /** - * Sets the path of the given edge. - *

- * The path of an edge is the position of the source port, followed by the positions of the bends, followed by the position - * of the target port. - *

- *

- * Both source and target port are expected to be given in absolute coordinates. - *

- * @param edge an edge in the graph - * @param path the new path sequence of the edge - */ - setPath(edge:yfiles.algorithms.Edge,path:yfiles.algorithms.YPointPath):void; - /** - * Sets the control points of the given edge. - *

- * The source and target points of the edge will not be modified. - *

- * @param edge an edge in the graph - * @param points the list of {@link }s representing the new sequence of control points - */ - setPoints(edge:yfiles.algorithms.Edge,points:yfiles.algorithms.YList):void; - /** - * Sets the control points of the given edge. - *

- * The source and target points of the edge will not be modified. - *

- * @param edge an edge in the graph - * @param points the new sequence of control points - */ - setPoints(edge:yfiles.algorithms.Edge,points:yfiles.algorithms.YPointPath):void; - /** - * Specifies the width and height of the given node. - * @param node the node - * @param width the new width of the node - * @param height the new height of the node - * @see yfiles.layout.INodeLayout#setSize - */ - setSize(node:yfiles.algorithms.Node,width:number,height:number):void; - /** - * Specifies the size of the given node. - * @param node the node - * @param size the new size of the node - * @see yfiles.layout.LayoutGraph#setSize - * @see yfiles.layout.INodeLayout#setSize - */ - setSize(node:yfiles.algorithms.Node,size:yfiles.algorithms.YDimension):void; - /** - * Specifies the absolute coordinates of the source point of the given edge. - * @param edge the edge - * @param point the new absolute source point coordinates of the edge - */ - setSourcePointAbs(edge:yfiles.algorithms.Edge,point:yfiles.algorithms.YPoint):void; - /** - * Specifies the relative coordinates of the source point of the given edge. - *

- * The coordinates are interpreted relative to the center of the source node. - *

- * @param edge the edge - * @param point the new relative source point coordinates of the edge - * @see yfiles.layout.IEdgeLayout#sourcePoint - */ - setSourcePointRel(edge:yfiles.algorithms.Edge,point:yfiles.algorithms.YPoint):void; - /** - * Specifies the absolute coordinates of the target point of the given edge. - * @param edge the edge - * @param point the new absolute target point coordinates of the edge - */ - setTargetPointAbs(edge:yfiles.algorithms.Edge,point:yfiles.algorithms.YPoint):void; - /** - * Specifies the relative coordinates of the target point of the given edge. - *

- * The coordinates are interpreted relative to the center of the target node. - *

- * @param edge the edge - * @param point the new relative target point coordinates of the edge - * @see yfiles.layout.IEdgeLayout#targetPoint - */ - setTargetPointRel(edge:yfiles.algorithms.Edge,point:yfiles.algorithms.YPoint):void; - /** - * Gets a list of all edges in the graph. - * @type {yfiles.algorithms.EdgeList} - */ - edgeList:yfiles.algorithms.EdgeList; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.LayoutGraph; - } - /** - * The {@link yfiles.layout.LayoutGraphUtilities} provides several helper and utility functions for {@link yfiles.layout.LayoutGraph} and - * the {@link yfiles.layout.ILayoutAlgorithm layout algorithms}. - * @see yfiles.layout.LayoutGraph - * @class - * @static - */ - export interface LayoutGraphUtilities extends yfiles.lang.Object{} - export class LayoutGraphUtilities { - /** - * Aligns the specified nodes either vertically or horizontally according to the specified node alignment mode. - *

- * For vertical arrangements, nodes are either {@link yfiles.layout.NodeAlignment#LEADING top-aligned}, {@link yfiles.layout.NodeAlignment#CENTERED center-aligned}, {@link yfiles.layout.NodeAlignment#TRAILING bottom-aligned}, or {@link yfiles.layout.NodeAlignment#DISTRIBUTED vertically distributed}. - *

- *

- * For horizontal arrangements, nodes are either {@link yfiles.layout.NodeAlignment#LEADING left-aligned}, {@link yfiles.layout.NodeAlignment#CENTERED center-aligned}, {@link yfiles.layout.NodeAlignment#TRAILING right-aligned}, or {@link yfiles.layout.NodeAlignment#DISTRIBUTED horizontally distributed}. - *

- *

- * In this context, distributed means that the specified nodes are placed in such a way that the projections of their bounds onto the - * vertical or horizontal coordinate axis do not overlap. For example, after vertically distributing nodes, (n1.y + n1.height) <= n2.y - * for two consecutively placed nodes n1 and n2. - *

- * @param graph the graph that contains the specified nodes - * @param nodes the subset of the specified graph's nodes that is arranged - * @param referenceNode if null, the common coordinate for aligning the specified nodes is calculated as the the vertical minimum (top-aligned), - * the vertical center, the vertical maximum (bottom-aligned), the horizontal minimum (left-aligned), the horizontal - * center, or the horizontal maximum (right-aligned) of the bounds of the specified nodes; otherwise the appropriate - * coordinate of the given reference node's bounds is used as common coordinate for aligning the specified nodes. The - * reference node is ignored when {@link #DISTRIBUTED distributing} nodes. - * @param vertical true if nodes should be aligned (or distributed) according to their y-coordinates; otherwise nodes are aligned (or - * distributed) according to their x-coordinates. - * @param mode one of the valid alignment modes - * @static - */ - static alignNodeLayouts(graph:yfiles.layout.LayoutGraph,nodes:yfiles.algorithms.NodeList,referenceNode:yfiles.algorithms.Node,vertical:boolean,mode:yfiles.layout.NodeAlignment):void; - /** - * Reassigns the bounds of the rectangles in a grid to fit in a large rectangle with an aspect ratio close to the specified - * aspect ratio. - *

- * The aspect ratio must be greater than 0. - *

- * @param rectangles the rectangles whose coordinates will be modified - * @param finalRect the exact dimension will be placed in this rectangle - * @param aspectRatio the preferred aspect ratio of the grid - * @returns the dimension of the grid - * @throws {Stubs.Exceptions.ArgumentError} if the given aspect ratio is less than or equal to zero - * @static - */ - static arrangeRectangleGrid(rectangles:yfiles.algorithms.Rectangle2D[],finalRect:yfiles.algorithms.Rectangle2D,aspectRatio:number):yfiles.algorithms.YDimension; - /** - * Reassigns the bounds of the rectangles in multiple rows to fit the preferred width and height. - *

- * The rectangles will be placed within this bound, arranged in rows, where each row may be split into more sub-rows. This - * often leads to more compact results than provided by the procedure used in - * {@link yfiles.layout.LayoutGraphUtilities#arrangeRectangleRows}. A row will be subdivided into more rows, if two successive - * rectangles to be placed in the row could be placed stacked within this row without making the row larger in height. - *

- *

- * The preferred width and height should be greater than 0, otherwise the nodes are not arranged. - *

- * @param rectangles the rectangles to arrange (coordinates will be assigned) - * @param finalRect the exact resulting dimension will be stored in this rectangle - * @param preferredWidth the preferred width of the result rectangle - * @param preferredHeight the preferred height of the result rectangle - * @param compaction true if the algorithm tries to always minimize the resulting dimension, whilst respecting the given constraints, false - * otherwise - * @param constraintMode the width or height constraints to consider - * @param [alignment=yfiles.layout.RowAlignment.LEADING] the alignment inside a row - * @returns the number of rows used - * @see yfiles.layout.LayoutGraphUtilities#arrangeRectangleMultiRows - * @static - */ - static arrangeRectangleMultiRows(rectangles:yfiles.algorithms.Rectangle2D[],finalRect:yfiles.algorithms.Rectangle2D,preferredWidth:number,preferredHeight:number,compaction:boolean,constraintMode:yfiles.layout.MultiRowConstraint,alignment?:yfiles.layout.RowAlignment):number; - /** - * Reassigns the bounds of the rectangles to fit in a large rectangle with an aspect ratio close to the specified aspect - * ratio. - *

- * This is achieved by arranging the rectangles in rows. - *

- *

- * The aspect ratio must be greater than 0. - *

- * @param rectangles the rectangles whose coordinates will be modified - * @param finalRect the exact dimension of the resulting rectangle - * @param aspectRatio the preferred aspect ratio of the resulting rectangle - * @param [alignment=yfiles.layout.RowAlignment.LEADING] one of the valid row alignments - * @returns the number of used rows - * @throws {Stubs.Exceptions.ArgumentError} if the aspect ratio is 0 or less - * @static - */ - static arrangeRectangleRows(rectangles:yfiles.algorithms.Rectangle2D[],finalRect:yfiles.algorithms.Rectangle2D,aspectRatio:number,alignment?:yfiles.layout.RowAlignment):number; - /** - * Applies the reversed layout of the first edge to the second edge. - * @param graph the graph to which both edges belong - * @param edge1 the edge which adopts the points - * @param edge2 the template - * @static - */ - static assignReverseLayout(graph:yfiles.layout.LayoutGraph,edge1:yfiles.algorithms.Edge,edge2:yfiles.algorithms.Edge):void; - /** - * Flips the orientation of a given rectangle, if its up vector points downward ({@link yfiles.algorithms.YOrientedRectangle#upY upY} > 0). - *

- * That means, it rotates the rectangle by 180 degrees without changing the rectangle's center. - *

- * @param rect the given rectangle - * @returns true if the given rectangle was flipped, false otherwise - * @static - */ - static autoFlipBox(rect:yfiles.algorithms.YOrientedRectangle):boolean; - /** - * Clips the path of the given edge on the bounding box of the source and target points. - *

- * On a clipped edge, the source and target port will be located at the border of the corresponding node. - *

- * @param graph the graph to which the edge belongs - * @param edge the edge to clip - * @static - */ - static clipEdgeOnBounds(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):void; - /** - * Returns the path of an edge clipped on the bounding box of the source and target node. - *

- * On the clipped edge, the source and target port will be located at the border of the corresponding node. - *

- * @param graph the graph to which the edge belongs - * @param edge the clipped edge - * @returns the clipped path of the edge - * @static - */ - static clipEdgePathOnBounds(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):yfiles.algorithms.YPointPath; - /** - * Returns the path of an edge clipped on insets of the bounding box of the source and target node. - *

- * On the clipped edge, the source and target port will be located inside the node with an inset to the border of the - * corresponding node. - *

- * @param edge the clipped edge - * @param source the source of the edge - * @param target the target of the edge - * @param [inset=0.0] the inset of the node - * @returns the clipped path of the edge - * @static - */ - static clipEdgePathOnBounds(edge:yfiles.layout.IEdgeLayout,source:yfiles.layout.INodeLayout,target:yfiles.layout.INodeLayout,inset?:number):yfiles.algorithms.YPointPath; - /** - * Clips the path of all edges in the graph on the bounding box of their source and target points. - *

- * On a clipped edge, the source and target port will be located at the border of the corresponding node. - *

- * @param graph the graph - * @see yfiles.layout.LayoutGraphUtilities#clipEdgeOnBounds - * @static - */ - static clipEdgesOnBounds(graph:yfiles.layout.LayoutGraph):void; - /** - * Returns the path of a given edge path clipped on the given bounding boxes of the source and target node. - * @param path the path that will be clipped - * @param sourceBox the box of the source node that the given path should be clipped at - * @param targetBox the box of the target node that the given path should be clipped at - * @returns the path clipped on the given nodes boxes - * @static - */ - static clipPathOnBounds(path:yfiles.algorithms.YPointPath,sourceBox:yfiles.algorithms.YRectangle,targetBox:yfiles.algorithms.YRectangle):yfiles.algorithms.YPointPath; - /** - * Determines the main direction of the edge flow by analyzing the current layout of the graph. - *

- * The method only considers edges that are marked in the given {@link yfiles.algorithms.IDataProvider}. - *

- * @param graph the underlying graph - * @param considerEdges the edges to consider - * @returns one of the predefined flow directions - * @static - */ - static determineEdgeFlowDirection(graph:yfiles.layout.LayoutGraph,considerEdges:yfiles.algorithms.IDataProvider):yfiles.layout.EdgeFlow; - /** - * Returns a {@link string} representation of the path of the given edge. - * @param graph the graph to which the edge belongs - * @param edge the edge - * @returns the {@link } that contains all control points of the edge - * @static - */ - static edgeLayoutString(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):string; - /** - * Returns the bounding box of the given edge. - *

- * In this case, the bounding box is the smallest paraxial rectangle which contains the control points as well as the - * absolute coordinates of the source and target point of the edge. - *

- * @param graph the graph that contains the edge - * @param edge the edge - * @returns the bounding box of the edge - * @see yfiles.layout.LayoutGraph#getSourcePointAbs - * @see yfiles.layout.LayoutGraph#getTargetPointAbs - * @see yfiles.layout.LayoutGraph#getLayout - * @static - */ - static getBoundingBox(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):yfiles.algorithms.Rectangle2D; - /** - * Returns the bounding box of the given node. - *

- * In this case, the bounding box is the smallest paraxial rectangle which contains the given node. It is identical to the - * node's bounds. - *

- * @param graph the graph that contains the node - * @param node the node - * @returns the bounding box of the node - * @see yfiles.layout.LayoutGraph#getLayout - * @static - */ - static getBoundingBox(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node):yfiles.algorithms.Rectangle2D; - /** - * Returns the bounding box of the nodes and edges accessible through the given cursors, optionally including node labels, - * edge labels or {@link yfiles.layout.NodeHalo}s. - *

- * In this case, the bounding box is the smallest paraxial rectangle which contains the given nodes and the control points - * as well as the source and target points of all edges. If node or edge labels should be included, it also contains their - * boxes. {@link yfiles.layout.NodeHalo}s can also extend the bounding box if desired. - *

- * @param graph the graph that contains the given nodes and edges - * @param nodes the nodes to include in the bounding box - * @param edges the edges to include in the bounding box - * @param includeNodeLabels true if labels of nodes should be included, false otherwise - * @param includeEdgeLabels true if labels of edges should be included, false otherwise - * @param [includeHalos=false] true if {@link }s should be included, false otherwise - * @returns the bounding box of the given nodes and edges - * @static - */ - static getBoundingBox(graph:yfiles.layout.LayoutGraph,nodes:yfiles.algorithms.INodeCursor,edges:yfiles.algorithms.IEdgeCursor,includeNodeLabels:boolean,includeEdgeLabels:boolean,includeHalos?:boolean):yfiles.algorithms.Rectangle2D; - /** - * Returns the bounding box of the nodes and edges accessible through the given cursors, optionally including node labels - * and edge labels. - *

- * In this case, the bounding box is the smallest paraxial rectangle which contains the given nodes and the control points - * as well as the source and target points of all edges. If labels should be included, it also contains their boxes. - *

- * @param graph the graph that contains the given nodes and edges - * @param nodes the nodes to include in the bounding box - * @param edges the edges to include in the bounding box - * @param includeLabels true if labels of nodes and edges should be included, false otherwise - * @returns the bounding box of the given nodes and edges - * @see yfiles.layout.LayoutGraphUtilities#getBoundingBox - * @static - */ - static getBoundingBox(graph:yfiles.layout.LayoutGraph,nodes:yfiles.algorithms.INodeCursor,edges:yfiles.algorithms.IEdgeCursor,includeLabels:boolean):yfiles.algorithms.Rectangle2D; - /** - * Returns the bounding box of the nodes and edges accessible through the given cursors. - *

- * In this case, the bounding box is the smallest paraxial rectangle which contains the given nodes and the control points - * as well as the source and target points of all edges. - *

- * @param graph the graph that contains the nodes and edges - * @param nodes the nodes to include in the bounding box - * @param edges the edges to include in the bounding box - * @returns the bounding box containing the given nodes and edges - * @see yfiles.layout.LayoutGraphUtilities#getBoundingBoxOfEdges - * @see yfiles.layout.LayoutGraphUtilities#getBoundingBoxOfNodes - * @static - */ - static getBoundingBox(graph:yfiles.layout.LayoutGraph,nodes:yfiles.algorithms.INodeCursor,edges:yfiles.algorithms.IEdgeCursor):yfiles.algorithms.Rectangle2D; - /** - * Returns the bounding box of the edges accessible through the given cursor. - *

- * In this case, the bounding box is the smallest paraxial rectangle which contains the control points as well as the - * absolute coordinates of the source and target points of all given edges. - *

- * @param graph the graph that contains the edges - * @param edges the edges to include in the bounding box - * @returns the bounding box containing the given edges - * @see yfiles.layout.LayoutGraph#getSourcePointAbs - * @see yfiles.layout.LayoutGraph#getTargetPointAbs - * @see yfiles.layout.LayoutGraph#getLayout - * @static - */ - static getBoundingBoxOfEdges(graph:yfiles.layout.LayoutGraph,edges:yfiles.algorithms.IEdgeCursor):yfiles.algorithms.Rectangle2D; - /** - * Returns the bounding box of the nodes accessible through the given cursor. - *

- * In this case, the bounding box is the smallest paraxial rectangle which contains the given nodes. - *

- * @param graph the graph that contains the nodes - * @param nodes the nodes to include in the bounding box - * @returns the bounding box containing the given nodes - * @see yfiles.layout.LayoutGraph#getLayout - * @static - */ - static getBoundingBoxOfNodes(graph:yfiles.layout.LayoutGraph,nodes:yfiles.algorithms.INodeCursor):yfiles.algorithms.Rectangle2D; - /** - * Returns the {@link yfiles.layout.ILabelLayoutFactory} for the given graph. - * @param graph the graph - * @returns the label factory of the graph - * @static - */ - static getLabelFactory(graph:yfiles.layout.LayoutGraph):yfiles.layout.ILabelLayoutFactory; - /** - * Returns the upper-left corner of the paraxial bounding box of the given edge label as encoded by the specified model - * parameter. - *

- * The parameter describes the abstract position of the label within the specified model. The parameter must have been - * generated by that model. - *

- * @param model the {@link } used for placing the label - * @param labelSize the size of the label that should be placed - * @param edgeLayout the layout of the edge to which the label belongs - * @param sourceLayout the layout of the edge's source node - * @param targetLayout the layout of the edge's target node - * @param param the model parameter - * @returns the upper-left corner of the label's bounding box - * @see yfiles.layout.IEdgeLabelLayoutModel#getLabelPlacement - * @see yfiles.algorithms.YOrientedRectangle#boundingBox - * @static - */ - static getLabelPlacement(model:yfiles.layout.IEdgeLabelLayoutModel,labelSize:yfiles.algorithms.YDimension,edgeLayout:yfiles.layout.IEdgeLayout,sourceLayout:yfiles.layout.INodeLayout,targetLayout:yfiles.layout.INodeLayout,param:any):yfiles.algorithms.YPoint; - /** - * Returns the upper-left corner of the paraxial bounding box of the given node label as encoded by the specified model - * parameter. - *

- * The parameter describes the abstract position of the label within the specified model. The parameter must have been - * generated by that model. - *

- * @param model the {@link } used for placing the label - * @param labelSize the size of the label - * @param nodeLayout the layout of the node to which the label belongs - * @param param the model parameter - * @returns the upper-left corner of the label's bounding box - * @see yfiles.layout.INodeLabelLayoutModel#getLabelPlacement - * @see yfiles.algorithms.YOrientedRectangle#boundingBox - * @static - */ - static getLabelPlacement(model:yfiles.layout.INodeLabelLayoutModel,labelSize:yfiles.algorithms.YDimension,nodeLayout:yfiles.layout.INodeLayout,param:any):yfiles.algorithms.YPoint; - /** - * Returns the distance between the centers of the two given nodes. - * @param graph the graph to which the nodes belong - * @param node1 the first node - * @param node2 the second node - * @returns the distance between the nodes' centers - * @static - */ - static getNodeDistance(graph:yfiles.layout.LayoutGraph,node1:yfiles.algorithms.Node,node2:yfiles.algorithms.Node):number; - /** - * Returns a {@link string} representation of all node positions in the graph. - * @param graph the graph - * @returns the {@link } containing all node locations - * @see yfiles.layout.LayoutGraph#getLocation - * @static - */ - static getNodePositions(graph:yfiles.layout.LayoutGraph):string; - /** - * Returns the length of the path of the given edge. - *

- * The path starts at the source point, traverses through all control points and ends at the target point. - *

- * @param graph the graph to which the edge belongs - * @param edge the edge - * @returns the length of the edge's path - * @static - */ - static getPathLength(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):number; - /** - * Checks whether or not the path of an edge is outside the bounding box of the source and target node, considering the - * given halo. - *

- * The edge is outside the nodes if its control points as well as the source and target point are not inside the nodes' - * bounding boxes. - *

- *

- * The nodes can be enlarged by a halo to check if the edge keeps some distance to the nodes. - *

- * @param edge the edge - * @param source the source of the edge - * @param target the target of the edge - * @param halo the halo for the nodes - * @returns true if the edge is outside the nodes, false otherwise - * @static - */ - static isEdgeOutsideNodes(edge:yfiles.layout.IEdgeLayout,source:yfiles.layout.INodeLayout,target:yfiles.layout.INodeLayout,halo:number):boolean; - /** - * Checks whether or not the path of an edge is outside the bounding box of the source and target node. - *

- * The edge is outside the nodes if its control points as well as the source and target point are not inside the nodes' - * bounding boxes. - *

- * @param graph the graph to which the edge belongs - * @param edge the edge - * @returns true if the edge is outside the nodes, false otherwise - * @static - */ - static isEdgeOutsideNodes(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):boolean; - /** - * Determines whether or not most of the edges of the graph are routed octilinear. - *

- * The method only considers edges marked in the given {@link yfiles.algorithms.IDataProvider}. - *

- * @param graph the underlying graph - * @param considerEdges the edges to consider - * @returns true if most of the edges in the graph are routed octilinear, false otherwise - * @static - */ - static isUsingOctilinearEdgeRoutes(graph:yfiles.layout.LayoutGraph,considerEdges:yfiles.algorithms.IDataProvider):boolean; - /** - * Determines whether or not most of the edges of the graph are routed orthogonally. - *

- * The method only considers edges marked in the given {@link yfiles.algorithms.IDataProvider}. - *

- * @param graph the underlying graph - * @param considerEdges the edges to consider - * @returns true if most of the edges in the graph are routed orthogonally, false otherwise - * @static - */ - static isUsingOrthogonalEdgeRoutes(graph:yfiles.layout.LayoutGraph,considerEdges:yfiles.algorithms.IDataProvider):boolean; - /** - * Moves all control points of the given edge by the vector (dx,dy). - * @param graph the graph - * @param edge the edge - * @param dx the horizontal distance to move - * @param dy the vertical distance to move - * @static - */ - static moveEdge(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge,dx:number,dy:number):void; - /** - * Moves the control points of all edges accessible through the given {@link yfiles.algorithms.IEdgeCursor} by the vector (dx,dy). - * @param graph the graph - * @param edges the edges to be moved - * @param dx the horizontal distance to move - * @param dy the vertical distance to move - * @static - */ - static moveEdges(graph:yfiles.layout.LayoutGraph,edges:yfiles.algorithms.IEdgeCursor,dx:number,dy:number):void; - /** - * Moves the given node by the vector (dx,dy). - * @param graph the graph - * @param node the node - * @param dx the horizontal distance to move - * @param dy the vertical distance to move - * @static - */ - static moveNode(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node,dx:number,dy:number):void; - /** - * Moves all nodes accessible through the given {@link yfiles.algorithms.INodeCursor} by the vector (dx,dy). - * @param graph the graph - * @param nodes the nodes to be moved - * @param dx the horizontal distance to move - * @param dy the vertical distance to move - * @static - */ - static moveNodes(graph:yfiles.layout.LayoutGraph,nodes:yfiles.algorithms.INodeCursor,dx:number,dy:number):void; - /** - * Moves the subgraph induced by the nodes accessible through the given {@link yfiles.algorithms.INodeCursor} by the vector - * (dx,dy). - * @param graph the graph that contains the subgraph - * @param nodes the nodes that induce the subgraph - * @param dx the horizontal distance to move - * @param dy the vertical distance to move - * @static - */ - static moveSubgraph(graph:yfiles.layout.LayoutGraph,nodes:yfiles.algorithms.INodeCursor,dx:number,dy:number):void; - /** - * Moves the subgraph induced by the edges accessible through the given {@link yfiles.algorithms.IEdgeCursor} by the vector - * (dx,dy). - * @param graph the graph that contains the subgraph - * @param edges the edges that induce the subgraph - * @param dx the horizontal distance to move - * @param dy the vertical distance to move - * @static - */ - static moveSubgraphOfEdges(graph:yfiles.layout.LayoutGraph,edges:yfiles.algorithms.IEdgeCursor,dx:number,dy:number):void; - /** - * Checks whether or not the path of the given edge intersects the interior of a given rectangular area. - * @param graph the graph to which the edge belongs - * @param edge the edge - * @param rect the rectangular area to check for intersection - * @returns true if the edge path intersects with the given rectangle, false otherwise - * @static - */ - static pathIntersectsRect(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge,rect:yfiles.algorithms.Rectangle2D):boolean; - /** - * Removes successive bends that have the same coordinates from the given edge. - * @param graph the graph - * @param edge the edge - * @static - */ - static removeDuplicateBends(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):void; - /** - * Removes successive bends that have the same coordinates from all edges in the graph. - * @param graph the graph - * @static - */ - static removeDuplicateBends(graph:yfiles.layout.LayoutGraph):void; - /** - * Assigns a trivial path which has no control points to the specified edge. - * @param graph the graph - * @param edge the edge - * @param [resetPorts=true] true if the ports of the edge should be set to the center of the corresponding nodes, false otherwise - * @static - */ - static resetPath(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge,resetPorts?:boolean):void; - /** - * Assigns a trivial path which has no control points to all edges in the specified graph. - * @param graph the graph - * @param [resetPorts=true] true if the ports of the edges should be set to the center of the corresponding nodes, false otherwise - * @static - */ - static resetPaths(graph:yfiles.layout.LayoutGraph,resetPorts?:boolean):void; - /** - * Sets the ports of all edges in the graph to the center of the nodes. - * @param graph the graph - * @see yfiles.layout.LayoutGraph#setSourcePointRel - * @see yfiles.layout.LayoutGraph#setTargetPointRel - * @static - */ - static resetPorts(graph:yfiles.layout.LayoutGraph):void; - /** - * Reverses the layout of an edge. - *

- * The order of the control points is reversed and source and target point are swapped. - *

- * @param el the layout information of an edge - * @static - */ - static reverseEdgeLayout(el:yfiles.layout.IEdgeLayout):void; - /** - * Rounds the locations of the control points and ports of the given edge to integer values. - * @param graph the graph to which the edge belongs - * @param edge the edge whose values are rounded - * @static - */ - static roundEdgeLayout(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):void; - /** - * Rounds coordinates and sizes in the layout of an entire graph to integer values. - * @param graph the graph - * @see yfiles.layout.LayoutGraphUtilities#roundNodeLayout - * @see yfiles.layout.LayoutGraphUtilities#roundEdgeLayout - * @static - */ - static roundLayout(graph:yfiles.layout.LayoutGraph):void; - /** - * Rounds the location and size of the given node to integer values. - * @param graph the graph to which the node belongs - * @param node the node whose values are rounded - * @static - */ - static roundNodeLayout(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node):void; - /** - * Routes a list of edges which are incident to the same nodes in parallel, optionally joining the end points. - *

- * All edges get a path that is parallel to the path of the first (leading) edge. - *

- *

- * The position of the leading edge may be adjusted if there is an odd number of parallel edges. It will be moved from the - * center to achieve a more symmetric port assignment. - *

- * @param graph the graph - * @param leadingEdge the leading edge - * @param edges the list of edges that will be aligned with the leading edge - * @param lineDistance the distance between two edges - * @param [adjustLeadingEdge=false] true if the leading edge should be adjusted if the size of list is odd, false otherwise - * @param [joinEnds=false] true if the edges should share their end points (the ones of the leading edge), false otherwise - * @param [absJoinDistance=0.0] the absolute distance between the end points and the beginning of the parallel segment routing if the ends are joined - * @param [relJoinDistance=0.0] the relative distance, measured relative to the length of the first/last segments if the ends are joined - * @static - */ - static routeEdgesParallel(graph:yfiles.layout.LayoutGraph,leadingEdge:yfiles.algorithms.Edge,edges:yfiles.algorithms.EdgeList,lineDistance:number,adjustLeadingEdge?:boolean,joinEnds?:boolean,absJoinDistance?:number,relJoinDistance?:number):void; - /** - * Routes a list of edges which are incident to the same nodes in parallel, optionally joining the end points. - *

- * All edges get a path that is parallel to the path of the first (leading) edge. - *

- *

- * The position of the leading edge may be adjusted if there is an odd number of parallel edges. It will be moved from the - * center to achieve a more symmetric port assignment. - *

- * @param {Object} options The parameters to pass. - * @param options.graph the graph - * @param options.leadingEdge the leading edge - * @param options.edges the list of edges that will be aligned with the leading edge - * @param options.lineDistance the distance between two edges - * @param [options.adjustLeadingEdge=false] true if the leading edge should be adjusted if the size of list is odd, false otherwise - * @param [options.joinEnds=false] true if the edges should share their end points (the ones of the leading edge), false otherwise - * @param [options.absJoinDistance=0.0] the absolute distance between the end points and the beginning of the parallel segment routing if the ends are joined - * @param [options.relJoinDistance=0.0] the relative distance, measured relative to the length of the first/last segments if the ends are joined - * @static - */ - static routeEdgesParallel(options:{graph:yfiles.layout.LayoutGraph,leadingEdge:yfiles.algorithms.Edge,edges:yfiles.algorithms.EdgeList,lineDistance:number,adjustLeadingEdge?:boolean,joinEnds?:boolean,absJoinDistance?:number,relJoinDistance?:number}):void; - /** - * Routes two edges which are incident to the same nodes in parallel, optionally joining the end points. - *

- * The second edge gets a path that is parallel to the path of the first (leading) edge. - *

- * @param graph the graph - * @param leadingEdge the leading edge - * @param edge the edge to be adjusted - * @param lineDistance the distance between the two edges - * @param [joinEnds=false] true if the edges should share their end points (the ones of the leading edge), false otherwise - * @param [absJoinDistance=0.0] the absolute distance between the end points and the beginning of the parallel segment routing if the ends are joined - * @param [relJoinDistance=0.0] the relative distance, measured relative to the length of the first/last segments if the ends are joined - * @static - */ - static routeEdgesParallel(graph:yfiles.layout.LayoutGraph,leadingEdge:yfiles.algorithms.Edge,edge:yfiles.algorithms.Edge,lineDistance:number,joinEnds?:boolean,absJoinDistance?:number,relJoinDistance?:number):void; - /** - * Routes two edges which are incident to the same nodes in parallel, optionally joining the end points. - *

- * The second edge gets a path that is parallel to the path of the first (leading) edge. - *

- * @param {Object} options The parameters to pass. - * @param options.graph the graph - * @param options.leadingEdge the leading edge - * @param options.edge the edge to be adjusted - * @param options.lineDistance the distance between the two edges - * @param [options.joinEnds=false] true if the edges should share their end points (the ones of the leading edge), false otherwise - * @param [options.absJoinDistance=0.0] the absolute distance between the end points and the beginning of the parallel segment routing if the ends are joined - * @param [options.relJoinDistance=0.0] the relative distance, measured relative to the length of the first/last segments if the ends are joined - * @static - */ - static routeEdgesParallel(options:{graph:yfiles.layout.LayoutGraph,leadingEdge:yfiles.algorithms.Edge,edge:yfiles.algorithms.Edge,lineDistance:number,joinEnds?:boolean,absJoinDistance?:number,relJoinDistance?:number}):void; - /** - * Routes a self-loop. - *

- * For a self-loop edge, source and target are identical. The path of the self-loop will start at the top of the node, go - * around the upper-left corner and end at the left side of the node. - *

- * @param graph the graph to which the edge belongs - * @param edge the self-loop - * @static - */ - static routeSelfLoop(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):void; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.LayoutGraphUtilities; - } - /** - * A {@link yfiles.layout.LayoutMultiplexer} delegates its layout calls to a core layout algorithm that is dynamically chosen at - * runtime by inspecting the nodes of the input graph. - *

- * If a {@link yfiles.algorithms.IDataProvider} is registered with the given graph using the look-up key - * {@link yfiles.layout.LayoutMultiplexer#LAYOUT_DP_KEY}, it is used for retrieving the {@link yfiles.layout.ILayoutAlgorithm} objects that - * are stored for the graph's nodes. If no such {@link yfiles.algorithms.IDataProvider} is registered, this layout stage's {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} - * (if any) is used for the layout calculation of all nodes. - *

- *

- * Note that the first non-null {@link yfiles.layout.ILayoutAlgorithm} instance retrieved from the {@link yfiles.algorithms.IDataProvider} - * is used for all nodes. - *

- *

- * The main purpose of this class is to enable the use of individual layout algorithms for different components (when used - * as the core layout algorithm of {@link yfiles.layout.ComponentLayout}) or for the contents of group nodes (when used as the core - * layout algorithm of {@link yfiles.layout.RecursiveGroupLayout}). - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface LayoutMultiplexer extends yfiles.layout.LayoutStageBase{} - export class LayoutMultiplexer { - /** - * Creates a new instance of {@link yfiles.layout.LayoutMultiplexer}. - */ - constructor(); - /** - * Returns the core layout algorithm associated with the nodes contained in the given graph. - *

- * This implementation looks up the layout algorithm in the {@link yfiles.algorithms.IDataProvider} registered with the key - * {@link yfiles.layout.LayoutMultiplexer#LAYOUT_DP_KEY}. The first non-null {@link yfiles.layout.ILayoutAlgorithm layout algorithm} instance found for a node of the - * given graph will be returned by this method. If no algorithm is registered at all, it will fall back to the - * {@link yfiles.layout.LayoutStageBase#coreLayout default core layout algorithm}. - *

- *

- * This method is called in {@link yfiles.layout.LayoutMultiplexer#applyLayout} and may be overridden to implement a different way - * of selecting the {@link yfiles.layout.ILayoutAlgorithm layout algorithms}. - *

- * @param graph the input graph - * @returns the according layout algorithm - * @protected - */ - getCoreLayout(graph:yfiles.layout.LayoutGraph):yfiles.layout.ILayoutAlgorithm; - /** - * Data provider key for assigning layout algorithms to the nodes - *

- * At runtime, the layout algorithms are determined and applied to the current graph. The first non-null {@link yfiles.layout.ILayoutAlgorithm} - * instance is used for the whole graph. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static LAYOUT_DP_KEY:yfiles.algorithms.NodeDpKey; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.LayoutMultiplexer; - } - /** - * Abstract base class implementing {@link yfiles.layout.ILayoutStage} that handles the management of the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *

- * Subclasses of this stage can use the provided methods, such that the management of the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} does not - * need to be considered anymore. - *

- * @see yfiles.layout.MultiStageLayout - * @class - * @implements {yfiles.layout.ILayoutStage} - */ - export interface LayoutStageBase extends yfiles.lang.Object,yfiles.layout.ILayoutStage{} - export class LayoutStageBase { - /** - * Creates a new {@link yfiles.layout.ILayoutStage} instance with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [coreLayouter=null] The core layout algorithm. - */ - constructor(coreLayouter?:yfiles.layout.ILayoutAlgorithm); - /** - * - * @param graph - * @abstract - */ - applyLayout(graph:yfiles.layout.LayoutGraph):void; - /** - * Invokes the layout process of the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *

- * Overriding classes may call this method during {@link yfiles.layout.ILayoutAlgorithm#applyLayout} to delegate arranging the - * graph to the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. They can add pre- and post-processing code before and after this call. - *

- * @param graph the input graph - * @protected - */ - applyLayoutCore(graph:yfiles.layout.LayoutGraph):void; - /** - * Gets or sets the core layout algorithm that is wrapped by this stage. - * @type {yfiles.layout.ILayoutAlgorithm} - */ - coreLayout:yfiles.layout.ILayoutAlgorithm; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.LayoutStageBase; - } - /** - * {@link yfiles.layout.MinimumNodeSizeStage} enforces a given minimum width/height of the nodes of a graph during the layout - * process. - *

- * It temporarily enlarges nodes whose width/height is below the specified minimum values. - *

- *

- * This {@link yfiles.layout.ILayoutStage} is especially useful to prevent that the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} has to handle zero-sized - * nodes or nodes with negative sizes. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface MinimumNodeSizeStage extends yfiles.layout.LayoutStageBase{} - export class MinimumNodeSizeStage { - /** - * Creates a new {@link yfiles.layout.MinimumNodeSizeStage} instance using the given {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} along with a specific - * minimum width and height for the nodes. - * @param coreLayouter the core layout routine - * @param minWidth the minimum width of nodes that should be enforced - * @param minHeight the minimum height of nodes that should be enforced - */ - constructor(coreLayouter:yfiles.layout.ILayoutAlgorithm,minWidth:number,minHeight:number); - /** - * Creates a new {@link yfiles.layout.MinimumNodeSizeStage} instance using the given {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *

- * The nodes will be enlarged to be at least 1 wide and 1 high. - *

- * @param coreLayouter the core routine - */ - constructor(coreLayouter:yfiles.layout.ILayoutAlgorithm); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.MinimumNodeSizeStage; - } - /** - * An abstract base class for layout algorithms that provides services to simplify and decompose the input graph before it - * is passed to the {@link yfiles.layout.MultiStageLayout#applyLayoutCore core layout algorithm} itself. - *

- * Subclasses of this layout algorithm have to provide implementations for the abstract method - * {@link yfiles.layout.MultiStageLayout#applyLayoutCore}. It invokes the actual layout routine of this layout algorithm. - *

- *

- * Concept - *

- *

- * This class provides a configurable pipeline that contains {@link yfiles.layout.ILayoutStage}s that add preprocessing steps - * and/or postprocessing steps to the {@link yfiles.layout.MultiStageLayout#applyLayoutCore layout algorithm}. {@link yfiles.layout.MultiStageLayout} provides some predefined - * {@link yfiles.layout.ILayoutStage}s, that simplify the input graph for the layout algorithm and complement the result. It is - * also possible to add custom {@link yfiles.layout.ILayoutStage}s which are executed {@link yfiles.layout.MultiStageLayout#prependStage before} or {@link yfiles.layout.MultiStageLayout#appendStage after the predefined ones}. - *

- *

- * Each {@link yfiles.layout.ILayoutStage} in the pipeline wraps its successor. When the layout pipeline is processed, the - * preprocessing code of the preceding {@link yfiles.layout.ILayoutStage} is executed before the code in the current {@link yfiles.layout.ILayoutStage} - * while the postprocessing code is executed afterwards. - *

- *

- * The pipeline of predefined {@link yfiles.layout.ILayoutStage}s of {@link yfiles.layout.MultiStageLayout} (when all are activated) causes - * the following sequence of steps: - *

- *
    - *
  1. Hides the group nodes.
  2. - *
  3. Hides all except for the induced subgraph.
  4. - *
  5. Decomposes the graph into its connected components. Performs steps 4-12 on each component.
  6. - *
  7. Prepares for label placement.
  8. - *
  9. Prepares the layout for an orientation change.
  10. - *
  11. Hides self-loops.
  12. - *
  13. Hides parallel edges.
  14. - *
  15. Invokes the {@link yfiles.layout.MultiStageLayout#applyLayoutCore layout algorithm} on the simplified graph.
  16. - *
  17. Un-hides and routes parallel edges.
  18. - *
  19. Un-hides and routes self-loops.
  20. - *
  21. Completes orientation change of the layout.
  22. - *
  23. Assigns label positions.
  24. - *
  25. Arranges the connected components of the graph.
  26. - *
  27. Un-hides non-induced subgraph.
  28. - *
  29. Un-hides the group nodes.
  30. - *
- *

- * In order to take effect, a stage that is not already activated by default needs to be activated using the corresponding - * method, e.g., {@link yfiles.layout.MultiStageLayout#hideGroupsStageEnabled}. Vice versa, a stage can also be deactivated, if necessary. - *

- * @class - * @implements {yfiles.layout.ILayoutAlgorithm} - */ - export interface MultiStageLayout extends yfiles.lang.Object,yfiles.layout.ILayoutAlgorithm{} - export class MultiStageLayout { - /** - * Creates a new {@link yfiles.layout.MultiStageLayout} instance with default settings. - */ - constructor(); - /** - * Appends the given {@link yfiles.layout.ILayoutStage} to the layout pipeline. - *

- * Stages that are added with this method will be invoked at the very end of the layout pipeline. This means after all - * prepended {@link yfiles.layout.ILayoutStage}s, all predefined stages, and all previously appended {@link yfiles.layout.ILayoutStage}s, - * but just before the invocation of the {@link yfiles.layout.MultiStageLayout#applyLayoutCore layout algorithm}. - *

- * @param stage the {@link } instance to be added - * @see yfiles.layout.MultiStageLayout#removeStage - * @see yfiles.layout.MultiStageLayout#prependStage - */ - appendStage(stage:yfiles.layout.ILayoutStage):void; - /** - * Calculates a layout for the given graph and applies it directly to the graph. - *

- * This method executes all activated {@link yfiles.layout.ILayoutStage}s in the layout pipeline as well as the {@link yfiles.layout.MultiStageLayout#applyLayoutCore layout algorithm}. - *

- * @param layoutGraph the input graph - * @see yfiles.layout.MultiStageLayout#appendStage - * @see yfiles.layout.MultiStageLayout#prependStage - * @see yfiles.layout.MultiStageLayout#applyLayoutCore - */ - applyLayout(layoutGraph:yfiles.layout.LayoutGraph):void; - /** - * Invokes the core layout algorithm. - *

- * This method should be implemented by subclasses in order to perform the layout routine of the layout algorithm. - *

- * @param graph the input graph - * @abstract - */ - applyLayoutCore(graph:yfiles.layout.LayoutGraph):void; - /** - * Checks the sizes of the nodes to be non-zero. - * @param g The graph to check. - * @protected - */ - checkNodeSize(g:yfiles.layout.LayoutGraph):void; - /** - * Deactivates all predefined {@link yfiles.layout.ILayoutStage}s so that upon {@link yfiles.layout.MultiStageLayout#applyLayout} only the - * {@link yfiles.layout.MultiStageLayout#applyLayoutCore layout algorithm} will be executed. - */ - disableAllStages():void; - /** - * Prepends the given {@link yfiles.layout.ILayoutStage} to the layout pipeline. - *

- * Stages that are added with this method will be invoked at the very beginning of the layout pipeline. This means before - * all previously prepended {@link yfiles.layout.ILayoutStage}s, all predefined stages, and all appended - * {@link yfiles.layout.ILayoutStage}s. - *

- * @param stage the {@link } instance to be added - * @see yfiles.layout.MultiStageLayout#removeStage - * @see yfiles.layout.MultiStageLayout#appendStage - */ - prependStage(stage:yfiles.layout.ILayoutStage):void; - /** - * Removes the given {@link yfiles.layout.ILayoutStage} from the layout pipeline. - *

- * This method can only remove {@link yfiles.layout.ILayoutStage}s that have been previously added using {@link yfiles.layout.MultiStageLayout#appendStage} - * or {@link yfiles.layout.MultiStageLayout#prependStage}. Predefined {@link yfiles.layout.ILayoutStage}s can be deactivated separately. - *

- * @param stage a {@link } to be removed from the layout pipeline - * @see yfiles.layout.MultiStageLayout#prependStage - * @see yfiles.layout.MultiStageLayout#appendStage - * @see yfiles.layout.MultiStageLayout#selfLoopRouterEnabled - * @see yfiles.layout.MultiStageLayout#parallelEdgeRouterEnabled - * @see yfiles.layout.MultiStageLayout#orientationLayoutEnabled - * @see yfiles.layout.MultiStageLayout#subgraphLayoutEnabled - * @see yfiles.layout.MultiStageLayout#labelingEnabled - * @see yfiles.layout.MultiStageLayout#hideGroupsStageEnabled - * @see yfiles.layout.MultiStageLayout#componentLayoutEnabled - */ - removeStage(stage:yfiles.layout.ILayoutStage):void; - /** - * Gets or sets the {@link yfiles.layout.ILayoutStage} that places the labels of the input graph. - * @see yfiles.layout.MultiStageLayout#labelingEnabled - * @see yfiles.labeling.GenericLabeling - * @type {yfiles.layout.ILayoutStage} - */ - labeling:yfiles.layout.ILayoutStage; - /** - * Gets or sets the {@link yfiles.layout.ILayoutStage} that routes self-loops. - * @see yfiles.layout.MultiStageLayout#selfLoopRouterEnabled - * @see yfiles.layout.SelfLoopRouter - * @type {yfiles.layout.ILayoutStage} - */ - selfLoopRouter:yfiles.layout.ILayoutStage; - /** - * Gets or sets the {@link yfiles.layout.ILayoutStage} that routes parallel edges. - * @see yfiles.layout.MultiStageLayout#parallelEdgeRouterEnabled - * @see yfiles.router.ParallelEdgeRouter - * @type {yfiles.layout.ILayoutStage} - */ - parallelEdgeRouter:yfiles.layout.ILayoutStage; - /** - * Gets or sets the {@link yfiles.layout.ILayoutStage} that arranges the connected components of an input graph. - * @see yfiles.layout.MultiStageLayout#componentLayoutEnabled - * @see yfiles.layout.ComponentLayout - * @type {yfiles.layout.ILayoutStage} - */ - componentLayout:yfiles.layout.ILayoutStage; - /** - * Gets or sets the {@link yfiles.layout.ILayoutStage} that constrains the layout process to a subgraph of the input graph. - * @see yfiles.layout.MultiStageLayout#subgraphLayoutEnabled - * @see yfiles.layout.SubgraphLayout - * @type {yfiles.layout.ILayoutStage} - */ - subgraphLayout:yfiles.layout.ILayoutStage; - /** - * Gets or sets the {@link yfiles.layout.ILayoutStage} that hides the group nodes of the input graph. - * @see yfiles.layout.MultiStageLayout#hideGroupsStageEnabled - * @see yfiles.layout.HideGroupsStage - * @type {yfiles.layout.ILayoutStage} - */ - hideGroupsStage:yfiles.layout.ILayoutStage; - /** - * Gets or sets the {@link yfiles.layout.ILayoutStage} that modifies the orientation of a computed layout. - * @see yfiles.layout.MultiStageLayout#orientationLayoutEnabled - * @see yfiles.layout.MultiStageLayout#layoutOrientation - * @see yfiles.layout.OrientationLayout - * @type {yfiles.layout.ILayoutStage} - */ - orientationLayout:yfiles.layout.ILayoutStage; - /** - * Gets or sets whether or not the {@link yfiles.layout.ILayoutStage} that modifies the orientation of the layout is activated. - *

- * This {@link yfiles.layout.ILayoutStage} may be deactivated if the orientation is irrelevant for the layout or if the core layout - * algorithm already handles the layout orientation by itself. - *

- * @see yfiles.layout.MultiStageLayout#orientationLayout - * @see yfiles.layout.MultiStageLayout#layoutOrientation - * @see yfiles.layout.OrientationLayout - * @type {boolean} - */ - orientationLayoutEnabled:boolean; - /** - * Gets or sets the main orientation of the layout. - *

- * This is a convenience method that configures the {@link yfiles.layout.MultiStageLayout#orientationLayout orientation layout stage}. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified orientation does not match a default layout orientation - * @see yfiles.layout.MultiStageLayout#orientationLayout - * @see yfiles.layout.MultiStageLayout#orientationLayoutEnabled - * @type {yfiles.layout.LayoutOrientation} - */ - layoutOrientation:yfiles.layout.LayoutOrientation; - /** - * Gets or sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing self-loops is activated. - *

- * This {@link yfiles.layout.ILayoutStage} should be deactivated if the {@link yfiles.layout.MultiStageLayout#applyLayoutCore layout algorithm} handles self-loops by itself. - *

- * @see yfiles.layout.MultiStageLayout#selfLoopRouter - * @see yfiles.layout.SelfLoopRouter - * @type {boolean} - */ - selfLoopRouterEnabled:boolean; - /** - * Gets or sets whether or not the {@link yfiles.layout.ILayoutStage} used for placing the labels of the input graph is activated. - *

- * This {@link yfiles.layout.ILayoutStage} may be activated to apply a generic labeling algorithm to the input graph. It will then - * try to find the best locations for the labels in the layout calculated by the - * {@link yfiles.layout.MultiStageLayout#applyLayoutCore layout algorithm}. When the stage is deactivated, the labels are ignored or placed by an integrated labeling of the - * layout algorithm. - *

- * @see yfiles.layout.MultiStageLayout#labeling - * @see yfiles.labeling.GenericLabeling - * @type {boolean} - */ - labelingEnabled:boolean; - /** - * Gets or sets whether or not the {@link yfiles.layout.ILayoutStage} used for hiding group nodes is activated. - *

- * This {@link yfiles.layout.ILayoutStage} should be deactivated if the {@link yfiles.layout.MultiStageLayout#applyLayoutCore layout algorithm} handles group nodes itself. - *

- * @see yfiles.layout.MultiStageLayout#hideGroupsStage - * @see yfiles.layout.HideGroupsStage - * @type {boolean} - */ - hideGroupsStageEnabled:boolean; - /** - * Gets or sets whether or not the {@link yfiles.layout.ILayoutStage} used for arranging the components of the graph is activated. - *

- * This {@link yfiles.layout.ILayoutStage} should be deactivated if the {@link yfiles.layout.MultiStageLayout#applyLayoutCore layout algorithm} is able to handle several connected - * components. - *

- * @see yfiles.layout.MultiStageLayout#componentLayout - * @see yfiles.layout.ComponentLayout - * @type {boolean} - */ - componentLayoutEnabled:boolean; - /** - * Gets or sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing parallel edges is activated. - *

- * This {@link yfiles.layout.ILayoutStage} should be deactivated if the {@link yfiles.layout.MultiStageLayout#applyLayoutCore layout algorithm} handles parallel edges itself. - *

- * @see yfiles.layout.MultiStageLayout#parallelEdgeRouter - * @see yfiles.router.ParallelEdgeRouter - * @type {boolean} - */ - parallelEdgeRouterEnabled:boolean; - /** - * Gets or sets whether or not the {@link yfiles.layout.ILayoutStage} used for constraining the layout process to a subgraph of the - * input graph is activated. - *

- * This {@link yfiles.layout.ILayoutStage} may be activated if the {@link yfiles.layout.MultiStageLayout#applyLayoutCore layout algorithm} should be applied only to a specific part of - * the graph. The remaining graph will stay unchanged. - *

- * @see yfiles.layout.MultiStageLayout#subgraphLayout - * @see yfiles.layout.SubgraphLayout - * @type {boolean} - */ - subgraphLayoutEnabled:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.MultiStageLayout; - } - /** - * A {@link yfiles.layout.NodeHalo} specifies a rectangular area around a specific node. - *

- * A {@link yfiles.layout.ILayoutAlgorithm layout algorithm} that supports - * {@link yfiles.layout.NodeHalo}s, keeps this area clear of graph elements, except the node labels of this specific node and the - * adjacent segments of its edges. All minimum distances to this node, which are used in the layout calculation, e.g., - * minimum first segment length, will be extended by the halo size. - *

- *

- * This class defines a key used for registering a {@link yfiles.algorithms.IDataProvider} that provides {@link yfiles.layout.NodeHalo}s - * for all nodes of the input graph. {@link yfiles.layout.NodeHalo}-aware layout algorithms like {@link yfiles.hierarchic.HierarchicLayout} - * look for {@link yfiles.algorithms.IDataProvider}s registered with this key to retrieve {@link yfiles.layout.NodeHalo} information. - *

- *

- * The following layouters support {@link yfiles.layout.NodeHalo}s with different restrictions: - *

- *
    - *
  • {@link yfiles.hierarchic.HierarchicLayout}
  • - *
  • {@link yfiles.orthogonal.OrthogonalLayout}
  • - *
  • {@link yfiles.orthogonal.CompactOrthogonalLayout}
  • - *
  • {@link yfiles.tree.TreeLayout}
  • - *
  • {@link yfiles.tree.ClassicTreeLayout}
  • - *
  • {@link yfiles.organic.OrganicLayout}
  • - *
  • {@link yfiles.labeling.GenericLabeling}
  • - *
  • {@link yfiles.router.EdgeRouter}
  • - *
  • {@link yfiles.circular.CircularLayout}
  • - *
  • {@link yfiles.tree.BalloonLayout}
  • - *
  • {@link yfiles.layout.SelfLoopRouter}
  • - *
  • {@link yfiles.radial.RadialLayout}
  • - *
  • {@link yfiles.layout.RecursiveGroupLayout}
  • - *
  • {@link yfiles.layout.ComponentLayout}
  • - *
- * @class - * @final - */ - export interface NodeHalo extends yfiles.lang.Object{} - export class NodeHalo { - /** - * Creates a {@link yfiles.layout.NodeHalo} with the specified values. - *

- * The values must not be negative, {@link number#NaN} or {@link number#POSITIVE_INFINITY}. - *

- * @param top the {@link } size at the top side of the node - * @param left the {@link } size at the left side of the node - * @param bottom the {@link } size at the bottom side of the node - * @param right the {@link } size at the right side of the node - * @returns the newly created {@link } - * @throws {Stubs.Exceptions.ArgumentError} if one of the values is negative, {@link number#NaN} or {@link number#POSITIVE_INFINITY} - * @static - */ - static create(top:number,left:number,bottom:number,right:number):yfiles.layout.NodeHalo; - /** - * Creates a {@link yfiles.layout.NodeHalo} object with the specified value on each side of the node. - *

- * The value must not be negative, {@link number#NaN} or {@link number#POSITIVE_INFINITY}. - *

- * @param value the halo size at each side of the node - * @returns the newly created {@link } - * @throws {Stubs.Exceptions.ArgumentError} if the value is negative, {@link number#NaN} or {@link number#POSITIVE_INFINITY} - * @static - */ - static create(value:number):yfiles.layout.NodeHalo; - /** - * Returns the {@link yfiles.layout.NodeHalo} associated with the given node. - *

- * If no such {@link yfiles.layout.NodeHalo} is available, this method returns a {@link yfiles.layout.NodeHalo#ZERO_HALO}. - *

- * @param graph the graph containing the given node - * @param node the node whose {@link } will be determined - * @returns the {@link } of the given node if available, otherwise a {@link #ZERO_HALO} - * @static - */ - static getHalo(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node):yfiles.layout.NodeHalo; - /** - * Returns a {@link yfiles.algorithms.YRectangle} instance with the bounds of the given node including its {@link yfiles.layout.NodeHalo}. - *

- * This {@link yfiles.algorithms.YRectangle} is located at the position of the node. - *

- *

- * If the node does not have a {@link yfiles.layout.NodeHalo} assigned, this box has the same size as the node. - *

- * @param graph the graph containing the given node - * @param node the node whose {@link } will be determined - * @returns a {@link } instance with the bounds of the given node including its {@link } - * @static - */ - static getHaloBox(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node):yfiles.algorithms.YRectangle; - /** - * Checks whether or not the given graph contains {@link yfiles.layout.NodeHalo} information. - *

- * This method looks for a {@link yfiles.algorithms.IDataProvider} that has been registered with the given graph using - * {@link yfiles.layout.NodeHalo#NODE_HALO_DP_KEY}. - *

- * @param graph the input graph - * @returns true if a {@link } has been registered with the according key, false otherwise - * @static - */ - static hasHalos(graph:yfiles.layout.LayoutGraph):boolean; - /** - * Data provider key for assigning halos for the nodes - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static NODE_HALO_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * A constant holding a {@link yfiles.layout.NodeHalo} with zero size on each side. - * @const - * @static - * @type {yfiles.layout.NodeHalo} - */ - static ZERO_HALO:yfiles.layout.NodeHalo; - /** - * The {@link yfiles.layout.NodeHalo} size at the top side of the node. - * @const - * @type {number} - */ - top:number; - /** - * The {@link yfiles.layout.NodeHalo} size at the left side of the node. - * @const - * @type {number} - */ - left:number; - /** - * The {@link yfiles.layout.NodeHalo} size at the bottom side of the node. - * @const - * @type {number} - */ - bottom:number; - /** - * The {@link yfiles.layout.NodeHalo} size at the right side of the node. - * @const - * @type {number} - */ - right:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.NodeHalo; - } - /** - * A {@link yfiles.layout.NodeLabelCandidate} describes one valid placement for a node label considering the label model. - * @class - * @extends {yfiles.layout.LabelCandidate} - */ - export interface NodeLabelCandidate extends yfiles.layout.LabelCandidate{} - export class NodeLabelCandidate { - /** - * Creates a new instance of {@link yfiles.layout.NodeLabelCandidate} described by location, size, model parameter and internal - * flag. - * @param pos the location of the upper left corner of the candidate - * @param size the size of the candidate - * @param param the parameters of the label model associated with this candidate - * @param owner the label associated with the candidate - * @param [internal=false] true if the candidate is allowed to overlap with its owner, false otherwise - */ - constructor(pos:yfiles.algorithms.YPoint,size:yfiles.algorithms.YDimension,param:any,owner:yfiles.layout.INodeLabelLayout,internal?:boolean); - /** - * Creates a new instance of {@link yfiles.layout.NodeLabelCandidate} described by its box, model parameter and internal flag. - * @param labelBox the box that specifies the candidate's size and position - * @param param the parameters of the label model associated with this candidate - * @param owner the label associated with the candidate - * @param [internal=false] true if the candidate is allowed to overlap with its owner, false otherwise - */ - constructor(labelBox:yfiles.algorithms.YOrientedRectangle,param:any,owner:yfiles.layout.INodeLabelLayout,internal?:boolean); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.NodeLabelCandidate; - } - /** - * {@link yfiles.layout.NormalizeGraphElementOrderStage} normalizes the order of the elements within a graph to ensure the same - * order for multiple layout invocations. - *

- * Among other factors, the results produced by layout algorithms usually depend on the order of the nodes and edges within - * a graph. Unfortunately, useful operations such as hiding or unhiding elements from a graph or simply invoking layout - * algorithms on a graph will have the potential side effect of changing that order. - *

- *

- * With this {@link yfiles.layout.ILayoutStage} it is possible to establish a predefined order of nodes and edges within a graph to - * avoid non-deterministic layout behavior. Defining the order of nodes and edges is done by associating each node or edge - * in the graph with a {@link yfiles.lang.IComparable} value using a {@link yfiles.algorithms.IDataProvider} registered with the key {@link yfiles.layout.NormalizeGraphElementOrderStage#NODE_COMPARABLE_DP_KEY} - * or {@link yfiles.layout.NormalizeGraphElementOrderStage#EDGE_COMPARABLE_DP_KEY}, respectively. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface NormalizeGraphElementOrderStage extends yfiles.layout.LayoutStageBase{} - export class NormalizeGraphElementOrderStage { - /** - * Creates a new {@link yfiles.layout.NormalizeGraphElementOrderStage} instance with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [coreLayouter=null] The core layout algorithm. - */ - constructor(coreLayouter?:yfiles.layout.ILayoutAlgorithm); - /** - * Assigns comparable values for each node and edge. - *

- * The compared values are induced from the current ordering of the nodes and edges within the given graph. - *

- *

- * This is a convenient method to fill the given {@link yfiles.algorithms.IDataMap}s which can then be registered with the graph - * with keys {@link yfiles.layout.NormalizeGraphElementOrderStage#NODE_COMPARABLE_DP_KEY} and {@link yfiles.layout.NormalizeGraphElementOrderStage#EDGE_COMPARABLE_DP_KEY} - * and used for several layout calculations. - *

- * @param graph the input graph - * @param comparableNodeMap the map that will be filled with comparable values for the nodes - * @param comparableEdgeMap the map that will be filled with comparable values for the edges - * @static - */ - static fillComparableMapFromGraph(graph:yfiles.algorithms.Graph,comparableNodeMap:yfiles.algorithms.IDataMap,comparableEdgeMap:yfiles.algorithms.IDataMap):void; - /** - * Data provider key for defining a (global) order for nodes - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static NODE_COMPARABLE_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for defining a (global) order for edges - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static EDGE_COMPARABLE_DP_KEY:yfiles.algorithms.EdgeDpKey; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.NormalizeGraphElementOrderStage; - } - /** - * {@link yfiles.layout.OrientationLayout} is a {@link yfiles.layout.ILayoutStage} that changes the orientation of the layout. - *

- * Layout Style There are four orientations that can be used for a layout. These orientations can exist with or without mirroring at - * the x-axis or y-axis. - *

- *

- * Changing the layout orientation is useful for layout styles that show a main direction. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[327.5,0],[136.25,100.31],[327.5,100.31],[507.5,100.31],[507.5,180.94],[260,180.94],[327.5,180.94],[447.5,180.94],[440,262.19],[136.25,180.94],[76.25,180.94],[387.5,342.81],[380,262.19],[500,262.19],[320,262.19],[320,342.81],[560,262.19],[196.25,180.94],[20,262.19],[260,262.19],[80,262.19],[387.5,417.81],[140,262.19],[447.5,342.81],[80,342.81],[620,180.94],[200,262.19],[387.5,180.94],[200,342.81],[140,342.81],[20,342.81],[447.5,417.81],[200,417.81],[320,417.81],[620,262.19],[507.5,342.81],[507.5,417.81],[620,342.81],[567.5,417.81],[687.5,342.81],[687.5,417.81],[627.5,417.81]],"e":[[0,1,-10,15,0,-15,[332.5,40,151.25,85.31]],[0,2,0,15,0,-15],[0,3,10,15,0,-15,[352.5,40,522.5,85.31]],[3,4,0,15,0,-15],[2,5,-10,15,0,-15,[332.5,140.31,275,165.94]],[2,6,0,15,0,-15],[3,7,-10,15,0,-15,[512.5,140.31,462.5,165.94]],[7,8,0,15,0,-15,[462.5,220.94,455,247.19]],[1,9,0,15,0,-15],[1,10,-10,15,0,-15,[141.25,140.31,91.25,165.94]],[8,11,-7.5,15,0,-15,[447.5,302.19,402.5,327.81]],[6,12,7.5,15,0,-15,[350,220.94,395,247.19]],[4,13,-7.5,15,0,-15],[6,14,-7.5,15,0,-15],[14,15,0,15,0,-15],[4,16,7.5,15,0,-15,[530,220.94,575,247.19]],[1,17,10,15,0,-15,[161.25,140.31,211.25,165.94]],[9,18,-11.25,15,0,-15,[140,220.94,35,247.19]],[5,19,0,15,0,-15],[9,20,-3.75,15,0,-15,[147.5,220.94,95,247.19]],[11,21,0,15,0,-15],[9,22,3.75,15,0,-15],[8,23,7.5,15,0,-15],[20,24,0,15,0,-15],[3,25,10,15,0,-15,[532.5,140.31,635,165.94]],[9,26,11.25,15,0,-15,[162.5,220.94,215,247.19]],[2,27,10,15,0,-15,[352.5,140.31,402.5,165.94]],[26,28,0,15,0,-15],[22,29,0,15,0,-15],[18,30,0,15,0,-15],[23,31,0,15,0,-15],[28,32,0,15,0,-15],[15,33,0,15,0,-15],[25,34,0,15,0,-15],[34,35,-10,15,0,-15,[625,302.19,522.5,327.81]],[35,36,0,15,0,-15],[34,37,0,15,0,-15],[37,38,-7.5,15,0,-15,[627.5,382.81,582.5,402.81]],[34,39,10,15,0,-15,[645,302.19,702.5,327.81]],[39,40,0,15,0,-15],[37,41,7.5,15,0,-15]],"vp":[20.0,0.0,698.0,448.0]}} - *

- *

- * {@link yfiles.layout.LayoutOrientation#TOP_TO_BOTTOM} layout - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[327.5,-30],[136.25,-130.31],[327.5,-130.31],[507.5,-130.31],[507.5,-210.94],[260,-210.94],[327.5,-210.94],[447.5,-210.94],[440,-292.19],[136.25,-210.94],[76.25,-210.94],[387.5,-372.81],[380,-292.19],[500,-292.19],[320,-292.19],[320,-372.81],[560,-292.19],[196.25,-210.94],[20,-292.19],[260,-292.19],[80,-292.19],[387.5,-447.81],[140,-292.19],[447.5,-372.81],[80,-372.81],[620,-210.94],[200,-292.19],[387.5,-210.94],[200,-372.81],[140,-372.81],[20,-372.81],[447.5,-447.81],[200,-447.81],[320,-447.81],[620,-292.19],[507.5,-372.81],[507.5,-447.81],[620,-372.81],[567.5,-447.81],[687.5,-372.81],[687.5,-447.81],[627.5,-447.81]],"e":[[0,1,-10,-15,0,15,[332.5,-40,151.25,-85.31]],[0,2,0,-15,0,15],[0,3,10,-15,0,15,[352.5,-40,522.5,-85.31]],[3,4,0,-15,0,15],[2,5,-10,-15,0,15,[332.5,-140.31,275,-165.94]],[2,6,0,-15,0,15],[3,7,-10,-15,0,15,[512.5,-140.31,462.5,-165.94]],[7,8,0,-15,0,15,[462.5,-220.94,455,-247.19]],[1,9,0,-15,0,15],[1,10,-10,-15,0,15,[141.25,-140.31,91.25,-165.94]],[8,11,-7.5,-15,0,15,[447.5,-302.19,402.5,-327.81]],[6,12,7.5,-15,0,15,[350,-220.94,395,-247.19]],[4,13,-7.5,-15,0,15],[6,14,-7.5,-15,0,15],[14,15,0,-15,0,15],[4,16,7.5,-15,0,15,[530,-220.94,575,-247.19]],[1,17,10,-15,0,15,[161.25,-140.31,211.25,-165.94]],[9,18,-11.25,-15,0,15,[140,-220.94,35,-247.19]],[5,19,0,-15,0,15],[9,20,-3.75,-15,0,15,[147.5,-220.94,95,-247.19]],[11,21,0,-15,0,15],[9,22,3.75,-15,0,15],[8,23,7.5,-15,0,15],[20,24,0,-15,0,15],[3,25,10,-15,0,15,[532.5,-140.31,635,-165.94]],[9,26,11.25,-15,0,15,[162.5,-220.94,215,-247.19]],[2,27,10,-15,0,15,[352.5,-140.31,402.5,-165.94]],[26,28,0,-15,0,15],[22,29,0,-15,0,15],[18,30,0,-15,0,15],[23,31,0,-15,0,15],[28,32,0,-15,0,15],[15,33,0,-15,0,15],[25,34,0,-15,0,15],[34,35,-10,-15,0,15,[625,-302.19,522.5,-327.81]],[35,36,0,-15,0,15],[34,37,0,-15,0,15],[37,38,-7.5,-15,0,15,[627.5,-382.81,582.5,-402.81]],[34,39,10,-15,0,15,[645,-302.19,702.5,-327.81]],[39,40,0,-15,0,15],[37,41,7.5,-15,0,15]],"vp":[20.0,-448.0,698.0,448.0]}} - *

- *

- * {@link yfiles.layout.LayoutOrientation#BOTTOM_TO_TOP} layout with {@link yfiles.layout.MirrorModes#BOTTOM_TO_TOP mirroring} - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[0,-357.5],[100.31,-166.25],[100.31,-357.5],[100.31,-537.5],[180.94,-537.5],[180.94,-290],[180.94,-357.5],[180.94,-477.5],[262.19,-470],[180.94,-166.25],[180.94,-106.25],[342.81,-417.5],[262.19,-410],[262.19,-530],[262.19,-350],[342.81,-350],[262.19,-590],[180.94,-226.25],[262.19,-50],[262.19,-290],[262.19,-110],[417.81,-417.5],[262.19,-170],[342.81,-477.5],[342.81,-110],[180.94,-650],[262.19,-230],[180.94,-417.5],[342.81,-230],[342.81,-170],[342.81,-50],[417.81,-477.5],[417.81,-230],[417.81,-350],[262.19,-650],[342.81,-537.5],[417.81,-537.5],[342.81,-650],[417.81,-597.5],[342.81,-717.5],[417.81,-717.5],[417.81,-657.5]],"e":[[0,1,15,10,-15,-0,[40,-332.5,85.31,-151.25]],[0,2,15,-0,-15,-0],[0,3,15,-10,-15,-0,[40,-352.5,85.31,-522.5]],[3,4,15,-0,-15,-0],[2,5,15,10,-15,-0,[140.31,-332.5,165.94,-275]],[2,6,15,-0,-15,-0],[3,7,15,10,-15,-0,[140.31,-512.5,165.94,-462.5]],[7,8,15,-0,-15,-0,[220.94,-462.5,247.19,-455]],[1,9,15,-0,-15,-0],[1,10,15,10,-15,-0,[140.31,-141.25,165.94,-91.25]],[8,11,15,7.5,-15,-0,[302.19,-447.5,327.81,-402.5]],[6,12,15,-7.5,-15,-0,[220.94,-350,247.19,-395]],[4,13,15,7.5,-15,-0],[6,14,15,7.5,-15,-0],[14,15,15,-0,-15,-0],[4,16,15,-7.5,-15,-0,[220.94,-530,247.19,-575]],[1,17,15,-10,-15,-0,[140.31,-161.25,165.94,-211.25]],[9,18,15,11.25,-15,-0,[220.94,-140,247.19,-35]],[5,19,15,-0,-15,-0],[9,20,15,3.75,-15,-0,[220.94,-147.5,247.19,-95]],[11,21,15,-0,-15,-0],[9,22,15,-3.75,-15,-0],[8,23,15,-7.5,-15,-0],[20,24,15,-0,-15,-0],[3,25,15,-10,-15,-0,[140.31,-532.5,165.94,-635]],[9,26,15,-11.25,-15,-0,[220.94,-162.5,247.19,-215]],[2,27,15,-10,-15,-0,[140.31,-352.5,165.94,-402.5]],[26,28,15,-0,-15,-0],[22,29,15,-0,-15,-0],[18,30,15,-0,-15,-0],[23,31,15,-0,-15,-0],[28,32,15,-0,-15,-0],[15,33,15,-0,-15,-0],[25,34,15,-0,-15,-0],[34,35,15,10,-15,-0,[302.19,-625,327.81,-522.5]],[35,36,15,-0,-15,-0],[34,37,15,-0,-15,-0],[37,38,15,7.5,-15,-0,[382.81,-627.5,402.81,-582.5]],[34,39,15,-10,-15,-0,[302.19,-645,327.81,-702.5]],[39,40,15,-0,-15,-0],[37,41,15,-7.5,-15,-0]],"vp":[0.0,-718.0,448.0,698.0]}} - *

- *

- * {@link yfiles.layout.LayoutOrientation#LEFT_TO_RIGHT} layout - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[-30,327.5],[-130.31,136.25],[-130.31,327.5],[-130.31,507.5],[-210.94,507.5],[-210.94,260],[-210.94,327.5],[-210.94,447.5],[-292.19,440],[-210.94,136.25],[-210.94,76.25],[-372.81,387.5],[-292.19,380],[-292.19,500],[-292.19,320],[-372.81,320],[-292.19,560],[-210.94,196.25],[-292.19,20],[-292.19,260],[-292.19,80],[-447.81,387.5],[-292.19,140],[-372.81,447.5],[-372.81,80],[-210.94,620],[-292.19,200],[-210.94,387.5],[-372.81,200],[-372.81,140],[-372.81,20],[-447.81,447.5],[-447.81,200],[-447.81,320],[-292.19,620],[-372.81,507.5],[-447.81,507.5],[-372.81,620],[-447.81,567.5],[-372.81,687.5],[-447.81,687.5],[-447.81,627.5]],"e":[[0,1,-15,-10,15,0,[-40,332.5,-85.31,151.25]],[0,2,-15,0,15,0],[0,3,-15,10,15,0,[-40,352.5,-85.31,522.5]],[3,4,-15,0,15,0],[2,5,-15,-10,15,0,[-140.31,332.5,-165.94,275]],[2,6,-15,0,15,0],[3,7,-15,-10,15,0,[-140.31,512.5,-165.94,462.5]],[7,8,-15,0,15,0,[-220.94,462.5,-247.19,455]],[1,9,-15,0,15,0],[1,10,-15,-10,15,0,[-140.31,141.25,-165.94,91.25]],[8,11,-15,-7.5,15,0,[-302.19,447.5,-327.81,402.5]],[6,12,-15,7.5,15,0,[-220.94,350,-247.19,395]],[4,13,-15,-7.5,15,0],[6,14,-15,-7.5,15,0],[14,15,-15,0,15,0],[4,16,-15,7.5,15,0,[-220.94,530,-247.19,575]],[1,17,-15,10,15,0,[-140.31,161.25,-165.94,211.25]],[9,18,-15,-11.25,15,0,[-220.94,140,-247.19,35]],[5,19,-15,0,15,0],[9,20,-15,-3.75,15,0,[-220.94,147.5,-247.19,95]],[11,21,-15,0,15,0],[9,22,-15,3.75,15,0],[8,23,-15,7.5,15,0],[20,24,-15,0,15,0],[3,25,-15,10,15,0,[-140.31,532.5,-165.94,635]],[9,26,-15,11.25,15,0,[-220.94,162.5,-247.19,215]],[2,27,-15,10,15,0,[-140.31,352.5,-165.94,402.5]],[26,28,-15,0,15,0],[22,29,-15,0,15,0],[18,30,-15,0,15,0],[23,31,-15,0,15,0],[28,32,-15,0,15,0],[15,33,-15,0,15,0],[25,34,-15,0,15,0],[34,35,-15,-10,15,0,[-302.19,625,-327.81,522.5]],[35,36,-15,0,15,0],[34,37,-15,0,15,0],[37,38,-15,-7.5,15,0,[-382.81,627.5,-402.81,582.5]],[34,39,-15,10,15,0,[-302.19,645,-327.81,702.5]],[39,40,-15,0,15,0],[37,41,-15,7.5,15,0]],"vp":[-448.0,20.0,448.0,698.0]}} - *

- *

- * {@link yfiles.layout.LayoutOrientation#RIGHT_TO_LEFT} layout - *

- *

- * Concept {@link yfiles.layout.OrientationLayout} performs three basic steps. - *

- *
    - *
  1. - * Preparation: The sizes and locations of nodes and edge bends as well as labels and {@link yfiles.layout.PortConstraint}s are - * transformed to the {@link yfiles.layout.LayoutOrientation#TOP_TO_BOTTOM} orientation. - *
  2. - *
  3. - * Delegation: The {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} is invoked and calculates the layout for orientation - * {@link yfiles.layout.LayoutOrientation#TOP_TO_BOTTOM}. - *
  4. - *
  5. Completion: The result of the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} is rotated and mirrored to fit the desired layout orientation.
  6. - *
- *

- * Features - *

- *

- * {@link yfiles.layout.OrientationLayout} can either be used as a {@link yfiles.layout.ILayoutStage} wrapping a {@link yfiles.layout.ILayoutAlgorithm layout algorithm}. Then it - * will change the orientation of the result of the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *
- * If no {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} is specified, {@link yfiles.layout.OrientationLayout} can work alone. It will just change the - * orientation of the layout without arranging nodes and edges. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface OrientationLayout extends yfiles.layout.LayoutStageBase{} - export class OrientationLayout { - /** - * Creates a new {@link yfiles.layout.OrientationLayout} instance using the given orientation. - * @param orientation the orientation specifier - * @throws {Stubs.Exceptions.ArgumentError} if the specified orientation is unknown - * @see yfiles.layout.OrientationLayout#orientation - */ - constructor(orientation:yfiles.layout.LayoutOrientation); - /** - * Creates a new {@link yfiles.layout.OrientationLayout} instance using the given {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param coreLayouter the core layout routine - */ - constructor(coreLayouter:yfiles.layout.ILayoutAlgorithm); - /** - * Creates a new {@link yfiles.layout.OrientationLayout} instance with default settings. - */ - constructor(); - /** - * Applies the desired orientation to the graph. - *

- * It performs the inverse coordinate transformation that has been applied to the layout by method - * {@link yfiles.layout.OrientationLayout#prepareOrientationChange}. - *

- *

- * This method is called by {@link yfiles.layout.OrientationLayout#applyLayout} after invoking the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. It may be overridden to extend the orientation change to custom layout features. - *

- * @param graph the input graph - * @see yfiles.layout.OrientationLayout#prepareOrientationChange - */ - completeOrientationChange(graph:yfiles.layout.LayoutGraph):void; - /** - * Transforms the given point during completion. - *

- * The point is transformed from {@link yfiles.layout.LayoutOrientation#TOP_TO_BOTTOM} orientation to the desired orientation. - *

- * @param point the calculated point - * @returns the transformed point - * @see yfiles.layout.OrientationLayout#completeOrientationChange - */ - completeTransform(point:yfiles.algorithms.YPoint):yfiles.algorithms.YPoint; - /** - * Creates {@link yfiles.algorithms.Insets} that are a geometric transformation of the given {@link yfiles.algorithms.Insets}. - *

- * The transform will correspond to the currently set orientation. - *

- * @param insets the original insets - * @returns the oriented insets - * @see yfiles.layout.OrientationLayout#orientation - */ - createOrientedInsets(insets:yfiles.algorithms.Insets):yfiles.algorithms.Insets; - /** - * Creates a {@link yfiles.layout.NodeHalo} that is a geometric transformation of the given {@link yfiles.layout.NodeHalo}. - *

- * The transform will correspond to the currently set orientation. - *

- * @param halo the original {@link } - * @returns the oriented {@link } - * @see yfiles.layout.OrientationLayout#orientation - */ - createOrientedNodeHalo(halo:yfiles.layout.NodeHalo):yfiles.layout.NodeHalo; - /** - * Creates a {@link yfiles.algorithms.YDimension} that is a geometric transformation of the given size. - *

- * The transform will correspond to the currently set orientation. - *

- * @param nodeSize the original node size - * @returns the oriented node size - * @see yfiles.layout.OrientationLayout#orientation - */ - createOrientedNodeSize(nodeSize:yfiles.algorithms.YDimension):yfiles.algorithms.YDimension; - /** - * Returns whether or not this {@link yfiles.layout.OrientationLayout} instance will mirror the graph for a given layout - * orientation. - *

- * Horizontal orientations get mirrored at the x-axis while vertical orientations are mirrored at the y-axis. - *

- * @param orientation the layout orientation for which to check the mirror state - * @returns true if the layout algorithm will mirror the graph at the corresponding axis for the given layout orientation, false - * otherwise - * @see yfiles.layout.OrientationLayout#orientation - * @see yfiles.layout.OrientationLayout#mirrorMode - */ - isOrientationMirrored(orientation:yfiles.layout.LayoutOrientation):boolean; - /** - * Prepares the layout for the desired orientation. - *

- * It will rotate and mirror the coordinates and bounds of the graph layout such that the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} can perform - * its calculations assuming the canonical {@link yfiles.layout.LayoutOrientation#TOP_TO_BOTTOM} orientation. - *

- *

- * This method is called by {@link yfiles.layout.OrientationLayout#applyLayout} before invoking the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. It might be overridden to extend the preparations to custom layout features. - *

- * @param graph the input graph - * @see yfiles.layout.OrientationLayout#completeOrientationChange - */ - prepareOrientationChange(graph:yfiles.layout.LayoutGraph):void; - /** - * Transforms the given point during preparation. - *

- * The point is transformed so it matches the {@link yfiles.layout.LayoutOrientation#TOP_TO_BOTTOM} orientation. - *

- * @param point the original point - * @returns the transformed point - * @see yfiles.layout.OrientationLayout#prepareOrientationChange - */ - prepareTransform(point:yfiles.algorithms.YPoint):yfiles.algorithms.YPoint; - /** - * Transforms the given point during the preparation or completion step. - *

- * This method is called by {@link yfiles.layout.OrientationLayout#prepareOrientationChange} and {@link yfiles.layout.OrientationLayout#completeOrientationChange} - * to get the according point location. - *

- * @param point the original/calculated point - * @param prepare true if this method is called during preparation, false if it is called during completion - * @returns the transformed point - * @see yfiles.layout.OrientationLayout#prepareOrientationChange - * @see yfiles.layout.OrientationLayout#completeOrientationChange - * @see yfiles.layout.OrientationLayout#prepareTransform - * @see yfiles.layout.OrientationLayout#completeTransform - * @protected - */ - transform(point:yfiles.algorithms.YPoint,prepare:boolean):yfiles.algorithms.YPoint; - /** - * Gets or sets the main direction of the layout. - * @throws {Stubs.Exceptions.ArgumentError} if the specified orientation is unknown - * @type {yfiles.layout.LayoutOrientation} - */ - orientation:yfiles.layout.LayoutOrientation; - /** - * Gets or sets the mirror mask that defines which orientations this {@link yfiles.layout.OrientationLayout} shall mirror. - *

- * {@link yfiles.layout.OrientationLayout#orientation Setting a layout orientation} can be seen as rotating the graph by 90, 180 or 270 degrees. Afterwards the graph can be - * mirrored at the x-axis (for horizontal layout orientations) or y-axis (for vertical layout orientations). - *

- *

- * Which directions are mirrored can be defined by the given mask. It can combine several mirrored directions with a - * logical or-operation. - *

- * @throws {Stubs.Exceptions.ArgumentError} if an unknown mask is specified - * @type {yfiles.layout.MirrorModes} - */ - mirrorMode:yfiles.layout.MirrorModes; - /** - * Gets whether or not the current orientation is horizontal. - *

- * The orientation is horizontal if it is {@link yfiles.layout.LayoutOrientation#LEFT_TO_RIGHT} or - * {@link yfiles.layout.LayoutOrientation#RIGHT_TO_LEFT}. - *

- * @see yfiles.layout.OrientationLayout#orientation - * @type {boolean} - */ - horizontalOrientation:boolean; - /** - * Gets or sets whether or not the position of the edge labels should be changed during orientation change. - * @type {boolean} - */ - considerEdgeLabels:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.OrientationLayout; - } - /** - * {@link yfiles.layout.PortCalculator} adjusts the final port assignments after a layout has been calculated. - *

- * This can be useful if the port assignment calculated by the layout algorithm is insufficient. This stage uses {@link yfiles.algorithms.IDataProvider} - * instances registered with the graph using the keys defined in the {@link yfiles.layout.IIntersectionCalculator} interface to - * calculate the new port offsets. - *

- *

- * For each edge in the graph, {@link yfiles.layout.IIntersectionCalculator}s are retrieved from these - * {@link yfiles.algorithms.IDataProvider}s. If such an {@link yfiles.layout.IIntersectionCalculator} is assigned, it will provide the - * intersection point of the edge and the node. Then this point is added to the {@link yfiles.layout.IEdgeLayout}. - *

- *

- * For this layout stage to work properly, use {@link yfiles.layout.CompositeLayoutStage#prependStage} or {@link yfiles.layout.MultiStageLayout#prependStage} - * to add this layout stage and register appropriate {@link yfiles.algorithms.IDataProvider}s with the graph using the keys defined - * in {@link yfiles.layout.IIntersectionCalculator}. - *

- *

- * Note that this class will not change the coordinates of a port if it is associated with a strong port constraint. - *

- * @see yfiles.layout.IIntersectionCalculator - * @see yfiles.layout.IntersectionCalculatorKeys#SOURCE_INTERSECTION_CALCULATOR_DP_KEY - * @see yfiles.layout.IntersectionCalculatorKeys#TARGET_INTERSECTION_CALCULATOR_DP_KEY - * @see yfiles.layout.PortConstraint - * @class - * @extends {yfiles.layout.LayoutStageBase} - * @implements {yfiles.layout.ILayoutStage} - */ - export interface PortCalculator extends yfiles.layout.LayoutStageBase,yfiles.layout.ILayoutStage{} - export class PortCalculator { - /** - * Creates a new {@link yfiles.layout.PortCalculator} instance with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - */ - constructor(); - /** - * Performs the actual port calculation on the specified graph instance. - * @param graph the input graph - * @protected - */ - calculatePorts(graph:yfiles.layout.LayoutGraph):void; - /** - * Determines whether two points are equal. - *

- * This implementation uses {@link yfiles.layout.PortCalculator#Eps} to add some tolerance to the comparison. It is called by {@link yfiles.layout.PortCalculator#calculatePorts} - * and may be overridden to change the accuracy/tolerance of the comparison. - *

- * @param x1 the x-coordinate of the first point - * @param y1 the y-coordinate of the first point - * @param x2 the x-coordinate of the second point - * @param y2 the y-coordinate of the second point - * @returns true if both points are considered equal, false otherwise - * @see yfiles.layout.PortCalculator#calculatePorts - * @see yfiles.layout.PortCalculator#Eps - * @protected - */ - equalsEps(x1:number,y1:number,x2:number,y2:number):boolean; - /** - * EPSILON used by {@link yfiles.layout.PortCalculator#equalsEps}. - *

- * By default this is 0.2d. - *

- * @protected - * @type {number} - */ - Eps:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.PortCalculator; - } - /** - * This class represents a candidate port on which edges can be connected to their source and/or target node. - *

- * The notion of {@link yfiles.layout.PortCandidate}s extends the one of {@link yfiles.layout.PortConstraint}s. In contrast to - * {@link yfiles.layout.PortConstraint}s, they can be associated with both edges and nodes. Moreover, more than one {@link yfiles.layout.PortCandidate} - * can be specified for an edge or a node. - *

- *

- * Edge {@link yfiles.layout.PortCandidate}s can be introduced to define specific sides or exact locations on which a given edge can be - * connected to its source or target node. - *
- * Information about edge {@link yfiles.layout.PortCandidate}s is held by {@link yfiles.algorithms.IDataProvider}s that are registered with - * the graph using keys {@link yfiles.layout.PortCandidate#SOURCE_PORT_CANDIDATE_COLLECTION_DP_KEY} (to specify - * {@link yfiles.layout.PortCandidate}s for an edge on the source node) and {@link yfiles.layout.PortCandidate#TARGET_PORT_CANDIDATE_COLLECTION_DP_KEY} - * (to specify {@link yfiles.layout.PortCandidate}s for an edge on the target node). The {@link yfiles.algorithms.IDataProvider}s hold a {@link yfiles.collections.ICollection. collection} - * of {@link yfiles.layout.PortCandidate}s for each edge. - *

- *

- * Node {@link yfiles.layout.PortCandidate}s determine available ports on the nodes to which edges can be connected. This means that an - * edge of the graph can be connected to any of these node ports (unless edge {@link yfiles.layout.PortCandidate}s are specified - * too). - *
- * To register and define node {@link yfiles.layout.PortCandidate}s refer to {@link yfiles.layout.PortCandidateSet}. - *

- *

- * A {@link yfiles.layout.PortCandidate} is described by the following attributes: - *

- *
    - *
  • - * Offsets: The X-offset (Y-offset) determines the horizontal (vertical) distance of the {@link yfiles.layout.PortCandidate} - * relative to the center of the node. - *
  • - *
  • - * Fixed or free: Fixed - * {@link yfiles.layout.PortCandidate}s are defined using exact coordinates, whereas coordinates of free candidates are selected - * arbitrarily. - *
  • - *
  • - * Direction: Corresponds to the incoming or outgoing directions of the edges when connecting to a target or source node, - * respectively. - *
  • - *
  • - * Penalty cost: Represents the cost of usage of a - * {@link yfiles.layout.PortCandidate}. During the processing of an edge by a layout or routing algorithm, candidates of lower cost - * will be considered first. - *
  • - *
- *

- * If candidates are defined for nodes as well as for edges and if they should be properly matched by layout algorithms - * (i.e. detected as the same candidate), then it is important that the same {@link yfiles.layout.PortCandidate} instance is - * registered. It does not suffice to register candidates with the same parameter values. - *

- *

- * {@graph {"ann":{"s":[60,30],"d":1},"styles":{"6":{"f":"#ff0000","b":1, "c":1}, "7":{"f":"#00ffff","b":1}, "8":{"f":"#008000","b":1}},"n":[[646.5,475.5],[725.5,528.5],[831.5,470],[669.5,605.5],[722.5,530.5,6,6,8],[724,549.5,3,8,7],[783,531,5,5,6],[783,551,5,5,6],[667.5,502,6,6,8],[696.5,604.5,8,3,7],[848,498,5,5,6],[696.5,634,8,3,7],[848,468.12,5,5,6],[667.5,472.5,6,6,8],[737.5,525,6,6,8]],"e":[[0,1,-6,15,-30,-10,[670.5,533.5]],[2,1,-11,15,30,-10,[850.5,533.5]],[3,1,1,-15,-30,10,[700.5,553.5]]],"vp":[646.0,468.0,246.0,169.0]}} Example of using edge port candidates. Edge port candidates are colored uniquely based on the edge with which they are - * associated. - *

- *

- * Not all layout and routing algorithms are able to handle {@link yfiles.layout.PortCandidate}s. Major layout algorithms that obey - * them are {@link yfiles.hierarchic.HierarchicLayout}, {@link yfiles.router.EdgeRouter}, {@link yfiles.router.ChannelEdgeRouter} and - * {@link yfiles.router.BusRouter}. - *

- * @class - */ - export interface PortCandidate extends yfiles.lang.Object{} - export class PortCandidate { - /** - * Factory method that creates a fixed {@link yfiles.layout.PortCandidate} instance with the given cost of usage, direction and - * offset values. - * @param directionMask any combination of the default direction specifiers - * @param xOffset the X-offset relative to the center of the node - * @param yOffset the Y-offset relative to the center of the node - * @param [cost=0.0] the penalty cost for using this {@link } instance - * @returns a new {@link } instance - * @static - */ - static createCandidate(xOffset:number,yOffset:number,directionMask:yfiles.layout.PortDirections,cost?:number):yfiles.layout.PortCandidate; - /** - * Factory method that creates a free {@link yfiles.layout.PortCandidate} instance with the given direction and cost of usage. - * @param directionMask any combination of the default direction specifiers - * @param cost the penalty cost for using this {@link } - * @returns a new {@link } instance - * @static - */ - static createCandidate(directionMask:yfiles.layout.PortDirections,cost:number):yfiles.layout.PortCandidate; - /** - * Factory method that returns a free {@link yfiles.layout.PortCandidate} instance with zero cost of usage and the direction - * specified by the {@link yfiles.layout.PortConstraint#side side} of the given {@link yfiles.layout.PortConstraint}. - * @param fromPortConstraint the {@link } whose {@link #side side} should be used as direction - * @returns a new {@link } instance - * @static - */ - static createCandidate(fromPortConstraint:yfiles.layout.PortConstraint):yfiles.layout.PortCandidate; - /** - * Factory method that creates a free {@link yfiles.layout.PortCandidate} instance with the given direction and zero cost of - * usage. - * @param directionMask any combination of the default direction specifiers - * @returns a new {@link } instance - * @static - */ - static createCandidate(directionMask:yfiles.layout.PortDirections):yfiles.layout.PortCandidate; - /** - * Returns the direction of this {@link yfiles.layout.PortCandidate} instance with respect to the given {@link yfiles.layout.OrientationLayout#orientation layout orientation}. - *

- * If the direction mask is not required to be calculated with respect to the actual {@link yfiles.layout.OrientationLayout#orientation layout orientation}, {@link yfiles.layout.PortCandidate#direction} should be used - * instead. - *

- * @param layoutOrientation - * @returns the direction of this {@link } with respect to the given layout orientation - * @see yfiles.layout.PortCandidate#direction - */ - getDirectionForLayoutOrientation(layoutOrientation:yfiles.layout.LayoutOrientation):yfiles.layout.PortDirections; - /** - * Returns the X-offset of the {@link yfiles.layout.PortCandidate} with respect to the center of the corresponding node for the - * given {@link yfiles.layout.OrientationLayout#orientation layout orientation} and {@link yfiles.layout.OrientationLayout#mirrorMode mirror mask}. - *

- * The X-offset encodes the horizontal distance of the port relative to the center of a node. If the {@link yfiles.layout.PortCandidate} - * is not {@link yfiles.layout.PortCandidate#fixed fixed} (i.e., free), the X-offset is equal to zero. - *

- * @param layoutOrientation the layout orientation - * @param mirrorMask the mirror mask - * @returns the X-offset of the port with respect to the given orientation and mirror mask - */ - getXOffsetForLayoutOrientation(layoutOrientation:yfiles.layout.LayoutOrientation,mirrorMask:yfiles.layout.MirrorModes):number; - /** - * Returns the X-offset of the {@link yfiles.layout.PortCandidate} with respect to the center of the corresponding node for the - * given {@link yfiles.layout.OrientationLayout#orientation layout orientation}. - *

- * The X-offset encodes the horizontal distance of the port relative to the center of a node. If the {@link yfiles.layout.PortCandidate} - * is not {@link yfiles.layout.PortCandidate#fixed fixed} (i.e., free), the X-offset is equal to zero. - *

- * @param layoutOrientation the layout orientation - * @returns the X-offset of the {@link } with respect to the given layout orientation - */ - getXOffsetForLayoutOrientation(layoutOrientation:yfiles.layout.LayoutOrientation):number; - /** - * Returns the Y-offset of the {@link yfiles.layout.PortCandidate} with respect to the center of the corresponding node for the - * given {@link yfiles.layout.OrientationLayout#orientation layout orientation} and {@link yfiles.layout.OrientationLayout#mirrorMode mirror mask}. - *

- * The Y-offset encodes the vertical distance of the port relative to the center of a node. If the {@link yfiles.layout.PortCandidate} - * is not {@link yfiles.layout.PortCandidate#fixed fixed} (i.e., free), the Y-offset is equal to zero. - *

- * @param layoutOrientation the layout orientation - * @param mirrorMask the mirror mask - * @returns the Y-offset of the {@link } with respect to the given orientation and mirror mask - */ - getYOffsetForLayoutOrientation(layoutOrientation:yfiles.layout.LayoutOrientation,mirrorMask:yfiles.layout.MirrorModes):number; - /** - * Returns the Y-offset of the {@link yfiles.layout.PortCandidate} with respect to the center of the corresponding node for the - * given {@link yfiles.layout.OrientationLayout#orientation layout orientation}. - *

- * The Y-offset encodes the vertical distance of the port relative to the center of a node. If the {@link yfiles.layout.PortCandidate} - * is not {@link yfiles.layout.PortCandidate#fixed fixed} (i.e., free), the Y-offset is equal to zero. - *

- * @param layoutOrientation the layout orientation - * @returns the Y-offset of the {@link } with respect to the given layout orientation - */ - getYOffsetForLayoutOrientation(layoutOrientation:yfiles.layout.LayoutOrientation):number; - /** - * Returns whether or not this {@link yfiles.layout.PortCandidate} lies in the given direction. - * @param directionMask one of the default direction specifiers - * @returns true if this {@link } lies in the given direction, false otherwise - */ - isInDirection(directionMask:yfiles.layout.PortDirections):boolean; - /** - * A utility method that converts the current {@link yfiles.layout.PortCandidate} instance to a {@link yfiles.layout.PortConstraint}. - *

- * The {@link yfiles.layout.PortConstraint#side side} of the created {@link yfiles.layout.PortConstraint} matches the {@link yfiles.layout.PortCandidate#direction direction} of this {@link yfiles.layout.PortCandidate}. - *

- *

- * If this {@link yfiles.layout.PortCandidate} is {@link yfiles.layout.PortCandidate#fixed fixed}, the resulting {@link yfiles.layout.PortConstraint} will be {@link yfiles.layout.PortConstraint#strong strong}. - *

- * @returns a {@link } that matches this {@link } - */ - toPortConstraint():yfiles.layout.PortConstraint; - /** - * A utility method that converts the current {@link yfiles.layout.PortCandidate} instance to a {@link yfiles.layout.PortConstraint} with - * respect to the given {@link yfiles.layout.OrientationLayout#orientation layout orientation}. - *

- * The {@link yfiles.layout.PortConstraint#side side} of the created {@link yfiles.layout.PortConstraint} is the {@link yfiles.layout.PortCandidate#direction direction} of this {@link yfiles.layout.PortCandidate} interpreted - * for the given orientation. - *

- *

- * If this {@link yfiles.layout.PortCandidate} is {@link yfiles.layout.PortCandidate#fixed fixed}, the resulting {@link yfiles.layout.PortConstraint} will be {@link yfiles.layout.PortConstraint#strong strong}. - *

- * @param layoutOrientation - * @returns a {@link } that matches this {@link } with respect to the given orientation - */ - toPortConstraintForLayoutOrientation(layoutOrientation:yfiles.layout.LayoutOrientation):yfiles.layout.PortConstraint; - /** - * Data provider key for specifying source port candidates for each edge - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.>} - */ - static SOURCE_PORT_CANDIDATE_COLLECTION_DP_KEY:yfiles.algorithms.EdgeDpKey>; - /** - * Data provider key for specifying target port candidates for each edge - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.>} - */ - static TARGET_PORT_CANDIDATE_COLLECTION_DP_KEY:yfiles.algorithms.EdgeDpKey>; - /** - * Gets the direction of this {@link yfiles.layout.PortCandidate}. - *

- * If the direction is required to be calculated with respect to the actual {@link yfiles.layout.OrientationLayout#orientation layout orientation}, {@link yfiles.layout.PortCandidate#getDirectionForLayoutOrientation} - * should be used instead. - *

- * @see yfiles.layout.PortCandidate#getDirectionForLayoutOrientation - * @type {yfiles.layout.PortDirections} - */ - direction:yfiles.layout.PortDirections; - /** - * Gets whether or not this {@link yfiles.layout.PortCandidate} is fixed. - *

- * Fixed - * {@link yfiles.layout.PortCandidate}s are defined using exact coordinates, whereas coordinates of free candidates are selected - * arbitrarily. - *

- * @type {boolean} - */ - fixed:boolean; - /** - * Gets the X-offset of the {@link yfiles.layout.PortCandidate} with respect to the center of the corresponding node. - *

- * The X-offset encodes the horizontal distance of the port relative to the center of a node. If the {@link yfiles.layout.PortCandidate} - * is not {@link yfiles.layout.PortCandidate#fixed fixed} (i.e., free), the X-offset is zero. - *

- * @type {number} - */ - xOffset:number; - /** - * Gets the Y-offset of the {@link yfiles.layout.PortCandidate} with respect to the center of the corresponding node. - *

- * The Y-offset encodes the vertical distance of the port relative to the center of a node. If the {@link yfiles.layout.PortCandidate} - * is not {@link yfiles.layout.PortCandidate#fixed fixed} (i.e., free), the Y-offset is zero. - *

- * @type {number} - */ - yOffset:number; - /** - * Gets the penalty cost for using this {@link yfiles.layout.PortCandidate} instance. - * @type {number} - */ - cost:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.PortCandidate; - } - /** - * A {@link yfiles.layout.IPortCandidateMatcher} retrieves the best matching {@link yfiles.layout.IPortCandidateSetEntry entries} from a {@link yfiles.layout.PortCandidateSet}. - *

- * How well a candidate is matching can be decided based on its cost, its currently available capacity, its offsets or - * whether or not its direction is consistent with the desired one. - *

- *

- * To use custom implementations of this interface, method {@link yfiles.layout.PortCandidateSet#createMatcher} should be - * overridden. - *

- * @interface - */ - export interface IPortCandidateMatcher extends yfiles.lang.Object{ - /** - * Returns the next best matching {@link yfiles.layout.IPortCandidateSetEntry} for the given parameters. - * @param edge the edge for which to find a candidate - * @param source true if the given edge connects to its source node, false otherwise - * @param xOffset the preferred X-offset of the port relative to the center of the node - * @param yOffset the preferred Y-offset of the port relative to the center of the node - * @param directionMask any combination of default directions defined in {@link } - * @returns a matching {@link } instance - * @abstract - */ - findMatchingCandidate(edge:yfiles.algorithms.Edge,source:boolean,xOffset:number,yOffset:number,directionMask:yfiles.layout.PortDirections):yfiles.layout.IPortCandidateSetEntry; - /** - * Returns the next best matching {@link yfiles.layout.IPortCandidateSetEntry} for the given parameters. - * @param edge the edge for which to find a candidate - * @param source true if the given edge connects to its source node, false otherwise - * @param directionMask any combination of default directions defined in {@link } - * @returns a matching {@link } instance - * @abstract - */ - findMatchingCandidate(edge:yfiles.algorithms.Edge,source:boolean,directionMask:yfiles.layout.PortDirections):yfiles.layout.IPortCandidateSetEntry; - /** - * Returns the next best matching {@link yfiles.layout.IPortCandidateSetEntry}. - * @returns a matching {@link } instance - * @abstract - */ - findMatchingCandidate():yfiles.layout.IPortCandidateSetEntry; - } - var IPortCandidateMatcher:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.IPortCandidateMatcher; - }; - /** - * This interface represents an entry of a {@link yfiles.layout.PortCandidateSet} and provides access to the actual {@link yfiles.layout.PortCandidate} - * instance and the maximum number of edges allowed to connect to it. - * @interface - */ - export interface IPortCandidateSetEntry extends yfiles.lang.Object{ - /** - * Gets the actual {@link yfiles.layout.PortCandidate} associated with this {@link yfiles.layout.IPortCandidateSetEntry}. - * @abstract - * @type {yfiles.layout.PortCandidate} - */ - portCandidate:yfiles.layout.PortCandidate; - /** - * Gets the maximum number of edges allowed to connect to the {@link yfiles.layout.PortCandidate} associated with this - * {@link yfiles.layout.IPortCandidateSetEntry}. - *

- * 0x7FFFFFFF indicates that the number of connections is unbounded. - *

- * @abstract - * @type {number} - */ - connections:number; - } - var IPortCandidateSetEntry:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.IPortCandidateSetEntry; - }; - /** - * This class associates {@link yfiles.layout.PortCandidate}s with the nodes of a graph. - *

- * {@link yfiles.layout.PortCandidate}s defined on nodes specify sides or even exact locations at which edges can be connected. - * This means that an edge can be connected to any of the available node ports (unless edge {@link yfiles.layout.PortCandidate}s - * are specified too). Each node {@link yfiles.layout.PortCandidate} has a capacity, i.e., a maximum number of edges allowed to - * connect to it. - *

- *

- * Information about {@link yfiles.layout.PortCandidate}s on nodes is held by a {@link yfiles.algorithms.IDataProvider} that stores a {@link yfiles.layout.PortCandidateSet} - * for each node and is registered with the graph using key {@link yfiles.layout.PortCandidateSet#NODE_PORT_CANDIDATE_SET_DP_KEY}. - *

- *

- * The {@link yfiles.layout.PortCandidate}s are retrieved from the {@link yfiles.layout.PortCandidateSet} through a {@link yfiles.layout.IPortCandidateSetEntry} - * that holds the information about the actual {@link yfiles.layout.PortCandidate}. This object is also used for retrieving the - * best candidate from a {@link yfiles.layout.PortCandidateSet} based on the cost (lower costs are considered first) and the - * available capacity of each candidate. Custom searching for the best {@link yfiles.layout.PortCandidate} can be achieved by - * implementing {@link yfiles.layout.IPortCandidateMatcher} interface. - *

- *

- * {@graph {"ann":{"s":[5,5],"d":1},"styles":{"6":{"f":"#008000","b":1, "c":1}, "7":{"f":"#00ffff","b":1}, "8":{"f":"#ff0000","b":1}},"n":[[-54,-100,60,30],[25,-47,60,30],[131,-105.5,60,30],[-31,30,60,30],[111,30.5,60,30],[63.81,-49.5,8],[40.81,-49.5,8],[23.5,-46,3,8,7],[23.5,-26,3,8,7],[83.5,-46,3,8,7],[83.5,-26,3,8,7,6],[40.81,-19.5,8],[63.81,-19.5,8],[-32.5,-73,6],[-2.5,28,6],[132.5,28,6],[147.5,-77.5,6]],"e":[[0,1,-6,15,-30,-10,[-30,-42]],[2,1,-11,15,30,-10,[150,-42]],[3,1,1,-15,-30,10,[0,-22]],[4,1,-6,-15,30,10,[135,-22]]],"vp":[-54.0,-106.0,245.0,167.0]}} Example of node port candidates. Circular ports represent node port candidates on source nodes of each edge. Square and - * rectangular ports are possible port candidates on the target node. Rectangular ports have zero cost of usage and unit - * capacity whereas square rectangles have unit cost and capacity. - *

- *

- * Not all layout and routing algorithms are able to handle {@link yfiles.layout.PortCandidate}s. Major layout algorithms that obey - * them are {@link yfiles.hierarchic.HierarchicLayout}, {@link yfiles.router.EdgeRouter}, {@link yfiles.router.ChannelEdgeRouter} and - * {@link yfiles.router.BusRouter}. - *

- * @class - */ - export interface PortCandidateSet extends yfiles.lang.Object{} - export class PortCandidateSet { - /** - * Creates a new empty {@link yfiles.layout.PortCandidateSet} instance. - *

- * Addition of {@link yfiles.layout.PortCandidate}s to this {@link yfiles.layout.PortCandidateSet set} can be performed using {@link yfiles.layout.PortCandidateSet#add}. - *

- */ - constructor(); - /** - * Adds a {@link yfiles.layout.PortCandidate} with the given capacity to this {@link yfiles.layout.PortCandidateSet}. - *

- * The capacity value defines the maximum number of edges allowed to connect to the candidate. If no limitation for this - * number exists, 0x7FFFFFFF can be used. - *

- *

- * The capacity must be greater than zero. - *

- * @param p the {@link } to add - * @param [connections=1] the capacity of the given port - * @throws {Stubs.Exceptions.ArgumentError} if the given capacity is less than or equal to zero - */ - add(p:yfiles.layout.PortCandidate,connections?:number):void; - /** - * Creates a {@link yfiles.layout.IPortCandidateMatcher} that retrieves {@link yfiles.layout.IPortCandidateSetEntry entries} from this {@link yfiles.layout.PortCandidateSet}. - *

- * Each next best matching candidate is determined based on its cost, its current available capacity and based on whether - * or not its direction is consistent with the desired one. - *

- *

- * This method may be overridden to support custom implementations of {@link yfiles.layout.IPortCandidateMatcher}. - *

- * @returns a new {@link } instance - */ - createMatcher():yfiles.layout.IPortCandidateMatcher; - /** - * Calculates the penalty cost for the usage of the given {@link yfiles.layout.IPortCandidateSetEntry entry} and the given parameters. - *

- * The cost is equal to the {@link yfiles.layout.PortCandidate#cost cost of usage} of the {@link yfiles.layout.IPortCandidateSetEntry#portCandidate associated port candidate}. - *

- *

- * This method may be overridden to customize the calculation of the cost of usage of an {@link yfiles.layout.IPortCandidateSetEntry entry}. - *

- * @param entry the entry for which the cost is computed - * @param edge the edge that will connect to the {@link } associated with the entry - * @param source true if the given edge connects to its source node, false otherwise - * @param xOffset the preferred X-offset of the port relative to the center of the node - * @param yOffset the preferred Y-offset of the port relative to the center of the node - * @returns the penalty cost for the usage of the given {@link } - */ - getCost(entry:yfiles.layout.IPortCandidateSetEntry,edge:yfiles.algorithms.Edge,source:boolean,xOffset:number,yOffset:number):number; - /** - * Calculates the priority of the given {@link yfiles.layout.IPortCandidateSetEntry entry}. - *

- * Higher priority means that the entry will be considered earlier by a {@link yfiles.layout.IPortCandidateMatcher}. - *

- *

- * This method may be overridden to customize the calculation of the priority of {@link yfiles.layout.IPortCandidateSetEntry entries}. - *

- * @param entry the entry for which the cost is computed - * @param edge the edge that will connect to the {@link } associated with the entry - * @param source true if the given edge connects to its source node, false otherwise - * @returns the priority of the given {@link } - */ - getPriority(entry:yfiles.layout.IPortCandidateSetEntry,edge:yfiles.algorithms.Edge,source:boolean):number; - /** - * Removes the given {@link yfiles.layout.IPortCandidateSetEntry entry} from the list of candidate entries. - * @param entry the entry to remove - */ - remove(entry:yfiles.layout.IPortCandidateSetEntry):void; - /** - * Data provider key for specifying a port candidate set for each node - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static NODE_PORT_CANDIDATE_SET_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets the total number of connections allowed by the {@link yfiles.layout.PortCandidate}s described by this {@link yfiles.layout.PortCandidateSet} - * or 0x7FFFFFFF if the number is unbounded. - * @type {number} - */ - connectionCount:number; - /** - * Gets an {@link yfiles.collections.IEnumerator.} over the list of candidate {@link yfiles.layout.IPortCandidateSetEntry entries} of this {@link yfiles.layout.PortCandidateSet}. - * @type {yfiles.collections.IEnumerator.} - */ - entries:yfiles.collections.IEnumerator; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.PortCandidateSet; - } - /** - * A {@link yfiles.layout.PortConstraint} represents a constraint for the source or target port of an edge path. - *

- * It determines the location at which an edge path can be connected to its source and/or target node. There exist two - * different types of {@link yfiles.layout.PortConstraint}s: - *

- *
    - *
  • Weak {@link yfiles.layout.PortConstraint}s determine the side of the node to which an edge can be connected.
  • - *
  • - * Strong - * {@link yfiles.layout.PortConstraint}s determine the exact coordinates of the point to which an edge path can be connected. These - * coordinates are determined at the time the edge is processed by a layout or routing algorithm and are always interpreted - * relative to a node's center. - *
  • - *
- *

- * {@graph {"ann":{"s":[3,8],"d":1},"styles":{"6":{"f":"#FF0000"},"7":{"f":"#000000"}},"n":[[-570,-40,90,30],[-395,-140,90,30],[-563.02,-184.16,90,30],[-398.2,-140,9,30,6],[-477,-184.16,9,30,6],[-484.4,-40,9,30,6],[-474,-173.16,7],[-395.2,-135.01,7],[-395.2,-122.49,7],[-481.4,-29,7]],"e":[[0,1,45,0,-45,6,[-463.02,-25,-463.02,-119]],[2,1,45,0,-45,-6,[-424.34,-169.16,-424.34,-131]]],"vp":[-570.0,-185.0,265.0,175.0]}} Sample output of weak port constraints. For both edges, source port constraints are associated with side {@link yfiles.layout.PortSide#EAST} - * while target port constraints are associated with side {@link yfiles.layout.PortSide#WEST}. Red rectangles indicate that edges - * can be connected to any point of these sides. Black rectangles represent the selected ports. {@graph {"ann":{"s":[90,30],"d":1},"styles":{"6":{"f":"#FF0000"},"7":{"f":"#000000"}},"n":[[-145,135.67],[30,35.67],[-138.02,-8.49],[-49.82,1.51,4,10,7],[28,45.67,4,10,7],[-57.36,145.67,4,10,7]],"e":[[0,1,[-35,150.67,-35,50.67]],[2,1,[-0.22,6.51,-0.22,50.67]]],"vp":[-145.0,-9.0,265.0,175.0]}} Sample output of strong port - * constraints. For both edges, source port constraints are associated with side {@link yfiles.layout.PortSide#EAST} while target - * port constraints are associated with side - * {@link yfiles.layout.PortSide#WEST}. Black rectangles indicate the exact points on the corresponding sides of the nodes to which - * edges can be connected. - *

- *

- * Information about {@link yfiles.layout.PortConstraint}s is held by {@link yfiles.algorithms.IDataProvider}s that are registered with the - * graph using keys {@link yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY} (to specify - * {@link yfiles.layout.PortConstraint}s for an edge on its source node) and {@link yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY} - * (to specify {@link yfiles.layout.PortConstraint}s for an edge on its target node). - *

- *

- * Not all layout and routing algorithms are able to handle {@link yfiles.layout.PortConstraint}s. Major layout algorithms that - * obey them are {@link yfiles.hierarchic.HierarchicLayout}, {@link yfiles.tree.TreeLayout}, {@link yfiles.router.EdgeRouter}, {@link yfiles.router.ChannelEdgeRouter} - * and {@link yfiles.router.BusRouter}. - *

- * @see yfiles.layout.PortConstraintKeys - * @class - */ - export interface PortConstraint extends yfiles.lang.Object{} - export class PortConstraint { - /** - * Creates a new {@link yfiles.layout.PortConstraint} that constrains the edge to connect to the given side of a node and that can - * be either strong or weak. - *

- * If the {@link yfiles.layout.PortConstraint} is strong, the layout or routing algorithm should use the port coordinates of this - * constraint. - *

- * @param side one of the default side specifiers - * @param [strong=false] true if this {@link } is strong, false otherwise - * @returns a new {@link } instance - * @throws {Stubs.Exceptions.ArgumentError} if an unknown side is given - * @static - */ - static create(side:yfiles.layout.PortSide,strong?:boolean):yfiles.layout.PortConstraint; - /** - * Returns the source {@link yfiles.layout.PortConstraint} associated with the given edge. - *

- * To retrieve the {@link yfiles.algorithms.IDataProvider} that holds information about source {@link yfiles.layout.PortConstraint}s, key {@link yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY} - * is used. - *

- * @param graph the input graph - * @param e the edge - * @returns the source {@link } of the given edge or null if there is none - * @static - */ - static getSPC(graph:yfiles.layout.LayoutGraph,e:yfiles.algorithms.Edge):yfiles.layout.PortConstraint; - /** - * Returns the target {@link yfiles.layout.PortConstraint} associated with the given edge. - *

- * To retrieve the {@link yfiles.algorithms.IDataProvider} that holds information about target {@link yfiles.layout.PortConstraint}s, key {@link yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY} - * is used. - *

- * @param graph the input graph - * @param e the edge - * @returns the target {@link } of the given edge or null if there is none - * @static - */ - static getTPC(graph:yfiles.layout.LayoutGraph,e:yfiles.algorithms.Edge):yfiles.layout.PortConstraint; - /** - * Checks whether or not there exist source or target {@link yfiles.layout.PortConstraint}s associated with the given edge. - *

- * To retrieve the {@link yfiles.algorithms.IDataProvider}s that hold information about source or target - * {@link yfiles.layout.PortConstraint}s, keys {@link yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY} and {@link yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY} - * are used. - *

- * @param graph the input graph - * @param e the edge - * @returns true if the edge has source or target {@link }s, false otherwise - * @static - */ - static hasPC(graph:yfiles.layout.LayoutGraph,e:yfiles.algorithms.Edge):boolean; - /** - * Checks whether or not there exist source {@link yfiles.layout.PortConstraint}s associated with the given edge. - *

- * To retrieve the {@link yfiles.algorithms.IDataProvider} that holds information about source {@link yfiles.layout.PortConstraint}s, key {@link yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY} - * is used. - *

- * @param graph the input graph - * @param e the edge - * @returns true if the edge has source {@link }s, false otherwise - * @static - */ - static hasSPC(graph:yfiles.layout.LayoutGraph,e:yfiles.algorithms.Edge):boolean; - /** - * Checks whether or not there exist target {@link yfiles.layout.PortConstraint}s associated with the given edge. - *

- * To retrieve the {@link yfiles.algorithms.IDataProvider} that holds information about target {@link yfiles.layout.PortConstraint}s, key {@link yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY} - * is used. - *

- * @param graph the input graph - * @param e the edge - * @returns true if the edge has target {@link }s, false otherwise - * @static - */ - static hasTPC(graph:yfiles.layout.LayoutGraph,e:yfiles.algorithms.Edge):boolean; - /** - * Gets whether or not this {@link yfiles.layout.PortConstraint} instance represents a strong constraint. - *

- * A strong {@link yfiles.layout.PortConstraint} determines the exact coordinates where the edge path's end should be located. - *

- * @type {boolean} - */ - strong:boolean; - /** - * Gets the side of the node to which an edge should connect. - * @type {yfiles.layout.PortSide} - */ - side:yfiles.layout.PortSide; - /** - * Gets whether or not this {@link yfiles.layout.PortConstraint} instance is associated with side {@link yfiles.layout.PortSide#NORTH}. - * @type {boolean} - */ - atNorth:boolean; - /** - * Gets whether or not this {@link yfiles.layout.PortConstraint} instance is associated with side {@link yfiles.layout.PortSide#SOUTH}. - * @type {boolean} - */ - atSouth:boolean; - /** - * Gets whether or not this {@link yfiles.layout.PortConstraint} instance is associated with side {@link yfiles.layout.PortSide#EAST}. - * @type {boolean} - */ - atEast:boolean; - /** - * Gets whether or not this {@link yfiles.layout.PortConstraint} instance is associated with side {@link yfiles.layout.PortSide#WEST}. - * @type {boolean} - */ - atWest:boolean; - /** - * Gets whether or not this {@link yfiles.layout.PortConstraint} instance is associated with side {@link yfiles.layout.PortSide#ANY}. - * @type {boolean} - */ - atAnySide:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.PortConstraint; - } - /** - * The {@link yfiles.layout.PortConstraintConfigurator} provides the possibility to create - * {@link yfiles.layout.PortConstraint}s according to the initial connecting side of an edge. - * @class - */ - export interface PortConstraintConfigurator extends yfiles.lang.Object{} - export class PortConstraintConfigurator { - /** - * Creates a new {@link yfiles.layout.PortConstraintConfigurator} instance. - */ - constructor(); - /** - * Creates a {@link yfiles.layout.PortConstraint} for the given edge. - *

- * The side of the constraint is set up according to the current drawing of the edge within the given graph. - *

- * @param graph the input graph - * @param edge the edge - * @param source true if a source {@link } for the given edge will be created, false for a target - * {@link } - * @param strong true if a strong {@link } is created, false for a weak {@link } - * @returns the {@link } for the given edge whose side is retrieved from the initial drawing - */ - createPortConstraintFromSketch(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge,source:boolean,strong:boolean):yfiles.layout.PortConstraint; - /** - * Creates {@link yfiles.layout.PortConstraint}s for some edges of the given graph. - * @param graph the input graph - * @param ec the {@link } that provides access to the edges for which to create {@link }s - * @param spcMap the {@link } that will be used for storing the source {@link }s of the edges - * @param strongSP true if strong source {@link }s should be assigned, false otherwise - * @param tpcMap the {@link } that will be used for storing the target {@link }s of the edges - * @param strongTP true if strong target {@link }s should be assigned, false otherwise - */ - createPortConstraintsFromSketch(graph:yfiles.layout.LayoutGraph,ec:yfiles.algorithms.IEdgeCursor,spcMap:yfiles.algorithms.IEdgeMap,strongSP:boolean,tpcMap:yfiles.algorithms.IEdgeMap,strongTP:boolean):void; - /** - * Creates weak {@link yfiles.layout.PortConstraint}s for all edges of the given graph. - * @param graph the input graph - * @param spcMap the {@link } that will be used for storing the source {@link }s of the edges - * @param tpcMap the {@link } that will be used for storing the target {@link }s of the edges - */ - createPortConstraintsFromSketch(graph:yfiles.layout.LayoutGraph,spcMap:yfiles.algorithms.IEdgeMap,tpcMap:yfiles.algorithms.IEdgeMap):void; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.PortConstraintConfigurator; - } - /** - * {@link yfiles.layout.PortConstraintKeys} are used for associating {@link yfiles.algorithms.IDataProvider DataProviders} that contain constraints for the edges of the - * input graph. - *

- * These constraints can either be {@link yfiles.layout.PortConstraint}s or edge groups. - * {@link yfiles.layout.PortConstraint}s force the edges to start/end on specified sides of the node. They may also restrict ports - * of edges to certain coordinates. Edge groups will bundle edges at a common source or target. They will start at the same - * coordinates and may share parts of their edge routes. - *

- *

- * Layout algorithms that support {@link yfiles.layout.PortConstraint}s or edge groups will access the - * {@link yfiles.algorithms.IDataProvider}s using the provided keys. - *

- * @class - * @static - */ - export interface PortConstraintKeys extends yfiles.lang.Object{} - export class PortConstraintKeys { - /** - * Data provider key for providing source constraints for edges in the input graph - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static SOURCE_PORT_CONSTRAINT_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for providing target constraints for edges in the input graph - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static TARGET_PORT_CONSTRAINT_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for assigning source group information for edges of the input graph - *

- * Edges sharing a source group identifier will share a common bus near the source or at a common source node if possible. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static SOURCE_GROUP_ID_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for assigning target group information for edges of the input graph - *

- * Edges sharing a target group identifier will share a common bus near the target or at a common target node if possible. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static TARGET_GROUP_ID_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for assigning port group ids to the edges' source - *

- * All edges with the same port id at a node will share the same port location. However, they will be routed - * independently. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static SOURCE_PORT_GROUP_ID_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for assigning port group ids to the edges' target - *

- * All edges with the same port id at a node will share the same port location. However, they will be routed - * independently. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static TARGET_PORT_GROUP_ID_DP_KEY:yfiles.algorithms.EdgeDpKey; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.PortConstraintKeys; - } - /** - * A {@link yfiles.layout.PreferredPlacementDescriptor} provides placement information for automatic edge labeling. - *

- * It provides several options that influence the label placement in generic labeling algorithms and layout algorithms that - * support integrated label placement. - *

- *

- * The preferred placement can describe multiple locations. For some options, like the {@link yfiles.layout.PreferredPlacementDescriptor#placeAlongEdge placement along the edge}, it is - * possible to have a combination of the valid values. These values can be connected with a logical or-operation. - *

- *

- * The following options describe the preferred placement: - *

- *
    - *
  • the placement along the edge
  • - *
  • the side of the edge
  • - *
  • the reference of the side
  • - *
  • the rotation angle of the label
  • - *
  • the reference for the rotation angle
  • - *
  • the rotation behavior for label on the right side of the edge
  • - *
  • the angle offset for label on the right side of the edge
  • - *
  • the distance between the label and its edge segment
  • - *
- *

- * The {@link yfiles.layout.PreferredPlacementDescriptor} will be immutable after {@link yfiles.layout.PreferredPlacementDescriptor#freeze} - * is called. - *

- *

- * A {@link yfiles.layout.PreferredPlacementDescriptor} must be set for each label and will be retrieved by the layout algorithms - * calling {@link yfiles.layout.IEdgeLabelLayout#preferredPlacementDescriptor}. - *

- * @class - */ - export interface PreferredPlacementDescriptor extends yfiles.lang.Object{} - export class PreferredPlacementDescriptor { - /** - * Creates a new {@link yfiles.layout.PreferredPlacementDescriptor} instance that copies the given descriptor. - * @param descriptor the {@link } that is copied - */ - constructor(descriptor:yfiles.layout.PreferredPlacementDescriptor); - /** - * Creates a new {@link yfiles.layout.PreferredPlacementDescriptor} instance with default settings. - */ - constructor(); - /** - * Clones this instance by returning a {@link any#memberwiseClone} or this in case this instance is already {@link yfiles.layout.PreferredPlacementDescriptor#isFrozen frozen}. - * @returns An instance of the same type as this instance. - */ - clone():any; - /** - * Makes this {@link yfiles.layout.PreferredPlacementDescriptor} instance immutable. - *

- * If this instance is immutable, all setter methods will throw an {@link yfiles.lang.Exception} when invoked. - *

- * @see yfiles.layout.PreferredPlacementDescriptor#isFrozen - */ - freeze():void; - /** - * Returns whether or not this is an immutable instance of {@link yfiles.layout.PreferredPlacementDescriptor}. - *

- * If this instance is immutable, all setter methods will throw an {@link yfiles.lang.Exception} when invoked. - *

- * @returns true if this instance is immutable, false otherwise - * @see yfiles.layout.PreferredPlacementDescriptor#freeze - */ - isFrozen():boolean; - /** - * Returns an immutable descriptor instance for the specified placement. - *

- * Descriptor instances returned by this method will use default values for all properties but {@link yfiles.layout.PreferredPlacementDescriptor#placeAlongEdge placement along edge} and - * {@link yfiles.layout.PreferredPlacementDescriptor#sideOfEdge side of edge}. - *

- * @param placement a combination of valid placements along the edge and valid sides of the edge - * @returns an immutable descriptor instance for the specified placement - * @see yfiles.layout.PreferredPlacementDescriptor#isFrozen - * @see yfiles.layout.PreferredPlacementDescriptor#placeAlongEdge - * @see yfiles.layout.PreferredPlacementDescriptor#sideOfEdge - * @static - */ - static newSharedInstance(placement:yfiles.layout.LabelPlacements):yfiles.layout.PreferredPlacementDescriptor; - /** - * Gets or sets the preferred placement along the edge. - * @throws {Stubs.Exceptions.InvalidOperationError} if this instance is {@link yfiles.layout.PreferredPlacementDescriptor#isFrozen immutable} - * @type {yfiles.layout.LabelPlacements} - */ - placeAlongEdge:yfiles.layout.LabelPlacements; - /** - * Gets or sets the preferred side of the edge. - * @throws {Stubs.Exceptions.InvalidOperationError} if this instance is {@link yfiles.layout.PreferredPlacementDescriptor#isFrozen immutable} - * @type {yfiles.layout.LabelPlacements} - */ - sideOfEdge:yfiles.layout.LabelPlacements; - /** - * Gets or sets how to interpret the preferred side as given by {@link yfiles.layout.PreferredPlacementDescriptor#sideOfEdge}. - * @throws {Stubs.Exceptions.InvalidOperationError} if this instance is {@link yfiles.layout.PreferredPlacementDescriptor#isFrozen immutable} - * @throws {Stubs.Exceptions.ArgumentError} if the specified side reference is invalid - * @type {yfiles.layout.LabelSideReferences} - */ - sideReference:yfiles.layout.LabelSideReferences; - /** - * Gets or sets the angle (in radians) for the label rotation. - *

- * How this angle is applied depends on the {@link yfiles.layout.PreferredPlacementDescriptor#angleReference angle reference}, the {@link yfiles.layout.PreferredPlacementDescriptor#angleRotationOnRightSide rotation} and the {@link yfiles.layout.PreferredPlacementDescriptor#angleOffsetOnRightSide offset} for labels on the right side of - * the edge. - *

- * @throws {Stubs.Exceptions.InvalidOperationError} if this instance is {@link yfiles.layout.PreferredPlacementDescriptor#isFrozen immutable} - * @see yfiles.layout.PreferredPlacementDescriptor#angleReference - * @see yfiles.layout.PreferredPlacementDescriptor#angleRotationOnRightSide - * @see yfiles.layout.PreferredPlacementDescriptor#angleOffsetOnRightSide - * @type {number} - */ - angle:number; - /** - * Gets or sets the reference of the angle given by {@link yfiles.layout.PreferredPlacementDescriptor#angle}. - * @throws {Stubs.Exceptions.InvalidOperationError} if this instance is {@link yfiles.layout.PreferredPlacementDescriptor#isFrozen immutable} - * @throws {Stubs.Exceptions.ArgumentError} if the specified value is not a valid angle reference - * @type {yfiles.layout.LabelAngleReferences} - */ - angleReference:yfiles.layout.LabelAngleReferences; - /** - * Gets or sets how the angle is applied to labels on the right side in respect of the labels of the left side of the - * edge. - * @throws {Stubs.Exceptions.InvalidOperationError} if this instance is {@link yfiles.layout.PreferredPlacementDescriptor#isFrozen immutable} - * @throws {Stubs.Exceptions.ArgumentError} if the specified value is not a valid angle rotation - * @type {yfiles.layout.LabelAngleOnRightSideRotations} - */ - angleRotationOnRightSide:yfiles.layout.LabelAngleOnRightSideRotations; - /** - * Gets or sets the angle offset for labels that are placed on the right side of the edge. - * @throws {Stubs.Exceptions.InvalidOperationError} if this instance is {@link yfiles.layout.PreferredPlacementDescriptor#isFrozen immutable} - * @throws {Stubs.Exceptions.ArgumentError} if the specified value is not valid angle offset - * @type {yfiles.layout.LabelAngleOnRightSideOffsets} - */ - angleOffsetOnRightSide:yfiles.layout.LabelAngleOnRightSideOffsets; - /** - * Gets or sets the preferred distance between a label and the corresponding edge segment. - *

- * If the given distance is < 0, the distance is not fixed, i.e., it is chosen by the automatic labeling algorithm. - *

- * @throws {Stubs.Exceptions.InvalidOperationError} if this instance is {@link yfiles.layout.PreferredPlacementDescriptor#isFrozen immutable} - * @throws {Stubs.Exceptions.ArgumentError} if the specified value is infinite or NaN - * @type {number} - */ - distanceToEdge:number; - /** - * Gets whether or not one of the preferred placement locations for this label is at source. - * @see yfiles.layout.LabelPlacements#AT_SOURCE - * @type {boolean} - */ - isAtSource:boolean; - /** - * Gets whether or not one of the preferred placement locations for this label is at center. - * @see yfiles.layout.LabelPlacements#AT_CENTER - * @type {boolean} - */ - isAtCenter:boolean; - /** - * Gets whether or not one of the preferred placements for this label is at target. - * @see yfiles.layout.LabelPlacements#AT_TARGET - * @type {boolean} - */ - isAtTarget:boolean; - /** - * Gets whether or not one of the preferred placements for this label is at the source port. - * @see yfiles.layout.LabelPlacements#AT_SOURCE_PORT - * @type {boolean} - */ - isAtSourcePort:boolean; - /** - * Gets whether or not one of the preferred placements for this label is at the target port. - * @see yfiles.layout.LabelPlacements#AT_TARGET_PORT - * @type {boolean} - */ - isAtTargetPort:boolean; - /** - * Gets whether or not one of the preferred sides for this label is left of the edge. - * @see yfiles.layout.LabelPlacements#LEFT_OF_EDGE - * @type {boolean} - */ - isLeftOfEdge:boolean; - /** - * Gets whether or not one of the preferred sides for this label is on the edge. - * @see yfiles.layout.LabelPlacements#ON_EDGE - * @type {boolean} - */ - isOnEdge:boolean; - /** - * Gets whether or not one of the preferred sides for this label is right of the edge. - * @see yfiles.layout.LabelPlacements#RIGHT_OF_EDGE - * @type {boolean} - */ - isRightOfEdge:boolean; - /** - * Gets whether or not one of the angle interpretations is absolute. - * @see yfiles.layout.LabelAngleReferences#ABSOLUTE - * @type {boolean} - */ - isAngleAbsolute:boolean; - /** - * Gets whether or not one of the angle interpretation is relative to the edge slope. - * @see yfiles.layout.LabelAngleReferences#RELATIVE_TO_EDGE_FLOW - * @type {boolean} - */ - isAngleRelativeToEdgeFlow:boolean; - /** - * Gets whether or not one of the angle interpretations is to rotate the angle of labels that are right of the edge - * co-rotating with the labels left of or centered on the edge, i.e., the angle of all labels is interpreted clockwise. - * @see yfiles.layout.PreferredPlacementDescriptor#isRightOfEdge - * @see yfiles.layout.LabelAngleOnRightSideRotations#CLOCKWISE - * @type {boolean} - */ - isAngleOnRightSideCoRotating:boolean; - /** - * Gets whether or not one of the angle interpretations is to rotate the angle of labels that are right of the edge - * counter-rotating with the labels left of or centered on the edge, i.e., the angle of labels left or centered on edge is - * interpreted clockwise while the angle of labels right of edge is interpreted counter-clockwise. - * @see yfiles.layout.PreferredPlacementDescriptor#isRightOfEdge - * @see yfiles.layout.LabelAngleOnRightSideRotations#COUNTER_CLOCKWISE - * @type {boolean} - */ - isAngleOnRightSideCounterRotating:boolean; - /** - * Gets whether or not one of the angle interpretations is to add no angle offset to labels that are right of the edge. - * @see yfiles.layout.PreferredPlacementDescriptor#isRightOfEdge - * @see yfiles.layout.LabelAngleOnRightSideOffsets#NONE - * @type {boolean} - */ - isAngleOffsetOnRightSideZero:boolean; - /** - * Gets whether or not one of the angle interpretations is to add an angle offset of 180 degrees to labels that are right - * of the edge. - * @see yfiles.layout.PreferredPlacementDescriptor#isRightOfEdge - * @see yfiles.layout.LabelAngleOnRightSideOffsets#SEMI - * @type {boolean} - */ - isAngleOffsetOnRightSide180:boolean; - /** - * Gets whether or not the preferred side specified by {@link yfiles.layout.PreferredPlacementDescriptor#sideOfEdge} is interpreted relative to the edge flow. - * @see yfiles.layout.LabelSideReferences#RELATIVE_TO_EDGE_FLOW - * @type {boolean} - */ - isSideRelativeToEdgeFlow:boolean; - /** - * Gets whether or not the preferred side specified by {@link yfiles.layout.PreferredPlacementDescriptor#sideOfEdge} is interpreted absolute, and on horizontal segments, labels with - * preferred side {@link yfiles.layout.LabelPlacements#LEFT_OF_EDGE} are placed above the segment. - * @see yfiles.layout.LabelSideReferences#ABSOLUTE_WITH_LEFT_IN_NORTH - * @type {boolean} - */ - isSideAbsoluteWithLeftInNorth:boolean; - /** - * Gets whether or not the preferred side specified by {@link yfiles.layout.PreferredPlacementDescriptor#sideOfEdge} is interpreted absolute, and on horizontal segments, labels with - * preferred side {@link yfiles.layout.LabelPlacements#RIGHT_OF_EDGE} are placed above the segment. - * @see yfiles.layout.LabelSideReferences#ABSOLUTE_WITH_RIGHT_IN_NORTH - * @type {boolean} - */ - isSideAbsoluteWithRightInNorth:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.PreferredPlacementDescriptor; - } - /** - * The {@link yfiles.layout.RemoveCollinearBendsStage} removes all collinear bends found in a graph. - *

- * The algorithm traverses each edge path from source to target and removes for each triple of consecutive collinear bends - * the middle one. - *

- *

- * A collinear bend forms a straight line with its preceding bend and its subsequent bend. The angle between the connecting - * edge segments is either 0 or 180 degrees. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface RemoveCollinearBendsStage extends yfiles.layout.LayoutStageBase{} - export class RemoveCollinearBendsStage { - /** - * Creates a new {@link yfiles.layout.RemoveCollinearBendsStage} instance with default settings. - */ - constructor(); - /** - * Gets or sets the scale that defines how accurate the algorithm is when it comes to comparing the coordinates of two - * bends. - *

- * This value determines how the values of the coordinates are rounded. If rounded coordinates lead to a collinear bend, - * this bend will be removed. - *

- *

- * The scaling factor needs to be positive. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified factor is less than or equal to 0 - * @type {number} - */ - scale:number; - /** - * Gets or sets whether the algorithm removes only collinear bends which lie in the middle of their neighbors or all - * collinear bends. - *

- * In the first case, the angle at the middle bend must be 180 degrees, while in the second case, the angle can be either 180 - * degrees or 0 degrees. - *

- * @type {boolean} - */ - removeStraightOnly:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.RemoveCollinearBendsStage; - } - /** - * {@link yfiles.layout.ReverseEdgesStage} selectively reverses edges in a graph, while keeping the layout and label positions of - * the reversed edges as close to the pre-reversal layout and positions as possible. - * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface ReverseEdgesStage extends yfiles.layout.LayoutStageBase{} - export class ReverseEdgesStage { - /** - * Creates a new {@link yfiles.layout.ReverseEdgesStage} instance with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [coreLayouter=null] The core layout algorithm. - * @see yfiles.layout.LayoutStageBase#coreLayout - */ - constructor(coreLayouter?:yfiles.layout.ILayoutAlgorithm); - /** - * Marks edges in a tree-structured graph component that need to be reversed to make the specified node the root of the - * tree component. - *

- * Only edges in the graph component to which the specified node belongs will be marked. - *

- * @param graph the graph to which the specified node belongs - * @param root the node to be considered the root of its tree component - * @param reversedEdges a {@link } to mark edges for reversal - * @throws {Stubs.Exceptions.ArgumentError} if the specified root node is null or does not belong to the specified graph - * @see yfiles.layout.ReverseEdgesStage#AFFECTED_EDGES_DP_KEY - * @static - */ - static findReversedTreeEdges(graph:yfiles.layout.LayoutGraph,root:yfiles.algorithms.Node,reversedEdges:yfiles.algorithms.IDataAcceptor):void; - /** - * Reverses the specified edge in the specified graph. - *

- * The layout of the specified edge is reversed as specified in - * {@link yfiles.layout.LayoutGraphUtilities#reverseEdgeLayout}. Moreover, the positions of all labels associated with the - * specified edge are adjusted to match the pre-reversal position as closely as possible. (Depending on a label's model it - * might not always be possible to achieve an exact match.) - *

- * @param graph the graph to which the specified edge belongs - * @param edge the edge to be reversed - * @see yfiles.layout.LayoutGraphUtilities#reverseEdgeLayout - */ - reverseEdge(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):void; - /** - * Reverses selected edges in the specified graph. - *

- * Selected edges are marked in a {@link yfiles.algorithms.IDataProvider} registered with - * {@link yfiles.layout.ReverseEdgesStage#AFFECTED_EDGES_DP_KEY}. - *

- *

- * Implementation detail: This method calls {@link yfiles.layout.ReverseEdgesStage#reverseEdge} in order to reverse a selected edge. - *

- * @param graph the graph in which to reverse edges. - * @see yfiles.layout.ReverseEdgesStage#AFFECTED_EDGES_DP_KEY - * @see yfiles.layout.ReverseEdgesStage#reverseEdge - */ - reverseEdges(graph:yfiles.layout.LayoutGraph):void; - /** - * Data provider key for selecting edges for reversal - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static AFFECTED_EDGES_DP_KEY:yfiles.algorithms.EdgeDpKey; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.ReverseEdgesStage; - } - /** - * A {@link yfiles.layout.SelfLoopRouter} routes the self-loops (reflexive edges) of a graph. - *

- * Layout Style The nodes and normal edges are arranged by the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. This layout algorithm only handles the paths of self-loops. - *

- *

- * Self-loops are routed either {@link yfiles.layout.SelfLoopStyle#ORTHOGONAL orthogonal} or with {@link yfiles.layout.SelfLoopStyle#ROUNDED rounded} corners. The layout algorithm places the self-loops in the least - * crowded quadrant around a node. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[100,100],[100,0],[0,100],[0,0]],"e":[[0,0,7.5,15,15,7.5,[122.5,145,145,145,145,122.5]],[0,1,5,-15,5,15],[1,1,10,-15,15,-10,[125,-15,145,-15,145,5]],[1,1,5,-15,15,-5,[120,-20,150,-20,150,10]],[1,0,-5,15,-5,-15],[0,2,-15,5,15,5],[2,2,-10,15,-15,10,[5,145,-15,145,-15,125]],[2,2,-5,15,-15,5,[10,150,-20,150,-20,120]],[2,0,15,-5,-15,-5],[1,3,-15,5,15,5],[2,3,5,-15,5,15],[3,3,-7.5,-15,-15,-7.5,[7.5,-15,-15,-15,-15,7.5]],[3,1,15,-5,-15,-5],[3,2,-5,15,-5,-15]],"vp":[-20.0,-20.0,170.0,170.0]}} - *

- *

- * Small graph with self-loops - *

- *

- * Concept Self-loops are handled in four steps: - *

- *
    - *
  1. Remove all self-loops of the input graph
  2. - *
  3. Invoke the core layout algorithm on the now self-loops free graph
  4. - *
  5. Reinsert all formerly removed self-loops
  6. - *
  7. Route the self-loops of the input graph
  8. - *
- *

- * Features - *

- *

- * {@link yfiles.layout.SelfLoopRouter} can either be used as a {@link yfiles.layout.ILayoutStage} wrapping a {@link yfiles.layout.ILayoutAlgorithm layout algorithm} which cannot - * handle self-loops. Then it will hide the self-loops from this {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} and take over the routing of them. - *
- * If no {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} is specified, {@link yfiles.layout.SelfLoopRouter} can work alone. It will route only the self-loops - * and keep the remaining graph unchanged. - *

- *

- * When all self-loops already have a suitable layout, this layout algorithm can {@link yfiles.layout.SelfLoopRouter#keepAllSelfLoopRoutes keep the self-loop paths}. It will just - * hide the self-loops before invoking the core layout algorithm, such that they are not altered by it. - *
- * To only exclude some self-loops from routing, a {@link yfiles.algorithms.IDataProvider} registered with {@link yfiles.layout.SelfLoopRouter#KEEP_SELF_LOOP_LAYOUT_DP_KEY} - * can be used for marking those self-loops. - *

- * @see yfiles.layout.MultiStageLayout - * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface SelfLoopRouter extends yfiles.layout.LayoutStageBase{} - export class SelfLoopRouter { - /** - * Creates a new {@link yfiles.layout.SelfLoopRouter} with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [coreLayouter=null] The core layout algorithm. - */ - constructor(coreLayouter?:yfiles.layout.ILayoutAlgorithm); - /** - * Calculates the routes of the self-loops in the given graph. - *

- * This method will only change the routes of self-loops that are not marked to be {@link yfiles.layout.SelfLoopRouter#KEEP_SELF_LOOP_LAYOUT_DP_KEY kept}. - *

- *

- * This method is called by {@link yfiles.layout.SelfLoopRouter#applyLayout} after the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} has arranged the graph - * and all self-loops have been reinserted into the graph. It may be overridden to introduce custom self-loop styles. - *

- * @param graph the input graph - * @protected - */ - layoutSelfLoops(graph:yfiles.layout.LayoutGraph):void; - /** - * Data provider key for determining which self-loops should keep their current path - *

- * If no {@link yfiles.algorithms.IDataProvider} is registered with this key, all self-loops will be routed. - *

- * @see yfiles.layout.SelfLoopRouter#keepAllSelfLoopRoutes - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static KEEP_SELF_LOOP_LAYOUT_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Gets or sets the number of points that are used for rounding the corners of the self-loops. - *

- * For rounded corners, the number of points should be at least - * 2. All smaller values will produce one bend and, therefore, an orthogonal path. - *

- *

- * The number of points for a corner must be at least 1. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified point count is less than 1 - * @see yfiles.layout.SelfLoopRouter#layoutStyle - * @see yfiles.layout.SelfLoopStyle#ROUNDED - * @type {number} - */ - cornerApproximationPointsCount:number; - /** - * Gets or sets the distance between two self-loops incident to the same node. - *

- * The distance needs to be a non-negative value. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @see yfiles.layout.SelfLoopStyle#ROUNDED - * @type {number} - */ - lineDistance:number; - /** - * Gets or sets whether or not the algorithm chooses the side of the self-loop depending on the incident edges. - *

- * If this option is enabled, self-loops are placed on one of the four corners of the corresponding node. For the choice of - * the corner, the algorithm considers all incident edges. Otherwise, self-loops are always placed at the upper left corner - * of the corresponding node. - *

- * @type {boolean} - */ - smartSelfLoopPlacement:boolean; - /** - * Gets or sets the layout style of the self-loops. - * @throws {Stubs.Exceptions.ArgumentError} if the specified style is unknown - * @type {yfiles.layout.SelfLoopStyle} - */ - layoutStyle:yfiles.layout.SelfLoopStyle; - /** - * Gets or sets whether or not this algorithm should keep all self-loop routes. - *

- * When enabled, no self-loop will be routed, instead the existing self-loop layout will be moved with its node. - *

- * @type {boolean} - */ - keepAllSelfLoopRoutes:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.SelfLoopRouter; - } - /** - * A {@link yfiles.layout.SequentialLayout} allows for chaining multiple {@link yfiles.layout.ILayoutAlgorithm layout algorithms}. - *

- * The {@link yfiles.layout.ILayoutAlgorithm layout algorithms} are invoked one after the other in the order in which they were - * {@link yfiles.layout.SequentialLayout#appendLayout added to the chain}. They all run independently of each other, i.e., they only influence each other by the changed input - * graph. Hence, the sequence determines the result. - *

- *

- * One possible application would be to bundle several {@link yfiles.layout.ILayoutAlgorithm layout algorithms} and pass a single {@link yfiles.layout.ILayoutAlgorithm} - * instance to a {@link yfiles.layout.BufferedLayout}. - *

- * @class - * @implements {yfiles.layout.ILayoutAlgorithm} - */ - export interface SequentialLayout extends yfiles.lang.Object,yfiles.layout.ILayoutAlgorithm{} - export class SequentialLayout { - /** - * Creates a new {@link yfiles.layout.SequentialLayout} instance with an empty chain of {@link yfiles.layout.ILayoutAlgorithm layout algorithms}. - */ - constructor(); - /** - * Appends the given {@link yfiles.layout.ILayoutAlgorithm layout algorithm} to the end of the chain. - * @param layouter the {@link layout algorithm} to append - */ - appendLayout(layouter:yfiles.layout.ILayoutAlgorithm):void; - /** - * Appends the specified list of {@link yfiles.layout.ILayoutAlgorithm layout algorithms} to the end of the chain. - * @param layouters the list of {@link layout algorithms} to append - */ - appendLayouts(layouters:yfiles.collections.ICollection):void; - /** - * Executes all {@link yfiles.layout.ILayoutAlgorithm layout algorithms} in the chain, one after the other. - *

- * The order of the layout algorithms is defined by the order in which they were appended. - *

- * @param graph the input graph - */ - applyLayout(graph:yfiles.layout.LayoutGraph):void; - /** - * Clears the current chain of {@link yfiles.layout.ILayoutAlgorithm layout algorithms} and therefore removes all layout algorithms. - */ - removeAll():void; - /** - * Gets or sets the chain of {@link yfiles.layout.ILayoutAlgorithm layout algorithms}. - * @see yfiles.layout.SequentialLayout#appendLayout - * @see yfiles.layout.SequentialLayout#appendLayouts - * @type {yfiles.collections.IList.} - */ - layouts:yfiles.collections.IList; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.SequentialLayout; - } - /** - * {@link yfiles.layout.SimpleProfitModel} implements the ranking for edge and node labels. - *

- * In this implementation node label positions have no ranking, the profit for all candidates is 1. - *

- *

- * The ranking of edge label positions depends on the locations described in the {@link yfiles.layout.PreferredPlacementDescriptor} - * associated with an edge. - *

- * @class - * @implements {yfiles.layout.IProfitModel} - */ - export interface SimpleProfitModel extends yfiles.lang.Object,yfiles.layout.IProfitModel{} - export class SimpleProfitModel { - /** - * Creates a new instance of {@link yfiles.layout.SimpleProfitModel}. - */ - constructor(); - /** - * - * @param candidate - * @returns - */ - getProfit(candidate:yfiles.layout.LabelCandidate):number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.SimpleProfitModel; - } - /** - * {@link yfiles.layout.SliderEdgeLabelLayoutModel} allows placement of labels at a set of continuous rotated positions along both - * sides of an edge or directly on the edge path. - *

- * It is possible to specify distance values that control the distance between label and edge and between label and nodes. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1,"lblB":1},"n":[[14,10],[14,310],[184,10],[184,310],[354,10],[354,310]],"e":[[0,1,[],[[10.59,58.22,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[10.59,281.41,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[10.59,253.51,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[10.59,225.61,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[10.59,197.72,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[10.59,169.82,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[10.59,141.92,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[10.59,114.02,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[10.59,86.12,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"]]],[2,3,[],[[157.19,58.22,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[157.19,281.41,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[157.19,253.51,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[204,281.41,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[204,253.51,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[204,225.61,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[204,197.72,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[204,169.82,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[204,114.02,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[204,86.12,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[204,141.92,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[204,58.22,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[157.19,225.61,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[157.19,197.72,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[157.19,169.82,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[157.19,114.02,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[157.19,141.92,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[157.19,86.12,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"]]],[4,5,[],[[327.19,58.22,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[327.19,281.41,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[327.19,253.51,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[327.19,225.61,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[327.19,197.72,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[327.19,141.92,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[327.19,169.82,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[327.19,114.02,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"],[327.19,86.12,33.36,18.7,0.7071067811865477,-0.7071067811865474,"Label"]]]],"vp":[10.0,10.0,374.0,330.0]}} - *

- *

- * {@link yfiles.layout.SliderMode#CENTER} mode on the left, {@link yfiles.layout.SliderMode#SIDE} mode in the middle and {@link yfiles.layout.SliderMode#SINGLE_SIDE} - * on the right - *

- * @class - * @implements {yfiles.layout.IEdgeLabelLayoutModel} - */ - export interface SliderEdgeLabelLayoutModel extends yfiles.lang.Object,yfiles.layout.IEdgeLabelLayoutModel{} - export class SliderEdgeLabelLayoutModel { - /** - * Creates a new instance of {@link yfiles.layout.SliderEdgeLabelLayoutModel} with the given mode. - * @param mode the slider mode - * @see yfiles.layout.SliderEdgeLabelLayoutModel#mode - */ - constructor(mode:yfiles.layout.SliderMode); - /** - * - * @param labelBounds - * @param edgeLayout - * @param sourceNode - * @param targetNode - * @returns - */ - createModelParameter(labelBounds:yfiles.algorithms.YOrientedRectangle,edgeLayout:yfiles.layout.IEdgeLayout,sourceNode:yfiles.layout.INodeLayout,targetNode:yfiles.layout.INodeLayout):any; - /** - * Returns all {@link yfiles.layout.EdgeLabelCandidate}s that describe valid label positions within this model. - *

- * The number of candidates and their respective locations are computed depending on the geometries of both label and - * edge. - *

- * @param labelLayout the label for which candidates should be generated - * @param edgeLayout the layout of the edge to which the label belongs - * @param sourceLayout the layout of the source node of the label-owning edge - * @param targetLayout the layout of the target node of the label-owning edge - * @returns a list of {@link } instances - */ - getLabelCandidates(labelLayout:yfiles.layout.IEdgeLabelLayout,edgeLayout:yfiles.layout.IEdgeLayout,sourceLayout:yfiles.layout.INodeLayout,targetLayout:yfiles.layout.INodeLayout):yfiles.algorithms.YList; - /** - * - * @param labelSize - * @param edgeLayout - * @param sourceNode - * @param targetNode - * @param para - * @returns - */ - getLabelPlacement(labelSize:yfiles.algorithms.YDimension,edgeLayout:yfiles.layout.IEdgeLayout,sourceNode:yfiles.layout.INodeLayout,targetNode:yfiles.layout.INodeLayout,para:any):yfiles.algorithms.YOrientedRectangle; - /** - * Gets the model's slider mode which determines whether the label slides {@link yfiles.layout.SliderMode#CENTER on the edge}, {@link yfiles.layout.SliderMode#SIDE along both sides of the edge} or - * {@link yfiles.layout.SliderMode#SINGLE_SIDE along one side of the edge}. - * @type {yfiles.layout.SliderMode} - */ - mode:yfiles.layout.SliderMode; - /** - * Gets or sets whether or not the distance to the edge is interpreted relative to the edge's path. - *

- * If enabled, the label is placed to the left of the edge segment (relative to the segment direction) if the given - * distance is less than 0 and to the right of the edge segment if the given distance is greater than 0. - *

- *

- * If disabled, the label is placed below the edge segment (in geometric sense) if the distance is less than 0 and above - * the edge segment if the distance is greater than 0. - *

- * @see yfiles.layout.SliderEdgeLabelLayoutModel#distance - * @type {boolean} - */ - distanceRelativeToEdge:boolean; - /** - * Gets or sets the distance between the label's box and the edge's path. - * @see yfiles.layout.SliderEdgeLabelLayoutModel#distanceRelativeToEdge - * @type {number} - */ - distance:number; - /** - * Gets or sets whether or not edge labels are automatically rotated according to the angle of the corresponding reference - * edge segment. - * @type {boolean} - */ - autoRotationEnabled:boolean; - /** - * Gets or sets whether or not edge labels get flipped if they would be upside down in their current position. - * @type {boolean} - */ - autoFlipping:boolean; - /** - * Gets or sets the angle (measured in radians) of the label model. - *

- * The angle is applied in clockwise direction. - *

- * @type {number} - */ - angle:number; - /** - * Gets a model parameter that encodes the default position of this model's allowed edge label positions. - *

- * This parameter can be passed to {@link yfiles.layout.SliderEdgeLabelLayoutModel#getLabelPlacement} to retrieve the corresponding - * label box. - *

- *

- * The default positions for the {@link yfiles.layout.SliderEdgeLabelLayoutModel#mode slider modes} are relative to the first edge segment, either at the beginning of the - * segment ({@link yfiles.layout.SliderMode#SIDE} or - * {@link yfiles.layout.SliderMode#SINGLE_SIDE}) or at its middle ({@link yfiles.layout.SliderMode#CENTER}). - *

- * @see yfiles.layout.SliderEdgeLabelLayoutModel#mode - * @type {any} - */ - defaultParameter:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.SliderEdgeLabelLayoutModel; - } - /** - * A {@link yfiles.layout.SubgraphLayout} is a {@link yfiles.layout.ILayoutStage} that filters out all graph elements that are not part of - * a specific subgraph. - *

- * The nodes that induce this subgraph are marked using a {@link yfiles.algorithms.IDataProvider} registered with a {@link yfiles.layout.SubgraphLayout#affectedNodesDpKey specific key}. - * They will be arranged by the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface SubgraphLayout extends yfiles.layout.LayoutStageBase{} - export class SubgraphLayout { - /** - * Creates a new {@link yfiles.layout.SubgraphLayout} instance with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [coreLayouter=null] The core layout algorithm. - */ - constructor(coreLayouter?:yfiles.layout.ILayoutAlgorithm); - /** - * Gets or sets the key to register a {@link yfiles.algorithms.IDataProvider} which marks the nodes that induce the subgraph to be - * arranged. - * @throws {Stubs.Exceptions.ArgumentError} if the specified key is null - * @type {any} - */ - affectedNodesDpKey:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.SubgraphLayout; - } - /** - * A {@link yfiles.layout.SwimlaneRepresentative SwimlaneRepresentative} represents the position and arrangement mode for a swimlane. - * @class - */ - export interface SwimlaneRepresentative extends yfiles.lang.Object{} - export class SwimlaneRepresentative { - /** - * Creates a new {@link yfiles.layout.SwimlaneRepresentative} instance. - * @param swimlanePos denotes the current position of the represented swimlane - * @param allowRearrangement true if the represented swimlane may be {@link #allowRearrangement rearranged}, false otherwise - */ - constructor(swimlanePos:number,allowRearrangement:boolean); - /** - * Gets or sets the current position of the represented swimlane. - *

- * The swimlane positions are described by a zero-based index and must not be negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the position is smaller than 0 - * @type {number} - */ - swimlanePos:number; - /** - * Gets or sets whether or not the represented swimlane can be rearranged. - *

- * For all swimlanes with disabled rearrangement, the relative ordering given by {@link yfiles.layout.SwimlaneRepresentative#swimlanePos} is preserved. The other swimlanes may be - * rearranged. - *

- * @type {boolean} - */ - allowRearrangement:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.SwimlaneRepresentative; - } - /** - * {@link yfiles.layout.Swimlanes} provides helper classes and methods to handle swimlanes. - *

- * It is used by {@link yfiles.hierarchic.HierarchicLayout} to arrange the nodes in lanes. - *

- * @class - * @static - */ - export interface Swimlanes extends yfiles.lang.Object{} - export class Swimlanes { - /** - * Calculates an ordering of the swimlanes considering the specified ordering mode. - *

- * Depending on the swimlane mode, the ordering will try to reduce: - *

- *
    - *
  1. the number of swimlanes traversed by edges
  2. - *
  3. the number of swimlanes spanned by {@link yfiles.layout.GroupingSupport#isGroupNode group nodes}
  4. - *
- * @param graph the input graph - * @param node2Swimlane the assignment of nodes to swimlanes - * @param iterations the number of iterations performed by the heuristic. - * @param mode one of the valid swimlane ordering mode specifier - * @see yfiles.layout.SwimlaneRepresentative - * @see yfiles.layout.GroupingSupport - * @static - */ - static arrangeSwimlanes(graph:yfiles.algorithms.Graph,node2Swimlane:yfiles.algorithms.IDataProvider,iterations:number,mode:yfiles.layout.SwimlanesMode):void; - /** - * Calculates an ordering of the swimlanes. - *

- * The ordering will try to reduce: - *

- *
    - *
  1. the number of swimlanes traversed by edges
  2. - *
  3. the number of swimlanes spanned by {@link yfiles.layout.GroupingSupport#isGroupNode group nodes}
  4. - *
- * @param graph the input graph - * @param node2Swimlane the assignment of nodes to swimlanes - * @see yfiles.layout.SwimlaneRepresentative - * @see yfiles.layout.GroupingSupport - * @static - */ - static arrangeSwimlanes(graph:yfiles.algorithms.Graph,node2Swimlane:yfiles.algorithms.IDataProvider):void; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.Swimlanes; - } - export enum OperationType{ - /** - * Operation specifier defining that the graph will be mirrored at the x-axis. - * @see yfiles.layout.GraphTransformer#operation - */ - MIRROR_X_AXIS, - /** - * Operation specifier defining that the graph will be mirrored at the y-axis. - * @see yfiles.layout.GraphTransformer#operation - */ - MIRROR_Y_AXIS, - /** - * Operation specifier defining that the graph will be rotated. - * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.GraphTransformer#rotationAngle - * @see yfiles.layout.GraphTransformer#bestFitRotationEnabled - */ - ROTATE, - /** - * Operation specifier defining that the graph will be scaled. - * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.GraphTransformer#scaleFactor - * @see yfiles.layout.GraphTransformer#setScaleFactors - * @see yfiles.layout.GraphTransformer#scaleNodeSize - */ - SCALE, - /** - * Operation specifier defining that the graph will be translated. - * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.GraphTransformer#translateX - * @see yfiles.layout.GraphTransformer#translateY - */ - TRANSLATE - } - /** - * This layout algorithm applies geometric transformations to (sub-)graphs. - *

- * Layout Style There are several ways to transform the graph that include mirroring, rotating, scaling and translating. {@graph {"ann":{"s":[30,30],"d":1},"n":[[-15,235],[-15,360],[-15,110],[235,485],[110,485],[360,485],[-15,485],[485,235],[485,360],[235,-15],[110,-15],[360,-15],[485,110],[-15,-15],[485,485],[485,-15],[235,235,1],[146.61,146.61,1],[146.61,323.39,1],[58.22,235,1],[323.39,323.39,1],[235,411.78,1],[323.39,146.61,1],[235,58.22,1],[411.78,235,1]],"e":[[1,0],[0,2],[4,3],[3,5],[1,6],[6,4],[7,8],[9,10],[11,9],[12,7],[2,13],[13,10],[8,14],[14,5],[11,15],[12,15],[16,17],[16,18],[19,17],[19,18],[20,16],[18,21],[21,20],[22,16],[23,22],[23,17],[20,24],[22,24],[17,0],[19,1],[23,2],[18,3],[4,19],[5,21],[20,7],[21,8],[9,22],[10,23],[24,11],[24,12]],"vp":[-15.0,-15.0,530.0,530.0]}} - *

- *

- * The highlighted subgraph is rotated by 45 degrees - *

- *

- * Features - *

- *

- * The layout can be {@link yfiles.layout.OperationType#SCALE scaled} with independent factors for the horizontal and vertical scaling. Optionally, the sizes of - * nodes can be scaled, too. - *

- *

- * The layout can be mirrored either on the {@link yfiles.layout.OperationType#MIRROR_X_AXIS x-axis} or the {@link yfiles.layout.OperationType#MIRROR_Y_AXIS y-axis}. - *

- *

- * A {@link yfiles.layout.OperationType#ROTATE rotation} can be specified. Instead of {@link yfiles.layout.GraphTransformer#rotationAngle defining} a rotation angle the angle can be {@link yfiles.layout.GraphTransformer#bestFitRotationEnabled determined automatically} to fit - * specific bounds. - *

- *

- * The coordinates in the layout can be {@link yfiles.layout.OperationType#TRANSLATE translated} by a specific vector. - *

- *

- * To only apply previously mentioned transformations to a subgraph, the {@link yfiles.layout.SubgraphLayout} needs to be {@link yfiles.layout.MultiStageLayout#subgraphLayoutEnabled enabled}. - * Then the nodes in the subgraph must be marked in a {@link yfiles.algorithms.IDataProvider} registered with the according {@link yfiles.layout.SubgraphLayout#affectedNodesDpKey key}. - *

- * @class - * @extends {yfiles.layout.MultiStageLayout} - * @implements {yfiles.layout.ILayoutStage} - */ - export interface GraphTransformer extends yfiles.layout.MultiStageLayout,yfiles.layout.ILayoutStage{} - export class GraphTransformer { - /** - * Creates a new instance of {@link yfiles.layout.GraphTransformer} with default settings. - */ - constructor(); - /** - * Rotates the given graph so its resulting bounding box fits best to the given bounds. - * @param graph the graph that is rotated - * @param width the width of the preferred layout bounds - * @param height the height of the preferred layout bounds - * @returns the rotation angle - * @see yfiles.layout.GraphTransformer#bestFitRotationEnabled - * @static - */ - static applyBestFitRotationAngle(graph:yfiles.layout.LayoutGraph,width:number,height:number):number; - /** - * Returns the rotation angle for the graph that will result in a layout that fits best to the given bounds. - * @param graph the graph that is rotated - * @param width the width of the preferred layout bounds - * @param height the height of the preferred layout bounds - * @returns the rotation angle - * @see yfiles.layout.GraphTransformer#applyBestFitRotationAngle - * @static - */ - static findBestFitRotationAngle(graph:yfiles.layout.LayoutGraph,width:number,height:number):number; - /** - * Specifies the preferred size of the layout. - *

- * If performing a {@link yfiles.layout.OperationType#ROTATE rotation} and this rotation should be - * {@link yfiles.layout.GraphTransformer#bestFitRotationEnabled automatically fitted}, then the given preferred size defines the aspect ratio that will be used for fitting the layout - * rotation. - *

- *

- * The preferred width and height need to be non-negative. - *

- * @param width the preferred width of the layout - * @param height the preferred height of the layout - * @throws {Stubs.Exceptions.ArgumentError} if the specified width or height is negative - * @see yfiles.layout.GraphTransformer#preferredWidth - * @see yfiles.layout.GraphTransformer#preferredHeight - * @see yfiles.layout.GraphTransformer#bestFitRotationEnabled - * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.OperationType#ROTATE - */ - preferredLayoutSize(width:number,height:number):void; - /** - * Fits the given graph into the specified rectangular bounds. - *

- * If the bounding box fits in the given bounds, nothing is done. Otherwise, the graph is scaled and optionally moved to - * fit. - *

- * @param graph the graph to modify - * @param x the upper left x-coordinate of the bounds - * @param y the upper left y-coordinate of the bounds - * @param w the width of the bounds - * @param h the height of the bounds - * @static - */ - static setMaximalBounds(graph:yfiles.layout.LayoutGraph,x:number,y:number,w:number,h:number):void; - /** - * Specifies the horizontal and vertical scaling factor used for the {@link yfiles.layout.OperationType#SCALE scale operation}. - *

- * Only positive scaling factors are allowed. - *

- * @param xFactor the horizontal scaling factor - * @param yFactor the vertical scaling factor - * @throws {Stubs.Exceptions.ArgumentError} if one the specified scaling factors is negative or 0 - * @see yfiles.layout.GraphTransformer#scaleFactorX - * @see yfiles.layout.GraphTransformer#scaleFactorY - * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.OperationType#SCALE - */ - setScaleFactors(xFactor:number,yFactor:number):void; - /** - * Translates the layout coordinates by the given vector. - * @param graph the graph that is translated - * @param dx the horizontal distance the given graph is moved - * @param dy the vertical distance the given graph is moved - * @see yfiles.layout.OperationType#TRANSLATE - * @see yfiles.layout.GraphTransformer#operation - * @static - */ - static translate(graph:yfiles.layout.LayoutGraph,dx:number,dy:number):void; - /** - * - * @type {yfiles.layout.ILayoutAlgorithm} - */ - coreLayout:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets the transformation operation. - * @throws {Stubs.Exceptions.ArgumentError} if the specified operation is unknown - * @type {yfiles.layout.OperationType} - */ - operation:yfiles.layout.OperationType; - /** - * Gets or sets the angle of rotation. - *

- * The angle must be given in degrees. - *

- * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.OperationType#ROTATE - * @type {number} - */ - rotationAngle:number; - /** - * Gets or sets whether or not to automatically choose the best fitting rotation angle. - *

- * The angle will be chosen such that the bounding box after the rotation fits best to the {@link yfiles.layout.GraphTransformer#preferredLayoutSize preferred aspect ratio}. - *

- * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.OperationType#ROTATE - * @type {boolean} - */ - bestFitRotationEnabled:boolean; - /** - * Gets or sets the preferred height of the layout. - *

- * This value will be used for {@link yfiles.layout.GraphTransformer#bestFitRotationEnabled fitting the rotation} to preferred bounds. - *

- *

- * The preferred height needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified height is negative - * @see yfiles.layout.GraphTransformer#preferredWidth - * @see yfiles.layout.GraphTransformer#bestFitRotationEnabled - * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.OperationType#ROTATE - * @type {number} - */ - preferredHeight:number; - /** - * Gets or sets the preferred width of the layout. - *

- * This value will be used for {@link yfiles.layout.GraphTransformer#bestFitRotationEnabled fitting the rotation} to preferred bounds. - *

- *

- * The preferred width needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified width is negative - * @see yfiles.layout.GraphTransformer#preferredHeight - * @see yfiles.layout.GraphTransformer#bestFitRotationEnabled - * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.OperationType#ROTATE - * @type {number} - */ - preferredWidth:number; - /** - * Gets or sets whether or not to also scale node sizes when performing the {@link yfiles.layout.OperationType#SCALE scale operation}. - * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.OperationType#SCALE - * @type {boolean} - */ - scaleNodeSize:boolean; - /** - * Sets the uniform scaling factor used for the {@link yfiles.layout.OperationType#SCALE scale operation}. - *

- * This factor applies vertical and horizontal. - *

- *

- * Only positive scaling factors are allowed. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified scaling factor is negative or 0 - * @see yfiles.layout.GraphTransformer#scaleFactorX - * @see yfiles.layout.GraphTransformer#scaleFactorY - * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.OperationType#SCALE - * @type {number} - */ - scaleFactor:number; - /** - * Gets or sets the vertical scaling factor used for the {@link yfiles.layout.OperationType#SCALE scale operation}. - *

- * Only positive scaling factors are allowed. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified scaling factor is negative or 0 - * @see yfiles.layout.GraphTransformer#scaleFactorX - * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.OperationType#SCALE - * @type {number} - */ - scaleFactorY:number; - /** - * Gets or sets the horizontal scaling factor used for the {@link yfiles.layout.OperationType#SCALE scale operation}. - *

- * Only positive scaling factors are allowed. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified scaling factor is negative or 0 - * @see yfiles.layout.GraphTransformer#scaleFactorY - * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.OperationType#SCALE - * @type {number} - */ - scaleFactorX:number; - /** - * Gets or sets the horizontal translation distance. - *

- * A positive value means the graph is moved to the right while, a negative value means the graph is moved to the left. - *

- * @see yfiles.layout.GraphTransformer#translateY - * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.OperationType#TRANSLATE - * @type {number} - */ - translateX:number; - /** - * Gets or sets the vertical translation distance. - *

- * A positive value means the graph is moved downwards, while a negative value means the graph is moved upwards. - *

- * @see yfiles.layout.GraphTransformer#translateX - * @see yfiles.layout.GraphTransformer#operation - * @see yfiles.layout.OperationType#TRANSLATE - * @type {number} - */ - translateY:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.GraphTransformer; - } - /** - * A {@link yfiles.layout.ILayoutStage layout stage} that can handle fixed nodes in hierarchically grouped graphs. - *

- * This stage guarantees that a {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} will maintain - * the relative positions of nodes within the same group. - *

- *

- * Also, this stage is responsible for routing edges that connect nodes belonging to hierarchically unrelated groups. More - * precisely, the stage temporarily replaces fixed group nodes (see - * {@link yfiles.layout.FixGroupLayoutStage#FIXED_GROUP_NODES_DP_KEY}) with normal nodes of the same size while the content of the - * groups is removed from the graph during layout. - *

- *

- * The nodes are used as placeholders and are responsible for keeping the relations to the remaining graph elements. Edges - * that originate from the outside of the group node and terminate in its interior (inter-edges) are redirected such that - * they connect to the node that replaces the group. - *

- *

- * After the layout process, the group nodes are restored and the stage inserts the content at the new group position - * (derived from the position of the associated node). The content itself (including the edges between content nodes) - * remains unchanged and is only relocated. Furthermore, the inter-edges are connected to their original source/target and - * the stage reroutes them using the specified inter-edge routing algorithm (see {@link yfiles.layout.FixGroupLayoutStage#interEdgeRouter}). - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"styles":{"6":{"c":1}},"n":[[759.46,-86.88,290.54,283.26,2],[982.99,109.5,6],[796.47,109.5,6],[854.11,-67.88,6],[925.35,-67.88,6],[1005,41.75,6],[925.35,151.37,6],[796.47,-26.01,6],[774.46,41.75,6],[982.99,-26.01,6],[854.11,151.37,6],[123.31,-231.69,216.69,224.72,2],[212.57,-132.33,6],[263.97,-67.88,6],[263.97,-196.77,6],[138.31,-168.09,6],[194.23,-51.97,6],[295,-132.33,6],[138.31,-96.56,6],[194.23,-212.69,6],[265,40.5,430,339,2],[465,234.5,45,30],[380,59.5,45,30],[465,284.5,45,30],[380,109.5,45,30],[465,84.5,45,30],[465,134.5,45,30],[550,209.5,45,30],[380,309.5,45,30],[550,259.5,45,30],[380,259.5,45,30],[465,334.5,45,30],[550,134.5,45,30],[635,134.5,45,30],[465,184.5,45,30],[280,184.5,60,30]],"e":[[9,4],[3,7],[8,7],[4,3],[2,8],[10,2],[6,10],[1,6],[5,1],[2,3],[2,9],[2,1],[5,9],[12,18],[12,13],[12,14],[12,15],[12,19],[12,17],[12,16],[30,21],[21,29],[21,27],[35,22],[30,23],[35,24],[24,26],[24,25],[26,32],[35,28],[35,30],[30,31],[30,34],[32,33],[33,2],[33,8],[33,7],[35,17]],"vp":[123.0,-232.0,927.0,612.0]}} Initial graph. Nodes inside groups have to remain at their relative positions. {@graph {"ann":{"s":[30,30],"d":1},"styles":{"6":{"c":1}},"n":[[754.73,68.37,290.54,283.26,2],[978.26,264.75,6],[791.74,264.75,6],[849.38,87.37,6],[920.62,87.37,6],[1000.27,197,6],[920.62,306.63,6],[791.74,129.25,6],[769.73,197,6],[978.26,129.25,6],[849.38,306.63,6],[-18.35,97.64,216.69,224.72,2],[70.92,197,6],[122.31,261.44,6],[122.31,132.56,6],[-3.35,161.24,6],[52.58,277.36,6],[153.35,197,6],[-3.35,232.76,6],[52.58,116.64,6],[265,40.5,430,339,2],[465,234.5,45,30],[380,59.5,45,30],[465,284.5,45,30],[380,109.5,45,30],[465,84.5,45,30],[465,134.5,45,30],[550,209.5,45,30],[380,309.5,45,30],[550,259.5,45,30],[380,259.5,45,30],[465,334.5,45,30],[550,134.5,45,30],[635,134.5,45,30],[465,184.5,45,30],[280,184.5,60,30]],"e":[[9,4],[3,7],[8,7],[4,3],[2,8],[10,2],[6,10],[1,6],[5,1],[2,3],[2,9],[2,1],[5,9],[12,18],[12,13],[12,14],[12,15],[12,19],[12,17],[12,16],[30,21],[21,29],[21,27],[35,22],[30,23],[35,24],[24,26],[24,25],[26,32],[35,28],[35,30],[30,31],[30,34],[32,33],[33,8,22.5,6,-2.49,-14.78,[782.24,155.5]],[33,7,22.5,-6,-15,-0.75],[33,2,0,15,-15,0,[657.5,279.75]],[35,17,-30,6.25,13.66,-6.25]],"vp":[-19.0,40.0,1065.0,340.0]}} Example after using {@link yfiles.layout.FixGroupLayoutStage} - * with {@link yfiles.orthogonal.OrthogonalLayout}. Nodes inside groups did not change relative positions. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface FixGroupLayoutStage extends yfiles.layout.LayoutStageBase{} - export class FixGroupLayoutStage { - /** - * Creates a new instance of {@link yfiles.layout.FixGroupLayoutStage} with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [core=null] The core layout algorithm. - */ - constructor(core?:yfiles.layout.ILayoutAlgorithm); - /** - * Data provider key for selecting group nodes whose contents should keep their relative positions - *

- * A group node is considered selected in this context, if the corresponding {@link yfiles.algorithms.IDataProvider} returns true for the - * group node or any of its ancestor (group) nodes. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static FIXED_GROUP_NODES_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets or sets the inter-edge routing style used by this layout stage. - * @throws {Stubs.Exceptions.ArgumentError} if the given routing style is unknown - * @type {yfiles.layout.InterEdgeRoutingStyle} - */ - interEdgeRoutingStyle:yfiles.layout.InterEdgeRoutingStyle; - /** - * Gets or sets the edge routing algorithm that is applied to route the inter-edges. - *

- * If no routing algorithm is set, a new instance of {@link yfiles.layout.CompositeLayoutStage} associated with a {@link yfiles.layout.HideGroupsStage} - * and an {@link yfiles.router.EdgeRouter} will be used. - *

- * @type {yfiles.layout.ILayoutAlgorithm} - */ - interEdgeRouter:yfiles.layout.ILayoutAlgorithm; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.FixGroupLayoutStage; - } - /** - * A {@link yfiles.layout.IPartitionFinder} is responsible for partitioning the input graph. - * @interface - */ - export interface IPartitionFinder extends yfiles.lang.Object{ - /** - * Returns a partition ID for each node of an input graph. - *

- * Nodes that share a common partition ID are considered to belong to the same partition. - *

- * @param graph the input graph - * @param partitionIDMap the map that is filled with the resulting partition IDs - * @abstract - */ - findPartitions(graph:yfiles.layout.LayoutGraph,partitionIDMap:yfiles.algorithms.INodeMap):void; - } - var IPartitionFinder:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.IPartitionFinder; - }; - /** - * A {@link yfiles.layout.IPartitionPlacer} is responsible for arranging the graph partitions. - *

- * Arranging a graph partition usually involves applying a coordinate translation to all elements that belong to the - * partition in order to generate a non-overlapping node arrangement. - *

- * @interface - */ - export interface IPartitionPlacer extends yfiles.lang.Object{ - /** - * Arranges the graph while taking partition IDs and inter-edge information into account. - *

- * Edges which connect nodes that belong to two different partitions are called inter-edges - *

- * @param graph the input graph - * @param partitionIDDP the partition ID for each node in the graph - * @param interEdgeDP the map which marks inter-edges - * @abstract - */ - placePartitions(graph:yfiles.layout.LayoutGraph,partitionIDDP:yfiles.algorithms.IDataProvider,interEdgeDP:yfiles.algorithms.IDataProvider):void; - } - var IPartitionPlacer:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.layout.IPartitionPlacer; - }; - /** - * {@link yfiles.layout.PartitionLayout} provides a framework for layouts that are based on a divide and conquer approach. - *

- * Concept The approach can be subdivided into four stages: - *

- *
    - *
  1. The input graph is partitioned into smaller units. Implementations of this phase can be set using method {@link yfiles.layout.PartitionLayout#partitionFinder}.
  2. - *
  3. Optionally, the layout algorithm arranges each partition. Implementations of this phase can be set using method {@link yfiles.layout.LayoutStageBase#coreLayout}.
  4. - *
  5. - * The graph partitions are arranged next to each other keeping their layout. Implementations of this phase can be set - * using method {@link yfiles.layout.PartitionLayout#partitionPlacer}. - *
  6. - *
  7. - * Edges that connect nodes in different graph partitions will be routed. Implementations of this phase can be set using - * method {@link yfiles.layout.PartitionLayout#interEdgeRouter} - *
  8. - *
- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface PartitionLayout extends yfiles.layout.LayoutStageBase{} - export class PartitionLayout { - /** - * Creates a new {@link yfiles.layout.PartitionLayout} instance with default settings. - */ - constructor(); - /** - * Creates a {@link yfiles.layout.IPartitionPlacer} that uses {@link yfiles.layout.ComponentLayout} to place the partitions. - * @param [componentLayout=null] An optional {@link } to use. - * @returns - * @static - */ - static createComponentPartitionPlacer(componentLayout?:yfiles.layout.ComponentLayout):yfiles.layout.IPartitionPlacer; - /** - * Creates a {@link yfiles.layout.IPartitionFinder} that uses {@link yfiles.algorithms.Groups#edgeBetweennessClustering} as strategy for - * finding graph partitions. - * @param [minimumPartitionCount=0] The minimum number of partitions the result should have. - * @param [maximumPartitionCount=0x7FFFFFFF] The maximum number of partitions the result should have. - * @returns - * @static - */ - static createEdgeBetweennessPartitionFinder(minimumPartitionCount?:number,maximumPartitionCount?:number):yfiles.layout.IPartitionFinder; - /** - * Creates a {@link yfiles.layout.IPartitionFinder} that uses {@link yfiles.algorithms.Groups#edgeBetweennessClustering} as strategy for - * finding graph partitions. - * @param {Object} options The parameters to pass. - * @param [options.minimumPartitionCount=0] The minimum number of partitions the result should have. - * @param [options.maximumPartitionCount=0x7FFFFFFF] The maximum number of partitions the result should have. - * @returns - * @static - */ - static createEdgeBetweennessPartitionFinder(options:{minimumPartitionCount?:number,maximumPartitionCount?:number}):yfiles.layout.IPartitionFinder; - /** - * Gets or sets the {@link yfiles.layout.IPartitionFinder} instance that is responsible for partitioning the input graph. - * @type {yfiles.layout.IPartitionFinder} - */ - partitionFinder:yfiles.layout.IPartitionFinder; - /** - * Gets or sets the {@link yfiles.layout.IPartitionPlacer} instance that is responsible for arranging the graph partitions. - * @type {yfiles.layout.IPartitionPlacer} - */ - partitionPlacer:yfiles.layout.IPartitionPlacer; - /** - * Gets or sets the IInterEdgeRouter instance that is responsible for inter-edge routing. - * @type {yfiles.layout.IPartitionInterEdgeRouter} - */ - interEdgeRouter:yfiles.layout.IPartitionInterEdgeRouter; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.PartitionLayout; - } - /** - * The {@link yfiles.layout.PortPlacementStage} assigns edges to the ports specified by {@link yfiles.layout.PortConstraint}s or - * {@link yfiles.layout.PortCandidate}s after calling the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *

- * It can be used for adjusting ports for layout algorithms that cannot handle {@link yfiles.layout.PortConstraint}s. - *

- *

- * If {@link yfiles.layout.PortCandidate}s are assigned for edges and nodes, this stage tries to match them. When there is no - * match, the {@link yfiles.layout.PortCandidate} with the lowest costs specified for the edge is chosen. While - * {@link yfiles.layout.PortConstraint}s are also matched to - * {@link yfiles.layout.PortCandidate}s at nodes and edges, it is not recommended to mix them because they belong to different - * concepts. - *

- *

- * Furthermore, option {@link yfiles.layout.PortPlacementStage#pathCorrection} allows to specify whether the edge path should be corrected after correcting a port. - *

- *

- * It is recommended that the {@link yfiles.layout.PortPlacementStage} is prepended to the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} in order to be - * able to process all the edges and especially, self-loops and parallel edges. Note that edges that might be hidden by - * other {@link yfiles.layout.ILayoutStage}s cannot be handled by {@link yfiles.layout.PortPlacementStage}. - *

- * @see yfiles.layout.PortConstraint - * @see yfiles.layout.PortCandidate - * @see yfiles.layout.PortCandidateSet - * @see yfiles.layout.PortPlacementStage#pathCorrection - * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface PortPlacementStage extends yfiles.layout.LayoutStageBase{} - export class PortPlacementStage { - /** - * Creates a new {@link yfiles.layout.PortPlacementStage} instance with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [coreLayouter=null] The core layout algorithm. - */ - constructor(coreLayouter?:yfiles.layout.ILayoutAlgorithm); - /** - * Gets or sets whether or not this {@link yfiles.layout.ILayoutStage} corrects the edge paths after moving the port to the - * location specified by a {@link yfiles.layout.PortConstraint} or {@link yfiles.layout.PortCandidate}s. - *

- * If path correction is enabled, the edge will be rerouted within a specific area around its source/target node. Outside - * this area, it will keep the route that was calculated by the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. If this feature is disabled, only the ports are moved which may be more suitable for initially - * straight edges. - *

- * @type {boolean} - */ - pathCorrection:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.PortPlacementStage; - } - /** - * Specifies custom data for the {@link yfiles.layout.ComponentLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface ComponentLayoutData extends yfiles.layout.LayoutData{} - export class ComponentLayoutData { - constructor(); - /** - * Gets or sets a collection of nodes that determine the components that shall be laid out. - *

- * Note that components will be laid out if and only if at least one of the nodes is in this collection. - *

- * @see yfiles.layout.ComponentLayout#AFFECTED_COMPONENTS_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - affectedComponents:yfiles.layout.ItemCollection; - /** - * Gets or sets the mapping from nodes to their component comparable that is used to sort the components. - * @see yfiles.layout.ComponentLayout#COMPONENT_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - componentIds:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their {@link yfiles.layout.NodeHalo}. - * @see yfiles.layout.NodeHalo#NODE_HALO_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeHalos:yfiles.layout.ItemMapping; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.ComponentLayoutData; - } - /** - * Combines several {@link yfiles.layout.LayoutData} instances. - *

- * This is especially useful if several layouts are run at once, for example a general layout and a subsequent edge - * routing. - *

- * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface CompositeLayoutData extends yfiles.layout.LayoutData{} - export class CompositeLayoutData { - constructor(); - /** - * Gets or sets a collection of composed layout data objects. - * @type {yfiles.collections.ICollection.} - */ - items:yfiles.collections.ICollection; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.CompositeLayoutData; - } - /** - * Provides different ways to define a mapping from items to values that takes a context object into consideration, too. - *

- * Only one of the provided ways to define a mapping can be used at the same time, therefore only one of the properties {@link yfiles.layout.ContextItemMapping.#contextDelegate}, {@link yfiles.layout.ItemMapping.#delegate}, - * {@link yfiles.layout.ItemMapping.#mapper}, and {@link yfiles.layout.ItemMapping.#constant} should be set on each instance. - *

- *

- * This class supports {@link yfiles.layout.LayoutData} implementations and does not usually have to be used explicitly. - *

- * Type parameter TItem: The type of the items that are mapped. - * Type parameter TValue: The type of the values the items are mapped to. - * Type parameter TContext: The type of the context passed to the {@link yfiles.layout.ContextItemMapping.#contextDelegate} - * @class - * @extends {yfiles.layout.ItemMapping.} - * @template TItem,TValue,TContext - */ - export interface ContextItemMapping extends yfiles.layout.ItemMapping{} - export class ContextItemMapping { - constructor(); - /** - * Provides a mapper mapping the items to values. - * @param adapter The graph adapter the mapper shall be provided for. - * @param layout The layout using the mapper. - * @param context The context object passed to the {@link #contextDelegate}. - * @returns A mapper mapping the items to values. - */ - provideMapperForContext(adapter:yfiles.layout.LayoutGraphAdapter,layout:yfiles.layout.ILayoutAlgorithm,context:TContext):yfiles.collections.IMapper; - /** - * Gets or sets a delegate from the items and a context object to the values. - * @type {function(TItem, TContext): TValue} - */ - contextDelegate:(arg1:TItem,arg2:TContext)=>TValue; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.ContextItemMapping; - } - /** - * Wraps an {@link yfiles.collections.IMapper.} into an {@link yfiles.algorithms.IDataProvider}. - *

- * This class is used by {@link yfiles.layout.LayoutExecutor}, {@link yfiles.layout.LayoutGraphAdapter}, and {@link yfiles.layout.YGraphAdapter} to - * convert an {@link yfiles.graph.IGraph} into a corresponding - * {@link yfiles.algorithms.Graph}. Unless that conversion needs to be customized, or aforementioned classes cannot be used, this - * class usually doesn't need to be used explicitly. - *

- * Type parameter TKey: The type of the keys. - * Type parameter TValue: The type of the values. - * @class - * @implements {yfiles.algorithms.IDataProvider} - * @template TKey,TValue - */ - export interface DataProviderAdapter extends yfiles.lang.Object,yfiles.algorithms.IDataProvider{} - export class DataProviderAdapter { - /** - * Creates a new instance that adapts the provided mapper instance. - * @param keyType The type of the keys. - * @param mapper The mapper to adapt. - */ - constructor(keyType:yfiles.lang.Class,mapper:yfiles.collections.IMapper); - /** - * - * @param dataHolder - * @returns - */ - get(dataHolder:any):any; - /** - * - * @param dataHolder - * @returns - */ - getBoolean(dataHolder:any):boolean; - /** - * - * @param dataHolder - * @returns - */ - getInt(dataHolder:any):number; - /** - * - * @param dataHolder - * @returns - */ - getNumber(dataHolder:any):number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.DataProviderAdapter; - } - /** - * An adapter implementation that wraps an {@link yfiles.collections.IMapper.} to an {@link yfiles.algorithms.IDataMap}. - * Type parameter K: The type of the key for the mapper. - * Type parameter V: The type of the value for the mapper. - * @see yfiles.layout.DataProviderAdapter. - * @class - * @extends {yfiles.layout.DataProviderAdapter.} - * @implements {yfiles.algorithms.IDataMap} - * @template K,V - */ - export interface DataMapAdapter extends yfiles.layout.DataProviderAdapter,yfiles.algorithms.IDataMap{} - export class DataMapAdapter { - /** - * Initializes a new instance of the {@link yfiles.layout.DataMapAdapter.} class. - * @param keyType The type of the key for the mapper. - * @param valueType The type of the value for the mapper. - * @param mapper The mapper to adapt. - */ - constructor(keyType:yfiles.lang.Class,valueType:yfiles.lang.Class,mapper:yfiles.collections.IMapper); - /** - * - * @param dataHolder - * @param value - */ - set(dataHolder:any,value:any):void; - /** - * - * @param dataHolder - * @param value - */ - setBoolean(dataHolder:any,value:boolean):void; - /** - * - * @param dataHolder - * @param value - */ - setInt(dataHolder:any,value:number):void; - /** - * - * @param dataHolder - * @param value - */ - setNumber(dataHolder:any,value:number):void; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.DataMapAdapter; - } - /** - * An item collection that allows to specify the data provider key the collection is registered with. - *

- * This class supports {@link yfiles.layout.LayoutData} implementations and does not usually have to be used explicitly. - *

- * Type parameter T: The type of the items in the collection. - * @class - * @extends {yfiles.layout.ItemCollection.} - * @template T - */ - export interface DpKeyItemCollection extends yfiles.layout.ItemCollection{} - export class DpKeyItemCollection { - constructor(); - /** - * Gets or sets the data provider key that is used for the item collection. - *

- * If no key is set, the default data provider key is used. - *

- * @type {yfiles.algorithms.DpKeyBase.} - */ - dpKey:yfiles.algorithms.DpKeyBase; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.DpKeyItemCollection; - } - /** - * An {@link yfiles.layout.EdgeLabelCandidate} that provides a {@link yfiles.graph.ILabelCandidateDescriptor candidate descriptor}. - *

- * This class is used by {@link yfiles.layout.LayoutExecutor} and {@link yfiles.layout.LayoutGraphAdapter} to convert an {@link yfiles.graph.IGraph} - * into a corresponding - * {@link yfiles.algorithms.Graph}. Unless that conversion needs to be customized, or aforementioned classes cannot be used, this - * class usually doesn't need to be used explicitly. - *

- * @class - * @extends {yfiles.layout.EdgeLabelCandidate} - */ - export interface ExtendedEdgeLabelCandidate extends yfiles.layout.EdgeLabelCandidate{} - export class ExtendedEdgeLabelCandidate { - /** - * Returns a new instance of ExtendedEdgeLabelCandidate. - *

- * Returns a new instance of ExtendedEdgeLabelCandidate. - *

- * @param pos the location of the upper left corner of the candidate. - * @param size the size of the candidate. - * @param param the parameters of the labeling model associated with this candidate. - * @param owner the label associated to the candidate. - * @param internal flag whether the candidate is allowed to overlap the layout of the edge. - * @param descriptor the label candidate descriptor. - */ - constructor(pos:yfiles.algorithms.YPoint,size:yfiles.algorithms.YDimension,param:any,owner:yfiles.layout.IEdgeLabelLayout,internal:boolean,descriptor:yfiles.graph.ILabelCandidateDescriptor); - /** - * Returns a new instance of ExtendedEdgeLabelCandidate. - *

- * Returns a new instance of ExtendedEdgeLabelCandidate. - *

- * @param orientedBox the label size and orientation - * @param param the parameters of the labeling model associated with this candidate. - * @param owner the label associated to the candidate. - * @param internal flag whether the candidate is allowed to overlap the layout of the edge. - * @param descriptor the label candidate descriptor. - */ - constructor(orientedBox:yfiles.algorithms.YOrientedRectangle,param:any,owner:yfiles.layout.IEdgeLabelLayout,internal:boolean,descriptor:yfiles.graph.ILabelCandidateDescriptor); - /** - * Returns a new instance of ExtendedEdgeLabelCandidate. - *

- * Returns a new instance of ExtendedEdgeLabelCandidate. - *

- * @param pos the location of the upper left corner of the candidate. - * @param size the size of the candidate. - * @param param the parameters of the labeling model associated with this candidate. - * @param owner the label associated to the candidate. - * @param descriptor the label candidate descriptor. - */ - constructor(pos:yfiles.algorithms.YPoint,size:yfiles.algorithms.YDimension,param:any,owner:yfiles.layout.IEdgeLabelLayout,descriptor:yfiles.graph.ILabelCandidateDescriptor); - /** - * Gets the label candidate descriptor. - * @type {yfiles.graph.ILabelCandidateDescriptor} - */ - descriptor:yfiles.graph.ILabelCandidateDescriptor; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.ExtendedEdgeLabelCandidate; - } - /** - * An {@link yfiles.layout.IProfitModel} that returns the profit of a label candidate for instances of {@link yfiles.layout.ExtendedNodeLabelCandidate} - * and {@link yfiles.layout.ExtendedEdgeLabelCandidate}. - *

- * This class is used by {@link yfiles.layout.LayoutExecutor} and {@link yfiles.layout.LayoutGraphAdapter} to convert an {@link yfiles.graph.IGraph} - * into a corresponding - * {@link yfiles.algorithms.Graph}. Unless that conversion needs to be customized, or aforementioned classes cannot be used, this - * class usually doesn't need to be used explicitly. - *

- * @class - * @implements {yfiles.layout.IProfitModel} - */ - export interface ExtendedLabelCandidateProfitModel extends yfiles.lang.Object,yfiles.layout.IProfitModel{} - export class ExtendedLabelCandidateProfitModel { - /** - * Returns the profit for placing a label-candidate. - *

- * This implementation returns the profit for instances of {@link yfiles.layout.ExtendedNodeLabelCandidate} or 0.0 for other - * {@link yfiles.layout.LabelCandidate}s. - *

- * @param candidate a label candidate - * @returns a value between 0 and 1. - */ - getProfit(candidate:yfiles.layout.LabelCandidate):number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.ExtendedLabelCandidateProfitModel; - } - /** - * A {@link yfiles.layout.NodeLabelCandidate} that provides a {@link yfiles.graph.ILabelCandidateDescriptor candidate descriptor}. - *

- * This class is used by {@link yfiles.layout.LayoutExecutor} and {@link yfiles.layout.LayoutGraphAdapter} to convert an {@link yfiles.graph.IGraph} - * into a corresponding - * {@link yfiles.algorithms.Graph}. Unless that conversion needs to be customized, or aforementioned classes cannot be used, this - * class usually doesn't need to be used explicitly. - *

- * @class - * @extends {yfiles.layout.NodeLabelCandidate} - */ - export interface ExtendedNodeLabelCandidate extends yfiles.layout.NodeLabelCandidate{} - export class ExtendedNodeLabelCandidate { - /** - * Returns a new instance of NodeLabelCandidate. - *

- * Returns a new instance of NodeLabelCandidate. - *

- * @param pos the location of the upper left corner of the candidate. - * @param size the size of the candidate. - * @param param the parameters of the labeling model associated with this candidate. - * @param owner the label associated to the candidate. - * @param internal flag whether the candidate is inside the node, or outside. - * @param descriptor the label candidate descriptor. - */ - constructor(pos:yfiles.algorithms.YPoint,size:yfiles.algorithms.YDimension,param:any,owner:yfiles.layout.INodeLabelLayout,internal:boolean,descriptor:yfiles.graph.ILabelCandidateDescriptor); - /** - * Returns a new instance of NodeLabelCandidate. - *

- * Returns a new instance of NodeLabelCandidate. - *

- * @param orientedBox the label size and orientation - * @param param the parameters of the labeling model associated with this candidate. - * @param owner the label associated to the candidate. - * @param internal flag whether the candidate is inside the node, or outside. - * @param descriptor the label candidate descriptor. - */ - constructor(orientedBox:yfiles.algorithms.YOrientedRectangle,param:any,owner:yfiles.layout.INodeLabelLayout,internal:boolean,descriptor:yfiles.graph.ILabelCandidateDescriptor); - /** - * Returns a new instance of ExtendedNodeLabelCandidate. - *

- * Returns a new instance of ExtendedNodeLabelCandidate. - *

- * @param pos the location of the upper left corner of the candidate. - * @param size the size of the candidate. - * @param param the parameters of the labeling model associated with this candidate. - * @param owner the label associated to the candidate. - * @param descriptor the label candidate descriptor. - */ - constructor(pos:yfiles.algorithms.YPoint,size:yfiles.algorithms.YDimension,param:any,owner:yfiles.layout.INodeLabelLayout,descriptor:yfiles.graph.ILabelCandidateDescriptor); - /** - * Gets the label candidate descriptor. - * @type {yfiles.graph.ILabelCandidateDescriptor} - */ - descriptor:yfiles.graph.ILabelCandidateDescriptor; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.ExtendedNodeLabelCandidate; - } - /** - * Specifies custom data for the {@link yfiles.layout.FixGroupLayoutStage}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface FixGroupLayoutData extends yfiles.layout.LayoutData{} - export class FixGroupLayoutData { - constructor(); - /** - * Gets or sets the collection of group nodes whose contents should keep their relative positions. - * @see yfiles.layout.FixGroupLayoutStage#FIXED_GROUP_NODES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - fixedGroupNodes:yfiles.layout.ItemCollection; - /** - * Gets or sets a mapping from edges to their source {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourcePortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their target {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetPortConstraints:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.FixGroupLayoutData; - } - /** - * Specifies custom data for the {@link yfiles.layout.FixNodeLayoutStage}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface FixNodeLayoutData extends yfiles.layout.LayoutData{} - export class FixNodeLayoutData { - constructor(); - /** - * Gets or sets the collection of nodes which should be considered fixed. - * @see yfiles.layout.FixNodeLayoutStage#FIXED_NODE_DP_KEY - * @type {yfiles.layout.SingleItemCollection.} - */ - fixedNode:yfiles.layout.SingleItemCollection; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.FixNodeLayoutData; - } - /** - * Provides different ways to define the items in a collection for use with {@link yfiles.layout.LayoutData}. - *

- * Only one of the provided ways to define a collection can be used at the same time, therefore only one of the properties - * {@link yfiles.layout.ItemCollection.#items}, {@link yfiles.layout.ItemCollection.#mapper}, and {@link yfiles.layout.ItemCollection.#delegate} should be set on each instance. - *

- *

- * This class supports {@link yfiles.layout.LayoutData} implementations and does not usually have to be used explicitly. - *

- * Type parameter TItem: The type of the items in the collection. - * @class - * @template TItem - */ - export interface ItemCollection extends yfiles.lang.Object{} - export class ItemCollection { - /** - * Provides a mapper describing which elements are contained in this {@link yfiles.layout.ItemCollection.}. - * @param adapter The graph adapter the mapper shall be provided for. - * @param layout The layout using the item collection. - * @returns - */ - provideMapper(adapter:yfiles.layout.LayoutGraphAdapter,layout:yfiles.layout.ILayoutAlgorithm):yfiles.collections.IMapper; - /** - * Gets or sets a mapping from the items to a boolean value. - *

- * The mapped boolean value specifies whether an item is contained in the collection. - *

- * @type {yfiles.collections.IMapper.} - */ - mapper:yfiles.collections.IMapper; - /** - * Gets or sets a delegate from the items to a boolean value. - *

- * The returned boolean value describes whether an item is contained in the collection. - *

- * @type {function(TItem): boolean} - */ - delegate:(obj:TItem)=>boolean; - /** - * Gets or sets a collection of items. - *

- * This collection contains exactly the items in the given collection. - *

- * @type {yfiles.collections.ICollection.} - */ - items:yfiles.collections.ICollection; - /** - * Sets an enumerable of items. - *

- * This collection contains exactly the items in the given enumerable. - *

- * @type {yfiles.collections.IEnumerable.} - */ - source:yfiles.collections.IEnumerable; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.ItemCollection; - } - /** - * Provides different ways to define a mapping from items to values for use with {@link yfiles.layout.LayoutData}. - *

- * Only one of the provided ways to define a mapping can be used at the same time, therefore only one of the properties {@link yfiles.layout.ItemMapping.#mapper}, {@link yfiles.layout.ItemMapping.#delegate} - * and {@link yfiles.layout.ItemMapping.#constant} should be set on each instance. - *

- *

- * This class supports {@link yfiles.layout.LayoutData} implementations and does not usually have to be instantiated by client code - * explicitly. Instances of this class are properties of concrete {@link yfiles.layout.LayoutData} implementations. - *

- * Type parameter TItem: The type of the items that are mapped. - * Type parameter TValue: The type of the values the items are mapped to. - * @class - * @template TItem,TValue - */ - export interface ItemMapping extends yfiles.lang.Object{} - export class ItemMapping { - /** - * Provides a mapper mapping the items to values. - *

- * This implementation returns the {@link yfiles.layout.ItemMapping.#mapper} if one has been set, otherwise it will create a mapper from the {@link yfiles.layout.ItemMapping.#delegate} if one has been - * specified or uses a constant mapper if a {@link yfiles.layout.ItemMapping.#constant} has been specified. If none have been specified, null is returned. - *

- * @param adapter The graph adapter the mapper shall be provided for. - * @param layout The layout using the mapper. - * @returns A mapper that maps items to values or null. - */ - provideMapper(adapter:yfiles.layout.LayoutGraphAdapter,layout:yfiles.layout.ILayoutAlgorithm):yfiles.collections.IMapper; - /** - * Gets or sets a delegate that implements the mapping. - *

- * This value will be ignored if either {@link yfiles.layout.ItemMapping.#mapper} as also been set. It overrides values set to the {@link yfiles.layout.ItemMapping.#constant} property. - *

- * @type {function(TItem): TValue} - */ - delegate:(key:TItem)=>TValue; - /** - * Gets or sets an {@link yfiles.collections.IMapper.} that realizes the mapping. - *

- * Getting this property will automatically create an instance. Values set will override the effect of any values set to - * the {@link yfiles.layout.ItemMapping.#constant} or {@link yfiles.layout.ItemMapping.#delegate} properties. - *

- * @type {yfiles.collections.IMapper.} - */ - mapper:yfiles.collections.IMapper; - /** - * Gets or sets a constant value all items are mapped to. - *

- * This value will be ignored if either {@link yfiles.layout.ItemMapping.#mapper} or {@link yfiles.layout.ItemMapping.#delegate} have also been set. - *

- * @type {TValue} - */ - constant:TValue; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.ItemMapping; - } - /** - * Base for convenience classes that specify custom data for a layout calculation done with the - * {@link yfiles.layout.LayoutExecutor}. - *

- * Implementations of this class provide item-specific configuration options for a specific layout. Single properties that - * affect the complete layout are available on the specific layout class itself. - *

- *

- * The {@link yfiles.layout.LayoutExecutor} {@link yfiles.layout.LayoutData#apply applies} these configurations when {@link yfiles.layout.LayoutExecutor#start started}. So does - * {@link yfiles.layout.LayoutGraphAdapter#applyLayout}. - *

- * @see yfiles.layout.LayoutExecutor#layoutData - * @see yfiles.layout.LayoutGraphAdapter#applyLayout - * @class - */ - export interface LayoutData extends yfiles.lang.Object{} - export class LayoutData { - /** - * Applies this layout data to the specified layoutGraphAdapter. - *

- * This method should be called before a layout is executed. It will configure the adapter and graph for to the layout. - *

- * @param layoutGraphAdapter The adapter to add the layout data to. - * @param layout The layout that shall use this layout data. - * @param layoutGraph The layout graph used for the layout calculation. - * @abstract - */ - apply(layoutGraphAdapter:yfiles.layout.LayoutGraphAdapter,layout:yfiles.layout.ILayoutAlgorithm,layoutGraph:yfiles.layout.CopiedLayoutGraph):void; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.LayoutData; - } - /** - * Executes a {@link yfiles.layout.ILayoutAlgorithm} and optionally animates the transition to the calculated layout. - *

- * This class is the preferred way to execute a layout. Its animation can be customized in various ways. - *

- *

- * If no fine-grained control of the animation is required, the convenience methods {@link yfiles.graph.IGraph#applyLayout} and {@link yfiles.view.GraphComponent#morphLayout} - * can be used instead. - *

- * @see yfiles.layout.LayoutGraphAdapter - * @class - */ - export interface LayoutExecutor extends yfiles.lang.Object{} - export class LayoutExecutor { - /** - * Initializes a new instance of the {@link yfiles.layout.LayoutExecutor} class. - * @param graphComponent The control which will be animated and provides the {@link } instance. - * @param graph The graph to layout. - * @param layout The {@link } to use. - */ - constructor(graphComponent:yfiles.view.GraphComponent,graph:yfiles.graph.IGraph,layout:yfiles.layout.ILayoutAlgorithm); - /** - * Initializes a new instance of the {@link yfiles.layout.LayoutExecutor} class. - *

- * Use the {@link yfiles.layout.LayoutExecutor#start} method to actually execute the task. This will disable animation and content - * rect updates. - *

- * @param graphComponent The control which will be animated and provides the {@link } instance. - * @param layout The {@link } to use. - */ - constructor(graphComponent:yfiles.view.GraphComponent,layout:yfiles.layout.ILayoutAlgorithm); - /** - * Creates an instance of {@link yfiles.algorithms.AbortHandler}. - *

- * This method is called upon first access to the {@link yfiles.layout.LayoutExecutor#abortHandler} property. - *

- * @returns A new {@link } instance to use during layout calculation. - * @protected - */ - createAbortHandler():yfiles.algorithms.AbortHandler; - /** - * Factory method that creates the {@link yfiles.view.IAnimation} that will be used by this instance after the layout has been - * calculated. - * @returns The animation to use after the layout. - * @see yfiles.layout.LayoutExecutor#duration - * @see yfiles.layout.LayoutExecutor#animateViewport - * @see yfiles.layout.LayoutExecutor#createMorphAnimation - * @see yfiles.layout.LayoutExecutor#createViewportAnimation - * @protected - */ - createAnimation():yfiles.view.IAnimation; - /** - * Factory method that creates the animation for the {@link yfiles.graph.IGraph}. - * @returns The animation instance. - * @see yfiles.layout.LayoutExecutor#createAnimation - * @protected - */ - createMorphAnimation():yfiles.view.IAnimation; - /** - * Creates an animation that morphs the layout of all {@link yfiles.graph.ITable}s in the graph. - * @returns - * @see yfiles.view.TableAnimation - * @see yfiles.layout.LayoutExecutor#configureTableLayout - * @protected - */ - createTableAnimations():yfiles.view.IAnimation; - /** - * Create a new instance of {@link yfiles.layout.TableLayoutConfigurator} that is used if {@link yfiles.layout.LayoutExecutor#configureTableLayout} is enabled. - *

- * This method is called upon first access to the {@link yfiles.layout.LayoutExecutor#tableLayoutConfigurator} property. - *

- * @returns A new instance of the {@link } class. - * @protected - */ - createTableLayoutConfigurator():yfiles.layout.TableLayoutConfigurator; - /** - * Factory method that creates the animation for the {@link yfiles.view.CanvasComponent#viewport}. - *

- * The created animation will morph the currnt viewport into the one where the whole graph fits. The result after the - * animation is thus the same as calling {@link yfiles.view.GraphComponent#fitGraphBounds}. - *

- * @param targetBounds The target bounds of the animation. - * @returns The animation instance. - * @see yfiles.layout.LayoutExecutor#createAnimation - * @protected - */ - createViewportAnimation(targetBounds:yfiles.geometry.Rect):yfiles.view.IAnimation; - /** - * Callback method that performs the actual layout. - * @protected - */ - execute():void; - /** - * Calculate the target bounds to be used for the {@link yfiles.view.CanvasComponent#contentRect} as well as the {@link yfiles.view.ViewportAnimation} after the layout has - * finished. - *

- * By default, the value is computed with {@link yfiles.layout.LayoutGraphUtilities#getBoundingBox} with labels and {@link yfiles.layout.LayoutExecutor#targetBoundsInsets} taken into - * account. - *

- * @returns The desired content rectangle and the bounds for a viewport animation. - * @protected - */ - getTargetBounds():yfiles.geometry.Rect; - /** - * Set up {@link yfiles.layout.LayoutExecutor#tableLayoutConfigurator} for a layout. - *

- * This implementation configures {@link yfiles.layout.TableLayoutConfigurator#horizontalLayout} according to the {@link yfiles.layout.MultiStageLayout#layoutOrientation} and calls {@link yfiles.layout.TableLayoutConfigurator#prepare} - *

- * @protected - */ - prepareTableLayout():void; - /** - * Writes the table layout information provided through {@link yfiles.layout.LayoutExecutor#tableLayoutConfigurator} back to all tables. - *

- * This method is only called when the layout is not animated. - *

- * @see yfiles.layout.LayoutExecutor#prepareTableLayout - * @protected - */ - restoreTableLayout():void; - /** - * Actually starts the layout calculation and the optional animation asynchronously using a Promise. - *

- * This method will ultimately call the {@link yfiles.layout.LayoutExecutor#execute} method. If the {@link yfiles.layout.LayoutExecutor#duration} is zero no animation will be - * performed. - *

- *

- * If this instance is already running, this method returns immediately without doing anything and returns the previous - * Promise. - *

- * @returns A Promise that will be fulfilled once the layout and optional animation is done. - * @see yfiles.layout.LayoutExecutor#execute - */ - start():Promise; - /** - * Stops a currently running layout calculation or animation. - *

- * If a layout calculation is still running, it will be requested to stopped via {@link yfiles.algorithms.AbortHandler#stop} and - * the animation will not run. If the layout calculation was already completed, the animation will be aborted immediately - * and the layout result will be shown immediately. - *

- *

- * To just skip the animation but let the calculation finish normally, the {@link yfiles.layout.LayoutExecutor#duration} can be set to zero at any time before the - * animation was started. - *

- * @returns - */ - stop():Promise; - /** - * Gets the {@link yfiles.algorithms.AbortHandler} that is used during the layout calculation, unless another {@link yfiles.algorithms.AbortHandler} - * has been configured via {@link yfiles.layout.LayoutExecutor#layoutData} or by registering an {@link yfiles.collections.IMapper.} in the graph's {@link yfiles.graph.IGraph#mapperRegistry}. - * @see yfiles.layout.LayoutExecutor#createAbortHandler - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - /** - * Gets the {@link yfiles.layout.LayoutExecutor#tableLayoutConfigurator} that is used if {@link yfiles.layout.LayoutExecutor#configureTableLayout} is enabled. - * @see yfiles.layout.LayoutExecutor#createTableLayoutConfigurator - * @type {yfiles.layout.TableLayoutConfigurator} - */ - tableLayoutConfigurator:yfiles.layout.TableLayoutConfigurator; - /** - * Gets or sets a value indicating whether to automatically perform calls to {@link yfiles.layout.TableLayoutConfigurator#prepare} - * and {@link yfiles.layout.TableLayoutConfigurator#restore} in order to layout table nodes. - *

- * The default value is true. - *

- * @type {boolean} - */ - configureTableLayout:boolean; - /** - * Gets or sets the duration of the animation. - *

- * The default value is {@link yfiles.lang.TimeSpan#ZERO}. - *

- * @type {yfiles.lang.TimeSpan} - */ - duration:yfiles.lang.TimeSpan; - /** - * Gets or sets a value indicating whether edge groups are automatically created for edges that are connected to the same - * port. - *

- * If this property is enabled and no edge groups are explicitly created (no {@link yfiles.collections.IMapper.} are registered for the keys {@link yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY} - * and {@link yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY}), for each port with multiple outgoing resp. incoming edges - * these edges will be assigned to the same edge group. The necessary - * {@link yfiles.algorithms.IDataProvider}s will be created automatically. - *

- *

- * Without an {@link yfiles.layout.ILayoutAlgorithm} that supports edge groups, this property ahs no visual effect. - *

- *

- * The default value is true. - *

- * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @see yfiles.layout.LayoutGraphAdapter#automaticEdgeGrouping - * @see yfiles.layout.LayoutExecutor#fixPorts - * @type {boolean} - */ - automaticEdgeGrouping:boolean; - /** - * Controls whether strong port constraints are automatically created. - *

- * If this property is enabled and no edge groups are explicitly created (no {@link yfiles.collections.IMapper.} are registered for the keys {@link yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY} - * and {@link yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY}), for all edges strong source and target point constraints - * with {@link yfiles.layout.PortSide#ANY} are created. The necessary - * {@link yfiles.algorithms.IDataProvider}s will be created automatically. - *

- *

- * This ensures that view {@link yfiles.graph.IPort}s are not moved during the layout, if the {@link yfiles.layout.ILayoutAlgorithm} - * supports port constraints. - *

- *

- * The default value is false. - *

- * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @see yfiles.layout.LayoutGraphAdapter#fixPorts - * @see yfiles.layout.LayoutExecutor#automaticEdgeGrouping - * @type {boolean} - */ - fixPorts:boolean; - /** - * Gets or sets a value indicating whether the viewport should be animated to the new bounds of the graph. - *

- * The result when this property is true after the animation is the same as calling - * {@link yfiles.view.GraphComponent#fitGraphBounds}. Setting this property to true and changing {@link yfiles.layout.LayoutExecutor#duration} to {@link yfiles.lang.TimeSpan#ZERO} will - * disable the animation, but still change the viewport to the new graph bounds. - *

- *

- * When the viewport should stay the same, the layout algorithms often have to be coerced to keep parts of the graph in the - * same location. This can be done by wrapping the layout algorithm in an instance of {@link yfiles.layout.FixNodeLayoutStage}. - *

- *

- * The default value is false. - *

- * @type {boolean} - */ - animateViewport:boolean; - /** - * Gets or sets a value indicating whether to respect the {@link yfiles.view.CanvasComponent#viewportLimiter} of the {@link yfiles.view.GraphComponent} of this instance. - *

- * The default value is false. - *

- * @type {boolean} - */ - considerViewportLimiter:boolean; - /** - * Gets or sets a value indicating whether to use eased animation. - *

- * The default value is false. - *

- * @type {boolean} - */ - easedAnimation:boolean; - /** - * Gets or sets the insets (in world coordinates) that will be added to the content rectangle when calculating the target - * viewport. - *

- * The default value is {@link yfiles.geometry.Insets#EMPTY}. - *

- * @type {yfiles.geometry.Insets} - */ - targetBoundsInsets:yfiles.geometry.Insets; - /** - * Gets or sets a value indicating whether the content rectangle property of the {@link yfiles.view.CanvasComponent} should be - * updated upon completion. - *

- * The default value is false. - *

- * @type {boolean} - */ - updateContentRect:boolean; - /** - * Gets a value indicating whether this instance is currently running. - * @type {boolean} - */ - running:boolean; - /** - * Gets or sets the layout data that is applied when {@link yfiles.layout.LayoutExecutor#start starting} the executor. - * @type {yfiles.layout.LayoutData} - */ - layoutData:yfiles.layout.LayoutData; - /** - * Gets or sets the {@link yfiles.view.ISelectionModel.} to use for the automatically registered {@link yfiles.algorithms.IDataProvider} instances for {@link yfiles.layout.LayoutKeys#AFFECTED_NODES_DP_KEY} - * and {@link yfiles.layout.LayoutKeys#AFFECTED_EDGES_DP_KEY}. - *

- * If this value is null and {@link yfiles.layout.LayoutExecutor#graph} is the same instance as {@link yfiles.layout.LayoutExecutor#graphComponent}'s {@link yfiles.graph.IGraph} instance, the selection model from {@link yfiles.layout.LayoutExecutor#graphComponent} is used - * instead. - *

- * @type {yfiles.view.ISelectionModel.} - */ - selectionModel:yfiles.view.ISelectionModel; - /** - * Gets the layout graph that is used by this instance to calculate the layout. - * @protected - * @type {yfiles.layout.CopiedLayoutGraph} - */ - layoutGraph:yfiles.layout.CopiedLayoutGraph; - /** - * Gets the control this instance has been created for. - * @protected - * @type {yfiles.view.GraphComponent} - */ - graphComponent:yfiles.view.GraphComponent; - /** - * Gets the {@link yfiles.layout.ILayoutAlgorithm} this instance is using. - * @protected - * @type {yfiles.layout.ILayoutAlgorithm} - */ - layout:yfiles.layout.ILayoutAlgorithm; - /** - * Gets the graph this instance is working on. - * @protected - * @type {yfiles.graph.IGraph} - */ - graph:yfiles.graph.IGraph; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.LayoutExecutor; - } - /** - * Adapter class that can be used to obtain an {@link yfiles.layout.LayoutGraph} from an {@link yfiles.graph.IGraph}. - *

- * Typically, this class is not used directly but through the convenience class {@link yfiles.layout.LayoutExecutor} or the - * convenience methods {@link yfiles.graph.IGraph#applyLayout} and MorphLayout - *

- *

- * This class will use the provided {@link yfiles.layout.LayoutGraphAdapter#selectionModel} to register corresponding {@link yfiles.algorithms.IDataProvider}s for the data provider keys - * {@link yfiles.layout.LayoutKeys#AFFECTED_NODES_DP_KEY} and {@link yfiles.layout.LayoutKeys#AFFECTED_EDGES_DP_KEY} to the layout graph. - * Moreover, it will automatically convert {@link yfiles.collections.IMapper.} instances registered with the {@link yfiles.graph.IMapperRegistry} of the {@link yfiles.layout.LayoutGraphAdapter#adaptedGraph} into - * corresponding {@link yfiles.algorithms.IDataProvider} instances of the layout graph. - *

- *

- * In addition, this class supports {@link yfiles.graph.IGraph}s with edge to edge connections, i.e., edges that are adjacent to - * other edges. Since such edges are not allowed in an {@link yfiles.layout.LayoutGraph}, the property {@link yfiles.layout.LayoutGraphAdapter#hideEdgesAtEdges} specifies whether these - * edges shouldn't be converted into the layout graph at all or converted into a corresponding structure with dummy nodes. - *

- *

- * The chapter {@link @DGUIDE_LAYOUT_PREFIX@/layout-applying_a_layout.html Applying an Automatic Layout} describes how automatic layout and graph analysis algorithms from the yFiles - * Layout and yFiles Basic library components can be accessed from @COMPONENT_NAME@. - *

- * @see yfiles.layout.CopiedLayoutGraph - * @see yfiles.layout.ILayoutAlgorithm - * @class - */ - export interface LayoutGraphAdapter extends yfiles.lang.Object{} - export class LayoutGraphAdapter { - /** - * Creates the adapter using a given {@link yfiles.graph.IGraph} and {@link yfiles.view.ISelectionModel.}. - * @param graph The graph to build an adapter for. - * @param [selectionModel=null] The optional selection model to use by the {@link #AFFECTED_NODES_DP_KEY} and {@link #AFFECTED_EDGES_DP_KEY} - * {@link } instances that are automatically bound to this adapter. - * @throws {Stubs.Exceptions.ArgumentError} graph is null. - */ - constructor(graph:yfiles.graph.IGraph,selectionModel?:yfiles.view.ISelectionModel); - /** - * Creates the adapter with no initial {@link yfiles.graph.IGraph} and no {@link yfiles.view.ISelectionModel.}. - *

- * Before this instance can be used for automatic layouts, you mus assign a value to the {@link yfiles.layout.LayoutGraphAdapter#adaptedGraph} property. - *

- */ - constructor(); - /** - * Registers a data provider with the graph using the given look-up key and wrapping the given mapper. - *

- * If a mapper is already registered under the given key, it is overwritten. - *

- * Type parameter K: The type of the key to use. - * Type parameter V: The type of the value to use. - * @param valueType The type of the value to use. - * @param keyType The type of the key to use. - * @param dataKey The look-up key to register the data provider with. - * @param mapper The mapper wrapped as data provider. - * @returns - * @template K,V - */ - addDataProvider(keyType:yfiles.lang.Class,valueType:yfiles.lang.Class,dataKey:any,mapper:yfiles.collections.IMapper):yfiles.algorithms.IDataProvider; - /** - * Convenience method that applies a {@link yfiles.layout.ILayoutAlgorithm layout algorithm} to an {@link yfiles.graph.IGraph}, optionally applying some - * {@link yfiles.layout.LayoutData}. - * @param layout The layout algorithm to apply. - * @param [layoutData=null] The layout data. - */ - applyLayout(layout:yfiles.layout.ILayoutAlgorithm,layoutData?:yfiles.layout.LayoutData):void; - /** - * Static convenience method that applies a {@link yfiles.layout.ILayoutAlgorithm layout algorithm} to an {@link yfiles.graph.IGraph}. - * @param layout The layout algorithm to apply. - * @param graph The graph to compute the layout on. - * @param [layoutData=null] The layout data. - * @static - */ - static applyLayout(graph:yfiles.graph.IGraph,layout:yfiles.layout.ILayoutAlgorithm,layoutData?:yfiles.layout.LayoutData):void; - /** - * Creates a {@link yfiles.layout.CopiedLayoutGraph} for this instance. - * @returns An instance whose {@link #commitLayoutToOriginalGraph} will update this instance. - */ - createCopiedLayoutGraph():yfiles.layout.CopiedLayoutGraph; - /** - * Creates the {@link yfiles.layout.EdgeLabelCandidate} for a given label and {@link yfiles.graph.ILabelModelParameter} combination. - * @param originalLabel The original label. - * @param dummyLabel The dummy label that describes the current laid out label. - * @param layoutParameter The parameter to create a candidate for. - * @param labelLayout The {@link } of the label to pass to the candidate. - * @returns A candidate to yield for the labeling algorithms or null. - */ - createEdgeLabelCandidate(originalLabel:yfiles.graph.ILabel,dummyLabel:yfiles.graph.ILabel,layoutParameter:yfiles.graph.ILabelModelParameter,labelLayout:yfiles.layout.IEdgeLabelLayout):yfiles.layout.EdgeLabelCandidate; - /** - * Factory method that creates an {@link yfiles.layout.IEdgeLayout} implementation that wraps the given {@link yfiles.graph.IEdge} - * @param edge The edge to wrap. - * @returns A wrapper instance. - * @protected - */ - createEdgeLayout(edge:yfiles.graph.IEdge):yfiles.layout.IEdgeLayout; - /** - * Callback factory method that creates the {@link yfiles.layout.INodeLayout} for the given {@link yfiles.graph.IPort} that is used as a - * dummy to represent the port at the {@link yfiles.graph.IEdge} that owns port. - * @param port The port to create the layout for. - * @returns A suitable implementation of {@link } that uses the {@link #location port's location} as the center of the node. - * @see yfiles.layout.LayoutGraphAdapter#edgePortNodeSize - * @see yfiles.layout.LayoutGraphAdapter#hideEdgesAtEdges - * @protected - */ - createEdgePortLayout(port:yfiles.graph.IPort):yfiles.layout.INodeLayout; - /** - * Creates a {@link yfiles.layout.NodeLabelCandidate} for a given label and {@link yfiles.graph.ILabelModelParameter} combination. - * @param originalLabel The original label. - * @param dummyLabel The dummy label that describes the current laid out label. - * @param layoutParameter The parameter to create a candidate for. - * @param ownerLayout The {@link } of the label to pass to the candidate. - * @returns A candidate to yield for the labeling algorithms or null. - */ - createNodeLabelCandidate(originalLabel:yfiles.graph.ILabel,dummyLabel:yfiles.graph.ILabel,layoutParameter:yfiles.graph.ILabelModelParameter,ownerLayout:yfiles.layout.INodeLabelLayout):yfiles.layout.NodeLabelCandidate; - /** - * Factory method that creates a {@link yfiles.layout.INodeLayout} implementation that wraps the given {@link yfiles.graph.INode} - * @param node The node to wrap. - * @returns A wrapper instance. - * @protected - */ - createNodeLayout(node:yfiles.graph.INode):yfiles.layout.INodeLayout; - /** - * - * @returns - */ - edgeObjects():yfiles.collections.IEnumerable; - /** - * - * @param dataKey - * @returns - */ - getDataProvider(dataKey:any):yfiles.algorithms.IDataProvider; - /** - * - * @param edge - * @returns - */ - getEdgeLabelLayout(edge:any):yfiles.layout.IEdgeLabelLayout[]; - /** - * - * @param edge - * @returns - */ - getEdgeLayout(edge:any):yfiles.layout.IEdgeLayout; - /** - * Callback that retrieves the label candidate descriptor for the given label and parameter. - * @param originalLabel The original label to which a parameter will be applied. - * @param dummyLabel The dummy label to which the parameter will be applied. - * @param layoutParameter The parameter to apply. - * @returns A descriptor or null. - * @see yfiles.layout.LayoutGraphAdapter#createNodeLabelCandidate - * @see yfiles.layout.LayoutGraphAdapter#createEdgeLabelCandidate - * @see yfiles.layout.LayoutGraphAdapter#getLabelCandidateDescriptorProvider - * @protected - */ - getLabelCandidateDescriptor(originalLabel:yfiles.graph.ILabel,dummyLabel:yfiles.graph.ILabel,layoutParameter:yfiles.graph.ILabelModelParameter):yfiles.graph.ILabelCandidateDescriptor; - /** - * Callback method that gets the label candidate descriptor provider for the given {@link yfiles.graph.IGraph}. - *

- * This implementation uses the {@link yfiles.graph.IGraph}'s {@link yfiles.graph.ILookup} to find an implementation of the - * {@link yfiles.graph.ILabelCandidateDescriptorProvider}. - *

- * @param graph The graph. - * @returns The result of a {@link #lookup} query on graph for the {@link } type. - * @protected - */ - getLabelCandidateDescriptorProvider(graph:yfiles.graph.IGraph):yfiles.graph.ILabelCandidateDescriptorProvider; - /** - * - * @param node - * @returns - */ - getNodeLabelLayout(node:any):yfiles.layout.INodeLabelLayout[]; - /** - * - * @param o - * @returns - */ - getNodeLayout(o:any):yfiles.layout.INodeLayout; - /** - * - * @param edgeObject - * @returns - */ - getSource(edgeObject:any):any; - /** - * - * @param edgeObject - * @returns - */ - getTarget(edgeObject:any):any; - /** - * - * @returns - */ - nodeObjects():yfiles.collections.IEnumerable; - /** - * Callback method that assigns a new location that matches newLocation to port. - *

- * This method is called only for ports which are owned by edges. These are represented by dummy nodes during the layout, - * and newLocation is the position of the dummy node after the layout. - *

- * @param port The edge port that should be placed. - * @param newLocation The new location of the port as calculated by the layout algorithm. - * @protected - */ - setEdgePortLocation(port:yfiles.graph.IPort,newLocation:yfiles.geometry.Point):void; - /** - * Callback method that assigns a new relative location to port. - *

- * The default implementation calls {@link yfiles.graph.IGraph#setRelativePortLocation} with - * newRelativeLocation. Depending on the port location model, the actual resulting port location may be different. - *

- * @param port The port that should be placed. - * @param newRelativeLocation The new coordinate offsets relative to the center of the node's {@link #layout}'s center. - * @protected - */ - setRelativePortLocation(port:yfiles.graph.IPort,newRelativeLocation:yfiles.geometry.Point):void; - /** - * An {@link yfiles.graph.IMapperRegistry} tag for an {@link yfiles.collections.IMapper.} that provides for the edge {@link yfiles.graph.ILabel}s in the {@link yfiles.layout.LayoutGraphAdapter#adaptedGraph} a {@link yfiles.layout.PreferredPlacementDescriptor} - * instance. - *

- * If there is a {@link yfiles.collections.IMapper.} in the {@link yfiles.graph.IGraph#mapperRegistry} it will be queried for each {@link yfiles.graph.IEdge edge} {@link yfiles.graph.ILabel label} to set the {@link yfiles.layout.IEdgeLabelLayout#preferredPlacementDescriptor} property of the adapted implementation. - *

- * @const - * @static - * @type {yfiles.algorithms.IEdgeLabelLayoutDpKey.} - */ - static EDGE_LABEL_LAYOUT_PREFERRED_PLACEMENT_DESCRIPTOR_DP_KEY:yfiles.algorithms.IEdgeLabelLayoutDpKey; - /** - * A data provider key that can be used to look up the original {@link yfiles.graph.INode} of a {@link yfiles.algorithms.Node}. - *

- * This data provider is created automatically for a {@link yfiles.layout.CopiedLayoutGraph} that is created as a copy of an {@link yfiles.graph.IGraph} - * with the help of a {@link yfiles.layout.LayoutGraphAdapter}. Especially, it is available if the layout is run with a {@link yfiles.layout.LayoutExecutor} - * or the convenience methods MorphLayout and {@link yfiles.graph.IGraph#applyLayout}. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static ORIGINAL_NODE_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * A data provider key that can be used to look up the original {@link yfiles.graph.IEdge} of an {@link yfiles.algorithms.Edge}. - *

- * This data provider is created automatically for a {@link yfiles.layout.CopiedLayoutGraph} that is created as a copy of an {@link yfiles.graph.IGraph} - * with the help of a {@link yfiles.layout.LayoutGraphAdapter}. Especially, it is available if the layout is run with a {@link yfiles.layout.LayoutExecutor} - * or the convenience methods MorphLayout and {@link yfiles.graph.IGraph#applyLayout}. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static ORIGINAL_EDGE_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * A data provider key that can be used to look up the original {@link yfiles.graph.ILabel} of an {@link yfiles.layout.INodeLabelLayout}. - *

- * This data provider is created automatically for a {@link yfiles.layout.CopiedLayoutGraph} that is created as a copy of an {@link yfiles.graph.IGraph} - * with the help of a {@link yfiles.layout.LayoutGraphAdapter}. Especially, it is available if the layout is run with a {@link yfiles.layout.LayoutExecutor} - * or the convenience methods MorphLayout and {@link yfiles.graph.IGraph#applyLayout}. - *

- * @const - * @static - * @type {yfiles.algorithms.INodeLabelLayoutDpKey.} - */ - static ORIGINAL_NODE_LABEL_DP_KEY:yfiles.algorithms.INodeLabelLayoutDpKey; - /** - * A data provider key that can be used to look up the original {@link yfiles.graph.ILabel} of an {@link yfiles.layout.IEdgeLabelLayout}. - *

- * This data provider is created automatically for a {@link yfiles.layout.CopiedLayoutGraph} that is created as a copy of an {@link yfiles.graph.IGraph} - * with the help of a {@link yfiles.layout.LayoutGraphAdapter}. Especially, it is available if the layout is run with a {@link yfiles.layout.LayoutExecutor} - * or the convenience methods MorphLayout and {@link yfiles.graph.IGraph#applyLayout}. - *

- * @const - * @static - * @type {yfiles.algorithms.IEdgeLabelLayoutDpKey.} - */ - static ORIGINAL_EDGE_LABEL_DP_KEY:yfiles.algorithms.IEdgeLabelLayoutDpKey; - /** - * A data provider key that can be used to look up the {@link yfiles.graph.IPort source port} of the original {@link yfiles.graph.IEdge} of an - * {@link yfiles.algorithms.Edge}. - *

- * This data provider is created automatically for a {@link yfiles.layout.CopiedLayoutGraph} that is created as a copy of an {@link yfiles.graph.IGraph} - * with the help of a {@link yfiles.layout.LayoutGraphAdapter}. Especially, it is available if the layout is run with a {@link yfiles.layout.LayoutExecutor} - * or the convenience methods MorphLayout and {@link yfiles.graph.IGraph#applyLayout}. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static ORIGINAL_SOURCE_PORT_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * A data provider key that can be used to look up the {@link yfiles.graph.IPort target port} of the original {@link yfiles.graph.IEdge} of an - * {@link yfiles.algorithms.Edge}. - *

- * This data provider is created automatically for a {@link yfiles.layout.CopiedLayoutGraph} that is created as a copy of an {@link yfiles.graph.IGraph} - * with the help of a {@link yfiles.layout.LayoutGraphAdapter}. Especially, it is available if the layout is run with a {@link yfiles.layout.LayoutExecutor} - * or the convenience methods MorphLayout and {@link yfiles.graph.IGraph#applyLayout}. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static ORIGINAL_TARGET_PORT_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * A data provider key that can be used to look up the original unconnected{@link yfiles.graph.IPort ports} of the original {@link yfiles.graph.IPortOwner} of an {@link yfiles.algorithms.Node} - * or, in the case of edge-to-edge connections, an {@link yfiles.algorithms.Edge}. - *

- * You can access all (connected and unconnected) ports through the {@link yfiles.graph.IPortOwner#ports} property of the original {@link yfiles.graph.IGraph} elements, - * which can be retrieved through the {@link yfiles.layout.LayoutGraphAdapter#ORIGINAL_NODE_DP_KEY} and {@link yfiles.layout.LayoutGraphAdapter#ORIGINAL_EDGE_DP_KEY} - * data providers. The information about whether a port is connected or not is not readily accessible from there, though. - * You can use this data provider to specifically find these port, e.g. to create additional - * {@link yfiles.layout.PortCandidate}s or just reserve space for them. - *

- *

- * This data provider is created automatically for a {@link yfiles.layout.CopiedLayoutGraph} that is created as a copy of an {@link yfiles.graph.IGraph} - * with the help of a {@link yfiles.layout.LayoutGraphAdapter}. Especially, it is available if the layout is run with a {@link yfiles.layout.LayoutExecutor} - * or the convenience methods MorphLayout and {@link yfiles.graph.IGraph#applyLayout}. - *

- * @const - * @static - * @type {yfiles.algorithms.GraphObjectDpKey.>} - */ - static UNCONNECTED_PORTS_DP_KEY:yfiles.algorithms.GraphObjectDpKey>; - /** - * This key is used to provide information about dummy nodes that have been inserted into the graph to model edges at - * edges. - *

- * This key can be used to query an {@link yfiles.algorithms.IDataProvider} that yields true for {@link yfiles.algorithms.IDataProvider#getBoolean} - * for nodes that are actually representatives of {@link yfiles.graph.IPort}s at {@link yfiles.graph.IEdge}s. Also the {@link yfiles.algorithms.IDataProvider#get} - * method will yield the corresponding original {@link yfiles.graph.IEdge}. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static PORT_DUMMY_NODE_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Sets or yields the original {@link yfiles.graph.IGraph} instance that is adapted by this instance. - *

- * Before performing a layout, this property must be set or the adapter must have been created with - * {@link yfiles.layout.LayoutGraphAdapter#LayoutGraphAdapter}. Note that this property cannot be assigned again if its value is - * already non null. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the value of this property is already non null - * @type {yfiles.graph.IGraph} - */ - adaptedGraph:yfiles.graph.IGraph; - /** - * Gets or sets the {@link yfiles.view.ISelectionModel.} to use for the automatically registered {@link yfiles.algorithms.IDataProvider} instances for the keys {@link yfiles.layout.LayoutKeys#AFFECTED_NODES_DP_KEY} - * and {@link yfiles.layout.LayoutKeys#AFFECTED_EDGES_DP_KEY}. - * @type {yfiles.view.ISelectionModel.} - */ - selectionModel:yfiles.view.ISelectionModel; - /** - * Gets or sets the size of the nodes that are inserted for the ports that are created for {@link yfiles.graph.IEdge}s that are - * connected at other {@link yfiles.graph.IEdge}s. - *

- * If this instance is configured to create dummy nodes for ports at edges, this will be the initial size of the dummy - * nodes with the center of the node always being the location of the port. The default is 3x3. - *

- * @see yfiles.layout.LayoutGraphAdapter#hideEdgesAtEdges - * @type {yfiles.geometry.Size} - */ - edgePortNodeSize:yfiles.geometry.Size; - /** - * Determines whether edges at other edges will be hidden from the layout graph or included. - *

- * If this property is set to true, edges at other edges are simply ignored and not part of the layout graph. The default - * is false in which case dummy nodes are inserted into the layout graph for each source and target port of an {@link yfiles.graph.IEdge} - * that is {@link yfiles.graph.IPort#owner owned} by an {@link yfiles.graph.IEdge}. - *

- * @see yfiles.layout.LayoutGraphAdapter#edgePortNodeSize - * @type {boolean} - */ - hideEdgesAtEdges:boolean; - /** - * Controls whether edge groups are automatically created for edges that are connected to the same port. - *

- * If this property is enabled and no edge groups are explicitly created ({@link yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY} - * and {@link yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY}), for all ports with multiple outgoing resp. incoming edges - * these edges will be assigned to the same edge group. The necessary - * {@link yfiles.algorithms.IDataProvider}s will be created automatically. - *

- *

- * This features requires edge group support from the {@link yfiles.layout.ILayoutAlgorithm}. - *

- *

- * Default value is true - *

- * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @see yfiles.layout.LayoutExecutor#automaticEdgeGrouping - * @see yfiles.layout.LayoutGraphAdapter#fixPorts - * @type {boolean} - */ - automaticEdgeGrouping:boolean; - /** - * Controls whether strong port constraints are automatically created. - *

- * If this property is enabled and no port constraints are explicitly created ({@link yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY} - * and {@link yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY}), for all edges strong source and target point - * constraints with {@link yfiles.layout.PortSide#ANY} are created. The necessary - * {@link yfiles.algorithms.IDataProvider}s will be created automatically. - *

- *

- * This ensures that view {@link yfiles.graph.IPort}s are not moved during the layout, if the {@link yfiles.layout.ILayoutAlgorithm} - * supports port constraints. - *

- *

- * Default value is false - *

- * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @see yfiles.layout.LayoutExecutor#fixPorts - * @see yfiles.layout.LayoutGraphAdapter#automaticEdgeGrouping - * @type {boolean} - */ - fixPorts:boolean; - /** - * - * @type {Array.} - */ - dataProviderKeys:any[]; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.LayoutGraphAdapter; - } - /** - * Specifies a {@link yfiles.layout.PartitionGrid} for a layout. - *

- * The {@link yfiles.layout.PartitionCellId} mapping has to be specified by either setting the {@link yfiles.layout.PartitionGridData#cellIds} property, or either or both of the - * {@link yfiles.layout.PartitionGridData#rowIndices} and {@link yfiles.layout.PartitionGridData#columnIndices} properties. When {@link yfiles.layout.PartitionGridData#cellIds} is set, the {@link yfiles.layout.PartitionGridData#grid} property must be set as well. Otherwise the size of the grid may be induced by the - * maximum row and column indices returned by {@link yfiles.layout.PartitionGridData#rowIndices} and {@link yfiles.layout.PartitionGridData#columnIndices}. - *

- *

- * Note that cell spanning is only supported using the {@link yfiles.layout.PartitionGridData#cellIds}. - *

- * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface PartitionGridData extends yfiles.layout.LayoutData{} - export class PartitionGridData { - constructor(); - /** - * Gets or sets the partition grid. - * @see yfiles.layout.PartitionGrid#PARTITION_GRID_DP_KEY - * @type {yfiles.layout.PartitionGrid} - */ - grid:yfiles.layout.PartitionGrid; - /** - * Gets or sets the mapping from nodes to {@link yfiles.layout.PartitionCellId} using the partition grid as context. - * @type {yfiles.layout.ContextItemMapping.} - */ - cellIds:yfiles.layout.ContextItemMapping; - /** - * Gets or sets the mapping from nodes to the index of their rows. - * @type {yfiles.layout.ItemMapping.} - */ - rowIndices:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to the index of their columns. - * @type {yfiles.layout.ItemMapping.} - */ - columnIndices:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.PartitionGridData; - } - /** - * Specifies custom data for the {@link yfiles.layout.PartitionLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface PartitionLayoutData extends yfiles.layout.LayoutData{} - export class PartitionLayoutData { - constructor(); - /** - * Gets or sets a mapping from edges to their source {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourcePortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their target {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetPortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to a collection of their source port {@link yfiles.layout.PortCandidate candidates}. - * @see yfiles.layout.PortCandidate#SOURCE_PORT_CANDIDATE_COLLECTION_DP_KEY - * @type {yfiles.layout.ItemMapping.>} - */ - sourcePortCandidates:yfiles.layout.ItemMapping>; - /** - * Gets or sets a mapping from edges to a collection of their target port {@link yfiles.layout.PortCandidate candidates}. - * @see yfiles.layout.PortCandidate#TARGET_PORT_CANDIDATE_COLLECTION_DP_KEY - * @type {yfiles.layout.ItemMapping.>} - */ - targetPortCandidates:yfiles.layout.ItemMapping>; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.PartitionLayoutData; - } - /** - * Specifies custom data for the {@link yfiles.layout.RecursiveGroupLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface RecursiveGroupLayoutData extends yfiles.layout.LayoutData{} - export class RecursiveGroupLayoutData { - constructor(); - /** - * Gets or sets the mapping from group nodes to the {@link yfiles.layout.ILayoutAlgorithm} used for their child nodes. - * @see yfiles.layout.RecursiveGroupLayout#GROUP_NODE_LAYOUT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - groupNodeLayouts:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their {@link yfiles.layout.NodeHalo}. - * @see yfiles.layout.NodeHalo#NODE_HALO_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeHalos:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges connecting to group nodes to source split ids. - *

- * Edges will be aligned with edges that connect to the same group node and have the same split id at their source - * (preferably) or target. - *

- * @see yfiles.layout.RecursiveGroupLayout#SOURCE_SPLIT_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourceSplitIds:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges connecting to group nodes to target split ids. - *

- * Edges will be aligned with edges that connect to the same group node and have the same split id at their source or - * target (preferably). - *

- * @see yfiles.layout.RecursiveGroupLayout#TARGET_SPLIT_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetSplitIds:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their source {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourcePortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their target {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetPortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to a collection of their source port {@link yfiles.layout.PortCandidate candidates}. - * @see yfiles.layout.PortCandidate#SOURCE_PORT_CANDIDATE_COLLECTION_DP_KEY - * @type {yfiles.layout.ItemMapping.>} - */ - sourcePortCandidates:yfiles.layout.ItemMapping>; - /** - * Gets or sets a mapping from edges to a collection of their target port {@link yfiles.layout.PortCandidate candidates}. - * @see yfiles.layout.PortCandidate#TARGET_PORT_CANDIDATE_COLLECTION_DP_KEY - * @type {yfiles.layout.ItemMapping.>} - */ - targetPortCandidates:yfiles.layout.ItemMapping>; - /** - * Gets or sets a mapping from nodes to their {@link yfiles.layout.PortCandidateSet}. - * @see yfiles.layout.PortCandidateSet#NODE_PORT_CANDIDATE_SET_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodePortCandidateSets:yfiles.layout.ItemMapping; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.RecursiveGroupLayoutData; - } - /** - * Specifies custom data for the {@link yfiles.layout.ReverseEdgesStage}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface ReverseEdgesStageData extends yfiles.layout.LayoutData{} - export class ReverseEdgesStageData { - constructor(); - /** - * Gets or sets the collection of affected edges. - * @see yfiles.layout.ReverseEdgesStage#AFFECTED_EDGES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - affectedEdges:yfiles.layout.ItemCollection; - /** - * Gets or sets a mapping from edges to their source {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourcePortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their target {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetPortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to an object representing their source edge group. - * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourceGroupIds:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to an object representing their target edge group. - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetGroupIds:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.ReverseEdgesStageData; - } - /** - * Provides different ways to define the items in a collection for use with - * {@link yfiles.layout.LayoutData}, especially if the collection contains only one item. - *

- * Only one of the provided ways to define a collection can be used at the same time, therefore only one of the properties - * {@link yfiles.layout.SingleItemCollection.#item}, {@link yfiles.layout.ItemCollection.#items}, {@link yfiles.layout.ItemCollection.#mapper}, and {@link yfiles.layout.ItemCollection.#delegate} should be set on each instance. - *

- *

- * This class supports {@link yfiles.layout.LayoutData} implementations and does not usually have to be used explicitly. - *

- * Type parameter V: The type of the items in the collection. - * @class - * @extends {yfiles.layout.ItemCollection.} - * @template V - */ - export interface SingleItemCollection extends yfiles.layout.ItemCollection{} - export class SingleItemCollection { - constructor(); - /** - * Gets or sets the single item this item collection contains. - * @type {V} - */ - item:V; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.SingleItemCollection; - } - /** - * Creates a {@link yfiles.layout.PartitionGrid} that matches a given table configuration of an {@link yfiles.graph.IGraph} and registers {@link yfiles.collections.IMapper.} - * for that grid at the graph. - *

- * Typically, this class is used as part of the convenience class {@link yfiles.layout.LayoutExecutor} to {@link yfiles.layout.TableLayoutConfigurator#prepare} - * a partition grid before the layout is calculated and {@link yfiles.layout.TableLayoutConfigurator#restore} the graph - * afterwards. - *

- * @class - */ - export interface TableLayoutConfigurator extends yfiles.lang.Object{} - export class TableLayoutConfigurator { - /** - * Destroy all information that results from a previous {@link yfiles.layout.TableLayoutConfigurator#prepare} and a subsequent - * layout - * @param graph - */ - cleanUp(graph:yfiles.graph.IGraph):void; - /** - * Return the sizes of all leaf rows. - *

- * This method does not modify originalTable. You also need to call {@link yfiles.layout.TableLayoutConfigurator#cleanUp} - * explicitly if you don't need the {@link yfiles.layout.TableLayoutConfigurator} anymore. - *

- * @param originalTable The table - * @param nodeLayout The final layout of the node that owns the table - * @returns The sizes of all leaf rows in originalTable, in their natural order. - */ - getColumnLayout(originalTable:yfiles.graph.ITable,nodeLayout:yfiles.geometry.Rect):number[]; - /** - * Return the sizes of all leaf rows. - *

- * This method does not modify originalTable. You also need to call {@link yfiles.layout.TableLayoutConfigurator#cleanUp} - * explicitly if you don't need the {@link yfiles.layout.TableLayoutConfigurator} anymore. - *

- * @param originalTable The table - * @param nodeLayout The final layout of the node that owns the table - * @returns The sizes of all leaf rows in originalTable, in their natural order. - */ - getRowLayout(originalTable:yfiles.graph.ITable,nodeLayout:yfiles.geometry.Rect):number[]; - /** - * Setup partition grid information from a graph that contains table structures - * @param graph - */ - prepare(graph:yfiles.graph.IGraph):void; - /** - * Write back all information from the partition grid - * @param graph - */ - restore(graph:yfiles.graph.IGraph):void; - /** - * Gets or sets the minimum distance between two different table nodes - * @type {number} - */ - minimumTableDistance:number; - /** - * Specifies whether or not to enable size compaction for table nodes. - *

- * If size compaction is enabled, the size of a column or row (or a table node for that matter) may be reduced due to - * layout calculation, but never below the column's or row's minimum size. If size compaction is disabled, columns and rows - * (and therefore table nodes) may only grow due to layout calculation. - *

- *

- * The default value for this property is true. - *

- * @type {boolean} - */ - compaction:boolean; - /** - * Gets or sets whether the configurator will prepare its associated graph for a vertical (that is top-to-bottom or - * bottom-to-top) layout calculation or a horizontal (that is left-to-right or right-to-left) one. - *

- * The default value for this property is false. - *

- * @type {boolean} - */ - horizontalLayout:boolean; - /** - * Specifies whether or not from sketch mode should be enabled. - *

- * If enabled, the positions of the table group nodes are considered, i.e., for horizontal layout configuration these nodes - * are sorted according to their y-coordinate and for vertical layout configuration according to their x-coordinate. - *

- * @type {boolean} - */ - fromSketch:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.TableLayoutConfigurator; - } - /** - * Converts an {@link yfiles.graph.IGraph} instance into a {@link yfiles.algorithms.Graph} instance. - *

- * This class creates a structural copy of a given {@link yfiles.graph.IGraph} and provides convenience methods to convert items - * from one graph instance to their corresponding item in the other graph instance. - *

- *

- * The main use case of this class is executing one of the analysis algorithms on an {@link yfiles.graph.IGraph}, for example - * {@link yfiles.algorithms.ShortestPaths}, {@link yfiles.algorithms.Cycles}, and {@link yfiles.algorithms.Centrality}. For executing a layout - * algorithm, use the convenience class {@link yfiles.layout.LayoutExecutor}, the convenience methods {@link yfiles.graph.IGraph#applyLayout} - * and MorphLayout, or {@link yfiles.layout.LayoutGraphAdapter}. - *

- * @see yfiles.layout.LayoutGraphAdapter - * @see yfiles.layout.LayoutExecutor - * @see yfiles.algorithms.Bipartitions - * @see yfiles.algorithms.Centrality - * @see yfiles.algorithms.Cycles - * @see yfiles.algorithms.GraphChecker - * @see yfiles.algorithms.GraphConnectivity - * @see yfiles.algorithms.Groups - * @see yfiles.algorithms.IndependentSets - * @see yfiles.algorithms.NetworkFlows - * @see yfiles.algorithms.NodeOrders - * @see yfiles.algorithms.Paths - * @see yfiles.algorithms.RankAssignments - * @see yfiles.algorithms.ShortestPaths - * @see yfiles.algorithms.SpanningTrees - * @see yfiles.algorithms.Transitivity - * @see yfiles.algorithms.Trees - * @class - */ - export interface YGraphAdapter extends yfiles.lang.Object{} - export class YGraphAdapter { - /** - * Initializes a new instance of the {@link yfiles.layout.YGraphAdapter} class. - *

- * This will create a copy of the originalGraph that has the same structure and makes it available via the {@link yfiles.layout.YGraphAdapter#yGraph} property. - *

- * @param originalGraph The original graph whose structure will be copied. - */ - constructor(originalGraph:yfiles.graph.IGraph); - /** - * Creates an {@link yfiles.algorithms.IDataMap} that delegates to the provided {@link yfiles.collections.IMapper.} when queried for items in the {@link yfiles.layout.YGraphAdapter#yGraph}. - *

- * This method is useful where algorithms require {@link yfiles.algorithms.IDataMap}s as input and that input can be obtained from - * {@link yfiles.collections.IMapper.} instances that provide and accept values for the {@link yfiles.layout.YGraphAdapter#getOriginalNode original nodes} and {@link yfiles.layout.YGraphAdapter#getOriginalEdge edges}. - *

- * Type parameter K: The type of the keys in the mapper. - * Type parameter V: The type of the values in the mapper. - * @param valueType The type of the values in the mapper. - * @param keyType The type of the keys in the mapper. - * @param mapper The mapper to direct requests to. - * @returns An {@link } that will delegate the functionality to the mapper. - * @see yfiles.layout.YGraphAdapter#createDataProvider - * @template K,V - */ - createDataMap(keyType:yfiles.lang.Class,valueType:yfiles.lang.Class,mapper:yfiles.collections.IMapper):yfiles.algorithms.IDataMap; - /** - * Creates an {@link yfiles.algorithms.IDataProvider} that delegates to the provided delegate when queried for items in the {@link yfiles.layout.YGraphAdapter#yGraph}. - *

- * This method is useful where algorithms require {@link yfiles.algorithms.IDataProvider}s as input and that input can be through a - * dynamic callback that provides the values for the {@link yfiles.layout.YGraphAdapter#getOriginalNode original nodes} and {@link yfiles.layout.YGraphAdapter#getOriginalEdge edges}. - *

- * Type parameter K: The type of the keys in the mapper. - * Type parameter V: The type of the values in the mapper. - * @param valueType The type of the values in the mapper. - * @param keyType The type of the keys in the mapper. - * @param getter The mapper delegate to direct requests to. - * @returns A DataProvider that will delegate requests to the getter. - * @template K,V - */ - createDataProvider(keyType:yfiles.lang.Class,valueType:yfiles.lang.Class,getter:(key:K)=>V):yfiles.algorithms.IDataProvider; - /** - * Creates an {@link yfiles.algorithms.IDataProvider} that delegates to the provided {@link yfiles.collections.IMapper.} when queried for items in the {@link yfiles.layout.YGraphAdapter#yGraph}. - *

- * This method is useful where algorithms require {@link yfiles.algorithms.IDataProvider}s as input and that input can be obtained - * from {@link yfiles.collections.IMapper.} instances that provide the values for the {@link yfiles.layout.YGraphAdapter#getOriginalNode original nodes} and {@link yfiles.layout.YGraphAdapter#getOriginalEdge edges}. - *

- * Type parameter K: The type of the keys in the mapper. - * Type parameter V: The type of the values in the mapper. - * @param valueType The type of the values in the mapper. - * @param keyType The type of the keys in the mapper. - * @param mapper The mapper to direct requests to. - * @returns A DataProvider that will delegate requests to the mapper. - * @template K,V - */ - createDataProvider(keyType:yfiles.lang.Class,valueType:yfiles.lang.Class,mapper:yfiles.collections.IMapper):yfiles.algorithms.IDataProvider; - /** - * Creates an {@link yfiles.collections.IEnumerable. enumerable of edges} that maps the edges from the {@link yfiles.algorithms.EdgeList} to their {@link yfiles.layout.YGraphAdapter#getOriginalEdge original} ones. - *

- * This method is useful where algorithms yield {@link yfiles.algorithms.EdgeList} instances as results and the result needs to be - * interpreted in terms of the {@link yfiles.layout.YGraphAdapter#originalGraph}. - *

- * @param edges The edge list. - * @returns An enumerable that contains the {@link #getOriginalEdge original} edges for the ones in the list. - */ - createEdgeEnumerable(edges:yfiles.algorithms.EdgeList):yfiles.collections.IListEnumerable; - /** - * Creates an {@link yfiles.algorithms.EdgeList} that maps the edges from the {@link yfiles.collections.IEnumerable.} to their {@link yfiles.layout.YGraphAdapter#getCopiedEdge copied} ones. - *

- * This method is useful where algorithms require {@link yfiles.algorithms.EdgeList} instances as input and those edges are - * available as {@link yfiles.collections.IEnumerable.}s in the {@link yfiles.layout.YGraphAdapter#originalGraph}. - *

- * @param edges The edges from the {@link #originalGraph}. - * @returns An {@link } that contains the {@link #getCopiedEdge copied} edges for the ones in the enumerable. - */ - createEdgeList(edges:yfiles.collections.IEnumerable):yfiles.algorithms.EdgeList; - /** - * Creates an {@link yfiles.algorithms.IEdgeMap} that delegates to the provided delegate when queried for {@link yfiles.algorithms.Edge}s - * in the {@link yfiles.layout.YGraphAdapter#yGraph}. - *

- * This method is useful where algorithms require {@link yfiles.algorithms.IEdgeMap}s as input and this can be mapped to a - * corresponding dynamic callback that provides the values for the {@link yfiles.layout.YGraphAdapter#getOriginalEdge original edges}. - *

- * Type parameter V: The type of the values in the mapper. - * @param getter The mapper delegate to direct read requests to. - * @returns An {@link } that will delegate reads to the getter. - * @template V - */ - createEdgeMap(getter:(key:yfiles.graph.IEdge)=>V):yfiles.algorithms.IEdgeMap; - /** - * Creates an {@link yfiles.algorithms.IEdgeMap} that delegates to the provided {@link yfiles.collections.IMapper.} when queried for {@link yfiles.algorithms.Edge}s in the {@link yfiles.layout.YGraphAdapter#yGraph}. - *

- * This method is useful where algorithms require {@link yfiles.algorithms.IEdgeMap}s as input and this can be mapped to - * corresponding {@link yfiles.collections.IMapper.} instances that provide and accept the values for the {@link yfiles.layout.YGraphAdapter#getOriginalEdge original edges}. - *

- * Type parameter V: The type of the values in the mapper. - * @param mapper The mapper to direct requests to. - * @returns An {@link } that will delegate reads and writes to the mapper. - * @template V - */ - createEdgeMap(mapper:yfiles.collections.IMapper):yfiles.algorithms.IEdgeMap; - /** - * Creates an {@link yfiles.collections.IMapper.} that delegates to the provided {@link yfiles.algorithms.INodeMap} when queried for items in the - * {@link yfiles.graph.IGraph}. - *

- * This method is useful where algorithms yield {@link yfiles.algorithms.INodeMap}s and their values should be provided using {@link yfiles.collections.IMapper.} - * instances that use the {@link yfiles.layout.YGraphAdapter#getOriginalNode original nodes}. - *

- * Type parameter T: The type of the values in the mapper. - * @param nodeMap The map to direct requests to. - * @returns A mapper that will delegate requests to the nodeMap. - * @template T - */ - createEdgeMapper(nodeMap:yfiles.algorithms.INodeMap):yfiles.collections.IMapper; - /** - * Creates an {@link yfiles.collections.IMapper.} that delegates to the provided {@link yfiles.algorithms.IDataProvider} when queried for items in the - * {@link yfiles.graph.IGraph}. - *

- * This method is useful where algorithms yield {@link yfiles.algorithms.IDataProvider}s and their values should be provided using - * {@link yfiles.collections.IMapper.} instances that use the {@link yfiles.layout.YGraphAdapter#getOriginalEdge original edges} and the {@link yfiles.layout.YGraphAdapter#getOriginalNode original nodes}. - *

- * Type parameter T: The type of the values in the mapper. - * @param dataProvider The provider to direct requests to. - * @returns A mapper that will delegate requests to the dataProvider. - * @template T - */ - createMapper(dataProvider:yfiles.algorithms.IDataProvider):yfiles.collections.IMapper; - /** - * Creates an {@link yfiles.collections.IEnumerable. enumerable of nodes} that maps the nodes from the {@link yfiles.algorithms.NodeList} to their {@link yfiles.layout.YGraphAdapter#getOriginalNode original} ones. - *

- * This method is useful where algorithms yield {@link yfiles.algorithms.NodeList} instances as results and the result needs to be - * interpreted in terms of the {@link yfiles.layout.YGraphAdapter#originalGraph}. - *

- * @param nodes The node list. - * @returns An enumerable that contains the {@link #getOriginalNode original} nodes for the ones in the list. - */ - createNodeEnumerable(nodes:yfiles.algorithms.NodeList):yfiles.collections.IListEnumerable; - /** - * Creates a {@link yfiles.algorithms.NodeList} that maps the nodes from the {@link yfiles.collections.IEnumerable.} to their {@link yfiles.layout.YGraphAdapter#getCopiedNode copied} ones. - *

- * This method is useful where algorithms require {@link yfiles.algorithms.NodeList} instances as input and those nodes are - * available as {@link yfiles.collections.IEnumerable.}s in the {@link yfiles.layout.YGraphAdapter#originalGraph}. - *

- * @param nodes The nodes from the {@link #originalGraph}. - * @returns A {@link } that contains the {@link #getCopiedNode copied} nodes for the ones in the enumerable. - */ - createNodeList(nodes:yfiles.collections.IEnumerable):yfiles.algorithms.NodeList; - /** - * Creates an {@link yfiles.algorithms.INodeMap} that delegates to the provided delegate when queried for {@link yfiles.algorithms.Node}s - * in the {@link yfiles.layout.YGraphAdapter#yGraph}. - *

- * This method is useful where algorithms require {@link yfiles.algorithms.INodeMap}s as input and this can be mapped to a - * corresponding dynamic callback that provides the values for the {@link yfiles.layout.YGraphAdapter#getOriginalNode original nodes}. - *

- * Type parameter V: The type of the values in the mapper. - * @param getter The mapper delegate to direct read requests to. - * @returns An {@link } that will delegate reads to the getter. - * @template V - */ - createNodeMap(getter:(key:yfiles.graph.INode)=>V):yfiles.algorithms.INodeMap; - /** - * Creates an {@link yfiles.algorithms.INodeMap} that delegates to the provided {@link yfiles.collections.IMapper.} when queried for {@link yfiles.algorithms.Node}s in the {@link yfiles.layout.YGraphAdapter#yGraph}. - *

- * This method is useful where algorithms require {@link yfiles.algorithms.INodeMap}s as input and this can be mapped to - * corresponding {@link yfiles.collections.IMapper.} instances that provide and accept the values for the {@link yfiles.layout.YGraphAdapter#getOriginalNode original nodes}. - *

- * Type parameter V: The type of the values in the mapper. - * @param mapper The mapper to direct requests to. - * @returns An {@link } that will delegate reads and writes to the mapper. - * @template V - */ - createNodeMap(mapper:yfiles.collections.IMapper):yfiles.algorithms.INodeMap; - /** - * Creates an {@link yfiles.collections.IMapper.} that delegates to the provided {@link yfiles.algorithms.IEdgeMap} when queried for items in the - * {@link yfiles.graph.IGraph}. - *

- * This method is useful where algorithms yield {@link yfiles.algorithms.IDataProvider}s and their values should be provided using - * {@link yfiles.collections.IMapper.} instances that use the {@link yfiles.layout.YGraphAdapter#getOriginalEdge original edges}. - *

- * Type parameter T: The type of the values in the mapper. - * @param edgeMap The map to direct requests to. - * @returns A mapper that will delegate requests to the edgeMap. - * @template T - */ - createNodeMapper(edgeMap:yfiles.algorithms.IEdgeMap):yfiles.collections.IMapper; - /** - * Yields the edge that has been created as a copy in {@link yfiles.layout.YGraphAdapter#yGraph} to represent the given edge. - * @param edge The edge for which the representation is returned. - * @returns The edge that represents edge in {@link #yGraph}. - */ - getCopiedEdge(edge:yfiles.graph.IEdge):yfiles.algorithms.Edge; - /** - * Yields the node that has been created as a copy in {@link yfiles.layout.YGraphAdapter#yGraph} to represent the given node. - * @param node The node for which the representation is returned. - * @returns The node that represents node in {@link #yGraph}. - */ - getCopiedNode(node:yfiles.graph.INode):yfiles.algorithms.Node; - /** - * Yields the original edge from the {@link yfiles.layout.YGraphAdapter#originalGraph original IGraph} that the given edge has been created for. - * @param edge The edge for which the original instance will be returned. - * @returns The original instance. - */ - getOriginalEdge(edge:yfiles.algorithms.Edge):yfiles.graph.IEdge; - /** - * Yields the original node from the {@link yfiles.layout.YGraphAdapter#originalGraph original IGraph} that the given node has been created for. - * @param node The node for which the original instance will be returned. - * @returns The original instance. - */ - getOriginalNode(node:yfiles.algorithms.Node):yfiles.graph.INode; - /** - * Gets the graph instance that is created during the constructor call. - * @type {yfiles.algorithms.Graph} - */ - yGraph:yfiles.algorithms.Graph; - /** - * Gets the original graph instance. - * @type {yfiles.graph.IGraph} - */ - originalGraph:yfiles.graph.IGraph; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.layout.YGraphAdapter; - } - }export namespace hierarchic{ - /** - * This interface describes a layering constraint. - *

- * Such constraints can be given as additional input to the {@link yfiles.hierarchic.HierarchicLayout}. - *

- * @see yfiles.hierarchic.ILayerConstraintFactory - * @interface - */ - export interface ILayerConstraint extends yfiles.lang.Object{ - /** - * Gets or sets the priority of a constraint. - *

- * This value is used for resolving conflicting constraints. A constraint with a higher priority is more likely to be - * considered. - *

- *

- * The priority has to be greater than 0. - *

- * @abstract - * @type {number} - */ - priority:number; - } - var ILayerConstraint:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.ILayerConstraint; - }; - /** - * This interface provides methods for creating layering constraints. - * @interface - */ - export interface ILayerConstraintFactory extends yfiles.lang.Object{ - /** - * Adds a constraint that forces the {@link yfiles.algorithms.Node} with ID aboveId to lie at least minDistance layers above the {@link yfiles.algorithms.Node} - * with ID referenceId with a given weight penalty for larger layer differences. - *

- * The minimum distance includes potentially empty layers that are removed by the {@link yfiles.hierarchic.ILayerer} instance. In - * that case, the actual layer difference may be smaller than the minimum distance. - *

- * @param referenceId the ID of the reference node - * @param aboveId the ID of the node that should lie above - * @param minDistance the minimum layer distance between the node and its reference node - * @param [weight=0] the weight penalty for larger layer differences - * @returns a {@link } object that represents the constraint - * @see yfiles.hierarchic.ILayerConstraint - * @abstract - */ - addPlaceNodeAboveConstraint(referenceId:any,aboveId:any,minDistance:number,weight?:number):yfiles.hierarchic.ILayerConstraint; - /** - * Adds a constraint that forces the {@link yfiles.algorithms.Node} with ID aboveId to lie above the {@link yfiles.algorithms.Node} with ID - * referenceId. - * @param referenceId the ID of the reference node - * @param aboveId the ID of the node that should lie above - * @returns a {@link } object that represents the constraint - * @see yfiles.hierarchic.ILayerConstraint - * @abstract - */ - addPlaceNodeAboveConstraint(referenceId:any,aboveId:any):yfiles.hierarchic.ILayerConstraint; - /** - * Adds a constraint that places a {@link yfiles.algorithms.Node} on the bottom layer. - * @param nodeId the ID of the node that should lie on the bottom layer - * @returns a {@link } object that represents the constraint - * @see yfiles.hierarchic.ILayerConstraint - * @abstract - */ - addPlaceNodeAtBottomConstraint(nodeId:any):yfiles.hierarchic.ILayerConstraint; - /** - * Adds a constraint that places a {@link yfiles.algorithms.Node} on the topmost layer. - * @param nodeId the ID of the node that should lie on the top layer - * @returns a {@link } object that represents the constraint - * @see yfiles.hierarchic.ILayerConstraint - * @abstract - */ - addPlaceNodeAtTopConstraint(nodeId:any):yfiles.hierarchic.ILayerConstraint; - /** - * Adds a constraint that forces the {@link yfiles.algorithms.Node} with ID belowId to lie at least minDistance layers below the {@link yfiles.algorithms.Node} - * with ID referenceId with a given weight penalty for larger layer differences. - *

- * The minimum distance includes potentially empty layers that are removed by the {@link yfiles.hierarchic.ILayerer} instance. In - * that case, the actual layer difference may be smaller than the minimum distance. - *

- * @param referenceId the ID of the reference node - * @param belowId the ID of the node that should lie below - * @param minDistance the minimum layer distance between the node and its reference node - * @param [weight=0] the weight penalty for larger layer differences - * @returns a {@link } object that represents the constraint - * @see yfiles.hierarchic.ILayerConstraint - * @abstract - */ - addPlaceNodeBelowConstraint(referenceId:any,belowId:any,minDistance:number,weight?:number):yfiles.hierarchic.ILayerConstraint; - /** - * Adds a constraint that forces a {@link yfiles.algorithms.Node} with ID belowId to lie below the {@link yfiles.algorithms.Node} with ID - * referenceId. - * @param referenceId the ID of the reference node - * @param belowId the ID of the node that should lie below - * @returns a {@link } object that represents the constraint - * @see yfiles.hierarchic.ILayerConstraint - * @abstract - */ - addPlaceNodeBelowConstraint(referenceId:any,belowId:any):yfiles.hierarchic.ILayerConstraint; - /** - * Adds a constraint that forces the {@link yfiles.algorithms.Node} with ID sameLayerId to lie in the same layer as the {@link yfiles.algorithms.Node} - * with ID referenceId. - * @param referenceId the ID of the reference node - * @param sameLayerId the ID of the node that should lie in the same layer - * @returns a {@link } object that represents the constraint - * @see yfiles.hierarchic.ILayerConstraint - * @abstract - */ - addPlaceNodeInSameLayerConstraint(referenceId:any,sameLayerId:any):yfiles.hierarchic.ILayerConstraint; - /** - * Disposes this factory. - *

- * This method should be called when this factory is not needed anymore, i.e. after the layout has been calculated. Calling - * this method also clears all constraints. - *

- * @abstract - */ - dispose():void; - /** - * Clears all constraints for a given {@link yfiles.algorithms.Node}. - * @param nodeId the ID of the node for which all constraints should be cleared - * @see yfiles.hierarchic.ILayerConstraint - * @abstract - */ - removeConstraints(nodeId:any):void; - /** - * Gets a token that allows to bind a constraint factory to a graph instance after creation. - *

- * This method should only be used if the constraint factory is not bound to a graph instance initially. It allows to bind - * this factory to a graph instance after creation. See the factory methods that create instances of this interface for a - * description. - *

- * @see yfiles.hierarchic.HierarchicLayout#createLayerConstraintFactory - * @abstract - * @type {any} - */ - memento:any; - } - var ILayerConstraintFactory:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.ILayerConstraintFactory; - }; - /** - * This interface specifies the general contract for factory classes that can be used to associate sequence constraints - * with a graph. - *

- * Sequence constraints affect the sequence of nodes within a {@link yfiles.hierarchic.ILayer layer}. - *

- *

- * A {@link yfiles.hierarchic.ISequenceConstraintFactory} has to be {@link yfiles.hierarchic.ISequenceConstraintFactory#dispose disposed of} after use. Disposing of the factory will also - * remove all constraints previously specified for the factory's associated graph. - *

- * @interface - */ - export interface ISequenceConstraintFactory extends yfiles.lang.Object{ - /** - * Adds a constraint that forces the {@link yfiles.algorithms.Node} or {@link yfiles.algorithms.Edge} with id after to lie after the {@link yfiles.algorithms.Node} - * or {@link yfiles.algorithms.Edge} with id reference. - * @param referenceId the ID of the reference node or edge - * @param afterId the ID of the node or edge that should be placed after the reference element - * @abstract - */ - addPlaceAfterConstraint(referenceId:any,afterId:any):void; - /** - * Adds a constraint that places a {@link yfiles.algorithms.Node} or {@link yfiles.algorithms.Edge} at the start of the sequence. - * @param id the ID of the node or edge that should be placed at the start - * @abstract - */ - addPlaceAtHeadConstraint(id:any):void; - /** - * Adds a constraint that places a {@link yfiles.algorithms.Node} or {@link yfiles.algorithms.Edge} at the end of the sequence. - * @param id the ID of the node or edge that should be placed at the end - * @abstract - */ - addPlaceAtTailConstraint(id:any):void; - /** - * Adds a constraint that forces the {@link yfiles.algorithms.Node} or {@link yfiles.algorithms.Edge} with id before to lie before the {@link yfiles.algorithms.Node} - * or {@link yfiles.algorithms.Edge} with id reference. - * @param referenceId the ID of the reference node or edge - * @param beforeId the ID of the node or edge that should be placed before the reference element - * @abstract - */ - addPlaceBeforeConstraint(referenceId:any,beforeId:any):void; - /** - * Disposes of the {@link yfiles.hierarchic.ISequenceConstraintFactory}. - *

- * This method should be called when the factory is not needed anymore, i.e. after the layout has been calculated. Calling - * this method also clears all constraints. - *

- * @abstract - */ - dispose():void; - /** - * Gets a token that allows to bind a constraint factory to a graph instance after creation. - *

- * This method should only be used if the constraint factory is not bound to a graph instance initially. It allows to bind - * this factory to a graph instance after creation. - *

- * @see yfiles.hierarchic.HierarchicLayoutCore#createSequenceConstraintFactory - * @abstract - * @type {any} - */ - memento:any; - } - var ISequenceConstraintFactory:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.ISequenceConstraintFactory; - }; - /** - * {@link yfiles.hierarchic.AsIsLayerer} assigns nodes to layers by analyzing already existing node coordinates. - *

- * Nodes whose bounding boxes overlap in the main layout direction are assigned to the same layer. To influence to which - * amount the boxes need to overlap, the nodes can temporarily be - * {@link yfiles.hierarchic.AsIsLayerer#nodeScalingFactor scaled}. Alternatively, a minimum and maximum size or a halo can be specified for the nodes. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[1.64,133.62,[[11.31,157.97,10.67,18.7,"1"]]],[51.6,4.78,[[61.27,29.13,10.67,18.7,"2"]]],[190,14.75,[[199.66,39.1,10.67,18.7,"3"]]],[226.76,148.06,[[236.42,172.41,10.67,18.7,"4"]]],[108.72,221.62,[[118.38,245.97,10.67,18.7,"5"]]]],"e":[[0,1],[1,2],[3,2],[0,4],[4,3]],"vp":[1.0,4.0,256.0,248.0]}} - *

- *

- * Initial graph - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[20,50,[[29.66,74.35,10.67,18.7,"1"]]],[20,0,[[29.66,24.35,10.67,18.7,"2"]]],[100,0,[[109.66,24.35,10.67,18.7,"3"]]],[100,50,[[109.66,74.35,10.67,18.7,"4"]]],[60,110,[[69.66,134.35,10.67,18.7,"5"]]]],"e":[[0,1,0,-15,0,15],[1,2,15,0,-15,0],[3,2,0,-15,0,15],[0,4,0,15,-7.5,-15,[35,95,67.5,95]],[4,3,7.5,-15,0,15,[82.5,95,115,95]]],"vp":[20.0,0.0,110.0,140.0]}} - *

- *

- * Hierarchic layout when the initial drawing is used as sketch - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[50,0,[[59.66,24.35,10.67,18.7,"1"]]],[20,60,[[29.66,84.35,10.67,18.7,"2"]]],[27.5,170,[[37.16,194.35,10.67,18.7,"3"]]],[80,110,[[89.66,134.35,10.67,18.7,"4"]]],[80,60,[[89.66,84.35,10.67,18.7,"5"]]]],"e":[[0,1,-7.5,15,0,-15,[57.5,45,35,45]],[1,2,0,15,-7.5,-15],[3,2,0,15,7.5,-15,[95,155,50,155]],[0,4,7.5,15,0,-15,[72.5,45,95,45]],[4,3,0,15,0,-15]],"vp":[20.0,0.0,90.0,200.0]}} - *

- *

- * Hierarchic layout when the initial drawing is not used as sketch - *

- * @class - * @implements {yfiles.hierarchic.ILayerer} - */ - export interface AsIsLayerer extends yfiles.lang.Object,yfiles.hierarchic.ILayerer{} - export class AsIsLayerer { - /** - * Creates an instance of {@link yfiles.hierarchic.AsIsLayerer} with default settings. - */ - constructor(); - /** - * Assigns all nodes of the graph to layers by analyzing already existing node coordinates and adds them to the {@link yfiles.hierarchic.ILayers} - * instance. - *

- * Nodes whose bounding boxes overlap in the main layout direction are assigned to the same layer. To influence to which - * amount the boxes need to overlap, the nodes can temporarily be {@link yfiles.hierarchic.AsIsLayerer#nodeScalingFactor scaled}. - *

- * @param graph the input graph - * @param layers the {@link } instance that will be filled with the results of the calculation - * @param ldp the {@link } used for querying information about the nodes and edges - */ - assignLayers(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Callback used for calculating the lower (max) value of a given node. - * @param graph the graph - * @param node the node - * @returns the lower (max) of a given node - * @protected - */ - getMax(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node):number; - /** - * Callback used for calculating the upper (min) value of a given node. - * @param graph the graph - * @param node the node - * @returns the upper (min) value of a given node - * @protected - */ - getMin(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node):number; - /** - * Gets or sets the scaling factor used for scaling the size of the nodes. - *

- * Nodes are being scaled from their center. This can be used for more fuzzy layering. - *

- *

- * The scaling factor can take positive values. Factors smaller than 1 only consider large overlaps of the nodes' bounding - * boxes in the main layout direction. Factors larger than 1 also combine nodes with some distance between them. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified value is less than 0 - * @see yfiles.hierarchic.AsIsLayerer#minimumNodeSize - * @see yfiles.hierarchic.AsIsLayerer#maximumNodeSize - * @see yfiles.hierarchic.AsIsLayerer#nodeHalo - * @type {number} - */ - nodeScalingFactor:number; - /** - * Gets or sets the maximum size of a node used for calculating layer overlaps. - *

- * This can be used for more fuzzy layering. - *

- *

- * The maximum size can take positive values. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified value is less than 0 - * @see yfiles.hierarchic.AsIsLayerer#nodeScalingFactor - * @see yfiles.hierarchic.AsIsLayerer#nodeHalo - * @type {number} - */ - maximumNodeSize:number; - /** - * Gets or sets the minimum size of a node used for calculating layer overlaps. - *

- * This can be used for more fuzzy layering. - *

- *

- * The minimum size can take positive values. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified value is less than 0 - * @see yfiles.hierarchic.AsIsLayerer#nodeScalingFactor - * @see yfiles.hierarchic.AsIsLayerer#nodeHalo - * @type {number} - */ - minimumNodeSize:number; - /** - * Gets or sets the size of the halo around a node, that means the insets that are used for calculating layer overlaps. - *

- * If the value of the halo is positive, it specifies a border around a node. In case it is negative, it is considered as - * an inset that defines a smaller area inside the node. - *

- *

- * This can be used for more fuzzy layering. - *

- * @see yfiles.hierarchic.AsIsLayerer#nodeScalingFactor - * @see yfiles.hierarchic.AsIsLayerer#minimumNodeSize - * @see yfiles.hierarchic.AsIsLayerer#maximumNodeSize - * @type {number} - */ - nodeHalo:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.AsIsLayerer; - } - /** - * This class calculates the sequence of the nodes within each layer using the nodes' coordinates. - *

- * For {@link yfiles.layout.MultiStageLayout#layoutOrientation layout orientation} - * {@link yfiles.layout.LayoutOrientation#TOP_TO_BOTTOM}, the order corresponds to that obtain when sorting the nodes according to - * their x-coordinate. - *

- *

- * An instance of this class can be set to {@link yfiles.hierarchic.HierarchicLayout} using method {@link yfiles.hierarchic.HierarchicLayout#fixedElementsSequencer} and {@link yfiles.hierarchic.HierarchicLayout#fromScratchSequencer} respectively. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[111.8,0,[[121.47,24.35,10.67,18.7,"1"]]],[0,36.33,[[9.66,60.68,10.67,18.7,"2"]]],[180.9,95.11,[[190.56,119.46,10.67,18.7,"3"]]],[0,153.88,[[9.66,178.23,10.67,18.7,"4"]]],[111.8,190.21,[[121.47,214.56,10.67,18.7,"5"]]]],"e":[[0,1],[0,3],[1,3],[0,2],[2,4],[4,3]],"vp":[0.0,0.0,211.0,221.0]}} Initial graph that will be used as sketch {@graph {"ann":{"s":[30,30],"d":1},"n":[[50,0,[[59.66,24.35,10.67,18.7,"1"]]],[20,60,[[29.66,84.35,10.67,18.7,"2"]]],[80,100,[[89.66,124.35,10.67,18.7,"3"]]],[42.5,145,[[52.16,169.35,10.67,18.7,"4"]]],[72.5,205,[[82.16,229.35,10.67,18.7,"5"]]]],"e":[[0,1,-10,15,0,-15,[55,45,35,45]],[0,3,0,15,7.5,-15],[1,3,0,15,-7.5,-15,[35,130,50,130]],[0,2,10,15,0,-15,[75,45,95,45]],[2,4,0,15,7.5,-15],[4,3,-7.5,-15,0,15,[80,190,57.5,190]]],"vp":[20.0,0.0,90.0,235.0]}} Hierarchic layout when the initial graph is used as sketch - *

- * @class - * @implements {yfiles.hierarchic.ISequencer} - */ - export interface AsIsSequencer extends yfiles.lang.Object,yfiles.hierarchic.ISequencer{} - export class AsIsSequencer { - /** - * Creates a new {@link yfiles.hierarchic.AsIsSequencer} instance. - */ - constructor(); - /** - * Calculates the sequence of the nodes within each layer using the nodes' coordinates. - *

- * This method is called by {@link yfiles.hierarchic.HierarchicLayoutCore} and finally writes back the calculated sequence using - * method {@link yfiles.hierarchic.ILayer#setNodeOrder}. - *

- * @param graph the input graph - * @param layers the given {@link } instance that defines the layering structure - * @param ldp the {@link } containing information about the nodes and edges of the graph - * @param itemFactory the {@link } used for creating and destroying helper structures - */ - sequenceNodeLayers(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider,itemFactory:yfiles.hierarchic.IItemFactory):void; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.AsIsSequencer; - } - /** - * This class is a wrapper {@link yfiles.hierarchic.ILayerer} implementation that delegates the actual layering to a delegate {@link yfiles.hierarchic.ILayerer} - * object. - *

- * If the graph consists of multiple components, they will be identified and each of the components will be layered - * separately using the delegate {@link yfiles.hierarchic.ILayerer} instance. After that they will all be merged such that the - * desired aspect ratio is fulfilled best. - *

- *

- * {@graph {"ann":{"s":[60,30],"d":1},"styles":{"6":{"f":"#ccccff"}},"n":[[110,160],[20,160],[20,220],[110,220],[20,280],[252.5,160,6],[305,220,6],[380,280,6],[200,220,6],[290,280,6],[290,330,6],[380,330,6],[200,280,6],[27.5,0,180,80],[87.5,100]],"e":[[14,0,15,15,0,-15,[132.5,145,140,145]],[14,1,-15,15,0,-15,[102.5,145,50,145]],[1,2,0,15,0,-15],[0,3,0,15,0,-15],[2,4,0,15,0,-15],[5,6,15,15,0,-15,[297.5,205,335,205]],[6,7,15,15,0,-15,[350,265,410,265]],[5,8,-15,15,0,-15,[267.5,205,230,205]],[6,9,-15,15,0,-15],[9,10,0,15,0,-15],[7,11,0,15,0,-15],[8,12,0,15,0,-15],[13,14,0,40,0,-15]],"vp":[20.0,0.0,420.0,360.0]}} Sample output of {@link yfiles.hierarchic.AspectRatioComponentLayerer} with default settings on a graph with two connected - * components. - *

- * @see yfiles.hierarchic.AspectRatioComponentLayerer#desiredAspectRatio - * @see yfiles.hierarchic.MultiComponentLayerer - * @class - * @implements {yfiles.hierarchic.ILayerer} - */ - export interface AspectRatioComponentLayerer extends yfiles.lang.Object,yfiles.hierarchic.ILayerer{} - export class AspectRatioComponentLayerer { - /** - * Creates a new instance of {@link yfiles.hierarchic.AspectRatioComponentLayerer} using the given delegate {@link yfiles.hierarchic.ILayerer} - * instance. - * @param singleComponentLayerer - * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.hierarchic.ILayerer} is null - */ - constructor(singleComponentLayerer:yfiles.hierarchic.ILayerer); - /** - * Assigns all nodes of the graph to layers and registers them to the {@link yfiles.hierarchic.ILayers} instance based on the given - * aspect ratio. - *

- * If the graph consists of multiple components, they will be identified and each of the components will be layered - * separately using the delegate {@link yfiles.hierarchic.ILayerer} instance. After that, they will all be merged such that the - * desired aspect ratio is best fulfilled. - *

- * @param graph the input graph - * @param layers the {@link } instance that will be filled with the results of the calculation - * @param ldp the {@link } used for query information about the nodes and edges - */ - assignLayers(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Gets or sets the delegate {@link yfiles.hierarchic.ILayerer} instance. - * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.hierarchic.ILayerer} is null - * @type {yfiles.hierarchic.ILayerer} - */ - singleComponentLayerer:yfiles.hierarchic.ILayerer; - /** - * Gets or sets whether or not the size of the nodes should be considered. - *

- * If this option is disabled, all nodes are considered to be of equal size. Hence, the given aspect ratio specifies the - * ratio between the number of nodes within a layer and the overall number of layers. - *

- * @type {boolean} - */ - considerNodeSize:boolean; - /** - * Gets or sets the desired aspect ratio. - *

- * If the graph consists of multiple components, they will be identified and each of the components will be layered - * separately using the delegate {@link yfiles.hierarchic.ILayerer} instance. After that, they will all be merged such that the - * desired aspect ratio is best fulfilled. - *

- *

- * The given aspect ratio should be greater or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the aspect ratio is negative - * @type {number} - */ - desiredAspectRatio:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.AspectRatioComponentLayerer; - } - /** - * {@link yfiles.hierarchic.BFSLayerer} uses a breadth first search for assigning layers to the nodes. - *

- * The nodes of the first layer can be freely selected (see - * {@link yfiles.hierarchic.BFSLayerer#CORE_NODES_DP_KEY}). The nodes that belong to a subsequent layer are determined as follows: - * Add all yet unassigned nodes to the new layer that are connected to nodes already assigned. As a consequence, all - * connected nodes will be at most one layer apart. Also, edges between nodes that belong to the same layer are possible. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[46.17,0,[[55.83,24.35,10.67,18.7,"1"]]],[100,70,[[109.66,94.35,10.67,18.7,"2"]]],[0,70,[[9.66,94.35,10.67,18.7,"3"]]],[211.77,0,[[221.43,24.35,10.67,18.7,"6"]]],[211.77,70,[[221.43,94.35,10.67,18.7,"7"]]],[100,0,[[109.66,24.35,10.67,18.7,"8"]]],[50,70,[[56.33,94.35,17.35,18.7,"12"]]],[3.17,140,[[12.83,164.35,10.67,18.7,"8"]]],[113.17,140,[[122.83,164.35,10.67,18.7,"9"]]]],"e":[[5,1,0,15,7.5,-15,[115,50,122.5,50]],[0,1,10,15,-7.5,-15,[71.17,50,107.5,50]],[0,2,-10,15,0,-15,[51.17,50,15,50]],[4,1,-15,0,15,0],[3,4,0,15,0,-15],[0,6,-0,15,0,-15,[61.17,50,65,50]],[6,7,-7.5,15,7.5,-15,[57.5,120,25.67,120]],[6,8,7.5,15,0,-15,[72.5,120,128.17,120]],[8,7,-15,0,15,0],[2,7,0,15,-7.5,-15,[15,120,10.67,120]]],"vp":[0.0,0.0,242.0,170.0]}} - *

- * @class - * @implements {yfiles.hierarchic.ILayerer} - */ - export interface BFSLayerer extends yfiles.lang.Object,yfiles.hierarchic.ILayerer{} - export class BFSLayerer { - /** - * Creates an instance of {@link yfiles.hierarchic.BFSLayerer}. - */ - constructor(); - /** - * Assigns all nodes of the graph to layers and adds them to the {@link yfiles.hierarchic.ILayers} instance. - * @param graph the input graph - * @param layers the {@link } instance that will be filled with the results of the calculation - * @param ldp the {@link } used for query information about the nodes and edges - */ - assignLayers(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Data provider key for identifying the core nodes of the BFS layering - *

- * The {@link yfiles.algorithms.IDataProvider} registered with this key should provide boolean values for the nodes of the graph. - * The boolean value determines whether or not a node is to be placed in the first layer. If there are no nodes marked as - * core nodes, then nodes with in-degree 0 are considered to be the core nodes. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static CORE_NODES_DP_KEY:yfiles.algorithms.NodeDpKey; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.BFSLayerer; - } - /** - * This class is a {@link yfiles.hierarchic.ILayerer} implementation that observes relative and absolute layering constraints - * defined by the {@link yfiles.hierarchic.ILayerConstraintFactory layer constraint factory}. - *

- * Furthermore, it can handle the edge directedness as specified by {@link yfiles.algorithms.IDataProvider} key - * {@link yfiles.hierarchic.HierarchicLayout#EDGE_DIRECTEDNESS_DP_KEY}. - *

- *

- * For a given graph instance, the layer constraint factory can be created using method - * {@link yfiles.hierarchic.HierarchicLayout#createLayerConstraintFactory}. The {@link yfiles.hierarchic.ILayerer} can be used for both - * common layering and layering of incremental nodes. - *

- *

- * {@graph {"ann":{"s":[60,30],"d":1},"styles":{"6":{"f":"#ff0000"},"7":{"f":"#0099ff"}, "8":{"f":"#00cc66"}},"n":[[120,0,6,[[144.66,24.35,10.67,18.7,"1"]]],[10,50,7,[[34.66,74.35,10.67,18.7,"2"]]],[120,50,7,[[144.66,74.35,10.67,18.7,"3"]]],[280,125,8,[[304.66,149.35,10.67,18.7,"7"]]],[10,125,8,[[34.66,149.35,10.67,18.7,"4"]]],[100,125,8,[[124.66,149.35,10.67,18.7,"5"]]],[190,125,8,[[214.66,149.35,10.67,18.7,"6"]]]],"e":[[2,0,0,-15,0,15],[2,1,-30,0,30,0],[3,2,0,-15,22.5,15,[310,95,172.5,95]],[2,4,-22.5,15,0,-15,[127.5,90,40,90]],[2,5,-7.5,15,0,-15,[142.5,100,130,100]],[2,6,7.5,15,0,-15,[157.5,105,220,105]]],"vp":[10.0,0.0,330.0,155.0]}} Sample output of applying {@link yfiles.hierarchic.ConstraintIncrementalLayerer}. The red colored node should reside in the - * topmost layer, blue nodes in the medium layer while green nodes in the bottommost layer. {@graph {"ann":{"s":[60,30],"d":1},"styles":{"6":{"f":"#0099ff"},"7":{"f":"#e3e3ff", "s":"#e3e3ff"}, "8":{"f":"#00cc66"}},"n":[[330,136.5,380,67,7],[330,206.5,380,127,7],[330,337,380,80,7],[490,156.5,[[514.66,180.85,10.67,18.7,"1"]]],[350,226.5,6,[[374.66,250.85,10.67,18.7,"2"]]],[440,226.5,6,[[464.66,250.85,10.67,18.7,"3"]]],[450,286.5,6,[[474.66,310.85,10.67,18.7,"4"]]],[415,346.5,8,[[439.66,370.85,10.67,18.7,"5"]]],[505,346.5,8,[[529.66,370.85,10.67,18.7,"6"]]],[595,346.5,8,[[619.66,370.85,10.67,18.7,"7"]]]],"e":[[3,4,-25,15,0,-15,[495,196.5,380,196.5]],[3,5,-15,15,0,-15,[505,206.5,470,206.5]],[3,6,-5,15,15,-15,[515,266.5,495,266.5]],[5,6,0,15,-15,-15,[470,266.5,465,266.5]],[3,7,5,15,0,-15,[525,326.5,445,326.5]],[3,8,15,15,0,-15],[3,9,25,15,0,-15,[545,196.5,625,196.5]]],"vp":[330.0,136.0,380.0,281.0]}} Sample output of applying {@link yfiles.hierarchic.ConstraintIncrementalLayerer} - * on a graph with a - * {@link yfiles.layout.PartitionGrid}. Same colors represent nodes that belong to the same partition grid cell and should be - * layered with respect to the partition grid cell to which they belong. - *

- * @see yfiles.hierarchic.ILayerConstraintFactory - * @see yfiles.hierarchic.HierarchicLayout - * @class - * @implements {yfiles.hierarchic.ILayerer} - */ - export interface ConstraintIncrementalLayerer extends yfiles.lang.Object,yfiles.hierarchic.ILayerer{} - export class ConstraintIncrementalLayerer { - /** - * Creates a new {@link yfiles.hierarchic.ConstraintIncrementalLayerer} with the given {@link yfiles.hierarchic.ILayerer} instance. - * @param coreLayerer the given {@link } instance - */ - constructor(coreLayerer:yfiles.hierarchic.ILayerer); - /** - * Assigns all nodes of the graph to layers and adds them to the {@link yfiles.hierarchic.ILayers} instance based on relative and - * absolute layering constraints defined by the given layering constraints. - * @param graph the input graph - * @param layers the {@link } instance that will be filled with the results of the calculation - * @param ldp the {@link } used for query information about the nodes and edges - */ - assignLayers(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Checks if the current setting of constraints is consistent (i.e. - *

- * the induced constraint graph has no cycles). - *

- * @throws {Stubs.Exceptions.ArgumentError} if the constraint graph is inconsistent - * @protected - */ - checkConstraints():void; - /** - * Data provider key for assigning additional edge weights - *

- * The {@link yfiles.hierarchic.ILayerer} tries to maintain edges with higher weights short. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static ADDITIONAL_EDGE_WEIGHT_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Gets or sets whether or not same-layer edges can be created by this {@link yfiles.hierarchic.ILayerer} instance. - *

- * This only concerns edges between nodes that have no hard constraints that will force a same-layer edge (i.e. a - * same-layer constraint). - *

- * @type {boolean} - */ - allowSameLayerEdges:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.ConstraintIncrementalLayerer; - } - /** - * This class is a default {@link yfiles.hierarchic.IDrawingDistanceCalculator} implementation that is used by {@link yfiles.hierarchic.HierarchicLayoutCore} - * to configure the {@link yfiles.hierarchic.INodePlacer}. - * @class - * @implements {yfiles.hierarchic.IDrawingDistanceCalculator} - */ - export interface DefaultDrawingDistanceCalculator extends yfiles.lang.Object,yfiles.hierarchic.IDrawingDistanceCalculator{} - export class DefaultDrawingDistanceCalculator { - /** - * Creates a new instance of {@link yfiles.hierarchic.DefaultDrawingDistanceCalculator} with default settings. - */ - constructor(); - /** - * - * @param graph - * @param layers - * @param ldp - */ - dispose(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Determines the minimum distance between two {@link yfiles.algorithms.Node}s of the same layer. - * @param graph the input graph - * @param layer the {@link } object that will be used during subsequent calls - * @param ldp the {@link } used for querying information - * @param left the left of the two {@link }s whose minimum distance is to be determined or null if only the left border - * of the right {@link } is of interest - * @param right the right of the two {@link }s whose minimum distance is to be determined or null if only the right border - * of the left {@link } is of interest - * @returns the minimum distances between {@link }s of same layer - */ - getMinDistance(graph:yfiles.layout.LayoutGraph,layer:yfiles.hierarchic.ILayer,ldp:yfiles.hierarchic.ILayoutDataProvider,left:yfiles.algorithms.Node,right:yfiles.algorithms.Node):number; - /** - * - * @param graph - * @param layers - * @param ldp - */ - initialize(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Gets or sets whether or not an adaptive minimum edge distance is used. - *

- * If this option is enabled the minimum distance between two adjacent edges is the minimum of the current minimum edge - * distance and the distance of the edges' source/target points. - *

- * @type {boolean} - */ - adaptiveMinimumEdgeDistanceEnabled:boolean; - /** - * Gets or sets whether or not the compaction option is enabled. - * @type {boolean} - */ - compaction:boolean; - /** - * Gets or sets the minimum distance between two {@link yfiles.algorithms.Node}s. - *

- * Minimum distance should be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum distance is negative - * @type {number} - */ - nodeToNodeDistance:number; - /** - * Gets or sets the minimum distance between a {@link yfiles.algorithms.Node} and an (non-adjacent) {@link yfiles.algorithms.Edge}. - *

- * Minimum distance should be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum distance is negative - * @type {number} - */ - nodeToEdgeDistance:number; - /** - * Gets or sets the minimum distance between two edges. - *

- * Minimum distance should be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum distance is negative - * @type {number} - */ - edgeToEdgeDistance:number; - /** - * Gets or sets whether or not to use an optimized minimum distance calculation for swimlane layouts. - *

- * If set to true this instance will report 0.0d as the minimum distance between two nodes if they belong to different - * swimlanes. This avoids unwanted feedback between different swimlanes during node placement. - *

- * @type {boolean} - */ - optimizeSwimlaneDistances:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.DefaultDrawingDistanceCalculator; - } - /** - * This class is a {@link yfiles.hierarchic.ISequencer} implementation that performs the second phase of the Sugiyama algorithm. - *

- * It minimizes the crossings in the diagram by using either the barycentric or median heuristic. - *

- * @class - * @implements {yfiles.hierarchic.ISequencer} - */ - export interface DefaultLayerSequencer extends yfiles.lang.Object,yfiles.hierarchic.ISequencer{} - export class DefaultLayerSequencer { - /** - * Creates a new instance of {@link yfiles.hierarchic.DefaultLayerSequencer}. - */ - constructor(); - /** - * - * @param graph - * @param glayers - * @param ldp - * @param itemFactory - */ - sequenceNodeLayers(graph:yfiles.layout.LayoutGraph,glayers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider,itemFactory:yfiles.hierarchic.IItemFactory):void; - /** - * Gets or sets whether or not to apply an additional crossing minimization heuristic. - *

- * Activating this heuristic can reduce the overall number of edge crossings. On the other hand, it may increase the - * running time. - *

- * @type {boolean} - */ - transposition:boolean; - /** - * Gets or sets whether or not an additional crossing minimization heuristic should be used in the presence of grouped - * graphs. - *

- * Activating this heuristic can reduce the overall number of edge crossings in grouped graphs. On the other hand, it may - * increase running time. - *

- * @type {boolean} - */ - groupTransposition:boolean; - /** - * Gets or sets the weight heuristic that should be used. - * @throws {Stubs.Exceptions.ArgumentError} if the constant is unknown - * @type {yfiles.hierarchic.WeightHeuristic} - */ - weightHeuristic:yfiles.hierarchic.WeightHeuristic; - /** - * Gets or sets the time limit (in milliseconds) set for this sequencer per execution. - *

- * Values have to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the maximum duration is negative. - * @type {number} - */ - maximumDuration:number; - /** - * Gets or sets the number of randomized rounds that this algorithm performs, if there was no optimal solution. - *

- * Values have to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if a negative value is given - * @type {number} - */ - randomizationRounds:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.DefaultLayerSequencer; - } - /** - * A default implementation of a {@link yfiles.hierarchic.ILayeredComponentsMerger} that provides simple default behaviors. - *

- * Instances of this class are used internally by {@link yfiles.hierarchic.HierarchicLayoutCore} and {@link yfiles.hierarchic.MultiComponentLayerer} - * when e.g. the graph is grouped or it consists of more than one connected component. - *

- * @class - * @implements {yfiles.hierarchic.ILayeredComponentsMerger} - */ - export interface DefaultLayeredComponentsMerger extends yfiles.lang.Object,yfiles.hierarchic.ILayeredComponentsMerger{} - export class DefaultLayeredComponentsMerger { - /** - * Creates a new instance of {@link yfiles.hierarchic.DefaultLayeredComponentsMerger} using the given merging policy. - * @param policy one of the predefined merging constants - * @throws {Stubs.Exceptions.ArgumentError} if an unknown policy is given - */ - constructor(policy:yfiles.hierarchic.MergingPolicy); - /** - * Creates a new instance of {@link yfiles.hierarchic.DefaultLayeredComponentsMerger} with default settings. - */ - constructor(); - /** - * - * @param graph - * @param ldp - * @param srcLayers - * @param targetLayers - */ - merge(graph:yfiles.layout.LayoutGraph,ldp:yfiles.hierarchic.ILayoutDataProvider,srcLayers:yfiles.hierarchic.ILayers,targetLayers:yfiles.hierarchic.ILayers):void; - /** - * Gets or sets the merging policy constant as defined in {@link yfiles.hierarchic.DefaultLayeredComponentsMerger}. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown policy is given - * @type {yfiles.hierarchic.MergingPolicy} - */ - policy:yfiles.hierarchic.MergingPolicy; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.DefaultLayeredComponentsMerger; - } - /** - * This class is a default {@link yfiles.hierarchic.IPortAllocator} implementation. - *

- * It is used by {@link yfiles.hierarchic.HierarchicLayoutCore} after the sequencing phase. - *

- * @class - * @implements {yfiles.hierarchic.IPortAllocator} - */ - export interface DefaultPortAllocator extends yfiles.lang.Object,yfiles.hierarchic.IPortAllocator{} - export class DefaultPortAllocator { - /** - * Creates a new instance of {@link yfiles.hierarchic.DefaultPortAllocator} with default settings. - * @see yfiles.hierarchic.DefaultPortAllocator#defaultPortBorderGapRatio - */ - constructor(); - /** - * Assigns source and target port coordinates to each edge of the graph. - *

- * This method assigns: - *

- *
    - *
  • {@link yfiles.layout.PortSide#ANY} ports to appropriate sides.
  • - *
  • {@link yfiles.layout.PortConstraint#strong Weak} ports to appropriate positions between strong ones.
  • - *
- *

- * This method is called by {@link yfiles.hierarchic.HierarchicLayoutCore} after the sequencing phase. - *

- * @param graph the input graph - * @param layers the given {@link } instance containing the layering structure - * @param ldp the {@link } containing information about the nodes and edges of the graph - * @param itemFactory the {@link } used for creating and destroying helper structures - */ - assignPorts(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider,itemFactory:yfiles.hierarchic.IItemFactory):void; - /** - * Callback method used for determining the port border gap for each node and side. - *

- * It may be overridden for a custom calculation of port border gap on a given node. - *

- * @param graph the input graph - * @param ldp the {@link } containing information about the nodes and edges of the graph - * @param node the given node - * @param sideIndex the zero-based (top is 0) clock-wise index of the side of the node (for top-to-bottom layouts) - * @param sideLength the width/height of the side - * @param edgeCount the number of edges/ports that connect to this side - * @returns the absolute gap on both sides of the ports - * @see yfiles.hierarchic.DefaultPortAllocator#getPortDistanceDelta - * @protected - */ - getPortBorderGap(graph:yfiles.layout.LayoutGraph,ldp:yfiles.hierarchic.ILayoutDataProvider,node:yfiles.algorithms.Node,sideIndex:number,sideLength:number,edgeCount:number):number; - /** - * Callback method used for determining the port border gap ratio. - *

- * See {@link yfiles.hierarchic.DefaultPortAllocator#defaultPortBorderGapRatio} for an explanation. - *

- *

- * It may be overridden for a custom calculation of port border gap ratio on a given node. - *

- * @param graph the input graph - * @param ldp the {@link } containing information about the nodes and edges of the graph - * @param node the given node - * @param sideIndex the zero-based (top is 0) clock-wise index of the side of the node (for top-to-bottom layouts) - * @param sideLength the width/height of the side - * @param edgeCount the number of edges/ports that connect to this side - * @returns the border gap ratio - * @protected - */ - getPortBorderGapRatio(graph:yfiles.layout.LayoutGraph,ldp:yfiles.hierarchic.ILayoutDataProvider,node:yfiles.algorithms.Node,sideIndex:number,sideLength:number,edgeCount:number):number; - /** - * Callback method used for determining the distance between two adjacent ports. - *

- * It may be overridden for a custom calculation of the distance between two adjacent ports.. - *

- * @param graph the input graph - * @param ldp the {@link } containing information about the nodes and edges of the graph - * @param node the given node - * @param sideIndex the zero-based (top is 0) clock-wise index of the side of the node (for top-to-bottom layouts) - * @param sideLength the width/height of the side - * @param edgeCount the number of edges/ports that connect to this side - * @param portBorderGap the previously calculated port border gap - * @returns the absolute distance between two adjacent ports - * @protected - */ - getPortDistanceDelta(graph:yfiles.layout.LayoutGraph,ldp:yfiles.hierarchic.ILayoutDataProvider,node:yfiles.algorithms.Node,sideIndex:number,sideLength:number,edgeCount:number,portBorderGap:number):number; - /** - * Gets or sets the border gap ratio for the default port. - *

- * This ratio determines the gap between a corner of the node and the first assigned port. - *

- *

- * The ratio should be greater than 0. - *

- *

- * A value of 0.0d results in ports being placed directly on the corner of the node (if there is more than one port). - *

- *

- * A value of 0.5d results in ports being distributed along the side of the node so that the distance between the corner of - * the node and the first port is half as wide as the distance between two adjacent ports. - *

- *

- * A value of Double.POSITIVE_INFINITY results in all ports being centered at the side in one point. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given ratio is negative - * @type {number} - */ - defaultPortBorderGapRatio:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.DefaultPortAllocator; - } - /** - * This class is used by {@link yfiles.hierarchic.HierarchicLayoutCore} during the various phases to provide routing details for - * the edges of the graph. - *

- * An {@link yfiles.hierarchic.EdgeLayoutDescriptor} instance can be specified individually for single edges using a {@link yfiles.algorithms.IDataProvider} - * that returns an {@link yfiles.hierarchic.EdgeLayoutDescriptor} instance for each edge of the graph, or null if no {@link yfiles.hierarchic.EdgeLayoutDescriptor} - * is bound to an edge. The {@link yfiles.algorithms.IDataProvider} is registered with the graph using key - * {@link yfiles.hierarchic.HierarchicLayoutCore#EDGE_LAYOUT_DESCRIPTOR_DP_KEY}. - *

- *

- * This class is designed as a class to allow future additions of new getter methods. - *

- * @see yfiles.hierarchic.HierarchicLayoutCore#EDGE_LAYOUT_DESCRIPTOR_DP_KEY - * @see yfiles.hierarchic.NodeLayoutDescriptor - * @class - */ - export interface EdgeLayoutDescriptor extends yfiles.lang.Object{} - export class EdgeLayoutDescriptor { - /** - * Creates a new instance of an {@link yfiles.hierarchic.EdgeLayoutDescriptor} with the default values. - */ - constructor(); - /** - * Creates a copy of this {@link yfiles.hierarchic.EdgeLayoutDescriptor} instance. - * @returns a copy of this {@link } instance - */ - createCopy():yfiles.hierarchic.EdgeLayoutDescriptor; - /** - * Gets or sets the minimum length of the first segment of the edge path (at the source node). - *

- * The minimum length should be greater than 0. - *

- *

- * If the value is 0.0d the first segment does not need to be orthogonal. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum length of the first segment is negative - * @type {number} - */ - minimumFirstSegmentLength:number; - /** - * Gets or sets the minimum length of the last segment of the edge path (at the target node). - *

- * The minimum length should be greater than 0. - *

- *

- * If the value is 0.0d the last segment does not need to be orthogonal. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum length of the last segment is negative - * @type {number} - */ - minimumLastSegmentLength:number; - /** - * Gets or sets the minimum length of an edge. - *

- * If this is used for polyline routing, it describes the minimum vertical length of the mid segment. If it is used for - * orthogonal routing, it describes the minimum length of the whole edge. - *

- *

- * The minimum length should be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum length is negative - * @type {number} - */ - minimumLength:number; - /** - * Gets or sets the preferred minimum distance to obstacles. - *

- * The minimum distance should be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum length is negative - * @type {number} - */ - minimumDistance:number; - /** - * Gets or sets the minimum slope that the mid segments of this edge should have, if the edge is routed polyline in - * vertical layouts. - *

- * The minimum slope should be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given minimum slope is negative - * @type {number} - */ - minimumSlope:number; - /** - * Gets or sets whether or not source port optimization is enabled. - *

- * This means that the algorithm should try to find a better source {@link yfiles.layout.PortConstraint port constraint} if the current constraint is null or - * {@link yfiles.layout.PortSide#ANY}. - *

- * @type {boolean} - */ - sourcePortOptimization:boolean; - /** - * Gets or sets whether or not target port optimization is enabled. - *

- * This means that the algorithm should try to find a better target {@link yfiles.layout.PortConstraint port constraint} if the current constraint is null or - * {@link yfiles.layout.PortSide#ANY}. - *

- * @type {boolean} - */ - targetPortOptimization:boolean; - /** - * Gets or sets the routing style for this edge. - * @see yfiles.hierarchic.RoutingStyle - * @type {yfiles.hierarchic.RoutingStyle} - */ - routingStyle:yfiles.hierarchic.RoutingStyle; - /** - * Gets or sets the minimum length of octilinear segments for this edge. - * @throws {Stubs.Exceptions.ArgumentError} if the minimum length of the first segment is negative - * @see yfiles.hierarchic.EdgeLayoutDescriptor#routingStyle - * @type {number} - */ - minimumOctilinearSegmentLength:number; - /** - * Gets or sets how edges in grouped graphs are routed between the content of different groups. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown style is specified - * @type {yfiles.hierarchic.RecursiveEdgeStyle} - */ - recursiveEdgeStyle:yfiles.hierarchic.RecursiveEdgeStyle; - /** - * Gets or sets whether or not this edge is routed directly to a group node's border if it connects the group node with one - * of its descendants. - *

- * When enabled, the edge will connect to the inner side of the group node's border instead of leaving the group node and - * connect from outside. - *

- * @type {boolean} - */ - directGroupContentEdgeRouting:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.EdgeLayoutDescriptor; - } - export enum WeightHeuristic{ - /** - * A weight assignment specifier based on a barycenter heuristic. - *

- * The position of a node within a layer will be determined by the barycenter of its successor (downward pass) and - * predecessor (upward pass) nodes. - *

- * @see yfiles.hierarchic.DefaultLayerSequencer#weightHeuristic - */ - BARYCENTER, - /** - * A weight assignment specifier based on a median heuristic. - *

- * The position of a node within a layer will be determined by the median position of its successor (downward pass) and - * predecessor (upward pass) nodes. - *

- * @see yfiles.hierarchic.DefaultLayerSequencer#weightHeuristic - */ - MEDIAN - } - export enum MergingPolicy{ - /** - * A constant that adds the new layers of the source {@link yfiles.hierarchic.ILayers layering} below the layers of the target {@link yfiles.hierarchic.ILayers layering}. - * @see yfiles.hierarchic.DefaultLayeredComponentsMerger#policy - */ - ADD_BELOW, - /** - * A constant that adds the new layers of the source {@link yfiles.hierarchic.ILayers layering} above the layers of the target {@link yfiles.hierarchic.ILayers layering}. - * @see yfiles.hierarchic.DefaultLayeredComponentsMerger#policy - */ - ADD_ABOVE, - /** - * A constant that adds the new layers of the source {@link yfiles.hierarchic.ILayers layering} to the right of the layers of the target layering. - *

- * Both {@link yfiles.hierarchic.ILayers layering}s will become top-aligned before the merge. - *

- * @see yfiles.hierarchic.DefaultLayeredComponentsMerger#policy - */ - ADD_RIGHT_TOP_ALIGNED, - /** - * A constant that adds the new layers of the source {@link yfiles.hierarchic.ILayers layering} to the right of the layers of the target {@link yfiles.hierarchic.ILayers layering}. - *

- * Both {@link yfiles.hierarchic.ILayers layering}s will become bottom-aligned before the merge. - *

- * @see yfiles.hierarchic.DefaultLayeredComponentsMerger#policy - */ - ADD_RIGHT_BOTTOM_ALIGNED, - /** - * A constant that adds the new layers of the source {@link yfiles.hierarchic.ILayers layering} to the right of the layers of the target {@link yfiles.hierarchic.ILayers layering}. - *

- * Both {@link yfiles.hierarchic.ILayers layering}s will become center-aligned before the merge. - *

- * @see yfiles.hierarchic.DefaultLayeredComponentsMerger#policy - */ - ADD_RIGHT_CENTER_ALIGNED, - /** - * A constant that adds the new layers of the source {@link yfiles.hierarchic.ILayers layering} to the left of the layers of the target {@link yfiles.hierarchic.ILayers layering}. - *

- * Both {@link yfiles.hierarchic.ILayers layering}s will become top-aligned before the merge. - *

- * @see yfiles.hierarchic.DefaultLayeredComponentsMerger#policy - */ - ADD_LEFT_TOP_ALIGNED, - /** - * A constant that adds the new layers of the source {@link yfiles.hierarchic.ILayers layering} to the left of the layers of the target {@link yfiles.hierarchic.ILayers layering}. - *

- * Both {@link yfiles.hierarchic.ILayers layering}s will become bottom-aligned before the merge. - *

- * @see yfiles.hierarchic.DefaultLayeredComponentsMerger#policy - */ - ADD_LEFT_BOTTOM_ALIGNED, - /** - * A constant that adds the new layers of the source {@link yfiles.hierarchic.ILayers layering} to the left of the layers of the target {@link yfiles.hierarchic.ILayers layering}. - *

- * Both {@link yfiles.hierarchic.ILayers layering}s will become center-aligned before the merge. - *

- * @see yfiles.hierarchic.DefaultLayeredComponentsMerger#policy - */ - ADD_LEFT_CENTER_ALIGNED - } - export enum EdgeDataType{ - /** - * A constant describing a normal edge. - * @see yfiles.hierarchic.IEdgeData#type - */ - NORMAL, - /** - * A constant describing an edge that connects to a source group node. - * @see yfiles.hierarchic.IEdgeData#type - */ - SOURCE_GROUP_NODE_CONNECTOR, - /** - * A constant describing an edge that connects to a target group node. - * @see yfiles.hierarchic.IEdgeData#type - */ - TARGET_GROUP_NODE_CONNECTOR, - /** - * A constant describing an edge that connects two group nodes. - * @see yfiles.hierarchic.IEdgeData#type - */ - GROUP_NODE_INTERCONNECTOR, - /** - * A constant describing a same-layer edge that connects directly two neighboring nodes. - * @see yfiles.hierarchic.IEdgeData#type - */ - DIRECT_SAME_LAYER_EDGE, - /** - * A constant describing a same-layer edge that does not connect directly two neighboring nodes. - *

- * This means that two nodes of the same layer are not connected directly with a straight-line edge, but with an edge - * consisting of polyline segments. - *

- * @see yfiles.hierarchic.IEdgeData#type - */ - NON_DIRECT_SAME_LAYER_EDGE, - /** - * A constant describing an edge that connects group border nodes in adjacent layers. - * @see yfiles.hierarchic.IEdgeData#type - */ - BORDER_EDGE, - /** - * A constant describing an edge that has been added temporarily to replace an edge connected to a group node. - * @see yfiles.hierarchic.IEdgeData#type - */ - REDIRECTED_GROUP_EDGE - } - export enum RecursiveEdgeStyle{ - /** - * Routing specifier that routes edges between different group contents non-recursively. - * {@link yfiles.algorithms.Edge}s may leave and enter group nodes at the left and right side in order to connect as directly as - * possible. - * @see yfiles.hierarchic.EdgeLayoutDescriptor#recursiveEdgeStyle - */ - OFF, - /** - * Routing specifier that routes edges between different group contents recursively and directed. - * {@link yfiles.algorithms.Edge}s can only leave the groups at the bottom side and enter them at the top side. - * @see yfiles.hierarchic.EdgeLayoutDescriptor#recursiveEdgeStyle - */ - DIRECTED, - /** - * Routing specifier that routes edges between different group contents recursively and undirected. - * {@link yfiles.algorithms.Edge}s can leave the groups at the bottom or top side and enter them at the bottom or top side. This - * style is more compact than the directed edge style. - * @see yfiles.hierarchic.EdgeLayoutDescriptor#recursiveEdgeStyle - */ - UNDIRECTED - } - export enum ComponentArrangementPolicy{ - /** - * A component arrangement policy that achieves a 1:1 aspect ratio for the graph. - *

- * After layering the single components with the core layerer, the components will be merged such that an 1:1 aspect ratio - * is fulfilled best. - *

- * @see yfiles.hierarchic.HierarchicLayout#componentArrangementPolicy - */ - COMPACT, - /** - * A component arrangement policy that aligns the components with their topmost layer. - *

- * After layering the single components with the core layerer, the components are aligned with their topmost layer. - *

- * @see yfiles.hierarchic.HierarchicLayout#componentArrangementPolicy - */ - TOPMOST - } - export enum LayoutMode{ - /** - * A layout mode that allows to keep some nodes fixed and insert the remaining nodes incrementally. - *

- * Fixed elements will be handled by the {@link yfiles.hierarchic.HierarchicLayout#fixedElementsSequencer fixed elements sequencer} and {@link yfiles.hierarchic.HierarchicLayout#fixedElementsLayerer fixed elements layerer}. Incremental elements will be - * added during the layering or the sequencing phase. They are handled by {@link yfiles.hierarchic.HierarchicLayout#fromScratchLayerer from scratch layerer} and {@link yfiles.hierarchic.HierarchicLayout#fixedElementsLayerer fixed elements layerer} - * respectively. - *

- * @see yfiles.hierarchic.IIncrementalHintsFactory#createLayerIncrementallyHint - * @see yfiles.hierarchic.HierarchicLayout#layoutMode - * @see yfiles.hierarchic.HierarchicLayout#fixedElementsSequencer - * @see yfiles.hierarchic.HierarchicLayout#fixedElementsLayerer - */ - INCREMENTAL, - /** - * A layout mode that will recompute the complete layout from scratch. - *

- * All elements will be handled by the same {@link yfiles.hierarchic.HierarchicLayout#fromScratchLayerer layerer} and {@link yfiles.hierarchic.HierarchicLayout#fromScratchSequencer sequencer}. - *

- * @see yfiles.hierarchic.HierarchicLayout#layoutMode - * @see yfiles.hierarchic.HierarchicLayout#fromScratchSequencer - * @see yfiles.hierarchic.HierarchicLayout#fromScratchLayerer - */ - FROM_SCRATCH - } - export enum LayeringStrategy{ - /** - * A layering strategy which places each node in the highest possible layer without passing its predecessor in the - * topological order of nodes. - *

- * All nodes with indegree zero will be assigned to the topmost layer of the layout. The number of separate layers will be - * as small as possible. - *

- * @see yfiles.hierarchic.HierarchicLayout#fromScratchLayeringStrategy - */ - HIERARCHICAL_TOPMOST, - /** - * A layering strategy which places each node in the optimal layer to minimize the layer distances. - *

- * The layer distance of an edge is the absolute difference between the layer numbers of its source and target node. The - * layer assignment will minimize the overall sum of the layer distances of all edges in the layout. - *

- * @see yfiles.hierarchic.HierarchicLayout#fromScratchLayeringStrategy - */ - HIERARCHICAL_OPTIMAL, - /** - * A layering strategy which applies a heuristic to approximate the {@link yfiles.hierarchic.LayeringStrategy#HIERARCHICAL_OPTIMAL optimal layering}. - *

- * The quality of the result may not be as good as with {@link yfiles.hierarchic.LayeringStrategy#HIERARCHICAL_OPTIMAL optimal layering} but it is usually achieved faster. - *

- * @see yfiles.hierarchic.HierarchicLayout#fromScratchLayeringStrategy - */ - HIERARCHICAL_TIGHT_TREE, - /** - * A layering strategy which applies a fast heuristic that improves the layering done by {@link yfiles.hierarchic.LayeringStrategy#HIERARCHICAL_TOPMOST} - * by shifting some nodes down. - *

- * The quality of the result is usually worse than the one produced by - * {@link yfiles.hierarchic.LayeringStrategy#HIERARCHICAL_TIGHT_TREE}. - *

- * @see yfiles.hierarchic.HierarchicLayout#fromScratchLayeringStrategy - */ - HIERARCHICAL_DOWNSHIFT, - /** - * A layering strategy based on a breadth first search (BFS). - *

- * All edges will span at most one layer in the resulting drawing. Edges between nodes that belong to the same layer are - * possible. - *

- *

- * The nodes that will be placed in the first layer can be provided by a data provider bound to the input graph using the - * key - * {@link yfiles.hierarchic.BFSLayerer#CORE_NODES_DP_KEY}. If this data provider is not given, then nodes that have no incoming - * edges are placed in the first layer. - *

- * @see yfiles.hierarchic.HierarchicLayout#fromScratchLayeringStrategy - */ - BFS, - /** - * A layering strategy which derives the layers from the initial coordinates of the nodes. - *

- * It tries to find a layering that is similar to the one in the input graph. The layout algorithm may place nodes in the - * same layer, even though they are connected by an edge. - *

- *

- * In a vertically oriented layout, nodes that overlap vertically are placed in the same layer. The same holds for a - * horizontally oriented layout in the case where the nodes overlap horizontally. - *

- * @see yfiles.hierarchic.HierarchicLayout#fromScratchLayeringStrategy - */ - FROM_SKETCH, - /** - * A layering strategy which uses a layer assignment specified by the user. - *

- * The nodes' layer assignment must be provided by a data provider bound to the input graph using the key - * {@link yfiles.hierarchic.GivenLayersLayerer#LAYER_ID_DP_KEY}. - *

- *

- * This layering strategy allows edges whose source and target share a layer. - *

- * @see yfiles.hierarchic.HierarchicLayout#fromScratchLayeringStrategy - */ - USER_DEFINED, - /** - * A dummy layering strategy which describes a strategy that is not part of the default strategies. - * @see yfiles.hierarchic.HierarchicLayout#fromScratchLayeringStrategy - */ - UNKNOWN - } - export enum GroupAlignmentPolicy{ - /** - * A group layering alignment strategy which aligns groups and normal nodes that occupy the same layer to the top with - * respect to their inner layers. - * @see yfiles.hierarchic.HierarchicLayout#groupAlignmentPolicy - * @see yfiles.hierarchic.HierarchicLayout#recursiveGroupLayering - */ - TOP, - /** - * A group layering alignment strategy which aligns groups and normal nodes that occupy the same layer to the center with - * respect to their inner layers. - * @see yfiles.hierarchic.HierarchicLayout#groupAlignmentPolicy - * @see yfiles.hierarchic.HierarchicLayout#recursiveGroupLayering - */ - CENTER, - /** - * A group layering alignment strategy which aligns groups and normal nodes that occupy the same layer to the bottom with - * respect to their inner layers. - * @see yfiles.hierarchic.HierarchicLayout#groupAlignmentPolicy - * @see yfiles.hierarchic.HierarchicLayout#recursiveGroupLayering - */ - BOTTOM - } - export enum LayerType{ - /** - * A constant describing a normal layer consisting mainly of normal nodes. - */ - NORMAL, - /** - * A constant describing a layer consisting mainly of label nodes or dummy nodes. - */ - LABEL, - /** - * A constant describing a layer consisting of source group nodes and dummy nodes. - */ - SOURCE_GROUP_NODES, - /** - * A constant describing a layer consisting of target group nodes and dummy nodes. - */ - TARGET_GROUP_NODES, - /** - * Describes a layer above a group to store the connector proxies where edges connect to groups. - */ - UPPER_GROUP_CONNECTOR_NODES, - /** - * Describes a layer below a group to store the connector proxies where edges connect to groups. - */ - LOWER_GROUP_CONNECTOR_NODES - } - export enum NodeDataType{ - /** - * A constant describing a normal {@link yfiles.algorithms.Node}. - *

- * A normal node may have any degree, any size and any number of connected same-layer edges. - *

- * @see yfiles.hierarchic.INodeData#type - */ - NORMAL, - /** - * A constant describing a bend {@link yfiles.algorithms.Node}. - *

- * A bend node has degree 2, small size and no same-layer edges. - *

- * @see yfiles.hierarchic.INodeData#type - */ - BEND, - /** - * A constant describing a side proxy {@link yfiles.algorithms.Node}. - *

- * A side proxy node, in case port constraints are used for the drawing phase, has degree - * 1, small size and no same-layer edges. The associated node is the one of which this node is the proxy. - *

- * @see yfiles.hierarchic.INodeData#type - */ - SIDE_PROXY, - /** - * A constant describing a side proxy {@link yfiles.algorithms.Node} for drawing same-layer edges. - *

- * A side proxy node for drawing same-layer edges has degree - * 0, small size and one same-layer edge. The associated node is the one of which this node is the proxy. The associated - * edge is the same-layer edge of which this node is the proxy. - *

- * @see yfiles.hierarchic.INodeData#type - */ - SAME_LAYER_SIDE_PROXY, - /** - * A constant describing a label {@link yfiles.algorithms.Node}. - *

- * A label node has degree - * 2, size of the labels and no same-layer edges. The borders of this node describe the layout of the labels. - *

- * @see yfiles.hierarchic.INodeData#type - */ - LABEL, - /** - * A constant describing a group {@link yfiles.algorithms.Node} for nested graph layouts. - *

- * This group node carries additional {@link yfiles.hierarchic.ILayers} information. - *

- * @see yfiles.hierarchic.INodeData#type - * @see yfiles.hierarchic.INodeData#groupLayers - */ - GROUP, - /** - * A constant describing a source group {@link yfiles.algorithms.Node} for bus edges. - *

- * This node serves as a dummy node in a {@link yfiles.hierarchic.LayerType#SOURCE_GROUP_NODES} layer. - *

- * @see yfiles.hierarchic.INodeData#type - * @see yfiles.hierarchic.INodeData#groupId - */ - SOURCE_GROUP_NODE, - /** - * A constant describing a target group {@link yfiles.algorithms.Node} for bus edges. - *

- * This node serves as a dummy node in a {@link yfiles.hierarchic.LayerType#TARGET_GROUP_NODES} layer. - *

- * @see yfiles.hierarchic.INodeData#type - * @see yfiles.hierarchic.INodeData#groupId - */ - TARGET_GROUP_NODE, - /** - * A constant describing a back-loop proxy that belongs to the source of an edge. - *

- * A back-loop proxy that belongs to the source of an edge has degree 2, small size and exactly one same-layer edge. - *

- * @see yfiles.hierarchic.INodeData#type - */ - SOURCE_BACK_LOOP_PROXY, - /** - * A constant describing a back-loop proxy that belongs to the target of an edge. - *

- * A back-loop proxy that belongs to the target of an edge has degree 2, small size and exactly one same-layer edge. - *

- * @see yfiles.hierarchic.INodeData#type - */ - TARGET_BACK_LOOP_PROXY, - /** - * A constant describing a same-layer edge crossing dummy {@link yfiles.algorithms.Node}. - *

- * A same-layer edge crossing dummy node has degree - * 2, small size and exactly two same-layer edges. It is used for marking the crossing of the layer, if source and target - * port are at opposite layer sides. - *

- * @see yfiles.hierarchic.INodeData#type - */ - SAME_LAYER_CENTER_NODE, - /** - * A constant describing a {@link yfiles.algorithms.Node} used for the drawing phase to keep the distance between two nodes. - * @see yfiles.hierarchic.INodeData#type - */ - DISTANCE_NODE, - /** - * A constant describing a {@link yfiles.algorithms.Node} used during the drawing phase for marking the beginning of a node group - * interval. - * @see yfiles.hierarchic.INodeData#type - */ - GROUP_BEGIN, - /** - * A constant describing a {@link yfiles.algorithms.Node} used during the drawing phase for marking the ending of a node group - * interval. - * @see yfiles.hierarchic.INodeData#type - */ - GROUP_END, - /** - * A constant describing a {@link yfiles.algorithms.Node} used during the sequencing and drawing phase for marking a dummy node - * inserted to guarantee that a group is non-empty on the layer on which it is defined. - * @see yfiles.hierarchic.INodeData#type - */ - GROUP_LAYER_DUMMY, - /** - * A constant describing a {@link yfiles.algorithms.Node} used during the sequencing and drawing phase for marking a dummy node - * inserted as a legal endpoint of an edge connecting to a group node. - * @see yfiles.hierarchic.INodeData#type - */ - PROXY_FOR_EDGE_AT_GROUP, - /** - * A constant describing a {@link yfiles.algorithms.Node} used during the sequencing and drawing phase for marking a dummy node - * inserted as a legal endpoint of an edge connecting a descendant node to a group node. It has degree 0 or 1 depending on - * whether or not the opposite node of the edge is assigned to the same layer. This kind of proxy nodes is only used if - * there are edges that shall connect to the group node without backloops. - * @see yfiles.hierarchic.EdgeLayoutDescriptor#directGroupContentEdgeRouting - */ - PROXY_FOR_CONTENT_EDGE_AT_GROUP, - /** - * A constant describing a {@link yfiles.algorithms.Node} used during sequencing and drawing phase for routing an {@link yfiles.algorithms.Edge} - * recursively. An {@link yfiles.algorithms.Edge} that connects to the content of a group node has to leave the group node at the - * bottom side and enter it at the top side. - * @see yfiles.hierarchic.INodeData#type - */ - RECURSIVE_EDGE_DUMMY - } - export enum PortAssignmentMode{ - /** - * A port assignment strategy that distributes ports evenly along the border of the node. - *

- * This is the default port assignment strategy of {@link yfiles.hierarchic.HierarchicLayout}. - *

- * @see yfiles.hierarchic.NodeLayoutDescriptor#portAssignment - */ - DEFAULT, - /** - * A port assignment strategy that places all edges on grid lines. - *

- * If there are not enough grid lines for each port, ports may overlap. In case there is no grid line available at the side - * of a node, the ports are placed centered at that side. - *

- * @see yfiles.hierarchic.NodeLayoutDescriptor#portAssignment - */ - ON_GRID, - /** - * A port assignment strategy that places all edges on grid lines or sub-grid lines. - *

- * If there are not enough grid lines for each port, the grid gets subdivided with sub-grid lines until each edge has space - * for its port. - *

- * @see yfiles.hierarchic.NodeLayoutDescriptor#portAssignment - */ - ON_SUBGRID - } - export enum NodeLabelMode{ - /** - * A constant that prevents node labels from being considered during the layout. - *

- * It is used by {@link yfiles.hierarchic.NodeLayoutDescriptor#nodeLabelMode} and {@link yfiles.hierarchic.NodeLayoutDescriptor#nodeLabelMode}. - *

- * @see yfiles.hierarchic.NodeLayoutDescriptor#nodeLabelMode - */ - NEVER, - /** - * A constant that makes the algorithm consider node labels for self-loops, node placement and routing. - *

- * It is used by {@link yfiles.hierarchic.NodeLayoutDescriptor#nodeLabelMode} and {@link yfiles.hierarchic.NodeLayoutDescriptor#nodeLabelMode}. - *

- * @see yfiles.hierarchic.NodeLayoutDescriptor#nodeLabelMode - */ - CONSIDER_FOR_SELF_LOOPS, - /** - * A constant that makes the algorithm consider node labels for node placement and routing, but not for self-loops. - *

- * It is used by {@link yfiles.hierarchic.NodeLayoutDescriptor#nodeLabelMode} and {@link yfiles.hierarchic.NodeLayoutDescriptor#nodeLabelMode}. - *

- * @see yfiles.hierarchic.NodeLayoutDescriptor#nodeLabelMode - */ - CONSIDER_FOR_DRAWING, - /** - * A constant that makes the algorithm consider node labels during routing only. - *

- * It is used by {@link yfiles.hierarchic.NodeLayoutDescriptor#nodeLabelMode} and {@link yfiles.hierarchic.NodeLayoutDescriptor#nodeLabelMode}. - *

- * @see yfiles.hierarchic.NodeLayoutDescriptor#nodeLabelMode - */ - CONSIDER_FOR_ROUTING - } - export enum EdgeRoutingStyle{ - /** - * A routing style constant specifying that the edges should be orthogonal. Orthogonal edges only consist of vertical and - * horizontal segments. - */ - ORTHOGONAL, - /** - * A routing style constant specifying that the edges should be octilinear. Octilinear edges consist of vertical and - * horizontal segments as well as segments with slope -1 and 1. - */ - OCTILINEAR, - /** - * A routing style constant specifying that the edges should be polyline. - */ - POLYLINE - } - export enum GroupCompactionPolicy{ - /** - * A strategy specifying no horizontal group compaction. - *

- * This means that group node contents will occupy nearly the same horizontal positions as when not grouped at all. - *

- * @see yfiles.hierarchic.SimplexNodePlacer#groupCompactionStrategy - */ - NONE, - /** - * A strategy specifying maximal horizontal group compaction. - *

- * This means that the node placer will try to minimize the horizontally occupied space for a group node. - *

- * @see yfiles.hierarchic.SimplexNodePlacer#groupCompactionStrategy - */ - MAXIMAL - } - export enum RankingPolicy{ - /** - * A ranking policy that specifies that nodes are not re-ranked after the initial topological layering step. - */ - NO_RERANKING, - /** - * A ranking policy that specifies that nodes are re-ranked by an inexpensive downshift rule. - */ - DOWN_SHIFT, - /** - * A ranking policy that specifies that nodes are re-ranked by finding a spanning tree that contains only tight (length - * 1) edges. - */ - TIGHT_TREE - } - /** - * This layering algorithm implementation assigns nodes to layers given a mapping of nodes to layer IDs. - *

- * The layer IDs are given by a {@link yfiles.algorithms.IDataProvider} that returns the integer layer ID of each node of the - * graph. Nodes with the same ID are in the same layer while the layers are sorted according to their IDs such that the - * smallest ID represents the top layer. - *

- * @class - * @implements {yfiles.hierarchic.ILayerer} - */ - export interface GivenLayersLayerer extends yfiles.lang.Object,yfiles.hierarchic.ILayerer{} - export class GivenLayersLayerer { - /** - * Creates an instance of {@link yfiles.hierarchic.GivenLayersLayerer}. - */ - constructor(); - /** - * Assigns all nodes of the graph to layers and adds them to the {@link yfiles.hierarchic.ILayers} instance. - * @param graph the input graph - * @param layers the {@link } instance that will be filled with the results of the calculation - * @param ldp the {@link } used for querying information about the nodes and edges - */ - assignLayers(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Convenience method that removes empty layers and ensures that the smallest layer has value 0. - * @param graph the graph - * @param layerId the {@link } that returns an integer value (layer) for each node; the first layer has the number - * 0 - * @param normalizedLayerId the {@link } that will be filled by the layout algorithm and holds an integer value (layer ID - * after normalization) for each node - * @returns the number of layers after the removal of empty layers - */ - normalize(graph:yfiles.algorithms.Graph,layerId:yfiles.algorithms.IDataProvider,normalizedLayerId:yfiles.algorithms.IDataAcceptor):number; - /** - * Data provider key for storing the layer IDs - *

- * This {@link yfiles.algorithms.IDataProvider} stores for each node the layer ID to which it belongs. Nodes with the same ID are - * in the same layer while the layers are sorted according to their IDs such that the smallest ID represents the top - * layer. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static LAYER_ID_DP_KEY:yfiles.algorithms.NodeDpKey; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.GivenLayersLayerer; - } - /** - * This class is a {@link yfiles.hierarchic.ISequencer} implementation that determines the sequence of nodes of the same {@link yfiles.hierarchic.ILayer layer} - * based on a given {@link yfiles.collections.IComparer. comparator} constraint. - * @class - * @implements {yfiles.hierarchic.ISequencer} - */ - export interface GivenSequenceSequencer extends yfiles.lang.Object,yfiles.hierarchic.ISequencer{} - export class GivenSequenceSequencer { - /** - * Creates a new instance of {@link yfiles.hierarchic.GivenSequenceSequencer} using a given {@link yfiles.collections.IComparer.} for the sequencing. - * @param [c=null] - */ - constructor(c?:yfiles.collections.IComparer); - /** - * Calculates the sequence of the nodes within a {@link yfiles.hierarchic.ILayers} instance based on the given {@link yfiles.collections.IComparer.} instance. - *

- * This method is called by {@link yfiles.hierarchic.HierarchicLayoutCore} during the sequencing phase and finally writes back the - * calculated sequence using the {@link yfiles.hierarchic.ILayer#setNodeOrder} method. - *

- * @param graph the input graph - * @param layers the given {@link } instance containing the elements of the layers - * @param ldp the {@link } containing information about the nodes and edges of the graph - * @param itemFactory the {@link } used for creating and destroying helper structures - */ - sequenceNodeLayers(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider,itemFactory:yfiles.hierarchic.IItemFactory):void; - /** - * Gets or sets the {@link yfiles.collections.IComparer.} used by this {@link yfiles.hierarchic.GivenSequenceSequencer} to determine the sequence of the nodes. - * @type {yfiles.collections.IComparer.} - */ - sequenceComparer:yfiles.collections.IComparer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.GivenSequenceSequencer; - } - /** - * Visitor interface that can be used to traverse the descendants of a group node - * @interface - */ - export interface IVisitor extends yfiles.lang.Object{ - /** - * Visits the descendants of a group node. - * @param node A descandant of the group node. - * @param parentNode A group node. - * @abstract - */ - visit(node:yfiles.algorithms.Node,parentNode:yfiles.algorithms.Node):void; - } - var IVisitor:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.IVisitor; - }; - /** - * This class is responsible for managing hierarchically grouped graphs. - *

- * The grouping information is provided through {@link yfiles.algorithms.IDataProvider}s registered with the graph with keys - * {@link yfiles.layout.GroupingKeys#NODE_ID_DP_KEY}, {@link yfiles.layout.GroupingKeys#PARENT_NODE_ID_DP_KEY} and - * {@link yfiles.layout.GroupingKeys#GROUP_DP_KEY}. - *

- * @see yfiles.layout.GroupingSupport - * @see yfiles.layout.GroupingKeys - * @class - */ - export interface GroupingSupport extends yfiles.lang.Object{} - export class GroupingSupport { - /** - * Assigns edge group nodes to groups based on a given {@link yfiles.hierarchic.ILayers} instance. - * @param layers the given {@link } instance containing the elements in the layering - * @see yfiles.hierarchic.NodeDataType#SOURCE_GROUP_NODE - * @see yfiles.hierarchic.NodeDataType#TARGET_GROUP_NODE - */ - assignEdgeGroupNodesToGroups(layers:yfiles.hierarchic.ILayers):void; - /** - * Assigns label nodes to groups. - * @param layers the given {@link } instance containing the elements in the layering - * @param itemFactory the {@link } used temporarily for modifying the graph instance - * @see yfiles.hierarchic.NodeDataType#LABEL - * @see yfiles.hierarchic.NodeDataType#BEND - * @see yfiles.hierarchic.NodeDataType#GROUP_BEGIN - * @see yfiles.hierarchic.NodeDataType#GROUP_END - */ - assignLabelNodesToGroups(layers:yfiles.hierarchic.ILayers,itemFactory:yfiles.hierarchic.IItemFactory):void; - /** - * Returns the direct children of the given group node. - * @param groupNode the given group node - * @returns a {@link } of all direct children or null if {@link } {@link #active is not active} - */ - getChildren(groupNode:yfiles.algorithms.Node):yfiles.algorithms.NodeList; - /** - * Returns the descendant {@link yfiles.algorithms.Node}s of the given group node. - *

- * The descendants are all direct or indirect children of a group node. - *

- * @param groupNode the given group node - * @returns a {@link } of all descendants or null if {@link } {@link #active is not active} - */ - getDescendants(groupNode:yfiles.algorithms.Node):yfiles.algorithms.NodeList; - /** - * Returns the parent group node of the given {@link yfiles.algorithms.Node} or null if the given node is a top-level node. - * @param node the given {@link } - * @returns the parent group node or null if the given node is a top-level node or if {@link } - * {@link #active is not active} - */ - getParentNode(node:yfiles.algorithms.Node):yfiles.algorithms.Node; - /** - * Hides the group nodes and incident edges from the graph. - */ - hideGroupNodes():void; - /** - * Returns whether or not the given node is a descendant {@link yfiles.algorithms.Node} of the given group node. - *

- * The descendants are all direct or indirect children of a group node. - *

- * @param node the given node - * @param groupNode the given group node - * @returns true if the given node is a descendant of the given group node, false otherwise - */ - isDescendant(node:yfiles.algorithms.Node,groupNode:yfiles.algorithms.Node):boolean; - /** - * Returns whether or not the given {@link yfiles.algorithms.Node} is a non-empty group node. - * @param node the given {@link } - * @returns true if the given node is a non-empty group node, false otherwise - */ - isGroupNode(node:yfiles.algorithms.Node):boolean; - /** - * Removes the current assignment of source/target edge groups from a given {@link yfiles.hierarchic.ILayers} instance. - * @param layers the given {@link } instance containing the elements in the layering - * @see yfiles.hierarchic.NodeDataType#SOURCE_GROUP_NODE - * @see yfiles.hierarchic.NodeDataType#TARGET_GROUP_NODE - */ - removeEdgeGroupAssignment(layers:yfiles.hierarchic.ILayers):void; - /** - * Un-hides all previously hidden group nodes and incident edges. - */ - unhideGroupNodes():void; - /** - * Visits all descendant {@link yfiles.algorithms.Node}s of the given group node. - *

- * The descendants are all direct or indirect children of a group node. - *

- * @param groupNode the given group node - * @param visitor a {@link } implementation - */ - visitDescendants(groupNode:yfiles.algorithms.Node,visitor:yfiles.hierarchic.IVisitor):void; - /** - * Gets or sets the minimum distance between group nodes. - *

- * The minimum distance should be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum distance is negative - * @type {number} - */ - minimumGroupDistance:number; - /** - * Gets whether or not {@link yfiles.hierarchic.GroupingSupport} is active. - * @type {boolean} - */ - active:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.GroupingSupport; - } - /** - * This layout algorithm arranges graphs in a hierarchic fashion. - *

- * Layout Style The nodes are distributed into layers so that most of the edges point to the main layout direction. The order of the - * nodes within the layers ensures that the number of edge crossings is as small as possible. There are different edge - * routing styles available. Edges can be orthogonal, polyline or octilinear. - *

- *

- * Hierarchical diagrams are commonly used for the visualization of hierarchical data, since they facilitate the - * identification of dependencies and relationships among the nodes of the graph. Possible application domains are the - * following: workflow visualization, call graph visualization, entity-relationship diagrams, biochemical pathways and - * network management. - *

- *

- * {@graph {"ann":{"s":[37.5,37.5],"d":1},"n":[[137.81,67.5],[137.81,135],[718.44,67.5],[147.19,202.5],[305.62,135],[296.25,202.5],[771.88,450],[354.38,285],[290,367.5],[366.88,367.5],[400.62,67.5],[709.06,135],[709.06,202.5],[366.88,450],[79.69,202.5],[492.5,285],[501.88,367.5],[627.5,285],[357.5,532.5],[363.75,202.5],[286.88,285],[425,532.5],[400.62,135],[569.38,450],[569.38,367.5],[155,450],[434.38,367.5],[636.88,367.5],[84.38,285],[151.88,285],[222.5,532.5],[290,532.5],[155,532.5],[87.5,532.5],[20,532.5],[219.38,285],[69.38,367.5],[713.75,285],[704.38,367.5],[771.88,367.5],[848.75,285],[906.88,367.5],[839.38,367.5],[400.62,0]],"e":[[0,1,0,18.75,0,-18.75],[1,3,9.38,18.75,0,-18.75],[0,4,12.5,18.75,0,-18.75,[169.06,120,324.38,120]],[4,5,-9.38,18.75,0,-18.75],[2,6,9.38,18.75,12.5,-18.75,[746.56,120,959.38,120,959.38,420,803.12,420]],[5,7,9.38,18.75,0,-18.75,[324.38,255,373.12,255]],[7,8,0,18.75,0,-18.75,[373.12,352.5,308.75,352.5]],[7,9,12.5,18.75,0,-18.75],[2,11,-9.38,18.75,0,-18.75],[11,12,0,18.75,0,-18.75],[9,13,0,18.75,0,-18.75],[1,14,-9.38,18.75,0,-18.75,[147.19,187.5,98.44,187.5]],[12,15,-14.06,18.75,0,-18.75,[713.75,255,511.25,255]],[15,16,9.38,18.75,0,-18.75],[12,17,-4.69,18.75,0,-18.75,[723.13,270,646.25,270]],[13,18,-9.38,18.75,0,-18.75],[4,19,9.38,18.75,0,-18.75,[333.75,187.5,382.5,187.5]],[5,20,-9.38,18.75,0,-18.75],[13,21,9.38,18.75,0,-18.75,[395,502.5,443.75,502.5]],[10,22,0,18.75,0,-18.75],[22,23,0,18.75,-12.5,-18.75,[419.38,420,575.62,420]],[17,24,-9.38,18.75,0,-18.75,[636.88,337.5,588.12,337.5]],[24,23,0,18.75,0,-18.75],[0,25,-12.5,18.75,-9.38,-18.75,[144.06,120,54.38,120,54.38,420,164.38,420]],[8,25,-9.38,18.75,9.38,-18.75,[299.38,420,183.12,420]],[15,26,-9.38,18.75,0,-18.75,[501.88,337.5,453.12,337.5]],[17,27,9.38,18.75,0,-18.75],[27,6,0,18.75,-12.5,-18.75,[655.62,420,778.12,420]],[3,28,-4.69,18.75,0,-18.75,[161.25,270,103.12,270]],[3,29,4.69,18.75,0,-18.75],[25,30,7.5,18.75,0,-18.75,[181.25,517.5,241.25,517.5]],[25,31,15,18.75,-9.38,-18.75,[188.75,502.5,299.38,502.5]],[8,31,9.38,18.75,9.38,-18.75],[25,32,0,18.75,0,-18.75],[25,33,-7.5,18.75,0,-18.75,[166.25,517.5,106.25,517.5]],[25,34,-15,18.75,0,-18.75,[158.75,502.5,38.75,502.5]],[3,35,14.06,18.75,0,-18.75,[180,255,238.12,255]],[3,36,-14.06,18.75,-9.38,-18.75,[151.88,255,69.38,255,69.38,337.5,78.75,337.5]],[7,36,-12.5,18.75,9.38,-18.75,[360.62,337.5,97.5,337.5]],[12,37,4.69,18.75,0,-18.75],[37,38,-9.38,18.75,0,-18.75],[38,23,0,18.75,12.5,-18.75,[723.12,435,600.62,435]],[37,39,9.38,18.75,0,-18.75,[741.88,337.5,790.62,337.5]],[39,6,0,18.75,0,-18.75],[12,40,14.06,18.75,0,-18.75,[741.88,255,867.5,255]],[40,41,9.38,18.75,0,-18.75,[876.88,337.5,925.62,337.5]],[40,42,-9.38,18.75,0,-18.75],[43,0,-12.5,18.75,0,-18.75,[406.88,52.5,156.56,52.5]],[43,2,12.5,18.75,0,-18.75,[431.88,52.5,737.19,52.5]],[43,10,0,18.75,0,-18.75]],"vp":[20.0,0.0,940.0,570.0]}} Hierarchic Layout obtained with default settingsConceptThe layout algorithm runs in three main phases: - *

- *
    - *
  • - * Layering – The nodes are distributed into layers by means of {@link yfiles.hierarchic.HierarchicLayout#fromScratchLayerer} or - * {@link yfiles.hierarchic.HierarchicLayout#fixedElementsLayerer}, respectively. If the layout orientation is top-to-bottom, the nodes in each layer are arranged horizontally while the - * layers are ordered vertically top-to-bottom. - *
  • - *
  • - * Sequencing – The order of the nodes in each layer is determined such that the number of edge crossings is as small as possible. To - * specify the sequencing algorithm, use {@link yfiles.hierarchic.HierarchicLayout#fromScratchSequencer} or {@link yfiles.hierarchic.HierarchicLayout#fixedElementsSequencer}. - *
  • - *
  • Drawing – The layout algorithm assigns the final coordinates to all nodes and routes the edges.
  • - *
- *

- * Features - *

- *

- * This layout algorithm is able to create hierarchic layouts from scratch or add new elements to the existing sketch - * drawing incrementally. In order to add elements incrementally to the current sketch or let the algorithm optimize - * certain elements in the current sketch, set the layout mode to {@link yfiles.hierarchic.LayoutMode#INCREMENTAL}. Then register a - * {@link yfiles.algorithms.IDataProvider} (e.g. use {@link yfiles.algorithms.Maps#createHashedDataMap}) with the graph using the {@link yfiles.hierarchic.HierarchicLayout#INCREMENTAL_HINTS_DP_KEY} - * DataProvider key and associate the hints obtained from the {@link yfiles.hierarchic.IIncrementalHintsFactory} with the elements - * to be added incrementally. - *

- *

- * {@link yfiles.hierarchic.NodeLayoutDescriptor} and {@link yfiles.hierarchic.EdgeLayoutDescriptor} instances can be used for specifying - * individual information (e.g. distances or routing styles) for each node and edge in the graph. The descriptors are bound - * to the graph using {@link yfiles.algorithms.IDataProvider}s registered with {@link yfiles.hierarchic.HierarchicLayoutCore#NODE_LAYOUT_DESCRIPTOR_DP_KEY} - * or {@link yfiles.hierarchic.HierarchicLayoutCore#EDGE_LAYOUT_DESCRIPTOR_DP_KEY}. If there is no descriptor assigned to some - * nodes/edges, a default descriptor will be used. To set default descriptors use {@link yfiles.hierarchic.HierarchicLayout#nodeLayoutDescriptor} and {@link yfiles.hierarchic.HierarchicLayout#edgeLayoutDescriptor}. - *

- *

- * {@link yfiles.hierarchic.HierarchicLayout} supports two approaches to connect edges on a specific side or even an exact location - * to a node. {@link yfiles.layout.PortConstraint}s define a single constraint for the ports of an edge. To realize more complex - * port restrictions, several {@link yfiles.layout.PortCandidate}s or {@link yfiles.layout.PortCandidateSet}s can be assigned to edges or - * nodes. If an edge with registered {@link yfiles.layout.PortCandidate}s connects to nodes with {@link yfiles.layout.PortCandidateSet}s, - * the layouter will try to match both collections to find an appropriate port. In case there is no matching port - * candidate, a {@link yfiles.layout.PortCandidate} specified for the edge is preferred. For the matching to work properly, the - * candidates in both collection need to be the same instances. Since their simultaneous existence at the same node may be - * ambiguous, it is not recommended to use a combination of {@link yfiles.layout.PortConstraint}s and - * {@link yfiles.layout.PortCandidate}s in the same layout. - *

- *

- * The edge grouping feature of this layout algorithm is restricted to normal, hierarchic edges. Edges with {@link yfiles.hierarchic.EdgeLayoutDescriptor#recursiveEdgeStyle recursive edge style} - * {@link yfiles.hierarchic.RecursiveEdgeStyle#DIRECTED} or {@link yfiles.hierarchic.RecursiveEdgeStyle#UNDIRECTED} will not be grouped. - * They are also not grouped when enabling {@link yfiles.hierarchic.HierarchicLayout#automaticEdgeGrouping automatic edge grouping}. - *

- * @class - * @extends {yfiles.layout.MultiStageLayout} - */ - export interface HierarchicLayout extends yfiles.layout.MultiStageLayout{} - export class HierarchicLayout { - /** - * Creates a new {@link yfiles.hierarchic.HierarchicLayout} instance with the default settings. - */ - constructor(); - /** - * Configures the core layout algorithm with the settings of this {@link yfiles.hierarchic.HierarchicLayout} instance. - *

- * This method is called by {@link yfiles.hierarchic.HierarchicLayout#applyLayoutCore} before the actual layout is calculated. It - * may be overridden in order to manually reconfigure the core layout algorithm. - *

- *

- * This implementation will temporarily set a {@link yfiles.hierarchic.PortCandidateOptimizer} if a {@link yfiles.algorithms.IDataProvider} - * is registered with {@link yfiles.layout.PortCandidateSet#NODE_PORT_CANDIDATE_SET_DP_KEY} and no {@link yfiles.hierarchic.HierarchicLayoutCore#portConstraintOptimizer} is assigned. - *

- * @param graph the input graph - * @param coreLayouter the given core layout algorithm instance - * @protected - */ - configureCoreLayout(graph:yfiles.layout.LayoutGraph,coreLayouter:yfiles.hierarchic.HierarchicLayoutCore):void; - /** - * Returns a new {@link yfiles.hierarchic.EdgeLayoutDescriptor} instance that will be used during the various phases of the layout - * algorithm to determine the drawing details of the edges of the graph. - *

- * This method may be overridden to create a new {@link yfiles.hierarchic.EdgeLayoutDescriptor} instance with different - * configuration settings. - *

- * @returns a new {@link } instance - * @protected - */ - createEdgeLayoutDescriptor():yfiles.hierarchic.EdgeLayoutDescriptor; - /** - * Returns a new {@link yfiles.hierarchic.HierarchicLayoutCore} instance. - *

- * This method may be overridden to create a new {@link yfiles.hierarchic.HierarchicLayoutCore} object with different configuration - * settings. - *

- *

- * This factory method provides the initial {@link yfiles.hierarchic.HierarchicLayoutCore} instance. - *

- * @returns a new {@link } instance - * @protected - */ - createHierarchicLayoutCore():yfiles.hierarchic.HierarchicLayoutCore; - /** - * Returns a {@link yfiles.hierarchic.IIncrementalHintsFactory} instance that must be used to obtain hints to be associated with - * graph elements that should be laid out incrementally. - *

- * Use this factory and a {@link yfiles.algorithms.IDataProvider} that is registered to the graph using the {@link yfiles.hierarchic.HierarchicLayout#INCREMENTAL_HINTS_DP_KEY} - * key to associate appropriate hints with the graph elements that should be laid out incrementally by the algorithm. - *

- * @returns a new {@link } instance - * @see yfiles.hierarchic.HierarchicLayoutCore#createIncrementalHintsFactory - * @see yfiles.hierarchic.HierarchicLayout#INCREMENTAL_HINTS_DP_KEY - * @see yfiles.algorithms.Graph#addDataProvider - * @see yfiles.hierarchic.HierarchicLayout#layoutMode - * @see yfiles.hierarchic.LayoutMode#INCREMENTAL - */ - createIncrementalHintsFactory():yfiles.hierarchic.IIncrementalHintsFactory; - /** - * Creates and registers an incremental layer constraint factory for an {@link yfiles.graph.IGraph}. - * @param graph The graph for which the factory is created - * @returns the sequence constraint factory - */ - createLayerConstraintFactory(graph:yfiles.graph.IGraph):yfiles.hierarchic.ILayerConstraintFactory; - /** - * Returns a {@link yfiles.hierarchic.ILayerConstraintFactory} instance that can be used for specifying layer constraints for the - * given graph. - *

- * The instance is usually bound to {@link yfiles.algorithms.Graph} instance - * graph, i.e., if the input graph for the layerer changes, a new instance must be retrieved. This instance can be used for - * creating constraints for this graph instance. - *

- *

- * You can create an instance without binding it to a graph instance initially by passing a null parameter. In that case, - * you must bind the returned instance to the graph, see {@link yfiles.hierarchic.HierarchicLayout#LAYER_CONSTRAINTS_MEMENTO_DP_KEY} - * and {@link yfiles.hierarchic.ILayerConstraintFactory#memento}. - *

- * @param graph the input graph - * @returns a new {@link } instance - */ - createLayerConstraintFactory(graph:yfiles.algorithms.Graph):yfiles.hierarchic.ILayerConstraintFactory; - /** - * Returns a new {@link yfiles.hierarchic.NodeLayoutDescriptor} instance that will be used during the various phases of the layout - * algorithm to determine the drawing details of the nodes of the graph. - *

- * This method may be overridden to create a new {@link yfiles.hierarchic.NodeLayoutDescriptor} instance with different - * configuration settings. - *

- * @returns a new {@link } instance - * @protected - */ - createNodeLayoutDescriptor():yfiles.hierarchic.NodeLayoutDescriptor; - /** - * Creates and registers a sequencer constraint factory for an {@link yfiles.graph.IGraph}. - * @param graph The graph. - * @returns the sequence constraint factory - */ - createSequenceConstraintFactory(graph:yfiles.graph.IGraph):yfiles.hierarchic.ISequenceConstraintFactory; - /** - * Returns a {@link yfiles.hierarchic.ISequenceConstraintFactory} instance that can be used for specifying sequence constraints for - * the given graph. - *

- * For these sequence constraints to have any effect, the {@link yfiles.hierarchic.ISequencer} that determines the in-layer node - * order (sequence) has to support constraints. Both, {@link yfiles.hierarchic.DefaultLayerSequencer DefaultLayerSequencer} and the incremental sequencer used internally support - * sequence constraints. - *

- * @param graph the input graph - * @returns a {@link } instance - * @see yfiles.hierarchic.HierarchicLayout#fromScratchSequencer - * @see yfiles.hierarchic.HierarchicLayout#fixedElementsSequencer - */ - createSequenceConstraintFactory(graph:yfiles.layout.LayoutGraph):yfiles.hierarchic.ISequenceConstraintFactory; - /** - * Disposes of the core layout algorithm. - *

- * This method is called by {@link yfiles.hierarchic.HierarchicLayout#applyLayoutCore} after the actual layout is calculated. It - * may be overridden in order to revert a custom configuration made in - * {@link yfiles.hierarchic.HierarchicLayout#configureCoreLayout}. - *

- *

- * This implementation will remove the {@link yfiles.hierarchic.PortCandidateOptimizer} that was created in case a {@link yfiles.algorithms.IDataProvider} - * is registered with {@link yfiles.layout.PortCandidateSet#NODE_PORT_CANDIDATE_SET_DP_KEY} and no {@link yfiles.hierarchic.HierarchicLayoutCore#portConstraintOptimizer} was initially assigned. - *

- * @param graph the input graph - * @param coreLayouter the given core layout algorithm instance - * @protected - */ - disposeCoreLayout(graph:yfiles.layout.LayoutGraph,coreLayouter:yfiles.hierarchic.HierarchicLayoutCore):void; - /** - * Returns the mirror mask of the {@link yfiles.layout.MultiStageLayout#orientationLayout orientation layouter}. - *

- * It may be overridden in order to configure a different mirror mask. - *

- * @returns the mirror mask - * @protected - */ - getMirrorMode():yfiles.layout.MirrorModes; - /** - * Data provider key for specifying the directedness of edges - *

- * Generally, the hierarchic layout algorithm assigns nodes to layers such that most of the edges point in the - * {@link yfiles.layout.MultiStageLayout#layoutOrientation main layout direction}. The directedness of an edge specifies whether it should comply with this strategy. More - * precisely, a value of 1 means that the edge should fully comply, a value of -1 that it should comply inversely (the edge - * should point against the main layout direction), and a value of 0 means that the direction doesn't matter at all and the - * endpoints of the edges may be placed at the same layer. If there are conflicting preferences, edges with higher absolute - * values are more likely to point in the desired direction. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static EDGE_DIRECTEDNESS_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for defining the priority of critical edges - *

- * Critical edges highlight different edge paths that are relevant for a user. The layouter tries to vertically align each - * node pair that is connected by a critical edge. Conflicts between different critical edges are always resolved in favor - * of the higher priority. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static CRITICAL_EDGE_PRIORITY_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for specifying the thickness of the edges - *

- * The specified non-negative thickness is considered when calculating minimum distances so that there are no overlaps - * between edges and other graph elements. By default, each edge has thickness 0. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static EDGE_THICKNESS_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for specifying incremental hints - *

- * Incremental hints are created using an {@link yfiles.hierarchic.HierarchicLayout#createIncrementalHintsFactory incremental hints factory}. - *

- * @see yfiles.hierarchic.HierarchicLayoutCore#INCREMENTAL_HINTS_DP_KEY - * @see yfiles.hierarchic.IIncrementalHintsFactory - * @const - * @static - * @type {yfiles.algorithms.GraphObjectDpKey.} - */ - static INCREMENTAL_HINTS_DP_KEY:yfiles.algorithms.GraphObjectDpKey; - /** - * Data acceptor key for publishing the layer IDs for all nodes in the graph - * @see yfiles.hierarchic.HierarchicLayoutCore#LAYER_INDEX_DP_KEY - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static LAYER_INDEX_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data acceptor key for publishing the index inside their layer for all nodes in the graph - * @see yfiles.hierarchic.HierarchicLayoutCore#SEQUENCE_INDEX_DP_KEY - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static SEQUENCE_INDEX_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for defining swimlanes for the nodes - *

- * The layout algorithm will arrange nodes in swimlanes according to the registered descriptors. - *

- *

- * Layout information about the swimlanes is finally written back to the descriptor instances. Instances can be shared - * among multiple nodes in the same lane. - *

- * @see yfiles.hierarchic.HierarchicLayoutCore#SWIMLANE_DESCRIPTOR_DP_KEY - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static SWIMLANE_DESCRIPTOR_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for associating an alternative bounds with the collapsed/expanded group - *

- * When running in {@link yfiles.hierarchic.LayoutMode#INCREMENTAL incremental} - * {@link yfiles.hierarchic.HierarchicLayout#layoutMode layout mode}, the alternative bounds of the collapsed/expanded group will be used during the layering and sequencing - * phase of the algorithm. - *

- * @see yfiles.hierarchic.HierarchicLayout#ALTERNATIVE_EDGE_PATH_DP_KEY - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static ALTERNATIVE_GROUP_BOUNDS_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for associating alternative paths for edges connecting to groups, group content or folder nodes - *

- * When running in {@link yfiles.hierarchic.LayoutMode#INCREMENTAL incremental} - * {@link yfiles.hierarchic.HierarchicLayout#layoutMode layout mode}, the alternative edge paths are considered during the routing of fixed (i.e., non-incremental) edges. - *

- *

- * The alternative paths should be used in conjunction with {@link yfiles.hierarchic.HierarchicLayout#ALTERNATIVE_GROUP_BOUNDS_DP_KEY alternative group bounds} to achieve more stable layout results - * when collapsing/expanding a group node as follows: - *

- *
    - *
  1. - * Collapsing: edges adjacent to the group itself and edges where one of the endpoints (source/target) lies inside the - * group should get the path before collapsing the group as alternative path. If both endpoints are either inside or outside the - * group, no alternative path is required. - *
  2. - *
  3. - * Expanding: edges adjacent to the expanded folder node (which is now a group) should get the path before expanding as - * alternative path. - *
  4. - *
- * @see yfiles.hierarchic.HierarchicLayout#ALTERNATIVE_GROUP_BOUNDS_DP_KEY - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static ALTERNATIVE_EDGE_PATH_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for marking folder nodes - *

- * When using recursive edge styles in incremental mode, edges will also start at the bottom and end at the top of marked - * folder nodes. This will keep the edge routes more stable since the connection sides won't change. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static FOLDER_NODES_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for storing the constraint graph - *

- * A v1 before v2 constraint is represented as an edge between the representatives of v1 and v2 in the constraint graph. - *

- * @const - * @static - * @type {yfiles.algorithms.GraphDpKey.} - */ - static SEQUENCE_CONSTRAINTS_MEMENTO_DP_KEY:yfiles.algorithms.GraphDpKey; - /** - * Data provider key for storing the constraint graph - * @const - * @static - * @type {yfiles.algorithms.GraphDpKey.} - */ - static LAYER_CONSTRAINTS_MEMENTO_DP_KEY:yfiles.algorithms.GraphDpKey; - /** - * Gets or sets the group layer alignment strategy used for recursive group layering. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown group alignment policy is given - * @see yfiles.hierarchic.HierarchicLayout#recursiveGroupLayering - * @type {yfiles.hierarchic.GroupAlignmentPolicy} - */ - groupAlignmentPolicy:yfiles.hierarchic.GroupAlignmentPolicy; - /** - * Gets or sets whether or not layer compaction for recursive group layering is active. - *

- * The number of node layers is decreased if possible without reversing edge directions. The resulting layering tries to - * keep the layer span of a group node minimum while minimizing the overall vertical space. - *

- * @see yfiles.hierarchic.HierarchicLayout#recursiveGroupLayering - * @type {boolean} - */ - compactGroups:boolean; - /** - * Gets or sets the policy that specifies how to arrange connected components. - * @throws {Stubs.Exceptions.ArgumentError} if the specified policy does not match a default component arrangement policy - * @type {yfiles.hierarchic.ComponentArrangementPolicy} - */ - componentArrangementPolicy:yfiles.hierarchic.ComponentArrangementPolicy; - /** - * Gets or sets the time limit (in milliseconds) set for the layout algorithm. - *

- * Values have to be greater or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the maximum duration is negative - * @type {number} - */ - maximumDuration:number; - /** - * Gets or sets whether or not groups are respected during the layering stage. - *

- * If this option is enabled, groups are layered recursively, i.e. - *

- *
    - *
  • nodes in the same group always occupy adjacent layers
  • - *
  • layer intervals spanned by different group nodes are either disjoint or are nested
  • - *
- *

- * If it is disabled, group information is ignored for the layering step. - *

- *

- * If the graph is flat, this setting is ignored. - *

- * @see yfiles.hierarchic.HierarchicLayout#compactGroups - * @type {boolean} - */ - recursiveGroupLayering:boolean; - /** - * Gets or sets the equidistant spacing between the horizontal and vertical grid lines. - *

- * When the spacing is negative or zero, no grid is defined, otherwise nodes and edges are placed on multiples of the grid - * spacing. - *

- * @see yfiles.hierarchic.IIncrementalHintsFactory - * @type {number} - */ - gridSpacing:number; - /** - * Gets or sets whether or not reversed edges should be routed as back-loops. - *

- * When this option is enabled, back-loops attach to the same node sides as the other edges, i.e., for layout orientation - * top-to-bottom, they leave their source at the bottom and enter their target at the top. - *

- * @type {boolean} - */ - backLoopRouting:boolean; - /** - * Gets or sets whether or not self-loops should be routed in a similar manner as back-loops. - *

- * Self-loops will start at the bottom of their attached nodes and end at the top of them. - *

- * @see yfiles.hierarchic.HierarchicLayout#backLoopRouting - * @type {boolean} - */ - backLoopRoutingForSelfLoops:boolean; - /** - * Gets or sets whether or not edges are grouped automatically. - *

- * The automatic edge grouping tries to group a high number of edges without changing the semantic of the graph, i.e., it - * groups edges either at a common source node or a common target node. Edge groupings often allow more compact layouts - * since grouped edges are routed in a bus-style manner. - *

- * @type {boolean} - */ - automaticEdgeGrouping:boolean; - /** - * Gets or sets whether or not edges should be routed orthogonally. - *

- * When orthogonal routing is enabled, all resulting edge paths will be composed of vertical and horizontal segments, - * only. - *

- * @type {boolean} - */ - orthogonalRouting:boolean; - /** - * Gets or sets whether or not the layout algorithm reserves space for labels and places them. - *

- * To define the desired placement for each label add a {@link yfiles.layout.PreferredPlacementDescriptor} on - * {@link yfiles.layout.IEdgeLabelLayout}. - *

- *

- * This method is a convenience method that assures that the {@link yfiles.layout.MultiStageLayout#labeling labeling algorithm} is of type {@link yfiles.layout.LabelLayoutTranslator} - * and {@link yfiles.layout.LabelLayoutTranslator#translateEdgeLabels} is set to true. - *

- * @throws {Stubs.Exceptions.InvalidOperationError} if integrated labeling should be enabled but the current {@link yfiles.layout.MultiStageLayout#labeling labeling algorithm} is not of type - * {@link yfiles.layout.LabelLayoutTranslator} - * @throws {Stubs.Exceptions.InvalidOperationError} if no properly configured {@link yfiles.layout.LabelLayoutTranslator} is registered even though integrated labeling was enabled - * earlier (can happen when manually specifying the {@link yfiles.layout.MultiStageLayout#labeling labeling algorithm}). - * @type {boolean} - */ - integratedEdgeLabeling:boolean; - /** - * Gets or sets whether or not the layout algorithm considers node labels when calculating node positions to avoid - * overlaps. - *

- * This method is a convenience method that assures that the {@link yfiles.layout.MultiStageLayout#labeling labeling algorithm} is of type {@link yfiles.layout.LabelLayoutTranslator} - * and {@link yfiles.layout.LabelLayoutTranslator#translateNodeLabels} is set to true. - *

- * @throws {Stubs.Exceptions.InvalidOperationError} if this property should be enabled but the current {@link yfiles.layout.MultiStageLayout#labeling labeling algorithm} is not of type - * {@link yfiles.layout.LabelLayoutTranslator} - * @throws {Stubs.Exceptions.InvalidOperationError} if no properly configured {@link yfiles.layout.LabelLayoutTranslator} is registered even though this property was enabled - * earlier (can happen when manually specifying the {@link yfiles.layout.MultiStageLayout#labeling labeling algorithm}). - * @type {boolean} - */ - considerNodeLabels:boolean; - /** - * Gets or sets the minimum distance between two adjacent layers. - *

- * The specified distance should have a non-negative value. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the distance is negative - * @type {number} - */ - minimumLayerDistance:number; - /** - * Gets or sets whether or not to stop the layout algorithm after the layering step. - *

- * By then, each node will be assigned to a layer. Since the sequencing and drawing phases are skipped, the order of the - * nodes within a layer matches the initial order of the nodes, edges won't be routed and the nodes won't get coordinates - * assigned. - *

- *

- * The calculated layering information can be retrieved from the {@link yfiles.algorithms.IDataProvider} registered with the key - * {@link yfiles.hierarchic.HierarchicLayout#LAYER_INDEX_DP_KEY}. - *

- * @see yfiles.hierarchic.HierarchicLayout#LAYER_INDEX_DP_KEY - * @type {boolean} - */ - stopAfterLayering:boolean; - /** - * Gets or sets whether or not to stop the layout algorithm after the sequencing step. - *

- * By then, each node will be assigned to a layer and will have a place in the sequence of nodes in this layer. Since the - * drawing phase is skipped, edges won't be routed and the nodes won't get coordinates assigned. - *

- *

- * The calculated layering and sequencing information can be retrieved from the {@link yfiles.algorithms.IDataProvider}s registered - * with the keys {@link yfiles.hierarchic.HierarchicLayout#LAYER_INDEX_DP_KEY} and - * {@link yfiles.hierarchic.HierarchicLayout#SEQUENCE_INDEX_DP_KEY}. - *

- * @see yfiles.hierarchic.HierarchicLayout#SEQUENCE_INDEX_DP_KEY - * @see yfiles.hierarchic.HierarchicLayout#LAYER_INDEX_DP_KEY - * @type {boolean} - */ - stopAfterSequencing:boolean; - /** - * Gets or sets the minimum distance between two adjacent nodes in one layer. - *

- * All values have to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the distance is negative - * @throws {Stubs.Exceptions.InvalidOperationError} if the current {@link yfiles.hierarchic.IDrawingDistanceCalculator} is not an instance of - * {@link yfiles.hierarchic.DefaultDrawingDistanceCalculator} - * @type {number} - */ - nodeToNodeDistance:number; - /** - * Gets or sets the minimum distance between an edge and an adjacent node in one layer. - *

- * All values have to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the distance is negative - * @throws {Stubs.Exceptions.InvalidOperationError} if the current {@link yfiles.hierarchic.IDrawingDistanceCalculator} is not an instance of - * {@link yfiles.hierarchic.DefaultDrawingDistanceCalculator} - * @type {number} - */ - nodeToEdgeDistance:number; - /** - * Gets or sets the minimum distance between two adjacent edges in one layer. - *

- * All values have to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the distance is negative - * @throws {Stubs.Exceptions.InvalidOperationError} if the current {@link yfiles.hierarchic.IDrawingDistanceCalculator} is not an instance of - * {@link yfiles.hierarchic.DefaultDrawingDistanceCalculator} - * @type {number} - */ - edgeToEdgeDistance:number; - /** - * Gets or sets whether or not to separate layers. - *

- * In case layers are not separated, nodes of a layer may extend into adjacent layers. Otherwise, nodes of different layers - * are strictly separated, i.e., layers are placed below each other. - *

- * @type {boolean} - */ - separateLayers:boolean; - /** - * Gets the {@link yfiles.hierarchic.DefaultDrawingDistanceCalculator} that is registered with the layout algorithm by default. - * @throws {Stubs.Exceptions.InvalidOperationError} if the current instance returned by {@link yfiles.hierarchic.HierarchicLayoutCore#drawingDistanceCalculator} is not an instance of {@link yfiles.hierarchic.DefaultDrawingDistanceCalculator} - * @protected - * @type {yfiles.hierarchic.DefaultDrawingDistanceCalculator} - */ - defaultDrawingDistanceCalculator:yfiles.hierarchic.DefaultDrawingDistanceCalculator; - /** - * Gets the current layout algorithm instance. - *

- * By default, this method will return a {@link yfiles.hierarchic.HierarchicLayoutCore} instance created with - * {@link yfiles.hierarchic.HierarchicLayout#createHierarchicLayoutCore}. - *

- * @see yfiles.hierarchic.HierarchicLayout#createHierarchicLayoutCore - * @type {yfiles.hierarchic.HierarchicLayoutCore} - */ - hierarchicLayoutCore:yfiles.hierarchic.HierarchicLayoutCore; - /** - * Gets or sets a predefined layering strategy for the {@link yfiles.hierarchic.HierarchicLayout#fromScratchLayerer from scratch} layerer. - *

- * The layouter assigns the nodes to separate layers. The nodes within each layer will be placed on the same horizontal - * layer. The layers will be arranged vertically starting with the small-numbered layers. - *

- *

- * An important layering strategy for the hierarchic layout style is called Hierarchical Layering. A hierarchical layering - * tries to assign nodes to layers in a way such that as much edges of the graph as possible will point to the main layout - * direction, i.e., the start nodes of the edges will be in a layer with a smaller number than the corresponding end nodes. - * Also, a hierarchical layering will never put two connected nodes in the same layer. - *

- *

- * This method wraps the internal implementations into a {@link yfiles.hierarchic.MultiComponentLayerer} instance so that it is - * possible to specify the behavior of the algorithm if the {@link yfiles.layout.MultiStageLayout#componentLayoutEnabled component layouter} is disabled. - *

- * @throws {Stubs.Exceptions.ArgumentError} if an unknown strategy is given - * @type {yfiles.hierarchic.LayeringStrategy} - */ - fromScratchLayeringStrategy:yfiles.hierarchic.LayeringStrategy; - /** - * Gets or sets the {@link yfiles.hierarchic.ILayerer} instance that obtains the layering for the nodes if the layout algorithm - * runs in {@link yfiles.hierarchic.LayoutMode#FROM_SCRATCH From Scratch mode}. - *

- * If the graph consists of multiple components, then the {@link yfiles.hierarchic.ILayerer} instance should be wrapped in - * {@link yfiles.hierarchic.MultiComponentLayerer}. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the {@link yfiles.hierarchic.ILayerer} is null - * @see yfiles.hierarchic.HierarchicLayout#layoutMode - * @type {yfiles.hierarchic.ILayerer} - */ - fromScratchLayerer:yfiles.hierarchic.ILayerer; - /** - * Gets or sets the {@link yfiles.hierarchic.ISequencer} instance that calculates the node sequence if the layout algorithm runs in - * {@link yfiles.hierarchic.LayoutMode#FROM_SCRATCH From Scratch mode}. - * @throws {Stubs.Exceptions.ArgumentError} if the {@link yfiles.hierarchic.ISequencer} is null - * @see yfiles.hierarchic.HierarchicLayout#fromScratchLayerer - * @see yfiles.hierarchic.HierarchicLayout#layoutMode - * @type {yfiles.hierarchic.ISequencer} - */ - fromScratchSequencer:yfiles.hierarchic.ISequencer; - /** - * Gets or sets the {@link yfiles.hierarchic.INodePlacer} instance that will calculate the final node placement of the layout. - * @throws {Stubs.Exceptions.ArgumentError} if the {@link yfiles.hierarchic.INodePlacer} is null - * @type {yfiles.hierarchic.INodePlacer} - */ - nodePlacer:yfiles.hierarchic.INodePlacer; - /** - * Gets or sets the {@link yfiles.hierarchic.ILayerer} instance that obtains the layering for fixed nodes during the incremental - * layout run. - * @throws {Stubs.Exceptions.ArgumentError} if the {@link yfiles.hierarchic.ILayerer} is null - * @see yfiles.hierarchic.HierarchicLayout#layoutMode - * @type {yfiles.hierarchic.ILayerer} - */ - fixedElementsLayerer:yfiles.hierarchic.ILayerer; - /** - * Gets or sets the {@link yfiles.hierarchic.ISequencer} instance that calculates the sequence of the fixed nodes during the - * incremental layout run. - * @throws {Stubs.Exceptions.ArgumentError} if the given {@link yfiles.hierarchic.ISequencer} is null - * @see yfiles.hierarchic.HierarchicLayout#layoutMode - * @type {yfiles.hierarchic.ISequencer} - */ - fixedElementsSequencer:yfiles.hierarchic.ISequencer; - /** - * Gets or sets the layout mode this layouter should use for upcoming layouts. - *

- * Depending on the mode the layout algorithm will use different {@link yfiles.hierarchic.ILayerer} and {@link yfiles.hierarchic.ISequencer} - * implementations. - *
- *

- * @throws {Stubs.Exceptions.ArgumentError} if the given layout mode is unknown - * @see yfiles.hierarchic.HierarchicLayout#fromScratchLayerer - * @see yfiles.hierarchic.HierarchicLayout#fromScratchSequencer - * @see yfiles.hierarchic.HierarchicLayout#fixedElementsLayerer - * @see yfiles.hierarchic.HierarchicLayout#fixedElementsSequencer - * @type {yfiles.hierarchic.LayoutMode} - */ - layoutMode:yfiles.hierarchic.LayoutMode; - /** - * Gets or sets the {@link yfiles.hierarchic.EdgeLayoutDescriptor} instance used for all those edges that do not have a specific - * layout descriptor assigned. - *

- * By default, this method will return a {@link yfiles.hierarchic.EdgeLayoutDescriptor} instance created with - * {@link yfiles.hierarchic.HierarchicLayout#createEdgeLayoutDescriptor}. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the {@link yfiles.hierarchic.EdgeLayoutDescriptor} is null - * @see yfiles.hierarchic.HierarchicLayoutCore#EDGE_LAYOUT_DESCRIPTOR_DP_KEY - * @type {yfiles.hierarchic.EdgeLayoutDescriptor} - */ - edgeLayoutDescriptor:yfiles.hierarchic.EdgeLayoutDescriptor; - /** - * Gets or sets the {@link yfiles.hierarchic.NodeLayoutDescriptor} instance used for all those nodes that do not have a specific - * layout descriptor assigned. - *

- * By default, this method will return a {@link yfiles.hierarchic.NodeLayoutDescriptor} instance created with - * {@link yfiles.hierarchic.HierarchicLayout#createNodeLayoutDescriptor}. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given {@link yfiles.hierarchic.NodeLayoutDescriptor} is null - * @see yfiles.hierarchic.HierarchicLayoutCore#NODE_LAYOUT_DESCRIPTOR_DP_KEY - * @see yfiles.hierarchic.HierarchicLayout#createNodeLayoutDescriptor - * @type {yfiles.hierarchic.NodeLayoutDescriptor} - */ - nodeLayoutDescriptor:yfiles.hierarchic.NodeLayoutDescriptor; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.HierarchicLayout; - } - /** - * This class arranges graphs in a hierarchic/layered fashion and supports complete re-layout as well as incremental graph - * layout. - *

- * Note that class {@link yfiles.hierarchic.HierarchicLayout} offers a facade to this class which is easier to use. Hence, we - * strongly recommend to not directly use class {@link yfiles.hierarchic.HierarchicLayoutCore}. - *

- *

- * Layout Style The nodes are distributed into layers such that most of the edges point to the main layout direction. The order of the - * nodes within the layers ensures that the number of edge crossings is as small as possible. There are different edge - * routing styles available. Edges can be orthogonal, polyline or octilinear. - *

- *

- * Hierarchical diagrams are commonly used for the visualization of hierarchical data, since they facilitate the - * identification of dependencies and relationships among the nodes of the graph. Possible application domains are the - * following: workflow visualization, call graph visualization, entity-relationship diagrams, biochemical pathways and - * network management. - *

- *

- * {@graph {"ann":{"s":[37.5,37.5],"d":1},"n":[[137.81,67.5],[137.81,135],[718.44,67.5],[147.19,202.5],[305.62,135],[296.25,202.5],[771.88,450],[354.38,285],[290,367.5],[366.88,367.5],[400.62,67.5],[709.06,135],[709.06,202.5],[366.88,450],[79.69,202.5],[492.5,285],[501.88,367.5],[627.5,285],[357.5,532.5],[363.75,202.5],[286.88,285],[425,532.5],[400.62,135],[569.38,450],[569.38,367.5],[155,450],[434.38,367.5],[636.88,367.5],[84.38,285],[151.88,285],[222.5,532.5],[290,532.5],[155,532.5],[87.5,532.5],[20,532.5],[219.38,285],[69.38,367.5],[713.75,285],[704.38,367.5],[771.88,367.5],[848.75,285],[906.88,367.5],[839.38,367.5],[400.62,0]],"e":[[0,1,0,18.75,0,-18.75],[1,3,9.38,18.75,0,-18.75],[0,4,12.5,18.75,0,-18.75,[169.06,120,324.38,120]],[4,5,-9.38,18.75,0,-18.75],[2,6,9.38,18.75,12.5,-18.75,[746.56,120,959.38,120,959.38,420,803.12,420]],[5,7,9.38,18.75,0,-18.75,[324.38,255,373.12,255]],[7,8,0,18.75,0,-18.75,[373.12,352.5,308.75,352.5]],[7,9,12.5,18.75,0,-18.75],[2,11,-9.38,18.75,0,-18.75],[11,12,0,18.75,0,-18.75],[9,13,0,18.75,0,-18.75],[1,14,-9.38,18.75,0,-18.75,[147.19,187.5,98.44,187.5]],[12,15,-14.06,18.75,0,-18.75,[713.75,255,511.25,255]],[15,16,9.38,18.75,0,-18.75],[12,17,-4.69,18.75,0,-18.75,[723.13,270,646.25,270]],[13,18,-9.38,18.75,0,-18.75],[4,19,9.38,18.75,0,-18.75,[333.75,187.5,382.5,187.5]],[5,20,-9.38,18.75,0,-18.75],[13,21,9.38,18.75,0,-18.75,[395,502.5,443.75,502.5]],[10,22,0,18.75,0,-18.75],[22,23,0,18.75,-12.5,-18.75,[419.38,420,575.62,420]],[17,24,-9.38,18.75,0,-18.75,[636.88,337.5,588.12,337.5]],[24,23,0,18.75,0,-18.75],[0,25,-12.5,18.75,-9.38,-18.75,[144.06,120,54.38,120,54.38,420,164.38,420]],[8,25,-9.38,18.75,9.38,-18.75,[299.38,420,183.12,420]],[15,26,-9.38,18.75,0,-18.75,[501.88,337.5,453.12,337.5]],[17,27,9.38,18.75,0,-18.75],[27,6,0,18.75,-12.5,-18.75,[655.62,420,778.12,420]],[3,28,-4.69,18.75,0,-18.75,[161.25,270,103.12,270]],[3,29,4.69,18.75,0,-18.75],[25,30,7.5,18.75,0,-18.75,[181.25,517.5,241.25,517.5]],[25,31,15,18.75,-9.38,-18.75,[188.75,502.5,299.38,502.5]],[8,31,9.38,18.75,9.38,-18.75],[25,32,0,18.75,0,-18.75],[25,33,-7.5,18.75,0,-18.75,[166.25,517.5,106.25,517.5]],[25,34,-15,18.75,0,-18.75,[158.75,502.5,38.75,502.5]],[3,35,14.06,18.75,0,-18.75,[180,255,238.12,255]],[3,36,-14.06,18.75,-9.38,-18.75,[151.88,255,69.38,255,69.38,337.5,78.75,337.5]],[7,36,-12.5,18.75,9.38,-18.75,[360.62,337.5,97.5,337.5]],[12,37,4.69,18.75,0,-18.75],[37,38,-9.38,18.75,0,-18.75],[38,23,0,18.75,12.5,-18.75,[723.12,435,600.62,435]],[37,39,9.38,18.75,0,-18.75,[741.88,337.5,790.62,337.5]],[39,6,0,18.75,0,-18.75],[12,40,14.06,18.75,0,-18.75,[741.88,255,867.5,255]],[40,41,9.38,18.75,0,-18.75,[876.88,337.5,925.62,337.5]],[40,42,-9.38,18.75,0,-18.75],[43,0,-12.5,18.75,0,-18.75,[406.88,52.5,156.56,52.5]],[43,2,12.5,18.75,0,-18.75,[431.88,52.5,737.19,52.5]],[43,10,0,18.75,0,-18.75]],"vp":[20.0,0.0,940.0,570.0]}} Hierarchic Layout obtained with default settingsConceptThe layout algorithm runs in three main phases: - *

- *
    - *
  • - * Layering – The nodes are distributed into layers by means of - * {@link yfiles.hierarchic.HierarchicLayoutCore#layerer}. If the layout orientation is top-to-bottom, the nodes in each layer are arranged horizontally while the layers are - * ordered vertically top-to-bottom. - *
  • - *
  • - * Sequencing – The order of the nodes in each layer is determined such that the number of edge crossings is as small as possible. To - * specify the sequencing algorithm, use {@link yfiles.hierarchic.HierarchicLayoutCore#sequencer}. - *
  • - *
  • Drawing – The layout algorithm assigns the final coordinates to all nodes and routes the edges.
  • - *
- *

- * Features - *

- *

- * In order to customize this layout algorithm, modify the {@link yfiles.hierarchic.HierarchicLayoutCore#layerer Layerer}, {@link yfiles.hierarchic.HierarchicLayoutCore#sequencer Sequencer}, {@link yfiles.hierarchic.HierarchicLayoutCore#portAllocator PortAllocator}, {@link yfiles.hierarchic.HierarchicLayoutCore#drawingDistanceCalculator DrawingDistanceCalculator}, - * and {@link yfiles.hierarchic.HierarchicLayoutCore#nodePlacer NodePlacer} instances. - *

- *

- * This layout algorithm is able to incrementally add new elements to an existing drawing of a graph. In order to add - * elements incrementally, register a {@link yfiles.algorithms.IDataProvider} with the graph using the {@link yfiles.hierarchic.HierarchicLayoutCore#INCREMENTAL_HINTS_DP_KEY} - * DataProvider key and associate the hints obtained from the {@link yfiles.hierarchic.IIncrementalHintsFactory} with the elements - * to be added incrementally. - *

- *

- * {@link yfiles.hierarchic.NodeLayoutDescriptor} and {@link yfiles.hierarchic.EdgeLayoutDescriptor} instances can be used for specifying - * individual information (e.g. distances or routing styles) for each node and edge in the graph. The descriptors are bound - * to the graph using {@link yfiles.algorithms.IDataProvider}s registered with {@link yfiles.hierarchic.HierarchicLayoutCore#NODE_LAYOUT_DESCRIPTOR_DP_KEY} - * or {@link yfiles.hierarchic.HierarchicLayoutCore#EDGE_LAYOUT_DESCRIPTOR_DP_KEY}. - *

- *

- * {@link yfiles.hierarchic.HierarchicLayoutCore} supports two approaches to connect edges on a specific side or even an exact - * location to a node. {@link yfiles.layout.PortConstraint}s define a single constraint for the ports of an edge. To realize more - * complex port restrictions, several {@link yfiles.layout.PortCandidate}s or {@link yfiles.layout.PortCandidateSet}s can be assigned to - * edges or nodes. If an edge with registered {@link yfiles.layout.PortCandidate}s connects to nodes with - * {@link yfiles.layout.PortCandidateSet}s, the layouter will try to match both collections to find an appropriate port. In case - * there is no matching port candidate, a {@link yfiles.layout.PortCandidate} specified for the edge is preferred. Since their - * simultaneous existence at the same node may be ambiguous, it is not recommended to use a combination of - * {@link yfiles.layout.PortConstraint}s and {@link yfiles.layout.PortCandidate}s in the same layout. - *

- *

- * This algorithm specifies a {@link yfiles.layout.LabelLayoutTranslator} instance as the current {@link yfiles.layout.MultiStageLayout#labeling} and configures it such that the - * node labels are passed to it by setting {@link yfiles.layout.LabelLayoutTranslator#translateNodeLabels} to true. - *

- *

- * In order to enable integrated edge labeling of this algorithm, make sure {@link yfiles.layout.LabelLayoutTranslator} is - * registered and edge labels are being translated and written back after the layout. - *

- *

- * Moreover, this algorithm supports layer and sequence constraints. These constraints can be specified using a {@link yfiles.hierarchic.ILayerConstraintFactory} - * and {@link yfiles.hierarchic.ISequenceConstraintFactory}, respectively. - *

- * @see yfiles.hierarchic.HierarchicLayout - * @see yfiles.hierarchic.ILayerer - * @see yfiles.hierarchic.ISequencer - * @see yfiles.hierarchic.IPortAllocator - * @see yfiles.hierarchic.IDrawingDistanceCalculator - * @see yfiles.hierarchic.INodePlacer - * @class - * @extends {yfiles.layout.MultiStageLayout} - */ - export interface HierarchicLayoutCore extends yfiles.layout.MultiStageLayout{} - export class HierarchicLayoutCore { - /** - * Creates a new {@link yfiles.hierarchic.HierarchicLayoutCore} instance with the default settings. - * @see yfiles.hierarchic.HierarchicLayoutCore#createLayerer - * @see yfiles.hierarchic.HierarchicLayoutCore#createIncrementalLayerer - * @see yfiles.hierarchic.HierarchicLayoutCore#createSequencer - * @see yfiles.hierarchic.HierarchicLayoutCore#createDrawingDistanceCalculator - * @see yfiles.hierarchic.HierarchicLayoutCore#createNodePlacer - */ - constructor(); - /** - * Factory method that is called lazily upon first usage by {@link yfiles.hierarchic.HierarchicLayoutCore#drawingDistanceCalculator} if the given {@link yfiles.hierarchic.IDrawingDistanceCalculator} - * instance is null. - *

- * The default implementation returns a {@link yfiles.hierarchic.DefaultDrawingDistanceCalculator} instance. It may be overridden - * to return a custom {@link yfiles.hierarchic.DefaultDrawingDistanceCalculator} instance. - *

- * @returns a {@link } instance - * @see yfiles.hierarchic.HierarchicLayoutCore#drawingDistanceCalculator - * @protected - */ - createDrawingDistanceCalculator():yfiles.hierarchic.IDrawingDistanceCalculator; - /** - * Factory method called during {@link yfiles.hierarchic.HierarchicLayoutCore#applyLayoutCore} and reates an appropriate {@link yfiles.hierarchic.IEdgeReverser} - * implementation. - *

- * By default, a suitable private implementation of {@link yfiles.hierarchic.IEdgeReverser} is returned. It may be overridden to - * return a custom {@link yfiles.hierarchic.IEdgeReverser} implementation. - *

- * @returns an implementation - * @protected - */ - createEdgeReverser():yfiles.hierarchic.IEdgeReverser; - /** - * Factory method that is called during {@link yfiles.hierarchic.HierarchicLayoutCore#applyLayoutCore} and creates a {@link yfiles.layout.GroupingSupport} - * instance in case of a grouped graph. - * @param graph the input graph - * @returns a {@link } instance or null if the graph is not grouped - * @protected - */ - createGrouping(graph:yfiles.layout.LayoutGraph):yfiles.layout.GroupingSupport; - /** - * Creates an {@link yfiles.hierarchic.IIncrementalHintsFactory} implementation used for obtaining hint objects associated with - * nodes and edges of the graph prior to the invocation of the layout algorithm. - *

- * Incremental hints can be obtained from a {@link yfiles.algorithms.IDataProvider} that is registered with the graph using key - * {@link yfiles.hierarchic.HierarchicLayoutCore#INCREMENTAL_HINTS_DP_KEY}. - *

- * @returns an {@link } instance - * @see yfiles.hierarchic.HierarchicLayoutCore#INCREMENTAL_HINTS_DP_KEY - */ - createIncrementalHintsFactory():yfiles.hierarchic.IIncrementalHintsFactory; - /** - * Factory method called during {@link yfiles.hierarchic.HierarchicLayoutCore#applyLayoutCore} and creates an appropriate {@link yfiles.hierarchic.ILayerer} - * implementation. - *

- * By default, a {@link yfiles.hierarchic.ConstraintIncrementalLayerer} instance with a {@link yfiles.hierarchic.TopologicalLayerer} - * instance as argument is returned. This method may be overridden to return a custom {@link yfiles.hierarchic.ILayerer} - * implementation. - *

- * @returns a {@link } implementation - * @protected - */ - createIncrementalLayerer():yfiles.hierarchic.ILayerer; - /** - * Callback method that is called during {@link yfiles.hierarchic.HierarchicLayoutCore#applyLayoutCore}, creates the {@link yfiles.hierarchic.INodeData} - * and {@link yfiles.hierarchic.IEdgeData} instances and binds them to the elements using the given {@link yfiles.hierarchic.IItemFactory itemFactory}. - * @param g the input graph - * @param itemFactory the given {@link } instance - * @protected - */ - createItemData(g:yfiles.layout.LayoutGraph,itemFactory:yfiles.hierarchic.IItemFactory):void; - /** - * Creates a {@link yfiles.hierarchic.ILayerConstraintFactory layer constraint factory} that allows to create hints that affect the assignment of the nodes to layers. - *

- * By default, a suitable private implementation of {@link yfiles.hierarchic.ILayerConstraintFactory} is returned. - *

- * @param graph the given graph - * @returns a {@link } instance - */ - createLayerConstraintFactory(graph:yfiles.algorithms.Graph):yfiles.hierarchic.ILayerConstraintFactory; - /** - * Factory method that is called lazily upon first usage by {@link yfiles.hierarchic.HierarchicLayoutCore#layerer} if no {@link yfiles.hierarchic.ILayerer} instance is given as input. - *

- * The default implementation returns a new MultiComponentLayerer(new WeightedLayerer()) instance. It may be overridden to - * return a custom {@link yfiles.hierarchic.ILayerer} instance. - *

- * @returns a {@link } instance - * @see yfiles.hierarchic.HierarchicLayoutCore#layerer - * @see yfiles.hierarchic.MultiComponentLayerer - * @see yfiles.hierarchic.WeightedLayerer - * @protected - */ - createLayerer():yfiles.hierarchic.ILayerer; - /** - * Factory method called during {@link yfiles.hierarchic.HierarchicLayoutCore#applyLayoutCore} and creates an appropriate {@link yfiles.hierarchic.ILayers} - * implementation using the given {@link yfiles.hierarchic.ILayoutDataProvider} instance. - *

- * By default, a suitable private implementation of {@link yfiles.hierarchic.ILayers} is returned. It may be overridden to return - * custom implementations of the {@link yfiles.hierarchic.ILayers} interface. - *

- * @param ldp the given {@link } instance - * @returns a {@link } implementation - * @protected - */ - createLayers(ldp:yfiles.hierarchic.ILayoutDataProvider):yfiles.hierarchic.ILayers; - /** - * Factory method that is called lazily upon first usage by {@link yfiles.hierarchic.HierarchicLayoutCore#nodePlacer} if the given {@link yfiles.hierarchic.INodePlacer} instance is null. - *

- * The default implementation returns a {@link yfiles.hierarchic.SimplexNodePlacer} instance. It may be overridden to return a - * custom {@link yfiles.hierarchic.INodePlacer} instance. - *

- * @returns a {@link } instance - * @see yfiles.hierarchic.HierarchicLayoutCore#nodePlacer - * @see yfiles.hierarchic.SimplexNodePlacer - * @protected - */ - createNodePlacer():yfiles.hierarchic.INodePlacer; - /** - * Factory method that is called lazily upon first usage by {@link yfiles.hierarchic.HierarchicLayoutCore#portAllocator} if the given {@link yfiles.hierarchic.IPortAllocator} instance is - * null. - *

- * The default implementation returns a {@link yfiles.hierarchic.DefaultPortAllocator} instance. It may be overridden to return a - * custom {@link yfiles.hierarchic.IPortAllocator} instance. - *

- * @returns a {@link } instance - * @see yfiles.hierarchic.HierarchicLayoutCore#portAllocator - * @protected - */ - createPortAllocator():yfiles.hierarchic.IPortAllocator; - /** - * Factory method that is called lazily upon first usage by {@link yfiles.hierarchic.HierarchicLayoutCore#portConstraintOptimizer} if the given {@link yfiles.hierarchic.IPortConstraintOptimizer} - * instance is null. - *

- * The default implementation returns null. It may be overridden to return a custom {@link yfiles.hierarchic.IPortConstraintOptimizer} - * instance. - *

- * @returns null - * @see yfiles.hierarchic.HierarchicLayoutCore#portConstraintOptimizer - * @protected - */ - createPortConstraintOptimizer():yfiles.hierarchic.IPortConstraintOptimizer; - /** - * Creates sequence constraints that affect the sequence of the nodes within each layer. - *

- * By default, a suitable private implementation of {@link yfiles.hierarchic.ISequenceConstraintFactory} is returned. - *

- * @param graph the given graph - * @returns a {@link } instance - */ - createSequenceConstraintFactory(graph:yfiles.algorithms.Graph):yfiles.hierarchic.ISequenceConstraintFactory; - /** - * Factory method that is called lazily upon first usage by {@link yfiles.hierarchic.HierarchicLayoutCore#sequencer} if the given {@link yfiles.hierarchic.ISequencer} instance is null. - *

- * The default implementation returns a {@link yfiles.hierarchic.DefaultLayerSequencer} instance. It may be overridden to return a - * custom {@link yfiles.hierarchic.ISequencer} instance. - *

- * @returns a {@link } instance - * @see yfiles.hierarchic.HierarchicLayoutCore#sequencer - * @see yfiles.hierarchic.DefaultLayerSequencer - * @protected - */ - createSequencer():yfiles.hierarchic.ISequencer; - /** - * Factory method called during {@link yfiles.hierarchic.HierarchicLayoutCore#applyLayoutCore} and creates a {@link yfiles.hierarchic.ISequencer} - * implementation that can sequence subgraphs incrementally. - *

- * By default, a suitable private implementation of {@link yfiles.hierarchic.ISequencer} is returned. It may be overridden to - * return custom implementations of the {@link yfiles.hierarchic.ISequencer} interface. - *

- * @returns a {@link } implementation - * @protected - */ - createSubgraphLayerSequencer():yfiles.hierarchic.ISequencer; - /** - * Provides access to implementation specific properties of the algorithms used. - *

- * Used for internal purposes. - *

- * @param key the key to a property - * @returns the associated value or null - * @see yfiles.hierarchic.HierarchicLayoutCore#setAlgorithmProperty - */ - getAlgorithmProperty(key:any):any; - /** - * Callback method called during {@link yfiles.hierarchic.HierarchicLayoutCore#applyLayoutCore} and returns a {@link yfiles.algorithms.IDataProvider} - * that holds the {@link yfiles.hierarchic.EdgeLayoutDescriptor} information. - *

- * The {@link yfiles.algorithms.IDataProvider} holding the information about the node layout is registered with the graph using key - * {@link yfiles.hierarchic.HierarchicLayoutCore#EDGE_LAYOUT_DESCRIPTOR_DP_KEY}. - *

- * @param graph the input graph - * @returns a {@link } instance or null - * @see yfiles.hierarchic.EdgeLayoutDescriptor - * @see yfiles.hierarchic.HierarchicLayoutCore#EDGE_LAYOUT_DESCRIPTOR_DP_KEY - * @protected - */ - getEdgeLayoutDescriptors(graph:yfiles.layout.LayoutGraph):yfiles.algorithms.IDataProvider; - /** - * Callback method called during {@link yfiles.hierarchic.HierarchicLayoutCore#applyLayoutCore} and returns a {@link yfiles.algorithms.IDataProvider} - * that holds the incremental hints information. - *

- * The {@link yfiles.algorithms.IDataProvider} holding the information about incremental hints is registered with the graph using - * key {@link yfiles.hierarchic.HierarchicLayoutCore#INCREMENTAL_HINTS_DP_KEY}. - *

- * @param graph the input graph - * @returns a {@link } instance or null - * @see yfiles.hierarchic.HierarchicLayoutCore#INCREMENTAL_HINTS_DP_KEY - * @protected - */ - getIncrementalHints(graph:yfiles.layout.LayoutGraph):yfiles.algorithms.IDataProvider; - /** - * Callback method called during {@link yfiles.hierarchic.HierarchicLayoutCore#applyLayoutCore} and returns a {@link yfiles.algorithms.IDataProvider} - * that holds the {@link yfiles.hierarchic.NodeLayoutDescriptor} information. - *

- * The {@link yfiles.algorithms.IDataProvider} holding the information about the node layout is registered with the graph using key - * {@link yfiles.hierarchic.HierarchicLayoutCore#NODE_LAYOUT_DESCRIPTOR_DP_KEY}. - *

- * @param graph the input graph - * @returns a {@link } instance or null - * @see yfiles.hierarchic.NodeLayoutDescriptor - * @see yfiles.hierarchic.HierarchicLayoutCore#NODE_LAYOUT_DESCRIPTOR_DP_KEY - * @protected - */ - getNodeLayoutDescriptors(graph:yfiles.layout.LayoutGraph):yfiles.algorithms.IDataProvider; - /** - * Callback method called during {@link yfiles.hierarchic.HierarchicLayoutCore#applyLayoutCore} and returns a {@link yfiles.algorithms.IDataProvider} - * that holds the {@link yfiles.hierarchic.SwimlaneDescriptor} information. - *

- * The {@link yfiles.algorithms.IDataProvider} holding the information about swimlanes is registered with the graph using key - * {@link yfiles.hierarchic.HierarchicLayoutCore#SWIMLANE_DESCRIPTOR_DP_KEY}. - *

- * @param graph the input graph - * @returns a {@link } instance or null - * @see yfiles.hierarchic.SwimlaneDescriptor - * @see yfiles.hierarchic.HierarchicLayoutCore#SWIMLANE_DESCRIPTOR_DP_KEY - * @protected - */ - getSwimLaneDescriptors(graph:yfiles.layout.LayoutGraph):yfiles.algorithms.IDataProvider; - /** - * Callback method that publishes the layering information. - *

- * The layering information is stored in a {@link yfiles.algorithms.IDataProvider} registered with the graph using key - * {@link yfiles.hierarchic.HierarchicLayoutCore#LAYER_INDEX_DP_KEY}. - *

- * @param graph the input graph - * @param layers the {@link } implementation that provides the layering information - * @see yfiles.hierarchic.HierarchicLayoutCore#LAYER_INDEX_DP_KEY - * @protected - */ - publishLayers(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers):void; - /** - * Callback method that publishes the sequencing information. - *

- * The sequencing information is stored in a {@link yfiles.algorithms.IDataProvider} registered with the graph using key - * {@link yfiles.hierarchic.HierarchicLayoutCore#SEQUENCE_INDEX_DP_KEY}. - *

- * @param graph the input graph - * @param layers the {@link } implementation that provides the layering information - * @param ldp the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @see yfiles.hierarchic.HierarchicLayoutCore#LAYER_INDEX_DP_KEY - * @protected - */ - publishSequences(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Removes the bends which are obviously not necessary. - *

- * By default, this method removes collinear bends from the graph. A bend point is considered to be collinear if it lies on - * a line with its preceding and succeeding bend point. It may be overridden for a custom implementation of bend removal. - *

- * @param graph the input graph - * @param bendReductionThreshold this method removes a bend, if its horizontal/vertical distance to the closest collinear bend is above this value - * @protected - */ - reduceBendCount(graph:yfiles.layout.LayoutGraph,bendReductionThreshold:number):void; - /** - * Removes the bends which are obviously not necessary. - *

- * By default, this method removes collinear bends from the graph. A bend point is considered to be collinear if it lies on - * a line with its preceding and succeeding bend point. It may be overridden for a custom implementation of bend removal. - *

- * @param graph the input graph - * @protected - */ - reduceBendCount(graph:yfiles.layout.LayoutGraph):void; - /** - * Provides access to implementation specific properties of the algorithms used. - *

- * Used for internal purposes. - *

- * @param key the key to a property - * @param value the value to associate with the key - * @see yfiles.hierarchic.HierarchicLayoutCore#setAlgorithmProperty - */ - setAlgorithmProperty(key:any,value:any):void; - /** - * Data provider key for specifying incremental hints - *

- * Incremental hints are created using an {@link yfiles.hierarchic.HierarchicLayoutCore#createIncrementalHintsFactory incremental hints factory}. - *

- * @see yfiles.hierarchic.HierarchicLayoutCore#INCREMENTAL_HINTS_DP_KEY - * @see yfiles.hierarchic.IIncrementalHintsFactory - * @const - * @static - * @type {yfiles.algorithms.GraphObjectDpKey.} - */ - static INCREMENTAL_HINTS_DP_KEY:yfiles.algorithms.GraphObjectDpKey; - /** - * Data provider key for providing layout information for each edge - * @see yfiles.hierarchic.IEdgeData#edgeLayoutDescriptor - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static EDGE_LAYOUT_DESCRIPTOR_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for providing layout information for each node - * @see yfiles.hierarchic.INodeData#nodeLayoutDescriptor - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static NODE_LAYOUT_DESCRIPTOR_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for providing information about swimlanes - *

- * If this key is present during the layout, the layout algorithm will arrange nodes in swimlanes. The information about - * the swimlanes is finally written back to the descriptor instances. - *

- *

- * Instances can be shared among multiple nodes in the same lane, but don't have to be shared. - *

- * @see yfiles.hierarchic.SwimlaneDescriptor - * @see yfiles.hierarchic.INodeData#swimLaneDescriptor - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static SWIMLANE_DESCRIPTOR_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data acceptor key for publishing the layer IDs for all nodes in the graph - * @see yfiles.hierarchic.HierarchicLayout#LAYER_INDEX_DP_KEY - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static LAYER_INDEX_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data acceptor key for publishing the index inside their layer for all nodes in the graph - * @see yfiles.hierarchic.HierarchicLayout#SEQUENCE_INDEX_DP_KEY - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static SEQUENCE_INDEX_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for internal use only - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static INCREMENTAL_NODES_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Factory method called during the initialization of this {@link yfiles.hierarchic.HierarchicLayoutCore} instance that creates a - * {@link yfiles.layout.MultiStageLayout#labeling label layouter}. - *

- * In order to use the integrated node label awareness feature one has to use a {@link yfiles.layout.LabelLayoutTranslator} - * instance and set {@link yfiles.layout.LabelLayoutTranslator#translateNodeLabels} to true. Likewise, in order to make use of the integrated edge labeling {@link yfiles.layout.LabelLayoutTranslator#translateEdgeLabels} must be set to true and also - * {@link yfiles.layout.LabelLayoutTranslator#writeBackEdgeLabels} must be set to true (which is the default). - *

- * @protected - * @type {yfiles.layout.ILayoutStage} - */ - createLabelLayout:yfiles.layout.ILayoutStage; - /** - * Gets or sets whether or not the {@link yfiles.layout.ComponentLayout} should be enabled. - * @type {boolean} - */ - componentLayoutEnabled:boolean; - /** - * Gets or sets the time limit (in milliseconds) set for the layout algorithm. - *

- * Values have to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the maximum duration is negative - * @type {number} - */ - maximumDuration:number; - /** - * Gets or sets the {@link yfiles.hierarchic.ILayerer} instance responsible for generating the layer assignment (first phase of the - * layout algorithm). - *

- * To set the default layerer, see {@link yfiles.hierarchic.HierarchicLayoutCore#createLayerer}. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.hierarchic.ILayerer} is null - * @see yfiles.hierarchic.HierarchicLayoutCore#createLayerer - * @type {yfiles.hierarchic.ILayerer} - */ - layerer:yfiles.hierarchic.ILayerer; - /** - * Gets or sets the {@link yfiles.hierarchic.ISequencer} instance responsible for calculating the sequence of nodes within each - * layer (second phase of the layout algorithm). - *

- * To set the default sequencer, see {@link yfiles.hierarchic.HierarchicLayoutCore#createSequencer}. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.hierarchic.ISequencer} is null - * @see yfiles.hierarchic.HierarchicLayoutCore#createSequencer - * @type {yfiles.hierarchic.ISequencer} - */ - sequencer:yfiles.hierarchic.ISequencer; - /** - * Gets or sets the {@link yfiles.hierarchic.INodePlacer} instance responsible for the assignment of the x-(sequence) and - * preliminary y-coordinates of the nodes. - *

- * To set the default node placer, see {@link yfiles.hierarchic.HierarchicLayoutCore#createNodePlacer}. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.hierarchic.INodePlacer} is null - * @see yfiles.hierarchic.HierarchicLayoutCore#createNodePlacer - * @type {yfiles.hierarchic.INodePlacer} - */ - nodePlacer:yfiles.hierarchic.INodePlacer; - /** - * Gets or sets the {@link yfiles.hierarchic.IPortAllocator} instance responsible for assigning port coordinates to the adjacent - * edges of each node. - *

- * To set the default port allocator, see {@link yfiles.hierarchic.HierarchicLayoutCore#createPortAllocator}. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.hierarchic.IPortAllocator} is null - * @see yfiles.hierarchic.HierarchicLayoutCore#createPortAllocator - * @type {yfiles.hierarchic.IPortAllocator} - */ - portAllocator:yfiles.hierarchic.IPortAllocator; - /** - * Gets or sets the {@link yfiles.hierarchic.IPortConstraintOptimizer} instance responsible for optimizing the assignment of port - * constraints to the adjacent edges of each node. - *

- * To set the default port allocator, see {@link yfiles.hierarchic.HierarchicLayoutCore#createPortConstraintOptimizer}. - *

- * @see yfiles.hierarchic.HierarchicLayoutCore#createPortConstraintOptimizer - * @type {yfiles.hierarchic.IPortConstraintOptimizer} - */ - portConstraintOptimizer:yfiles.hierarchic.IPortConstraintOptimizer; - /** - * Gets or sets the {@link yfiles.hierarchic.IDrawingDistanceCalculator} instance responsible for determining the minimum distances - * between elements that belong to the same layer. - *

- * To set the default port allocator, see {@link yfiles.hierarchic.HierarchicLayoutCore#createDrawingDistanceCalculator}. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.hierarchic.IDrawingDistanceCalculator} is null - * @see yfiles.hierarchic.HierarchicLayoutCore#createDrawingDistanceCalculator - * @type {yfiles.hierarchic.IDrawingDistanceCalculator} - */ - drawingDistanceCalculator:yfiles.hierarchic.IDrawingDistanceCalculator; - /** - * Gets or sets the equidistant spacing between the horizontal and vertical grid lines. - *

- * When the spacing is negative or zero, no grid is defined, otherwise nodes and edges are placed on multiples of the grid - * spacing. - *

- * @see yfiles.hierarchic.IIncrementalHintsFactory - * @type {number} - */ - gridSpacing:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.HierarchicLayoutCore; - } - /** - * This interface determines the minimum distances between elements that belong to the same layer. - *

- * {@link yfiles.hierarchic.IDrawingDistanceCalculator} is implemented by a helper class used by {@link yfiles.hierarchic.HierarchicLayoutCore} - * during the phase of node placement (i.e. when the final coordinates for all nodes are calculated). {@link yfiles.hierarchic.INodePlacer} - * uses instances of this interface to determine the minimum distances between elements that belong to the same layer. - *

- *

- * Information about graph elements (i.e. nodes or edges) is given using a {@link yfiles.hierarchic.ILayoutDataProvider} while - * information about layers is given through {@link yfiles.hierarchic.ILayer} (describes a single layer of the hierarchic layout) - * or {@link yfiles.hierarchic.ILayers} (manages multiple {@link yfiles.hierarchic.ILayer layers} of the hierarchic layout). - *

- *

- * Implementations not needed any more should be {@link yfiles.hierarchic.IDrawingDistanceCalculator#dispose disposed of}. - *

- *

- * The default implementation used by the {@link yfiles.hierarchic.HierarchicLayoutCore} is - * {@link yfiles.hierarchic.DefaultDrawingDistanceCalculator}. - *

- * @interface - */ - export interface IDrawingDistanceCalculator extends yfiles.lang.Object{ - /** - * Disposes of internal data structures. - *

- * Implementations should release internally held data structures when they are not needed any more. - *

- * @param graph the input graph that contains all elements that are used during the node placement - * @param layers the {@link } object that will be used during subsequent calls - * @param ldp the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @see yfiles.hierarchic.IDrawingDistanceCalculator#initialize - * @abstract - */ - dispose(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Main interface method called by {@link yfiles.hierarchic.INodePlacer} instances to determine the minimum distance between - * {@link yfiles.algorithms.Node}s of same layer. - * @param graph the input graph - * @param layer the {@link } object that will be used during subsequent calls - * @param ldp the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @param left the left of the two {@link }s whose minimum distance is to be determined or null if only the left border - * of the right {@link } is of interest - * @param right the right of the two {@link }s whose minimum distance is to be determined or null if only the right border - * of the left {@link } is of interest - * @returns the minimum distance between two {@link }s of the same layer - * @abstract - */ - getMinDistance(graph:yfiles.layout.LayoutGraph,layer:yfiles.hierarchic.ILayer,ldp:yfiles.hierarchic.ILayoutDataProvider,left:yfiles.algorithms.Node,right:yfiles.algorithms.Node):number; - /** - * Initializes internal data structures. - *

- * Implementations may cache lengthy calculations in the initialization phase. - *

- * @param graph the input graph that contains all elements that are used during the node placement - * @param layers the {@link } object that will be used during subsequent calls - * @param ldp the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @see yfiles.hierarchic.IDrawingDistanceCalculator#dispose - * @abstract - */ - initialize(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - } - var IDrawingDistanceCalculator:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.IDrawingDistanceCalculator; - }; - /** - * This interface provides layout information about the edges of the graph during the layout. - *

- * {@link yfiles.hierarchic.IEdgeData} is a multi-purpose edge descriptor for each edge, holding information about the {@link yfiles.hierarchic.IEdgeData#type type} of an - * edge, associated {@link yfiles.layout.PortConstraint port constraints}, {@link yfiles.layout.PortCandidate port candidates}, edge groups as well as the current edge state. - *

- *

- * It is used in all phases of the {@link yfiles.hierarchic.HierarchicLayoutCore} to store edge information. - *

- * @interface - */ - export interface IEdgeData extends yfiles.lang.Object{ - /** - * Gets the type of the {@link yfiles.algorithms.Edge} associated with this {@link yfiles.hierarchic.IEdgeData} instance. - * @abstract - * @type {yfiles.hierarchic.EdgeDataType} - */ - type:yfiles.hierarchic.EdgeDataType; - /** - * Gets the {@link yfiles.algorithms.Node} associated with this {@link yfiles.hierarchic.IEdgeData} instance. - *

- * If no {@link yfiles.algorithms.Node} is associated with this {@link yfiles.hierarchic.IEdgeData} instance, null should be returned. - *

- * @abstract - * @type {yfiles.algorithms.Node} - */ - associatedNode:yfiles.algorithms.Node; - /** - * Gets the {@link yfiles.algorithms.Edge} associated with this {@link yfiles.hierarchic.IEdgeData} instance. - *

- * If no {@link yfiles.algorithms.Edge} is associated with this {@link yfiles.hierarchic.IEdgeData} instance, null should be returned. - *

- * @abstract - * @type {yfiles.algorithms.Edge} - */ - associatedEdge:yfiles.algorithms.Edge; - /** - * Gets the {@link yfiles.layout.PortConstraint port constraints} for the source port of the {@link yfiles.algorithms.Edge} associated with this {@link yfiles.hierarchic.IEdgeData} - * instance. - *

- * {@link yfiles.layout.PortConstraint}s are obtained by a {@link yfiles.algorithms.IDataProvider} registered with the graph with key - * {@link yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY}. - *

- * @abstract - * @type {yfiles.layout.PortConstraint} - */ - sourcePortConstraint:yfiles.layout.PortConstraint; - /** - * Gets the ID of the edge port group at the source node to which the {@link yfiles.algorithms.Edge} associated with this {@link yfiles.hierarchic.IEdgeData} - * instance belongs (if any). - *

- * Information about edge port grouping at the source node is obtained by a {@link yfiles.algorithms.IDataProvider} registered with - * the graph with key {@link yfiles.layout.PortConstraintKeys#SOURCE_PORT_GROUP_ID_DP_KEY}. - *

- * @abstract - * @type {any} - */ - sourcePortGroup:any; - /** - * Gets the {@link yfiles.collections.ICollection. collection} of {@link yfiles.layout.PortCandidate}s for the source port of the {@link yfiles.algorithms.Edge} associated with - * this {@link yfiles.hierarchic.IEdgeData} instance. - *

- * {@link yfiles.layout.PortCandidate Source port candidates} are obtained by a {@link yfiles.algorithms.IDataProvider} registered with the graph with key - * {@link yfiles.layout.PortCandidate#SOURCE_PORT_CANDIDATE_COLLECTION_DP_KEY}. - *

- * @abstract - * @type {yfiles.collections.ICollection.} - */ - sourcePortCandidates:yfiles.collections.ICollection; - /** - * Gets the {@link yfiles.layout.PortConstraint port constraints} for the target port of the {@link yfiles.algorithms.Edge} associated with this {@link yfiles.hierarchic.IEdgeData} - * instance. - *

- * {@link yfiles.layout.PortConstraint}s are obtained by a {@link yfiles.algorithms.IDataProvider} registered with the graph with key - * {@link yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY}. - *

- * @abstract - * @type {yfiles.layout.PortConstraint} - */ - targetPortConstraint:yfiles.layout.PortConstraint; - /** - * Gets the ID of the edge port group at the target node to which the {@link yfiles.algorithms.Edge} associated with this {@link yfiles.hierarchic.IEdgeData} - * instance belongs (if any). - *

- * Information about edge port grouping at the target node is obtained by a {@link yfiles.algorithms.IDataProvider} registered with - * the graph with key {@link yfiles.layout.PortConstraintKeys#TARGET_PORT_GROUP_ID_DP_KEY}. - *

- * @abstract - * @type {any} - */ - targetPortGroup:any; - /** - * Gets the {@link yfiles.collections.ICollection. collection} of {@link yfiles.layout.PortCandidate}s for the target port of the {@link yfiles.algorithms.Edge} associated with - * this {@link yfiles.hierarchic.IEdgeData} instance. - *

- * {@link yfiles.layout.PortCandidate Target port candidates} are obtained by a {@link yfiles.algorithms.IDataProvider} registered with the graph with key - * {@link yfiles.layout.PortCandidate#TARGET_PORT_CANDIDATE_COLLECTION_DP_KEY}. - *

- * @abstract - * @type {yfiles.collections.ICollection.} - */ - targetPortCandidates:yfiles.collections.ICollection; - /** - * Gets the ID of the edge group at the source node to which the {@link yfiles.algorithms.Edge} associated with this {@link yfiles.hierarchic.IEdgeData} - * instance belongs (if any). - *

- * Information about edge grouping at the source node is obtained by a {@link yfiles.algorithms.IDataProvider} registered with the - * graph with key {@link yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY}. - *

- * @abstract - * @type {any} - */ - sourceGroup:any; - /** - * Gets the ID of the edge group at the target node to which the {@link yfiles.algorithms.Edge} associated with this {@link yfiles.hierarchic.IEdgeData} - * instance belongs (if any). - *

- * Information about edge grouping at the target node is obtained by a {@link yfiles.algorithms.IDataProvider} registered with the - * graph with key {@link yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY}. - *

- * @abstract - * @type {any} - */ - targetGroup:any; - /** - * Gets the group that is represented by the {@link yfiles.algorithms.Edge} associated with this {@link yfiles.hierarchic.IEdgeData} - * instance. - * @abstract - * @type {any} - */ - group:any; - /** - * Gets whether or not the {@link yfiles.algorithms.Edge} associated with this {@link yfiles.hierarchic.IEdgeData} instance has been - * reversed. - * @abstract - * @type {boolean} - */ - reversed:boolean; - /** - * Gets whether or not the {@link yfiles.algorithms.Edge} associated with this {@link yfiles.hierarchic.IEdgeData} instance is an upper - * same-layer edge. - *

- * An upper same-layer edge is an edge connecting two nodes of the same layer with polyline segments (not directly, with a - * straight-line) and is routed above the layer. - *

- * @abstract - * @type {boolean} - */ - upperSameLayerEdge:boolean; - /** - * Gets the {@link yfiles.hierarchic.EdgeLayoutDescriptor} instance bound to the {@link yfiles.algorithms.Edge} associated with this {@link yfiles.hierarchic.IEdgeData} - * instance. - *

- * If no {@link yfiles.hierarchic.EdgeLayoutDescriptor} is bound to the edge, null should be returned. - *

- * @abstract - * @type {yfiles.hierarchic.EdgeLayoutDescriptor} - */ - edgeLayoutDescriptor:yfiles.hierarchic.EdgeLayoutDescriptor; - /** - * Gets or sets whether or not the {@link yfiles.algorithms.Edge} associated with this {@link yfiles.hierarchic.IEdgeData} instance should - * be an upper same-layer edge (if it is a same-layer edge). - *

- * An upper same-layer edge is an edge connecting two nodes of the same layer with polyline segments (not directly, with a - * straight-line) and is routed above the layer. - *

- *

- * If enabled the edge will be routed above the layer, otherwise below it. - *

- * @abstract - * @type {boolean} - */ - fallbackUpperSameLayerEdge:boolean; - /** - * Gets the thickness of the {@link yfiles.algorithms.Edge} associated with this {@link yfiles.hierarchic.IEdgeData} instance. - *

- * The thickness is considered when calculating minimum distances so that there are no overlaps between edges and other - * graph elements. - *

- *

- * The thickness must have a non-negative value. - *

- * @abstract - * @type {number} - */ - thickness:number; - } - var IEdgeData:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.IEdgeData; - }; - /** - * This interface handles edges that should be reversed during the hierarchic layout process. - *

- * {@link yfiles.hierarchic.IEdgeReverser} contains methods for reversing all (or a given edge) that point to the wrong direction, - * i.e. the layer indices of the source nodes are greater than the layer indices of the target nodes. It also provides - * methods to restore the edges that have been reversed at the end of the layout algorithm. - *

- *

- * Implementations of this interface perform operations after the layering phase of the hierarchic layout algorithm. - *

- * @see yfiles.hierarchic.HierarchicLayoutCore - * @interface - */ - export interface IEdgeReverser extends yfiles.lang.Object{ - /** - * Reverses all edges which point to the wrong direction. - *

- * It is called after the layering phase of the {@link yfiles.hierarchic.HierarchicLayoutCore hierarchic layout algorithm}. - *

- *

- * An edge is reversed if the layer index of its source node is greater than the layer index of its target node. - *

- * @param graph the input graph - * @param ldp the {@link } containing layering information about the nodes and edges of the graph - * @see yfiles.hierarchic.ILayoutDataProvider#getNodeData - * @see yfiles.hierarchic.INodeData#layer - * @abstract - */ - normalizeEdges(graph:yfiles.layout.LayoutGraph,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Restores the original direction of edges marked as reversed. - *

- * It is called at the end of the {@link yfiles.hierarchic.HierarchicLayoutCore hierarchic layout algorithm}. - *

- * @param graph the input graph - * @param ldp the {@link } containing information about the nodes and edges of the graph - * @abstract - */ - restoreEdgeDirections(graph:yfiles.layout.LayoutGraph,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Reverses a given edge which points to the wrong direction. - *

- * It may be called by the incremental parts of the {@link yfiles.hierarchic.HierarchicLayoutCore hierarchic layout algorithm}. - *

- * @param graph the input graph - * @param ldp the {@link } containing layering information about the nodes and edges of the graph - * @param edge the edge to be reversed - * @see yfiles.hierarchic.ILayoutDataProvider#getNodeData - * @see yfiles.hierarchic.INodeData#layer - * @abstract - */ - reverse(graph:yfiles.layout.LayoutGraph,ldp:yfiles.hierarchic.ILayoutDataProvider,edge:yfiles.algorithms.Edge):void; - } - var IEdgeReverser:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.IEdgeReverser; - }; - /** - * This interface provides factory methods for creating incremental hints for the hierarchic layout. - *

- * Incremental hints can be used for specifying that a subset of nodes (called incremental nodes) should be added to an existing graph - * layout. A layer hint specifies that both, a node's layer and its position within the layer should be freely determined - * by the algorithm. A sequence hint specifies that the algorithm should consider the current layer of a node while its - * position within the layer should be freely determined by the algorithm. A node without any hint is called a fixed node. - *

- *

- * Sequence hints can also be specified for edges. These incremental edges are inserted in a suitable position within the layers - * crossed by the edges. For fixed edges the given input route is considered to calculate the position with the layers. - *

- *

- * Information about incremental hints is provided by a {@link yfiles.algorithms.IDataProvider} registered with the graph with key - * {@link yfiles.hierarchic.HierarchicLayout#INCREMENTAL_HINTS_DP_KEY}. - *

- *

- * An instance of a class implementing this interface can be obtained through method - * {@link yfiles.hierarchic.HierarchicLayout#createIncrementalHintsFactory}. - *

- * @interface - */ - export interface IIncrementalHintsFactory extends yfiles.lang.Object{ - /** - * Creates a hint {@link any} for a group {@link yfiles.algorithms.Node} that should be inserted incrementally during the layering phase. - *

- * The group will be placed on a suitable position. The descendants of the group may be associated with hints created by - * methods {@link yfiles.hierarchic.IIncrementalHintsFactory#createLayerIncrementallyHint}, {@link yfiles.hierarchic.IIncrementalHintsFactory#createSequenceIncrementallyHint} - * or this method (if the descendant is an inner group). - *

- *

- * All hints of the descendants of a group are interpreted relative to the group node. Descendants without hints maintain - * their relative order within the group node (but not with elements outside the group). - *

- *

- * The positions of groups without incremental hints depend on the position of their descendants (i.e., the group is not - * interpreted as fixed - it is simply ignored). - *

- * @param forItemId the group node to be inserted incrementally - * @returns an {@link } that can be interpreted as a hint by {@link } - * @abstract - */ - createIncrementalGroupHint(forItemId:any):any; - /** - * Creates a hint {@link any} for a {@link yfiles.algorithms.Node} that should be inserted incrementally during the layering phase. - *

- * This will place the node in a suitable layer, possibly creating new layers. - *

- *

- * Neighbors of this node may be also marked such that they are laid out incrementally. This makes it possible to - * incrementally add whole subgraphs to the current layout. - *

- * @param forNodeId the node to be layered and sequenced incrementally - * @returns an {@link } that can be interpreted as a hint by {@link } - * @abstract - */ - createLayerIncrementallyHint(forNodeId:any):any; - /** - * Creates a hint {@link any} for a {@link yfiles.algorithms.Node} or {@link yfiles.algorithms.Edge} that should be inserted incrementally during the - * sequencing phase. - *

- * All nodes that are not incrementally inserted during the layering phase (see - * {@link yfiles.hierarchic.IIncrementalHintsFactory#createLayerIncrementallyHint}) stay in their current layer. More precisely, - * the default {@link yfiles.hierarchic.HierarchicLayout#fixedElementsLayerer} implementation is an instance of {@link yfiles.hierarchic.AsIsLayerer} that determines the layer of the "fixed" - * nodes by analyzing the current node coordinates. Note that for the other nodes, the layout algorithm may insert new - * layers in between the existing layers. - *

- *

- * For edges associated with this hint (or which are incident to an incremental node), the algorithm automatically - * calculates a suitable sequencing (position within the layer). For edges between two non-incremental nodes that do not - * have a hint, the sequencing phase considers the current route. - *

- * @param forItemId the node or edge to be sequenced/inserted incrementally - * @returns an {@link } that can be interpreted as a hint by {@link } - * @abstract - */ - createSequenceIncrementallyHint(forItemId:any):any; - /** - * Creates a hint {@link any} for a {@link yfiles.algorithms.Node} that should be inserted incrementally into the graph on its exact current - * position. - *

- * As for nodes without hints, the algorithm uses the {@link yfiles.hierarchic.HierarchicLayout#fixedElementsLayerer} instance to determine the layer of such nodes and the {@link yfiles.hierarchic.HierarchicLayout#fixedElementsSequencer} instance to - * determine the position within the layer. By default, both implementations use the current coordinates of the nodes to - * derive the layer/position. However, for nodes marked with this hint, the algorithm should also preserve the exact - * coordinates while for nodes without hints the coordinates may be changed (these nodes only keep their relative - * positions). - *

- * @param forNodeId the node to be placed on its exact current position - * @returns an {@link } that can be interpreted as a hint by {@link } - * @see yfiles.hierarchic.IIncrementalHintsFactory#createUseExactSequenceCoordinatesHint - * @see yfiles.hierarchic.IIncrementalHintsFactory#createUseExactLayerCoordinatesHint - * @see yfiles.hierarchic.SimplexNodePlacer#exactPlacement - * @abstract - */ - createUseExactCoordinatesHint(forNodeId:any):any; - /** - * Creates a hint {@link any} for a {@link yfiles.algorithms.Node} that should be inserted incrementally into the graph on its exact current - * layer position. - *

- * The algorithm uses the {@link yfiles.hierarchic.HierarchicLayout#fixedElementsLayerer} instance to determine the layer of such nodes and the {@link yfiles.hierarchic.HierarchicLayout#fromScratchSequencer} instance to determine the sequencing. - *

- * @param forNodeId the node to be placed on its exact current layer position - * @returns an {@link } that can be interpreted as a hint by {@link } - * @see yfiles.hierarchic.IIncrementalHintsFactory#createUseExactCoordinatesHint - * @see yfiles.hierarchic.IIncrementalHintsFactory#createUseExactSequenceCoordinatesHint - * @see yfiles.hierarchic.SimplexNodePlacer#exactPlacement - * @abstract - */ - createUseExactLayerCoordinatesHint(forNodeId:any):any; - /** - * Creates a hint {@link any} for a {@link yfiles.algorithms.Node} that should be inserted incrementally into the graph on its exact current - * sequence position. - *

- * The algorithm uses the {@link yfiles.hierarchic.HierarchicLayout#fromScratchLayerer} instance to determine the layer of such nodes and the {@link yfiles.hierarchic.HierarchicLayout#fixedElementsSequencer} instance to determine the sequencing. - *

- * @param forNodeId the node to be placed on its exact current sequence position - * @returns an {@link } that can be interpreted as a hint by {@link } - * @see yfiles.hierarchic.IIncrementalHintsFactory#createUseExactCoordinatesHint - * @see yfiles.hierarchic.IIncrementalHintsFactory#createUseExactLayerCoordinatesHint - * @see yfiles.hierarchic.SimplexNodePlacer#exactPlacement - * @abstract - */ - createUseExactSequenceCoordinatesHint(forNodeId:any):any; - } - var IIncrementalHintsFactory:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.IIncrementalHintsFactory; - }; - /** - * This interface is a factory for creating and destroying helper structures used in the graph during layout. - *

- * An implementation of this interface is provided by the {@link yfiles.hierarchic.HierarchicLayoutCore} during the layout for the - * different sub-modules. - *

- * @interface - */ - export interface IItemFactory extends yfiles.lang.Object{ - /** - * Converts a given {@link yfiles.algorithms.Node} to a label node. - * @param dummyNode the given {@link } to be converted - * @abstract - */ - convertToLabelNode(dummyNode:yfiles.algorithms.Node):void; - /** - * Creates a bend {@link yfiles.algorithms.Node} for the given {@link yfiles.algorithms.Edge} in the given {@link yfiles.hierarchic.ILayer} and - * assigns it to the given {@link yfiles.hierarchic.SwimlaneDescriptor} instance. - * @param layer the given {@link } instance - * @param edge the given {@link } - * @param [laneDescriptor=null] a given {@link } instance - * @returns the new bend {@link } - * @abstract - */ - createBendNode(layer:yfiles.hierarchic.ILayer,edge:yfiles.algorithms.Edge,laneDescriptor?:yfiles.hierarchic.SwimlaneDescriptor):yfiles.algorithms.Node; - /** - * Creates a {@link yfiles.hierarchic.INodeData} object for a bend {@link yfiles.algorithms.Node} and associates it with the - * {@link yfiles.algorithms.Node}. - *

- * The bend is assigned to the given {@link yfiles.hierarchic.SwimlaneDescriptor} instance. - *

- * @param node the given {@link } - * @param edge the given {@link } - * @param [laneDescriptor=null] the given {@link } instance - * @returns a {@link } object for the given bend {@link } - * @abstract - */ - createBendNodeData(node:yfiles.algorithms.Node,edge:yfiles.algorithms.Edge,laneDescriptor?:yfiles.hierarchic.SwimlaneDescriptor):yfiles.hierarchic.INodeData; - /** - * Creates a dummy {@link yfiles.algorithms.Node} that mimics a connector to a group {@link yfiles.algorithms.Node}. - * @param groupNode the given group {@link } - * @param groupId the given group ID - * @param layer the given {@link } instance - * @param edge the given {@link } - * @returns the new {@link } - * @abstract - */ - createConnectorProxyForGroup(groupNode:yfiles.algorithms.Node,groupId:any,layer:yfiles.hierarchic.ILayer,edge:yfiles.algorithms.Edge):yfiles.algorithms.Node; - /** - * Creates a dummy node that mimics a connector to a group node from a descendant. - * @param groupNode the group node to which the edge is connected - * @param groupId the id of the group node - * @param layer the layer to which the dummy node will be assigned - * @param e the edge that connects to the dummy node - * @returns the dummy node - * @abstract - */ - createContentConnectorProxyForGroup(groupNode:yfiles.algorithms.Node,groupId:any,layer:yfiles.hierarchic.ILayer,e:yfiles.algorithms.Edge):yfiles.algorithms.Node; - /** - * Creates a spacer {@link yfiles.algorithms.Node} for the drawing phase using the given bounds in the given - * {@link yfiles.hierarchic.ILayer}. - * @param layer the given {@link } instance - * @param size the given bounds - * @param edges an array of {@link }s - * @returns the new spacer {@link } - * @abstract - */ - createDistanceNode(layer:yfiles.hierarchic.ILayer,size:yfiles.algorithms.Rectangle2D,edges:yfiles.algorithms.Edge[]):yfiles.algorithms.Node; - /** - * Creates a dummy {@link yfiles.algorithms.Edge} using the given data. - * @param newSource the source node of the {@link } - * @param newTarget the target node of the {@link } - * @param oldEdge the old {@link } from which to retrieve the data - * @param sourceEnd true if the source node of the edge is referred, false otherwise - * @param targetEnd true if the target node of the edge is referred, false otherwise - * @returns a new dummy {@link } - * @abstract - */ - createDummyEdge(newSource:yfiles.algorithms.Node,newTarget:yfiles.algorithms.Node,oldEdge:yfiles.algorithms.Edge,sourceEnd:boolean,targetEnd:boolean):yfiles.algorithms.Edge; - /** - * Creates an edge group {@link yfiles.algorithms.Node} in the given {@link yfiles.hierarchic.ILayer}. - * @param layer the given {@link } instance - * @param groupId the ID of the edge group - * @returns the new group {@link } - * @abstract - */ - createEdgeGroupNode(layer:yfiles.hierarchic.ILayer,groupId:any):yfiles.algorithms.Node; - /** - * Creates a {@link yfiles.hierarchic.INodeData} object for an edge group {@link yfiles.algorithms.Node} and associates it with the - * {@link yfiles.algorithms.Node}. - * @param node the given {@link } - * @param groupId the given group ID - * @param source true if the edge group is referred to the source node, false otherwise - * @returns a {@link } object for the given edge group {@link } - * @abstract - */ - createEdgeGroupNodeData(node:yfiles.algorithms.Node,groupId:any,source:boolean):yfiles.hierarchic.INodeData; - /** - * Creates an {@link yfiles.algorithms.Edge} that connects two group border {@link yfiles.algorithms.Node}s. - * @param source the source {@link } - * @param target the target {@link } - * @returns the new {@link } connecting the two group {@link }s - * @abstract - */ - createGroupBorderEdge(source:yfiles.algorithms.Node,target:yfiles.algorithms.Node):yfiles.algorithms.Edge; - /** - * Creates a group boundary {@link yfiles.algorithms.Node} for a group node in the given {@link yfiles.hierarchic.ILayer}. - * @param groupNode the given group {@link } - * @param layer the given {@link } - * @param type one of {@link #GROUP_BEGIN} or {@link #GROUP_END} - * @returns the new group boundary {@link } - * @abstract - */ - createGroupBorderNode(groupNode:yfiles.algorithms.Node,layer:yfiles.hierarchic.ILayer,type:yfiles.hierarchic.NodeDataType):yfiles.algorithms.Node; - /** - * Create a dummy {@link yfiles.algorithms.Node} for a group {@link yfiles.hierarchic.ILayer layer}. - * @returns a new dummy {@link } - * @abstract - */ - createGroupLayerDummyNode():yfiles.algorithms.Node; - /** - * Creates a group node connector {@link yfiles.algorithms.Edge} between two group {@link yfiles.algorithms.Node}s. - * @param groupNode1 the first group node - * @param groupNode2 the first group node - * @param representative the given representative {@link } - * @returns a new connector {@link } between two group {@link }s - * @abstract - */ - createGroupNodeConnectorEdge(groupNode1:yfiles.algorithms.Node,groupNode2:yfiles.algorithms.Node,representative:yfiles.algorithms.Edge):yfiles.algorithms.Edge; - /** - * Creates an {@link yfiles.hierarchic.IEdgeData} object for a normal {@link yfiles.algorithms.Edge} and associates it with the edge. - * @param edge the given {@link } - * @returns an {@link } object for the given {@link } - * @abstract - */ - createNormalEdgeData(edge:yfiles.algorithms.Edge):yfiles.hierarchic.IEdgeData; - /** - * Creates a {@link yfiles.hierarchic.INodeData} object for a normal {@link yfiles.algorithms.Node} and associates it with the - * {@link yfiles.algorithms.Node}. - * @param node the given {@link } - * @returns a {@link } object for the given {@link } - * @abstract - */ - createNormalNodeData(node:yfiles.algorithms.Node):yfiles.hierarchic.INodeData; - /** - * Creates a proxy {@link yfiles.algorithms.Node} for an {@link yfiles.algorithms.Edge} during the drawing phase, changing the {@link yfiles.algorithms.Edge} - * to end/start at the proxy and assigns it to a {@link yfiles.hierarchic.SwimlaneDescriptor} instance. - * @param edge the given {@link } - * @param source true if the node is the source node of the edge, false otherwise - * @param [laneDescriptor=null] a given {@link } instance - * @returns the new proxy {@link } - * @abstract - */ - createProxyNode(edge:yfiles.algorithms.Edge,source:boolean,laneDescriptor?:yfiles.hierarchic.SwimlaneDescriptor):yfiles.algorithms.Node; - /** - * Creates a {@link yfiles.hierarchic.INodeData} object for a proxy {@link yfiles.algorithms.Node} and associates it with the proxy node. - * @param node the given {@link } - * @param proxy the given proxy node - * @param edge the given {@link } - * @returns a {@link } object for the given proxy node - * @abstract - */ - createProxyNodeData(node:yfiles.algorithms.Node,proxy:yfiles.algorithms.Node,edge:yfiles.algorithms.Edge):yfiles.hierarchic.INodeData; - /** - * Creates a dummy edge that belongs to a recursive {@link yfiles.algorithms.Edge}. - * @param newSource the source node of the {@link } - * @param newTarget the target node of the {@link } - * @param oldEdge the old {@link } from which to retrieve the data - * @param sourceEnd true if the source node of the edge is referred, false otherwise - * @param targetEnd true if the target node of the edge is referred, false otherwise - * @returns a new dummy {@link } - * @abstract - */ - createRecursiveDummyEdge(newSource:yfiles.algorithms.Node,newTarget:yfiles.algorithms.Node,oldEdge:yfiles.algorithms.Edge,sourceEnd:boolean,targetEnd:boolean):yfiles.algorithms.Edge; - /** - * Creates a dummy {@link yfiles.algorithms.Node} that represents a bend node of a recursive {@link yfiles.algorithms.Edge}. - * @param layer the given {@link } to which the dummy {@link } is assigned - * @param edge the given {@link } to which the dummy {@link } belongs - * @param laneDescriptor the given {@link } instance - * @returns the new {@link } - * @abstract - */ - createRecursiveEdgeDummy(layer:yfiles.hierarchic.ILayer,edge:yfiles.algorithms.Edge,laneDescriptor:yfiles.hierarchic.SwimlaneDescriptor):yfiles.algorithms.Node; - /** - * Creates a {@link yfiles.hierarchic.INodeData} for a dummy {@link yfiles.algorithms.Node} of a recursive {@link yfiles.algorithms.Edge}. - * @param node the given {@link } - * @param edge the given {@link } to which the dummy {@link } belongs - * @param laneDescriptor the given {@link } instance - * @returns the new {@link } instance - * @abstract - */ - createRecursiveEdgeNodeData(node:yfiles.algorithms.Node,edge:yfiles.algorithms.Edge,laneDescriptor:yfiles.hierarchic.SwimlaneDescriptor):yfiles.hierarchic.INodeData; - /** - * Creates an {@link yfiles.hierarchic.IEdgeData} object for a same-layer recursive {@link yfiles.algorithms.Edge} and associates it with - * the edge. - * @param edge the given {@link } - * @param originalEdgeData the {@link } object of the original edge - * @param isUpper true is the recursive edge is an upper same layer edge, false otherwise - * @returns an {@link } object for the recursive same-layer {@link } - * @abstract - */ - createRecursiveSameLayerEdgeData(edge:yfiles.algorithms.Edge,originalEdgeData:yfiles.hierarchic.IEdgeData,isUpper:boolean):yfiles.hierarchic.IEdgeData; - /** - * Creates a redirected {@link yfiles.algorithms.Edge} to replace an {@link yfiles.algorithms.Edge} connected to a group - * {@link yfiles.algorithms.Node}. - * @param newSource the source node of the {@link } - * @param newTarget the target node of the {@link } - * @param groupEdge the given group {@link } - * @returns a new redirected {@link } - * @abstract - */ - createRedirectedGroupEdge(newSource:yfiles.algorithms.Node,newTarget:yfiles.algorithms.Node,groupEdge:yfiles.algorithms.Edge):yfiles.algorithms.Edge; - /** - * Creates a reversed dummy {@link yfiles.algorithms.Edge} using the given data. - * @param newSource the source node of the {@link } - * @param newTarget the target node of the {@link } - * @param oldEdge the old {@link } from which to retrieve the data - * @param sourceEnd true if the source node of the edge is referred, false otherwise - * @param targetEnd true if the target node of the edge is referred, false otherwise - * @returns a new reversed dummy {@link } - * @abstract - */ - createReverseDummyEdge(newSource:yfiles.algorithms.Node,newTarget:yfiles.algorithms.Node,oldEdge:yfiles.algorithms.Edge,sourceEnd:boolean,targetEnd:boolean):yfiles.algorithms.Edge; - /** - * Creates an {@link yfiles.hierarchic.IEdgeData} object for a same-layer {@link yfiles.algorithms.Edge} and associates it with the edge. - * @param edge the given {@link } - * @returns an {@link } object for the same-layer {@link } - * @abstract - */ - createSameLayerEdgeData(edge:yfiles.algorithms.Edge):yfiles.hierarchic.IEdgeData; - /** - * Creates a same-layer {@link yfiles.algorithms.Edge} proxy connecting a newly created proxy {@link yfiles.algorithms.Node} and a given - * proxy {@link yfiles.algorithms.Node} in the given {@link yfiles.hierarchic.ILayer}. - * @param layer the given {@link } - * @param edge the given {@link } - * @param toProxy the given proxy {@link } - * @returns a new redefined same-layer {@link } - * @abstract - */ - createSameLayerProxy(layer:yfiles.hierarchic.ILayer,edge:yfiles.algorithms.Edge,toProxy:yfiles.algorithms.Node):yfiles.algorithms.Edge; - /** - * Creates a proxy {@link yfiles.algorithms.Node} for a same-layer {@link yfiles.algorithms.Edge} during the drawing phase that ends at the - * side of a node. - * @param inLayer the given {@link } instance - * @param forNode the given {@link } - * @param edge the given {@link } - * @param [sld=null] a given {@link } instance - * @returns the new proxy {@link } - * @abstract - */ - createSameLayerSideProxy(inLayer:yfiles.hierarchic.ILayer,forNode:yfiles.algorithms.Node,edge:yfiles.algorithms.Edge,sld?:yfiles.hierarchic.SwimlaneDescriptor):yfiles.algorithms.Node; - /** - * Creates a same-layer switch proxy {@link yfiles.algorithms.Node} (switching between two same-layer - * {@link yfiles.algorithms.Edge}s on two different sides of the layer). - * @param layer the given {@link } - * @param edge the given {@link } - * @returns the new same-layer switch proxy {@link } - * @abstract - */ - createSameLayerSwitchProxy(layer:yfiles.hierarchic.ILayer,edge:yfiles.algorithms.Edge):yfiles.algorithms.Node; - /** - * Creates an {@link yfiles.hierarchic.IEdgeData} object for a self-loop {@link yfiles.algorithms.Edge} and associates it with the edge. - * @param edge the given {@link } - * @returns an {@link } object for a self-loop {@link } - * @abstract - */ - createSelfLoopEdgeData(edge:yfiles.algorithms.Edge):yfiles.hierarchic.IEdgeData; - /** - * Destroys a spacer {@link yfiles.algorithms.Node} for the drawing phase created using - * {@link yfiles.hierarchic.IItemFactory#createDistanceNode}. - * @param distanceNode the {@link } to be destroyed - * @abstract - */ - destroyDistanceNode(distanceNode:yfiles.algorithms.Node):void; - /** - * Removes the given layer for proxies at groups to handle direct group content connector edges between a node in the - * first/last layer of the group node and the groups border. - * @param layer the layer to destroy - * @param useInEdges whether the incoming edges should be used as the resulting edges - * @see yfiles.hierarchic.EdgeLayoutDescriptor#directGroupContentEdgeRouting - * @abstract - */ - destroyGroupConnectorLayer(layer:yfiles.hierarchic.ILayer,useInEdges:boolean):void; - /** - * Destroys a previously created label layer - * @param layer the layer to destroy - * @param useInEdges whether the incoming edges should be used as the resulting edges - * @abstract - */ - destroyLabelNodeLayer(layer:yfiles.hierarchic.ILayer,useInEdges:boolean):void; - /** - * Destroys a proxy {@link yfiles.algorithms.Node} created using {@link yfiles.hierarchic.IItemFactory#createProxyNode} for the drawing - * phase. - * @param proxyNode the proxy {@link } to be destroyed - * @returns - * @abstract - */ - destroyProxyNode(proxyNode:yfiles.algorithms.Node):yfiles.algorithms.Edge; - /** - * Destroys a same-layer {@link yfiles.algorithms.Edge} proxy created using {@link yfiles.hierarchic.IItemFactory#createSameLayerProxy}. - * @param edge the {@link } whose proxy will be destroyed - * @returns the redefined {@link } after the removal of the proxy {@link } - * @abstract - */ - destroySameLayerProxy(edge:yfiles.algorithms.Edge):yfiles.algorithms.Edge; - /** - * Destroys a proxy {@link yfiles.algorithms.Node} created using {@link yfiles.hierarchic.IItemFactory#createProxyNode} for the drawing - * phase. - * @param proxyNode the proxy {@link } to be destroyed - * @abstract - */ - destroySameLayerSideProxy(proxyNode:yfiles.algorithms.Node):void; - /** - * Destroys a same-layer switch proxy {@link yfiles.algorithms.Node} created using - * {@link yfiles.hierarchic.IItemFactory#createSameLayerSwitchProxy}. - * @param node the {@link } to be destroyed - * @returns the redefined {@link } after the removal of the same-layer switch proxy {@link } - * @abstract - */ - destroySameLayerSwitchProxy(node:yfiles.algorithms.Node):yfiles.algorithms.Edge; - /** - * Inserts a same-layer {@link yfiles.algorithms.Edge} or an {@link yfiles.algorithms.Edge} that may span multiple layers into the data - * structure and returns the resulting list of - * {@link yfiles.algorithms.Edge}s that has been created if this edge spans multiple layers. - * @param edge the given {@link } - * @returns the resulting list of {@link }s that has been created if this edge spans multiple layers - * @abstract - */ - insertEdge(edge:yfiles.algorithms.Edge):yfiles.algorithms.EdgeList; - /** - * Inserts a layer for proxies at groups to handle direct group content connector edges between a node in the first/last - * layer of the group node and the groups border. - * @param top true if this layer is placed above a group nodes, false if placed below - * @param index the index where the layer is inserted - * @returns the new layer - * @see yfiles.hierarchic.EdgeLayoutDescriptor#directGroupContentEdgeRouting - * @abstract - */ - insertGroupConnectorLayer(top:boolean,index:number):yfiles.hierarchic.ILayer; - /** - * Inserts a {@link yfiles.hierarchic.ILayer layer} for group {@link yfiles.algorithms.Node}s. - * @param source true if the group refers to the source node of an edge, false otherwise - * @param index the index at which the specified {@link layer} is to be inserted - * @returns a {@link layer} instance - * @abstract - */ - insertGroupNodeLayer(source:boolean,index:number):yfiles.hierarchic.ILayer; - /** - * Inserts a {@link yfiles.hierarchic.ILayer} for labels. - * @param source true if the source node of the edge, false otherwise - * @param index the index at which the specified {@link } is to be inserted - * @returns a {@link layer} instance - * @abstract - */ - insertLabelNodeLayer(source:boolean,index:number):yfiles.hierarchic.ILayer; - /** - * Registers an {@link yfiles.algorithms.Edge} as a same-layer {@link yfiles.algorithms.Edge} appropriately into all data structures. - * @param edge the given {@link } to be registered - * @abstract - */ - registerSameLayerEdge(edge:yfiles.algorithms.Edge):void; - /** - * Converts a same-layer {@link yfiles.algorithms.Edge} to an {@link yfiles.algorithms.Edge} of type - * {@link yfiles.hierarchic.EdgeDataType#DIRECT_SAME_LAYER_EDGE}. - * @param sameLayerEdge the given same-layer {@link } - * @abstract - */ - setDirectlyConnectSameLayerEdge(sameLayerEdge:yfiles.algorithms.Edge):void; - /** - * Specifies an edge group constraint for an {@link yfiles.algorithms.Edge} and assigns it to an {@link yfiles.hierarchic.IEdgeData} - * object. - * @param edge the given {@link } - * @param sgId the ID of the edge group at the source node - * @param tgId the ID of the edge group at the target node - * @returns an {@link } object - * @abstract - */ - setTemporaryEdgeGroups(edge:yfiles.algorithms.Edge,sgId:any,tgId:any):yfiles.hierarchic.IEdgeData; - /** - * Specifies the thickness for an {@link yfiles.algorithms.Edge} and defines it in an {@link yfiles.hierarchic.IEdgeData} object. - * @param edge the given {@link } - * @param thickness the new edge thickness - * @returns an {@link } object with an adjusted {@link } - * @abstract - */ - setTemporaryEdgeThickness(edge:yfiles.algorithms.Edge,thickness:number):yfiles.hierarchic.IEdgeData; - /** - * Specifies a port constraint for an {@link yfiles.algorithms.Edge} at the given side and assigns it to an {@link yfiles.hierarchic.IEdgeData} - * object. - * @param edge the given {@link } - * @param source true of the port constraint is defined on the source node of the {@link }, false otherwise - * @param pc the given {@link } instance - * @returns an {@link } object - * @abstract - */ - setTemporaryPortConstraint(edge:yfiles.algorithms.Edge,source:boolean,pc:yfiles.layout.PortConstraint):yfiles.hierarchic.IEdgeData; - /** - * Reverts a label node to the normal {@link yfiles.algorithms.Node}. - * @param labelNode the given label node to be converted - * @abstract - */ - unconvertToLabelNode(labelNode:yfiles.algorithms.Node):void; - } - var IItemFactory:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.IItemFactory; - }; - /** - * This interface describes a single layer in a hierarchic layout. - *

- * A layer consists of nodes along with the associated same-layer edges. Each layer has a {@link yfiles.hierarchic.ILayer#type type} and an index representing - * its order in the {@link yfiles.hierarchic.ILayers list of layers}. - *

- * @see yfiles.hierarchic.ILayers - * @see yfiles.hierarchic.HierarchicLayoutCore - * @see yfiles.hierarchic.ILayerer - * @interface - */ - export interface ILayer extends yfiles.lang.Object{ - /** - * Adds a newly created {@link yfiles.algorithms.Node} to this {@link yfiles.hierarchic.ILayer} instance. - * @param node the {@link } to be added - * @abstract - */ - add(node:yfiles.algorithms.Node):void; - /** - * Adds a same-layer {@link yfiles.algorithms.Edge} to this {@link yfiles.hierarchic.ILayer} instance. - * @param edge the same-layer {@link } to be added - * @abstract - */ - addSameLayerEdge(edge:yfiles.algorithms.Edge):void; - /** - * Removes a {@link yfiles.algorithms.Node} from this {@link yfiles.hierarchic.ILayer} instance. - * @param node the {@link } to be removed - * @abstract - */ - remove(node:yfiles.algorithms.Node):void; - /** - * Removes the current layer from the {@link yfiles.hierarchic.ILayers list of layers}. - * @abstract - */ - remove():void; - /** - * Adjusts the order of the {@link yfiles.algorithms.Node}s of this {@link yfiles.hierarchic.ILayer} instance according to the given - * order. - * @param list the given list to be used - * @abstract - */ - setNodeOrder(list:yfiles.algorithms.YList):void; - /** - * Gets a list of all same-layer {@link yfiles.algorithms.Edge}s associated with this {@link yfiles.hierarchic.ILayer} instance. - * @abstract - * @type {yfiles.algorithms.YList} - */ - sameLayerEdges:yfiles.algorithms.YList; - /** - * Gets a list of the {@link yfiles.algorithms.Node}s associated with this {@link yfiles.hierarchic.ILayer} instance. - * @abstract - * @type {yfiles.algorithms.NodeList} - */ - list:yfiles.algorithms.NodeList; - /** - * Gets the type of this {@link yfiles.hierarchic.ILayer} instance. - * @abstract - * @type {yfiles.hierarchic.LayerType} - */ - type:yfiles.hierarchic.LayerType; - /** - * Gets the index of this {@link yfiles.hierarchic.ILayer} instance in the {@link yfiles.hierarchic.ILayers list of all layers}. - * @abstract - * @type {number} - */ - index:number; - /** - * Gets or sets the {@link yfiles.layout.RowDescriptor} associated with this {@link yfiles.hierarchic.ILayer} instance. - * @abstract - * @type {yfiles.layout.RowDescriptor} - */ - row:yfiles.layout.RowDescriptor; - } - var ILayer:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.ILayer; - }; - /** - * This interface merges two {@link yfiles.hierarchic.ILayers} instances whose nodes reside in the same graph. - *

- * Implementations of this interface may provide different strategies for merging. - *

- *

- * {@link yfiles.hierarchic.DefaultLayeredComponentsMerger Default implementations} of this interface are used internally by {@link yfiles.hierarchic.HierarchicLayoutCore} and {@link yfiles.hierarchic.MultiComponentLayerer} - * when e.g. the graph is grouped or it consists of more than one connected component. - *

- * @interface - */ - export interface ILayeredComponentsMerger extends yfiles.lang.Object{ - /** - * Merges two {@link yfiles.hierarchic.ILayers} instances. - *

- * All nodes that belong to the source and target {@link yfiles.hierarchic.ILayers} are part of the graph at the moment of - * invocation. - *

- *

- * The state of the source {@link yfiles.hierarchic.ILayers} instance is discarded after this call and does not need to be updated - * to reflect the changes. The target {@link yfiles.hierarchic.ILayers} instance must be updated accordingly. - *

- * @param graph the graph containing the nodes of source and target {@link } instances - * @param ldp the {@link } used for querying the layer indices - * @param srcLayers the source {@link } instance that will be merged into the target {@link } instance - * @param targetLayers the {@link } instance that will be modified to contain the resulting layering - * @abstract - */ - merge(graph:yfiles.layout.LayoutGraph,ldp:yfiles.hierarchic.ILayoutDataProvider,srcLayers:yfiles.hierarchic.ILayers,targetLayers:yfiles.hierarchic.ILayers):void; - } - var ILayeredComponentsMerger:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.ILayeredComponentsMerger; - }; - /** - * This interface is used by classes capable of generating a layer assignment. - *

- * Layer assignment takes place during the first part of the hierarchic layout algorithms. During this phase, each node of - * the graph is assigned to a {@link yfiles.hierarchic.ILayer layer}. - *

- * @see yfiles.hierarchic.HierarchicLayoutCore#layerer - * @see yfiles.hierarchic.HierarchicLayout#fixedElementsLayerer - * @see yfiles.hierarchic.HierarchicLayout#fromScratchLayerer - * @interface - */ - export interface ILayerer extends yfiles.lang.Object{ - /** - * Assigns all nodes of the graph to layers and adds them to the {@link yfiles.hierarchic.ILayers} instance. - *

- * In order to create new layers, factory method {@link yfiles.hierarchic.ILayers#insert} has to be used. - *

- *

- * Information about the nodes is provided by a {@link yfiles.hierarchic.ILayoutDataProvider}. However, positional information (see - * {@link yfiles.hierarchic.INodeData#position} and {@link yfiles.hierarchic.INodeData#layer}) is not available during this phase. - *

- * @param graph the input graph - * @param layers the {@link } instance that will be filled with the results of the calculation - * @param ldp the {@link } used for querying information about the nodes and edges - * @see yfiles.hierarchic.ILayers#insert - * @see yfiles.hierarchic.ILayer#add - * @abstract - */ - assignLayers(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - } - var ILayerer:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.ILayerer; - }; - /** - * This interface manages multiple {@link yfiles.hierarchic.ILayer} instances. - *

- * {@link yfiles.hierarchic.HierarchicLayoutCore} creates instances of this class and passes them to the instances that handle the - * various sub-tasks of the layout process during automatic layout. - *

- *

- * Method {@link yfiles.hierarchic.ILayers#createInstance} can be used as a factory method to obtain temporary {@link yfiles.hierarchic.ILayers} - * instances. - *

- * @see yfiles.hierarchic.ILayer - * @interface - */ - export interface ILayers extends yfiles.lang.Object{ - /** - * Creates a new and empty {@link yfiles.hierarchic.ILayers} instance that can be used on the same graph instance for temporary - * results. - * @returns a new and empty {@link } instance - * @abstract - */ - createInstance():yfiles.hierarchic.ILayers; - /** - * Returns the {@link yfiles.hierarchic.ILayer layer} at the specified position in this {@link yfiles.hierarchic.ILayers list of layers}. - * @param i the zero-based index of the {@link layer} to return - * @returns the {@link layer} at the specified position - * @abstract - */ - getLayer(i:number):yfiles.hierarchic.ILayer; - /** - * Creates, inserts and returns a {@link yfiles.hierarchic.ILayer layer} of a given type associated with this {@link yfiles.hierarchic.ILayers list of layers}. - * @param type one of the predefined layer types as defined in {@link } interface - * @param position the index at which the specified {@link layer} is to be inserted - * @returns a new {@link } instance - * @abstract - */ - insert(type:yfiles.hierarchic.LayerType,position:number):yfiles.hierarchic.ILayer; - /** - * Removes the {@link yfiles.hierarchic.ILayer layer} at the specified position from this {@link yfiles.hierarchic.ILayers list of layers}. - * @param index the zero-based index of the {@link layer} to remove - * @abstract - */ - remove(index:number):void; - /** - * Returns the number of {@link yfiles.hierarchic.ILayer layers} associated with this {@link yfiles.hierarchic.ILayers} instance. - * @returns the number of layers of this {@link } instance - * @abstract - */ - size():number; - } - var ILayers:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.ILayers; - }; - /** - * This interface retrieves {@link yfiles.hierarchic.INodeData} and {@link yfiles.hierarchic.IEdgeData} instances for elements in the - * current layout graph. - *

- * Instances of this interface are provided by {@link yfiles.hierarchic.HierarchicLayoutCore} for instances implementing sub-tasks - * during the layout. - *

- * @see yfiles.hierarchic.HierarchicLayoutCore - * @interface - */ - export interface ILayoutDataProvider extends yfiles.lang.Object{ - /** - * Returns the {@link yfiles.hierarchic.IEdgeData} instance associated with the given {@link yfiles.algorithms.Edge}. - * @param edge the given edge - * @returns the {@link } instance associated with the edge - * @abstract - */ - getEdgeData(edge:yfiles.algorithms.Edge):yfiles.hierarchic.IEdgeData; - /** - * Returns the {@link yfiles.hierarchic.INodeData} instance associated with the given {@link yfiles.algorithms.Node}. - * @param node the given node - * @returns the {@link } instance associated with the node - * @abstract - */ - getNodeData(node:yfiles.algorithms.Node):yfiles.hierarchic.INodeData; - } - var ILayoutDataProvider:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.ILayoutDataProvider; - }; - /** - * This interface provides layout information about the nodes of the graph during the layout. - *

- * {@link yfiles.hierarchic.INodeData} is a multi-purpose node descriptor for each node of the graph during the hierarchic layout - * used internally by the algorithm implementations. - *

- *

- * Instances of this interface can be obtained during the layout from instances of the {@link yfiles.hierarchic.ILayoutDataProvider} - * interface. - *

- *

- * {@link yfiles.hierarchic.INodeData} typically carries the {@link yfiles.hierarchic.INodeData#type type} of the node and depending on the type an optional {@link yfiles.hierarchic.INodeData#associatedEdge associated edge} - * and - * {@link yfiles.hierarchic.INodeData#associatedNode associated node}. Optionally, it may carry a geometric description of the borders of the node and descriptors for various - * aspects of the layout. - *

- * @interface - */ - export interface INodeData extends yfiles.lang.Object{ - /** - * Creates, stores and returns a {@link yfiles.algorithms.BorderLine} for the given side or returns the current {@link yfiles.algorithms.BorderLine} - * instance if it already exists. - *

- * Not every {@link yfiles.hierarchic.INodeData#type type} of node supports this operation. {@link yfiles.hierarchic.NodeDataType#NORMAL} supports - * {@link yfiles.algorithms.BorderLine}s. - *

- *

- * Side value must be inside [0,3] interval, where 0 corresponds to the top side, 1 to the right side, 2 to the bottom side - * and 3 to the left side. - *

- * @param side an integer value from [0,3] interval - * @param nodeLayout the {@link } of the current node - * @returns a {@link } instance - * @throws {Stubs.Exceptions.NotSupportedError} if this {@link yfiles.hierarchic.INodeData#type type} of node does not support node borders - * @see yfiles.hierarchic.INodeData#getNormalizedBorderLine - * @abstract - */ - createBorderLine(side:number,nodeLayout:yfiles.layout.INodeLayout):yfiles.algorithms.BorderLine; - /** - * Returns a {@link yfiles.algorithms.BorderLine} for the given side which is treated as if the position of the node is at (0,0). - *

- * Clients may modify this instance but should always reset it to the original position, since this is a shared instance. - *

- *

- * It may return null to indicate that the {@link yfiles.algorithms.BorderLine} can be determined through the {@link yfiles.layout.INodeLayout} - * instance. - *

- *

- * Side value must be inside [0,3] interval, where 0 corresponds to the top side, 1 to the right side, 2 to the bottom side - * and 3 to the left side. - *

- * @param side an integer value from [0,3] interval - * @returns a {@link } instance or null - * @see yfiles.hierarchic.INodeData#createBorderLine - * @abstract - */ - getNormalizedBorderLine(side:number):yfiles.algorithms.BorderLine; - /** - * Returns the number of same-layer edges associated with the {@link yfiles.algorithms.Node} of this {@link yfiles.hierarchic.INodeData} - * instance. - * @returns the number of same-layer edges associated with the node - * @abstract - */ - sameLayerEdgeCount():number; - /** - * Gets the group node this node belongs to. - * @abstract - * @type {yfiles.algorithms.Node} - */ - groupNode:yfiles.algorithms.Node; - /** - * Gets the first same-layer edge {@link yfiles.algorithms.ListCell} of all same-layer edges or null if there exists no same-layer - * edge. - * @abstract - * @type {yfiles.algorithms.ListCell} - */ - firstSameLayerEdgeCell:yfiles.algorithms.ListCell; - /** - * Gets the type constant for the {@link yfiles.algorithms.Node} of this {@link yfiles.hierarchic.INodeData} instance. - * @abstract - * @type {yfiles.hierarchic.NodeDataType} - */ - type:yfiles.hierarchic.NodeDataType; - /** - * Gets the group ID of the {@link yfiles.algorithms.Node} of this {@link yfiles.hierarchic.INodeData} instance if it is a bus-group node. - * @see yfiles.hierarchic.NodeDataType#SOURCE_GROUP_NODE - * @see yfiles.hierarchic.NodeDataType#TARGET_GROUP_NODE - * @abstract - * @type {any} - */ - groupId:any; - /** - * Gets the associated {@link yfiles.algorithms.Node} of this {@link yfiles.hierarchic.INodeData} instance (in case of e.g. - *

- * back-loop proxy and side proxy). - *

- * @abstract - * @type {yfiles.algorithms.Node} - */ - associatedNode:yfiles.algorithms.Node; - /** - * Gets the associated {@link yfiles.algorithms.Edge} of the {@link yfiles.algorithms.Node} of this {@link yfiles.hierarchic.INodeData} instance - * (in case of e.g. - *

- * bend or same-layer center node). - *

- * @abstract - * @type {yfiles.algorithms.Edge} - */ - associatedEdge:yfiles.algorithms.Edge; - /** - * Gets the index of the {@link yfiles.hierarchic.ILayer} instance to which the {@link yfiles.algorithms.Node} of this {@link yfiles.hierarchic.INodeData} - * instance belongs. - * @abstract - * @type {number} - */ - layer:number; - /** - * Gets the current position of the {@link yfiles.algorithms.Node} of this {@link yfiles.hierarchic.INodeData} instance within its layer. - * @abstract - * @type {number} - */ - position:number; - /** - * Gets the parent group node of the {@link yfiles.algorithms.Node} of this {@link yfiles.hierarchic.INodeData} instance (if any). - * @abstract - * @type {yfiles.algorithms.Node} - */ - parentGroupNode:yfiles.algorithms.Node; - /** - * Gets the inner layers of the group {@link yfiles.algorithms.Node} of this {@link yfiles.hierarchic.INodeData} instance. - *

- * If this node is of type {@link yfiles.hierarchic.NodeDataType#GROUP}, this method returns the {@link yfiles.hierarchic.ILayers} object - * that describes the layering in the subgraph. - *

- * @abstract - * @type {yfiles.hierarchic.ILayers} - */ - groupLayers:yfiles.hierarchic.ILayers; - /** - * Gets the hint of the incremental mode of the {@link yfiles.algorithms.Node} of this {@link yfiles.hierarchic.INodeData} instance if this - * node is of type {@link yfiles.hierarchic.NodeDataType#NORMAL}. - *

- * The corresponding hint has been set by a {@link yfiles.algorithms.IDataProvider} using key - * {@link yfiles.hierarchic.HierarchicLayoutCore#INCREMENTAL_HINTS_DP_KEY}. - *

- * @abstract - * @type {any} - */ - incrementalHint:any; - /** - * Gets the {@link yfiles.hierarchic.NodeLayoutDescriptor} instance initially bound to the {@link yfiles.algorithms.Node} of this {@link yfiles.hierarchic.INodeData} - * instance or null if no {@link yfiles.hierarchic.NodeLayoutDescriptor} has been registered. - * @abstract - * @type {yfiles.hierarchic.NodeLayoutDescriptor} - */ - nodeLayoutDescriptor:yfiles.hierarchic.NodeLayoutDescriptor; - /** - * Gets the {@link yfiles.hierarchic.SwimlaneDescriptor} instance initially bound to the {@link yfiles.algorithms.Node} of this {@link yfiles.hierarchic.INodeData} - * instance or null if no {@link yfiles.hierarchic.SwimlaneDescriptor} has been registered. - * @abstract - * @type {yfiles.hierarchic.SwimlaneDescriptor} - */ - swimLaneDescriptor:yfiles.hierarchic.SwimlaneDescriptor; - } - var INodeData:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.INodeData; - }; - /** - * This interface is responsible for the assignment of the x-(sequence) and preliminary y-coordinates of the nodes in a - * hierarchic layout. - *

- * Implementations of this interface are used during the drawing phase of - * {@link yfiles.hierarchic.HierarchicLayoutCore}. They determine preliminary y-coordinates (which may be adjusted during the final - * edge routing) and the resulting x-coordinates of all elements that are part of the graph during the node placement - * phase. - *

- *

- * The minimum distance between each pair of nodes of the graph is determined by a {@link yfiles.hierarchic.IDrawingDistanceCalculator} - * instance. - *

- *

- * The default implementation used by the {@link yfiles.hierarchic.HierarchicLayoutCore} is {@link yfiles.hierarchic.SimplexNodePlacer}. - * Custom implementations of {@link yfiles.hierarchic.INodePlacer} interface can be used for hierarchic layout algorithms using - * methods {@link yfiles.hierarchic.HierarchicLayoutCore#nodePlacer} or {@link yfiles.hierarchic.HierarchicLayout#nodePlacer}. - *

- * @see yfiles.hierarchic.SimplexNodePlacer - * @see yfiles.hierarchic.IDrawingDistanceCalculator - * @see yfiles.hierarchic.HierarchicLayoutCore - * @see yfiles.hierarchic.HierarchicLayoutCore#nodePlacer - * @see yfiles.hierarchic.HierarchicLayout#nodePlacer - * @interface - */ - export interface INodePlacer extends yfiles.lang.Object{ - /** - * Assigns preliminary y-coordinates for each layer of a hierarchic layout. - *

- * The distance between two layers will be adjusted later by the edge routing algorithm. This method is responsible for - * assigning the relative positions of the nodes within each layer. - *

- * @param graph the input graph - * @param layoutDataProvider the {@link } containing information about the elements - * @param layers the {@link } instance that will be calculated by this method - * @abstract - */ - assignLayerCoordinates(graph:yfiles.layout.LayoutGraph,layoutDataProvider:yfiles.hierarchic.ILayoutDataProvider,layers:yfiles.hierarchic.ILayers):void; - /** - * Determines the resulting x-coordinates of a hierarchic layout. - *

- * The minimum distance between each pair of nodes of the graph is determined by a {@link yfiles.hierarchic.IDrawingDistanceCalculator} - * instance. - *

- * @param graph the input graph - * @param layoutDataProvider the {@link } containing information about the elements - * @param layers the {@link } instance that will be calculated by this method - * @param drawingDistanceCalculator the given {@link } instance - * @abstract - */ - assignSequenceCoordinates(graph:yfiles.layout.LayoutGraph,layoutDataProvider:yfiles.hierarchic.ILayoutDataProvider,layers:yfiles.hierarchic.ILayers,drawingDistanceCalculator:yfiles.hierarchic.IDrawingDistanceCalculator):void; - } - var INodePlacer:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.INodePlacer; - }; - /** - * This interface is responsible for assigning port coordinates to the adjacent edges of each node of the graph. - *

- * {@link yfiles.hierarchic.IPortAllocator} is used by {@link yfiles.hierarchic.HierarchicLayoutCore} after the sequencing phase. - *

- * @see yfiles.hierarchic.HierarchicLayoutCore - * @interface - */ - export interface IPortAllocator extends yfiles.lang.Object{ - /** - * Assigns to each edge of the graph a source port and target port coordinate pair. - *

- * This method is called by {@link yfiles.hierarchic.HierarchicLayoutCore} after the sequencing phase. - *

- * @param graph the input graph - * @param layers the given {@link } instance containing the elements in the layering - * @param ldp the {@link } containing layering information about the nodes and edges of the graph - * @param itemFactory the {@link } used temporarily for modifying the graph instance - * @abstract - */ - assignPorts(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider,itemFactory:yfiles.hierarchic.IItemFactory):void; - } - var IPortAllocator:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.IPortAllocator; - }; - /** - * This interface serves as a callback for {@link yfiles.hierarchic.HierarchicLayoutCore} after the layering and sequencing - * phases. - *

- * Implementations of this interface may modify the {@link yfiles.layout.PortConstraint port constraint} information via - * {@link yfiles.hierarchic.IItemFactory#setTemporaryPortConstraint}. - *

- * @interface - */ - export interface IPortConstraintOptimizer extends yfiles.lang.Object{ - /** - * Assigns new temporary port constraints after the layering information has been determined. - * @param graph the input graph - * @param layers the given {@link } instance - * @param ldp the {@link } containing information about the elements - * @param itemFactory the {@link } to set the temporary port constraints with - * @see yfiles.hierarchic.IItemFactory#setTemporaryPortConstraint - * @abstract - */ - optimizeAfterLayering(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider,itemFactory:yfiles.hierarchic.IItemFactory):void; - /** - * Assigns new temporary port constraints after the sequence of the nodes has been determined. - * @param graph the input graph - * @param layers the given {@link } instance - * @param ldp the {@link } containing information about the elements - * @param itemFactory the {@link } to set the temporary port constraints with - * @see yfiles.hierarchic.IItemFactory#setTemporaryPortConstraint - * @abstract - */ - optimizeAfterSequencing(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider,itemFactory:yfiles.hierarchic.IItemFactory):void; - } - var IPortConstraintOptimizer:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.IPortConstraintOptimizer; - }; - /** - * This interface is used by {@link yfiles.hierarchic.HierarchicLayoutCore} to calculate the order of the nodes within each {@link yfiles.hierarchic.ILayers layer}. - *

- * Implementations are used during the second phase of the hierarchic layout process and can be set using method {@link yfiles.hierarchic.HierarchicLayout#fixedElementsSequencer} or {@link yfiles.hierarchic.HierarchicLayout#fromScratchSequencer}). - *

- * @see yfiles.hierarchic.HierarchicLayoutCore#sequencer - * @see yfiles.hierarchic.HierarchicLayout#fixedElementsSequencer - * @see yfiles.hierarchic.HierarchicLayout#fromScratchSequencer - * @interface - */ - export interface ISequencer extends yfiles.lang.Object{ - /** - * Calculates the sequence of the nodes within each {@link yfiles.hierarchic.ILayers layer}. - *

- * This method is called by {@link yfiles.hierarchic.HierarchicLayoutCore} during the second phase and finally writes back the - * calculated sequence using the {@link yfiles.hierarchic.ILayer#setNodeOrder} method. - *

- * @param graph the input graph - * @param layers the given {@link } instance containing the elements in the layering - * @param ldp the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @param itemFactory the {@link } used temporarily for modifying the graph instance - * @abstract - */ - sequenceNodeLayers(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider,itemFactory:yfiles.hierarchic.IItemFactory):void; - } - var ISequencer:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.hierarchic.ISequencer; - }; - /** - * This class is a wrapper {@link yfiles.hierarchic.ILayerer} implementation that delegates the actual layering to a delegate - * {@link yfiles.hierarchic.ILayerer}. - *

- * If the graph consists of multiple components, they will be identified and sorted and each of the components will be - * layered separately using the delegate {@link yfiles.hierarchic.ILayerer} instance. After that they will all be merged using the - * specified {@link yfiles.hierarchic.ILayeredComponentsMerger} instance. - *

- * @class - * @implements {yfiles.hierarchic.ILayerer} - */ - export interface MultiComponentLayerer extends yfiles.lang.Object,yfiles.hierarchic.ILayerer{} - export class MultiComponentLayerer { - /** - * Creates a new instance of {@link yfiles.hierarchic.MultiComponentLayerer} using the given {@link yfiles.hierarchic.ILayeredComponentsMerger} - * and {@link yfiles.collections.IComparer.} instances. - * @param singleComponentLayerer - * @param merger - * @param componentComparer - * @throws {Stubs.Exceptions.ArgumentError} if the given layerer or merger is null - */ - constructor(singleComponentLayerer:yfiles.hierarchic.ILayerer,merger:yfiles.hierarchic.ILayeredComponentsMerger,componentComparer:yfiles.collections.IComparer); - /** - * Creates a new instance of {@link yfiles.hierarchic.MultiComponentLayerer} using the given delegate {@link yfiles.hierarchic.ILayerer}. - *

- * A new instance of {@link yfiles.hierarchic.DefaultLayeredComponentsMerger} will be used as merger while no component {@link yfiles.collections.IComparer.} will be - * used. - *

- * @param singleComponentLayerer - * @throws {Stubs.Exceptions.ArgumentError} if the given layerer is null - */ - constructor(singleComponentLayerer:yfiles.hierarchic.ILayerer); - /** - * - * @param graph - * @param layers - * @param ldp - */ - assignLayers(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Sorts an array which consists of - * {@link yfiles.algorithms.NodeList}s each of which contains nodes that belong to the same component. - *

- * It is called during {@link yfiles.hierarchic.MultiComponentLayerer#assignLayers}. - *

- *

- * By default this method uses the {@link yfiles.hierarchic.MultiComponentLayerer#componentComparer ComponentComparator} to sort the list and has no effect if the instance is null. - *

- * @param nodeLists the array of {@link }s each of which containing nodes that belong to the same component - * @param componentIndexProvider the {@link } that returns an object (the component index) for each node (this value can be either - * integer or object) - * @protected - */ - sort(nodeLists:yfiles.algorithms.NodeList[],componentIndexProvider:yfiles.algorithms.IDataProvider):void; - /** - * Gets or sets the delegate {@link yfiles.hierarchic.ILayerer} instance. - * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.hierarchic.ILayerer} is null - * @type {yfiles.hierarchic.ILayerer} - */ - singleComponentLayerer:yfiles.hierarchic.ILayerer; - /** - * Gets or sets the {@link yfiles.hierarchic.ILayeredComponentsMerger merger} instance. - * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.hierarchic.ILayeredComponentsMerger} is null - * @type {yfiles.hierarchic.ILayeredComponentsMerger} - */ - merger:yfiles.hierarchic.ILayeredComponentsMerger; - /** - * Gets or sets the component {@link yfiles.collections.IComparer.} instance. - * @type {yfiles.collections.IComparer.} - */ - componentComparer:yfiles.collections.IComparer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.MultiComponentLayerer; - } - /** - * This class is used by {@link yfiles.hierarchic.HierarchicLayoutCore} during the various phases to provide the drawing details of - * the nodes of the graph. - *

- * A {@link yfiles.hierarchic.NodeLayoutDescriptor} instance can be specified individually for single nodes using a {@link yfiles.algorithms.IDataProvider} - * that returns a {@link yfiles.hierarchic.NodeLayoutDescriptor} instance for each node of the graph, or null if no {@link yfiles.hierarchic.NodeLayoutDescriptor} - * is bound to an edge. The {@link yfiles.algorithms.IDataProvider} is registered with the graph with key - * {@link yfiles.hierarchic.HierarchicLayoutCore#NODE_LAYOUT_DESCRIPTOR_DP_KEY}. - *

- *

- * This class is designed as a class to allow future additions of new getter methods. - *

- * @see yfiles.hierarchic.HierarchicLayoutCore#NODE_LAYOUT_DESCRIPTOR_DP_KEY - * @see yfiles.hierarchic.EdgeLayoutDescriptor - * @class - */ - export interface NodeLayoutDescriptor extends yfiles.lang.Object{} - export class NodeLayoutDescriptor { - /** - * Creates a new instance of a {@link yfiles.hierarchic.NodeLayoutDescriptor} with the default values. - */ - constructor(); - /** - * Returns the port border gap ratio for the port distribution at a given side of the node. - *

- * This ratio determines the gap between a corner of the node and the first assigned port. - *

- *

- * The ratio should be greater than 0. - *

- *

- * A value of 0.0d results in ports being placed directly on the corner of the node (if there is more than one port). - *

- *

- * A value of 0.5d results in ports being distributed along the side of the node so that the distance between the corner of - * the node and the first port is half as wide as the distance between two adjacent ports. - *

- *

- * A value of Double.POSITIVE_INFINITY results in all ports being centered at the side in one point. - *

- * @param side the zero-based clockwise side index for top-to-bottom layouts (i.e., top is 0) - * @returns the border gap ratio of a given side - * @see yfiles.hierarchic.NodeLayoutDescriptor#portBorderGapRatios - * @see yfiles.hierarchic.NodeLayoutDescriptor#setPortBorderGapRatio - */ - getPortBorderGapRatio(side:number):number; - /** - * Specifies the port border gap ratio for the port distribution at a given side of the node. - *

- * This ratio determines the gap between a corner of the node and the first assigned port. - *

- *

- * The ratio should be greater than 0. - *

- *

- * A value of 0.0d results in ports being placed directly on the corner of the node (if there is more than one port). - *

- *

- * A value of 0.5d results in ports being distributed along the side of the node so that the distance between the corner of - * the node and the first port is half as wide as the distance between two adjacent ports. - *

- *

- * A value of Double.POSITIVE_INFINITY results in all ports being centered at the side in one point. - *

- * @param side the zero-based clockwise side index for top-to-bottom layouts (i.e., top is 0) - * @param ratio the given ratio - * @throws {Stubs.Exceptions.ArgumentError} if the given ratio is negative - * @see yfiles.hierarchic.NodeLayoutDescriptor#portBorderGapRatios - */ - setPortBorderGapRatio(side:number,ratio:number):void; - /** - * Sets the port border gap ratio for the port distribution on all sides of the node. - *

- * This ratio determines the gap between a corner of the node and the first assigned port. - *

- *

- * The ratio should be greater than 0. - *

- *

- * A value of 0.0d results in ports being placed directly on the corner of the node (if there is more than one port). - *

- *

- * A value of 0.5d results in ports being distributed along the side of the node so that the distance between the corner of - * the node and the first port is half as wide as the distance between two adjacent ports. - *

- *

- * A value of Double.POSITIVE_INFINITY results in all ports being centered at the side in one point. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given ratio is negative - * @see yfiles.hierarchic.NodeLayoutDescriptor#setPortBorderGapRatio - * @type {number} - */ - portBorderGapRatios:number; - /** - * Gets or sets the alignment of the {@link yfiles.algorithms.Node node} of this {@link yfiles.hierarchic.NodeLayoutDescriptor} instance within its layer. - *
    - *
  • A value of 0.0d corresponds to top-alignment.
  • - *
  • A value of 0.5d corresponds to center-alignment.
  • - *
  • A value of 1.0d corresponds to bottom-alignment.
  • - *
- *

- * This value should be within [0,1] interval. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the alignment is not within [0.0d .. 1.0d] - * @type {number} - */ - layerAlignment:number; - /** - * Gets or sets the mode that determines how node labels are handled by the algorithm during the layout. - * @throws {Stubs.Exceptions.ArgumentError} if the constant is unknown. - * @see yfiles.hierarchic.HierarchicLayout#considerNodeLabels - * @type {yfiles.hierarchic.NodeLabelMode} - */ - nodeLabelMode:yfiles.hierarchic.NodeLabelMode; - /** - * Gets or sets the minimum height of the layer to which this node is assigned. - *

- * Values should be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum height is negative - * @type {number} - */ - minimumLayerHeight:number; - /** - * Gets or sets the preferred minimum distance to obstacles. - *

- * The minimum distance should be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum length is negative - * @type {number} - */ - minimumDistance:number; - /** - * Gets or sets a reference point relative to the center of the node which will be placed on a grid coordinate. - * @type {yfiles.algorithms.YPoint} - */ - gridReference:yfiles.algorithms.YPoint; - /** - * Gets or sets the assignment strategy which distributes the ports along the node borders. - * @type {yfiles.hierarchic.PortAssignmentMode} - */ - portAssignment:yfiles.hierarchic.PortAssignmentMode; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.NodeLayoutDescriptor; - } - /** - * This class implements a {@link yfiles.layout.ILayoutStage layout stage} that handles a given {@link yfiles.layout.PartitionGrid partition grid} structure. - *

- * Information about the {@link yfiles.layout.PartitionGrid partition grid} structure are held by a {@link yfiles.algorithms.IDataProvider} registered with the graph - * with key {@link yfiles.layout.PartitionGrid#PARTITION_GRID_DP_KEY}. - *

- * @see yfiles.layout.PartitionGrid - * @see yfiles.hierarchic.HierarchicLayout - * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface PartitionGridLayoutStage extends yfiles.layout.LayoutStageBase{} - export class PartitionGridLayoutStage { - /** - * Creates a new instance of {@link yfiles.hierarchic.PartitionGridLayoutStage}. - */ - constructor(); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.PartitionGridLayoutStage; - } - /** - * This class is an implementation of the {@link yfiles.hierarchic.IPortConstraintOptimizer} interface that tries to assign the - * edges of the graph to {@link yfiles.layout.PortConstraint ports} considering the specified {@link yfiles.layout.PortCandidate}s. - *

- * Instances of this class can be set using property {@link yfiles.hierarchic.HierarchicLayoutCore#portConstraintOptimizer}. - *

- *

- * This implementation will query for {@link yfiles.algorithms.IDataProvider}s registered with the graph with keys - * {@link yfiles.layout.PortCandidate#SOURCE_PORT_CANDIDATE_COLLECTION_DP_KEY}, {@link yfiles.layout.PortCandidate#TARGET_PORT_CANDIDATE_COLLECTION_DP_KEY} - * and {@link yfiles.layout.PortCandidateSet#NODE_PORT_CANDIDATE_SET_DP_KEY}. It will try to assign each edge one of the matching - * {@link yfiles.layout.PortCandidate}s without introducing too many crossings and without violating the {@link yfiles.layout.PortCandidate#cost cost} or {@link yfiles.layout.PortCandidateSet#connectionCount capacity} - * constraints. - *

- * @see yfiles.layout.PortCandidate#cost - * @see yfiles.layout.PortCandidateSet#entries - * @see yfiles.layout.PortCandidateSet#connectionCount - * @class - * @extends {yfiles.hierarchic.PortConstraintOptimizerBase} - */ - export interface PortCandidateOptimizer extends yfiles.hierarchic.PortConstraintOptimizerBase{} - export class PortCandidateOptimizer { - /** - * Creates a new instance of {@link yfiles.hierarchic.PortCandidateOptimizer} with the default settings. - */ - constructor(); - /** - * Returns the data provider that provides the port candidate sets for nodes. - * @param graph The graph that stores the data provider - * @returns - * @protected - */ - getPortCandidateSetDataProvider(graph:yfiles.layout.LayoutGraph):yfiles.algorithms.IDataProvider; - /** - * Gets or sets whether or not this implementation uses a deterministic algorithm to assign the - * {@link yfiles.layout.PortCandidate}s. - * @type {boolean} - */ - deterministic:boolean; - /** - * Gets or sets the penalty cost associated with each back-loop. - *

- * Values should be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the penalty cost is negative - * @type {number} - */ - backLoopPenalty:number; - /** - * Gets or sets the penalty cost associated with a crossing that would occur if a given combination of - * {@link yfiles.layout.PortCandidate}s would be chosen. - *

- * Values should be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the crossing penalty is negative - * @type {number} - */ - crossingPenalty:number; - /** - * Gets or sets the penalty cost associated with each edge being assigned to a port which has already reached its - * {@link yfiles.layout.IPortCandidateSetEntry#connections capacity}. - *

- * Values should be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the penalty cost is negative - * @see yfiles.layout.IPortCandidateSetEntry#connections - * @type {number} - */ - overUsagePenalty:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.PortCandidateOptimizer; - } - /** - * This static class provides information about the same-layer structures created by class - * {@link yfiles.hierarchic.PortConstraintOptimizerBase}. - * @class - */ - export interface PortConstraintOptimizerSameLayerData extends yfiles.lang.Object{} - export class PortConstraintOptimizerSameLayerData { - /** - * Creates a new {@link yfiles.hierarchic.PortConstraintOptimizerSameLayerData} instance. - */ - constructor(); - /** - * Adds a given dummy {@link yfiles.algorithms.Node} to this {@link yfiles.hierarchic.PortConstraintOptimizerSameLayerData} instance and - * associates it with the given original (same-layer) {@link yfiles.algorithms.Edge}. - * @param sameLayerDummy a dummy node - * @param originalEdge the original (same-layer) edge - */ - addDummyNode(sameLayerDummy:yfiles.algorithms.Node,originalEdge:yfiles.algorithms.Edge):void; - /** - * Returns the original (same-layer) edge associated with the given dummy {@link yfiles.algorithms.Node}. - * @param sameLayerDummy a given dummy node - * @returns the original (same-layer) edge associated with the given dummy node - */ - getOriginalEdge(sameLayerDummy:yfiles.algorithms.Node):yfiles.algorithms.Edge; - /** - * Gets all dummy nodes of this {@link yfiles.hierarchic.PortConstraintOptimizerSameLayerData} instance. - * @type {yfiles.algorithms.NodeList} - */ - dummyNodes:yfiles.algorithms.NodeList; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.PortConstraintOptimizerSameLayerData; - } - /** - * This class is an abstract implementation of the {@link yfiles.hierarchic.IPortConstraintOptimizer} interface that minimizes the - * effort required to modify the port assignment after the sequencing phase of hierarchic layout algorithm. - *

- * The {@link yfiles.hierarchic.PortConstraintOptimizerBase#optimizeAfterSequencing callback method invoked after sequencing} performs the following three steps: - *

- *
    - *
  1. - * Restores temporarily all same-layer edges which are not currently present in the layout graph at this time of the layout - * algorithm. - *
  2. - *
  3. Invokes {@link yfiles.hierarchic.PortConstraintOptimizerBase#optimizeAfterSequencingForSingleNode the hook} in which the custom port assignment should be done.
  4. - *
  5. Restores the original state of the layout graph by removing the temporary same-layer edges added in Step 1.
  6. - *
- * @class - * @implements {yfiles.hierarchic.IPortConstraintOptimizer} - */ - export interface PortConstraintOptimizerBase extends yfiles.lang.Object,yfiles.hierarchic.IPortConstraintOptimizer{} - export class PortConstraintOptimizerBase { - /** - * Creates a new {@link yfiles.hierarchic.PortConstraintOptimizerBase} instance with default settings. - * @protected - */ - constructor(); - /** - * Inserts a same-layer edge structure for each same-layer edge of the original graph. - * @param graph the input graph - * @param layers the given {@link } instance holding the layering information - * @param ldp the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @param itemFactory the {@link factory} that sets the temporary port constraints - * @returns - * @see yfiles.hierarchic.IItemFactory#setTemporaryPortConstraint - * @protected - */ - insertSameLayerStructures(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider,itemFactory:yfiles.hierarchic.IItemFactory):yfiles.hierarchic.PortConstraintOptimizerSameLayerData; - /** - * Assigns new temporary port constraints after the nodes have been assigned to layers. - *

- * More precisely, it is called after the layering information has been determined. In this phase, it is possible to create - * back-loops by assigning incoming edges to the south (i.e. bottom) side or outgoing edges to the north (i.e. top) side, - * respectively. - *

- * @param graph the input graph - * @param layers the given {@link } instance holding the layering information - * @param ldp the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @param itemFactory the {@link factory} that sets the temporary port constraints - * @see yfiles.hierarchic.IItemFactory#setTemporaryPortConstraint - * @abstract - */ - optimizeAfterLayering(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider,itemFactory:yfiles.hierarchic.IItemFactory):void; - /** - * Assigns new temporary port constraints after the order of the nodes in each layer has been determined. - *

- * More precisely, it is called after the sequence of the nodes has been determined. It {@link yfiles.hierarchic.PortConstraintOptimizerBase#insertSameLayerStructures inserts the same-layer structures}, - * invokes {@link yfiles.hierarchic.PortConstraintOptimizerBase#optimizeAfterSequencingForSingleNode the hook} in which the custom port assignment should be done, and finally {@link yfiles.hierarchic.PortConstraintOptimizerBase#removeSameLayerStructures restores the original state} of the - * layout graph by removing the temporary edges. - *

- * @param graph the input graph - * @param layers the given {@link } instance holding the layering information - * @param ldp the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @param itemFactory the {@link factory} that sets the temporary port constraints - * @see yfiles.hierarchic.PortConstraintOptimizerBase#insertSameLayerStructures - * @see yfiles.hierarchic.PortConstraintOptimizerBase#optimizeAfterSequencing - * @see yfiles.hierarchic.PortConstraintOptimizerBase#removeSameLayerStructures - */ - optimizeAfterSequencing(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider,itemFactory:yfiles.hierarchic.IItemFactory):void; - /** - * Assigns new temporary port constraints after the order of the nodes in each layer has been determined. - *

- * More precisely, it is called after the sequence of the nodes has been determined. It invokes {@link yfiles.hierarchic.PortConstraintOptimizerBase#optimizeAfterSequencingForSingleNode} - * for every node of the original layout graph and omits the nodes of the same-layer structures. - *

- *

- * Incoming and outgoing edges are sorted using {@link yfiles.collections.IComparer.} instances which define the preferred ordering of the incoming and outgoing - * edges from left to right. - *

- * @param inEdgeOrder a given {@link } instance for incoming edges - * @param outEdgeOrder a given {@link } instance for outgoing edges - * @param graph the input graph - * @param ldp the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @param itemFactory the {@link factory} that sets the temporary port constraints - * @param layers - * @see yfiles.hierarchic.PortConstraintOptimizerBase#optimizeAfterSequencing - * @protected - */ - optimizeAfterSequencingForAllNodes(inEdgeOrder:yfiles.collections.IComparer,outEdgeOrder:yfiles.collections.IComparer,graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider,itemFactory:yfiles.hierarchic.IItemFactory):void; - /** - * Assigns new temporary port constraints to a given node of the graph after the order of the nodes in each layer has been - * determined. - *

- * More precisely, it is called after the sequence of the nodes has been determined. - *

- *

- * Incoming and outgoing edges are sorted using {@link yfiles.collections.IComparer.} instances which define the preferred ordering of the incoming and outgoing - * edges from left to right. - *

- * @param node the original node to set temporary port constraints - * @param inEdgeOrder a given {@link } instance for incoming edges - * @param outEdgeOrder a given {@link } instance for outgoing edges - * @param graph the input graph - * @param ldp the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @param itemFactory the {@link factory} that sets the temporary port constraints - * @see yfiles.hierarchic.PortConstraintOptimizerBase#optimizeAfterSequencing - * @protected - * @abstract - */ - optimizeAfterSequencingForSingleNode(node:yfiles.algorithms.Node,inEdgeOrder:yfiles.collections.IComparer,outEdgeOrder:yfiles.collections.IComparer,graph:yfiles.layout.LayoutGraph,ldp:yfiles.hierarchic.ILayoutDataProvider,itemFactory:yfiles.hierarchic.IItemFactory):void; - /** - * Removes the same-layer edge structure created using - * {@link yfiles.hierarchic.PortConstraintOptimizerBase#insertSameLayerStructures}. - * @param sameLayerData a given {@link } instance holding the information about the same-layer - * structures. - * @param graph the input graph - * @param ldp the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @param itemFactory the {@link factory} that sets the temporary port constraints - * @see yfiles.hierarchic.IItemFactory#setTemporaryPortConstraint - * @protected - */ - removeSameLayerStructures(sameLayerData:yfiles.hierarchic.PortConstraintOptimizerSameLayerData,graph:yfiles.layout.LayoutGraph,ldp:yfiles.hierarchic.ILayoutDataProvider,itemFactory:yfiles.hierarchic.IItemFactory):void; - /** - * Gets or sets the mirror mask that defines which orientations should be mirrored. - *

- * Setting a layout orientation can be considered as rotating the graph by 90, 180 or 270 degrees. Afterwards, the graph - * can be mirrored at the x-axis (for horizontal layout orientations) or y-axis (for vertical layout orientations). Which - * directions are mirrored can be defined by the given mask. - *

- * @see yfiles.layout.OrientationLayout - * @see yfiles.layout.LayoutOrientation - * @type {yfiles.layout.MirrorModes} - */ - mirrorMode:yfiles.layout.MirrorModes; - /** - * Gets or sets the layout orientation. - *

- * This setting is necessary to correctly interpret the values provided by the {@link yfiles.layout.PortCandidate}s since the {@link yfiles.layout.OrientationLayout} - * cannot automatically adjust these values. - *

- * @see yfiles.layout.MultiStageLayout#layoutOrientation - * @type {yfiles.layout.LayoutOrientation} - */ - layoutOrientation:yfiles.layout.LayoutOrientation; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.PortConstraintOptimizerBase; - } - /** - * This class is used by {@link yfiles.hierarchic.EdgeLayoutDescriptor} to specify the routing style for different types of edges. - * @see yfiles.hierarchic.EdgeLayoutDescriptor#routingStyle - * @see yfiles.hierarchic.IEdgeData#type - * @class - */ - export interface RoutingStyle extends yfiles.lang.Object{} - export class RoutingStyle { - /** - * Creates a new {@link yfiles.hierarchic.RoutingStyle} instance with the given routing style for each edge. - * @param routingStyle one of the predefined routing styles - * @throws {Stubs.Exceptions.ArgumentError} if an unknown routing style is given - */ - constructor(routingStyle:yfiles.hierarchic.EdgeRoutingStyle); - /** - * Gets or sets the routing style for back-loop edges. - *

- * This style is used for routing U-turns of common edges (i.e., edges that are neither self-loops nor same-layer edges). A - * U-turn is a non-monotonic part of the edge route that is required for reversed edges if option {@link yfiles.hierarchic.HierarchicLayout#backLoopRouting} is enabled or in some - * other scenarios with port constraints/candidates. - *

- * @throws {Stubs.Exceptions.ArgumentError} if an unknown routing style is given - * @type {yfiles.hierarchic.EdgeRoutingStyle} - */ - backLoopRoutingStyle:yfiles.hierarchic.EdgeRoutingStyle; - /** - * Gets or sets the routing style for grouped edges at the common segments. - *

- * More precisely, grouped edges are routed in a bus-style fashion (i.e., the paths of the edges will share a common edge - * segment) and this option allows to specify the routing style at the bus. - *

- * @throws {Stubs.Exceptions.ArgumentError} if an unknown routing style is given - * @type {yfiles.hierarchic.EdgeRoutingStyle} - */ - edgeGroupRoutingStyle:yfiles.hierarchic.EdgeRoutingStyle; - /** - * Gets or sets the default routing style for edges that have no individual routing style. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown routing style is given - * @type {yfiles.hierarchic.EdgeRoutingStyle} - */ - defaultEdgeRoutingStyle:yfiles.hierarchic.EdgeRoutingStyle; - /** - * Gets or sets the routing style for same-layer edges. - *

- * A same-layer edge is an edge whose source/target are assigned to the same layer. - *

- * @throws {Stubs.Exceptions.ArgumentError} if an unknown routing style is given - * @type {yfiles.hierarchic.EdgeRoutingStyle} - */ - sameLayerEdgeRoutingStyle:yfiles.hierarchic.EdgeRoutingStyle; - /** - * Gets or sets the routing style for self-loops. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown routing style is given - * @type {yfiles.hierarchic.EdgeRoutingStyle} - */ - selfLoopRoutingStyle:yfiles.hierarchic.EdgeRoutingStyle; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.RoutingStyle; - } - /** - * This class calculates bend points for self-loops routed in orthogonal or octilinear fashion. - *

- * It is used during the layout phase of {@link yfiles.hierarchic.HierarchicLayoutCore}, but can be used as a stand-alone tool. - *

- * @class - */ - export interface SelfLoopCalculator extends yfiles.lang.Object{} - export class SelfLoopCalculator { - /** - * Creates a new instance of {@link yfiles.hierarchic.SelfLoopCalculator} using the given parameters. - * @param minFirstSegmentLength the minimum length of the first and last segment of an orthogonally routed self-loop - * @param minEdgeDistance the minimum distance between a pair of self-loops - */ - constructor(minFirstSegmentLength:number,minEdgeDistance:number); - /** - * Convenience method that calculates a list of self-loops that belong to a given node. - *

- * The current port positions will be used for determining the start and end ports. The {@link yfiles.algorithms.IDataProvider} - * instances hold information about the source/target ports of the edges and can be used for specifying the direction of - * first and last segments. - *

- * @param graph the input graph - * @param node the node whose self-loops will be routed - * @param selfLoops a list of {@link }s that will be routed - * @param spc the {@link } that returns the {@link } object associated with the source - * ports of the edges - * @param tpc the {@link } that returns the {@link } object associated with the target - * ports of the edges - */ - calculateSelfLoops(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node,selfLoops:yfiles.algorithms.YList,spc:yfiles.algorithms.IDataProvider,tpc:yfiles.algorithms.IDataProvider):void; - /** - * Calculates all self-loops at the given node of the given input graph. - *

- * The current port positions will be used for determining the start and end ports. The {@link yfiles.algorithms.IDataProvider} - * instances hold information about the source/target ports of the edges and can be used for specifying the direction of - * first and last segments. - *

- * @param graph the input graph - * @param node the node whose self-loops will be routed - * @param spc the {@link } that returns the {@link } object associated with the source - * ports of the edges - * @param tpc the {@link } that returns the {@link } object associated with the target - * ports of the edges - */ - calculateSelfLoops(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node,spc:yfiles.algorithms.IDataProvider,tpc:yfiles.algorithms.IDataProvider):void; - /** - * Returns the minimum length between two edges associated with the given edge. - *

- * The value is fetched from the corresponding {@link yfiles.algorithms.IDataProvider} registered with the graph with key - * {@link yfiles.hierarchic.SelfLoopCalculator#MINIMUM_EDGE_DISTANCE_DP_KEY}. - *

- * @param graph the input graph - * @param edge the given edge - * @returns the minimum length between two edges - * @protected - */ - getMinimumDistance(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):number; - /** - * Returns the minimum length of the first segment of the given edge. - *

- * The value is fetched from the corresponding {@link yfiles.algorithms.IDataProvider} registered with the graph with key - * {@link yfiles.hierarchic.SelfLoopCalculator#MINIMUM_FIRST_SEGMENT_LENGTH_DP_KEY}. - *

- * @param graph the input graph - * @param edge the given edge - * @returns the minimum length of the first segment of an edge - * @protected - */ - getMinimumFirstSegmentLength(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):number; - /** - * Returns the minimum length of the last segment of the given edge. - *

- * The value is fetched from the corresponding {@link yfiles.algorithms.IDataProvider} registered with the graph with key - * {@link yfiles.hierarchic.SelfLoopCalculator#MINIMUM_LAST_SEGMENT_LENGTH_DP_KEY}. - *

- * @param graph the input graph - * @param edge the given edge - * @returns the minimum length of the last segment of the given edge - * @protected - */ - getMinimumLastSegmentLength(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):number; - /** - * Returns the minimum distance between two nodes associated with the given node. - *

- * The value is fetched from the corresponding {@link yfiles.algorithms.IDataProvider} registered with the graph with key - * {@link yfiles.hierarchic.SelfLoopCalculator#MINIMUM_NODE_DISTANCE_DP_KEY}. - *

- * @param graph the input graph - * @param node the given node - * @returns the minimum distance between two nodes - * @protected - */ - getMinimumNodeDistance(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node):number; - /** - * Returns the minimum octilinear segment length of the given edge. - *

- * The value is fetched from the corresponding {@link yfiles.algorithms.IDataProvider} registered with the graph with key - * {@link yfiles.hierarchic.SelfLoopCalculator#MINIMUM_OCTILINEAR_SEGMENT_LENGTH_DP_KEY}. - *

- * @param graph the input graph - * @param edge the given edge - * @returns the minimum octilinear segment length of the given edge - * @protected - */ - getMinimumOctilinearSegmentLength(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):number; - /** - * Returns whether or not the given edge is octilinear. - *

- * The value is fetched from the corresponding {@link yfiles.algorithms.IDataProvider} registered with the graph with key - * {@link yfiles.hierarchic.SelfLoopCalculator#OCTILINEAR_EDGES_DP_KEY}. - *

- * @param graph the input graph - * @param edge the given edge - * @returns true if the edge is octilinear, false otherwise - * @protected - */ - isOctilinearEdge(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):boolean; - /** - * Data provider key for defining for each node a minimum distance to the self-loop edges - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static MINIMUM_NODE_DISTANCE_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for specifying whether or not an edge is octilinear - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static OCTILINEAR_EDGES_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for specifying the minimum length of the octilinear segments of an octilinear edge - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static MINIMUM_OCTILINEAR_SEGMENT_LENGTH_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for specifying the minimum length of the first segment of each edge - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static MINIMUM_FIRST_SEGMENT_LENGTH_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for specifying the minimum length of the last segment of each edge - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static MINIMUM_LAST_SEGMENT_LENGTH_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for specifying the minimum distance to the next edge or node side - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static MINIMUM_EDGE_DISTANCE_DP_KEY:yfiles.algorithms.EdgeDpKey; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.SelfLoopCalculator; - } - /** - * This class is a {@link yfiles.hierarchic.INodePlacer} implementation based on {@link yfiles.algorithms.RankAssignments rank assignment}. - *

- * The drawer works with integer values and rounds double values to integers using sophisticated quantizing. - *

- * @class - * @implements {yfiles.hierarchic.INodePlacer} - */ - export interface SimplexNodePlacer extends yfiles.lang.Object,yfiles.hierarchic.INodePlacer{} - export class SimplexNodePlacer { - constructor(); - /** - * - * @param graph - * @param layoutDataProvider - * @param layers - */ - assignLayerCoordinates(graph:yfiles.layout.LayoutGraph,layoutDataProvider:yfiles.hierarchic.ILayoutDataProvider,layers:yfiles.hierarchic.ILayers):void; - /** - * Assigns the nodes of a given layer to the corresponding upper/lower sublayer if {@link yfiles.hierarchic.SimplexNodePlacer#nodeCompaction node compaction} is enabled. - *

- * Information about sublayers is given by a {@link yfiles.algorithms.INodeMap} whose GetBool method has to return true for each - * node that should be placed in the lower sublayer (values are set by this method). - *

- * @param layerNodes a {@link list} of all @link y.layout.hierarchic.incremental.NodeData#TYPE_NORMAL normal nodes} of a layer - * @param ldp the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @param graph the given graph - * @param lowerSublayer the {@link } holding sublayer information - * @see yfiles.hierarchic.SimplexNodePlacer#nodeCompaction - * @protected - */ - assignNodesToSublayer(layerNodes:yfiles.algorithms.NodeList,ldp:yfiles.hierarchic.ILayoutDataProvider,graph:yfiles.layout.LayoutGraph,lowerSublayer:yfiles.algorithms.INodeMap):void; - /** - * - * @param graph - * @param layoutDataProvider - * @param layers - * @param drawingDistanceCalculator - */ - assignSequenceCoordinates(graph:yfiles.layout.LayoutGraph,layoutDataProvider:yfiles.hierarchic.ILayoutDataProvider,layers:yfiles.hierarchic.ILayers,drawingDistanceCalculator:yfiles.hierarchic.IDrawingDistanceCalculator):void; - /** - * Returns the alignment of the node with a specified layer. - *

- * This callback method used by {@link yfiles.hierarchic.SimplexNodePlacer#assignLayerCoordinates}. - *

- * @param graph the input graph - * @param ldp the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @param node the given node - * @param layerIndex the index of the layer - * @param minLayerHeight the minimum height of the layer - * @returns - * @protected - */ - getLayerAlignment(graph:yfiles.layout.LayoutGraph,ldp:yfiles.hierarchic.ILayoutDataProvider,node:yfiles.algorithms.Node,layerIndex:number,minLayerHeight:number):number; - /** - * Specifies the minimum allowed distance between two nodes of the same given layer. - *

- * This callback method is used by {@link yfiles.hierarchic.SimplexNodePlacer#assignSequenceCoordinates}. - *

- * @param graph the graph that contains the nodes - * @param layer the layer that contains the nodes - * @param predNode the node to the left of the other one, may be null to indicate a border line - * @param succ the node to the right of the other one, may be null to indicate a border line - * @returns the minimum distance allowed between those two nodes ( >=0 ) - * @see yfiles.hierarchic.IDrawingDistanceCalculator - * @protected - */ - getMinDistance(graph:yfiles.layout.LayoutGraph,layer:yfiles.hierarchic.ILayer,predNode:yfiles.algorithms.Node,succ:yfiles.algorithms.Node):number; - /** - * Returns the minimum height of a given {@link yfiles.hierarchic.ILayer layer}. - *

- * This callback method is used by {@link yfiles.hierarchic.SimplexNodePlacer#assignLayerCoordinates}. - *

- * @param graph the given graph - * @param ldp the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @param layer the given {@link } object - * @returns the minimum height - * @protected - */ - getMinimumLayerHeight(graph:yfiles.layout.LayoutGraph,ldp:yfiles.hierarchic.ILayoutDataProvider,layer:yfiles.hierarchic.ILayer):number; - /** - * Returns whether or not the given node should be treated as a node with fixed (given) coordinates. - *

- * This callback method is used by both {@link yfiles.hierarchic.SimplexNodePlacer#assignLayerCoordinates} and - * {@link yfiles.hierarchic.SimplexNodePlacer#assignSequenceCoordinates}. - *

- *

- * If inLayer argument is true, this method is called from within the {@link yfiles.hierarchic.SimplexNodePlacer#assignLayerCoordinates} - * method. - *

- * @param graph the given graph - * @param provider the {@link } implementation which provides access to the {@link } and {@link } - * instances - * @param node the given node - * @param inLayer true if the layer coordinate of the node is queried, false if the sequence coordinate is queried - * @returns true if the node should be treated as fixed, false otherwise - * @protected - */ - isFixedNode(graph:yfiles.layout.LayoutGraph,provider:yfiles.hierarchic.ILayoutDataProvider,node:yfiles.algorithms.Node,inLayer:boolean):boolean; - /** - * Gets or sets whether or not nodes should be placed in a more compact style with respect to layout width. - *

- * If enabled, the algorithm may place the nodes of a layer in a stacked style (horizontally interleaving), i.e., it splits - * the layer into an upper and lower sublayer and places adjacent nodes into different sublayers if this reduces the width - * of the layer. - *

- * @see yfiles.hierarchic.SimplexNodePlacer#minimumSublayerDistance - * @see yfiles.hierarchic.SimplexNodePlacer#assignNodesToSublayer - * @type {boolean} - */ - nodeCompaction:boolean; - /** - * Gets or sets the minimum distance between the upper and lower sublayer. - *

- * A too small distance value may prevent adjacent nodes from being placed in a stacked style (horizontally interleaving) - * because the vertical distance between these nodes must be greater than or equal to the value specified by {@link yfiles.hierarchic.NodeLayoutDescriptor#minimumDistance}. - *

- *

- * Values should be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if minimum sublayer distance is negative - * @see yfiles.hierarchic.SimplexNodePlacer#nodeCompaction - * @type {number} - */ - minimumSublayerDistance:number; - /** - * Gets or sets whether or not the {@link yfiles.hierarchic.SimplexNodePlacer} places labels in a more compact style. - *

- * If this option is enabled the algorithm tries to place adjacent label elements in a stacked style, i.e., horizontally - * interleaving. - *

- * @type {boolean} - */ - labelCompaction:boolean; - /** - * Gets or sets whether or not an optimization step should be applied that tries to further reduce the number of bends. - * @see yfiles.hierarchic.SimplexNodePlacer#maximumDuration - * @type {boolean} - */ - bendReduction:boolean; - /** - * Gets or sets whether or not the {@link yfiles.hierarchic.SimplexNodePlacer} tries to create a maximally compact horizontal - * layout at the cost of more bends. - *

- * For best results, {@link yfiles.hierarchic.SimplexNodePlacer#breakLongSegments} and {@link yfiles.hierarchic.SimplexNodePlacer#labelCompaction} should also be enabled. - *

- * @see yfiles.hierarchic.SimplexNodePlacer#labelCompaction - * @see yfiles.hierarchic.SimplexNodePlacer#breakLongSegments - * @type {boolean} - */ - horizontalCompaction:boolean; - /** - * Gets or sets whether or not a postprocessing step should be applied to reduce the number of bends. - *

- * Furthermore, enabling this option may violate some minimum distances specified by the user and the edge distribution is - * no longer uniform. - *

- * @type {boolean} - */ - straightenEdges:boolean; - /** - * Gets or sets the strategy used for controlling the horizontal compactness of group nodes. - * @type {yfiles.hierarchic.GroupCompactionPolicy} - */ - groupCompactionStrategy:yfiles.hierarchic.GroupCompactionPolicy; - /** - * Gets or sets whether or not the {@link yfiles.hierarchic.SimplexNodePlacer} enforces the placement of nodes at their exact - * current positions, even if this violates minimum distance constraints. - * @type {boolean} - */ - exactPlacement:boolean; - /** - * Gets or sets whether or not the {@link yfiles.hierarchic.SimplexNodePlacer} should try to use the coordinates given from the - * current sketch for the determination of the layer coordinates. - * @type {boolean} - */ - fromSketchLayerAssignment:boolean; - /** - * Gets or sets the time limit (in milliseconds) set for the layout algorithm. - *

- * Values have to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the maximum duration is negative - * @type {number} - */ - maximumDuration:number; - /** - * Gets or sets the relative weight of edges crossing a swimlane relative to edges that stay in their lane. - *

- * Higher values lead to more compact drawings but may cause additional bends. - *

- *

- * Values should lie within [0,1] interval. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the relative weight does not lie within [0,1] - * @type {number} - */ - swimLaneCrossingWeight:number; - /** - * Gets or sets whether or not a barycenter drawing mode should be used. - *

- * If this mode is enabled the resulting drawing is likely to have more bends, but may be more symmetric. - *

- * @type {boolean} - */ - barycenterMode:boolean; - /** - * Gets or sets whether or not the {@link yfiles.hierarchic.SimplexNodePlacer} should break long edge segments in favor of a - * potentially more compact layout. - *

- * A long edge is an edge that spans multiple layers. For each layer, a dummy node is necessary to model the edge path from - * source to target. - *

- *
    - *
  • - * Not breaking such edges means that there is a constraint that enforces the alignment of all these dummy nodes (same - * x-coordinate). This favors straight edge paths. - *
  • - *
  • - * Breaking an edge means that the dummy nodes are not necessarily aligned, but additional bends can be generated if that - * leads to a horizontally more compact layout result. - *
  • - *
- * @type {boolean} - */ - breakLongSegments:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.SimplexNodePlacer; - } - /** - * This class is used by {@link yfiles.hierarchic.HierarchicLayoutCore} during the various phases and models a swimlane structure. - *

- * For layout orientation - * {@link yfiles.layout.LayoutOrientation#TOP_TO_BOTTOM}, swimlanes partition the drawing area into vertical stripes. Each node is - * placed within a user-specified lane. Swimlanes are, for example, often used in flow diagrams to separate logical units. - *

- *

- * Each node should be associated with a SwimLaneDescriptor instance; nodes in the same lane may share one instance. The - * results of the calculation of the swimlanes' geometry will be stored by the instances after the layout. - *

- *

- * A {@link yfiles.hierarchic.SwimlaneDescriptor} instance can be bound to the layout algorithm using a {@link yfiles.algorithms.IDataProvider} - * registered with the graph using key {@link yfiles.hierarchic.HierarchicLayoutCore#SWIMLANE_DESCRIPTOR_DP_KEY} that returns a {@link yfiles.hierarchic.SwimlaneDescriptor} - * instance for each node of the graph. - *

- * @see yfiles.hierarchic.HierarchicLayoutCore#SWIMLANE_DESCRIPTOR_DP_KEY - * @class - * @implements {yfiles.lang.IComparable} - */ - export interface SwimlaneDescriptor extends yfiles.lang.Object,yfiles.lang.IComparable{} - export class SwimlaneDescriptor { - /** - * Creates a new {@link yfiles.hierarchic.SwimlaneDescriptor} instance with a given client {@link any} and a given {@link yfiles.collections.IComparer.}. - *

- * The given client {@link any} should be an instance of {@link yfiles.lang.IComparable} if the given {@link yfiles.collections.IComparer.} is null. - *

- * @param clientObject a client {@link } used for sorting the lanes - * @param comparer a {@link } used for comparing the client objects - * @throws {Stubs.Exceptions.ArgumentError} if the specified client {@link any} is null or the specified {@link yfiles.collections.IComparer.} is null but the specified client {@link any} is not an instance of - * {@link yfiles.lang.IComparable}. - */ - constructor(clientObject:any,comparer:yfiles.collections.IComparer); - /** - * Creates a new {@link yfiles.hierarchic.SwimlaneDescriptor} instance with a given {@link yfiles.lang.IComparable} object. - * @param clientObject a {@link } used for determining the order of the lanes - * @throws {Stubs.Exceptions.ArgumentError} if the specified client object is null. - */ - constructor(clientObject:yfiles.lang.IComparable); - /** - * Implements the {@link yfiles.lang.IComparable} interface using the {@link yfiles.hierarchic.SwimlaneDescriptor#comparer} and {@link yfiles.hierarchic.SwimlaneDescriptor#clientObject} fields. - * @param o - * @returns - */ - compareTo(o:any):number; - /** - * Gets or sets whether or not an index of a swimlane is fixed (based on the result of the comparison with the other - * swimlanes) or whether the index should be chosen automatically in order to minimize edge lengths. - *

- * For all swimlanes where this property is set to - * true, the relative ordering given by the client objects is preserved. The remaining swimlanes may be sorted again so - * that the overall edge lengths are minimized. - *

- * @type {boolean} - */ - indexFixed:boolean; - /** - * Gets or sets the client {@link any object}. - *

- * The given client {@link any} should be an instance of {@link yfiles.lang.IComparable}. - *

- * @throws {Stubs.Exceptions.ArgumentError} if there is currently no {@link yfiles.collections.IComparer. comparator} and the specified object is not a {@link yfiles.lang.IComparable} instance - * @see yfiles.hierarchic.SwimlaneDescriptor#comparer - * @see yfiles.hierarchic.SwimlaneDescriptor#comparer - * @type {any} - */ - clientObject:any; - /** - * Gets or sets the tightness factor of the lane. - *

- * This value should lie within [0,1] interval. - *

- *

- * The greater the value, the more will the lane be forced to obtain its minimum possible width. - *

- *
    - *
  • A value of 0.0d will disable compression of the lane.
  • - *
  • A value of 1.0d will try to force the lane to obtain its {@link yfiles.hierarchic.SwimlaneDescriptor#minimumLaneWidth minimum width}.
  • - *
- * @throws {Stubs.Exceptions.ArgumentError} if the tightness value is outside [0,1] interval - * @type {number} - */ - laneTightness:number; - /** - * Gets or sets the {@link yfiles.collections.IComparer.} instance used for sorting the lanes. - * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.collections.IComparer.} is null. - * @type {yfiles.collections.IComparer.} - */ - comparer:yfiles.collections.IComparer; - /** - * Gets or sets the minimum width of the swimlane. - *

- * The minimum width should be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified value negative - * @type {number} - */ - minimumLaneWidth:number; - /** - * Gets or sets the left insets of the swimlane in which no element will lie in the resulting layout. - *

- * The inset should be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified value is less than 0. - * @type {number} - */ - leftLaneInset:number; - /** - * Gets or sets the right insets of the swimlane in which no element will lie in the resulting layout. - *

- * The inset should be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified value is less than 0. - * @type {number} - */ - rightLaneInset:number; - /** - * Gets the computed position (smaller coordinate) of the swimlane after the layout has been calculated. - * @type {number} - */ - computedLanePosition:number; - /** - * Gets the computed width of the swimlane after the layout has been calculated. - * @type {number} - */ - computedLaneWidth:number; - /** - * Gets the computed zero-based index of the swimlane after the layout has been calculated. - * @type {number} - */ - computedLaneIndex:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.SwimlaneDescriptor; - } - /** - * This {@link yfiles.layout.ILayoutStage layout stage} can be used for automatically assigning {@link yfiles.hierarchic.SwimlaneDescriptor} instances to nodes by - * treating top-level group nodes as swimlanes. - *

- * This stage will modify the hierarchy by temporarily removing the top-level group nodes and assigning corresponding - * descriptors to the remaining nodes. After running the core layout, the top-level group nodes will be arranged to - * function as swimlanes. This class allows using the current coordinates of the group nodes to - * {@link yfiles.hierarchic.TopLevelGroupToSwimlaneStage#orderSwimlanesFromSketch arrange the swimlanes from sketch}. Also, the {@link yfiles.hierarchic.TopLevelGroupToSwimlaneStage#spacing spacing} between swimlanes may be specified. - *

- *

- * This stage can be {@link yfiles.layout.MultiStageLayout#appendStage appended} to the {@link yfiles.hierarchic.HierarchicLayout}. - *

- * @see yfiles.hierarchic.HierarchicLayout - * @see yfiles.hierarchic.SwimlaneDescriptor - * @see yfiles.layout.GroupingKeys - * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface TopLevelGroupToSwimlaneStage extends yfiles.layout.LayoutStageBase{} - export class TopLevelGroupToSwimlaneStage { - /** - * Creates a new instance of {@link yfiles.hierarchic.TopLevelGroupToSwimlaneStage} with the default settings. - */ - constructor(); - /** - * Gets or sets the spacing between the swimlanes. - *

- * The spacing should be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the spacing is negative - * @type {number} - */ - spacing:number; - /** - * Gets or sets whether or not the order of the swimlanes should be determined based on the current sketch. - * @type {boolean} - */ - orderSwimlanesFromSketch:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.TopLevelGroupToSwimlaneStage; - } - /** - * This class implements the layering phase of the {@link yfiles.hierarchic.HierarchicLayout} (i.e., assignment of the nodes to - * layers). - *

- * It uses topological sorting to assign layers to the nodes. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[63.79,0,[[73.45,24.35,10.67,18.7,"1"]]],[121,150,[[130.66,174.35,10.67,18.7,"2"]]],[71,150,[[80.66,174.35,10.67,18.7,"3"]]],[162.99,0,[[172.65,24.35,10.67,18.7,"6"]]],[162.99,70,[[172.65,94.35,10.67,18.7,"7"]]],[112.99,70,[[122.65,94.35,10.67,18.7,"8"]]],[30.99,70,[[37.31,94.35,17.35,18.7,"12"]]],[35.5,220,[[45.16,244.35,10.67,18.7,"8"]]],[0,150,[[9.66,174.35,10.67,18.7,"9"]]]],"e":[[5,1,0,15,0,-15,[127.99,120,136,120]],[0,1,10,15,-10,-15,[88.79,50,92.49,50,92.49,130,126,130]],[0,2,0,15,0,-15,[78.79,50,81.49,50,81.49,120,86,120]],[4,1,0,15,10,-15,[177.99,120,146,120]],[3,4,0,15,0,-15],[0,6,-10,15,0,-15,[68.79,50,45.99,50]],[6,7,7.5,15,0,-15,[53.49,120,50.5,120]],[6,8,-7.5,15,0,-15,[38.49,120,15,120]],[8,7,0,15,-10,-15,[15,200,40.5,200]],[2,7,0,15,10,-15,[86,200,60.5,200]]],"vp":[0.0,0.0,193.0,250.0]}} - *

- * @class - * @implements {yfiles.hierarchic.ILayerer} - */ - export interface TopologicalLayerer extends yfiles.lang.Object,yfiles.hierarchic.ILayerer{} - export class TopologicalLayerer { - /** - * Creates a new instance of {@link yfiles.hierarchic.TopologicalLayerer} with default settings. - */ - constructor(); - /** - * Assigns all nodes of the graph to layers and adds them to the {@link yfiles.hierarchic.ILayers} instance. - * @param graph the input graph - * @param layers the {@link } instance that will be filled with the results of the calculation - * @param ldp the {@link } used for querying information about the nodes and edges - */ - assignLayers(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Gets or sets the (re-)ranking policy used by this {@link yfiles.hierarchic.TopologicalLayerer} instance. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown ranking policy is given - * @type {yfiles.hierarchic.RankingPolicy} - */ - rankingPolicy:yfiles.hierarchic.RankingPolicy; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.TopologicalLayerer; - } - /** - * This class is a {@link yfiles.hierarchic.IDrawingDistanceCalculator} implementation that returns the minimum distances for each - * kind of node pair based on their type as returned by {@link yfiles.hierarchic.INodeData#type}. - * @class - * @implements {yfiles.hierarchic.IDrawingDistanceCalculator} - */ - export interface TypeBasedDrawingDistanceCalculator extends yfiles.lang.Object,yfiles.hierarchic.IDrawingDistanceCalculator{} - export class TypeBasedDrawingDistanceCalculator { - /** - * Creates a new instance of {@link yfiles.hierarchic.TypeBasedDrawingDistanceCalculator} with default settings. - */ - constructor(); - /** - * - * @param graph - * @param layers - * @param ldp - */ - dispose(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * - * @param graph - * @param layer - * @param ldp - * @param left - * @param right - * @returns - */ - getMinDistance(graph:yfiles.layout.LayoutGraph,layer:yfiles.hierarchic.ILayer,ldp:yfiles.hierarchic.ILayoutDataProvider,left:yfiles.algorithms.Node,right:yfiles.algorithms.Node):number; - /** - * - * @param graph - * @param layers - * @param ldp - */ - initialize(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Gets or sets whether or not the compaction option is enabled. - * @see yfiles.hierarchic.SimplexNodePlacer#nodeCompaction - * @see yfiles.hierarchic.SimplexNodePlacer#labelCompaction - * @type {boolean} - */ - compaction:boolean; - /** - * Gets or sets the minimum distance between two {@link yfiles.algorithms.Node}s. - *

- * Minimum distance should be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum distance is negative - * @type {number} - */ - nodeToNodeDistance:number; - /** - * Gets or sets the minimum distance between a {@link yfiles.algorithms.Node} and an (non-adjacent) {@link yfiles.algorithms.Edge}. - *

- * Minimum distance should be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum distance is negative - * @type {number} - */ - nodeToEdgeDistance:number; - /** - * Gets or sets the minimum distance between two edges. - *

- * Minimum distance should be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum distance is negative - * @type {number} - */ - edgeToEdgeDistance:number; - /** - * Gets or sets the minimum length of the first segment of the edge path (at the source node). - *

- * The minimum length should be greater than 0. - *

- *

- * If the value is 0.0d the first segment does not need to be orthogonal. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum length of the first segment is negative - * @type {number} - */ - minimumFirstSegmentLength:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.TypeBasedDrawingDistanceCalculator; - } - /** - * This class implements the layering phase of the {@link yfiles.hierarchic.HierarchicLayout} (i.e., the assignment of the nodes to - * layers). - *

- * It first makes the directed graph acyclic. Then, it assigns the layers such that edge weights are respected. A weight - * defines a minimum distance between the two end points of an edge. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[100,70,[[109.66,94.35,10.67,18.7,"1"]]],[45.59,140,[[55.25,164.35,10.67,18.7,"2"]]],[95.59,140,[[105.25,164.35,10.67,18.7,"3"]]],[0,0,[[9.66,24.35,10.67,18.7,"6"]]],[0,70,[[9.66,94.35,10.67,18.7,"7"]]],[50,70,[[59.66,94.35,10.67,18.7,"8"]]],[145.59,140,[[151.91,164.35,17.35,18.7,"12"]]],[125.59,280,[[135.25,304.35,10.67,18.7,"8"]]],[125.59,210,[[135.25,234.35,10.67,18.7,"9"]]]],"e":[[5,1,0,15,0,-15,[65,120,60.59,120]],[0,1,-10,15,10,-15,[105,120,70.59,120]],[0,2,0,15,0,-15,[115,120,110.59,120]],[4,1,0,15,-10,-15,[15,120,50.59,120]],[3,4,0,15,0,-15],[0,6,10,15,0,-15,[125,120,160.59,120]],[6,7,7.5,15,10,-15,[168.09,190,176.09,190,176.09,260,150.59,260]],[6,8,-7.5,15,0,-15,[153.09,190,140.59,190]],[8,7,0,15,0,-15],[2,7,0,15,-10,-15,[110.59,190,105.09,190,105.09,260,130.59,260]]],"vp":[0.0,0.0,177.0,310.0]}} - *

- * @class - * @implements {yfiles.hierarchic.ILayerer} - */ - export interface WeightedLayerer extends yfiles.lang.Object,yfiles.hierarchic.ILayerer{} - export class WeightedLayerer { - /** - * Creates an instance of {@link yfiles.hierarchic.WeightedLayerer} with the given key that provides access to the {@link yfiles.algorithms.IDataProvider} - * that holds the edge weights and unlimited maximum duration for the {@link yfiles.hierarchic.WeightedLayerer}. - * @param [key=null] the key to access the {@link } that holds the edge weights - */ - constructor(key?:any); - /** - * Assigns all nodes of the graph to layers and adds them to the {@link yfiles.hierarchic.ILayers} instance. - * @param graph the input graph - * @param layers the {@link } instance that will be filled with the results of the calculation - * @param ldp the {@link } used for querying information about the nodes and edges - */ - assignLayers(graph:yfiles.layout.LayoutGraph,layers:yfiles.hierarchic.ILayers,ldp:yfiles.hierarchic.ILayoutDataProvider):void; - /** - * Assigns all nodes of the graph to layers. - * @param graph the graph for which the layers are determined - * @param layerID the {@link } that will be filled by the layout algorithm and returns a zero-based layer index for each - * node - * @returns the number of layers - */ - assignLayersFast(graph:yfiles.algorithms.Graph,layerID:yfiles.algorithms.INodeMap):number; - /** - * Assigns all nodes of the graph to layers. - * @param graph the graph for which the layers are determined - * @param layerID the {@link } that will be filled by the layout algorithm and returns the zero-based index of the layer - * to which each node belongs - * @returns the number of layers - */ - assignLayersToMap(graph:yfiles.algorithms.Graph,layerID:yfiles.algorithms.INodeMap):number; - /** - * Assigns all nodes of the graph to layers. - * @param graph the graph for which the layers are determined - * @param layerID the {@link } that will be filled by the layout algorithm and returns a zero-based layer index for each - * node - * @param reversedEdges an {@link } containing the edges which had been reversed - * @param weight the {@link } that returns an integer value (weight) for each edge - * @returns the number of layers - */ - assignNodeLayerWithDataProvider(graph:yfiles.layout.LayoutGraph,layerID:yfiles.algorithms.INodeMap,reversedEdges:yfiles.algorithms.EdgeList,weight:yfiles.algorithms.IDataProvider):number; - /** - * Returns the edge weight of the given edge using the weight based cycle removal heuristic. - *

- * By default, all edges are considered to have weight 1.0. - *

- *

- * It may be overridden if non-uniform weights are desired. - *

- * @param edge given edge - * @returns the edge weight of the specified edge - * @see yfiles.hierarchic.WeightedLayerer#weightedCycleRemoval - * @see yfiles.hierarchic.WeightedLayerer#weightedCycleRemoval - * @protected - */ - getWeight(edge:yfiles.algorithms.Edge):number; - /** - * Removes cycles from the graph using a depth first search. - * @param graph the graph - * @param reversedEdges an {@link } containing the edges which will be reversed - */ - makeDFSAcyclic(graph:yfiles.algorithms.Graph,reversedEdges:yfiles.algorithms.EdgeList):void; - /** - * This is a {@link yfiles.algorithms.IDataProvider} that holds for each {@link yfiles.algorithms.Edge} an integer value representing its - * weight. - * @protected - * @type {yfiles.algorithms.IDataProvider} - */ - weight:yfiles.algorithms.IDataProvider; - /** - * The key to access the {@link yfiles.algorithms.IDataProvider} that holds the edge weights. - *

- * More precisely, the corresponding {@link yfiles.algorithms.IDataProvider} maps each edge of the input graph to an integer value - * representing the edge's weight. - *

- * @protected - * @type {any} - */ - key:any; - /** - * Gets or sets whether or not the edges that need to be reversed are determined using an edge weight based heuristic or - * using a depth first search based approach. - *

- * The weight based approach may result in fewer reversed edges (especially for cases with many multi-edges) whereas the - * DFS based approach is likely to be faster. - *

- * @type {boolean} - */ - weightedCycleRemoval:boolean; - /** - * Gets or sets the time limit in milliseconds set for the layout algorithm. - *

- * Values have to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the maximum duration is negative - * @type {number} - */ - maximumDuration:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.WeightedLayerer; - } - /** - * Specifies custom data for the {@link yfiles.hierarchic.HierarchicLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface HierarchicLayoutData extends yfiles.layout.LayoutData{} - export class HierarchicLayoutData { - constructor(); - /** - * Gets or sets a mapping from edges to alternative paths for edges connecting to groups, group content or folder nodes. - * @see yfiles.hierarchic.HierarchicLayout#ALTERNATIVE_EDGE_PATH_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - alternativeEdgePath:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from group/folder nodes to alternative bounds for these nodes. - * @see yfiles.hierarchic.HierarchicLayout#ALTERNATIVE_GROUP_BOUNDS_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - alternativeGroupBounds:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their priority to be a 'critical' edge. - *

- * The layout tries to vertically align each node pair that is connected by a critical edge (integer value > 0). - *

- * @see yfiles.hierarchic.HierarchicLayout#CRITICAL_EDGE_PRIORITY_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - criticalEdgePriorities:yfiles.layout.ItemMapping; - /** - * Gets or sets the collection of folder nodes used for recursive edge styles in incremental mode. - * @see yfiles.hierarchic.HierarchicLayout#FOLDER_NODES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - folderNodes:yfiles.layout.ItemCollection; - /** - * Gets or sets the mapping of edges to their {@link yfiles.hierarchic.EdgeLayoutDescriptor}. - *

- * If an edge is mapped to null, the {@link yfiles.hierarchic.HierarchicLayout#edgeLayoutDescriptor default descriptor} is used. - *

- * @see yfiles.hierarchic.HierarchicLayoutCore#EDGE_LAYOUT_DESCRIPTOR_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeLayoutDescriptors:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping of nodes to their {@link yfiles.hierarchic.NodeLayoutDescriptor} - *

- * If a node is mapped to null, the {@link yfiles.hierarchic.HierarchicLayout#nodeLayoutDescriptor default descriptor} is used. - *

- * @see yfiles.hierarchic.HierarchicLayoutCore#NODE_LAYOUT_DESCRIPTOR_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeLayoutDescriptors:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their {@link yfiles.layout.NodeHalo}. - * @see yfiles.layout.NodeHalo#NODE_HALO_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeHalos:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their source {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourcePortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their target {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetPortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to a collection of their source port {@link yfiles.layout.PortCandidate candidates}. - * @see yfiles.layout.PortCandidate#SOURCE_PORT_CANDIDATE_COLLECTION_DP_KEY - * @type {yfiles.layout.ItemMapping.>} - */ - sourcePortCandidates:yfiles.layout.ItemMapping>; - /** - * Gets or sets a mapping from edges to a collection of their target port {@link yfiles.layout.PortCandidate candidates}. - * @see yfiles.layout.PortCandidate#TARGET_PORT_CANDIDATE_COLLECTION_DP_KEY - * @type {yfiles.layout.ItemMapping.>} - */ - targetPortCandidates:yfiles.layout.ItemMapping>; - /** - * Gets or sets a mapping from nodes to their {@link yfiles.layout.PortCandidateSet}. - * @see yfiles.layout.PortCandidateSet#NODE_PORT_CANDIDATE_SET_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodePortCandidateSets:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to an object representing their source edge group. - * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourceGroupIds:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to an object representing their source port group. - * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourcePortGroupIds:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to an object representing their target edge group. - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetGroupIds:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to an object representing their target port group. - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetPortGroupIds:yfiles.layout.ItemMapping; - /** - * Gets or sets the factory to specify layer constraints. - * @see yfiles.hierarchic.HierarchicLayout#createLayerConstraintFactory - * @see yfiles.hierarchic.ILayerConstraintFactory - * @type {yfiles.hierarchic.ILayerConstraintFactory} - */ - layerConstraintFactory:yfiles.hierarchic.ILayerConstraintFactory; - /** - * Gets or sets the factory to specify sequence constraints. - * @see yfiles.hierarchic.HierarchicLayout#createSequenceConstraintFactory - * @see yfiles.hierarchic.ISequenceConstraintFactory - * @type {yfiles.hierarchic.ISequenceConstraintFactory} - */ - sequenceConstraintFactory:yfiles.hierarchic.ISequenceConstraintFactory; - /** - * Gets or sets a mapping from nodes and edges to their incrementally hints. - * @see yfiles.hierarchic.HierarchicLayout#INCREMENTAL_HINTS_DP_KEY - * @type {yfiles.hierarchic.IncrementalHintItemMapping} - */ - incrementalHints:yfiles.hierarchic.IncrementalHintItemMapping; - /** - * Gets or sets a mapper from nodes to the index of their layer. - *

- * If this property is set, the mapper is filled by the layout with the layer information. - *

- * @see yfiles.hierarchic.HierarchicLayout#LAYER_INDEX_DP_KEY - * @type {yfiles.collections.IMapper.} - */ - layerIndices:yfiles.collections.IMapper; - /** - * Gets or sets a mapper from nodes to the sequence index in their layer. - *

- * If this property is set, the mapper is filled by the layout with the sequence information. - *

- * @see yfiles.hierarchic.HierarchicLayout#SEQUENCE_INDEX_DP_KEY - * @type {yfiles.collections.IMapper.} - */ - sequenceIndices:yfiles.collections.IMapper; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - /** - * Gets or sets the partition grid layout data. - * @type {yfiles.layout.PartitionGridData} - */ - partitionGridData:yfiles.layout.PartitionGridData; - /** - * Gets or sets the layout data for the {@link yfiles.hierarchic.SelfLoopCalculator}. - * @type {yfiles.hierarchic.SelfLoopCalculatorData} - */ - selfLoopCalculatorData:yfiles.hierarchic.SelfLoopCalculatorData; - /** - * Gets or sets the mapping from edges to an additional weight used by the {@link yfiles.hierarchic.ConstraintIncrementalLayerer}. - *

- * The Layerer tries to keep edges with higher weights short. - *

- * @see yfiles.hierarchic.ConstraintIncrementalLayerer#ADDITIONAL_EDGE_WEIGHT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - constraintIncrementalLayererAdditionalEdgeWeights:yfiles.layout.ItemMapping; - /** - * Gets or sets the collection of core nodes used by the {@link yfiles.hierarchic.BFSLayerer}. - *

- * The {@link yfiles.hierarchic.BFSLayerer} is used when {@link yfiles.hierarchic.HierarchicLayout#fromScratchLayeringStrategy} is set to {@link yfiles.hierarchic.LayeringStrategy#BFS}. - *

- * @see yfiles.hierarchic.BFSLayerer#CORE_NODES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - bfsLayererCoreNodes:yfiles.layout.ItemCollection; - /** - * Gets or set the mapping from nodes to their layer index when using the {@link yfiles.hierarchic.GivenLayersLayerer}. - *

- * The {@link yfiles.hierarchic.GivenLayersLayerer} is used when {@link yfiles.hierarchic.HierarchicLayout#fromScratchLayeringStrategy} is set to {@link yfiles.hierarchic.LayeringStrategy#USER_DEFINED}. - *

- * @see yfiles.hierarchic.GivenLayersLayerer#LAYER_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - givenLayersLayererIds:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from edges to their directedness. - *

- * Generally, the hierarchic layout algorithm assigns nodes to layers such that most of the edges point in the - * {@link yfiles.layout.MultiStageLayout#layoutOrientation main layout direction}. The directedness of an edge specifies whether it should comply with this strategy. More - * precisely, a value of 1 means that the edge should fully comply, a value of -1 that it should comply inversely (the edge - * should point against the main layout direction), and a value of 0 means that the direction doesn't matter at all and the - * endpoints of the edges may be placed at the same layer. If there are conflicting preferences, edges with higher absolute - * values are more likely to point in the desired direction. - *

- * @see yfiles.hierarchic.HierarchicLayout#EDGE_DIRECTEDNESS_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeDirectedness:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from edges to their thickness. - *

- * The specified non-negative thickness is considered when calculating minimum distances so that there are no overlaps - * between edges and other graph elements. By default, each edge has thickness 0. - *

- * @see yfiles.hierarchic.HierarchicLayout#EDGE_THICKNESS_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeThickness:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping that provides a {@link yfiles.layout.PreferredPlacementDescriptor} instance for edge - * {@link yfiles.graph.ILabel}s. - * @see yfiles.layout.PreferredPlacementDescriptor - * @see yfiles.layout.LayoutGraphAdapter#EDGE_LABEL_LAYOUT_PREFERRED_PLACEMENT_DESCRIPTOR_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeLabelPreferredPlacement:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.HierarchicLayoutData; - } - /** - * Provides different ways to define a mapping from model items to incremental hints for use with - * {@link yfiles.hierarchic.HierarchicLayoutData}. - *

- * Only one of the provided ways to define a mapping can be used at the same time, therefore only one of the properties of - * this class should be set on an instance. - *

- * @class - * @extends {yfiles.layout.ContextItemMapping.} - * @final - */ - export interface IncrementalHintItemMapping extends yfiles.layout.ContextItemMapping{} - export class IncrementalHintItemMapping { - constructor(); - /** - * Gets or sets an item collection of nodes that are mapped to {@link yfiles.hierarchic.IIncrementalHintsFactory#createLayerIncrementallyHint incremental layering hints}. - * @type {yfiles.layout.ItemCollection.} - */ - incrementalLayeringNodes:yfiles.layout.ItemCollection; - /** - * Gets or sets an item collection of nodes that are mapped to {@link yfiles.hierarchic.IIncrementalHintsFactory#createSequenceIncrementallyHint incremental sequencing hints}. - * @type {yfiles.layout.ItemCollection.} - */ - incrementalSequencingItems:yfiles.layout.ItemCollection; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.IncrementalHintItemMapping; - } - /** - * Specifies custom data for the {@link yfiles.hierarchic.SelfLoopCalculator}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface SelfLoopCalculatorData extends yfiles.layout.LayoutData{} - export class SelfLoopCalculatorData { - constructor(); - /** - * Gets or sets the collection of edges that are octilinear. - * @see yfiles.hierarchic.SelfLoopCalculator#OCTILINEAR_EDGES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - octilinearEdges:yfiles.layout.ItemCollection; - /** - * Gets or sets the mapping from nodes to their minimum distance to selfloop edges. - * @see yfiles.hierarchic.SelfLoopCalculator#MINIMUM_NODE_DISTANCE_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - minimumNodeDistances:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from edges to their minimum distance to the next edge and to node sides. - * @see yfiles.hierarchic.SelfLoopCalculator#MINIMUM_EDGE_DISTANCE_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - minimumEdgeDistances:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from edges to the minimum length of their first segment. - * @see yfiles.hierarchic.SelfLoopCalculator#MINIMUM_FIRST_SEGMENT_LENGTH_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - minimumFirstSegmentLengths:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from edges to the minimum length of their last segment. - * @see yfiles.hierarchic.SelfLoopCalculator#MINIMUM_LAST_SEGMENT_LENGTH_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - minimumLastSegmentLengths:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from edges to the minimum length of their octilinear segments. - * @see yfiles.hierarchic.SelfLoopCalculator#MINIMUM_OCTILINEAR_SEGMENT_LENGTH_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - minimumOctilinearSegmentLengths:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.hierarchic.SelfLoopCalculatorData; - } - }export namespace labeling{ - export enum OptimizationStrategy{ - /** - * An optimization strategy aiming at a good balance between the available optimization options. - * @see yfiles.labeling.MISLabelingBase#optimizationStrategy - */ - BALANCED, - /** - * An optimization strategy that especially reduces overlaps between labels and nodes as well as labels and node halos. - * @see yfiles.labeling.MISLabelingBase#optimizationStrategy - */ - NODE_OVERLAP, - /** - * An optimization strategy that especially reduces overlaps between labels. - * @see yfiles.labeling.MISLabelingBase#optimizationStrategy - */ - LABEL_OVERLAP, - /** - * An optimization strategy that especially reduces overlaps between labels and edges. - * @see yfiles.labeling.MISLabelingBase#optimizationStrategy - */ - EDGE_OVERLAP, - /** - * An optimization strategy that mainly tries to satisfy the preferences described by a {@link yfiles.layout.PreferredPlacementDescriptor} - * associated with edge labels. - * @see yfiles.labeling.MISLabelingBase#optimizationStrategy - */ - PREFERRED_PLACEMENT, - /** - * Use no optimization strategy. - */ - NONE - } - /** - * A generic labeling algorithm for placing the labels of a graph. - *

- * {@graph {"ann":{"s":[30,30],"d":1,"c":1,"lblFlip":1,"lblB":1},"n":[[249.44,602.63,[[212.75,626.98,32.69,18.7,"Node"]]],[306.92,686.94,[[270.24,711.29,32.69,18.7,"Node"]]],[481.7,787.85,[[515.7,812.2,32.69,18.7,"Node"]]],[219.36,505.12,[[182.67,529.47,32.69,18.7,"Node"]]],[386.71,750.57,[[350.02,774.92,32.69,18.7,"Node"]]],[885,353.19,[[883.66,405.89,32.69,18.7,"Node"]]],[840.72,261.25,[[839.38,257.25,32.69,18.7,"Node"]]],[583.46,112.72,[[582.11,108.72,32.69,18.7,"Node"]]],[249.44,305.56,[[212.75,329.91,32.69,18.7,"Node"]]],[682.94,135.42,[[681.6,131.42,32.69,18.7,"Node"]]],[481.7,120.34,[[480.35,116.34,32.69,18.7,"Node"]]],[771.32,186.45,[[769.97,182.45,32.69,18.7,"Node"]]],[219.36,403.07,[[182.67,427.42,32.69,18.7,"Node"]]],[306.92,221.25,[[270.24,245.6,32.69,18.7,"Node"]]],[386.71,157.62,[[385.36,153.62,32.69,18.7,"Node"]]]],"e":[[0,1,[],[[259.45,643.51,32.03,18.7,0.826238774315996,-0.5633200580636204,"Edge"]]],[3,0,[],[[221.61,542.21,32.03,18.7,0.9555728057861415,-0.294755174410902,"Edge"]]],[1,4,[],[[349.3,723.77,32.03,18.7,0.6234898018587343,-0.7818314824680294,"Edge"]]],[4,2,[],[[418.05,771.98,32.03,18.7,0.36534102436639637,-0.9308737486442037,"Edge"]]],[3,5,[],[[262.64,513.66,32.03,18.7,-0.2225209339563144,-0.9749279121818236,"Edge"]]],[2,5,[],[[534.29,789.82,32.03,18.7,-0.7330518718298267,-0.680172737770919,"Edge"]]],[4,5,[],[[427.6,744.91,32.03,18.7,-0.6234898018587336,-0.7818314824680299,"Edge"]]],[1,5,[],[[350.46,685.47,32.03,18.7,-0.5000000000000003,-0.8660254037844386,"Edge"]]],[0,5,[],[[298.89,624.2,32.03,18.7,-0.3653410243663947,-0.9308737486442044,"Edge"]]],[5,6,[],[[878.37,323.28,32.03,18.7,0.9009688679024184,-0.4338837391175598,"Edge"]]],[7,5,[],[[611.91,162.36,32.03,18.7,0.6234898018587336,-0.7818314824680299,"Edge"]]],[8,5,[],[[292.35,341.41,32.03,18.7,0.07473009358642455,-0.9972037971811801,"Edge"]]],[9,7,[],[[645.8,157.7,32.03,18.7,0.2225209339563144,-0.9749279121818236,"Edge"]]],[7,10,[],[[549.55,131.38,32.03,18.7,-0.07473009358642278,-0.9972037971811804,"Edge"]]],[10,5,[],[[515.14,167.59,32.03,18.7,0.5000000000000003,-0.8660254037844386,"Edge"]]],[6,11,[],[[796.42,239.83,32.03,18.7,0.7330518718298267,-0.680172737770919,"Edge"]]],[11,9,[],[[733.51,192.55,32.03,18.7,0.4999999999999995,-0.866025403784439,"Edge"]]],[8,12,[],[[267.76,373.25,32.03,18.7,-0.9555728057861401,-0.29475517441090626,"Edge"]]],[12,3,[],[[253.06,467.1,32.03,18.7,-1.0,-2.7257675990577433E-15,"Edge"]]],[12,5,[],[[265.18,415.76,32.03,18.7,-0.07473009358642366,-0.9972037971811802,"Edge"]]],[13,5,[],[[347.6,261.29,32.03,18.7,0.22252093395631525,-0.9749279121818234,"Edge"]]],[13,8,[],[[284.16,291.63,32.03,18.7,-0.826238774315993,-0.5633200580636247,"Edge"]]],[10,14,[],[[450.54,153.46,32.03,18.7,-0.3653410243663931,-0.930873748644205,"Edge"]]],[14,13,[],[[349.3,214.42,32.03,18.7,-0.6234898018587314,-0.7818314824680315,"Edge"]]],[14,5,[],[[424.24,201.56,32.03,18.7,0.36534102436639554,-0.930873748644204,"Edge"]]]],"vp":[182.0,90.0,735.0,728.0]}} Node labels and edge labels placed by the labeling algorithm - *

- *

- * This algorithm can switch between two internal implementations. By default, it generates high quality label placements - * even for difficult instances. This especially holds if the label models allow a large number of different - * {@link yfiles.layout.LabelCandidate}s, i.e., there is a high potential for optimizations. - *

- *

- * If the duration of the calculation is of utmost importance, the internal algorithm can be changed to a simpler - * implementation by setting {@link yfiles.labeling.GenericLabeling#maximumDuration} to 0. On the downside, the results will not be as good as the ones of the default mode. - *

- *

- * In default mode, this algorithm reduces the labeling problem to the maximum independent set (MIS) problem and solves the - * problem using simulated annealing. It is inspired by the article from Christensen, Marks and Shieber: A General - * Cartographic Labelling Algorithm. - *

- *

- * It is recommended to use {@link yfiles.layout.IEdgeLabelLayoutModel}s and - * {@link yfiles.layout.INodeLabelLayoutModel}s which allow free positioning of labels to achieve best results with this generic - * labeling algorithm. - *

- *

- * This algorithm works according to the general labeling concept defined by {@link yfiles.labeling.LabelingBase}. - *

- * @see yfiles.labeling.LabelingBase - * @class - * @extends {yfiles.labeling.MISLabelingBase} - */ - export interface GenericLabeling extends yfiles.labeling.MISLabelingBase{} - export class GenericLabeling { - /** - * Creates a new instance of {@link yfiles.labeling.GenericLabeling} with default settings. - */ - constructor(); - /** - * Gets or sets whether or not this algorithm behaves deterministically. - *

- * If enabled, it produces the same results given the same input graph and settings. - *

- * @type {boolean} - */ - deterministic:boolean; - /** - * Gets or sets the time limit for this algorithm in milliseconds. - *

- * 0x7FFFFFFF denotes that there is no time limit. Values have to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given maximum duration is negative - * @type {number} - */ - maximumDuration:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.labeling.GenericLabeling; - } - /** - * An abstract base class for generic labeling algorithms which place labels of graphs. - *

- * Labeling algorithms compute positions for labels in a given graph. The main goal is to place labels such that they do - * not overlap with other graph elements. Labeling algorithms do not modify positions of nodes and edges. - *

- *

- * Concept - *

- *

- * Generic labeling algorithms use the model associated with a label (i.e. {@link yfiles.layout.INodeLabelLayout#labelModel node label model} for nodes and {@link yfiles.layout.IEdgeLabelLayout#labelModel edge label model} - * for edges). The models are necessary to compute a set of {@link yfiles.layout.LabelCandidate}s, i.e., candidate positions for a - * label. Then, one best matching candidate from the set will be selected. This selection depends on several preferences, e.g., if {@link yfiles.labeling.LabelingBase#removeNodeOverlaps overlaps with nodes} - * are not allowed, candidates encoding overlapping positions will be ignored. - *

- *

- * After one {@link yfiles.layout.LabelCandidate} has been chosen, the label model's parameter is used for encoding the label - * position. Therefore, the result of a generic labeling algorithm is one model parameter per label. The parameter is {@link yfiles.layout.ILabelLayout#modelParameter stored with the label} - * and expresses the label position with respect to the underlying label model. - *

- *

- * Features - *

- *

- * This class provides a general frame, offering functionality which can be shared by other generic labeling algorithms. - *

- *

- * To only place labels or a subset of labels, the main labeling methods {@link yfiles.labeling.LabelingBase#label}, {@link yfiles.labeling.LabelingBase#label} - * and {@link yfiles.labeling.LabelingBase#label} are offered. - *

- *

- * As this class represents an {@link yfiles.layout.LayoutStageBase}, it allows usage as a generic labeling stage. By combining it - * with a - * {@link yfiles.layout.LayoutStageBase#coreLayout core layouter}, the labeling will take place after the core layouter was executed - * ({@link yfiles.labeling.LabelingBase#applyLayout}). This is especially useful if the core layouter does not support label - * handling. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface LabelingBase extends yfiles.layout.LayoutStageBase{} - export class LabelingBase { - /** - * Creates a new {@link yfiles.labeling.LabelingBase} instance with default settings. - */ - constructor(); - /** - * Returns the profit for placing a {@link yfiles.layout.LabelCandidate} with respect to the current {@link yfiles.labeling.LabelingBase#profitModel profit model}. - *

- * Method {@link yfiles.layout.IProfitModel#getProfit} on the current profit model will be invoked to compute the actual profit - * value. - *

- *

- * The higher the profit (rank) of a candidate is, the more likely it will be chosen as actual position by the algorithm. - *

- * @param candidate a label candidate - * @returns the profit value between 0 and 1 - */ - getProfit(candidate:yfiles.layout.LabelCandidate):number; - /** - * Places the labels of the input graph restricting the placement to labels contained in the given lists. - *

- * The {@link yfiles.labeling.LabelingBase#affectedLabelsDpKey selection} will not be considered; the given lists will define the selection of labels that are to be placed. - *

- * @param graph the input graph - * @param nodeLabels a list of {@link }s defining the set of node labels that will be placed - * @param edgeLabels a list of {@link }s defining the set of edge labels that will be placed - */ - label(graph:yfiles.layout.LayoutGraph,nodeLabels:yfiles.algorithms.YList,edgeLabels:yfiles.algorithms.YList):void; - /** - * Places the labels of the input graph using a {@link yfiles.algorithms.IDataProvider} registered to the input graph with the - * given key for determining which labels to place. - *

- * Instead of considering the current {@link yfiles.labeling.LabelingBase#affectedLabelsDpKey selection key}, the {@link yfiles.algorithms.IDataProvider} registered with the given key will - * be used for selecting labels. Invoking this method has the same effect as first {@link yfiles.labeling.LabelingBase#affectedLabelsDpKey specifying the key} as selection key and - * then invoking {@link yfiles.labeling.LabelingBase#label}. - *

- * @param graph the input graph - * @param [key=null] the {@link } key for label selection - */ - label(graph:yfiles.layout.LayoutGraph,key?:any):void; - /** - * Data provider key for mapping models to edge/node labels - *

- * The {@link yfiles.layout.INodeLabelLayoutModel}s and {@link yfiles.layout.IEdgeLabelLayoutModel}s linked to - * {@link yfiles.layout.INodeLabelLayout}s and {@link yfiles.layout.IEdgeLabelLayout}s by this {@link yfiles.algorithms.IDataProvider} are taken as - * replacement models. This means that the original model is internally replaced by another model when computing valid - * positions for the label. A model parameter that fits the calculated position of the replacement model best is set for - * the original label model. - *

- * @const - * @static - * @type {yfiles.algorithms.ILabelLayoutDpKey.} - */ - static LABEL_MODEL_DP_KEY:yfiles.algorithms.ILabelLayoutDpKey; - /** - * Gets or sets the {@link yfiles.layout.IProfitModel} for ranking the {@link yfiles.layout.LabelCandidate}s for labels. - *

- * The profit model is used when {@link yfiles.labeling.LabelingBase#getProfit calculating the profit} of a candidate. - *

- *

- * The higher the profit (rank) of a candidate is, the more likely it will be chosen as actual position by the algorithm. - *

- * @see yfiles.layout.IProfitModel - * @see yfiles.layout.SimpleProfitModel - * @see yfiles.labeling.LabelingBase#getProfit - * @type {yfiles.layout.IProfitModel} - */ - profitModel:yfiles.layout.IProfitModel; - /** - * Gets or sets whether or not internal node labels are allowed to move. - *

- * A node label is internal if the label's boundaries are completely within the node's boundaries. - *

- * @type {boolean} - */ - moveInternalNodeLabels:boolean; - /** - * Gets or sets whether or not a post-processing step to reduce the number of label overlaps is applied. - * @type {boolean} - */ - reduceLabelOverlaps:boolean; - /** - * Gets or sets whether or not {@link yfiles.layout.LabelCandidate label candidates} that overlap with nodes are removed. - *

- * If overlapping candidates are not removed, they will be considered but get a penalty. Therefore, it is still less likely - * that an overlapping candidate is finally chosen. - *

- *

- * The detection and removal of labels that overlap with nodes may increase the runtime of this algorithm. - *

- * @type {boolean} - */ - removeNodeOverlaps:boolean; - /** - * Gets or sets whether or not {@link yfiles.layout.LabelCandidate label candidates} that overlap with edges are removed. - *

- * If overlapping candidates are not removed, they will be considered but get a penalty. Therefore, it is still less likely - * that an overlapping candidate is finally chosen. - *

- *

- * The detection and removal of labels that overlap with edges may increase the runtime of this algorithm. - *

- * @type {boolean} - */ - removeEdgeOverlaps:boolean; - /** - * Gets or sets whether or not labels assigned to nodes are placed. - * @see yfiles.labeling.LabelingBase#affectedLabelsDpKey - * @type {boolean} - */ - placeNodeLabels:boolean; - /** - * Gets or sets whether or not labels assigned to edges are placed. - * @see yfiles.labeling.LabelingBase#affectedLabelsDpKey - * @type {boolean} - */ - placeEdgeLabels:boolean; - /** - * Gets or sets the {@link yfiles.algorithms.IDataProvider} key to mark labels as selected for placement. - *

- * If a {@link yfiles.algorithms.IDataProvider} is registered with this key, only the selected labels will be placed, while all - * other labels are considered fixed. - *

- *

- * The registered {@link yfiles.algorithms.IDataProvider} needs to map from {@link yfiles.layout.ILabelLayout} to {@link boolean} where true indicates - * that a label should be placed and false indicates that a label should be ignored. - *

- * @type {any} - */ - affectedLabelsDpKey:any; - /** - * Gets or sets whether or not edge labels are automatically flipped if otherwise they would be upside-down. - * @type {boolean} - */ - autoFlipping:boolean; - /** - * Gets or sets whether or not edge labels may overlap with edges belonging to the same edge group as the label's edge. - *

- * An edge group is a set of edges which share a common bus near the target or source node. They are defined using - * {@link yfiles.algorithms.IDataProvider}s registered with {@link yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY} and - * {@link yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY}. - *

- * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @type {boolean} - */ - edgeGroupOverlapAllowed:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.labeling.LabelingBase; - } - /** - * A base class for generic labeling algorithms which solve the labeling problem by reducing it to the maximum independent - * set (MIS) problem. - *

- * Different optimization strategies are available; an optimization strategy defines which criteria the algorithm should - * try to optimize. For example, reducing the number of overlaps between labels and nodes may be considered more important - * than reducing the number of overlaps between labels and edges. - *

- * @see yfiles.labeling.GenericLabeling - * @class - * @extends {yfiles.labeling.LabelingBase} - */ - export interface MISLabelingBase extends yfiles.labeling.LabelingBase{} - export class MISLabelingBase { - /** - * Creates a new {@link yfiles.labeling.MISLabelingBase} instance with default settings. - */ - constructor(); - /** - * Returns a {@link yfiles.algorithms.INodeMap} which assigns a profit value to each node in the {@link yfiles.labeling.MISLabelingBase#conflictGraph conflict graph}. - *

- * As the conflict graph's nodes represent {@link yfiles.layout.LabelCandidate}s, this mapping gives the profit value of label - * candidates. The assigned value is defined as the difference between the {@link yfiles.labeling.LabelingBase#getProfit profit induced by the profit model} and the - * candidate's {@link yfiles.layout.LabelCandidate#overlapPenalty overlap penalty}. - *

- *

- * The returned map is a mapping from each {@link yfiles.algorithms.Node} (representing a label candidate) in the {@link yfiles.labeling.MISLabelingBase#conflictGraph} - * to a {@link number} representing the profit value of the candidate. - *

- * @returns a mapping from nodes (i.e. label candidates) to their profit value - */ - assignProfit():yfiles.algorithms.INodeMap; - /** - * Creates the edges in the conflict graph, i.e., one edge between two nodes if the corresponding - * {@link yfiles.layout.LabelCandidate}s intersect. - *

- * The nodes of the {@link yfiles.labeling.MISLabelingBase#conflictGraph conflict graph} represent - * {@link yfiles.layout.LabelCandidate}s. An edge between candidates signals that they overlap. A maximum independent set will be - * computed on the conflict graph to choose candidates such that no two candidates overlap. - *

- *

- * This method may be overridden to change the structure of the {@link yfiles.labeling.MISLabelingBase#conflictGraph conflict graph}. Edges between two - * {@link yfiles.layout.LabelCandidate}s in the conflict graph signal that the two candidates should not be selected together. By - * overriding this method, arbitrary reasons for indicating that two label candidates should not be chosen at the same time - * can be modeled. - *

- * @see yfiles.labeling.MISLabelingBase#conflictGraph - * @see yfiles.labeling.MISLabelingBase#nodesToBoxes - * @see yfiles.labeling.MISLabelingBase#boxesToNodes - * @see yfiles.labeling.MISLabelingBase#nodesToID - * @protected - */ - createEdges():void; - /** - * Indicates that an overlap between a {@link yfiles.layout.LabelCandidate} and an {@link yfiles.algorithms.Edge} of the input graph has - * been found. - *

- * This method is called when finding overlaps while {@link yfiles.labeling.MISLabelingBase#createEdges creating edges} of the {@link yfiles.labeling.MISLabelingBase#conflictGraph conflict graph}. It will store a factor - * indicating how much the two elements overlap. The factor influences the {@link yfiles.labeling.LabelingBase#getProfit profit} assigned to the given label candidate. - *

- *

- * This method may be overridden to realize a custom strategy for reacting to overlaps between label candidates and edges. - *

- * @param labelCandidate the {@link } overlapping with the given {@link } - * @param edge the {@link } overlapping with the given {@link } - * @param eSegment the {@link } of the given edge overlapping with the given candidate - * @see yfiles.labeling.MISLabelingBase#conflictGraph - * @see yfiles.labeling.MISLabelingBase#createEdges - */ - foundEdgeOverlap(labelCandidate:yfiles.layout.LabelCandidate,edge:yfiles.algorithms.Edge,eSegment:yfiles.algorithms.LineSegment):void; - /** - * Indicates that an overlap between a {@link yfiles.layout.LabelCandidate} and a {@link yfiles.layout.NodeHalo} of the input graph has - * been found. - *

- * This method is called when finding overlaps while {@link yfiles.labeling.MISLabelingBase#createEdges creating edges} of the {@link yfiles.labeling.MISLabelingBase#conflictGraph conflict graph}. It will store a factor - * indicating how much the two elements overlap. The factor influences the {@link yfiles.labeling.LabelingBase#getProfit profit} assigned to the given label candidate. - *

- *

- * This method may be overridden to realize a custom strategy for reacting to overlaps between label candidates and node - * halos. - *

- * @param labelCandidate the {@link } overlapping with a node halo - * @param node the {@link } whose {@link } is overlapping with the given label candidate - * @param haloRect the bounding box of the {@link } overlapping with the given label candidate - * @see yfiles.labeling.MISLabelingBase#conflictGraph - * @see yfiles.labeling.MISLabelingBase#createEdges - */ - foundHaloOverlap(labelCandidate:yfiles.layout.LabelCandidate,node:yfiles.algorithms.Node,haloRect:yfiles.algorithms.YRectangle):void; - /** - * Indicates that an overlap between two {@link yfiles.layout.LabelCandidate}s has been found. - *

- * This method is called when finding overlaps while {@link yfiles.labeling.MISLabelingBase#createEdges creating edges} of the - * {@link yfiles.labeling.MISLabelingBase#conflictGraph conflict graph}. It will store a factor indicating how much the two candidates overlap. The factor influences the penalty - * assigned when both candidates are chosen, i.e., the penalty for the corresponding overlap. - *

- *

- * This method may be overridden to realize a custom strategy for reacting to overlaps among - * {@link yfiles.layout.LabelCandidate}s. - *

- * @param candidate1 the first overlapping {@link } - * @param candidate2 the second overlapping {@link } - * @param edge the {@link } in {@link #conflictGraph} representing the found overlap - * @see yfiles.labeling.MISLabelingBase#conflictGraph - * @see yfiles.labeling.MISLabelingBase#createEdges - */ - foundLabelOverlap(candidate1:yfiles.layout.LabelCandidate,candidate2:yfiles.layout.LabelCandidate,edge:yfiles.algorithms.Edge):void; - /** - * Indicates that an overlap between a {@link yfiles.layout.LabelCandidate} and a {@link yfiles.algorithms.Node} of the input graph has - * been found. - *

- * This method is called when finding overlaps while {@link yfiles.labeling.MISLabelingBase#createEdges creating edges} of the {@link yfiles.labeling.MISLabelingBase#conflictGraph conflict graph}. It will store a factor - * indicating how much the two elements overlap. The factor influences the {@link yfiles.labeling.LabelingBase#getProfit profit} assigned to the given label candidate. - *

- *

- * This method may be overridden to realize a custom strategy for reacting to overlaps between label candidates and nodes. - *

- * @param labelCandidate the {@link } overlapping with the given node - * @param node the {@link } overlapping with the given label candidate - * @param nodeBox the bounding box of the given node - * @see yfiles.labeling.MISLabelingBase#conflictGraph - * @see yfiles.labeling.MISLabelingBase#createEdges - */ - foundNodeOverlap(labelCandidate:yfiles.layout.LabelCandidate,node:yfiles.algorithms.Node,nodeBox:yfiles.algorithms.YRectangle):void; - /** - * The input graph that will be labeled. - * @type {yfiles.layout.LayoutGraph} - */ - graph:yfiles.layout.LayoutGraph; - /** - * The conflict graph modeling - * {@link yfiles.layout.LabelCandidate}s as nodes and edges between them as conflicts, i.e., overlaps among candidates. - * @see yfiles.labeling.MISLabelingBase#createEdges - * @type {yfiles.algorithms.Graph} - */ - conflictGraph:yfiles.algorithms.Graph; - /** - * The mapping from each node in the {@link yfiles.labeling.MISLabelingBase#conflictGraph} to the corresponding {@link yfiles.layout.LabelCandidate} - * instance. - * @see yfiles.labeling.MISLabelingBase#conflictGraph - * @type {yfiles.algorithms.INodeMap} - */ - nodesToBoxes:yfiles.algorithms.INodeMap; - /** - * The mapping from the {@link yfiles.layout.LabelCandidate}s to the corresponding nodes in the - * {@link yfiles.labeling.MISLabelingBase#conflictGraph}. - * @see yfiles.labeling.MISLabelingBase#conflictGraph - * @type {yfiles.collections.IMap.} - */ - boxesToNodes:yfiles.collections.IMap; - /** - * The mapping from nodes in the {@link yfiles.labeling.MISLabelingBase#conflictGraph} to a corresponding integer value (ID). - *

- * The ID denotes the actual label which a {@link yfiles.layout.LabelCandidate} (i.e. a node in the conflict graph) belongs to. - *

- * @type {yfiles.algorithms.INodeMap} - */ - nodesToID:yfiles.algorithms.INodeMap; - /** - * Gets or sets the ratio between the internal profit (ip) and the profit computed using the specified {@link yfiles.labeling.LabelingBase#profitModel profit model} (sp). - *

- * This ratio defines how to weight the two profit values (ip) and (sp). The overall ratio is then computed as - * ratio * sp + (1 - ratio) * ip. The profit of a {@link yfiles.layout.LabelCandidate} defines how likely it is that the candidate - * will be chosen as actual label position. - *

- *

- * The ratio is defined to be a value from the interval [0,1]. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given ratio is negative or larger than 1 - * @see yfiles.labeling.LabelingBase#profitModel - * @see yfiles.labeling.MISLabelingBase#optimizationStrategy - * @type {number} - */ - customProfitModelRatio:number; - /** - * Gets or sets the optimization strategy which defines the importance of criteria when optimizing labeling results. - *

- * Depending on the strategy, criteria like label-node overlaps, label-label overlaps and others are more or less - * important. For example, if the number of overlaps between labels and nodes is the most important criterion for the - * result, strategy {@link yfiles.labeling.OptimizationStrategy#NODE_OVERLAP} should be chosen. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given strategy is unknown - * @type {yfiles.labeling.OptimizationStrategy} - */ - optimizationStrategy:yfiles.labeling.OptimizationStrategy; - /** - * Gets or sets whether or not {@link yfiles.layout.LabelCandidate label candidates} that overlap with nodes are removed. - *

- * If overlapping candidates are not removed, they will be considered but get a penalty. Therefore, it is still less likely - * that an overlapping candidate is finally chosen. - *

- *

- * The detection and removal of labels that overlap with nodes may increase the runtime of this algorithm. - *

- * @type {boolean} - */ - removeNodeOverlaps:boolean; - /** - * Gets or sets whether or not {@link yfiles.layout.LabelCandidate label candidates} that overlap with edges are removed. - *

- * If overlapping candidates are not removed, they will be considered but get a penalty. Therefore, it is still less likely - * that an overlapping candidate is finally chosen. - *

- *

- * The detection and removal of labels that overlap with edges may increase the runtime of this algorithm. - *

- * @type {boolean} - */ - removeEdgeOverlaps:boolean; - /** - * Gets or sets whether or not the number of ambiguous label placements is reduced by applying an additional optimization - * step. - *

- * A label position is considered to be ambiguous if it might not be possible to identify to which graph element the label - * belongs. For example, an edge label placed in between two edges is ambiguous. - *

- *

- * Enabling this reduction step does not guarantee that no ambiguous placements are selected. The algorithm will try to - * avoid them if other good positions without ambiguity are available. Other aspects like {@link yfiles.layout.PreferredPlacementDescriptor preferred placement} for edge - * labels will still be more important than the reduction of ambiguity. - *

- * @type {boolean} - */ - reduceAmbiguity:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.labeling.MISLabelingBase; - } - /** - * Specifies custom data for the {@link yfiles.labeling.GenericLabeling}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface LabelingData extends yfiles.layout.LayoutData{} - export class LabelingData { - constructor(); - /** - * Gets or sets the collection of labels that shall be placed by the algorithm. - *

- * Note that the {@link yfiles.layout.DpKeyItemCollection.#dpKey} has to be set to the key assigned to {@link yfiles.labeling.LabelingBase#affectedLabelsDpKey}. - *

- * @see yfiles.labeling.LabelingBase#affectedLabelsDpKey - * @type {yfiles.layout.DpKeyItemCollection.} - */ - affectedLabels:yfiles.layout.DpKeyItemCollection; - /** - * Gets or sets the mapping from node labels to an {@link yfiles.layout.INodeLabelLayoutModel} used by the labeling algorithm - * instead of the original label model. - *

- * If a label has no mapping, the original model is used as normal. - *

- * @see yfiles.labeling.LabelingBase#LABEL_MODEL_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeLabelModels:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from edge labels to an {@link yfiles.layout.IEdgeLabelLayoutModel} used by the labeling algorithm - * instead of the original label model. - *

- * If a label has no mapping, the original model is used as normal. - *

- * @see yfiles.labeling.LabelingBase#LABEL_MODEL_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeLabelModels:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to an object representing their source edge group. - * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourceGroupIds:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to an object representing their target edge group. - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetGroupIds:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their {@link yfiles.layout.NodeHalo}. - * @see yfiles.layout.NodeHalo#NODE_HALO_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeHalos:yfiles.layout.ItemMapping; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - /** - * Gets or sets the mapping that provides a {@link yfiles.layout.PreferredPlacementDescriptor} instance for edge - * {@link yfiles.graph.ILabel}s. - * @see yfiles.layout.PreferredPlacementDescriptor - * @see yfiles.layout.LayoutGraphAdapter#EDGE_LABEL_LAYOUT_PREFERRED_PLACEMENT_DESCRIPTOR_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeLabelPreferredPlacement:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.labeling.LabelingData; - } - }export namespace organic{ - export enum InitialPlacement{ - /** - * Initial placement strategy for starting with randomly chosen node locations. - * @see yfiles.organic.ClassicOrganicLayout#initialPlacement - */ - RANDOM, - /** - * Initial placement strategy for starting with all node location coordinates set to 0. - *

- * This strategy is best if the initial placement should be maximally neutral, ignoring the existing layout of the input - * graph. - *

- * @see yfiles.organic.ClassicOrganicLayout#initialPlacement - */ - ZERO, - /** - * Initial placement strategy for starting with the node locations as they are in the input graph. - *

- * This strategy is best if the existing layout should change as little as possible. - *

- * @see yfiles.organic.ClassicOrganicLayout#initialPlacement - */ - AS_IS - } - export enum GroupsPolicy{ - /** - * Group handling policy for considering and arranging the nodes contained in a group such that their togetherness is - * highlighted. - * @see yfiles.organic.ClassicOrganicLayout#groupNodePolicy - */ - LAYOUT, - /** - * Group handling policy for keeping the relative positions of nodes that belong to the same group fixed. - *

- * The fixed groups will be taken into account when placing the other nodes of the graph. - *

- *

- * By registering a {@link yfiles.algorithms.IDataProvider} with key - * {@link yfiles.organic.ClassicOrganicLayout#FIXED_GROUP_NODES_DP_KEY}, the individual group nodes can be marked as fixed or not - * fixed. If there is no data provider registered with the mentioned key, then all group nodes of the graph will be treated - * as fixed. - *

- * @see yfiles.organic.ClassicOrganicLayout#groupNodePolicy - */ - FIXED, - /** - * Group handling policy for completely ignoring group nodes during the layout process. - * @see yfiles.organic.ClassicOrganicLayout#groupNodePolicy - */ - IGNORE - } - export enum Scope{ - /** - * Scope mode indicating that the algorithm should place all nodes of the graph. - * @see yfiles.organic.ClassicOrganicLayout#scope - */ - ALL, - /** - * Scope mode indicating that the algorithm should mainly place a subset of nodes. - *

- * The subset is determined by a boolean value returned by a {@link yfiles.algorithms.IDataProvider} registered with key - * {@link yfiles.organic.ClassicOrganicLayout#AFFECTED_NODES_DP_KEY}. Nodes that don't belong to the subset may be moved to a - * certain degree but will keep their relative positions to the other nodes outside the subset. - *

- * @see yfiles.organic.ClassicOrganicLayout#scope - * @see yfiles.organic.ClassicOrganicLayout#AFFECTED_NODES_DP_KEY - */ - MAINLY_SUBSET, - /** - * Scope mode indicating that the algorithm should only place a subset of nodes. - *

- * The subset is determined by a boolean value returned by a {@link yfiles.algorithms.IDataProvider} registered with key - * {@link yfiles.organic.ClassicOrganicLayout#AFFECTED_NODES_DP_KEY}. Nodes not being part of the subset will remain at their - * location. - *

- * @see yfiles.organic.ClassicOrganicLayout#scope - * @see yfiles.organic.ClassicOrganicLayout#AFFECTED_NODES_DP_KEY - */ - SUBSET - } - export enum HorizontalOverlapCriterion{ - /** - * Horizontal overlap criterion defining an overlap as horizontal if the overlapping area is greater in height than in - * width. - *

- * Otherwise, if the overlap area's width is greater than or equal to its height, an overlap will be categorized as - * vertical. - *

- *

- * The area of an overlap is defined as the rectangle where two nodes intersect with each other. - *

- * @see yfiles.organic.ShuffleLayout#horizontalOverlapCriterion - */ - INTERSECTION_BOX, - /** - * Horizontal overlap criterion categorizing an overlap as horizontal if the center-to-center difference between the - * overlapping nodes is greater in horizontal direction (x-coordinates) than in vertical direction (y-coordinates). - *

- * Otherwise, if the center-to-center difference between two overlapping nodes is greater in vertical direction - * (y-coordinates), the corresponding overlap is categorized as vertical. The same applies if the differences in vertical - * and horizontal direction are equal. - *

- * @see yfiles.organic.ShuffleLayout#horizontalOverlapCriterion - */ - NODE_CENTER, - /** - * Horizontal overlap criterion categorizing an overlap as horizontal if the required movement for solving the overlap is - * shorter in horizontal direction than in vertical direction. - *

- * Otherwise, an overlap will be categorized as vertical. - *

- *

- * This criterion tries to avoid moving nodes too much because the direction for resolving overlaps will be chosen such - * that the shorter movement is preferred. - *

- * @see yfiles.organic.ShuffleLayout#horizontalOverlapCriterion - */ - LESS_MOVEMENT - } - export enum ChainSubstructureStyle{ - /** - * Substructure style specifier for chains that indicates that the algorithm does not handle such structures in a special - * way. - * @see yfiles.organic.OrganicLayout#chainSubstructureStyle - */ - NONE, - /** - * Substructure style specifier for chains that leads to a compact (rotated) rectangular layout style for chains. - * @see yfiles.organic.OrganicLayout#chainSubstructureStyle - */ - RECTANGULAR, - /** - * Substructure style specifier for chains that leads to a straight-line layout style for chains. - * @see yfiles.organic.OrganicLayout#chainSubstructureStyle - */ - STRAIGHT_LINE - } - export enum StarSubstructureStyle{ - /** - * Substructure style specifier for stars that indicates that the algorithm does not handle such structures in a special - * way. - * @see yfiles.organic.OrganicLayout#starSubstructureStyle - */ - NONE, - /** - * Substructure style specifier for stars that leads to a radial layout style for stars where the root is placed in the - * middle. - * @see yfiles.organic.OrganicLayout#starSubstructureStyle - */ - RADIAL, - /** - * Substructure style specifier for stars that leads to a radial layout style for stars where the root is placed on the - * outside (separated from the nodes with degree one). - * @see yfiles.organic.OrganicLayout#starSubstructureStyle - */ - SEPARATED_RADIAL, - /** - * Substructure style specifier for stars that leads to a circular layout style for stars where the root is placed in the - * middle. In contrast to the radial layout style, all nodes (except the root) are placed on a single cycle. - * @see yfiles.organic.OrganicLayout#starSubstructureStyle - */ - CIRCULAR - } - export enum ParallelSubstructureStyle{ - /** - * Substructure style specifier for parallel structures that indicates that the algorithm does not handle such structures - * in a special way. - * @see yfiles.organic.OrganicLayout#parallelSubstructureStyle - */ - NONE, - /** - * Substructure style specifier for parallel structures that leads to a (rotated) rectangular layout style for the inner - * nodes. - * @see yfiles.organic.OrganicLayout#parallelSubstructureStyle - */ - RECTANGULAR, - /** - * Substructure style specifier for parallel structures that leads to a radial layout style for the inner nodes. - * @see yfiles.organic.OrganicLayout#parallelSubstructureStyle - */ - RADIAL, - /** - * Substructure style specifier for parallel structures that places the inner nodes on a straight-line. - * @see yfiles.organic.OrganicLayout#parallelSubstructureStyle - */ - STRAIGHT_LINE - } - export enum CycleSubstructureStyle{ - /** - * Substructure style specifier for cycle structures that indicates that the algorithm does not handle such structures in a - * special way. - * @see yfiles.organic.OrganicLayout#cycleSubstructureStyle - */ - NONE, - /** - * Substructure style specifier for cycle structures that leads to a circular layout style. - * @see yfiles.organic.OrganicLayout#cycleSubstructureStyle - */ - CIRCULAR - } - export enum GroupNodeMode{ - /** - * A mode constant for placing and resizing the group nodes and their content by the layout algorithm. The size of the - * group is adjusted to the space that is needed by the placement of its contained nodes. - * @see yfiles.organic.OrganicLayout#GROUP_NODE_MODE_DP_KEY - */ - NORMAL, - /** - * A mode constant for placing the group nodes and their content with respect to the original bounds of the group node. The - * bounds of the group nodes are treated as fixed and cannot be exceeded by the content of the group nodes. - * @see yfiles.organic.OrganicLayout#GROUP_NODE_MODE_DP_KEY - */ - FIX_BOUNDS, - /** - * A mode constant for placing group nodes with fixed content. Although these particular group nodes can move like all - * other ordinary group nodes, their content remains fixed relative to the position of the group node. - * @see yfiles.organic.OrganicLayout#GROUP_NODE_MODE_DP_KEY - */ - FIX_CONTENTS - } - /** - * This layout algorithm removes overlaps between nodes in a graph. - *

- * Note: The usage of {@link yfiles.organic.RemoveOverlapsStage} instead of this class is recommended for most use cases involving the - * mere removal of overlaps. That stage offers a more powerful strategy to do the task. - *

- *

- * Layout Style - *

- *

- * The style of results often resembles the look of tiles which have been dropped onto each other, where tiles correspond - * to nodes of the graph. The reason is that overlapping nodes are moved in order to resolve the overlap. During this - * process, several nodes moving in the same direction may be stacked next to or above each other. - *

- *

- * This algorithm does not route the edges of the input graph - edges might although be stretched due to the node - * movement. - *

- *

- * {@graph {"ann":{"s":[88,86],"d":0},"n":[[10,161.5,100,157],[-14,262.5],[-44,292.5],[-74,322.5],[-104,352.5],[-134,382.5],[46,262.5],[76,292.5],[106,322.5],[136,352.5],[166,382.5],[-100,198.5,320,46],[37.5,139,45,45],[195,181.5,30,73.5],[-105,181.5,30,73.5],[537.5,56,100,157],[513.5,219],[483.5,311],[453.5,403],[423.5,495],[393.5,587],[607.5,219],[603.5,311],[633.5,403],[663.5,495],[693.5,587],[458.5,4,320,46],[565,-55.5,45,45],[784.5,-13.25,30,73.5],[422.5,-13.25,30,73.5]],"e":[],"vp":[-134.0,-56.0,949.0,729.0]}} Example with overlaps (left) and after executing the shuffle layout (right) {@graph {"ann":{"s":[65.2,39.6],"d":0},"n":[[360.9,272.2],[360.9,345.2],[575.9,369.2],[378.9,401.2],[494.4,369.2],[528.4,257.7],[538.4,313.2],[657.4,369.2],[619.9,313.2],[-2.6,293],[-2.6,365.8],[173.4,369.2],[15.4,391],[130.6,383],[165.2,278.6],[174.8,296.2],[203.8,383],[191.4,309.2]],"e":[[6,0],[6,3],[1,6],[1,0],[6,5],[8,2],[15,9],[15,12],[10,15],[10,9],[15,14],[17,11]],"vp":[-3.0,257.0,726.0,184.0]}} Example with overlaps (left) and after - * executing the shuffle layout (right) Concept Nodes overlapping with other nodes will be moved in horizontal or vertical - * direction in order to remove overlaps. The concept behind this removal step is based on a famous Russian arcade game. Features - *

- *

- * This layout stage can also be {@link yfiles.organic.ShuffleLayout#applyLayout executed} on its own, without specifying a {@link yfiles.organic.ShuffleLayout#coreLayout core layout algorithm}. - *

- *

- * A minimum distance between nodes can be specified such that not only overlaps will be removed but nodes will keep this - * specified distance to other nodes. This distance can be defined separately for each node using a {@link yfiles.algorithms.IDataProvider} - * registered with key {@link yfiles.organic.ShuffleLayout#MINIMUM_DISTANCE_DP_KEY}. The minimum distance can also be specified - * globally via {@link yfiles.organic.ShuffleLayout#minimumNodeDistance}. - *

- *

- * To specify that specific nodes should not be moved, they can be marked as fixed using a {@link yfiles.algorithms.IDataProvider} - * registered with key {@link yfiles.organic.ShuffleLayout#FIXED_NODE_DP_KEY}. - *

- * @class - * @implements {yfiles.layout.ILayoutStage} - */ - export interface ShuffleLayout extends yfiles.lang.Object,yfiles.layout.ILayoutStage{} - export class ShuffleLayout { - /** - * Creates a new instance of {@link yfiles.organic.ShuffleLayout} with default settings. - */ - constructor(); - /** - * Performs the overlap removal (shuffle) algorithm on the given graph, after the {@link yfiles.organic.ShuffleLayout#coreLayout core layout algorithm} was applied to it. - * @param graph the input graph - */ - applyLayout(graph:yfiles.layout.LayoutGraph):void; - /** - * Data provider key for specifying a minimum distance for each node - *

- * The default minimum distance specified by {@link yfiles.organic.ShuffleLayout#minimumNodeDistance} will be ignored for a node if the {@link yfiles.algorithms.IDataProvider} registered - * with this key contains a valid minimum distance for that node. - *

- *

- * Minimum distance values need to be greater than 0. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static MINIMUM_DISTANCE_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for marking nodes as fixed - *

- * A node marked as fixed will not be moved by this algorithm but stay at its current position. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static FIXED_NODE_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * - * @type {yfiles.layout.ILayoutAlgorithm} - */ - coreLayout:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets the criterion for marking an overlap as horizontal. - *

- * This criterion influences how overlaps will be resolved. If an overlap is considered horizontal, it will preferably be solved by - * moving nodes horizontally, else vertically. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given criterion is unknown - * @type {yfiles.organic.HorizontalOverlapCriterion} - */ - horizontalOverlapCriterion:yfiles.organic.HorizontalOverlapCriterion; - /** - * Gets or sets the default minimum distance that has to be obeyed between any two nodes. - *

- * This default distance will be considered for a node if the {@link yfiles.algorithms.IDataProvider} registered with the graph - * with key {@link yfiles.organic.ShuffleLayout#MINIMUM_DISTANCE_DP_KEY} does not contain a valid, positive distance for that node. - * If there is no {@link yfiles.algorithms.IDataProvider} registered with the mentioned key, then this default distance will be - * applied to all nodes. - *

- *

- * The minimum distance needs to be a non-negative value. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given distance is negative - * @see yfiles.organic.ShuffleLayout#MINIMUM_DISTANCE_DP_KEY - * @type {number} - */ - minimumNodeDistance:number; - /** - * Gets or sets whether or not the simple, fast layout mode of this algorithm is active. - *

- * Enabling this mode, the overlap removal step will be executed using a simpler and less sophisticated approach. All - * overlaps will only be solved by moving nodes vertically. The algorithm will not try to figure out which direction might - * be better for overlap removal. - *

- *

- * The runtime will improve, but results may be of lower quality when using this mode. - *

- * @type {boolean} - */ - simpleMode:boolean; - /** - * Gets or sets whether or not the barycenter mode is used for node shuffling when removing overlaps. - *

- * If this mode is active, the overlap removal step will be executed two times for each direction, once with the normal - * node ordering and once with the reversed ordering. Finally, the barycenter between both results will be used for - * assigning the node coordinates. - *

- *

- * Activating the barycenter mode allows more symmetric results for some graphs. However, the runtime might increase. - *

- * @type {boolean} - */ - barycenterMode:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.organic.ShuffleLayout; - } - /** - * A layout algorithm that arranges graphs in an organic fashion, using a force-directed drawing approach. - *

- * Layout Style - *

- *

- * The organic layout style is characterized by a natural distribution of nodes. It is well suited to exhibit clusters and - * symmetric properties of a graph. Nodes are placed in a space-saving manner, close to their adjacent nodes. Distances - * between neighbors and edge lengths are highly uniform and edges are drawn as straight-line segments without bends. - *

- *

- * Organic diagrams are well suited for visualizing relations in large networks, for example, in bioinformatics, enterprise - * networking, social networks visualization, mesh visualization or system management. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":0,"c":1},"n":[[595.38,758.73,90,90],[1117.49,809.3],[536.78,520.64],[1003.62,223.83,60,60],[144.24,1098.18,60,60],[821.57,320.27,60,60],[1021.74,95.55],[546.05,952.52],[339.03,1117.6],[619.72,286.05,60,60],[459.77,255.26],[819.8,180.32],[352.63,758.67],[602.52,1268.98],[418.51,994.58],[1203,194.02],[474.19,1194.71],[1369.52,207.86],[1229.77,66.55],[1130.53,480.76],[1026.12,377.23],[416.54,865.26],[1405.72,431.59],[742.7,1277.43],[576.4,127.48],[818.41,57.66],[609.01,0],[107.77,1267.45],[468.43,35.76],[168.05,858.48],[1479.05,113.81],[347.41,29.93],[363.19,151.7],[1317.66,551.96],[648.62,1164.37],[1213.89,683.56],[1463.15,308.66],[343.86,303.87],[1583.67,28.36],[221.25,1242],[551.17,1091.78],[652.84,482.26,90,90],[257.56,950.62],[1317.11,333.14],[1249.57,431.4],[1180.69,326.71],[1213.95,579.36],[987.92,896.99],[798.79,926.46,60,60],[766.38,1113.01,60,60],[1027.6,1013.7],[921.45,1059.25],[900.59,1191.83],[863.5,1315.51],[0,1086.46],[73.01,996.02],[17.49,1193.73],[1112.66,599.54],[1026.84,506.48]],"e":[[5,3,-2.34,-4.42,-2.34,-4.42],[5,3,-0,5.66,0,5.66],[6,3],[0,7],[8,4],[5,9,-0.84,4.93,-0.84,4.93],[5,9,0,-5.07,0,-5.07],[9,10],[5,11],[7,14],[14,8],[3,15],[8,16],[13,16],[15,17],[15,18],[5,20],[3,20],[20,19],[14,21],[0,21,1.55,4.23,1.55,4.23],[0,21,0,-4.79,0,-4.79],[21,12],[23,13],[9,24],[11,25],[24,26],[4,27],[24,28],[17,30],[28,31],[10,32],[32,31],[22,33],[34,13],[33,35],[35,1],[17,36],[36,22],[10,37],[30,38],[4,39],[7,40],[34,40],[40,16],[0,41,-4.9,-1.02,-4.9,-1.02],[0,41,15.32,0,15.32,0],[0,41,5.11,0,5.11,0],[0,41,-15.32,0,-15.32,0],[41,2],[41,9,-4.88,1.11,-4.88,1.11],[41,5],[41,9,5.13,0,5.13,0],[41,5,0,15.25,13.25,0],[41,5,0,-15.25,-13.25,0],[4,42],[21,42],[42,29],[17,43],[22,43],[33,44],[43,44],[44,19],[15,45],[43,45],[45,44],[45,20],[33,46],[46,19],[46,35],[47,1],[0,48],[0,48,0,-12.87,0,-12.87],[48,47],[48,0,0,12.87,0,12.87],[49,34],[49,23],[49,48,-4.93,-0.86,-4.93,-0.86],[49,48,5.07,0,5.07,0],[50,47],[50,51],[51,48],[51,52],[52,49],[52,53],[53,23],[54,4],[55,4],[4,56],[19,57],[57,46],[57,35],[20,58],[58,19],[58,57]],"vp":[0.0,0.0,1614.0,1346.0]}} Organic layout obtained using default settings {@graph {"ann":{"s":[30,30],"d":0,"c":1},"n":[[791.09,783.74],[562.01,0],[0,578.93],[654.52,397.12],[398.71,661.82],[289.49,301.35],[607.55,181.65],[486.39,286.91],[431.7,133.95],[585.61,83.22],[526.07,132.08],[499.31,59.31],[643.49,286.85],[577.45,334.93],[570.46,256.07],[384.63,282.87],[349.44,208.68],[428.89,217.67],[735.86,604.59],[609.97,735.23],[576.81,577.73],[708.83,495.34],[664.78,560.98],[627.87,490.62],[768.83,700.17],[706.56,764.55],[692.13,688.28],[499.4,712.48],[490.84,632.17],[563.39,666.04],[178.72,621.75],[126.84,449.31],[282.43,497.82],[287.3,654.44],[253.43,582.88],[333.1,587.05],[74.97,603.05],[57.42,516.13],[124.98,543.53],[198.43,365.41],[274.03,396.79],[209.79,443.73]],"e":[[1,9],[9,6],[6,10],[10,9],[10,8],[9,11],[8,11],[11,1],[11,10],[6,12],[12,3],[3,13],[13,12],[13,7],[12,14],[7,14],[14,6],[14,13],[7,15],[15,5],[5,16],[16,15],[16,8],[15,17],[8,17],[17,7],[17,16],[3,21],[21,18],[18,22],[22,21],[22,20],[21,23],[20,23],[23,3],[23,22],[18,24],[24,0],[0,25],[25,24],[25,19],[24,26],[19,26],[26,18],[26,25],[19,27],[27,4],[4,28],[28,27],[28,20],[27,29],[20,29],[29,19],[29,28],[4,33],[33,30],[30,34],[34,33],[34,32],[33,35],[32,35],[35,4],[35,34],[30,36],[36,2],[2,37],[37,36],[37,31],[36,38],[31,38],[38,30],[38,37],[31,39],[39,5],[5,40],[40,39],[40,32],[39,41],[32,41],[41,31],[41,40]],"vp":[0.0,0.0,822.0,814.0]}} Organic layout exposing symmetries of the graph structureConcept - *

- *

- * This algorithm uses a force-directed approach to place the nodes of the input graph. The graph is modeled as a physical - * system with forces acting on it. Nodes are considered as electrically charged particles with mutually repulsive forces. - * Edges are modeled as springs that attract adjacent nodes. A good diagram is obtained from an equilibrium state of the - * system, i.e., the nodes are rearranged based on the physical forces until the system reaches a (local) minimum of the - * sum of the forces. - *

- *

- * Features - *

- *

- * The {@link yfiles.organic.ClassicOrganicLayout#activateTreeBeautifier tree beautifier} feature activates a special layout style for subgraphs with a tree structure. These subgraphs will - * be arranged using an algorithm dedicated to tree graphs and incorporated into the main organic diagram. - *

- *

- * Several parameters for the internal force-directed drawing algorithm can be modified. For example, the {@link yfiles.organic.ClassicOrganicLayout#repulsion repulsion}, {@link yfiles.organic.ClassicOrganicLayout#attraction attraction} - * and {@link yfiles.organic.ClassicOrganicLayout#initialTemperature initial temperature} can be controlled. This allows experts to configure and fine-tune the algorithm with respect to - * their needs. - *

- * @class - * @extends {yfiles.layout.MultiStageLayout} - */ - export interface ClassicOrganicLayout extends yfiles.layout.MultiStageLayout{} - export class ClassicOrganicLayout { - /** - * Creates a new {@link yfiles.organic.ClassicOrganicLayout} with default settings. - */ - constructor(); - /** - * Frees internal resources which were in use during a previous algorithm run. - */ - dispose():void; - /** - * Data provider key for marking the nodes that are part of the current scope - * @see yfiles.organic.ClassicOrganicLayout#scope - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static AFFECTED_NODES_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for marking group nodes as fixed - *

- * The content of a fixed group node will not be changed by this algorithm but be treated as fixed. - *

- *

- * The groups marked as fixed will be considered for the {@link yfiles.organic.ClassicOrganicLayout#groupNodePolicy group node policy} settings {@link yfiles.organic.GroupsPolicy#FIXED} and - * {@link yfiles.organic.GroupsPolicy#LAYOUT}. When {@link yfiles.organic.GroupsPolicy#IGNORE} is chosen, the data provider registered with - * this key will be ignored. - *

- * @see yfiles.organic.ClassicOrganicLayout#groupNodePolicy - * @see yfiles.organic.GroupsPolicy#FIXED - * @see yfiles.organic.GroupsPolicy#LAYOUT - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static FIXED_GROUP_NODES_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for defining an individual preferred length for each edge - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static PREFERRED_EDGE_LENGTH_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Gets or sets the node repulsion value. - *

- * The repulsion influences the forces between nodes. A higher repulsion value can lead to more compact drawings, whereas a - * lower repulsion value potentially enlarges drawings. - *

- *

- * The repulsion is defined to range from 0 to 2. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the repulsion value is negative or greater than 2 - * @type {number} - */ - repulsion:number; - /** - * Gets or sets the edge attraction value. - *

- * The attraction influences the attractive force associated with edges. A higher attraction value can lead to more compact - * drawings, whereas a lower value potentially enlarges drawings. - *

- *

- * The attraction is defined to range from 0 to 2. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the attraction value is negative or greater than 2 - * @type {number} - */ - attraction:number; - /** - * Gets or sets the {@link yfiles.layout.IGroupBoundsCalculator} instance used for calculating the size of group nodes. - * @type {yfiles.layout.IGroupBoundsCalculator} - */ - groupBoundsCalculator:yfiles.layout.IGroupBoundsCalculator; - /** - * Gets or sets the compactness of group nodes. - *

- * The compactness ranges from 0 to 1 where 0 results in group nodes not affecting the overall layout too much while 1 - * forces nodes in the same group to be clustered tightly. - *

- *

- * The compactness values needs to lie within [0,1]. - *

- * @throws {Stubs.Exceptions.ArgumentError} if compactness value does not lie within the interval [0,1] - * @type {number} - */ - groupNodeCompactness:number; - /** - * Gets or sets the policy for the handling of group nodes. - *

- * The group policy defines whether this algorithm {@link yfiles.organic.GroupsPolicy#IGNORE ignores} groups, leaves them {@link yfiles.organic.GroupsPolicy#FIXED fixed} or actively {@link yfiles.organic.GroupsPolicy#LAYOUT arranges} them. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given policy is unknown - * @type {yfiles.organic.GroupsPolicy} - */ - groupNodePolicy:yfiles.organic.GroupsPolicy; - /** - * Gets or sets the initial temperature for the force-directed layout process. - *

- * The algorithm starts with an initial temperature. During the iterations of the layout process, this temperature - * decreases and if it reaches a certain limit, the process terminates. This limit can be controlled using {@link yfiles.organic.ClassicOrganicLayout#finalTemperature}. - *

- *

- * The initial temperature will be multiplied by the {@link yfiles.organic.ClassicOrganicLayout#preferredEdgeLength preferred edge length} and then assigned as the actual initial heat of - * nodes. - *

- * @see yfiles.organic.ClassicOrganicLayout#finalTemperature - * @type {number} - */ - initialTemperature:number; - /** - * Gets or sets the absolute, final temperature value, which will cause the algorithm to stop if the average temperature - * falls under this value. - *

- * The algorithm starts with an initial temperature. During the iterations of the layout process, this temperature - * decreases. - *

- * @see yfiles.organic.ClassicOrganicLayout#initialTemperature - * @type {number} - */ - finalTemperature:number; - /** - * Gets or sets whether or not the deterministic mode of the layout algorithm is enabled. - *

- * In deterministic mode, the layout algorithm will yield the same results if the exact same input and same settings are - * given as input. - *

- * @type {boolean} - */ - deterministic:boolean; - /** - * Gets or sets whether or not to arrange subtrees of the input graph in a special, optimized tree style. - *

- * Subtrees will be arranged in a {@link yfiles.tree.BalloonLayout balloon-like fashion}. - *

- *

- * If this feature is disabled, subgraphs with a tree structure are arranged using the same style as for the rest of the - * graph. - *

- *

- * In case that the input graph is a {@link yfiles.algorithms.Trees#isRootedTree tree} and this feature is enabled, the whole graph will be drawn in a tree-like style. - *

- * @type {boolean} - */ - activateTreeBeautifier:boolean; - /** - * Gets or sets the gravity factor whose magnitude determines the strength of the force towards the barycenter of the - * graph. - *
    - *
  • A high gravity factor value leads to layouts with nodes clustered around the barycenter of the graph.
  • - *
  • A low gravity factor value stretches the outskirts of the graph far away from the barycenter.
  • - *
- * @type {number} - */ - gravityFactor:number; - /** - * Gets or sets the scope that determines which nodes are placed by this algorithm. - * @throws {Stubs.Exceptions.ArgumentError} if the given scope is unknown - * @see yfiles.organic.ClassicOrganicLayout#AFFECTED_NODES_DP_KEY - * @type {yfiles.organic.Scope} - */ - scope:yfiles.organic.Scope; - /** - * Gets or sets the strategy for the initial placement of nodes. - *

- * The initial placement has an influence on the final result, because this force-directed algorithm starts with some - * positions and then uses forces between nodes to finally aim for a stable result drawing. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given initial placement mode is unknown - * @type {yfiles.organic.InitialPlacement} - */ - initialPlacement:yfiles.organic.InitialPlacement; - /** - * Gets or sets the maximum duration in milliseconds that this layout algorithm is allowed to run. - *

- * The duration needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified duration has a negative value - * @type {number} - */ - maximumDuration:number; - /** - * Gets or sets the iteration factor which influences the maximum number of optimization iterations the algorithm may - * perform. - * @type {number} - */ - iterationFactor:number; - /** - * Gets or sets the default preferred edge length. - *

- * The default preferred edge length will be used for edges that don't have an individual length preference defined via a {@link yfiles.algorithms.IDataProvider} - * registered with key {@link yfiles.organic.ClassicOrganicLayout#PREFERRED_EDGE_LENGTH_DP_KEY}. - *

- *

- * The preferred edge length needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified edge length is negative - * @type {number} - */ - preferredEdgeLength:number; - /** - * Gets or sets whether or not to consider node sizes during layout calculation. - *

- * If this feature is disabled, overlaps between nodes (e.g. due to large node sizes) may occur. - *

- * @type {boolean} - */ - considerNodeSizes:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} that modifies the orientation of the layout is activated. - * @see yfiles.layout.MultiStageLayout#orientationLayoutEnabled - * @see yfiles.layout.MultiStageLayout#orientationLayout - * @see yfiles.layout.MultiStageLayout#layoutOrientation - * @see yfiles.layout.OrientationLayout - * @type {boolean} - */ - orientationLayoutEnabled:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.organic.ClassicOrganicLayout; - } - /** - * A {@link yfiles.organic.InteractiveOrganicLayoutExecutionContext} provides control over the layout calculation in the case of - * single-threaded algorithm execution. - * @see yfiles.organic.InteractiveOrganicLayout#startLayout - * @interface - */ - export interface InteractiveOrganicLayoutExecutionContext extends yfiles.lang.Object{ - /** - * Starts the layout calculation, continuing where it has stopped before and allowing a certain maximum duration in - * milliseconds. - * @param duration the duration in milliseconds the layout calculation is allowed to run - * @abstract - */ - continueLayout(duration:number):void; - /** - * Stops the layout calculation. - * @abstract - */ - stopLayout():void; - } - var InteractiveOrganicLayoutExecutionContext:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.organic.InteractiveOrganicLayoutExecutionContext; - }; - /** - * This algorithm arranges graphs in an organic fashion and offers special functionality to interact with the graph while - * the algorithm is running. - *

- * Besides the organic graph arrangement, this algorithm enables to immediately visualize changes made to a graph. Changes - * can be committed and the layout will be locally updated. That way, live interactions with an adapting graph layout are - * possible. Another advantage is that it is not necessary to compute a completely new layout if only small changes were - * made. - *

- *

- * Layout Style - *

- *

- * This algorithm supports the organic layout style which is characterized by a natural distribution of nodes. It is well - * suited to exhibit clusters and symmetric properties of a graph. Nodes are placed in a space-saving manner and distances - * between neighbors are highly uniform. Edges maintain uniform lengths too and are routed with straight-line segments - * without bends. - *

- *

- * Organic diagrams are well suited for visualizing relations in large networks, for example, in bioinformatics, enterprise - * networking, social networks visualization, mesh visualization or system management. - *

- *

- * {@graph {"ann":{"s":[48,48],"d":0,"c":1},"n":[[-2901.1,82.94],[-2776.3,150.06],[-3044.96,-84.47],[-3100.49,54.95],[-3341.59,-232.28],[-3150.07,-159.49],[-2593.59,-25.02],[-2797.37,369.15],[-2792.54,582.9],[-2408.44,-110.43],[-3646.34,-1285.02],[-2406.36,-423.92],[-2508.48,535.38],[-3061.33,-181.39],[-3576.11,-153.25],[-3291.19,-446.62],[-3232.03,168.75],[-2991.88,23.83],[-2875.69,-19.77],[-3311.02,255.49],[-3211.58,273.66],[-3238.43,-589.82],[-3371.25,-336.26],[-3780.22,-96.13],[-2438.22,451.91],[-2348.8,552.52],[-2524.48,-582.24],[-2397.54,-234.83],[-3717.44,-1204.02],[-3539.82,-1255.44],[-2280.66,-209.75],[-2305.78,-69.98],[-2710.41,513.62],[-2747.74,704.16],[-2823.23,749.08],[-2354.53,12.96],[-2918.36,-219.22],[-2746.37,809.37],[-2657.24,754.28],[-3054.29,380.79],[-2235.49,-319.69],[-3521.75,-1120.87],[-3498.17,-1358.62],[-3729.27,-1087.89],[-2661.13,-725.91],[-2220.36,485.66],[-2577.32,481.65],[-2278.76,391.75],[-3911.01,-117.89],[-3889.39,-12.86],[-3449.65,-560.78],[-3236.89,-238.15],[-3271.16,-341.32],[-3062.01,-674.62],[-3372.21,-829.48],[-3343.54,161.81],[-3403.91,-648.81],[-2650.26,75.72],[-2655.19,191.31],[-2482.07,33.2],[-2545.18,138.92],[-3389.07,735.04],[-3233.93,-696.37],[-3571.23,-672.16],[-3451.64,-420.88],[-3550.73,-949.47],[-3331.67,-944.96],[-3058.81,-774.77],[-2903.06,-735.09],[-3508.46,-749.04],[-3962.39,59.51],[-4014.76,-33.26],[-4162.59,-51.88],[-2213.5,331.67],[-2143.12,434.04],[-2082.3,582.85],[-2563.73,-859.16],[-3872.43,-1134.67],[-2276.55,-427.33],[-3065.02,511.6],[-3216.65,13.18],[-3228.93,507],[-2666.53,647.27],[-2828.44,878.41],[-2888.55,-350.13],[-2803.46,-224.75],[-2274.13,227.36],[-2702.86,-255.45],[-2938.6,-442.63],[-2801.51,-416.97],[-2850.68,986.11],[-3315.58,637.75],[-3335,498.26],[-3322.98,-0.08],[-2999.45,592.68],[-3121.13,611.43],[-2191.35,-498.52],[-3933.14,-1230.72],[-3975.46,-1097.6],[-2618.48,-953.77],[-2458.11,-831.59],[-2490.11,-956.72],[-2049.18,482.82],[-1967.47,616.36],[-2076.61,696.43],[-4236.41,-130.92],[-4253.91,12.07],[-4056.39,65.42],[-2834.31,-815.64],[-2994.48,-872.19],[-3118.99,-869],[-3291.19,-1046.13],[-3606.59,-1027.04],[-3652.5,-907.63],[-3531.64,-338.57],[-3562.98,-455.05],[-3659.45,-608.85],[-3667.52,-730.4],[-3453.32,820.54],[-2454.91,197.69],[-2634.6,286.15]],"e":[[0,1],[0,2],[2,3],[2,4],[2,5],[1,6],[1,7],[7,8],[6,9],[5,13],[13,2],[4,14],[4,15],[3,16],[3,17],[17,18],[18,2],[16,19],[16,20],[20,19],[15,21],[22,4],[14,23],[12,24],[12,25],[11,26],[11,27],[10,28],[10,29],[9,30],[9,31],[8,32],[32,12],[8,33],[8,34],[34,33],[31,35],[27,35],[36,2],[34,37],[37,33],[33,38],[38,37],[32,39],[30,40],[29,41],[29,42],[28,43],[26,44],[25,45],[24,46],[46,12],[46,32],[24,47],[47,45],[23,48],[23,49],[22,50],[22,51],[51,5],[21,52],[21,53],[21,54],[19,55],[55,16],[50,56],[18,57],[57,58],[57,59],[59,35],[57,60],[56,62],[62,21],[56,63],[52,64],[50,64],[54,65],[43,65],[41,65],[54,66],[53,67],[62,67],[53,68],[44,68],[68,67],[50,69],[69,63],[69,65],[49,70],[49,71],[48,71],[70,71],[72,71],[47,73],[73,45],[47,74],[45,74],[45,75],[44,76],[43,77],[40,78],[78,11],[39,79],[39,80],[80,52],[39,81],[38,82],[82,33],[82,32],[37,83],[83,34],[36,84],[36,85],[35,86],[86,47],[86,73],[85,87],[84,88],[84,89],[83,90],[81,91],[61,91],[81,92],[80,93],[79,94],[79,95],[78,96],[77,97],[77,98],[76,99],[76,100],[76,101],[75,102],[74,102],[75,103],[75,104],[72,105],[72,106],[71,107],[70,107],[68,108],[67,109],[67,110],[66,111],[65,112],[65,113],[64,114],[64,115],[63,116],[63,117],[61,118],[60,119],[58,120]],"vp":[-4254.0,-1359.0,2335.0,2394.0]}} Organic layout obtained using this algorithmConcept - *

- *

- * The internal basis for computing actual layouts is a force-directed approach placing the nodes of the input graph. The - * graph is modeled as a physical system with appropriate forces acting on it. Nodes are considered as electrically charged - * particles with mutually repulsive forces. Edges are modeled as forces that attract adjacent nodes. A good diagram is - * obtained from an equilibrium state of the system, i.e., the nodes are rearranged based on the physical forces until the - * system reaches a (local) minimum of the sum of the forces. - *

- *

- * Features - *

- *

- * Several update methods allow to indicate lightweight changes on the graph, for example, {@link yfiles.organic.InteractiveOrganicLayout#setCenter} - * for node location updates. These updates will be scheduled and executed at a specific point within the life-cycle of the - * layout algorithm. They are ideally suited for usage in interactive scenarios, where users, for example, change node - * positions via mouse-dragging. - *

- *

- * Method {@link yfiles.organic.InteractiveOrganicLayout#addStructureUpdate} allows to schedule a custom event handler instance - * that is executed in a synchronized context and can safely update the structure of the graph. - *

- *

- * Usage Hints - *

- *

- * It is easiest to start the algorithm using {@link yfiles.organic.InteractiveOrganicLayout#startLayout}. Furthermore, it is - * strongly recommended to start it by passing a copy of the original graph (i.e. a {@link yfiles.layout.CopiedLayoutGraph} - * instance) as parameter to the mentioned method. - *

- *

- * Importantly, changes will not be automatically applied to the input graph. Updates can be scheduled via various methods (e.g. - * {@link yfiles.organic.InteractiveOrganicLayout#setCenter}). The whole layout will then internally be adjusted accordingly and - * changes are stored as intermediate results. Such intermediate results can be {@link yfiles.organic.InteractiveOrganicLayout#commitPositions committed} in order to apply them to the - * actual graph. - *

- * @class - * @implements {yfiles.layout.ILayoutAlgorithm} - */ - export interface InteractiveOrganicLayout extends yfiles.lang.Object,yfiles.layout.ILayoutAlgorithm{} - export class InteractiveOrganicLayout { - /** - * Creates a new instance of the {@link yfiles.organic.InteractiveOrganicLayout} with default settings. - */ - constructor(); - /** - * Schedules an update for the structure of the graph, which will automatically be executed at a later point in the - * life-cycle of this algorithm. - *

- * The given event handler will be queued and executed at a specific time. The event handler can make structural changes - * (e.g. removal/creation of edges or nodes). They will be synchronized with the rest of the layout algorithm. - *

- * @param handler The handler delegate that will be invoked using null as the sender and evt as the event arguments - * @param evt The event argument that will be piped to the handler invocation. - */ - addStructureUpdate(handler:(sender:any,evt:yfiles.lang.EventArgs)=>void,evt:yfiles.lang.EventArgs):void; - /** - * Calculates an organic layout for the given input graph, however, the layout is not automatically applied to the graph. - *

- * Changes have to be {@link yfiles.organic.InteractiveOrganicLayout#commitPositions committed} to update the graph with the actual calculated positions. - *

- * @param graph the input graph - * @see yfiles.organic.InteractiveOrganicLayout#startLayout - */ - applyLayout(graph:yfiles.layout.LayoutGraph):void; - /** - * Writes calculated intermediate locations of nodes and edges to the actual graph. - *

- * Update methods like {@link yfiles.organic.InteractiveOrganicLayout#setCenter} schedule changes which cause that the whole layout - * will internally be adjusted. All adjustments are stored as intermediate results. This method immediately transfers all - * these intermediate results to the actual input graph. - *

- * @see yfiles.organic.InteractiveOrganicLayout#commitPositionsSmoothly - */ - commitPositions():void; - /** - * Writes calculated intermediate locations of nodes and edges to the actual graph and returns the largest movement value. - *

- * Update methods like {@link yfiles.organic.InteractiveOrganicLayout#setCenter} schedule changes which cause that the whole layout - * will internally be adjusted. All adjustments are stored as intermediate results. This method smoothly transfers all - * these intermediate results to the actual input graph. - *

- *

- * Positions are, however, not transferred directly (use {@link yfiles.organic.InteractiveOrganicLayout#commitPositions} if that is intended). Instead, the - * nodes are moved towards the calculated position. The movement is restricted to the given maximum distance. - *

- *

- * The movement will be calculated as (movement) = (factor) * (distance between calculated and actual location) - *

- *

- * The returned largest movement can be used for estimating the difference between calculated layout and actual positions. - * If the return value is 0, the calculated layout was completely transferred. - *

- * @param maxMovement the maximum distance a node will be moved - * @param factor a factor that determines the node movement - * @returns the largest movement value or 0, if the calculated layout has been transferred completely - * @see yfiles.organic.InteractiveOrganicLayout#commitPositions - */ - commitPositionsSmoothly(maxMovement:number,factor:number):number; - /** - * Disables all predefined {@link yfiles.layout.ILayoutStage}s so that upon {@link yfiles.organic.InteractiveOrganicLayout#applyLayout} - * only the internal organic layout algorithm will be executed. - *

- * This method is called upon construction of this class so that by default additional - * {@link yfiles.layout.ILayoutStage}s are deactivated. This method may be overridden if the additional stages should stay active - * (e.g. override the method and return silently). - *

- * @see yfiles.layout.MultiStageLayout#disableAllStages - */ - disableAllStages():void; - /** - * Polls the current coordinates of the center of the given node. - *

- * The returned coordinates do not necessarily correspond to the actual location of the node in the input graph. They may - * only be intermediate results stored in the algorithm. This will be the case if scheduled updates were not yet completely - * {@link yfiles.organic.InteractiveOrganicLayout#commitPositions committed} to the actual graph. - *

- * @param node the node for which the center should be polled - * @returns the {@link } representing the center location of the given node, or null if nothing about the node is - * known - * @see yfiles.organic.InteractiveOrganicLayout#setCenter - */ - getCenter(node:yfiles.algorithms.Node):yfiles.algorithms.YPoint; - /** - * Polls the current x-coordinate of the center location of the given node. - *

- * The returned coordinate is not necessarily the actual x-coordinate of the node in the input graph but only an - * intermediate result stored in the algorithm. This will be the case if scheduled updates were not yet completely {@link yfiles.organic.InteractiveOrganicLayout#commitPositions committed} - * to the actual graph. - *

- * @param node the node for which the x-coordinate should be polled - * @returns the x-coordinate of the center location of the given node - * @see yfiles.organic.InteractiveOrganicLayout#setCenterX - */ - getCenterX(node:yfiles.algorithms.Node):number; - /** - * Polls the current y-coordinate of the center location of the given node. - *

- * The returned coordinate is not necessarily the actual y-coordinate of the node in the input graph but only an - * intermediate result stored in the algorithm. This will be the case if scheduled updates were not yet completely {@link yfiles.organic.InteractiveOrganicLayout#commitPositions committed} - * to the actual graph. - *

- * @param node the node for which the y-coordinate should be polled - * @returns the y-coordinate of the center location of the given node - * @see yfiles.organic.InteractiveOrganicLayout#setCenterY - */ - getCenterY(node:yfiles.algorithms.Node):number; - /** - * Polls the current stress value of a given node. - *

- * The stress value indicates how far a node will possibly move. The higher the stress of a node is, the farther it may - * move. - *

- *

- * The stress value is defined to be a value from the interval [0,1]. - *

- * @param node the node for which the stress value should be polled - * @returns the stress value of the given node - * @see yfiles.organic.InteractiveOrganicLayout#setStress - */ - getStress(node:yfiles.algorithms.Node):number; - /** - * Schedules an update for the center location of the given node. - *

- * This method can be used while layout calculation is in progress (e.g. for interactive layout scenarios). However, the - * change will not directly be applied to the graph itself but only stored internally as an intermediate result. Scheduled updates can be - * committed to the graph while the algorithm is running using methods {@link yfiles.organic.InteractiveOrganicLayout#commitPositions} - * or {@link yfiles.organic.InteractiveOrganicLayout#commitPositionsSmoothly}. - *

- * @param node the node that should be updated - * @param x the desired x-coordinate of the given node - * @param y the desired y-coordinate of the given node - */ - setCenter(node:yfiles.algorithms.Node,x:number,y:number):void; - /** - * Schedules an update for the center location's x-coordinate of the given node. - *

- * This method can be used while layout calculation is in progress (e.g. for interactive layout scenarios). However, the - * change will not directly be applied to the graph itself but only stored internally as an intermediate result. Scheduled updates can be - * committed to the graph while the algorithm is running using methods {@link yfiles.organic.InteractiveOrganicLayout#commitPositions} - * or {@link yfiles.organic.InteractiveOrganicLayout#commitPositionsSmoothly}. - *

- * @param node the node that should be updated - * @param x the desired x-coordinate of the given node - * @see yfiles.organic.InteractiveOrganicLayout#setCenterY - * @see yfiles.organic.InteractiveOrganicLayout#setCenter - */ - setCenterX(node:yfiles.algorithms.Node,x:number):void; - /** - * Schedules an update for the center location's y-coordinate of the given node. - *

- * This method can be used while layout calculation is in progress (e.g. for interactive layout scenarios). However, the - * change will not directly be applied to the graph itself but only stored internally as an intermediate result. Scheduled updates can be - * committed to the graph while the algorithm is running using methods {@link yfiles.organic.InteractiveOrganicLayout#commitPositions} - * or {@link yfiles.organic.InteractiveOrganicLayout#commitPositionsSmoothly}. - *

- * @param node the node that should be updated - * @param y the desired y-coordinate of the given node - * @see yfiles.organic.InteractiveOrganicLayout#setCenterX - * @see yfiles.organic.InteractiveOrganicLayout#setCenter - */ - setCenterY(node:yfiles.algorithms.Node,y:number):void; - /** - * Schedules an update for the inertia of the given node. - *

- * The inertia is defined to be a value from the interval [0,1]. - *

- *
    - *
  • 1.0: The node will not move.
  • - *
  • 0.5: The node will only move half as far as it would with an inertia of 0.0.
  • - *
  • 0.0: The node will move as fast as possible.
  • - *
- *

- * This method can be used while layout calculation is in progress (e.g. for interactive layout scenarios). However, the - * change will not directly be applied to the graph itself but only stored internally as an intermediate result. Scheduled updates can be - * committed to the graph while the algorithm is running using methods {@link yfiles.organic.InteractiveOrganicLayout#commitPositions} - * or {@link yfiles.organic.InteractiveOrganicLayout#commitPositionsSmoothly}. - *

- * @param node the node whose inertia to set - * @param inertia an inertia value between 0 and 1 - * @throws {Stubs.Exceptions.ArgumentError} if the given inertia value is negative or greater than 1 - */ - setInertia(node:yfiles.algorithms.Node,inertia:number):void; - /** - * Schedules an update for the preferred length of the given edge. - *

- * This method can be used while layout calculation is in progress (e.g. for interactive layout scenarios). However, the - * change will not directly be applied to the graph itself but only stored internally as an intermediate result. Scheduled updates can be - * committed to the graph while the algorithm is running using methods {@link yfiles.organic.InteractiveOrganicLayout#commitPositions} - * or {@link yfiles.organic.InteractiveOrganicLayout#commitPositionsSmoothly}. - *

- * @param edge the edge whose preferred length should be updated - * @param newEdgeLength the new preferred edge length - */ - setPreferredEdgeLength(edge:yfiles.algorithms.Edge,newEdgeLength:number):void; - /** - * Schedules an update for the radius of the given node. - *

- * This method can be used while layout calculation is in progress (e.g. for interactive layout scenarios). However, the - * change will not directly be applied to the graph itself but only stored internally as an intermediate result. Scheduled updates can be - * committed to the graph while the algorithm is running using methods {@link yfiles.organic.InteractiveOrganicLayout#commitPositions} - * or {@link yfiles.organic.InteractiveOrganicLayout#commitPositionsSmoothly}. - *

- * @param node the node whose radius should be updated - * @param radius the desired radius for the given node - */ - setRadius(node:yfiles.algorithms.Node,radius:number):void; - /** - * Schedules an update for the stress value of the given node. - *

- * The stress value indicates how far a node will possibly move. The higher the stress of a node is, the farther it may - * move. - *

- *

- * This method can be used while layout calculation is in progress (e.g. for interactive layout scenarios). However, the - * change will not directly be applied to the graph itself but only stored internally as an intermediate result. Scheduled updates can be - * committed to the graph while the algorithm is running using methods {@link yfiles.organic.InteractiveOrganicLayout#commitPositions} - * or {@link yfiles.organic.InteractiveOrganicLayout#commitPositionsSmoothly}. - *

- *

- * The stress value is defined to be a value from the interval [0,1]. - *

- * @param node the node whose stress value should be updated - * @param stress a stress value from the interval [0,1] - * @throws {Stubs.Exceptions.ArgumentError} if the given stress value is negative or greater than 1 - */ - setStress(node:yfiles.algorithms.Node,stress:number):void; - /** - * Creates a {@link yfiles.organic.InteractiveOrganicLayoutExecutionContext context object} that provides methods to continue and {@link yfiles.organic.InteractiveOrganicLayoutExecutionContext#stopLayout stop} the layout calculation for running this layout - * algorithm in a single-threaded environment. - *

- * Usage: Call doLayout(long) on the created instance to run the actual layout calculation for some specified period of time, - * whenever the layout should be recalculated. To actually transfer the changes, {@link yfiles.organic.InteractiveOrganicLayout#commitPositions} - * should be called subsequently. - *

- * @param graph the input graph - * @returns a {@link context instance} to control layout calculation - * @see yfiles.organic.InteractiveOrganicLayoutExecutionContext - * @see yfiles.organic.InteractiveOrganicLayout#applyLayout - */ - startLayout(graph:yfiles.layout.LayoutGraph):yfiles.organic.InteractiveOrganicLayoutExecutionContext; - /** - * Stops the layout algorithm. - *

- * In contrast to - * {@link yfiles.organic.InteractiveOrganicLayout#stopAndWait}, the algorithm terminates immediately and will not wait until the - * ongoing layout calculation is finished. - *

- * @see yfiles.organic.InteractiveOrganicLayout#stopped - * @see yfiles.organic.InteractiveOrganicLayout#stopAndWait - */ - stop():void; - /** - * Stops a previously {@link yfiles.organic.InteractiveOrganicLayout#startLayout started} algorithm and then blocks until the current layout calculation is completed. - * @see yfiles.organic.InteractiveOrganicLayout#stopped - * @see yfiles.organic.InteractiveOrganicLayout#stop - */ - stopAndWait():void; - /** - * Synchronizes the structure of the graph copy with the original graph. - * @throws {Stubs.Exceptions.InvalidOperationError} if the currently handled graph is not of type {@link yfiles.layout.CopiedLayoutGraph} - */ - syncStructure():void; - /** - * Wakes up the algorithm with the effect that it will restart/continue the layout calculation. - *

- * This method is useful if the layouter is {@link yfiles.organic.InteractiveOrganicLayout#sleeping sleeping} but should be notified of changes (e.g. due to user interaction). - *

- * @see yfiles.organic.InteractiveOrganicLayout#sleeping - */ - wakeUp():void; - /** - * Gets the time when the last wake-up, that is, call to {@link yfiles.organic.InteractiveOrganicLayout#wakeUp}, occurred. - *

- * The time is defined in terms of the difference between the current time and midnight, January 1, 1970 UTC, measured in - * milliseconds. - *

- * @type {number} - */ - lastWakeupTime:number; - /** - * Gets whether or not this layout algorithm has stopped. - *

- * If the algorithm has stopped, it terminated all its layout calculations. It is not {@link yfiles.organic.InteractiveOrganicLayout#running running} anymore and can not be - * restarted/continued by calling {@link yfiles.organic.InteractiveOrganicLayout#wakeUp}. - *

- * @type {boolean} - */ - stopped:boolean; - /** - * Gets whether or not this layout algorithm is currently sleeping. - *

- * Sleeping indicates that the algorithm has not {@link yfiles.organic.InteractiveOrganicLayout#stopped stopped} yet but is waiting (i.e. doing nothing). It can be notified to - * continue its work using {@link yfiles.organic.InteractiveOrganicLayout#wakeUp}. - *

- * @see yfiles.organic.InteractiveOrganicLayout#wakeUp - * @type {boolean} - */ - sleeping:boolean; - /** - * Gets whether or not this layout algorithm is currently running. - *

- * The algorithm is running if the layout process is still active, the algorithm has not {@link yfiles.organic.InteractiveOrganicLayout#stopped stopped} yet and is not {@link yfiles.organic.InteractiveOrganicLayout#sleeping sleeping}. - *

- * @type {boolean} - */ - running:boolean; - /** - * Gets or sets the working ratio which defines the amount of processor time this algorithm tries to get. - *

- * A working ratio value of 1 means that the algorithm will try to run as fast as possible. Lower values will lead to small - * breaks after each internal round. - *

- *

- * The ratio needs to be a value in (0,1]. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given ratio is not in (0,1]. - * @type {number} - */ - workingRatio:number; - /** - * Gets or sets the default preferred edge length. - *

- * This length does not define the actual absolute length of edges, but the layout algorithm considers the specified - * preference where possible. - *

- *

- * The preferred edge length needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified edge length is negative - * @see yfiles.organic.InteractiveOrganicLayout#setPreferredEdgeLength - * @type {number} - */ - preferredEdgeLength:number; - /** - * Gets or sets the preferred distance between nodes. - *

- * The minimum node distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified minimum node distance is negative - * @type {number} - */ - preferredNodeDistance:number; - /** - * Gets or sets the maximum duration in milliseconds that this algorithm is allowed to run. - *

- * The duration needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified maximum duration has a negative value - * @type {number} - */ - maximumDuration:number; - /** - * Gets or sets the ratio of layout quality versus running time. - *

- * The larger the ratio, the better the quality of the resulting layout but the longer it may take to perform the layout - * calculation. - *

- *

- * The value needs to lie within [0,1]. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified ratio is outside the interval [0,1] - * @type {number} - */ - qualityTimeRatio:number; - /** - * Gets or sets an {@link yfiles.organic.OutputRestriction} which restricts the area for the layout result of this algorithm. - * @see yfiles.organic.OutputRestriction - * @type {yfiles.organic.OutputRestriction} - */ - outputRestriction:yfiles.organic.OutputRestriction; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.organic.InteractiveOrganicLayout; - } - /** - * This layout algorithm arranges graphs in an organic fashion. - *

- * Layout Style The organic layout style is characterized by a natural distribution of nodes that exhibits clusters and symmetric - * properties of the graph. Nodes are placed space-saving, close to their adjacent nodes. Edges maintain uniform lengths - * and are routed with straight-line segments without bends. - *

- *

- * Organic diagrams are commonly used for visualizing relations in large networks for example in bioinformatics, enterprise - * networking, visualizing social networks, mesh visualization or system management. - *

- *

- * {@graph {"ann": {"s": [30,30], "d": 1},"n": [[623,552], [719,500], [460,606], [461,312], [650,830], [467,417], [399,245], [710,595], [712,756], [423,492], [336,473], [387,373], [545,645], [883,702], [688,675], [507,226], [796,722], [667,62], [572,158], [470,158], [594,354], [520,352], [615,651], [687,222], [731,111], [950,654], [361,553], [309,325], [365,631], [722,895], [282,570], [496,729], [554,76], [211,540], [308,103], [256,489], [703,312], [850,621], [720,405], [333,181], [658,141], [281,421], [159,261], [791,555], [541,0], [574,864], [777,646], [513,518], [590,745], [611,221], [630,289], [557,278], [663,366], [237,274], [809,470], [874,520], [923,583], [889,446], [958,478], [999,550], [1020,624], [722,835], [626,922], [678,895], [251,867], [406,695], [235,779], [63,939], [130,979], [238,810], [355,820], [166,734], [147,828], [317,756], [94,705], [194,852], [127,898], [195,927], [68,863], [761,971], [693,970], [518,920], [637,1005], [714,1036], [255,203], [330,260], [976,402], [1039,447], [1078,551], [1105,411], [893,782], [958,741], [826,393], [0,980], [734,1109]], "e": [[0,1], [5,3], [6,3], [0,7], [8,4], [5,9,3.45,2.02,3.45,2.02], [5,9,-4.64,0,-4.64,0], [9,10], [5,11], [7,14], [14,8], [3,15], [8,16], [13,16], [15,18], [15,19], [5,21], [3,21], [21,20], [14,22], [0,22], [22,12], [25,13], [9,26], [11,27], [26,28], [4,29], [26,30], [18,32], [30,33], [10,35], [35,33], [23,36], [37,13], [36,38], [38,1], [6,39], [39,34], [18,40], [40,17], [40,24], [40,23], [10,41], [37,43], [43,1], [43,7], [32,44], [4,45], [7,46], [37,46], [46,16], [0,47], [0,47,0,-7.33,0,-7.33], [0,47,0,7.33,0,7.33], [47,2], [47,9,-1.25,4.32,-1.25,4.32], [47,5,-4.1,1.87,-4.1,1.87], [47,9,0,-4.68,0,-4.68], [47,5,4.94,0,4.94,0], [4,48], [22,48], [48,31], [18,49], [23,49], [36,50], [49,50], [50,20], [15,51], [49,51], [51,50], [51,21], [36,52], [52,20], [42,53], [53,27], [54,1], [55,43], [55,54], [56,37], [56,55], [56,25], [57,54], [57,58], [58,55], [58,59], [59,56], [59,60], [60,25], [61,4], [62,4], [4,63], [63,61], [2,65], [31,65], [28,65], [64,66], [68,67], [66,71], [69,72], [66,73], [73,65], [73,70], [73,69], [71,74], [66,75], [69,75], [72,76], [75,76], [76,67], [64,77], [75,77], [77,76], [77,68], [72,78], [78,67], [29,79], [63,80], [45,81], [62,82], [79,83], [80,83], [83,82], [39,84], [84,53], [85,6], [85,27], [58,86], [58,87], [59,88], [87,89], [13,90], [13,91], [54,92], [67,93], [83,94]], "vp": [0.0,0.0,1135.0,1139.0]}} Organic Layout obtained with default settings {@graph {"ann": {"s": [30,30], "d": 1},"n": [[563.5,1043.5], [1196.5,36.5], [-0.5,15.5], [871.5,537.5], [598.5,41.5], [315.5,513.5], [717.5,813.5], [590.5,599.5], [439.5,797.5], [635.5,935.5], [576.5,835.5], [502.5,928.5], [597.5,992.5], [568.5,943.5], [532.5,989.5], [682.5,878.5], [649.5,826.5], [622.5,877.5], [507.5,821.5], [464.5,867.5], [525.5,873.5], [809.5,683.5], [737.5,582.5], [688.5,691.5], [773.5,756.5], [750.5,704.5], [714.5,751.5], [846.5,612.5], [807.5,565.5], [788.5,622.5], [663.5,586.5], [641.5,642.5], [699.5,631.5], [446.5,567.5], [364.5,660.5], [482.5,680.5], [520.5,577.5], [478.5,619.5], [535.5,637.5], [378.5,544.5], [334.5,587.5], [391.5,602.5], [391.5,735.5], [451.5,736.5], [419.5,685.5], [1050.5,277.5], [915.5,36.5], [799.5,257.5], [974.5,416.5], [926.5,304.5], [851.5,397.5], [926.5,481.5], [910.5,424.5], [867.5,467.5], [1022.5,351.5], [991.5,300.5], [965.5,354.5], [861.5,283.5], [820.5,328.5], [877.5,341.5], [1127.5,150.5], [1065.5,34.5], [1011.5,140.5], [1095.5,217.5], [1070.5,162.5], [1035.5,209.5], [1165.5,90.5], [1134.5,34.5], [1107.5,87.5], [990.5,29.5], [966.5,84.5], [1024.5,79.5], [756.5,25.5], [706.5,139.5], [823.5,125.5], [837.5,19.5], [804.5,65.5], [863.5,73.5], [676.5,29.5], [655.5,86.5], [713.5,74.5], [748.5,202.5], [807.5,191.5], [766.5,147.5], [282.5,15.5], [142.5,256.5], [392.5,237.5], [442.5,8.5], [368.5,105.5], [486.5,125.5], [522.5,18.5], [481.5,59.5], [538.5,77.5], [360.5,-0.5], [332.5,51.5], [392.5,46.5], [383.5,171.5], [442.5,185.5], [425.5,128.5], [132.5,15.5], [64.5,127.5], [184.5,121.5], [207.5,9.5], [173.5,58.5], [231.5,64.5], [63.5,14.5], [28.5,68.5], [86.5,65.5], [97.5,194.5], [158.5,188.5], [122.5,141.5], [215.5,393.5], [339.5,373.5], [265.5,282.5], [168.5,329.5], [225.5,332.5], [200.5,278.5], [261.5,457.5], [321.5,442.5], [279.5,401.5], [371.5,307.5], [330.5,261.5], [313.5,318.5]], "e": [[0,12], [12,9], [9,13], [13,12], [13,11], [12,14], [11,14], [14,0], [14,13], [9,15], [15,6], [6,16], [16,15], [16,10], [15,17], [10,17], [17,9], [17,16], [10,18], [18,8], [8,19], [19,18], [19,11], [18,20], [11,20], [20,10], [20,19], [6,24], [24,21], [21,25], [25,24], [25,23], [24,26], [23,26], [26,6], [26,25], [21,27], [27,3], [3,28], [28,27], [28,22], [27,29], [22,29], [29,21], [29,28], [22,30], [30,7], [7,31], [31,30], [31,23], [30,32], [23,32], [32,22], [32,31], [7,36], [36,33], [33,37], [37,36], [37,35], [36,38], [35,38], [38,7], [38,37], [33,39], [39,5], [5,40], [40,39], [40,34], [39,41], [34,41], [41,33], [41,40], [34,42], [42,8], [8,43], [43,42], [43,35], [42,44], [35,44], [44,34], [44,43], [3,51], [51,48], [48,52], [52,51], [52,50], [51,53], [50,53], [53,3], [53,52], [48,54], [54,45], [45,55], [55,54], [55,49], [54,56], [49,56], [56,48], [56,55], [49,57], [57,47], [47,58], [58,57], [58,50], [57,59], [50,59], [59,49], [59,58], [45,63], [63,60], [60,64], [64,63], [64,62], [63,65], [62,65], [65,45], [65,64], [60,66], [66,1], [1,67], [67,66], [67,61], [66,68], [61,68], [68,60], [68,67], [61,69], [69,46], [46,70], [70,69], [70,62], [69,71], [62,71], [71,61], [71,70], [46,75], [75,72], [72,76], [76,75], [76,74], [75,77], [74,77], [77,46], [77,76], [72,78], [78,4], [4,79], [79,78], [79,73], [78,80], [73,80], [80,72], [80,79], [73,81], [81,47], [47,82], [82,81], [82,74], [81,83], [74,83], [83,73], [83,82], [4,90], [90,87], [87,91], [91,90], [91,89], [90,92], [89,92], [92,4], [92,91], [87,93], [93,84], [84,94], [94,93], [94,88], [93,95], [88,95], [95,87], [95,94], [88,96], [96,86], [86,97], [97,96], [97,89], [96,98], [89,98], [98,88], [98,97], [84,102], [102,99], [99,103], [103,102], [103,101], [102,104], [101,104], [104,84], [104,103], [99,105], [105,2], [2,106], [106,105], [106,100], [105,107], [100,107], [107,99], [107,106], [100,108], [108,85], [85,109], [109,108], [109,101], [108,110], [101,110], [110,100], [110,109], [85,114], [114,111], [111,115], [115,114], [115,113], [114,116], [113,116], [116,85], [116,115], [111,117], [117,5], [5,118], [118,117], [118,112], [117,119], [112,119], [119,111], [119,118], [112,120], [120,86], [86,121], [121,120], [121,113], [120,122], [113,122], [122,112], [122,121]], "vp": [-1.0,-1.0,1228.0,1075.0]}} Organic Layout exhibiting symmetric propertiesConcept{@link yfiles.organic.OrganicLayout} - * uses a force-directed approach to place the nodes of the input graph. According to this approach, the graph is modeled - * as a physical system with appropriate forces acting on it. Nodes are considered as electrically charged particles with - * mutually repulsive forces. Edges are modeled as springs that attract adjacent nodes. A good diagram is obtained from an - * equilibrium state of the system, i.e., the nodes are rearranged based on the physical forces until the system reaches a - * (local) minimum of the sum of the forces. Features - *

- *

- * The ratio between the layout quality and the running time is conveniently adjustable. - *

- *

- * This layout algorithm is able to consider a {@link yfiles.layout.PartitionGrid} structure. However, for common nodes (i.e. - * non-group nodes) it only considers single partition cells. Furthermore, the layout algorithm will throw a {@link yfiles.lang.Exception} - * if there is a partition grid and the descendants of a group node are assigned to different partition grid cells or if - * there are group nodes that are associated with a group node mode other than {@link yfiles.organic.GroupNodeMode#NORMAL}. - *

- *

- * Although overlaps between edges and nodes are avoided, this layout algorithm doesn't guarantee that they won't appear in - * the resulting layout. To avoid overlaps, it is possible to route the edges afterwards using an edge routing algorithm, - * e.g., {@link yfiles.router.OrganicEdgeRouter}. - *

- *

- * The algorithm is also able to detect certain types of substructures in a graph (i.e., {@link yfiles.organic.OrganicLayout#chainSubstructureStyle chains}, {@link yfiles.organic.OrganicLayout#starSubstructureStyle stars}, {@link yfiles.organic.OrganicLayout#cycleSubstructureStyle cycles} and - * {@link yfiles.organic.OrganicLayout#parallelSubstructureStyle parallel structures}) and arrange these structures with special-purpose layout styles. Using substructure styles ensures - * that the corrsponding structures are easily recognized in the graph. - *

- *

- * {@graph {"ann":{"s":[50,50],"d":0, "c":1},"n":[[651.02,746.2],[499.25,376.34],[757.43,840.9],[574.93,802.49],[772.23,780.83],[712.08,729.69],[591.5,342.9],[630.22,404.23],[511.3,574.88],[356.15,353.31],[488.74,447.78],[566.25,739.99],[832.31,791.39],[152.43,610.4],[689.57,879.35],[248.1,596.17],[120.25,697.57],[639.18,467.72],[427.77,458.88],[408.48,519.6],[691.9,669.45],[818.01,882.83],[539.8,660.71],[585.22,875.17],[636.28,814.7],[714.64,608.38],[656.9,343.12],[511.04,217.28],[470.75,277.59],[422.59,338.16],[565.7,413.55],[531.15,295.7],[348.61,180.63],[402.12,271.28],[284.34,91.79],[321.78,0],[381.55,66.78],[214.95,158.82],[187.52,306.65],[287.7,278.04],[92.76,309.88],[631.56,613.97],[513.18,814.11],[775.66,700.72],[601.82,679.52],[504.9,731.91],[697.17,813.09],[606.93,266.97],[450.55,583.13],[728.3,327.65],[717.42,253.29],[543.5,154.51],[614.76,150.96],[500.57,513.16],[360.14,445.09],[293.67,694],[348.53,611.5],[206.29,734.57],[571.37,553.51],[0,313.72],[233.88,6.24],[182.4,76.67],[420.47,398.21],[561.25,487.65],[680.21,183.49]],"e":[[0,2],[0,5],[0,3],[0,4],[1,7],[1,6],[1,8],[1,10],[1,9],[0,12],[0,14],[0,11],[15,13],[16,13],[1,17],[1,19],[1,18],[0,24],[0,22],[0,20],[0,23],[0,21],[1,58],[0,25],[0,58],[1,29],[1,31],[1,26],[1,27],[1,28],[1,30],[32,34],[1,33],[32,33],[36,34],[35,34],[37,34],[38,40],[38,39],[0,44],[0,41],[0,46],[0,43],[0,45],[0,42],[1,47],[48,8],[48,58],[48,10],[48,18],[48,19],[50,47],[51,47],[52,47],[49,47],[48,53],[48,54],[1,54],[1,53],[55,56],[56,15],[16,57],[57,55],[56,48],[39,33],[59,40],[60,34],[61,34],[1,62],[48,62],[1,63],[48,63],[64,47]],"vp":[0.0,0.0,883.0,933.0]}} Organic Layout without applying specific layout styles to substructures {@graph {"ann":{"s":[50,50],"d":0,"c":1},"n":[[222.41,751.98],[933.19,715.06],[333.12,751.98],[167.05,656.1],[111.7,751.98],[277.76,656.1],[1075.74,818.63],[987.64,882.64],[826.53,1248.81],[1109.39,715.06],[923.05,1325.6],[250.02,979.37],[167.05,847.86],[283.81,1327.29],[277.76,847.86],[357.8,1251.78],[312.21,1429.13],[1075.74,611.5],[946.75,1221.23],[879.92,1137.62],[451.47,751.98],[352.53,563.47],[425.23,858.43],[425.23,645.53],[352.53,940.5],[250.02,524.59],[790.64,611.5],[756.99,715.06],[790.64,818.63],[987.64,547.49],[878.74,882.64],[878.74,547.49],[1282.21,484.89],[1243.62,401.08],[1488.63,603.97],[1399.06,538.9],[1522.84,498.68],[1399.06,669.05],[1287.59,215.47],[1262.1,323.21],[1313.08,107.74],[50.95,600.08],[141.18,966.16],[0,806.8],[141.18,537.8],[50.95,903.88],[0,697.16],[765.65,208.84],[592.77,1142.94],[799.86,314.13],[799.86,103.55],[676.08,143.76],[676.08,273.91],[772.89,1137.75],[706.25,1221.5],[488.59,1379.94],[460.19,1278.11],[414.6,1455.45],[619.49,1010.84],[1338.57,0],[1522.84,709.26],[1599.34,603.97],[730.18,1325.82],[826.67,1372.15],[876.36,208.84]],"e":[[0,2],[0,5],[0,3],[0,4],[1,7],[1,6],[1,8],[1,10],[1,9],[0,12],[0,14],[0,11],[15,13],[16,13],[1,17],[1,19],[1,18],[0,24],[0,22],[0,20],[0,23],[0,21],[1,58],[0,25],[0,58],[1,29],[1,31],[1,26],[1,27],[1,28],[1,30],[32,34],[1,33],[32,33],[36,34],[35,34],[37,34],[38,40],[38,39],[0,44],[0,41],[0,46],[0,43],[0,45],[0,42],[1,47],[48,8],[48,58],[48,10],[48,18],[48,19],[50,47],[51,47],[52,47],[49,47],[48,53],[48,54],[1,54],[1,53],[55,56],[56,15],[16,57],[57,55],[56,48],[39,33],[59,40],[60,34],[61,34],[1,62],[48,62],[1,63],[48,63],[64,47]],"vp":[0.0,0.0,1650.0,1506.0]}} Organic Layout of the same graph applying - * specific layout styles to the detected substructures - *

- * @class - * @extends {yfiles.layout.MultiStageLayout} - */ - export interface OrganicLayout extends yfiles.layout.MultiStageLayout{} - export class OrganicLayout { - /** - * Creates a new {@link yfiles.organic.OrganicLayout} instance with default settings. - */ - constructor(); - /** - * Configures the given {@link yfiles.layout.ComponentLayout} to take fixed nodes in components into account. - *

- * Components that contain fixed nodes will not be rearranged. - *

- *

- * This method is called by {@link yfiles.organic.OrganicLayout#applyLayout} before the actual layout is calculated. It may be - * overridden in order to manually configure the {@link yfiles.layout.ComponentLayout}. - *

- * @param graph the input graph - * @param layouter the {@link } instance to reconfigure - * @see yfiles.organic.OrganicLayout#smartComponentLayout - * @protected - */ - configureComponentLayout(graph:yfiles.layout.LayoutGraph,layouter:yfiles.layout.ComponentLayout):void; - /** - * Disposes of the {@link yfiles.layout.ComponentLayout} instance. - *

- * This method is called by {@link yfiles.organic.OrganicLayout#applyLayout} after the actual layout is calculated. It may be - * overridden in order to revert a custom configuration made in {@link yfiles.organic.OrganicLayout#configureComponentLayout}. - *

- * @param graph the input graph - * @param layouter the {@link } to reset - * @see yfiles.organic.OrganicLayout#smartComponentLayout - * @protected - */ - disposeComponentLayout(graph:yfiles.layout.LayoutGraph,layouter:yfiles.layout.ComponentLayout):void; - /** - * Data provider key for specifying the directedness of edges - *

- * Generally, the organic layout algorithm doesn't consider the edge direction. Nevertheless, this {@link yfiles.algorithms.IDataProvider} - * allows the user to specify hints on the directedness of edges. More precisely, a value of 1 indicates that the edge - * should be considered to be directed from source to target, a value of -1 that it is directed from target to source, and - * a value of 0 means that it is undirected. - *

- *

- * Currently, the specified values are only considered during the detection of special substructures, see {@link yfiles.organic.OrganicLayout#chainSubstructureStyle}, {@link yfiles.organic.OrganicLayout#cycleSubstructureStyle}, {@link yfiles.organic.OrganicLayout#parallelSubstructureStyle} and {@link yfiles.organic.OrganicLayout#starSubstructureStyle}. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static EDGE_DIRECTEDNESS_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for marking the nodes that are part of the relevant subset - * @see yfiles.organic.OrganicLayout#scope - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static AFFECTED_NODES_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for assigning individual modes for all group nodes - *

- * The modes specify how a group's content is handled and if it is resized during layout calculation. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static GROUP_NODE_MODE_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for defining an individual preferred length for each edge - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static PREFERRED_EDGE_LENGTH_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * The group node compactness factor. - *

- * Values should be in the range [0..1], where 0 results in group nodes not affecting the overall layout too much, whereas - * a value of 1 forces nodes in the same group to be clustered tightly. - *
- * Note: the specified value is only considered if option AutomaticGroupNodeCompactionEnabled is disabled and if there is - * no partition grid structure. - *

- *

- * By default this value is 0.4. - *

- * @throws {Stubs.Exceptions.ArgumentError} if compactness value does not lie in [0..1] - * @type {number} - */ - groupNodeCompactness:number; - /** - * Gets or sets whether or not group nodes are compacted automatically. - *

- * When enabled, the compactness factor is determined automatically, i.e. it only depends on the general compactness - * specified by option {@link yfiles.organic.OrganicLayout#compactnessFactor}. - *

- * @see yfiles.organic.OrganicLayout#groupNodeCompactness - * @see yfiles.organic.OrganicLayout#compactnessFactor - * @type {boolean} - */ - automaticGroupNodeCompaction:boolean; - /** - * Gets or sets whether or not a clustering algorithm should be applied to the input graph. - *

- * When this option is enabled, the following steps are performed during the layout: - *

- *
    - *
  1. A clustering algorithm is applied to the input graph.
  2. - *
  3. All nodes of the same cluster are put into a newly created group node.
  4. - *
  5. The layout is applied to the modified graph.
  6. - *
  7. Group nodes denoting clusters (inserted during step 2) are removed.
  8. - *
- *

- * The user can also specify customized clusters by defining appropriate groups. - *

- * @see yfiles.organic.OrganicLayout#maximumDuration - * @type {boolean} - */ - clusterNodes:boolean; - /** - * Gets or sets the quality measure of the clustering algorithm. - *

- * The higher the value, the higher the clustering quality. - *

- *

- * The value needs to lie in [0,1]. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified quality measure is outside the interval [0,1] - * @see yfiles.organic.OrganicLayout#clusterNodes - * @see yfiles.organic.OrganicLayout#maximumDuration - * @type {number} - */ - clusteringQuality:number; - /** - * Gets or sets whether or not to reserve space for node labels during layout calculation. - * @type {boolean} - */ - considerNodeLabels:boolean; - /** - * Gets or sets the {@link yfiles.layout.IGroupBoundsCalculator} instance used for calculating the size of group nodes. - * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.layout.IGroupBoundsCalculator} is null - * @type {yfiles.layout.IGroupBoundsCalculator} - */ - groupBoundsCalculator:yfiles.layout.IGroupBoundsCalculator; - /** - * Gets or sets whether or not this instance should configure the {@link yfiles.layout.ComponentLayout} to respect subsets of - * nodes. - *

- * When only a subset of nodes is placed by the layout algorithm, the fixed nodes will keep their locations even if they - * reside in different components. - *

- * @see yfiles.layout.MultiStageLayout#componentLayoutEnabled - * @see yfiles.layout.MultiStageLayout#componentLayout - * @see yfiles.organic.OrganicLayout#scope - * @type {boolean} - */ - smartComponentLayout:boolean; - /** - * Gets or sets whether or not the layout algorithm tries to avoid node/edge overlaps. - * @see yfiles.organic.OrganicLayout#nodeOverlapsAllowed - * @type {boolean} - */ - nodeEdgeOverlapAvoided:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} that modifies the orientation of the layout is activated. - * @see yfiles.layout.MultiStageLayout#orientationLayoutEnabled - * @see yfiles.layout.MultiStageLayout#orientationLayout - * @see yfiles.layout.MultiStageLayout#layoutOrientation - * @see yfiles.layout.OrientationLayout - * @type {boolean} - */ - orientationLayoutEnabled:boolean; - /** - * Gets or sets the ratio of layout quality versus running time. - *

- * The larger the ratio, the better the quality of the resulting layout but the longer it may take to perform the layout - * calculation. - *

- *

- * The value needs to lie within [0,1]. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified ratio is outside the interval [0,1] - * @type {number} - */ - qualityTimeRatio:number; - /** - * Gets or sets the maximum duration in milliseconds that this layout algorithm is allowed to run. - *

- * The duration needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified duration has a negative value - * @type {number} - */ - maximumDuration:number; - /** - * Gets or sets the scope that determines which nodes are placed by this algorithm. - * @throws {Stubs.Exceptions.ArgumentError} if the given scope is unknown - * @see yfiles.organic.OrganicLayout#AFFECTED_NODES_DP_KEY - * @type {yfiles.organic.Scope} - */ - scope:yfiles.organic.Scope; - /** - * Gets or sets the style specifier for chain substructures. - *

- * A chain is a simple edge path where the degree of the nodes is less than or equal to 2. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given style is unknown - * @see yfiles.organic.OrganicLayout#scope - * @see yfiles.organic.OrganicLayout#EDGE_DIRECTEDNESS_DP_KEY - * @type {yfiles.organic.ChainSubstructureStyle} - */ - chainSubstructureStyle:yfiles.organic.ChainSubstructureStyle; - /** - * Gets or sets the style specifier for cycle substructures. - *

- * A cycle is a simple edge path where the first and last node are identical. The algorithm only considers cycles where the - * number of edges connecting nodes of the cycle with the remaining nodes is less than or equal to 2. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given style is unknown - * @see yfiles.organic.OrganicLayout#scope - * @see yfiles.organic.OrganicLayout#EDGE_DIRECTEDNESS_DP_KEY - * @type {yfiles.organic.CycleSubstructureStyle} - */ - cycleSubstructureStyle:yfiles.organic.CycleSubstructureStyle; - /** - * Gets or sets the style specifier for parallel substructures. - *

- * A parallel structure consists of a set of nodes (called the inner nodes) such that all nodes have degree two and are - * connected to the same pair of neighbors (called the outer nodes). - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given style is unknown - * @see yfiles.organic.OrganicLayout#scope - * @see yfiles.organic.OrganicLayout#EDGE_DIRECTEDNESS_DP_KEY - * @type {yfiles.organic.ParallelSubstructureStyle} - */ - parallelSubstructureStyle:yfiles.organic.ParallelSubstructureStyle; - /** - * Gets or sets the style specifier for star substructures. - *

- * A star consists of a set of degree one nodes that are all connected to the same node (called the root of the star). - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given style is unknown - * @see yfiles.organic.OrganicLayout#scope - * @see yfiles.organic.OrganicLayout#EDGE_DIRECTEDNESS_DP_KEY - * @type {yfiles.organic.StarSubstructureStyle} - */ - starSubstructureStyle:yfiles.organic.StarSubstructureStyle; - /** - * Gets or sets the compactness factor for the layout algorithm. - *

- * Smaller values result in less compact drawings, greater values result in more compact drawings. - *

- *

- * The compactness value needs to lie in [0,1]. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified value is outside the interval [0,1] - * @type {number} - */ - compactnessFactor:number; - /** - * Gets or sets the default preferred edge length. - *

- * If there is no specific preferred edge length assigned to an edge, this default preferred edge length is used. - *

- *

- * The preferred edge length needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified edge length is negative - * @see yfiles.organic.OrganicLayout#PREFERRED_EDGE_LENGTH_DP_KEY - * @type {number} - */ - preferredEdgeLength:number; - /** - * Gets or sets the minimum preferred distance between nodes and edges when node-edge overlaps are not allowed. - *

- * The minimum preferred distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @type {number} - */ - preferredMinimumNodeToEdgeDistance:number; - /** - * Gets or sets whether or not to consider node sizes during layout calculation. - *

- * If this option is enabled, the circumcircles of the nodes are used. If it is disabled, points will be used instead. - *

- * @type {boolean} - */ - considerNodeSizes:boolean; - /** - * Gets or sets whether or not the deterministic mode of this algorithm is enabled. - *

- * In deterministic mode, the layout algorithm will yield the same results if the exact same input and same settings are - * given as input. - *

- * @type {boolean} - */ - deterministic:boolean; - /** - * Gets or sets the minimum node distance that this algorithm should enforce between all pairs of nodes. - *

- * The minimum node distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified minimum node distance is negative - * @see yfiles.organic.OrganicLayout#nodeOverlapsAllowed - * @type {number} - */ - minimumNodeDistance:number; - /** - * Gets or sets whether or not overlaps between nodes are allowed. - * @see yfiles.organic.OrganicLayout#minimumNodeDistance - * @see yfiles.organic.OrganicLayout#scope - * @type {boolean} - */ - nodeOverlapsAllowed:boolean; - /** - * Gets or sets the area restriction for the result of the layout algorithm. - * @type {yfiles.organic.OutputRestriction} - */ - outputRestriction:yfiles.organic.OutputRestriction; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.organic.OrganicLayout; - } - /** - * This layout stage enables support for handling a graph with a {@link yfiles.layout.PartitionGrid} structure. - *

- * Concept - *

- *

- * Before executing the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}, this stage prepares the grid structure of the graph accordingly, e.g., by hiding top-level grid - * nodes. Then, the core layout algorithm is applied to the graph. Finally, the grid is restored, configured and positioned - * such that it is consistent with the layout computed by the core algorithm. - *

- *

- * Information about the {@link yfiles.layout.PartitionGrid} structure is retrieved from a {@link yfiles.algorithms.IDataProvider} - * registered with the graph using key {@link yfiles.layout.PartitionGrid#PARTITION_GRID_DP_KEY}. - *

- *

- * Usage - *

- *

- * When using {@link yfiles.organic.OrganicLayout}, this stage will automatically be used, if required. It is not necessary to - * append this stage manually to {@link yfiles.organic.OrganicLayout}. - *

- *

- * Appending this stage can be useful to add support for {@link yfiles.layout.PartitionGrid partition grid} structures to other - * {@link yfiles.layout.ILayoutAlgorithm}s. - *

- *

- * The stage can be appended to all algorithms of type {@link yfiles.layout.MultiStageLayout} by using method - * {@link yfiles.layout.MultiStageLayout#appendStage}. - *

- * @see yfiles.layout.PartitionGrid - * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface OrganicPartitionGridLayoutStage extends yfiles.layout.LayoutStageBase{} - export class OrganicPartitionGridLayoutStage { - /** - * Creates a new instance of {@link yfiles.organic.OrganicPartitionGridLayoutStage} with the given layout algorithm as - * {@link yfiles.layout.LayoutStageBase#coreLayout core algorithm}. - * @param core the core layout algorithm - */ - constructor(core:yfiles.layout.ILayoutAlgorithm); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.organic.OrganicPartitionGridLayoutStage; - } - /** - * This layout stage removes node overlaps while changes to the original layout structure are avoided and a specified - * minimum node distance is guaranteed. - *

- * Layout Style - *

- *

- * Unlike the overlap removal approach implemented by - * {@link yfiles.organic.RemoveOverlapsStage}, this stage tries to keep the original layout structure, i.e., it tries to keep the - * geometric distances between the nodes. - *

- *

- * The strategy for removing overlaps is similar to the layout strategy used by organic (force-directed) layout algorithms - * (e.g. - * {@link yfiles.organic.OrganicLayout}). Therefore, this stage is especially well suited to remove node overlaps in undirected - * graph drawings with straight-line edges, as produced by organic layout approaches. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":0,"c":1},"n":[[-264.13,89.64],[-109.95,153.19],[-68.91,-95.12],[-178.12,-35.61,60,60],[-88.42,-54.43],[-134.12,41.2],[-214.95,40.96,60,60],[-96.74,81.55,60,60],[-145.17,111.32],[-255.82,6.45],[-272.91,49.11],[-47.42,-39.94,60,60],[-645,65.04],[-507.21,54.41],[-586.74,40.54,60,60],[-488.66,89.42,60,60],[-539.17,115.13],[-488.66,132.42],[-636.26,24.59],[-645,46.48],[-468.9,-54.43],[-546.97,19.76,60,60],[-456.97,-40.24],[-447.21,-40.24,60,60],[-320.5,-180,1,1,4],[-320.5,251.5,1,1,4]],"e":[[2,3],[8,7],[5,7],[9,6],[6,5],[8,6],[0,6],[10,6],[3,6],[8,5],[7,6],[3,4],[4,2],[7,1],[8,1],[7,11],[20,21],[16,15],[13,15],[18,14],[14,13],[16,14],[12,14],[19,14],[21,14],[16,13],[15,14],[21,22],[22,20],[15,17],[16,17],[15,23],[24,25]],"vp":[-645.0,-182.0,658.0,436.0]}} A graph containing overlaps (left) and the result after applying this layout stageFeatures - *

- *

- * It is possible to define a {@link yfiles.organic.OrganicRemoveOverlapsStage#minimumNodeDistance minimum distance} between nodes. This feature allows to not only remove overlaps but forces - * nodes to keep the specified distance to other nodes. - *

- *

- * Nodes can be marked as fixed. Such nodes will not be moved during the overlap removal process. A {@link yfiles.algorithms.IDataProvider} - * with key {@link yfiles.organic.OrganicRemoveOverlapsStage#FIXED_NODE_DP_KEY} can be registered to mark the fixed nodes. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface OrganicRemoveOverlapsStage extends yfiles.layout.LayoutStageBase{} - export class OrganicRemoveOverlapsStage { - /** - * Creates a new instance of {@link yfiles.organic.OrganicRemoveOverlapsStage} with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [core=null] The core layout algorithm. - */ - constructor(core?:yfiles.layout.ILayoutAlgorithm); - /** - * Data provider key for marking nodes as fixed - *

- * A node marked as fixed will not be moved by this algorithm but stay at its current position. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static FIXED_NODE_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets or sets the maximum duration in milliseconds that this layout stage is allowed to run. - *

- * This maximum time does not include the time required for the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *

- *

- * The duration needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified duration has a negative value - * @type {number} - */ - maximumDuration:number; - /** - * Gets or sets the minimum distance to be kept between any two nodes of the graph. - *

- * Due to this distance not only nodes that overlap will be moved to resolve the overlap, but also nodes which are too - * close to each other with respect to this distance will be displaced. - *

- *

- * The distance needs to be a non-negative value. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given minimum distance is negative - * @type {number} - */ - minimumNodeDistance:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.organic.OrganicRemoveOverlapsStage; - } - /** - * {@link yfiles.organic.OutputRestriction}s restrict the output area and the shape of a layout in conjunction with organic layout - * algorithms such as {@link yfiles.organic.OrganicLayout} or {@link yfiles.organic.InteractiveOrganicLayout}. - *

- * In consequence, all nodes need to be placed inside a specific restricted area. - *

- * @see yfiles.organic.OrganicLayout#outputRestriction - * @see yfiles.organic.InteractiveOrganicLayout#outputRestriction - * @class - */ - export interface OutputRestriction extends yfiles.lang.Object{} - export class OutputRestriction { - /** - * Creates an {@link yfiles.organic.OutputRestriction} that confines the layout result to a rectangular area which roughly complies - * with the given aspect ratio. - *

- * The aspect ratio is defined as the ratio between the width and the height of a layout. - *

- *
    - *
  • aspect ratio 1: width and height of the layout should be equal
  • - *
  • aspect ratio between 0 and 1: the height of a layout should be greater than its width
  • - *
  • aspect ratio larger than 1: the width of a layout should be greater than its height
  • - *
- *

- * The aspect ratio needs to be strictly positive. - *

- * @param ratio the preferred aspect ratio of the output - * @returns an {@link } imposing the given aspect ratio on the layout - * @throws {Stubs.Exceptions.ArgumentError} if the given aspect ratio is 0 or negative - * @see yfiles.organic.OrganicLayout#outputRestriction - * @see yfiles.organic.InteractiveOrganicLayout#outputRestriction - * @static - */ - static createAspectRatioRestriction(ratio:number):yfiles.organic.OutputRestriction; - /** - * Creates an {@link yfiles.organic.OutputRestriction} that confines the layout result to a circle. - *

- * The actual restriction circle is defined by the given coordinates and radius. - *

- *

- * The radius of the restriction circle needs to be greater than zero. - *

- * @param x the x-coordinate of the restriction circle's center - * @param y the y-coordinate of the restriction circle's center - * @param radius the radius of the restriction circle - * @returns the {@link } confining the layout to a circular area - * @throws {Stubs.Exceptions.ArgumentError} if the given radius is less than or equal to zero - * @see yfiles.organic.OrganicLayout#outputRestriction - * @see yfiles.organic.InteractiveOrganicLayout#outputRestriction - * @static - */ - static createCircularCageRestriction(x:number,y:number,radius:number):yfiles.organic.OutputRestriction; - /** - * Creates an {@link yfiles.organic.OutputRestriction} that confines the layout result to an elliptical area. - *

- * The restriction ellipse is defined by its bounding box specified by the given coordinates and size values. - *

- *

- * The main axes of the ellipse are parallel to the coordinate axes. - *

- *

- * The values for height and width of the ellipse's bounding box need to be greater than zero. - *

- * @param x the x-coordinate of the bounding box's upper left corner - * @param y the y-coordinate of the bounding box's upper left corner - * @param w the width of the bounding box - * @param h the height of the bounding box - * @returns the {@link } confining the layout to an elliptical area - * @throws {Stubs.Exceptions.ArgumentError} if the given width or height is 0 or negative - * @see yfiles.organic.OrganicLayout#outputRestriction - * @see yfiles.organic.InteractiveOrganicLayout#outputRestriction - * @static - */ - static createEllipticalCageRestriction(x:number,y:number,w:number,h:number):yfiles.organic.OutputRestriction; - /** - * Creates an {@link yfiles.organic.OutputRestriction} that confines the layout to a rectangular area. - *

- * This restriction rectangle is defined by the given coordinates and size values. - *

- *

- * The values for height and width of the rectangle need to be greater than zero. - *

- * @param x the x-coordinate of the restriction rectangle's upper-left corner - * @param y the y-coordinate of the restriction rectangle's upper-left corner - * @param w width of the restriction rectangle - * @param h height of the restriction rectangle - * @returns the {@link } confining the layout to a rectangular area - * @throws {Stubs.Exceptions.ArgumentError} if the given width or height is less than or equal to zero - * @see yfiles.organic.OrganicLayout#outputRestriction - * @see yfiles.organic.InteractiveOrganicLayout#outputRestriction - * @static - */ - static createRectangularCageRestriction(x:number,y:number,w:number,h:number):yfiles.organic.OutputRestriction; - /** - * This {@link yfiles.organic.OutputRestriction} does not restrict the output by any means. - *

- * It is a no-op that can be used when the output area and shape of a layout should be unrestricted. - *

- * @see yfiles.organic.OrganicLayout#outputRestriction - * @see yfiles.organic.InteractiveOrganicLayout#outputRestriction - * @const - * @static - * @type {yfiles.organic.OutputRestriction} - */ - static NONE:yfiles.organic.OutputRestriction; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.organic.OutputRestriction; - } - /** - * This algorithm recursively removes node overlaps from a graph with a hierarchic group structure. - *

- * Basically, this algorithm combines a {@link yfiles.layout.RecursiveGroupLayout} with a specific customizable {@link yfiles.organic.RecursiveShuffleLayout#shuffleLayout shuffle algorithm} - * as its - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. The shuffle algorithm will be recursively applied to all groups of the input graph to remove node - * overlaps. - *

- *

- * {@graph {"ann":{"s":[50,50],"d":1},"n":[[158,104.94,384.5,224.75,2,[[158,127.31,384.5,22.38,"Group 1"]]],[173,142.31,175,172.38,2,[[173,164.69,175,22.38,"Group 2"]]],[205,187.69,60,30],[235,179.69,60,30],[225,249.69,60,30],[188,239.69,60,30],[407.5,177.69],[445,187.69,60,30],[432.5,203.38],[382.5,218.75],[295,242.31,155,177.88,2,[[295,264.69,155,22.38,"Group 3"]]],[310,279.69],[335,305.19],[360,329.69],[385,355.19],[469,265.25,50,154.94],[737.5,104.94,386,204.75,2,[[737.5,127.31,386,22.38,"Group 1"]]],[752.5,142.31,170,152.38,2,[[752.5,164.69,170,22.38,"Group 2"]]],[781.5,187.69,60,30],[847.5,179.69,60,30],[833.5,249.69,60,30],[767.5,239.69,60,30],[987,169.5],[1048.5,176.5,60,30],[1042,212.5],[974,225.5],[889.5,315.62,155,270.38,2,[[889.5,338,155,22.38,"Group 3"]]],[904.5,353],[929.5,409],[954.5,465],[979.5,521],[1063.5,324.84,50,154.94],[569.5,329.5,1,1,4],[706.5,329.5,1,1,4]],"e":[[32,33]],"vp":[158.0,104.0,966.0,482.0]}} Input graph (left) and result (right) after executing this algorithm with default settings - *

- *

- * Since this algorithm is a {@link yfiles.layout.ILayoutStage}, a {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} can be specified. In consequence, this - * algorithm will perform its work after the core algorithm was executed. - *

- * @see yfiles.organic.ShuffleLayout - * @see yfiles.layout.RecursiveGroupLayout - * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface RecursiveShuffleLayout extends yfiles.layout.LayoutStageBase{} - export class RecursiveShuffleLayout { - /** - * Creates a new {@link yfiles.organic.RecursiveShuffleLayout} instance with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [core=null] The core layout algorithm. - */ - constructor(core?:yfiles.layout.ILayoutAlgorithm); - /** - * Gets or sets the {@link yfiles.layout.IGroupBoundsCalculator} instance that computes the sizes of all group nodes. - * @type {yfiles.layout.IGroupBoundsCalculator} - */ - groupBoundsCalculator:yfiles.layout.IGroupBoundsCalculator; - /** - * Gets or sets the {@link yfiles.layout.ILayoutAlgorithm} instance that is used for removing node overlaps. - *

- * This instance will be applied recursively to all group nodes of the graph. - *

- * @type {yfiles.layout.ILayoutAlgorithm} - */ - shuffleLayout:yfiles.layout.ILayoutAlgorithm; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.organic.RecursiveShuffleLayout; - } - /** - * This {@link yfiles.layout.ILayoutStage} removes node overlaps and guarantees a certain minimum distance between nodes. - *

- * Layout Style This stage only removes overlaps between nodes of the input graph. To do so, overlapping nodes will be moved apart. - * Results often look like a stretched version of the original graph. {@graph {"ann":{"s":[30,30],"d":0,"c":1},"n":[[206,563.54],[343.79,552.91],[264.26,539.04,60,60],[362.34,587.92,60,60],[311.83,613.63],[362.34,630.92],[214.74,523.09],[206,544.98],[382.1,444.07],[304.03,518.26,60,60],[394.03,458.26],[403.79,458.26,60,60],[530.5,318.5,1,1,4],[530.5,750,1,1,4],[587.5,574.26],[819.5,549.26],[677.5,536.26,60,60],[847.5,609.26,60,60],[757.5,647.26],[838.5,680.26],[601.5,492.26],[587.5,533.26],[870.5,365.26],[748.5,503.26,60,60],[881.5,406.26],[922.5,406.26,60,60]],"e":[[8,9],[4,3],[1,3],[6,2],[2,1],[4,2],[0,2],[7,2],[9,2],[4,1],[3,2],[9,10],[10,8],[3,5],[4,5],[3,11],[12,13],[22,23],[18,17],[15,17],[20,16],[16,15],[18,16],[14,16],[21,16],[23,16],[18,15],[17,16],[23,24],[24,22],[17,19],[18,19],[17,25]],"vp":[206.0,317.0,777.0,436.0]}} A graph containing overlaps (left) and the result after the - * overlap removal Features - *

- *

- * It is possible to define a {@link yfiles.organic.RemoveOverlapsStage#minimumNodeDistance minimum distance} between nodes. This feature allows to not only remove overlaps but forces - * nodes to keep a specified distance to other nodes. - *

- * @class - * @implements {yfiles.layout.ILayoutStage} - */ - export interface RemoveOverlapsStage extends yfiles.lang.Object,yfiles.layout.ILayoutStage{} - export class RemoveOverlapsStage { - /** - * Creates a new {@link yfiles.organic.RemoveOverlapsStage} instance with a given {@link yfiles.organic.RemoveOverlapsStage#minimumNodeDistance minimum node distance}. - *

- * The minimum node distance needs to be non-negative. - *

- * @param minimumNodeDistance a non-negative minimum distance value - * @throws {Stubs.Exceptions.ArgumentError} if the given distance is negative - */ - constructor(minimumNodeDistance:number); - /** - * Removes node overlaps and displaces nodes of the given graph such that they keep the specified {@link yfiles.organic.RemoveOverlapsStage#minimumNodeDistance minimum distance} to each - * other. - *

- * If a {@link yfiles.organic.RemoveOverlapsStage#coreLayout core layout algorithm} is specified, it will be executed first. - *

- * @param graph the input graph - */ - applyLayout(graph:yfiles.layout.LayoutGraph):void; - /** - * Gets or sets the minimum distance to be kept between any two nodes of the graph. - *

- * Due to this distance not only nodes that overlap will be moved to resolve the overlap, but also nodes which are too - * close to each other with respect to this distance will be displaced. - *

- *

- * The minimum node distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given minimum distance is negative - * @type {number} - */ - minimumNodeDistance:number; - /** - * - * @type {yfiles.layout.ILayoutAlgorithm} - */ - coreLayout:yfiles.layout.ILayoutAlgorithm; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.organic.RemoveOverlapsStage; - } - /** - * This layout stage replaces edges by a path of split-edges with a specified length before it calls a {@link yfiles.organic.SplitEdgeStage#coreLayout core layout algorithm}. - *

- * Concept - *

- *

- * Each edge segment (or only segments that belong to a particular subset of edges) in the input graph will be split up - * into several segments such that all segments have a maximum length defined by the specified - * {@link yfiles.organic.SplitEdgeStage#splitSegmentLength split segment length}. If an edge segment is already shorter than the split segment length, then it will not be split - * up. - *

- *

- * At each split location, a dummy node (the so-called split-node) will be inserted. Split-nodes inserted for the same original edge - * and the actual source and target node of the original edge will be connected by so called - * split-edges. In consequence, the original source and target node are not connected by a single edge but by a path consisting of - * split-edges. Furthermore, all edges are simple straight lines. - *

- *

- * After this replacement step, the {@link yfiles.organic.SplitEdgeStage#coreLayout core layout algorithm} will be invoked. - *

- *

- * When the core layout algorithm has finished, the split-nodes will be removed from the graph and the original edge will - * be restored. The coordinates of the bends will be the center-coordinates of the corresponding split-node. - *

- *

- * Features - *

- *

- * The {@link yfiles.algorithms.IDataProvider} registered with key {@link yfiles.organic.SplitEdgeStage#splitNodesDpKey} can be used by the {@link yfiles.organic.SplitEdgeStage#coreLayout core layout algorithm} to determine whether - * or not a certain node is a split-node that was created by this stage. This information may be useful when providing a - * custom core layout algorithm which should handle split-nodes in a different way than normal nodes. If no {@link yfiles.algorithms.IDataProvider} - * is registered with this key, this information is dropped. - *

- *

- * By registering a {@link yfiles.algorithms.IDataProvider} with key {@link yfiles.organic.SplitEdgeStage#affectedEdgesDpKey}, the subset of edges that should be split by this layout - * stage can be specified. If no {@link yfiles.algorithms.IDataProvider} with this key is registered, all edges of the input graph - * will be split by the layout stage. - *

- *

- * The amount of split-nodes replacing a single original edge can be controlled via the - * {@link yfiles.organic.SplitEdgeStage#splitSegmentLength split segment length}. The smaller the value, the more split-nodes this stage will insert. - *

- * @class - * @implements {yfiles.layout.ILayoutStage} - */ - export interface SplitEdgeStage extends yfiles.lang.Object,yfiles.layout.ILayoutStage{} - export class SplitEdgeStage { - /** - * Creates a new {@link yfiles.organic.SplitEdgeStage} with default settings. - */ - constructor(); - /** - * Replaces the edges of the given graph by a path of split-edges, executes the {@link yfiles.organic.SplitEdgeStage#coreLayout core layout algorithm} and restores the - * original edges, introducing bends at the locations of the split-nodes. - * @param graph the input graph - */ - applyLayout(graph:yfiles.layout.LayoutGraph):void; - /** - * Gets or sets the {@link yfiles.algorithms.IDataProvider} key to determine which edges are to be split by this layout stage. - *

- * If no {@link yfiles.algorithms.IDataProvider} is registered with this key, all edges will be split. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified key is null - * @type {any} - */ - affectedEdgesDpKey:any; - /** - * Gets or sets the {@link yfiles.algorithms.IDataProvider} key for marking the nodes that were created by splitting edges, i.e., - * the split-nodes. - *

- * The information provided by the {@link yfiles.algorithms.IDataProvider} registered with this key is useful for the {@link yfiles.organic.SplitEdgeStage#coreLayout core layout algorithm} - * to know whether or not some node is a (dummy) split-node. After {@link yfiles.organic.SplitEdgeStage#applyLayout} finishes, the - * split-nodes will have been removed and this information will not be available anymore. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified key is null - * @type {any} - */ - splitNodesDpKey:any; - /** - * Gets or sets the maximum length for a split-edge. - *

- * The length of the original edge path divided by the given split segment length yields the number of nodes on the new - * path. - *

- *

- * The split segment length must be a strictly positive value. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given split segment length is smaller than or equal to zero - * @type {number} - */ - splitSegmentLength:number; - /** - * Gets or sets the size of the split-nodes that are inserted when splitting edges. - *

- * The given size will be used for defining the height and the width of the split-nodes. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given size is negative - * @type {number} - */ - splitNodeSize:number; - /** - * - * @type {yfiles.layout.ILayoutAlgorithm} - */ - coreLayout:yfiles.layout.ILayoutAlgorithm; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.organic.SplitEdgeStage; - } - /** - * Specifies custom data for the {@link yfiles.organic.OrganicLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface OrganicLayoutData extends yfiles.layout.LayoutData{} - export class OrganicLayoutData { - constructor(); - /** - * Gets or sets the collection of nodes that is laid out by the layout. - * @see yfiles.organic.OrganicLayout#AFFECTED_NODES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - affectedNodes:yfiles.layout.ItemCollection; - /** - * Gets or sets the mapping from edges to their preferred edge length. - * @see yfiles.organic.OrganicLayout#PREFERRED_EDGE_LENGTH_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - preferredEdgeLengths:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their minimum distance to other nodes. - *

- * Note that the distances are only considered by the internally used {@link yfiles.organic.ShuffleLayout} when {@link yfiles.organic.OrganicLayout#nodeOverlapsAllowed} is true and {@link yfiles.organic.OrganicLayout#scope} is - * not {@link yfiles.organic.Scope#ALL}. - *

- * @see yfiles.organic.ShuffleLayout#MINIMUM_DISTANCE_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - minimumNodeDistances:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from group nodes to a mode constant describing how to handle the group node. - *

- * The algorithm expects for each group node to find one of the following constants or null: - *

    - *
  • - * {@link yfiles.organic.GroupNodeMode#NORMAL} - *
  • - *
  • - * {@link yfiles.organic.GroupNodeMode#FIX_BOUNDS} - *
  • - *
  • - * {@link yfiles.organic.GroupNodeMode#FIX_CONTENTS} - *
  • - *
- *

- * @see yfiles.organic.OrganicLayout#GROUP_NODE_MODE_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - groupNodeModes:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their {@link yfiles.layout.NodeHalo}. - * @see yfiles.layout.NodeHalo#NODE_HALO_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeHalos:yfiles.layout.ItemMapping; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - /** - * Gets or sets the partition grid layout data. - * @type {yfiles.layout.PartitionGridData} - */ - partitionGridData:yfiles.layout.PartitionGridData; - /** - * Gets or sets the mapping from edges to their directedness. - *

- * Generally, the organic layout algorithm doesn't consider the edge direction. Nevertheless, this property allows the user - * to specify hints on the directedness of edges. More precisely, a value of 1 indicates that the edge should be considered - * to be directed from source to target, a value of -1 that it is directed from target to source, and a value of 0 means - * that it is undirected. - *

- *

- * Currently, the specified values are only considered during the detection of special substructures, see {@link yfiles.organic.OrganicLayout#chainSubstructureStyle}, {@link yfiles.organic.OrganicLayout#cycleSubstructureStyle}, {@link yfiles.organic.OrganicLayout#parallelSubstructureStyle} and {@link yfiles.organic.OrganicLayout#starSubstructureStyle}. - *

- * @see yfiles.organic.OrganicLayout#EDGE_DIRECTEDNESS_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeDirectedness:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.organic.OrganicLayoutData; - } - }export namespace router{ - /** - * {@link yfiles.router.ParallelEdgeRouter} is a {@link yfiles.layout.ILayoutStage} that routes parallel edges which connect the same pair - * of nodes in a graph. - *

- * Layout Style The edge paths of parallel edges consist of parallel segments. At the end points, the edges can either still be - * parallel or {@link yfiles.router.ParallelEdgeRouter#joinEnds joined in one point}. {@graph {"ann":{"s":[30,30],"d":0,"c":1},"n":[[198,216],[54,226],[0,93],[110,0],[232,76],[119,122]],"e":[[1,0],[2,1],[3,2],[0,4],[4,3],[2,5,[43.96,125.35,100.3,139.08]],[2,5,[48.7,105.92,105.04,119.65]],[2,5,[51.07,96.2,107.4,109.93]],[3,5,[147.32,45.67,151.57,103.38]],[1,5,[77.62,208.34,108.42,159.06]],[1,5,[69.14,203.04,99.94,153.76]],[0,5,[184.58,212.72,147.11,168.14]],[0,5,[176.92,219.16,139.46,174.58]],[5,3,[141.6,104.12,137.34,46.41]],[5,3,[121.66,105.59,117.4,47.88]],[5,3,[111.68,106.33,107.43,48.62]],[5,4,[171.36,143.38,224.72,121.66]],[5,4,[167.59,134.12,220.95,112.4]],[5,4,[160.05,115.6,213.41,93.88]],[5,2,[97.93,148.8,41.6,135.07]],[5,4,[156.28,106.34,209.64,84.62]],[5,0,[162.42,155.28,199.89,199.86]],[5,0,[170.08,148.84,207.54,193.42]],[5,1,[125.38,169.66,94.58,218.94]],[5,1,[133.86,174.96,103.06,224.24]],[1,5,1],[2,5,1],[0,5,1],[5,3,1],[5,4,1]],"vp":[0.0,0.0,262.0,256.0]}} - *

- *

- * The master edge determining the routing is highlighted - *

- *

- * Concept {@link yfiles.router.ParallelEdgeRouter} performs four basic steps: - *

- *
    - *
  1. Remove all parallel edges from the input graph, leaving one master edge in the graph
  2. - *
  3. Invoke the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} on the graph without parallel edges
  4. - *
  5. Reinsert all previously removed edges
  6. - *
  7. Route the parallel edges
  8. - *
- *

- * Features - *

- *

- * {@link yfiles.router.ParallelEdgeRouter} can either be used as a {@link yfiles.layout.ILayoutStage} wrapping a {@link yfiles.layout.ILayoutAlgorithm layout algorithm} which - * cannot handle parallel edges. Then it will hide the parallel edges from this {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} and take over the - * routing of them. - *
- * If no {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} is specified, {@link yfiles.router.ParallelEdgeRouter} can work alone. It will route only the - * parallel edges and keep the remaining graph unchanged. - *

- *

- * Parallel edges can either be all edges between the same two nodes, ignoring the direction, or edges are only considered - * parallel if they share the same source node and target node. Hence, they share the same {@link yfiles.router.ParallelEdgeRouter#directedMode direction}. - *

- *

- * To make sure that the ports of all parallel edges are on the end nodes, the first and last segments can be - * {@link yfiles.router.ParallelEdgeRouter#joinEnds joined}. However, these segments won't be parallel. - *

- *

- * There are two ways to define the distance between two parallel edges. First, an absolute distance can be {@link yfiles.router.ParallelEdgeRouter#lineDistance defined}. - * Parallel segments will keep this distance. Second, the distance can be - * {@link yfiles.router.ParallelEdgeRouter#adaptiveLineDistances determined relative to the node bounds}. Depending on the size of the nodes and the number of parallel edges between - * them, the distance between parallel edges is adjusted. This will keep the edges straight in most cases. - *

- *

- * It is possible to select - * {@link yfiles.router.ParallelEdgeRouter#LEADING_EDGE_DP_KEY custom master edges}. All edges that are parallel to the selected edges will be temporarily removed. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface ParallelEdgeRouter extends yfiles.layout.LayoutStageBase{} - export class ParallelEdgeRouter { - /** - * Creates a new {@link yfiles.router.ParallelEdgeRouter} instance with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [coreLayouter=null] The core layout algorithm. - * @see yfiles.layout.LayoutStageBase#coreLayout - */ - constructor(coreLayouter?:yfiles.layout.ILayoutAlgorithm); - /** - * Hides all parallel edges leaving a master edge in the graph. - *

- * {@link yfiles.router.ParallelEdgeRouter} detects parallel edges of the given graph. From each set of parallel edges it hides all - * but one edge from the given graph. - *

- *

- * This method is called before invoking the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. It may be overridden to change the selection of leading - * edges. Hidden edges should be stored in {@link yfiles.router.ParallelEdgeRouter#hiddenEdges} to enable un-hiding later on. - *

- * @param graph the input graph - * @see yfiles.router.ParallelEdgeRouter#directedMode - * @see yfiles.router.ParallelEdgeRouter#AFFECTED_EDGES_DP_KEY - * @protected - */ - findAndHideParallelEdges(graph:yfiles.algorithms.Graph):void; - /** - * Assigns a layout to all parallel edges. - *

- * The layout for each parallel edge follows the layout of the master edge which was not removed from the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *

- *

- * This method is called when the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} is finished. It may be overridden to introduce a custom routing for - * parallel edges. - *

- * @param graph the graph after the core layout - * @param parallelEdges the map that provides all parallel edges for each master edge - * @see yfiles.router.ParallelEdgeRouter#joinEnds - * @see yfiles.router.ParallelEdgeRouter#adaptiveLineDistances - * @see yfiles.router.ParallelEdgeRouter#adjustLeadingEdge - * @protected - */ - layoutParallelEdges(graph:yfiles.layout.LayoutGraph,parallelEdges:yfiles.algorithms.IEdgeMap):void; - /** - * Data provider key for marking edges that will be routed - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static AFFECTED_EDGES_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for specifying the master edges - *

- * Marked edges won't be removed for the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. All edges parallel to the master edges will get parallel paths. - *

- *

- * If no leading edge is specified for a bundle of parallel edges, it will be determined automatically. If there is more - * than one leading edge, the first one is chosen. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static LEADING_EDGE_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Holds the list of parallel edges that are hidden from the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @protected - * @type {yfiles.algorithms.EdgeList} - */ - hiddenEdges:yfiles.algorithms.EdgeList; - /** - * {@link yfiles.algorithms.IEdgeMap} that associates a hidden edge with the unique parallel edge not hidden from the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @type {yfiles.algorithms.IEdgeMap} - */ - parallelEdges:yfiles.algorithms.IEdgeMap; - /** - * Gets or sets whether or not the direction of edges should be considered. - *

- * In directed mode, only edges that share the same source and target node will be routed in parallel. Edges that connect - * to the same nodes but in different directions won't be considered parallel. - *

- *

- * In undirected mode, all edges connecting the same pair of nodes will be routed in parallel. - *

- * @type {boolean} - */ - directedMode:boolean; - /** - * Gets or sets whether or not the distances between parallel edges should be determined automatically according to the - * sizes of their source and target nodes. - *

- * If enabled, the distances between edges are chosen such that all parallel edges can be drawn as straight lines and still - * connect to the nodes' bounds. - *

- * @see yfiles.router.ParallelEdgeRouter#lineDistance - * @type {boolean} - */ - adaptiveLineDistances:boolean; - /** - * Gets or sets the distance between two adjacent edge paths that run in parallel. - *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is less than 0 - * @see yfiles.router.ParallelEdgeRouter#adaptiveLineDistances - * @type {number} - */ - lineDistance:number; - /** - * Gets or sets whether or not to join end points of parallel edges. - *

- * If enabled, all edges end with non-parallel segments that connect at the same point to the node. Otherwise, all segments - * of the edges are parallel. In this case, some edges may not connect to the nodes' bounds. - *

- * @see yfiles.router.ParallelEdgeRouter#absJoinEndDistance - * @see yfiles.router.ParallelEdgeRouter#relJoinEndDistance - * @type {boolean} - */ - joinEnds:boolean; - /** - * Gets or sets the absolute distance from the end point of the joined lines to the first parallel segments. - *

- * The absolute distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @see yfiles.router.ParallelEdgeRouter#joinEnds - * @see yfiles.router.ParallelEdgeRouter#relJoinEndDistance - * @type {number} - */ - absJoinEndDistance:number; - /** - * Gets or sets the relative distance from the end point of the joined lines to the first parallel segments. - *

- * The length is relative to the corresponding original segment's length. It needs to have a value in the interval [0,1]. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified relative distance is less than 0 or greater than 1 - * @see yfiles.router.ParallelEdgeRouter#joinEnds - * @see yfiles.router.ParallelEdgeRouter#absJoinEndDistance - * @type {number} - */ - relJoinEndDistance:number; - /** - * Gets or sets whether or not to adjust the leading edge to obtain more symmetric results. - * @type {boolean} - */ - adjustLeadingEdge:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.ParallelEdgeRouter; - } - export enum Scope{ - /** - * A scope specifier which defines that all edges of the input graph will be routed. - * @see yfiles.router.BusRouter#scope - */ - ROUTE_ALL_EDGES, - /** - * A scope specifier which defines that only the selected edges of the input graph will be routed. - *

- * The selection state of an edge is determined by a boolean value returned by a {@link yfiles.algorithms.IDataProvider} registered - * with key {@link yfiles.router.BusRouter#affectedEdgesDpKey}. - *

- *

- * All other non-selected edges will be considered to have fixed routes. - *

- * @see yfiles.router.BusRouter#scope - * @see yfiles.router.BusRouter#affectedEdgesDpKey - * @see yfiles.router.BusRouter#DEFAULT_AFFECTED_EDGES_DP_KEY - */ - ROUTE_AFFECTED_EDGES, - /** - * A scope specifier which defines that only edges incident to selected nodes will be routed. - *

- * The selection state of a node is determined by a boolean value returned by a {@link yfiles.algorithms.IDataProvider} registered - * with key {@link yfiles.router.EdgeRouter#affectedNodesDpKey}. - *

- *

- * All other edges that are incident to non-selected nodes will be considered to have fixed routes. - *

- * @see yfiles.router.EdgeRouter#scope - * @see yfiles.router.EdgeRouter#affectedNodesDpKey - */ - ROUTE_EDGES_AT_AFFECTED_NODES - } - export enum MonotonicPathRestriction{ - /** - * A constant specifying that there are no monotonic edge path restrictions. - * @see yfiles.router.EdgeLayoutDescriptor#monotonicPathRestriction - */ - NONE, - /** - * A constant specifying monotonic edge path restrictions for the vertical direction. - *

- * This implies that each vertical edge segment is directed from the source to the target. - *

- * @see yfiles.router.EdgeLayoutDescriptor#monotonicPathRestriction - */ - VERTICAL, - /** - * A constant specifying monotonic edge path restrictions for the horizontal direction. - *

- * This implies that each horizontal edge segment is directed from the source to the target. - *

- * @see yfiles.router.EdgeLayoutDescriptor#monotonicPathRestriction - */ - HORIZONTAL, - /** - * A constant specifying monotonic edge path restrictions for the horizontal and vertical direction. - *

- * This implies that each horizontal as well as each vertical edge segment is directed from the source to the target. - *

- * @see yfiles.router.EdgeLayoutDescriptor#monotonicPathRestriction - */ - BOTH - } - /** - * This edge routing algorithm routes edges as straight-lines considering the specified {@link yfiles.layout.PortConstraint}s. - *

- * Layout Style The edges connect to their ports with straight-lines. This may lead to edges crossing nodes. {@graph {"ann":{"s":[30,30],"d":1},"n":[[591,590],[157,454],[558,361],[665,476],[466,502],[335,663],[230,267],[350,325],[17,519],[187,590],[248,387],[145,310],[464,337],[310,506],[670,151],[220,106],[697,285],[522,187],[457,2],[111,0],[305,5],[375,139],[0,260]],"e":[[0,3],[3,2],[4,0],[1,6],[6,7],[7,2],[1,8],[1,9],[10,7],[10,11],[11,7],[12,4],[12,7],[5,13],[9,13],[1,13],[7,13],[4,13],[15,6],[14,16],[16,2],[12,17],[17,14],[15,19],[15,20],[18,21],[20,21],[15,21],[17,21],[7,21],[11,22]],"vp":[0.0,0.0,727.0,693.0]}}Concept{@link yfiles.router.StraightLineEdgeRouter} - * will first invoke the {@link yfiles.layout.LayoutStageBase#coreLayout} if one exists. Then, it will remove all bends from the edges and will place the ports either on - * the center of the nodes or at a location specified by a {@link yfiles.layout.PortConstraint}. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface StraightLineEdgeRouter extends yfiles.layout.LayoutStageBase{} - export class StraightLineEdgeRouter { - /** - * Creates a new instance of {@link yfiles.router.StraightLineEdgeRouter} with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [core=null] The core layout algorithm. - */ - constructor(core?:yfiles.layout.ILayoutAlgorithm); - /** - * Gets or sets the (sub-)set of edges to be routed. - *

- * {@link yfiles.router.StraightLineEdgeRouter} will only route those edges and leave the remaining edges unchanged. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given argument is an unknown specifier - * @see yfiles.router.StraightLineEdgeRouter#affectedEdgesDpKey - * @see yfiles.router.StraightLineEdgeRouter#affectedNodesDpKey - * @type {yfiles.router.Scope} - */ - scope:yfiles.router.Scope; - /** - * Gets or sets the key to register a {@link yfiles.algorithms.IDataProvider} that provides the selected state of the nodes of the - * graph. - *

- * If the scope only includes {@link yfiles.router.Scope#ROUTE_EDGES_AT_AFFECTED_NODES edges at selected nodes}, only edges of the nodes marked in this {@link yfiles.algorithms.IDataProvider} - * are routed while all other edges are considered to have fixed routes. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified key is null - * @see yfiles.router.StraightLineEdgeRouter#scope - * @type {any} - */ - affectedNodesDpKey:any; - /** - * Gets or sets the key to register a {@link yfiles.algorithms.IDataProvider} that provides the selected state of the edges of the - * graph. - *

- * If the scope only includes {@link yfiles.router.Scope#ROUTE_AFFECTED_EDGES selected edges}, only edges of the nodes marked in this {@link yfiles.algorithms.IDataProvider} are - * routed while all other edges are considered to have fixed routes. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified key is null - * @see yfiles.router.StraightLineEdgeRouter#scope - * @type {any} - */ - affectedEdgesDpKey:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.StraightLineEdgeRouter; - } - /** - * This class describes the location and the direction from which a given {@link yfiles.router.PartitionCell partition cell} has been entered during a path - * search. - *

- * The path that was followed in order to reach a given {@link yfiles.router.PartitionCell partition cell} can be reconstructed by traversing all - * {@link yfiles.router.CellEntrance#previousEntrance previous entrances}. The {@link yfiles.router.CellEntrance#enterInterval enter interval} and {@link yfiles.router.CellEntrance#enterDirection enter direction} determine how the {@link yfiles.router.PartitionCell partition cell} was entered. - *

- * @class - */ - export interface CellEntrance extends yfiles.lang.Object{} - export class CellEntrance { - /** - * Creates a new {@link yfiles.router.CellEntrance} instance that is a copy of a given other {@link yfiles.router.CellEntrance}. - * @param other the {@link } to be copied - */ - constructor(other:yfiles.router.CellEntrance); - /** - * Creates a new {@link yfiles.router.CellEntrance} instance for a given {@link yfiles.router.PartitionCell}. - * @param cell the {@link } that is entered - */ - constructor(cell:yfiles.router.PartitionCell); - /** - * Gets the {@link yfiles.router.PartitionCell partition cell} of this {@link yfiles.router.CellEntrance} instance. - * @type {yfiles.router.PartitionCell} - */ - cell:yfiles.router.PartitionCell; - /** - * Gets or sets the previous {@link yfiles.router.CellEntrance} along the path that was traversed in order to reach the {@link yfiles.router.CellEntrance#cell cell}. - * @type {yfiles.router.CellEntrance} - */ - previousEntrance:yfiles.router.CellEntrance; - /** - * Gets or sets the {@link yfiles.router.OrthogonalInterval} that was used for entering this {@link yfiles.router.CellEntrance#cell cell}. - * @type {yfiles.router.OrthogonalInterval} - */ - enterInterval:yfiles.router.OrthogonalInterval; - /** - * Gets or sets the direction from which this {@link yfiles.router.CellEntrance#cell cell} was entered. - * @type {yfiles.layout.Direction} - */ - enterDirection:yfiles.layout.Direction; - /** - * Gets or sets the costs for the implicit path given by the {@link yfiles.router.CellEntrance#previousEntrance previous entrances}. - *

- * The costs must be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the costs are negative - * @type {number} - */ - costs:number; - /** - * Gets or sets the heuristic costs for the implicit path given by the {@link yfiles.router.CellEntrance#previousEntrance previous entrances}. - *

- * Heuristic costs must be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the heuristic costs are negative - * @type {number} - */ - heuristicCosts:number; - /** - * Gets or sets the {@link yfiles.router.EdgeCellInfo} describing how the previous {@link yfiles.router.PartitionCell partition cell} was traversed. - * @type {yfiles.router.EdgeCellInfo} - */ - previousEdgeCellInfo:yfiles.router.EdgeCellInfo; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.CellEntrance; - } - /** - * This class stores information about the part of an edge segment that lies inside a specified {@link yfiles.router.PartitionCell partition cell}. - * @class - * @extends {yfiles.router.SegmentInfoBase} - */ - export interface CellSegmentInfo extends yfiles.router.SegmentInfoBase{} - export class CellSegmentInfo { - /** - * Creates a new {@link yfiles.router.CellSegmentInfo} instance. - * @param edge the edge to which the segment of this info belongs - * @param segmentIndex the index of the segment to which this info belongs - * @param direction the direction to which the segment of this info points - * @param locationRange the range within which the common location of this segment has to lie - * @param minExtension the minimum interval in extension direction this segment part is known to intersect - * @param maxExtension the maximum interval in extension direction this segment part will span - * @param cell the partition cell within which this part of the edge segment lies - */ - constructor(edge:yfiles.algorithms.Edge,segmentIndex:number,direction:yfiles.layout.Direction,locationRange:yfiles.router.Interval,minExtension:yfiles.router.Interval,maxExtension:yfiles.router.Interval,cell:yfiles.router.PartitionCell); - /** - * Gets the direction to which the segment of this info points. - * @type {yfiles.layout.Direction} - */ - direction:yfiles.layout.Direction; - /** - * Gets the {@link yfiles.router.PartitionCell partition cell} within which this part of the edge segment lies. - * @type {yfiles.router.PartitionCell} - */ - cell:yfiles.router.PartitionCell; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.CellSegmentInfo; - } - /** - * This class describes a channel, i.e., a set of vertical or horizontal edge segments whose locations depend on each - * other. - *

- * Channels are used by the {@link yfiles.router.ChannelBasedPathRouting} to route edges using - * {@link yfiles.router.SegmentInfo}s describing their path. - *

- * @class - */ - export interface Channel extends yfiles.lang.Object{} - export class Channel { - /** - * Creates a new {@link yfiles.router.Channel} that contains the given {@link yfiles.router.SegmentInfo segment info}. - * @param segment the given segment info for which the {@link } is created - * @throws {Stubs.Exceptions.ArgumentError} if the given segment has a different orientation than the other segments already contained in the channel - */ - constructor(segment:yfiles.router.SegmentInfo); - /** - * Adds a new {@link yfiles.router.SegmentInfo segment info} to the {@link yfiles.router.Channel channel}. - * @param segment the segment info to be added to this channel - * @throws {Stubs.Exceptions.ArgumentError} if the given segment has a different orientation than the other segments already contained in the channel - */ - addSegment(segment:yfiles.router.SegmentInfo):void; - /** - * Adds a {@link yfiles.router.SegmentGroup segment group} to this {@link yfiles.router.Channel channel}. - * @param group the segment group to be added - */ - addSegmentGroup(group:yfiles.router.SegmentGroup):void; - /** - * Returns the current location that the given {@link yfiles.router.SegmentInfo segment info} has been assigned within its {@link yfiles.router.SegmentInfoBase#locationRange location range}. - * @param segmentInfo the segment info for which the current location will be returned - * @returns the current location of the segment info or {@link #NaN} if no location has been assigned before - * @see yfiles.router.Channel#setCurrentLocation - */ - getCurrentLocation(segmentInfo:yfiles.router.SegmentInfo):number; - /** - * Returns the {@link yfiles.router.SegmentInfo segment info} with the given index in the list of segments of this {@link yfiles.router.Channel channel}. - * @param index the index of the segment in the list of segments - * @returns the {@link segment info} with the given index in the list of segments - */ - getSegment(index:number):yfiles.router.SegmentInfo; - /** - * Returns the {@link yfiles.router.SegmentGroup segment group} with the given index in this {@link yfiles.router.Channel channel}. - * @param index the index of the segment group - * @returns the {@link segment group} with the given index in this channel - */ - getSegmentGroup(index:number):yfiles.router.SegmentGroup; - /** - * Returns the number of {@link yfiles.router.SegmentInfo segment infos} in this channel. - * @returns the number of segment infos in this channel - */ - segmentCount():number; - /** - * Returns the number of {@link yfiles.router.SegmentGroup segment groups} in this {@link yfiles.router.Channel channel}. - * @returns the number of segment groups in this channel - */ - segmentGroupCount():number; - /** - * Specifies the current location that the given {@link yfiles.router.SegmentInfo segment info} has been assigned within its {@link yfiles.router.SegmentInfoBase#locationRange location range}. - *

- * During the distribution of the segments in the channel, different locations can be assigned but only the last one is - * finally assigned to the {@link yfiles.router.SegmentInfo segment info}. - *

- * @param segmentInfo the segment info for which the current location will be set - * @param location the location of the segment info within its location range - * @see yfiles.router.SegmentInfoBase#location - */ - setCurrentLocation(segmentInfo:yfiles.router.SegmentInfo,location:number):void; - /** - * Gets an {@link yfiles.router.Interval interval} spanning the union of the location ranges of the {@link yfiles.router.SegmentInfo segment infos}. - * @see yfiles.router.SegmentInfoBase#locationRange - * @type {yfiles.router.Interval} - */ - widthInterval:yfiles.router.Interval; - /** - * Gets an {@link yfiles.router.Interval interval} spanning the union of the maximum extension of the {@link yfiles.router.SegmentInfo segment infos}. - * @see yfiles.router.SegmentInfoBase#maxExtension - * @type {yfiles.router.Interval} - */ - lengthInterval:yfiles.router.Interval; - /** - * Gets whether or not the segments in this {@link yfiles.router.Channel channel} are vertical. - * @type {boolean} - */ - vertical:boolean; - /** - * Gets the bounds of this {@link yfiles.router.Channel channel}. - *

- * These bounds are determined by the channel's {@link yfiles.router.Channel#widthInterval width} and {@link yfiles.router.Channel#lengthInterval length}. - *

- * @see yfiles.router.Channel#widthInterval - * @see yfiles.router.Channel#lengthInterval - * @type {yfiles.algorithms.YRectangle} - */ - bounds:yfiles.algorithms.YRectangle; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.Channel; - } - /** - * This class routes edges using their pre-calculated {@link yfiles.router.Path} information. - *

- * The concept of this algorithm is to bundle edge {@link yfiles.router.SegmentInfo segment}s into so-called {@link yfiles.router.Channel}s and route each {@link yfiles.router.Channel} - * individually. - *

- *

- * This class is initialized using {@link yfiles.router.ChannelBasedPathRouting#initialize} which must have been called before the - * edges are {@link yfiles.router.ChannelBasedPathRouting#route routed}. - *

- *

- * After a {@link yfiles.router.ChannelBasedPathRouting} instance is no longer in use, the {@link yfiles.router.Channel} information and - * the reference to the {@link yfiles.router.PathSearchConfiguration configuration} must be reset using method {@link yfiles.router.ChannelBasedPathRouting#cleanup}. - *

- * @see yfiles.router.EdgeInfo#getSegmentInfo - * @see yfiles.layout.LayoutGraph#setPath - * @class - */ - export interface ChannelBasedPathRouting extends yfiles.lang.Object{} - export class ChannelBasedPathRouting { - /** - * Creates a new instance of {@link yfiles.router.ChannelBasedPathRouting}. - */ - constructor(); - /** - * Adjusts the location assigned to a {@link yfiles.router.SegmentInfo segment info} in the {@link yfiles.router.Channel channel} considering the preferred alignment of the segment. - *

- * This method is called after the segments have been distributed in the channel but before the final locations of the - * segments are assigned to the {@link yfiles.router.SegmentInfo segment info}s. - *

- * @param channel the channel that contains the segment infos for which the alignment should be considered - * @see yfiles.router.Channel#getCurrentLocation - * @see yfiles.router.SegmentInfoBase#preferredAlignment - * @protected - */ - adjustSegmentLocations(channel:yfiles.router.Channel):void; - /** - * Calculates the locations of the {@link yfiles.router.SegmentInfo segment infos} in the given {@link yfiles.router.Channel channel}. - *

- * This method is called after the order of the {@link yfiles.router.SegmentInfo segment infos} within a channel has been {@link yfiles.router.ChannelBasedPathRouting#optimizeSegmentOrder optimized}. - *

- * @param channel the channel that contains the segment infos for which the locations will be calculated - * @see yfiles.router.Channel#setCurrentLocation - * @protected - */ - calculateSegmentLocations(channel:yfiles.router.Channel):void; - /** - * Resets all {@link yfiles.router.Channel channel} information and the reference to the {@link yfiles.router.PathSearchConfiguration configuration}. - *

- * Afterwards, {@link yfiles.router.ChannelBasedPathRouting} is ready to calculate paths for a new layout. - *

- */ - cleanup():void; - /** - * Creates a {@link yfiles.collections.IComparer. comparator} for sorting the {@link yfiles.router.SegmentInfo}s in a {@link yfiles.router.Channel} from left to right (for - * vertical segments) or top to bottom (for horizontal segments), respectively. - *

- * This method is called in {@link yfiles.router.ChannelBasedPathRouting#route} before edge segments are distributed within the - * channels. - *

- * @param channels the channels whose segments will be sorted by the {@link comparator} - * @param pathSearchResult the {@link path search result} containing the {@link }s with the - * {@link }s for which the comparator will be used - * @param configuration the {@link configuration} used during this path search - * @returns a {@link comparator} used for sorting the {@link }s in a {@link channel} - * @protected - */ - createSegmentInfoComparer(channels:yfiles.algorithms.YList,pathSearchResult:yfiles.router.PathSearchResult,configuration:yfiles.router.PathSearchConfiguration):yfiles.collections.IComparer; - /** - * Initializes this {@link yfiles.router.ChannelBasedPathRouting} instance for routing paths that have been found with the given - * {@link yfiles.router.PathSearchConfiguration configuration}. - *

- * This method must be called before the edges are {@link yfiles.router.ChannelBasedPathRouting#route routed}. - *

- * @param configuration the {@link configuration} used for the following path routing - * @see yfiles.router.ChannelBasedPathRouting#route - */ - initialize(configuration:yfiles.router.PathSearchConfiguration):void; - /** - * Optimizes the order of the {@link yfiles.router.SegmentInfo segments} in the given {@link yfiles.router.Channel channel}. - *

- * After the segments in the channel have been sorted using the comparator created by method - * {@link yfiles.router.ChannelBasedPathRouting#createSegmentInfoComparer}, segments having a common {@link yfiles.router.SegmentGroup} are - * replaced by their common {@link yfiles.router.SegmentGroup#commonSegmentInfo representative segment info}. - *

- *

- * This method further improves the order of the resulting segment info list to make sure that the subsequent {@link yfiles.router.ChannelBasedPathRouting#calculateSegmentLocations location calculation} - * is able to respect the {@link yfiles.router.SegmentInfoBase#locationRange location ranges} of the - * {@link yfiles.router.SegmentInfo}s and, if possible, the minimum edge to edge distances and possible grid constraints for the - * segments. - *

- * @param channel the channel for which the order of the {@link }s is optimized - * @protected - */ - optimizeSegmentOrder(channel:yfiles.router.Channel):void; - /** - * Routes the given edges. - *

- * Before calling this method, method {@link yfiles.router.ChannelBasedPathRouting#initialize} must have been called. - *

- *

- * As a first step, the {@link yfiles.router.SegmentInfo}s of all edge paths are distributed to {@link yfiles.router.Channel}s. After that, - * the segments in each of these - * {@link yfiles.router.Channel}s are sorted and locations are assigned respecting the segments' location ranges by calling the - * subsequent methods: - *

- *
    - *
  1. {@link yfiles.router.ChannelBasedPathRouting#optimizeSegmentOrder}
  2. - *
  3. {@link yfiles.router.ChannelBasedPathRouting#calculateSegmentLocations}
  4. - *
  5. {@link yfiles.router.ChannelBasedPathRouting#adjustSegmentLocations}
  6. - *
- *

- * Finally, the control points for the paths are calculated. - *

- * @param edges the {@link list of edges} to be routed - * @param pathSearchResult the {@link path search result} containing the {@link } objects for the edges - * @throws {Stubs.Exceptions.InvalidOperationError} if the locations are not within the segment's location range - * @see yfiles.router.PathSearchResult#getPath - * @see yfiles.router.SegmentInfoBase#locationRange - * @see yfiles.router.SegmentInfoBase#location - */ - route(edges:yfiles.algorithms.EdgeList,pathSearchResult:yfiles.router.PathSearchResult):void; - /** - * Sorts the given list of {@link yfiles.router.SegmentInfo}s using the given {@link yfiles.collections.IComparer. comparator}. - *

- * This method is called in {@link yfiles.router.ChannelBasedPathRouting#route} when the edge segments are distributed within the - * channels. - *

- * @param segmentInfos the list of {@link }s to be sorted - * @param segmentInfoComparer the comparator used for sorting the list of {@link }s - * @protected - */ - sortSegmentInfos(segmentInfos:yfiles.collections.IList,segmentInfoComparer:yfiles.collections.IComparer):void; - /** - * Gets the {@link yfiles.router.PathSearchConfiguration path search configuration} with which the {@link yfiles.router.ChannelBasedPathRouting} has been {@link yfiles.router.ChannelBasedPathRouting#initialize initialized}. - * @see yfiles.router.ChannelBasedPathRouting#initialize - * @protected - * @type {yfiles.router.PathSearchConfiguration} - */ - configuration:yfiles.router.PathSearchConfiguration; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.ChannelBasedPathRouting; - } - /** - * This class describes an {@link yfiles.router.IObstaclePartition} that decomposes its area dynamically. - *

- * The partitioning strategy is based on binary space partitioning. It divides the partition space recursively in two {@link yfiles.router.PartitionCell cells} - * until each cell is completely covered by one or more {@link yfiles.router.Obstacle}s or completely empty. - *

- * @class - * @implements {yfiles.router.IObstaclePartition} - * @implements {yfiles.router.IDynamicDecomposition} - */ - export interface DynamicObstacleDecomposition extends yfiles.lang.Object,yfiles.router.IObstaclePartition,yfiles.router.IDynamicDecomposition{} - export class DynamicObstacleDecomposition { - /** - * Constructs a new instance of {@link yfiles.router.DynamicObstacleDecomposition}. - */ - constructor(); - /** - * Adds the given {@link yfiles.router.IDecompositionListener dynamic decomposition listener} to receive {@link yfiles.router.PartitionCell} subdivision and creation events - * from this decomposition. - *

- * These events occur when the decomposition changes the partition by subdividing cells into sub-cells or when new cells - * are created. - *

- * @param listener the dynamic decomposition listener to add - * @see yfiles.router.IDecompositionListener - */ - addDynamicDecompositionListener(listener:yfiles.router.IDecompositionListener):void; - /** - * Clears the partition data such that the {@link yfiles.router.DynamicObstacleDecomposition} can be reused and {@link yfiles.router.DynamicObstacleDecomposition#init initialized} with - * new {@link yfiles.router.Obstacle}s. - * @see yfiles.router.DynamicObstacleDecomposition#init - */ - clear():void; - /** - * Notifies all registered {@link yfiles.router.IDecompositionListener dynamic decomposition listeners} that the given {@link yfiles.router.PartitionCell partition cell} has been created. - *

- * This method is also called in {@link yfiles.router.DynamicObstacleDecomposition#init}. - *

- * @param createdCell the newly created cell - * @see yfiles.router.IDecompositionListener - * @protected - */ - fireCreateCellEvent(createdCell:yfiles.router.PartitionCell):void; - /** - * Notifies all registered {@link yfiles.router.IDecompositionListener dynamic decomposition listeners} that the given {@link yfiles.router.PartitionCell partition cell} has been finalized. - * @param finalizedCell the cell that has been finalized - * @see yfiles.router.IDecompositionListener - * @protected - */ - fireFinalizeCellEvent(finalizedCell:yfiles.router.PartitionCell):void; - /** - * Notifies all registered {@link yfiles.router.IDecompositionListener dynamic decomposition listeners} of a subdivision of a given {@link yfiles.router.PartitionCell partition cell}. - * @param cell the cell that has been subdivided - * @param subCells the new sub-cells resulting from the subdivision of the given cell - * @see yfiles.router.IDecompositionListener - * @protected - */ - fireSubdividedEvent(cell:yfiles.router.PartitionCell,subCells:yfiles.collections.IList):void; - /** - * Returns a list of all {@link yfiles.router.PartitionCell}s that intersect or cover the given rectangle. - * @param rect the rectangular area whose (partially) covered cells will be returned - * @returns a list of {@link }s that (partially) cover the given rectangular area - */ - getCells(rect:yfiles.algorithms.YRectangle):yfiles.collections.IList; - /** - * Returns all {@link yfiles.router.PartitionCell partition cells} that are completely covered by the given {@link yfiles.router.Obstacle}. - * @param obstacle the obstacle for which the covered cells will be returned - * @returns an unmodifiable list of {@link } instances that are completely covered by the given obstacle - */ - getCellsForObstacle(obstacle:yfiles.router.Obstacle):yfiles.collections.IList; - /** - * Calculates the cost of a cut with respect to the geometry of the sub-cells. - *

- * The cost can take values between 0 and 1. - *

- *

- * This method is called while a {@link yfiles.router.PartitionCell} is divided into upper and lower or left and right child cells - * depending on the cut costs (during {@link yfiles.router.DynamicObstacleDecomposition#getCellsForObstacle}, {@link yfiles.router.DynamicObstacleDecomposition#getCells} - * and {@link yfiles.router.DynamicObstacleDecomposition#getNeighbors} methods). - *

- * @param cut the coordinate of the cut - * @param min the left side of the subdivided cell - * @param max the right side of the subdivided cell - * @param orthogonalMin the upper side of the subdivided cell - * @param orthogonalMax the lower side of the subdivided cell - * @returns the cost of a cut with respect to the geometry of the sub-cells - * @protected - */ - getGeometricCutCosts(cut:number,min:number,max:number,orthogonalMin:number,orthogonalMax:number):number; - /** - * Returns the neighbor {@link yfiles.router.PartitionCell partition cells} of the given cell. - * @param cell the cell whose neighbors will be returned - * @returns the neighbor cells of the given cell - */ - getNeighbors(cell:yfiles.router.PartitionCell):yfiles.collections.IList; - /** - * Calculates the cost of a cut with respect to the subdivided obstacles. - *

- * The cost can take values between 0 and 1. - *

- *

- * This method is called while a {@link yfiles.router.PartitionCell} is divided into upper and lower or left and right child cells - * depending on the cut costs (during {@link yfiles.router.DynamicObstacleDecomposition#getCellsForObstacle}, {@link yfiles.router.DynamicObstacleDecomposition#getCells} - * and {@link yfiles.router.DynamicObstacleDecomposition#getNeighbors} methods). - *

- * @param numObstaclesInFirstHalf the number of obstacles that lie completely in the first half - * @param numObstaclesInSecondHalf the number of obstacles that lie completely in the second half - * @param numObstaclesOnCut the number of obstacles that lie on the cut - * @returns the cost of a cut with respect to the subdivided obstacles - * @protected - */ - getObstacleCutCosts(numObstaclesInFirstHalf:number,numObstaclesInSecondHalf:number,numObstaclesOnCut:number):number; - /** - * Returns all {@link yfiles.router.Obstacle}s that cover the given {@link yfiles.router.PartitionCell partition cell}. - * @param cell the partition cell for which the obstacles will be returned - * @returns an unmodifiable list of {@link } instances that cover the given cell - */ - getObstacles(cell:yfiles.router.PartitionCell):yfiles.collections.IList; - /** - * Initializes this {@link yfiles.router.DynamicObstacleDecomposition} instance with the given obstacles and partition bounds. - *

- * This method must be called before any other method is invoked. - *

- * @param obstacles a list of {@link } objects - * @param partitionBounds the bounds of the partition - */ - init(obstacles:yfiles.collections.IList,partitionBounds:yfiles.algorithms.YRectangle):void; - /** - * Removes the given {@link yfiles.router.IDecompositionListener dynamic decomposition listener} such that it no longer receives {@link yfiles.router.PartitionCell} subdivision - * and creation events from this decomposition. - * @param listener the dynamic decomposition listener to remove - * @see yfiles.router.IDecompositionListener - */ - removeDynamicDecompositionListener(listener:yfiles.router.IDecompositionListener):void; - /** - * Gets or sets the costs incurred for every {@link yfiles.router.Obstacle} that must be cut in a subdivision. - *

- * Values need to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the cost is negative - * @type {number} - */ - cutObstacleCost:number; - /** - * Gets or sets the costs incurred if the distribution after a subdivision of obstacles is unbalanced in sub-cells. - *

- * Values need to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the cost is negative - * @type {number} - */ - unbalancedObstaclesCost:number; - /** - * Gets or sets the costs incurred if the subdivision produces unbalanced rectangles. - *

- * Values need to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the cost is negative - * @type {number} - */ - unbalancedRatioCost:number; - /** - * Gets the bounds of the original rectangular area that is being partitioned. - * @type {yfiles.algorithms.YRectangle} - */ - bounds:yfiles.algorithms.YRectangle; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.DynamicObstacleDecomposition; - } - /** - * This class encapsulates the information that determines the route of a specific edge within a specific {@link yfiles.router.PartitionCell partition cell}. - * @class - */ - export interface EdgeCellInfo extends yfiles.lang.Object{} - export class EdgeCellInfo { - /** - * Creates a new {@link yfiles.router.EdgeCellInfo} instance. - * @param edge the edge whose routing in the cell is described - * @param cell the cell in which the edge is routed - * @param enterInterval the interval that the edge uses to enter the cell - * @param exitInterval the interval that the edge uses to exit the cell - * @param enterDirection the direction in which the edge enters the cell - * @param exitDirection the direction in which the edge exits the cell - * @param enterSegmentNo the index of the edge segment that enters the cell - */ - constructor(edge:yfiles.algorithms.Edge,cell:yfiles.router.PartitionCell,enterInterval:yfiles.router.OrthogonalInterval,exitInterval:yfiles.router.OrthogonalInterval,enterDirection:yfiles.layout.Direction,exitDirection:yfiles.layout.Direction,enterSegmentNo:number); - /** - * Gets the number of bends of the edge within this cell. - * @type {number} - */ - bendCount:number; - /** - * Gets the routing type of the edge within this cell. - * @type {yfiles.router.RoutingType} - */ - type:yfiles.router.RoutingType; - /** - * Gets or sets the index of the edge segment that enters this cell. - *

- * Values should be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given index is negative - * @type {number} - */ - enterSegmentIndex:number; - /** - * Gets or sets the index of the edge segment that exits this cell. - *

- * Values should be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given index is negative - * @type {number} - */ - exitSegmentIndex:number; - /** - * Gets or sets the {@link yfiles.router.SegmentGroup segment group} containing the entering segment. - *

- * When specifying the segment group, the {@link yfiles.router.EdgeCellInfo#enterInterval enter interval} is updated to use the segment group's common enter interval. - *

- * @see yfiles.router.SegmentGroup#commonLocationRange - * @type {yfiles.router.SegmentGroup} - */ - enterSegmentGroup:yfiles.router.SegmentGroup; - /** - * Gets or sets the {@link yfiles.router.SegmentGroup segment group} containing the exiting segment. - *

- * When specifying the segment group, the {@link yfiles.router.EdgeCellInfo#exitInterval exit interval} is updated to use the segment group's common exit interval. - *

- * @see yfiles.router.SegmentGroup#commonLocationRange - * @type {yfiles.router.SegmentGroup} - */ - exitSegmentGroup:yfiles.router.SegmentGroup; - /** - * Gets the edge that is routed within the {@link yfiles.router.EdgeCellInfo#cell partition cell}. - * @type {yfiles.algorithms.Edge} - */ - edge:yfiles.algorithms.Edge; - /** - * Gets the {@link yfiles.router.PartitionCell partition cell} within which the edge is routed. - * @type {yfiles.router.PartitionCell} - */ - cell:yfiles.router.PartitionCell; - /** - * Gets the {@link yfiles.router.OrthogonalInterval interval} that the edge uses to enter this cell. - * @type {yfiles.router.OrthogonalInterval} - */ - enterInterval:yfiles.router.OrthogonalInterval; - /** - * Gets the {@link yfiles.router.OrthogonalInterval interval} that the edge uses to exit this cell. - * @type {yfiles.router.OrthogonalInterval} - */ - exitInterval:yfiles.router.OrthogonalInterval; - /** - * Gets the {@link yfiles.layout.Direction direction} in which the edge enters this cell. - * @type {yfiles.layout.Direction} - */ - enterDirection:yfiles.layout.Direction; - /** - * Gets the {@link yfiles.layout.Direction direction} in which the edge exits this cell. - * @type {yfiles.layout.Direction} - */ - exitDirection:yfiles.layout.Direction; - /** - * Calculates the list of {@link yfiles.router.CellSegmentInfo}s for the segment parts of this edge that lie within the associated - * {@link yfiles.router.EdgeCellInfo#cell partition cell}. - * @type {yfiles.algorithms.YList} - */ - cellSegmentInfos:yfiles.algorithms.YList; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.EdgeCellInfo; - } - /** - * This class encapsulates the information required to route an edge with a path routing algorithm. - * @see yfiles.router.ChannelBasedPathRouting - * @class - */ - export interface EdgeInfo extends yfiles.lang.Object{} - export class EdgeInfo { - /** - * Creates a new {@link yfiles.router.EdgeInfo} instance. - * @param path the path that will be used for routing the edge - * @param configuration the {@link configuration} of the path search algorithm - */ - constructor(path:yfiles.router.Path,configuration:yfiles.router.PathSearchConfiguration); - /** - * Calculates an array of {@link yfiles.algorithms.LineSegment}s created by the {@link yfiles.router.EdgeInfo#calculatePathPoints calculated path points}. - * @returns an array of {@link }s created by the calculated path points - */ - calculateLineSegments():yfiles.algorithms.LineSegment[]; - /** - * Calculates a list of {@link yfiles.algorithms.YPoint}s containing the source port, bend and target port locations. - * @returns a list of {@link }s containing the source port, bend and target port locations - */ - calculatePathPoints():yfiles.algorithms.YList; - /** - * Returns the {@link yfiles.router.EdgeCellInfo} of the given {@link yfiles.router.CellEntrance} in the path. - * @param entrance the entrance for which the {@link } will be returned - * @returns the {@link } of the given {@link } in the path - */ - getEdgeCellInfo(entrance:yfiles.router.CellEntrance):yfiles.router.EdgeCellInfo; - /** - * Returns the {@link yfiles.router.SegmentInfo} of the segment following the segment of the given {@link yfiles.router.SegmentInfo}. - * @param segment the segment info for which the next segment info will be returned - * @returns the segment info of the segment following the segment of the given segment info - */ - getNextSegment(segment:yfiles.router.SegmentInfo):yfiles.router.SegmentInfo; - /** - * Returns the {@link yfiles.router.SegmentInfo} of the segment preceding the segment of the given {@link yfiles.router.SegmentInfo}. - * @param segment the segment info for which the previous segment info will be returned - * @returns the segment info of the segment preceding the segment of the given segment info - */ - getPreviousSegment(segment:yfiles.router.SegmentInfo):yfiles.router.SegmentInfo; - /** - * Returns the {@link yfiles.router.SegmentInfo} of the edge segment with the given index. - * @param segmentIndex the index of the edge segment for which the segment info will be returned - * @returns the {@link } of the edge segment with the given index - */ - getSegmentInfo(segmentIndex:number):yfiles.router.SegmentInfo; - /** - * Returns the number of segments of the edge. - * @returns the number of segments of the edge - */ - segmentCount():number; - /** - * Gets whether the path of this {@link yfiles.router.EdgeInfo#edge edge} is fixed or should be routed by the path search algorithm. - * @type {boolean} - */ - fixed:boolean; - /** - * Gets the edge whose route is described by this {@link yfiles.router.EdgeInfo} instance. - * @type {yfiles.algorithms.Edge} - */ - edge:yfiles.algorithms.Edge; - /** - * Gets a list of {@link yfiles.router.EdgeCellInfo}s describing how the edge traverses each {@link yfiles.router.PartitionCell} on its - * path. - * @type {yfiles.collections.IList.} - */ - edgeCellInfos:yfiles.collections.IList; - /** - * Gets or sets the location of the strong source port that the edge uses. - *

- * Defining a new strong source port also updates the first {@link yfiles.router.SegmentInfo} to use this fixed port location. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the first segment is already fixed and the given port location contradicts the segment's fixed location - * @see yfiles.router.SegmentInfoBase#location - * @see yfiles.router.SegmentInfo#atStrongPortConstraint - * @type {yfiles.algorithms.YPoint} - */ - strongSourcePort:yfiles.algorithms.YPoint; - /** - * Gets or sets the location of the strong target port that the edge uses. - *

- * Defining a new strong target port also updates the last {@link yfiles.router.SegmentInfo} to use this fixed port location. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the last segment is already fixed and the given port location contradicts the segment's fixed location - * @see yfiles.router.SegmentInfoBase#location - * @see yfiles.router.SegmentInfo#atStrongPortConstraint - * @type {yfiles.algorithms.YPoint} - */ - strongTargetPort:yfiles.algorithms.YPoint; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.EdgeInfo; - } - /** - * This class is used by {@link yfiles.router.EdgeRouter} to provide routing details for the edges of the graph. - *

- * An {@link yfiles.router.EdgeLayoutDescriptor} instance can be specified individually for single edges using a {@link yfiles.algorithms.IDataProvider} - * that returns an {@link yfiles.router.EdgeLayoutDescriptor} instance for each edge of the graph, or null if no {@link yfiles.router.EdgeLayoutDescriptor} - * is bound to an edge. The {@link yfiles.algorithms.IDataProvider} is registered with the graph using key - * {@link yfiles.router.EdgeRouter#EDGE_LAYOUT_DESCRIPTOR_DP_KEY}. - *

- *

- * This class is designed such that it allows future additions of new getter methods. - *

- * @see yfiles.router.EdgeRouter#EDGE_LAYOUT_DESCRIPTOR_DP_KEY - * @class - */ - export interface EdgeLayoutDescriptor extends yfiles.lang.Object{} - export class EdgeLayoutDescriptor { - /** - * Creates a new instance of an {@link yfiles.router.EdgeLayoutDescriptor} with the default settings. - */ - constructor(); - /** - * Creates a copy of this {@link yfiles.router.EdgeLayoutDescriptor} instance. - * @returns a copy of this {@link } instance - */ - createCopy():yfiles.router.EdgeLayoutDescriptor; - /** - * Gets or sets the minimum length of the first segment of the edge path (at the source node). - *

- * The minimum length should be greater than or equal to 0. If a negative value is given as input, the default value, i.e., - * 5.0, will be used instead. - *

- * @type {number} - */ - minimumFirstSegmentLength:number; - /** - * Gets or sets the minimum length of the last segment of the edge path (at the target node). - *

- * The minimum length should be greater than or equal to 0. If a negative value is given as input, the default value, i.e., - * 10.0, will be used instead. - *

- * @type {number} - */ - minimumLastSegmentLength:number; - /** - * Gets or sets the minimum distance between a pair of edges. - *

- * The minimum distance should be greater than or equal to 0. If a negative value is given as input, the default value, - * i.e., 3.0, will be used instead. - *

- * @type {number} - */ - minimumEdgeToEdgeDistance:number; - /** - * Gets or sets the minimum distance that the edge should maintain from node corners when entering or leaving the node. - *

- * The minimum distance should be greater than or equal to 0. If a negative value is given as input, the default value, - * i.e., 3.0, will be used instead. - *

- * @type {number} - */ - minimumNodeCornerDistance:number; - /** - * Gets or sets the monotonic path restrictions that should be applied. - *

- * Monotonic path restrictions imply that (ideally) the vertical and/or horizontal segments of an edge path are directed - * from the source node towards the target node without ever changing their direction back towards the source node. - *

- *

- * If an unknown restriction is specified, {@link yfiles.router.MonotonicPathRestriction#NONE} will be used instead. - *

- * @type {yfiles.router.MonotonicPathRestriction} - */ - monotonicPathRestriction:yfiles.router.MonotonicPathRestriction; - /** - * Gets or sets the {@link yfiles.router.PenaltySettings} used for this edge. - *

- * Besides specifying a completely customized setting, the user can choose between four predefined optimization strategies: - * {@link yfiles.router.PenaltySettings#OPTIMIZATION_BALANCED}, {@link yfiles.router.PenaltySettings#OPTIMIZATION_EDGE_BENDS}, {@link yfiles.router.PenaltySettings#OPTIMIZATION_EDGE_CROSSINGS} - * and {@link yfiles.router.PenaltySettings#OPTIMIZATION_EDGE_LENGTHS}. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given penalty settings are null - * @see yfiles.router.PenaltySettings#OPTIMIZATION_BALANCED - * @see yfiles.router.PenaltySettings#OPTIMIZATION_EDGE_BENDS - * @see yfiles.router.PenaltySettings#OPTIMIZATION_EDGE_CROSSINGS - * @see yfiles.router.PenaltySettings#OPTIMIZATION_EDGE_LENGTHS - * @type {yfiles.router.PenaltySettings} - */ - penaltySettings:yfiles.router.PenaltySettings; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.EdgeLayoutDescriptor; - } - /** - * This edge routing algorithm applies polyline routes to the edges of the graph. - *

- * Layout Style Edges are normally routed in an orthogonal fashion, i.e., they only consist of horizontal and vertical segments. There - * is also a {@link yfiles.router.EdgeRouter#polylineRouting routing style} in which, between horizontal and vertical segments, additional segments with other slopes are - * inserted. - *

- *

- * During the routing process, the positions of the nodes are considered to be fixed and the routing algorithm will not - * modify their locations or their sizes in any way. - *

- *

- * The edge routing algorithm can be applied wherever it is needed to route the edges as polyline or orthogonal segments - * without crossing any nodes, while keeping the positions of the nodes in the diagram fixed. Some potential applications - * include electric circuit design, floor planning and navigation maps. - *

- *

- * {@graph {"ann":{"s":[80,100],"d":1},"n":[[217.75,668.75],[447.12,732.5,135,30],[582,230.25],[582,530.75],[738,668.75],[497.5,372],[770.38,245.25,30,70],[674,419.5],[447.12,525.12,30,30],[357.12,253.38,30,82.5],[369.62,441.38,30,60]],"e":[[0,1,40,28.75,-67.5,0],[0,2,-9.25,-50,-40,-41.94,[248.5,238.31]],[1,3,67.5,-6,3.56,50,[625.56,741.5]],[0,4,40,-8.94,-40,-8.94],[1,4,67.5,6,-40,34.75],[0,5,27.75,-50,-40,-4.72,[285.5,417.28]],[0,6,-27.75,-50,0,-35,[230,220.25,785.38,220.25]],[4,6,7.38,-50,0,35],[2,6,40,0,-15,0],[5,7,40,44.95,-40,-2.55],[4,7,-32,-50,32,50],[7,2,-40,-17.6,19.12,50,[641.12,451.9]],[0,8,40,-34.31,0,15,[462.12,684.44]],[0,9,9.25,-50,-15,0,[267,294.62]],[5,9,-40,-32.91,0,41.25,[372.12,389.09]],[9,2,15,-2.81,-40,11.56],[10,8,15,21.54,0,-15,[462.12,492.92]],[10,3,15,10.62,-16.62,-50,[605.38,482]],[10,5,15,-19.48,-40,29.9]],"vp":[217.0,220.0,601.0,549.0]}} Sample output of the edge routing algorithm with default settings {@graph {"ann":{"s":[80,100],"d":1},"n":[[-80.25,263.5,30,30],[-309.62,407.12],[-170.25,-8.25,30,82.5],[-80.25,470.88,135,30],[54.62,-31.38],[54.62,269.12],[-157.75,179.75,30,60],[210.62,407.12],[-29.88,110.38],[243,-16.38,30,70],[146.62,157.88]],"e":[[1,0,40,28.75,-15,0,[-207.88,485.88,-199.94,477.94,-199.94,300.94,-177.5,278.5]],[1,2,40,28.75,-6,41.25,[-207.88,485.88,-199.94,477.94,-199.94,152.94,-188.56,141.56,-172.56,141.56,-161.25,130.25]],[1,3,40,28.75,-67.5,0],[1,4,40,28.75,0,-50,[-207.88,485.88,-199.94,477.94,-199.94,-19.06,-177.62,-41.38,94.62,-41.38]],[2,4,15,-2.81,-40,11.56],[3,5,67.5,0,3.56,50,[86.12,485.88,98.19,473.81]],[6,0,15,-14.69,0,-15,[-80.94,195.06,-65.25,210.75]],[6,5,15,-14.69,-18.5,-50,[-80.94,195.06,-65.25,210.75,-65.25,233.75,-49.25,249.75,70.75,249.75,76.12,255.12]],[1,7,40,28.75,34.69,-50,[-207.88,485.88,-199.94,477.94,-199.94,-19.06,-177.62,-41.38,268.62,-41.38,285.31,-24.69]],[3,7,67.5,0,-40,28.75],[6,8,15,-14.69,-40,34.69],[1,8,40,28.75,-40,-18.81,[-207.88,485.88,-199.94,477.94,-199.94,152.94,-188.56,141.56]],[8,2,40,47,6,41.25,[60.12,207.38,60.12,100.12,52.31,92.31,-144.69,92.31,-149.25,87.75]],[1,9,40,28.75,0,-35,[-207.88,485.88,-199.94,477.94,-199.94,-19.06,-177.62,-41.38,250.62,-41.38,258,-34]],[7,9,-32,-50,0,35,[218.62,334.38,229.5,323.5,246.5,323.5,258,312]],[4,9,40,0,-15,0],[8,10,40,47,-40,-0.5],[7,10,-32,-50,32,50],[10,4,-40,-29.22,18.5,50,[122.65,178.65,113.12,169.12]]],"vp":[-310.0,-42.0,601.0,550.0]}} Sample output of the edge routing algorithm with - * polyline routing and grouped edges {@graph {"ann":{"s":[80,100],"d":1},"n":[[556.12,477.62],[648.12,366.38],[471.62,318.88],[316.25,181.25,150,335.75,2],[421.25,472,30,30],[331.25,200.25,30,82.5],[343.75,388.25,30,60],[191.88,615.62],[421.25,679.38,135,30],[712.12,615.62],[541.12,158.12,248.38,134,2],[556.12,177.12],[744.5,192.12,30,70]],"e":[[2,1,40,36.2,-40,-11.3],[2,5,-7.94,-50,15,19.12,[503.69,277.69,486.62,260.62]],[6,4,15,21.54,0,-15,[426.79,439.79,436.25,449.25]],[6,0,15,10.62,-16.62,-50,[564.88,428.88,579.5,443.5]],[6,2,15,-14.69,-40,34.69],[7,4,40,-38.54,0,15,[413.92,627.08,436.25,604.75]],[7,2,40,-21.62,-0.44,50,[489,644,511.19,621.81]],[7,5,24.67,-50,-15,0,[256.54,263.46,278.5,241.5]],[7,8,40,28.75,-67.5,0],[8,0,67.5,-6,3.56,50,[587.62,688.38,599.69,676.31]],[7,9,40,-4.71,-40,-4.71],[8,9,67.5,6,-40,34.75],[9,1,-32,-50,32,50],[7,11,0,-50,0,-50,[231.88,189.12,253.88,167.12,596.12,167.12]],[5,11,15,-19.12,-40,-4.75],[1,11,-40,-35.1,19.12,50,[624.27,381.27,615.25,372.25]],[7,12,-24.67,-50,0,-35,[207.21,186.79,229.87,164.12,751.12,164.12,759.5,172.5]],[9,12,7.38,-50,0,35],[11,12,40,0,-15,0]],"vp":[191.0,158.0,602.0,558.0]}} Sample output of the edge routing algorithm with polyline routing and group - * nodesConceptThe edge routing algorithm basically performs three (four) steps to achieve an orthogonal (polyline) edge routing. - *

- *
    - *
  1. Creating a {@link yfiles.router.IPartition} which divides the area of the graph area into several {@link yfiles.router.PartitionCell}s.
  2. - *
  3. Finding the shortest/cheapest paths for all edges through the {@link yfiles.router.IPartition} using {@link yfiles.router.PathSearch}.
  4. - *
  5. - * Assigning coordinates to the segments of the edges based on the paths that were calculated before with - * {@link yfiles.router.ChannelBasedPathRouting}. - *
  6. - *
  7. Inserting non-orthogonal segments where horizontal and vertical segments meet (only if {@link yfiles.router.EdgeRouter#polylineRouting polyline routing} is enabled).
  8. - *
- *

- * The first two steps are customizable. {@link yfiles.router.IGraphPartitionExtension}s are able to influence how the {@link yfiles.router.IPartition} - * is created. They add {@link yfiles.router.PartitionCell}s and/or mark them for adding costs later in the process. The currently - * used {@link yfiles.router.EdgeRouter#registeredPartitionExtensions partition extensions} can be dropped or extended by custom implementations. - *

- *

- * For example, the extension 'Node Partition' adds a {@link yfiles.router.PartitionCell} to the {@link yfiles.router.IPartition} for each - * node and marks it as belonging to a node. During {@link yfiles.router.PathSearch}, the extension 'Node Crossing' recognizes - * these - * {@link yfiles.router.PartitionCell}s and adds costs that penalizes crossing a node. The edge will be routed around the nodes. - *

- *

- * {@link yfiles.router.PathSearchExtension}s influence the {@link yfiles.router.PathSearch} by adding costs for traversing - * {@link yfiles.router.PartitionCell}s or narrowing their intervals to allow a less expensive traversal of a - * {@link yfiles.router.PartitionCell}. The currently used {@link yfiles.router.EdgeRouter#registeredPathSearchExtensions partition extensions} can be dropped or extended by custom - * implementations. - *

- *

- * Using {@link yfiles.router.EdgeLayoutDescriptor}s, it is possible to add individual layout settings like routing styles to - * edges. They are registered with the graph with key {@link yfiles.router.EdgeRouter#EDGE_LAYOUT_DESCRIPTOR_DP_KEY}. If no - * descriptor is provided for an edge, a {@link yfiles.router.EdgeRouter#defaultEdgeLayoutDescriptor default edge layout descriptor} is used as fallback value. - *

- *

- * Features - *

- *

- * The routing algorithm supports two approaches to connect edges on a specific side or even on an exact location to a - * node. {@link yfiles.layout.PortConstraint}s define a single constraint for the ports of an edge. To realize more complex port - * restrictions, several {@link yfiles.layout.PortCandidate}s or {@link yfiles.layout.PortCandidateSet}s can be assigned to edges or nodes. - * If an edge with registered {@link yfiles.layout.PortCandidate}s connects to nodes with {@link yfiles.layout.PortCandidateSet}s, the edge - * router will try to match both collections in order to find an appropriate port. In case there is no matching port - * candidate, a {@link yfiles.layout.PortCandidate} specified for the edge is preferred. Since their simultaneous existence at the - * same node may be ambiguous, it is not recommended to use a combination of {@link yfiles.layout.PortConstraint}s and - * {@link yfiles.layout.PortCandidate}s in the same diagram. - *

- *

- * Edges can be grouped so that they share common segments at the beginning or end of their routes. Although a graph may - * contain source and target grouped edges, an edge can only either be part of a source or a target group. Edge groups are - * specified using {@link yfiles.algorithms.IDataProvider}s that provide the same ID object for all edges in the same group. Those - * {@link yfiles.algorithms.IDataProvider}s are registered with the graph with key {@link yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY} - * for source groups or key {@link yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY} for target groups. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface EdgeRouter extends yfiles.layout.LayoutStageBase{} - export class EdgeRouter { - /** - * Creates a new {@link yfiles.router.EdgeRouter} instance with an optional {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [core=null] The core layout algorithm. - */ - constructor(core?:yfiles.layout.ILayoutAlgorithm); - /** - * Checks the sizes of the nodes to be non-zero. - * @param g The graph to check. - * @protected - */ - checkNodeSize(g:yfiles.layout.LayoutGraph):void; - /** - * Removes all registered {@link yfiles.router.IGraphPartitionExtension}s from a given {@link yfiles.router.GraphPartition} instance. - *

- * This method is called by {@link yfiles.router.EdgeRouter#applyLayout} after the edge routes are calculated. It may be overridden - * in order to provide a custom implementation for cleaning up a {@link yfiles.router.GraphPartition} instance. - *

- * @param partition the given {@link } instance - * @see yfiles.router.EdgeRouter#configureGraphPartition - * @see yfiles.router.EdgeRouter#registeredPartitionExtensions - * @protected - */ - cleanUpGraphPartition(partition:yfiles.router.GraphPartition):void; - /** - * Adds all registered {@link yfiles.router.IGraphPartitionExtension}s instances to a given {@link yfiles.router.GraphPartition} instance. - *

- * This method is called by {@link yfiles.router.EdgeRouter#applyLayout} before the edge routes are calculated. It may be - * overridden in order to adjust the configuration of the {@link yfiles.router.GraphPartition} instance. - *

- * @param partition the given {@link } instance - * @see yfiles.router.EdgeRouter#registeredPartitionExtensions - * @see yfiles.router.EdgeRouter#cleanUpGraphPartition - * @protected - */ - configureGraphPartition(partition:yfiles.router.GraphPartition):void; - /** - * Adds all registered {@link yfiles.router.PathSearchExtension}s to a given {@link yfiles.router.PathSearch} instance. - *

- * This method is called by {@link yfiles.router.EdgeRouter#applyLayout} before the edge routes are calculated. It may be - * overridden in order to adjust the configuration of a {@link yfiles.router.PathSearch} instance. - *

- * @param pathSearch a {@link } instance - * @see yfiles.router.EdgeRouter#createPathSearch - * @see yfiles.router.EdgeRouter#registeredPathSearchExtensions - * @protected - */ - configurePathSearch(pathSearch:yfiles.router.PathSearch):void; - /** - * Creates a {@link yfiles.router.PathSearchConfiguration} that is used during the path searching process. - *

- * This method is called by {@link yfiles.router.EdgeRouter#applyLayout} before the edge routes are calculated. It may be - * overridden in order to create a new {@link yfiles.router.PathSearchConfiguration} object with custom configuration. - *

- * @param graph the input graph - * @param grouping the grouping structure of the graph - * @returns a {@link } instance - * @protected - */ - createConfiguration(graph:yfiles.layout.LayoutGraph,grouping:yfiles.layout.GroupingSupport):yfiles.router.PathSearchConfiguration; - /** - * Creates a default {@link yfiles.collections.IComparer.} instance to determine the order of the edges according to which they will be routed. - *

- * This method is called by {@link yfiles.router.EdgeRouter#applyLayout} before the edge routes are calculated. It may be - * overridden in order to create a new {@link yfiles.collections.IComparer.} object with a custom configuration. - *

- *

- * By default, this method returns an instance of the default implementation. - *

- * @param graph the input graph - * @param configuration the given configuration for the path searching process - * @returns a {@link } instance - * @protected - */ - createDefaultEdgeOrderComparer(graph:yfiles.layout.LayoutGraph,configuration:yfiles.router.PathSearchConfiguration):yfiles.collections.IComparer; - /** - * Creates a {@link yfiles.router.GraphPartition} instance that divides the area of the graph into several rectangles. - *

- * This implementation creates a {@link yfiles.router.GraphPartition} using the current {@link yfiles.router.IObstaclePartition} instance. - *

- *

- * This method is called by {@link yfiles.router.EdgeRouter#applyLayout} before the edge routes are calculated. It may be - * overridden in order to create a new {@link yfiles.router.GraphPartition} object with a custom configuration. - *

- * @param decomposition the current {@link } - * @returns a {@link } instance - * @see yfiles.router.EdgeRouter#configureGraphPartition - * @see yfiles.router.EdgeRouter#registeredPartitionExtensions - */ - createGraphPartition(decomposition:yfiles.router.IObstaclePartition):yfiles.router.GraphPartition; - /** - * Creates a {@link yfiles.router.DynamicObstacleDecomposition} that is used by the {@link yfiles.router.GraphPartition} to divide the - * graph area in rectangles. - *

- * This method is called by {@link yfiles.router.EdgeRouter#applyLayout} before the edge routes are calculated. It may be - * overridden in order to create a new {@link yfiles.router.DynamicObstacleDecomposition} object with custom configuration. - *

- * @returns a {@link } instance - * @see yfiles.router.EdgeRouter#createGraphPartition - * @protected - */ - createObstacleDecomposition():yfiles.router.DynamicObstacleDecomposition; - /** - * Creates a {@link yfiles.router.ChannelBasedPathRouting} instance that routes the edges using pre-calculated {@link yfiles.router.Path} - * objects. - *

- * This method is called by {@link yfiles.router.EdgeRouter#applyLayout} before the edge routes are calculated. It may be - * overridden in order to create a new {@link yfiles.router.ChannelBasedPathRouting} object with custom configuration. - *

- * @returns a {@link } instance - * @protected - */ - createPathRouting():yfiles.router.ChannelBasedPathRouting; - /** - * Creates a {@link yfiles.router.PathSearch} instance that finds the paths of the edges through the {@link yfiles.router.GraphPartition}. - *

- * This method may be overridden in order to create a new {@link yfiles.router.PathSearch} object with custom configuration. - *

- * @returns a {@link } instance - * @see yfiles.router.EdgeRouter#configurePathSearch - * @see yfiles.router.EdgeRouter#registeredPathSearchExtensions - * @protected - */ - createPathSearch():yfiles.router.PathSearch; - /** - * Creates a {@link yfiles.router.PathSearchContext} that provides context information for the path searching algorithm. - *

- * This method is called by {@link yfiles.router.EdgeRouter#applyLayout} before the edge routes are calculated. It may be - * overridden in order to create a new {@link yfiles.router.PathSearchContext} object with custom configuration. - *

- * @param pathSearch a given {@link } instance - * @param configuration a given configuration for the path searching process - * @returns a {@link } instance - * @protected - */ - createPathSearchContext(pathSearch:yfiles.router.PathSearch,configuration:yfiles.router.PathSearchConfiguration):yfiles.router.PathSearchContext; - /** - * Returns the {@link yfiles.router.EdgeLayoutDescriptor} instance for a given edge that is provided by a {@link yfiles.algorithms.IDataProvider} - * which is registered with the graph with key {@link yfiles.router.EdgeRouter#EDGE_LAYOUT_DESCRIPTOR_DP_KEY}. - *

- * For all those edges that do not have a specific layout descriptor assigned, the default layout descriptor returned by {@link yfiles.router.EdgeRouter#defaultEdgeLayoutDescriptor} - * will be assigned. - *

- *

- * This method may be overridden in order to create an {@link yfiles.router.EdgeLayoutDescriptor} with custom configuration. - *

- * @param edge the given edge - * @returns the current {@link } instance for a given edge - * @see yfiles.router.EdgeRouter#defaultEdgeLayoutDescriptor - * @see yfiles.router.EdgeRouter#EDGE_LAYOUT_DESCRIPTOR_DP_KEY - */ - getEdgeLayoutDescriptor(edge:yfiles.algorithms.Edge):yfiles.router.EdgeLayoutDescriptor; - /** - * Returns whether or not a given edge is selected. - *

- * If all the edges of the graph will be routed by {@link yfiles.router.EdgeRouter}, i.e., the {@link yfiles.router.EdgeRouter#scope scope} is set to - * {@link yfiles.router.Scope#ROUTE_ALL_EDGES}, this utility method returns true for all edges. - *

- *

- * This method may be overridden in order to determine differently whether or not a given edge is considered to be - * selected. - *

- * @param edge the given edge - * @param graph the input graph - * @returns true if the given edge is selected, false otherwise - */ - isAffected(edge:yfiles.algorithms.Edge,graph:yfiles.algorithms.Graph):boolean; - /** - * Data provider key for specifying individual edge layout information - *

- * If this {@link yfiles.algorithms.IDataProvider} does not contain an {@link yfiles.router.EdgeLayoutDescriptor} for an edge, then the - * layout algorithm will use the {@link yfiles.router.EdgeRouter#defaultEdgeLayoutDescriptor default descriptor}. - *

- * @see yfiles.router.EdgeRouter#defaultEdgeLayoutDescriptor - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static EDGE_LAYOUT_DESCRIPTOR_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for weighting the costs for crossing each label individually - *

- * If the factor for a label is 0 then it is allowed to cross it. Very important labels should get a high factor. - *

- *

- * This factor is multiplied by the basic penalty arising when an edge must cross a {@link yfiles.router.PenaltySettings#nodeLabelCrossingPenalty node label} or an {@link yfiles.router.PenaltySettings#edgeLabelCrossingPenalty edge label} in order to - * determine the final costs arising when this label is crossed. - *

- * @see yfiles.router.EdgeRouter#defaultEdgeLayoutDescriptor - * @see yfiles.router.EdgeLayoutDescriptor#penaltySettings - * @const - * @static - * @type {yfiles.algorithms.ILabelLayoutDpKey.} - */ - static LABEL_CROSSING_PENALTY_FACTOR_DP_KEY:yfiles.algorithms.ILabelLayoutDpKey; - /** - * Gets or sets the time limit (in milliseconds) set for the edge routing algorithm. - *

- * The maximum duration has to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the maximum duration is negative - * @type {number} - */ - maximumDuration:number; - /** - * Gets the {@link yfiles.router.EdgeLayoutDescriptor} instance used for all those edges that do not have a specific edge layout - * descriptor assigned. - * @see yfiles.router.EdgeRouter#EDGE_LAYOUT_DESCRIPTOR_DP_KEY - * @type {yfiles.router.EdgeLayoutDescriptor} - */ - defaultEdgeLayoutDescriptor:yfiles.router.EdgeLayoutDescriptor; - /** - * Gets or sets whether or not the routing algorithm will route the edges of the graph with (non-orthogonal) polyline - * segments. - * @see yfiles.router.EdgeRouter#preferredPolylineSegmentLength - * @see yfiles.router.EdgeRouter#maximumPolylineSegmentRatio - * @type {boolean} - */ - polylineRouting:boolean; - /** - * Gets or sets the preferred length of (non-orthogonal) polyline segments. - *

- * If there is not enough space to use this preferred length, polyline segments may also be shorter. - *

- *

- * The preferred length of (non-orthogonal) polyline segments has to be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the preferred polyline segment length is negative - * @see yfiles.router.EdgeRouter#maximumPolylineSegmentRatio - * @type {number} - */ - preferredPolylineSegmentLength:number; - /** - * Gets or sets the maximum ratio between the horizontal/vertical part of a segment and the (non-orthogonal) polyline - * part. - *

- * When polyline segments are added to an edge path, corners between horizontal and vertical segments are cut and replaced - * by the new segment. This ratio describes the cutting points on a segment. If it is zero, the route stays orthogonal. The - * value cannot be larger than 0.5 because there may be another polyline segment at the other side of the segment. For long - * orthogonal segments the length of the polyline segment is determined by the value returned by {@link yfiles.router.EdgeRouter#preferredPolylineSegmentLength}. - *

- *

- * The maximum polyline segment ratio must be between 0 and 0.5. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the maximum segment length is negative or greater than 0.5 - * @type {number} - */ - maximumPolylineSegmentRatio:number; - /** - * Gets or sets whether or not the routing algorithm uses an additional step to reroute the edges that are considered to - * have the worst paths. - * @type {boolean} - */ - rerouting:boolean; - /** - * Gets or sets a (sub-)set of edges that shall be routed. - * @throws {Stubs.Exceptions.ArgumentError} if the given scope is unknown - * @see yfiles.router.EdgeRouter#affectedEdgesDpKey - * @type {yfiles.router.Scope} - */ - scope:yfiles.router.Scope; - /** - * Gets or sets the {@link yfiles.algorithms.IDataProvider} key to look up the selection state of the nodes. - *

- * If the {@link yfiles.router.EdgeRouter#scope scope} is set to - * {@link yfiles.router.Scope#ROUTE_EDGES_AT_AFFECTED_NODES}, only the edges that are incident to selected nodes will be routed, - * while all other edges will be considered to have fixed routes. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.algorithms.IDataProvider} key is null - * @see yfiles.router.EdgeRouter#scope - * @type {any} - */ - affectedNodesDpKey:any; - /** - * Gets or sets the {@link yfiles.algorithms.IDataProvider} key to look up the selection state of the edges. - *

- * If the {@link yfiles.router.EdgeRouter#scope scope} is set to - * {@link yfiles.router.Scope#ROUTE_AFFECTED_EDGES}, only the selected edges will be routed, while all other edges will be - * considered to have fixed routes. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.algorithms.IDataProvider} key is null - * @see yfiles.router.EdgeRouter#scope - * @type {any} - */ - affectedEdgesDpKey:any; - /** - * Gets or sets a custom {@link yfiles.collections.IComparer.} to define the processing order of the edges. - * @see yfiles.router.EdgeRouter#createDefaultEdgeOrderComparer - * @type {yfiles.collections.IComparer.} - */ - edgeComparer:yfiles.collections.IComparer; - /** - * Gets or sets whether or not the routing algorithm considers the labels of the nodes as obstacles when calculating the - * edge routes to avoid overlaps. - * @see yfiles.router.PenaltySettings#nodeLabelCrossingPenalty - * @type {boolean} - */ - considerNodeLabels:boolean; - /** - * Gets or sets whether or not this routing algorithm ignores node labels that are inside the bounds of their owner as - * obstacles for edge routes. - * @see yfiles.router.EdgeRouter#considerNodeLabels - * @see yfiles.router.PenaltySettings#nodeLabelCrossingPenalty - * @see yfiles.router.EdgeRouter#LABEL_CROSSING_PENALTY_FACTOR_DP_KEY - * @type {boolean} - */ - ignoreInnerNodeLabels:boolean; - /** - * Gets or sets whether or not the routing algorithm considers as obstacles the edge labels that do not belong to the - * (sub-)set of edges to be routed when calculating the edge routes. - * @see yfiles.router.EdgeRouter#scope - * @see yfiles.router.EdgeRouter#affectedEdgesDpKey - * @see yfiles.router.PenaltySettings#nodeLabelCrossingPenalty - * @type {boolean} - */ - considerEdgeLabels:boolean; - /** - * Gets or sets the {@link yfiles.router.Grid} instance on which the routing algorithm places the orthogonal segments. - * @type {yfiles.router.Grid} - */ - grid:yfiles.router.Grid; - /** - * Gets or sets the minimum distance between edges and node bounds. - *

- * The minimum distance should have a non-negative value. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum node-to-edge distance is negative - * @see yfiles.router.PenaltySettings#minimumNodeToEdgeDistancePenalty - * @type {number} - */ - minimumNodeToEdgeDistance:number; - /** - * Gets a list of all registered {@link yfiles.router.IGraphPartitionExtension}s. - *

- * {@link yfiles.router.IGraphPartitionExtension}s can be added to a {@link yfiles.router.GraphPartition} in order to create new - * {@link yfiles.router.Obstacle}s or can be removed from a {@link yfiles.router.GraphPartition} instance. - *

- *

- * By default, the following {@link yfiles.router.IGraphPartitionExtension}s are registered with a given {@link yfiles.router.GraphPartition} - * instance: - *

- *
    - *
  • Minimum Node To Edge Distance Partition
  • - *
  • Node Partition
  • - *
  • Partition Grid Partition
  • - *
  • Node Label Partition
  • - *
  • Edge Label Partition
  • - *
  • Fixed Edges Partition
  • - *
  • External Strong Port Restriction Partition
  • - *
- * @see yfiles.router.EdgeRouter#createGraphPartition - * @see yfiles.router.EdgeRouter#configureGraphPartition - * @type {yfiles.collections.IList.} - */ - registeredPartitionExtensions:yfiles.collections.IList; - /** - * Gets a list of all registered {@link yfiles.router.PathSearchExtension}s. - *

- * {@link yfiles.router.PathSearchExtension}s can be added to a {@link yfiles.router.PathSearch} instance in order to influence the path - * searching process or can be removed from a {@link yfiles.router.PathSearch} instance. - *

- *

- * By default, the following {@link yfiles.router.PathSearchExtension}s are registered with a {@link yfiles.router.PathSearch} instance: - *

- *
    - *
  • Fixed Grouped Edges
  • - *
  • Node Crossing
  • - *
  • Minimum Node To Edge Distance
  • - *
  • Group Node Crossing
  • - *
  • Minimum Group Node To Edge Distance
  • - *
  • Node Label Crossing
  • - *
  • Edge Label Crossing
  • - *
  • Bends In Node To Edge Distance
  • - *
  • Bend
  • - *
  • Monotonic Route
  • - *
  • Edge Length
  • - *
  • Partition Grid
  • - *
  • Port Restriction
  • - *
  • Edge Grouping
  • - *
  • Minimum Node Corner Distance
  • - *
  • Interval Based Crossing
  • - *
  • Minimum Edge To Edge Distance And Grid
  • - *
  • Minimum First Last Segment Length
  • - *
  • Intersecting Source And Target
  • - *
- * @see yfiles.router.EdgeRouter#createPathSearch - * @see yfiles.router.EdgeRouter#configurePathSearch - * @type {yfiles.collections.IList.} - */ - registeredPathSearchExtensions:yfiles.collections.IList; - /** - * Gets the {@link yfiles.router.GraphPartition} instance used during the routing process. - * @type {yfiles.router.GraphPartition} - */ - partition:yfiles.router.GraphPartition; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.EdgeRouter; - } - export enum Alignment{ - /** - * A constant specifying that the segment prefers to be placed close to the lower bound of its location range. - * @see yfiles.router.SegmentInfoBase#preferredAlignment - * @see yfiles.router.SegmentInfoBase#preferredAlignment - */ - MIN, - /** - * A constant specifying that the segment prefers to be placed close to the upper bound of its location range. - * @see yfiles.router.SegmentInfoBase#preferredAlignment - * @see yfiles.router.SegmentInfoBase#preferredAlignment - */ - MAX, - /** - * A constant specifying that the segment can be placed anywhere within its location range. - * @see yfiles.router.SegmentInfoBase#preferredAlignment - * @see yfiles.router.SegmentInfoBase#preferredAlignment - */ - ANY - } - export enum RoutingType{ - /** - * A routing type representing a straight crossing of the - * {@link yfiles.router.PartitionCell partition cell}, i.e., a single orthogonal edge segment enters and exits the cell. - * @see yfiles.router.EdgeCellInfo#type - */ - STRAIGHT, - /** - * A routing type representing a crossing of the {@link yfiles.router.PartitionCell partition cell} with three segments, i.e., the edge enters and exits the - * cell using the same direction but has an orthogonal middle segment between the entering and exiting segment. - * @see yfiles.router.EdgeCellInfo#type - */ - STRAIGHT_BENDING, - /** - * A routing type representing a crossing of the {@link yfiles.router.PartitionCell partition cell} with a single bend, i.e., the edge enters the cell in one - * direction, makes a bend and exits the cell in an orthogonal direction. - * @see yfiles.router.EdgeCellInfo#type - */ - BENDING, - /** - * A routing type representing a crossing of the {@link yfiles.router.PartitionCell partition cell} by making a U-turn, i.e., the edge enters and exits the - * cell on the same side using two turns and an orthogonal middle segment. - * @see yfiles.router.EdgeCellInfo#type - */ - U_TURN, - /** - * A routing type representing the source or target end of an edge being in the cell, i.e., the enter and/or exit interval - * is null. - * @see yfiles.router.EdgeCellInfo#type - */ - END - } - /** - * A {@link yfiles.router.GraphPartition} partitions the bounding box of a graph into rectangles using the graph elements as - * {@link yfiles.router.Obstacle}s. - *

- * All {@link yfiles.router.Obstacle}s used during the partitioning are {@link yfiles.router.GraphPartition#createObstacle created} by {@link yfiles.router.IGraphPartitionExtension}s. - * {@link yfiles.router.IGraphPartitionExtension}s have been {@link yfiles.router.GraphPartition#addDynamicDecompositionListener registered} before using method {@link yfiles.router.IGraphPartitionExtension#preparePartition} - * which is called during the {@link yfiles.router.GraphPartition#init initialization} of a {@link yfiles.router.GraphPartition}. - *

- *

- * The core partitioning is delegated to an {@link yfiles.router.IObstaclePartition} that is {@link yfiles.router.IObstaclePartition#init initialized} with these - * {@link yfiles.router.Obstacle}s. - *

- *

- * If the {@link yfiles.router.IObstaclePartition} is of type {@link yfiles.router.IDynamicDecomposition}, {@link yfiles.router.GraphPartition} - * re-dispatches the decomposition notifications to its extensions. - *

- * @see yfiles.router.IGraphPartitionExtension - * @class - * @implements {yfiles.router.IPartition} - * @implements {yfiles.router.IDynamicDecomposition} - * @implements {yfiles.router.IDecompositionListener} - */ - export interface GraphPartition extends yfiles.lang.Object,yfiles.router.IPartition,yfiles.router.IDynamicDecomposition,yfiles.router.IDecompositionListener{} - export class GraphPartition { - /** - * Creates a new {@link yfiles.router.GraphPartition} instance using the given {@link yfiles.router.GraphPartition#partition delegate inner obstacle partition}. - * @param partition the delegate inner obstacle partition - */ - constructor(partition:yfiles.router.IObstaclePartition); - /** - * Adds the given listener to the {@link yfiles.router.GraphPartition}. - *

- * The listener will be notified upon dynamic decomposition events. If it is a {@link yfiles.router.IGraphPartitionExtension}, - * method {@link yfiles.router.IGraphPartitionExtension#preparePartition} is called during {@link yfiles.router.GraphPartition#init initialization}. - *

- * @param listener the listener to be added - */ - addDynamicDecompositionListener(listener:yfiles.router.IDecompositionListener):void; - /** - * Clears the {@link yfiles.router.GraphPartition partition} data such that the {@link yfiles.router.GraphPartition} can be reused and {@link yfiles.router.GraphPartition#init initialized} with a new - * configuration. - *

- * All {@link yfiles.router.IGraphPartitionExtension}s are {@link yfiles.router.IGraphPartitionExtension#cleanup cleaned up}; partition listeners and obstacles are {@link yfiles.router.GraphPartition#removeDynamicDecompositionListener removed}. - *

- * @see yfiles.router.GraphPartition#init - */ - clear():void; - /** - * Creates and returns a new {@link yfiles.router.Obstacle} using the given bounds and data. - *

- * All obstacles created via this method are delegated to the {@link yfiles.router.GraphPartition#partition inner partition} upon {@link yfiles.router.GraphPartition#init initialization}. - *

- * @param bounds the bounds of the obstacle - * @param data the additional data that should be associated with the obstacle - * @returns a new {@link } using the given bounds and data - */ - createObstacle(bounds:yfiles.algorithms.YRectangle,data:any):yfiles.router.Obstacle; - /** - * Returns a list of all {@link yfiles.router.PartitionCell}s that intersect or cover the given rectangle by delegating to the - * corresponding method of the {@link yfiles.router.GraphPartition#partition inner partition}. - * @param rect the rectangular area whose (partially) covered cells will be returned - * @returns a list containing (partially) covered {@link }s - * @see yfiles.router.IPartition#getCells - */ - getCells(rect:yfiles.algorithms.YRectangle):yfiles.collections.IList; - /** - * Returns all {@link yfiles.router.PartitionCell}s that are completely covered by the bounds of the given node. - * @param node the node for which the covered cells will be returned - * @returns an unmodifiable list of {@link } instances that are completely covered by the bounds of the given - * node - * @throws {Stubs.Exceptions.ArgumentError} if the node is unknown - */ - getCellsForNode(node:yfiles.algorithms.Node):yfiles.collections.IList; - /** - * Returns a list of all - * {@link yfiles.router.PartitionCell}s that are neighbors of the given cell, i.e., those cells that have a common border segment - * with the given cell. - * @param cell the cell whose neighbors will be returned - * @returns a list of {@link }s that are neighbors of the given cell - */ - getNeighbors(cell:yfiles.router.PartitionCell):yfiles.collections.IList; - /** - * Returns a list of all {@link yfiles.algorithms.Node}s whose bounds intersect or cover the bounds of the given cell. - * @param cell the cell - * @returns a list of {@link }s that are intersected by the given cell - */ - getNodes(cell:yfiles.router.PartitionCell):yfiles.collections.IList; - /** - * Returns the {@link yfiles.router.Obstacle} that has been created earlier for the given data object. - * @param data the given data for which the obstacle will be returned - * @returns the {@link } that has been created earlier for the given data object - */ - getObstacle(data:any):yfiles.router.Obstacle; - /** - * Returns all {@link yfiles.router.Obstacle}s covering the given {@link yfiles.router.PartitionCell} by delegating to the corresponding - * method of the {@link yfiles.router.GraphPartition#partition inner partition}. - * @param cell the cell whose obstacles will be returned - * @returns a list of {@link }s that cover the given cell - * @see yfiles.router.IObstaclePartition#getObstacles - */ - getObstacles(cell:yfiles.router.PartitionCell):yfiles.collections.IList; - /** - * Initializes the {@link yfiles.router.GraphPartition} with the given graph instance based on the given {@link yfiles.router.PathSearchConfiguration configuration} used by path - * search algorithms. - *

- * Before calling this method, any old partitioning information must be {@link yfiles.router.GraphPartition#clear cleared}. - *

- *

- * This initialization method calls {@link yfiles.router.IGraphPartitionExtension#preparePartition} of all registered extensions. - * Then, the {@link yfiles.router.GraphPartition#partition inner delegate partition} is initialized passing all {@link yfiles.router.GraphPartition#createObstacle added} obstacles as well as the given graph's bounds - * extended by a small padding. - *

- *

- * In the case where the {@link yfiles.router.GraphPartition#partition delegate partition} is of type {@link yfiles.router.IDynamicDecomposition}, this {@link yfiles.router.GraphPartition} - * will also be added as {@link yfiles.router.IDecompositionListener} to it. - *

- * @param configuration the configuration used by path search algorithms - * @see yfiles.router.GraphPartition#clear - * @see yfiles.router.IGraphPartitionExtension#preparePartition - * @see yfiles.router.GraphPartition#addDynamicDecompositionListener - */ - init(configuration:yfiles.router.PathSearchConfiguration):void; - /** - * Re-dispatches the event of the creation of a new {@link yfiles.router.PartitionCell} to all registered - * {@link yfiles.router.IDecompositionListener}s. - *

- * This method is a callback after a {@link yfiles.router.PartitionCell} has been created. - *

- * @param createdCell the newly created {@link } - */ - onCellCreated(createdCell:yfiles.router.PartitionCell):void; - /** - * Re-dispatches the event of having completed the process of subdivisions of a given {@link yfiles.router.PartitionCell} to all - * registered {@link yfiles.router.IDecompositionListener}s. - *

- * This method is a callback after a {@link yfiles.router.PartitionCell} has been finalized and won't be further subdivided. - *

- * @param finalizedCell the cell that has been finalized - */ - onCellFinalized(finalizedCell:yfiles.router.PartitionCell):void; - /** - * Re-dispatches the event of the subdivision of a given {@link yfiles.router.PartitionCell} into several sub-cells to all - * registered {@link yfiles.router.IDecompositionListener}s. - *

- * This method is a callback after a {@link yfiles.router.PartitionCell} has been subdivided into several sub-cells. - *

- * @param cell the cell that has been subdivided - * @param subCells the sub-cells resulting from the subdivision of the given {@link } - */ - onCellSubdivided(cell:yfiles.router.PartitionCell,subCells:yfiles.collections.IList):void; - /** - * Removes the given listener from the {@link yfiles.router.GraphPartition}. - *

- * The listener will not be notified of dynamic decomposition events anymore. - *

- * @param listener the listener to be removed - */ - removeDynamicDecompositionListener(listener:yfiles.router.IDecompositionListener):void; - /** - * Gets the delegate inner obstacle partition. - * @protected - * @type {yfiles.router.IObstaclePartition} - */ - partition:yfiles.router.IObstaclePartition; - /** - * Gets the bounds of the original rectangular area that is being partitioned. - *

- * This method delegates to the corresponding method of the {@link yfiles.router.GraphPartition#partition inner partition}. - *

- * @see yfiles.router.IPartition#bounds - * @type {yfiles.algorithms.YRectangle} - */ - bounds:yfiles.algorithms.YRectangle; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.GraphPartition; - } - /** - * {@link yfiles.router.GraphPartitionExtensionAdapter} provides an empty implementation of - * {@link yfiles.router.IGraphPartitionExtension}. - *

- * The only real functionality is contained in method {@link yfiles.router.IGraphPartitionExtension#preparePartition} which stores - * the given {@link yfiles.router.PathSearchConfiguration} and {@link yfiles.router.GraphPartition} in properties. - *

- * @see yfiles.router.GraphPartitionExtensionAdapter#configuration - * @see yfiles.router.GraphPartitionExtensionAdapter#graphPartition - * @class - * @implements {yfiles.router.IGraphPartitionExtension} - */ - export interface GraphPartitionExtensionAdapter extends yfiles.lang.Object,yfiles.router.IGraphPartitionExtension{} - export class GraphPartitionExtensionAdapter { - /** - * Creates a new instance of {@link yfiles.router.GraphPartitionExtensionAdapter}. - */ - constructor(); - /** - * - */ - cleanup():void; - /** - * - * @param createdCell - */ - onCellCreated(createdCell:yfiles.router.PartitionCell):void; - /** - * - * @param finalizedCell - */ - onCellFinalized(finalizedCell:yfiles.router.PartitionCell):void; - /** - * - * @param cell - * @param subCells - */ - onCellSubdivided(cell:yfiles.router.PartitionCell,subCells:yfiles.collections.IList):void; - /** - * Stores the given {@link yfiles.router.PathSearchConfiguration} and {@link yfiles.router.GraphPartition} such that they are accessible - * through {@link yfiles.router.GraphPartitionExtensionAdapter#configuration} and {@link yfiles.router.GraphPartitionExtensionAdapter#graphPartition}, respectively. - * @param configuration the configuration used for the path search - * @param graphPartition the graph partition that uses this extension - */ - preparePartition(configuration:yfiles.router.PathSearchConfiguration,graphPartition:yfiles.router.GraphPartition):void; - /** - * Gets the {@link yfiles.router.GraphPartition} passed to {@link yfiles.router.IGraphPartitionExtension#preparePartition}. - * @protected - * @type {yfiles.router.GraphPartition} - */ - graphPartition:yfiles.router.GraphPartition; - /** - * Gets the configuration of the {@link yfiles.router.PathSearch} passed to - * {@link yfiles.router.IGraphPartitionExtension#preparePartition}. - * @protected - * @type {yfiles.router.PathSearchConfiguration} - */ - configuration:yfiles.router.PathSearchConfiguration; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.GraphPartitionExtensionAdapter; - } - /** - * This class provides support for routing edges on equidistant grid lines. - *

- * The grid is defined by its origin and the spacing between the equidistant grid lines. - *

- * @class - * @final - */ - export interface Grid extends yfiles.lang.Object{} - export class Grid { - /** - * Creates a new {@link yfiles.router.Grid} instance. - *

- * The spacing between the grid lines must be at least 1. If the given spacing is smaller, value 1 is assumed. - *

- * @param originX the x-coordinate of the origin of the grid - * @param originY the y-coordinate of the origin of the grid - * @param spacing the spacing between the grid lines - */ - constructor(originX:number,originY:number,spacing:number); - /** - * Gets the x-coordinate of the origin. - * @type {number} - */ - originX:number; - /** - * Gets the y-coordinate of the origin. - * @type {number} - */ - originY:number; - /** - * Gets the spacing between the horizontal and vertical grid lines. - * @type {number} - */ - spacing:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.Grid; - } - /** - * This interface should be implemented by classes that dispatch notifications about changes in {@link yfiles.router.IPartition}s. - *

- * Such classes can be notified when {@link yfiles.router.PartitionCell}s are created, divided, and/or finalized. - *

- * @see yfiles.router.IDecompositionListener - * @interface - */ - export interface IDynamicDecomposition extends yfiles.lang.Object{ - /** - * Adds the given {@link yfiles.router.IDecompositionListener} that will be notified of dynamic decomposition events to the - * {@link yfiles.router.IPartition}. - * @param listener the listener to be added - * @abstract - */ - addDynamicDecompositionListener(listener:yfiles.router.IDecompositionListener):void; - /** - * Removes the given {@link yfiles.router.IDecompositionListener} from the {@link yfiles.router.IPartition}. - *

- * The {@link yfiles.router.IDecompositionListener} will be no more notified of dynamic decomposition events. - *

- * @param listener the listener to be removed - * @abstract - */ - removeDynamicDecompositionListener(listener:yfiles.router.IDecompositionListener):void; - } - var IDynamicDecomposition:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.router.IDynamicDecomposition; - }; - /** - * This interface is implemented by classes that require to be notified of changes in {@link yfiles.router.IPartition}s. - *

- * Implementations are notified when {@link yfiles.router.PartitionCell}s are created, divided, and/or finalized. - *

- * @interface - */ - export interface IDecompositionListener extends yfiles.lang.Object{ - /** - * Callback after the new given {@link yfiles.router.PartitionCell} has been created. - * @param createdCell the newly created {@link } - * @abstract - */ - onCellCreated(createdCell:yfiles.router.PartitionCell):void; - /** - * Callback after the given {@link yfiles.router.PartitionCell} has been finalized and won't be further subdivided. - * @param finalizedCell the cell that has been finalized - * @abstract - */ - onCellFinalized(finalizedCell:yfiles.router.PartitionCell):void; - /** - * Callback after the given {@link yfiles.router.PartitionCell} has been subdivided into several sub-cells. - *

- * {@link yfiles.router.IDecompositionListener} may not modify the list of sub-cells. - *

- * @param cell the cell that has been subdivided - * @param subCells the sub-cells resulting from the subdivision of the given {@link } - * @abstract - */ - onCellSubdivided(cell:yfiles.router.PartitionCell,subCells:yfiles.collections.IList):void; - } - var IDecompositionListener:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.router.IDecompositionListener; - }; - /** - * This interface provides additional intervals in order to move from one {@link yfiles.router.PartitionCell partition cell} into an adjacent one. - *

- * To find a {@link yfiles.router.Path} for an edge, the {@link yfiles.router.PathSearch} algorithm moves from the current partition cell - * to an adjacent partition cell. By default, the orthogonal interval shared by these two cells is used. Implementations of - * this interface may be added to the {@link yfiles.router.PathSearch} to calculate additional enter intervals that might - * accumulate lower costs for entering the adjacent cell. - *

- * @see yfiles.router.PartitionCell - * @see yfiles.router.PathSearch#addAdditionalEnterIntervalCalculator - * @interface - */ - export interface IEnterIntervalCalculator extends yfiles.lang.Object{ - /** - * Appends additional enter intervals to the given list of enter intervals for moving from the {@link yfiles.router.PartitionCell partition cell} of the - * current {@link yfiles.router.CellEntrance} to the neighboring cell. - * @param currentEntrance the current {@link } that is exited - * @param enteredCell the neighboring cell that will be entered - * @param commonInterval the common interval of the left and entered partition cells - * @param allEnterIntervals the list to which additional enter intervals have to be appended - * @param context the context of the path search - * @abstract - */ - appendEnterIntervals(currentEntrance:yfiles.router.CellEntrance,enteredCell:yfiles.router.PartitionCell,commonInterval:yfiles.router.OrthogonalInterval,allEnterIntervals:yfiles.collections.IList,context:yfiles.router.PathSearchContext):void; - } - var IEnterIntervalCalculator:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.router.IEnterIntervalCalculator; - }; - /** - * This interface provides methods for extending the functionality of a {@link yfiles.router.GraphPartition}. - *

- * A {@link yfiles.router.IGraphPartitionExtension} can be used for {@link yfiles.router.GraphPartition#createObstacle creating} new {@link yfiles.router.Obstacle}s that will be given to the - * initializer of the {@link yfiles.router.IObstaclePartition} where they can react to the {@link yfiles.router.IObstaclePartition}'s - * decomposition events if it implements the {@link yfiles.router.IDynamicDecomposition} interface. - *

- *

- * A {@link yfiles.router.IGraphPartitionExtension} has to be {@link yfiles.router.GraphPartition#addDynamicDecompositionListener added} to the {@link yfiles.router.GraphPartition} which will call method {@link yfiles.router.IGraphPartitionExtension#preparePartition} - * before the {@link yfiles.router.IObstaclePartition} is initialized. - *

- * @interface - * @implements {yfiles.router.IDecompositionListener} - */ - export interface IGraphPartitionExtension extends yfiles.lang.Object,yfiles.router.IDecompositionListener{ - /** - * Cleans up the extension from the last partitioning with the current {@link yfiles.router.PathSearchConfiguration configuration} and {@link yfiles.router.GraphPartition}. - * @abstract - */ - cleanup():void; - /** - * Adds a {@link yfiles.router.IGraphPartitionExtension} to the {@link yfiles.router.GraphPartition}. - *

- * It is called by the given {@link yfiles.router.GraphPartition} upon initialization before its {@link yfiles.router.IObstaclePartition} - * is initialized. Implementations may use the graph upon which the given {@link yfiles.router.GraphPartition} is based to - * initialize themselves and/or to {@link yfiles.router.GraphPartition#createObstacle add obstacles} to the list with which {@link yfiles.router.IObstaclePartition} is initialized. - *

- * @param configuration the configuration used for the path search - * @param graphPartition the graph partition that uses this extension - * @abstract - */ - preparePartition(configuration:yfiles.router.PathSearchConfiguration,graphPartition:yfiles.router.GraphPartition):void; - } - var IGraphPartitionExtension:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.router.IGraphPartitionExtension; - }; - /** - * This class implements a {@link yfiles.router.IPartition} that takes a list of {@link yfiles.router.Obstacle}s as input to subdivide an - * area into {@link yfiles.router.PartitionCell}s. - *

- * Implementations have to satisfy the following condition for each pair of {@link yfiles.router.Obstacle} and - * {@link yfiles.router.PartitionCell}: - *

- *
    - *
  • - * {@link yfiles.router.Obstacle}s either completely cover {@link yfiles.router.PartitionCell}s or do not intersect - * {@link yfiles.router.PartitionCell}s at all. - *
  • - *
- *

- * {@graph {"ann":{"s":[40,40],"d":1},"styles":{"6":{"s":"#0000ff", "f":null}},"n":[[380,280,[[394.66,309.35,10.67,18.7,"1"]]],[580,400,[[594.66,429.35,10.67,18.7,"2"]]],[240.2,280,139.8,40,6],[240.2,159.2,179.8,120.8,6],[240.2,320,179.95,280,6],[420.15,440,200,160,6],[420.15,400,159.85,40,6],[420.15,159.2,319.2,240.8,6],[620,400,119.35,200,6]],"e":[[0,1,[400,420]]],"vp":[240.0,159.0,500.0,441.0]}} Example of an {@link yfiles.router.IObstaclePartition} of a graph consisting of two nodes connected by one edge. The two nodes - * are considered to be obstacles. The colored partition cells subdivide the area such that each obstacle either completely - * covers a partition cell or does not intersect with a partition cell. - *

- * @interface - * @implements {yfiles.router.IPartition} - */ - export interface IObstaclePartition extends yfiles.lang.Object,yfiles.router.IPartition{ - /** - * Clears the partition data such that the {@link yfiles.router.IObstaclePartition} can be reused and {@link yfiles.router.IObstaclePartition#init initialized} with new - * {@link yfiles.router.Obstacle}s. - * @see yfiles.router.IObstaclePartition#init - * @abstract - */ - clear():void; - /** - * Returns all {@link yfiles.router.PartitionCell}s that are completely covered by the given {@link yfiles.router.Obstacle}. - * @param obstacle the obstacle for which the covered cells will be returned - * @returns an unmodifiable list of {@link } instances that are completely covered by the given obstacle - * @abstract - */ - getCellsForObstacle(obstacle:yfiles.router.Obstacle):yfiles.collections.IList; - /** - * Returns all {@link yfiles.router.Obstacle}s that cover the given {@link yfiles.router.PartitionCell}. - * @param cell the partition cell for which the obstacles will be returned - * @returns an unmodifiable list of {@link } instances that cover the given cell - * @abstract - */ - getObstacles(cell:yfiles.router.PartitionCell):yfiles.collections.IList; - /** - * Initializes a new {@link yfiles.router.IObstaclePartition} of the area with the given bounds using the given list of - * {@link yfiles.router.Obstacle}s. - *

- * Unused partitions must be cleared using method {@link yfiles.router.IObstaclePartition#clear}. - *

- * @param obstacles a list of {@link }s that have to be considered by the partition - * @param bounds the bounds of the partition - * @see yfiles.router.IObstaclePartition#clear - * @abstract - */ - init(obstacles:yfiles.collections.IList,bounds:yfiles.algorithms.YRectangle):void; - } - var IObstaclePartition:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.router.IObstaclePartition; - }; - /** - * This class divides a rectangular area into one or more {@link yfiles.router.PartitionCell}s. - *

- * {@link yfiles.router.PartitionCell}s have to be disjoint. The union of all - * {@link yfiles.router.PartitionCell}s covers the original area. - *

- * @interface - */ - export interface IPartition extends yfiles.lang.Object{ - /** - * Returns a list of all {@link yfiles.router.PartitionCell}s that intersect or cover the given rectangle. - * @param rect the rectangular area whose (partially) covered cells will be returned - * @returns a list of {@link }s that (partially) cover the given rectangular area - * @abstract - */ - getCells(rect:yfiles.algorithms.YRectangle):yfiles.collections.IList; - /** - * Returns a list of all - * {@link yfiles.router.PartitionCell}s that are neighbors of the given cell, i.e., those cells that have a common border segment - * with the given cell. - * @param cell the cell whose neighbors will be returned - * @returns a list of {@link }s that are neighbors of the given cell - * @abstract - */ - getNeighbors(cell:yfiles.router.PartitionCell):yfiles.collections.IList; - /** - * Gets the bounds of the original rectangular area that is partitioned. - * @abstract - * @type {yfiles.algorithms.YRectangle} - */ - bounds:yfiles.algorithms.YRectangle; - } - var IPartition:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.router.IPartition; - }; - /** - * This class represents a one-dimensional closed interval. - * @class - */ - export interface Interval extends yfiles.lang.Object{} - export class Interval { - /** - * Creates a new {@link yfiles.router.Interval} between the given bounds. - *

- * The upper and lower bound of the two given values are determined automatically, i.e., the smaller one will be treated as - * the lower bound and the larger one as the upper bound. - *

- * @param bound1 the first interval bound - * @param bound2 the second interval bound - */ - constructor(bound1:number,bound2:number); - /** - * Returns the bridging {@link yfiles.router.Interval interval} between the given {@link yfiles.router.Interval intervals}. - *

- * The bridging interval is null if the given intervals intersect each other. Otherwise, the bridging interval is - * [minimum of upper bounds, maximum of lower bounds]. - *

- * @param i1 the first interval - * @param i2 the second interval - * @returns the bridging interval between the given intervals or null if the intervals intersect - * @static - */ - static calculateBridge(i1:yfiles.router.Interval,i2:yfiles.router.Interval):yfiles.router.Interval; - /** - * Returns the intersection of the given {@link yfiles.router.Interval intervals}. - *

- * The intersection is null if the given intervals do not intersect each other. Otherwise, the intersection is - * [maximum of lower bounds, minimum of upper bounds]. - *

- * @param i1 the first interval - * @param i2 the second interval - * @returns the intersection of the given intervals or null if the intervals do not intersect - * @static - */ - static calculateIntersection(i1:yfiles.router.Interval,i2:yfiles.router.Interval):yfiles.router.Interval; - /** - * Returns the spanning rectangle between the given {@link yfiles.router.Interval intervals}. - *

- * The first interval spans the rectangle in horizontal dimension, the second interval in vertical dimension. - *

- * @param horizontal the interval that defines the location and length of the rectangle in horizontal dimension - * @param vertical the interval that defines the location and length of the rectangle in vertical dimension - * @returns the spanning rectangle between the given intervals - * @static - */ - static calculateSpanningRectangle(horizontal:yfiles.router.Interval,vertical:yfiles.router.Interval):yfiles.algorithms.YRectangle; - /** - * Returns the union of the given {@link yfiles.router.Interval intervals} and the given value. - *

- * The union is between the minimum of the lower bound of the given interval and the given value and the maximum of the - * upper bound of the given interval and the given value. - *

- * @param interval the interval to be extended - * @param value the value to be in the union - * @returns the union of the given interval and the given value - * @static - */ - static calculateUnion(interval:yfiles.router.Interval,value:number):yfiles.router.Interval; - /** - * Returns the union of the given {@link yfiles.router.Interval intervals}. - *

- * The union is [minimum of lower bounds, maximum of upper bounds]. - *

- * @param i1 the first interval - * @param i2 the second interval - * @returns the union of the given intervals - * @static - */ - static calculateUnion(i1:yfiles.router.Interval,i2:yfiles.router.Interval):yfiles.router.Interval; - /** - * Checks whether or not the given value lies within the interval. - * @param value the value to check - * @returns true if the value lies within the interval, false otherwise - */ - contains(value:number):boolean; - /** - * Checks whether or not the given {@link yfiles.router.Interval interval} fully covers this {@link yfiles.router.Interval interval} given a small epsilon value. - *

- * The given interval covers this interval, if other lower bound - epsilon <= this lower bound and - * this upper bound <= other upper bound + epsilon. - *

- * @param other the other interval - * @param [eps=1E-06] the epsilon value that determines the extended range of the other interval - * @returns true if this interval is fully covered by the other interval, false otherwise - */ - coveredBy(other:yfiles.router.Interval,eps?:number):boolean; - /** - * Returns the distance between this {@link yfiles.router.Interval interval} and the given {@link yfiles.router.Interval interval}. - *

- * If the intervals {@link yfiles.router.Interval#intersects intersect}, the distance is 0. Otherwise, it is equal to - * dist(minimum of upper bounds, maximum of lower bounds). - *

- * @param other the other interval to which the distance is calculated - * @returns the distance between this interval and the given interval - */ - distanceTo(other:yfiles.router.Interval):number; - /** - * Returns the distance between the value and this {@link yfiles.router.Interval interval}. - *

- * If this interval contains the specified value, the distance is 0. Otherwise, it is the minimum of dist(value, lower bound) - * and dist(value, upper bound). - *

- * @param value the value to which the distance is calculated - * @returns the distance between the value and the interval - */ - distanceTo(value:number):number; - /** - * Returns the {@link yfiles.router.Interval interval} bound that is closest to the given value. - * @param value the value for which the closest interval bound will be returned - * @returns - *
    - *
  • the value, if the given value lies within the interval, or
  • - *
  • the lower bound, if the given value is smaller than or equal to the lower bound, or
  • - *
  • the upper bound, if the given value is greater than or equal to the upper bound
  • - *
- */ - getClosest(value:number):number; - /** - * Checks whether or not this {@link yfiles.router.Interval interval} and the given {@link yfiles.router.Interval interval} cover the same range. - *

- * The intervals are considered to cover the same range, if their minimum values as well as their maximum values differ - * only in the given epsilon value. - *

- * @param other the other interval - * @param [eps=1E-06] the maximum distance between the two minimum and the two maximum values - * @returns true if the intervals cover the same range, false otherwise - */ - hasSameRange(other:yfiles.router.Interval,eps?:number):boolean; - /** - * Checks whether or not this {@link yfiles.router.Interval interval} intersects with the given - * {@link yfiles.router.Interval interval}, considering the given minimum intersection length. - * @param other the other interval to check - * @param [minIntersection=0] the minimum length of the intersection of the intervals - * @returns true if the intervals intersect at least by the given minimum length, false otherwise - */ - intersects(other:yfiles.router.Interval,minIntersection?:number):boolean; - /** - * Checks whether or not the lower bound of this {@link yfiles.router.Interval interval} is greater than the upper bound of the given interval. - * @param other the interval to compare - * @returns true if the current interval is on the right of the given one, false otherwise - */ - isGreaterThan(other:yfiles.router.Interval):boolean; - /** - * Checks whether or not the upper bound of this {@link yfiles.router.Interval interval} is smaller than the lower bound of the given interval. - * @param other the interval to compare - * @returns true if the current interval is on the left of the given one, false otherwise - */ - isLessThan(other:yfiles.router.Interval):boolean; - /** - * Gets the lower bound of the interval. - * @type {number} - */ - min:number; - /** - * Gets the upper bound of the interval. - * @type {number} - */ - max:number; - /** - * Gets the midpoint of the interval. - * @type {number} - */ - center:number; - /** - * Gets the size of the interval, i.e., the difference between the {@link yfiles.router.Interval#max upper bound} and the {@link yfiles.router.Interval#min lower bound}. - * @type {number} - */ - size:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.Interval; - } - /** - * This class describes the obstacles that are used by implementations of {@link yfiles.router.IObstaclePartition} to subdivide an - * area into {@link yfiles.router.PartitionCell}s. - * @class - */ - export interface Obstacle extends yfiles.lang.Object{} - export class Obstacle { - /** - * Creates a new {@link yfiles.router.Obstacle} instance with the given bounds and additional data. - * @param bounds the bounds of the obstacle - * @param data the additional data associated to the obstacle - */ - constructor(bounds:yfiles.algorithms.YRectangle,data:any); - /** - * Gets the bounds of the obstacle. - * @type {yfiles.algorithms.YRectangle} - */ - bounds:yfiles.algorithms.YRectangle; - /** - * Gets the additional data related to the obstacle. - * @type {any} - */ - data:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.Obstacle; - } - /** - * A horizontal or vertical {@link yfiles.router.Interval} that additionally stores a y- (in the horizontal case) or x-coordinate - * (in the vertical case). - *

- * During a {@link yfiles.router.PathSearch}, orthogonal intervals are used for specifying the location where an edge enters or - * exits a {@link yfiles.router.PartitionCell partition cell}. - *

- * @see yfiles.router.PathSearch - * @class - */ - export interface OrthogonalInterval extends yfiles.lang.Object{} - export class OrthogonalInterval { - /** - * Creates a new {@link yfiles.router.OrthogonalInterval} instance using the from and to value as interval bounds. - * @param from the start of the interval bounds - * @param to the end of the interval bounds - * @param location the location in the two-dimensional coordinate system - * @param isVertical true if the orthogonal interval is vertical, false if it is horizontal - * @throws {Stubs.Exceptions.ArgumentError} if the given range is null - */ - constructor(from:number,to:number,location:number,isVertical:boolean); - /** - * Creates a new {@link yfiles.router.OrthogonalInterval} instance with the given interval bounds. - * @param range the given range - * @param location the location in the two-dimensional coordinate system - * @param isVertical true if the orthogonal interval is vertical, false if it is horizontal - * @throws {Stubs.Exceptions.ArgumentError} if the given range is null - */ - constructor(range:yfiles.router.Interval,location:number,isVertical:boolean); - /** - * Calculates the intersection of the given {@link yfiles.router.OrthogonalInterval orthogonal intervals}. - *

- * If the returned orthogonal interval is vertical, it will have the same horizontal location as i2 and the shared vertical - * range of both intervals. If it is horizontal, it will have the same vertical location as i2 and the shared horizontal - * range of both intervals. The orthogonal intervals must have same orientation. - *

- * @param i1 the first orthogonal interval - * @param i2 the second orthogonal interval - * @returns the shared orthogonal interval of both given orthogonal intervals - * @throws {Stubs.Exceptions.ArgumentError} if the orthogonal intervals have different orientations - * @see yfiles.router.OrthogonalInterval#intersects - * @static - */ - static calculateIntersection(i1:yfiles.router.OrthogonalInterval,i2:yfiles.router.OrthogonalInterval):yfiles.router.OrthogonalInterval; - /** - * Calculates the union of the given {@link yfiles.router.OrthogonalInterval orthogonal intervals}. - *

- * If the returned orthogonal interval is vertical, it will have the same horizontal location as i2 and the shared vertical - * range of both orthogonal intervals. If it is horizontal, it will have the same vertical location as i2 and the shared - * vertical range of both orthogonal intervals. The orthogonal intervals must have same orientation. - *

- * @param i1 the first orthogonal interval - * @param i2 the second orthogonal interval - * @returns the union of both given orthogonal intervals - * @throws {Stubs.Exceptions.ArgumentError} if the orthogonal intervals have different orientations - * @see yfiles.router.OrthogonalInterval#intersects - * @static - */ - static calculateUnion(i1:yfiles.router.OrthogonalInterval,i2:yfiles.router.OrthogonalInterval):yfiles.router.OrthogonalInterval; - /** - * Checks whether or not this {@link yfiles.router.OrthogonalInterval orthogonal interval} is fully covered by the given {@link yfiles.router.OrthogonalInterval orthogonal interval}. - *

- * The given orthogonal interval covers this orthogonal interval, if this interval's range is covered by the given - * interval's range. The location of both orthogonal intervals is ignored. The orthogonal intervals must have the same - * orientation. - *

- * @param other the other orthogonal interval - * @returns true if this orthogonal interval is fully covered by the other orthogonal interval, false otherwise - * @throws {Stubs.Exceptions.ArgumentError} if the orthogonal intervals have different orientations - * @see yfiles.router.PartitionCell - */ - coveredBy(other:yfiles.router.OrthogonalInterval):boolean; - /** - * Determines whether or not this {@link yfiles.router.OrthogonalInterval orthogonal interval} crosses the given one. - *

- * The orthogonal intervals must have different orientations. - *

- * @param other the other orthogonal interval - * @returns true if this orthogonal interval crosses the given one, false otherwise - * @throws {Stubs.Exceptions.ArgumentError} if the given orthogonal intervals have the same orientation - */ - crosses(other:yfiles.router.OrthogonalInterval):boolean; - /** - * Returns the distance of the {@link yfiles.router.OrthogonalInterval#range ranges} of this {@link yfiles.router.OrthogonalInterval orthogonal interval} and the given {@link yfiles.router.OrthogonalInterval orthogonal interval}. - *

- * The orthogonal intervals must have the same orientation. - *

- * @param other the other orthogonal interval - * @returns 0 if the orthogonal intervals {@link #intersects intersect} each other, otherwise the minimal distance between the orthogonal intervals is - * returned - * @throws {Stubs.Exceptions.ArgumentError} if the orthogonal intervals have different orientations - */ - distanceTo(other:yfiles.router.OrthogonalInterval):number; - /** - * Checks whether or not this {@link yfiles.router.OrthogonalInterval orthogonal interval} and the given {@link yfiles.router.OrthogonalInterval orthogonal interval} cover the same range. - *

- * If both orthogonal intervals cover the same range, they are considered the same. The location of both orthogonal - * intervals is ignored. The orthogonal intervals must have the same orientation. - *

- * @param other the other orthogonal interval - * @returns true if the orthogonal intervals cover the same range, false otherwise - * @throws {Stubs.Exceptions.ArgumentError} if the orthogonal intervals have different orientations - * @see yfiles.router.PartitionCell - */ - hasSameRange(other:yfiles.router.OrthogonalInterval):boolean; - /** - * Checks whether or not this {@link yfiles.router.OrthogonalInterval orthogonal interval} intersects the given {@link yfiles.router.OrthogonalInterval orthogonal interval} and the intersection has a given - * minimum intersection size. - *

- * Orthogonal intervals intersect each other, if their ranges intersect each other by at least the given minimum - * intersection size. The location of both orthogonal intervals is ignored. The orthogonal intervals must have the same - * orientation. - *

- * @param other the other orthogonal interval - * @param [minIntersection=0] the minimum size of the intersection - * @returns true if this interval intersects the given other orthogonal interval, false otherwise - * @throws {Stubs.Exceptions.ArgumentError} if the orthogonal intervals have different orientations - * @see yfiles.router.PartitionCell - */ - intersects(other:yfiles.router.OrthogonalInterval,minIntersection?:number):boolean; - /** - * Returns the Manhattan distance of this {@link yfiles.router.OrthogonalInterval orthogonal interval} and the given {@link yfiles.router.OrthogonalInterval orthogonal interval}. - *

- * If both intervals have the same orientation, the Manhattan distance is the sum of the distance between the intervals' - * ranges and the distance between the intervals' locations. - *

- *

- * If the intervals have different orientations, the Manhattan distance is the sum of the distances between one interval's - * range and the other interval's location. - *

- * @param other the other orthogonal interval - * @returns the Manhattan distance between this interval and the given one - */ - manhattanDistanceTo(other:yfiles.router.OrthogonalInterval):number; - /** - * Gets whether or not the {@link yfiles.router.OrthogonalInterval orthogonal interval} is oriented vertically. - * @type {boolean} - */ - vertical:boolean; - /** - * Gets the lower bound of the {@link yfiles.router.OrthogonalInterval orthogonal interval}. - * @type {number} - */ - min:number; - /** - * Gets the upper bound of the {@link yfiles.router.OrthogonalInterval orthogonal interval}. - * @type {number} - */ - max:number; - /** - * Gets the length of the {@link yfiles.router.OrthogonalInterval orthogonal interval}. - * @see yfiles.router.Interval#size - * @type {number} - */ - size:number; - /** - * Gets the range of this {@link yfiles.router.OrthogonalInterval orthogonal interval}. - * @type {yfiles.router.Interval} - */ - range:yfiles.router.Interval; - /** - * Gets the vertical coordinate for horizontal intervals or the horizontal coordinate for vertical intervals, - * respectively. - * @type {number} - */ - location:number; - /** - * Gets the center of this {@link yfiles.router.OrthogonalInterval orthogonal interval} in the 2D-coordinate system. - * @type {yfiles.algorithms.YPoint} - */ - center:yfiles.algorithms.YPoint; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.OrthogonalInterval; - } - /** - * This class is a type-safe enumeration used for defining the border of a {@link yfiles.router.PartitionCell}. - * @see yfiles.router.PartitionCell#createBorderInterval - * @class - */ - export interface PartitionCellBorder extends yfiles.lang.Object{} - export class PartitionCellBorder { - /** - * Returns the type of the border that is passed through when entering a {@link yfiles.router.PartitionCell} in the given - * direction. - * @param direction the direction in which a {@link } has been entered - * @returns the type of the border that is passed through when entering a {@link } - * @see yfiles.router.PartitionCell - * @static - */ - static valueOfEnterDirection(direction:yfiles.layout.Direction):yfiles.router.PartitionCellBorder; - /** - * Returns the type of the border that is passed through when exiting a {@link yfiles.router.PartitionCell} in the given - * direction. - * @param direction the direction in which a {@link } has been exited - * @returns the type of the border that is passed through when exiting a {@link } - * @see yfiles.router.PartitionCell - * @static - */ - static valueOfExitDirection(direction:yfiles.layout.Direction):yfiles.router.PartitionCellBorder; - /** - * Returns the type of the border that is defined by the given {@link yfiles.layout.PortCandidate}. - *

- * The border type corresponds to the {@link yfiles.layout.PortCandidate#direction direction} of the given {@link yfiles.layout.PortCandidate}. - *

- * @param pc the port candidate for which the border type is returned - * @returns the type of the border that is defined by the given port candidate - * @see yfiles.layout.PortCandidate - * @static - */ - static valueOfPortCandidate(pc:yfiles.layout.PortCandidate):yfiles.router.PartitionCellBorder; - /** - * Returns the type of the border that is defined by the given {@link yfiles.layout.PortConstraint}. - *

- * The border type corresponds to the {@link yfiles.layout.PortConstraint#side side} of the given {@link yfiles.layout.PortConstraint}. - *

- * @param pc the port constraint for which the border type is returned - * @returns the type of the border that is defined by the given port constraint - * @see yfiles.layout.PortConstraint - * @static - */ - static valueOfPortConstraint(pc:yfiles.layout.PortConstraint):yfiles.router.PartitionCellBorder; - /** - * A type constant that defines the upper border of a {@link yfiles.router.PartitionCell}. - * @see yfiles.router.PartitionCell#createBorderInterval - * @const - * @static - * @type {yfiles.router.PartitionCellBorder} - */ - static NORTH:yfiles.router.PartitionCellBorder; - /** - * A type constant that defines the bottom border of a {@link yfiles.router.PartitionCell}. - * @see yfiles.router.PartitionCell#createBorderInterval - * @const - * @static - * @type {yfiles.router.PartitionCellBorder} - */ - static SOUTH:yfiles.router.PartitionCellBorder; - /** - * A type constant that defines the right border of a {@link yfiles.router.PartitionCell}. - * @see yfiles.router.PartitionCell#createBorderInterval - * @const - * @static - * @type {yfiles.router.PartitionCellBorder} - */ - static EAST:yfiles.router.PartitionCellBorder; - /** - * A type constant that defines the left border of a {@link yfiles.router.PartitionCell}. - * @see yfiles.router.PartitionCell#createBorderInterval - * @const - * @static - * @type {yfiles.router.PartitionCellBorder} - */ - static WEST:yfiles.router.PartitionCellBorder; - /** - * Gets the type of the border that is on the opposite side of the border defined by this type. - * @type {yfiles.router.PartitionCellBorder} - */ - mirrorBorder:yfiles.router.PartitionCellBorder; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.PartitionCellBorder; - } - /** - * A {@link yfiles.router.PartitionCell} represents a rectangular part of a {@link yfiles.router.IPartition} as result of the decomposition - * process. - *

- * Each instance of {@link yfiles.router.PartitionCell} can hold arbitrary additional information (e.g. what element of the graph - * is covered by a {@link yfiles.router.PartitionCell}) which can be provided using method {@link yfiles.router.PartitionCell#putData}. - * Accessing and removing this information can be done using {@link yfiles.router.PartitionCell#getData} and - * {@link yfiles.router.PartitionCell#removeData}, respectively. - *

- * @see yfiles.router.PartitionCellKeys - * @class - */ - export interface PartitionCell extends yfiles.lang.Object{} - export class PartitionCell { - /** - * Creates a new {@link yfiles.router.PartitionCell} instance of the given {@link yfiles.router.IPartition} with the given bounds. - * @param x the x-coordinate of the upper-left corner of the partition cell - * @param y the y-coordinate of the upper-left corner of the partition cell - * @param width the width of the partition cell - * @param height the height of the partition cell - * @param partition the partition to which the partition cell belongs - * @see yfiles.router.IPartition - */ - constructor(x:number,y:number,width:number,height:number,partition:yfiles.router.IPartition); - /** - * Creates a new {@link yfiles.router.PartitionCell} of the given {@link yfiles.router.IPartition} with the location and the size of the - * given rectangle. - * @param bounds the bounds describing the size and location of the partition cell - * @param partition the partition to which the partition cell belongs - * @see yfiles.router.IPartition - */ - constructor(bounds:yfiles.algorithms.YRectangle,partition:yfiles.router.IPartition); - /** - * Clears all additional data for this {@link yfiles.router.PartitionCell}. - * @see yfiles.router.PartitionCell#getData - * @see yfiles.router.PartitionCell#putData - * @see yfiles.router.PartitionCell#removeData - */ - clearData():void; - /** - * Returns an {@link yfiles.router.OrthogonalInterval} that defines the location, the size and the orientation of the given - * {@link yfiles.router.PartitionCellBorder}. - *

- * The values defining the border are: - *

- *
    - *
  • {@link yfiles.router.PartitionCellBorder#WEST}
  • - *
  • {@link yfiles.router.PartitionCellBorder#EAST}
  • - *
  • {@link yfiles.router.PartitionCellBorder#NORTH}
  • - *
  • {@link yfiles.router.PartitionCellBorder#SOUTH}
  • - *
- * @param border a border of this partition cell - * @returns an {@link } that defines the location, the size and the orientation of the given border - * @see yfiles.router.PartitionCellBorder - */ - createBorderInterval(border:yfiles.router.PartitionCellBorder):yfiles.router.OrthogonalInterval; - /** - * Returns the additional data associated with the given key for this {@link yfiles.router.PartitionCell}. - * @param key the key whose associated data will be returned - * @returns the additional data associated with the given key or null if there is no data associated with the given key - * @see yfiles.router.PartitionCell#putData - * @see yfiles.router.PartitionCell#removeData - * @see yfiles.router.PartitionCell#clearData - * @see yfiles.router.PartitionCellKeys - */ - getData(key:any):any; - /** - * Stores the additional data associated with the given key for this {@link yfiles.router.PartitionCell}. - * @param key the key with which the additional data will be associated - * @param data the additional data - * @returns the previous data associated with the given key or null if there was no data associated with the given key - * @see yfiles.router.PartitionCell#getData - * @see yfiles.router.PartitionCell#removeData - * @see yfiles.router.PartitionCell#clearData - * @see yfiles.router.PartitionCellKeys - */ - putData(key:any,data:any):any; - /** - * Removes the additional data associated with the given key for this {@link yfiles.router.PartitionCell}. - * @param key the key for which the associated data will be removed - * @returns the additional data associated with the given key or null if there is no data associated with the given key - * @see yfiles.router.PartitionCell#getData - * @see yfiles.router.PartitionCell#putData - * @see yfiles.router.PartitionCell#clearData - * @see yfiles.router.PartitionCellKeys - */ - removeData(key:any):any; - /** - * Gets the {@link yfiles.router.IPartition partition} to which this {@link yfiles.router.PartitionCell} belongs. - * @see yfiles.router.IPartition - * @type {yfiles.router.IPartition} - */ - partition:yfiles.router.IPartition; - /** - * Gets a unique identifier of this {@link yfiles.router.PartitionCell}. - * @type {number} - */ - id:number; - /** - * Gets the bounds of this {@link yfiles.router.PartitionCell}. - * @type {yfiles.algorithms.YRectangle} - */ - bounds:yfiles.algorithms.YRectangle; - /** - * Gets the x-coordinate of the left border of this {@link yfiles.router.PartitionCell}. - * @type {number} - */ - minX:number; - /** - * Gets the y-coordinate of the upper border of this {@link yfiles.router.PartitionCell}. - * @type {number} - */ - minY:number; - /** - * Gets the x-coordinate of the right border of this {@link yfiles.router.PartitionCell}. - * @type {number} - */ - maxX:number; - /** - * Gets the y-coordinate of the bottom border of this {@link yfiles.router.PartitionCell}. - * @type {number} - */ - maxY:number; - /** - * Gets the width of this {@link yfiles.router.PartitionCell}. - * @type {number} - */ - width:number; - /** - * Gets the height of this {@link yfiles.router.PartitionCell}. - * @type {number} - */ - height:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.PartitionCell; - } - /** - * This class defines keys to obtain additional information about a {@link yfiles.router.PartitionCell}. - *

- * In order to get the data of the {@link yfiles.router.PartitionCell} that is associated with the given key, method {@link yfiles.router.PartitionCell#getData} - * should be used. - *

- * @class - * @static - */ - export interface PartitionCellKeys extends yfiles.lang.Object{} - export class PartitionCellKeys { - /** - * The key references a {@link yfiles.collections.IList.} of nodes whose bounds are covering a certain {@link yfiles.router.PartitionCell}. - * @const - * @static - * @type {any} - */ - static NODES_KEY:any; - /** - * The key references a {@link yfiles.collections.IList.} of nodes being in node to edge distance to a certain {@link yfiles.router.PartitionCell}. - * @const - * @static - * @type {any} - */ - static NODES_IN_NODE_TO_EDGE_DISTANCE_KEY:any; - /** - * The key references a {@link yfiles.collections.IList.} of {@link yfiles.layout.INodeLabelLayout}s covering a certain {@link yfiles.router.PartitionCell}. - * @const - * @static - * @type {any} - */ - static NODE_LABEL_LAYOUTS_KEY:any; - /** - * The key references a {@link yfiles.collections.IList.} of {@link number} values representing factors that are multiplied by an edge's {@link yfiles.router.PenaltySettings#nodeLabelCrossingPenalty node label crossing costs} in case - * the edge crosses the corresponding {@link yfiles.layout.INodeLabelLayout node label} registered with key - * {@link yfiles.router.PartitionCellKeys#NODE_LABEL_LAYOUTS_KEY}. - * @const - * @static - * @type {any} - */ - static NODE_LABEL_CROSSING_COST_FACTORS_KEY:any; - /** - * The key references a {@link yfiles.collections.IList.} of {@link yfiles.layout.IEdgeLabelLayout}s covering a certain {@link yfiles.router.PartitionCell}. - * @const - * @static - * @type {any} - */ - static EDGE_LABEL_LAYOUTS_KEY:any; - /** - * The key references a {@link yfiles.collections.IList.} of {@link number} values representing factors that are multiplied by an edge's {@link yfiles.router.PenaltySettings#edgeLabelCrossingPenalty edge label crossing costs} in case - * the edge crosses the corresponding {@link yfiles.layout.IEdgeLabelLayout edge label} registered with key - * {@link yfiles.router.PartitionCellKeys#EDGE_LABEL_LAYOUTS_KEY}. - * @const - * @static - * @type {any} - */ - static EDGE_LABEL_CROSSING_COST_FACTORS_KEY:any; - /** - * The key references the {@link yfiles.layout.PartitionCellId} of the {@link yfiles.layout.PartitionGrid} cell covering a certain - * {@link yfiles.router.PartitionCell}. - * @const - * @static - * @type {any} - */ - static PARTITION_GRID_CELL_ID_KEY:any; - /** - * The key references the row index of the {@link yfiles.layout.PartitionGrid} cell covering a certain - * {@link yfiles.router.PartitionCell}. - * @const - * @static - * @type {any} - */ - static PARTITION_GRID_ROW_INDEX_KEY:any; - /** - * The key references the column index of the {@link yfiles.layout.PartitionGrid} cell covering a certain - * {@link yfiles.router.PartitionCell}. - * @const - * @static - * @type {any} - */ - static PARTITION_GRID_COLUMN_INDEX_KEY:any; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.PartitionCellKeys; - } - /** - * A {@link yfiles.router.Path} represents the result of a path search as a list of consecutive {@link yfiles.router.CellEntrance}s. - *

- * A path starts with a {@link yfiles.router.CellEntrance} for a {@link yfiles.router.PartitionCell} of the source node and ends with one - * for a {@link yfiles.router.PartitionCell} of the target node. - *

- * @see yfiles.router.PathSearch - * @see yfiles.router.PathSearchResult - * @class - */ - export interface Path extends yfiles.lang.Object{} - export class Path { - /** - * Creates a new instance of {@link yfiles.router.Path} for the given edge, {@link yfiles.router.CellEntrance cell entrances} and cost. - * @param edge the edge for which the path was calculated - * @param entrances the list of {@link } objects describing the edge path from source node to target node - * @param cost the overall cost of this path - */ - constructor(edge:yfiles.algorithms.Edge,entrances:yfiles.collections.IList,cost:number); - /** - * Returns the {@link yfiles.router.CellEntrance} at the given position of this path. - * @param position the position of the {@link } to return - * @returns the {@link } at the given position of this path - * @see yfiles.router.Path#setEntrance - */ - getEntrance(position:number):yfiles.router.CellEntrance; - /** - * Returns the number of {@link yfiles.router.CellEntrance} objects in this path. - * @returns the number of {@link } objects in this path - */ - length():number; - /** - * Returns the position of the first occurrence of the given {@link yfiles.router.CellEntrance} in this path, or -1 if this path - * does not contain this {@link yfiles.router.CellEntrance}. - * @param entrance the {@link } for which the position is retrieved - * @returns the position of the first occurrence of the given {@link } in this path, or -1 if this path does not - * contain this {@link } - */ - positionOf(entrance:yfiles.router.CellEntrance):number; - /** - * Replaces the {@link yfiles.router.CellEntrance} at the given position of this path with the given {@link yfiles.router.CellEntrance}. - * @param position the position of the {@link } to replace - * @param entrance the {@link } to be stored at the given position - * @see yfiles.router.Path#getEntrance - */ - setEntrance(position:number,entrance:yfiles.router.CellEntrance):void; - /** - * Gets the edge for which this path was calculated. - * @type {yfiles.algorithms.Edge} - */ - edge:yfiles.algorithms.Edge; - /** - * Gets the overall cost of this path. - * @type {number} - */ - cost:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.Path; - } - /** - * This is a pathfinding algorithm that calculates the shortest (i.e., the cheapest) paths for a set of edges through a - * {@link yfiles.router.GraphPartition}. - *

- * It is based on an A*-algorithm and uses {@link yfiles.router.PartitionCell}s as steps between source node and target node. - *

- *

- * In each step, the algorithm takes a {@link yfiles.router.CellEntrance}, that consists mainly of a {@link yfiles.router.PartitionCell} - * and from where it was entered, from a queue with all seen {@link yfiles.router.CellEntrance}s, determines all possible neighbor - * cells and their enter intervals and enqueues the resulting {@link yfiles.router.CellEntrance}. To influence the order in which - * the {@link yfiles.router.CellEntrance}s will be processed, the path search assigns real costs (like Dijkstra) as well as - * heuristic costs (A*-algorithm's heuristic) to the enqueued {@link yfiles.router.CellEntrance}s. The real costs arise from - * entering a neighbor cell, e.g., a bend has to be created, while the heuristic costs are an estimation of how expensive - * it will be to reach the target node continuing the path with this neighboring cell. Therefore, the path search prefers - * searching in the direction in which the target node lies. The {@link yfiles.router.CellEntrance} with the lowest combined costs - * is processed next until the target cell is reached. - *

- *

- * {@link yfiles.router.PathSearchExtension}s modify the path search as they are able to add start entrances and weight them with - * costs. They also add real and heuristic costs to {@link yfiles.router.CellEntrance}s that are created for the currently entered - * {@link yfiles.router.PartitionCell} and calculate shorter enter intervals that are less expensive to pass. - *

- *

- * The algorithm gets a {@link yfiles.router.PathSearchContext} which provides information about the graph and the currently routed - * edge. It stores the results of the path search that can then be retrieved calling {@link yfiles.router.PathSearchContext#pathSearchResult}. - *

- * @see yfiles.router.PathSearch#addPathSearchExtension - * @see yfiles.router.PathSearch#addAdditionalEnterIntervalCalculator - * @class - */ - export interface PathSearch extends yfiles.lang.Object{} - export class PathSearch { - /** - * Creates a new instance of {@link yfiles.router.PathSearch}. - */ - constructor(); - /** - * Adds a new interval calculator to the list of registered {@link yfiles.router.IEnterIntervalCalculator}s. - *

- * {@link yfiles.router.IEnterIntervalCalculator}s may add - * {@link yfiles.router.CellEntrance}s with narrowed intervals to the queue. The interval is more specific and will be judged with - * lower costs. - *

- * @param enterIntervalCalculator the calculator to add - * @returns true if the calculator was successfully added, false otherwise - */ - addAdditionalEnterIntervalCalculator(enterIntervalCalculator:yfiles.router.IEnterIntervalCalculator):boolean; - /** - * Adds the given extension to the list of {@link yfiles.router.PathSearchExtension}s. - *

- * An extension can influence the pathfinding process by adding costs for entering certain {@link yfiles.router.CellEntrance}s. - *

- * @param extension the extension to add to this path search - * @returns true if the extension has been added, false otherwise - */ - addPathSearchExtension(extension:yfiles.router.PathSearchExtension):boolean; - /** - * Calculates the costs for moving from the current {@link yfiles.router.CellEntrance} to the neighboring {@link yfiles.router.PartitionCell} - * using different enter intervals. - *

- * It is called by {@link yfiles.router.PathSearch#handleNeighbor} to determine the costs for all - * {@link yfiles.router.CellEntrance}s that it will create and enqueue afterwards. - *

- *

- * The costs for the given enter intervals are retrieved from all registered - * {@link yfiles.router.PathSearchExtension}s. The calculation stops when it reaches the given maximum cost value. - *

- * @param currentEntrance the current cell entrance - * @param enteredCell the partition cell to enter - * @param enterIntervals the different entering intervals of the entered cell - * @param lastEdgeCellInfos the information about how the last cell was crossed - * @param context the context information - * @param costs the array in which the calculated costs for entering the neighbor cell via the according enter intervals shall be - * written - * @param maxAllowedCosts the maximum costs an enter interval may induce. If this cost is exceeded, no further additional costs for this interval - * are calculated. Note that the entries in this array get modified during cost calculation - * @see yfiles.router.PathSearchExtension#calculateCosts - * @protected - */ - calculateCosts(currentEntrance:yfiles.router.CellEntrance,enteredCell:yfiles.router.PartitionCell,enterIntervals:yfiles.router.OrthogonalInterval[],lastEdgeCellInfos:yfiles.router.EdgeCellInfo[],context:yfiles.router.PathSearchContext,costs:number[],maxAllowedCosts:number[]):void; - /** - * Returns the estimated costs for the rest of the path when using the given {@link yfiles.router.CellEntrance} for the next step - * in the path search. - *

- * It is called by {@link yfiles.router.PathSearch#handleNeighbor} to determine the heuristic part of the costs with which the - * entrance will be enqueued. - *

- *

- * The heuristic costs for the given entrance are retrieved from all registered {@link yfiles.router.PathSearchExtension}s. - *

- * @param entrance the current entrance - * @param context the context information - * @returns the heuristic costs for the rest of the path if the given entrance is used - * @see yfiles.router.PathSearchExtension#calculateHeuristicCosts - * @protected - */ - calculateHeuristicCosts(entrance:yfiles.router.CellEntrance,context:yfiles.router.PathSearchContext):number; - /** - * Resets all registered {@link yfiles.router.PathSearchExtension}s and {@link yfiles.algorithms.DataProviders} added to this - * {@link yfiles.router.PathSearch}. - *

- * So, {@link yfiles.router.PathSearch} is ready to calculate paths for a new layout. - *

- * @see yfiles.router.PathSearchExtension#cleanUp - */ - clear():void; - /** - * Decreases the given penalty settings for the current edge. - *

- * If finding a path for the current edge takes too long according to the {@link yfiles.router.EdgeRouter#maximumDuration maximum duration} of the {@link yfiles.router.EdgeRouter edge routing algorithm}, - * the path search for the current edge is canceled and restarted using decreased penalties. The decreaseFactor indicates, - * how much the penalties shall be reduced. - *

- *

- * This method is called by - * {@link yfiles.router.PathSearch#findPathsForCurrentEdge}. If overriding this method, note that the penalty for creating bends - * should not be reduced as this results in more possible turns of the edge path and, therefore, a longer runtime of the - * path search. Furthermore, not all penalties should be decreased equally as these decreases would neutralize each other. - *

- *

- * The decreaseFactor takes values from [0,1], where 0 means no reduction while 1 means the strongest reduction. - *

- * @param penaltySettings the penalty settings whose penalties shall be reduced - * @param decreaseFactor the factor with values between 0 and 1 that indicates how strong to reduce the penalties - * @param context the context information of the current path search - * @protected - */ - decreasePenaltySettings(penaltySettings:yfiles.router.PenaltySettings,decreaseFactor:number,context:yfiles.router.PathSearchContext):void; - /** - * Informs all registered path search extensions about completing a path by calling their {@link yfiles.router.PathSearchExtension#finalizePath finalizePath(Path)} method. - *

- * That way, extensions can collect data about this path to use it later during path search. - *

- *

- * This method is called by {@link yfiles.router.PathSearch#findPathsForCurrentEdge} and may be overridden to use a custom - * finalization step. - *

- * @param path the path to finalize - * @protected - */ - finalizePath(path:yfiles.router.Path):void; - /** - * Finds paths for the edges in the given context and stores them in its {@link yfiles.router.PathSearchContext#pathSearchResult PathSearchResult}. - *

- * This is the main method of {@link yfiles.router.PathSearch}. - *

- *

- * It initializes its extensions using {@link yfiles.router.PathSearchExtension#initializeEdges} and delegates the path search for - * each edge to {@link yfiles.router.PathSearch#findPathsForCurrentEdge}. - *

- *

- * The path calculations for all edges are finalized by calling the extensions' {@link yfiles.router.PathSearchExtension#finalizeEdges} - * method and, after that, the path search result is filled with the path for each edge. - *

- *

- * At last, the extensions are asked to finalize the path search result using their {@link yfiles.router.PathSearchExtension#finalizePathSearchResult} - * callback. - *

- * @param context the context to use during the path search - * @see yfiles.router.PathSearchContext#edges - * @see yfiles.router.PathSearchContext#pathSearchResult - */ - findPaths(context:yfiles.router.PathSearchContext):void; - /** - * Finds the path for the current edge in the given context. - *

- * This method: - *

- *
    - *
  • Calls {@link yfiles.router.PathSearchExtension#initializeCurrentEdge} for all extensions.
  • - *
  • Collects and enqueues all start entrances.
  • - *
  • Iteratively processes the next cheapest cell entrance and
  • - *
  • Calls {@link yfiles.router.PathSearchExtension#finalizeCurrentEdge} for all extensions.
  • - *
- *

- * It is called by {@link yfiles.router.PathSearch#findPaths} and may be overridden to skip certain edges or implement a custom - * path search. - *

- * @param context the context information needed for finding a path - * @protected - */ - findPathsForCurrentEdge(context:yfiles.router.PathSearchContext):void; - /** - * Returns the path for the given edge if it has already been finalized. - *

- * The path is finalized if the {@link yfiles.router.PathSearch} chose it as the best result for the edge. - *

- * @param edge the edge for which the path is returned - * @returns the finalized path for the given edge or null if no path has been found and finalized - */ - getFinalizedPath(edge:yfiles.algorithms.Edge):yfiles.router.Path; - /** - * Adds - * {@link yfiles.router.CellEntrance}s for every interval through which the neighboring cell can be entered from the current - * entrance to the queue. - *

- * The algorithm calls this method in every step for each neighbor of the current cell to collect all next possible - * entrances for the current path. This path consists of several entrances where each knows the entrance through which it - * has been entered. - *

- *

- * After calculating all possible enter intervals to the given neighboring cell, each interval gets rated with costs. If - * there is already an entrance for the neighboring cell whose interval is the same with one of these intervals, this - * entrance will be used and re-enqueued, so that the path search can still reach it. The current entrance is set as its - * predecessor within the current path and its enter interval and costs will be updated. - *

- *

- * If there is an entrance for the neighboring cell whose interval is intersected by a current interval, new entrances will - * be created with the new enter intervals and enqueued. The same happens if there is no entrance that has been matched - * with one of the current intervals, yet. Costs will be added. If there are some entries afterwards that are intersected - * by the current interval and have higher costs, they will be removed from the queue. - *

- *

- * This method is called during cost calculation. It may be overridden to change the interval handling for the - * {@link yfiles.router.CellEntrance}s. - *

- * @param currentEntrance the current cell entrance - * @param neighborCell the neighboring cell that is handled. - * @param context the context information - * @see yfiles.router.PathSearch#calculateCosts - * @see yfiles.router.PathSearch#calculateHeuristicCosts - * @protected - */ - handleNeighbor(currentEntrance:yfiles.router.CellEntrance,neighborCell:yfiles.router.PartitionCell,context:yfiles.router.PathSearchContext):void; - /** - * Initializes the fields of this {@link yfiles.router.PathSearch}. - *

- * This method also calls {@link yfiles.router.PathSearchExtension#initialize} for all registered path search extensions. - *

- * @param configuration the configuration that the path search shall use - */ - init(configuration:yfiles.router.PathSearchConfiguration):void; - /** - * Removes the given interval calculator from the list of registered {@link yfiles.router.IEnterIntervalCalculator}s. - * @param enterIntervalCalculator the calculator to remove - * @returns true if an interval calculator was removed as a result of this call, false if the given calculator was not part of the - * list - */ - removeAdditionalEnterIntervalCalculator(enterIntervalCalculator:yfiles.router.IEnterIntervalCalculator):boolean; - /** - * Removes the given extension from the list of {@link yfiles.router.PathSearchExtension}s. - * @param extension the extension to remove from the path search - * @returns true if an extension was removed as a result of this call, false if the given extension was not contained in the list - */ - removePathSearchExtension(extension:yfiles.router.PathSearchExtension):boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.PathSearch; - } - /** - * This class contains the basic configuration used by path search algorithms. - * @class - */ - export interface PathSearchConfiguration extends yfiles.lang.Object{} - export class PathSearchConfiguration { - /** - * Creates a new instance of {@link yfiles.router.PathSearchConfiguration} used for a path search. - * @param graph the graph containing the edges whose path will be searched - * @param grouping the grouping information of the graph - * @param edgeRouter the edge routing algorithm using this configuration - */ - constructor(graph:yfiles.layout.LayoutGraph,grouping:yfiles.layout.GroupingSupport,edgeRouter:yfiles.router.EdgeRouter); - /** - * Gets the graph containing the edges whose path is searched. - * @type {yfiles.layout.LayoutGraph} - */ - graph:yfiles.layout.LayoutGraph; - /** - * Gets the grouping information of the graph. - * @type {yfiles.layout.GroupingSupport} - */ - grouping:yfiles.layout.GroupingSupport; - /** - * Gets the edge routing algorithm using this configuration. - * @type {yfiles.router.EdgeRouter} - */ - edgeRouter:yfiles.router.EdgeRouter; - /** - * Gets the remaining time (in milliseconds) within which the algorithm should complete its calculation. - * @type {number} - */ - remainingTime:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.PathSearchConfiguration; - } - /** - * This class provides context information that is useful for the {@link yfiles.router.PathSearch} algorithm. - *

- * Most notably, the context provides access to the edge that is currently being routed (see {@link yfiles.router.PathSearchContext#currentEdge}). - *

- * @class - */ - export interface PathSearchContext extends yfiles.lang.Object{} - export class PathSearchContext { - /** - * Creates a new instance of {@link yfiles.router.PathSearchContext}. - * @param pathSearch the path search that uses this context - * @param configuration the configuration used for the path search - */ - constructor(pathSearch:yfiles.router.PathSearch,configuration:yfiles.router.PathSearchConfiguration); - /** - * Adds an additional source cell of the {@link yfiles.router.PathSearchContext#currentEdge current edge} if it is not already contained in the list of source cells. - * @param cell the new source cell to add - * @see yfiles.router.PathSearchContext#sourceCellCount - * @see yfiles.router.PathSearchContext#getSourceCell - */ - addSourceCell(cell:yfiles.router.PartitionCell):void; - /** - * Adds an additional target cell of the {@link yfiles.router.PathSearchContext#currentEdge current edge} if it is not already contained in the list of target cells. - * @param cell the new target cell to add - * @see yfiles.router.PathSearchContext#targetCellCount - * @see yfiles.router.PathSearchContext#getTargetCell - */ - addTargetCell(cell:yfiles.router.PartitionCell):void; - /** - * Returns the source cell with the given index in the list of all cells that are covered by the source node of the - * {@link yfiles.router.PathSearchContext#currentEdge current edge}. - * @param index the index of the source cell - * @returns the source cell with the given index in the list of all source cells - */ - getSourceCell(index:number):yfiles.router.PartitionCell; - /** - * Returns the target cell with the given index in the list of all cells that are covered by the target node of the - * {@link yfiles.router.PathSearchContext#currentEdge current edge}. - * @param index the index of the target cell - * @returns the target cell with the given index in the list of all cells that are covered by the target node of the {@link #currentEdge current edge} - */ - getTargetCell(index:number):yfiles.router.PartitionCell; - /** - * Determines whether or not the given cell is a source cell of the {@link yfiles.router.PathSearchContext#currentEdge current edge}. - * @param cell the cell - * @returns true if the given cell is in the list of source cells, false otherwise - * @see yfiles.router.PathSearchContext#sourceCellCount - * @see yfiles.router.PathSearchContext#getSourceCell - */ - isSourceCell(cell:yfiles.router.PartitionCell):boolean; - /** - * Determines whether or not the given cell is a target cell of the {@link yfiles.router.PathSearchContext#currentEdge current edge}. - * @param cell the cell - * @returns true if the given cell is in the list of target cells, false otherwise - * @see yfiles.router.PathSearchContext#targetCellCount - * @see yfiles.router.PathSearchContext#getTargetCell - */ - isTargetCell(cell:yfiles.router.PartitionCell):boolean; - /** - * Specifies the edges that shall be routed. - * @param edges the list of edges that shall be routed - */ - setEdges(edges:yfiles.algorithms.EdgeList):void; - /** - * Returns the number of all cells that are covered by the source node of the {@link yfiles.router.PathSearchContext#currentEdge current edge}. - * @returns the number of all cells that are covered by the source node - */ - sourceCellCount():number; - /** - * Returns the number of all cells that are covered by the target node of the {@link yfiles.router.PathSearchContext#currentEdge current edge}. - * @returns the number of all cells that are covered by the target node - */ - targetCellCount():number; - /** - * Gets the {@link yfiles.router.PathSearch} that uses this context. - * @type {yfiles.router.PathSearch} - */ - pathSearch:yfiles.router.PathSearch; - /** - * Gets the configuration used for the {@link yfiles.router.PathSearch}. - * @type {yfiles.router.PathSearchConfiguration} - */ - configuration:yfiles.router.PathSearchConfiguration; - /** - * Gets the {@link yfiles.algorithms.IEdgeCursor} to iterate over the edges that are routed. - * @type {yfiles.algorithms.IEdgeCursor} - */ - edges:yfiles.algorithms.IEdgeCursor; - /** - * Gets or sets the edge that is currently routed. - *

- * This edge is one of those returned by {@link yfiles.router.PathSearchContext#edges}. - *

- * @type {yfiles.algorithms.Edge} - */ - currentEdge:yfiles.algorithms.Edge; - /** - * Gets the {@link yfiles.router.EdgeLayoutDescriptor} for the {@link yfiles.router.PathSearchContext#currentEdge current edge} containing edge specific settings for the path search. - * @type {yfiles.router.EdgeLayoutDescriptor} - */ - currentEdgeLayoutDescriptor:yfiles.router.EdgeLayoutDescriptor; - /** - * Gets an artificial {@link yfiles.router.PartitionCell partition cell} with the size of the bounding box of all source cells of the {@link yfiles.router.PathSearchContext#currentEdge current edge}. - * @see yfiles.router.PathSearchContext#getSourceCell - * @type {yfiles.router.PartitionCell} - */ - combinedSourceCell:yfiles.router.PartitionCell; - /** - * Gets an artificial {@link yfiles.router.PartitionCell partition cell} with the size of the bounding box of all target cells of the {@link yfiles.router.PathSearchContext#currentEdge current edge}. - * @see yfiles.router.PathSearchContext#getTargetCell - * @type {yfiles.router.PartitionCell} - */ - combinedTargetCell:yfiles.router.PartitionCell; - /** - * Gets the results of the {@link yfiles.router.PathSearch}. - * @type {yfiles.router.PathSearchResult} - */ - pathSearchResult:yfiles.router.PathSearchResult; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.PathSearchContext; - } - /** - * Extensions are added to a {@link yfiles.router.PathSearch} to influence the search process. - *

- * An extension contains several callback methods that are used by the {@link yfiles.router.PathSearch} to, e.g., calculate the - * costs for the next possible steps (i.e., entering the next partition cell) and to decide when the target is reached. - *

- *

- * The {@link yfiles.router.PathSearch} uses the callbacks in the following order: - *

- *
    - *
  1. {@link yfiles.router.PathSearchExtension#initialize}
  2. - *
  3. {@link yfiles.router.PathSearchExtension#initializeEdges}
  4. - *
  5. {@link yfiles.router.PathSearchExtension#initializeCurrentEdge}
  6. - *
  7. {@link yfiles.router.PathSearchExtension#appendStartEntrances}
  8. - *
  9. {@link yfiles.router.PathSearchExtension#calculateStartEntranceCost}
  10. - *
  11. {@link yfiles.router.PathSearchExtension#calculateCosts}
  12. - *
  13. {@link yfiles.router.PathSearchExtension#calculateHeuristicCosts}
  14. - *
  15. {@link yfiles.router.PathSearchExtension#isValidTargetEntrance}
  16. - *
  17. {@link yfiles.router.PathSearchExtension#finalizePath}
  18. - *
  19. {@link yfiles.router.PathSearchExtension#finalizeCurrentEdge} or {@link yfiles.router.PathSearchExtension#cancelCurrentEdge}
  20. - *
  21. {@link yfiles.router.PathSearchExtension#finalizeEdges}
  22. - *
  23. {@link yfiles.router.PathSearchExtension#finalizePathSearchResult}
  24. - *
  25. {@link yfiles.router.PathSearchExtension#cleanUp}
  26. - *
- * @see yfiles.router.PathSearch#addPathSearchExtension - * @see yfiles.router.PathSearchContext#currentEdge - * @class - */ - export interface PathSearchExtension extends yfiles.lang.Object{} - export class PathSearchExtension { - /** - * Creates a new instance of {@link yfiles.router.PathSearchExtension}. - */ - constructor(); - /** - * Appends additional start {@link yfiles.router.CellEntrance entrances} for the path search of the current edge to the given list of all previously generated - * entrances. - *

- * This method is called before starting the actual path search to determine possible starting points. The current - * implementation doesn't add any {@link yfiles.router.CellEntrance}s. It may be overridden to add {@link yfiles.router.CellEntrance}s with - * specific enter intervals, e.g., to consider {@link yfiles.layout.PortConstraint}s. - *

- * @param allStartEntrances a list of all previously generated entrances - */ - appendStartEntrances(allStartEntrances:yfiles.collections.IList):void; - /** - * Calculates the costs for entering the given {@link yfiles.router.PartitionCell} via the given enter - * {@link yfiles.router.OrthogonalInterval}. - *

- * The given {@link yfiles.router.EdgeCellInfo} describes how the partition cell that has been entered by the current entrance - * would be traversed if this enter interval to the neighboring cell would be chosen. - *

- *

- * The maxAllowedCosts describe the maximum costs that entering the neighboring cell via the given enter interval may - * induce. If the maximum cost is exceeded, calculations that may further increase its cost may be skipped because this - * interval won't be chosen anyway. - *

- *

- * This implementation doesn't add any costs. It may be overridden to add costs, e.g., if entering through the given - * interval would create a bend. - *

- * @param currentEntrance the entrance that was used for entering the current cell - * @param enteredCell the neighboring cell that shall be entered - * @param enterInterval the interval that shall be used for entering the neighboring cell - * @param edgeCellInfo the information about how the current cell would be traversed if the neighboring cell would be entered by this enter - * interval - * @param maxAllowedCosts the maximum allowed costs for this enter interval - * @returns the costs for entering the neighboring cell via the enter interval - * @protected - */ - calculateCosts(currentEntrance:yfiles.router.CellEntrance,enteredCell:yfiles.router.PartitionCell,enterInterval:yfiles.router.OrthogonalInterval,edgeCellInfo:yfiles.router.EdgeCellInfo,maxAllowedCosts:number):number; - /** - * Calculates the heuristic costs for the given {@link yfiles.router.CellEntrance} that describe the minimal costs that will arise - * to finish the path if the given cell entrance is used as next step. - *

- * After evaluating the costs for each enter interval to a neighboring cell, this method is called for each of the - * resulting {@link yfiles.router.CellEntrance}s. - *

- *

- * This implementation doesn't add any costs. It may be overridden to add some heuristic costs, e.g., if the edge would - * have to bend to reach the target node from the given {@link yfiles.router.CellEntrance}. - *

- * @param entrance the entrance to calculate the heuristic costs for the rest of the path - * @returns the minimal costs that will arise to finish the path if the given cell entrance is used as next step - */ - calculateHeuristicCosts(entrance:yfiles.router.CellEntrance):number; - /** - * Returns the cost for starting the path in the given entrance. - *

- * This method is called for each start entrance of the current edge. - *

- *

- * The current implementation doesn't add any costs for the given {@link yfiles.router.CellEntrance}. It may be overridden to make - * start entrances with less specific intervals more expensive. For example, intervals that allow more than just the {@link yfiles.layout.PortConstraint} - * location to connect to the source node become more expensive. - *

- * @param startEntrance the start entrance for which the cost is calculated - * @returns the cost for starting the path in the given entrance - */ - calculateStartEntranceCost(startEntrance:yfiles.router.CellEntrance):number; - /** - * Handles the cancellation of the path search for the current edge. - *

- * This callback notifies the extension when the path search for the current edge is canceled. Then, the path search will - * proceed with altering the penalties of the current edge and reinitializing it again. - *

- *

- * This implementation does nothing. It may be overridden to reset some edge specific information, e.g., removing - * previously added listeners. - *

- * @param context the context containing the current edge for which the path search has been canceled - * @see yfiles.router.PathSearchExtension#initializeCurrentEdge - * @see yfiles.router.PathSearchExtension#finalizeEdges - */ - cancelCurrentEdge(context:yfiles.router.PathSearchContext):void; - /** - * Cleans up the extension from the path searches with the current {@link yfiles.router.PathSearchExtension#configuration configuration} and {@link yfiles.router.PathSearchExtension#context context}. - */ - cleanUp():void; - /** - * Handles the completion of the path search for the current edge. - *

- * This callback notifies the extension when enough paths are found for the current edge. After that, the path search - * either proceeds with initializing the next current edge in the context's edge list or calls {@link yfiles.router.PathSearchExtension#finalizeEdges} - * if all edges in this list have been handled. - *

- *

- * This implementation does nothing. It may be overridden to add/reset some edge specific information, e.g., removing - * previously added listeners or adding new start entrances. - *

- * @param context the context containing the current edge for which the path search has been finished - * @see yfiles.router.PathSearchExtension#initializeCurrentEdge - * @see yfiles.router.PathSearchExtension#finalizeEdges - */ - finalizeCurrentEdge(context:yfiles.router.PathSearchContext):void; - /** - * Handles the completion of all marked edges. - *

- * This callback notifies the extension if enough paths have been found for all edges in the context's edge list. - *

- * @param context the context containing the list of edges for which paths have been found - * @see yfiles.router.PathSearchContext#edges - */ - finalizeEdges(context:yfiles.router.PathSearchContext):void; - /** - * After finding a valid target entrance and creating a {@link yfiles.router.Path}, the extension is notified of the found path. - *

- * If the path search is configured to calculate several possible paths for an edge, the path search proceeds with choosing - * another unhandled {@link yfiles.router.CellEntrance}. - *

- *

- * This implementation does nothing. It may be overridden to collect some information about the given path that may - * influence the path search of later edges. - *

- * @param path the path found for the current edge in the context - * @see yfiles.router.PathSearchContext#currentEdge - */ - finalizePath(path:yfiles.router.Path):void; - /** - * Completes the path search result. - *

- * This callback notifies the extensions of the paths chosen for the edges in the current context. After calling - * {@link yfiles.router.PathSearchExtension#finalizeEdges finalizeEdges}, the {@link yfiles.router.PathSearch} decides, which of the found paths to use for each edge and adds them to the - * {@link yfiles.router.PathSearchResult}. - *

- *

- * With this callback, the registered extensions are notified of this result before the path search either initializes the - * next list of edges to route or ends the path search by calling - * {@link yfiles.router.PathSearchExtension#cleanUp}. This implementation does nothing. - *

- * @param pathSearchResult the path search result for the edge in the current context's edge list - * @see yfiles.router.PathSearchExtension#initializeEdges - * @see yfiles.router.PathSearchExtension#cleanUp - */ - finalizePathSearchResult(pathSearchResult:yfiles.router.PathSearchResult):void; - /** - * Initializes this extension for path searches using the given configuration. - *

- * This method is the first one to be called by the {@link yfiles.router.PathSearch}. It may be overridden to initialize this - * extension with necessary settings like {@link yfiles.layout.GroupingSupport}. - *

- * @param configuration the configuration to use for the following path searches - */ - initialize(configuration:yfiles.router.PathSearchConfiguration):void; - /** - * Initializes this extension with the current edge set in the given context. - *

- * This method is called for each edge of the {@link yfiles.router.PathSearchExtension#context context}. Each call will be balanced by a call to either {@link yfiles.router.PathSearchExtension#finalizeCurrentEdge} - * or {@link yfiles.router.PathSearchExtension#cancelCurrentEdge}. - *

- *

- * It may be overridden to initialize/reset the settings for the current edge (e.g. minimum distances). - *

- * @param context the context containing the current edge - * @see yfiles.router.PathSearchContext#currentEdge - */ - initializeCurrentEdge(context:yfiles.router.PathSearchContext):void; - /** - * Initializes this extension with the context that contains the list of edges for which paths are calculated. - *

- * This method may be called several times during a path search. Each call will be balanced by calls to {@link yfiles.router.PathSearchExtension#finalizeEdges} - * and {@link yfiles.router.PathSearchExtension#finalizePathSearchResult}. - *

- *

- * It may be overridden to initialize/reset the settings for the routed edges (e.g. minimum distances). - *

- * @param context the context containing the list of edges for which paths shall be found - * @see yfiles.router.PathSearchContext#edges - */ - initializeEdges(context:yfiles.router.PathSearchContext):void; - /** - * Determines whether or not this extension considers the given {@link yfiles.router.CellEntrance} as a valid target entrance, - * i.e., the path may end with the given entrance. - *

- * Each time a {@link yfiles.router.CellEntrance} is chosen as next step, all registered extensions are asked if this entrance is a - * valid target entrance. Only if none of the extensions returns false, a {@link yfiles.router.Path} is created. - *

- *

- * This implementation accepts all - * {@link yfiles.router.CellEntrance}s as valid targets. It may be overridden to only activate the target if the route fulfills a - * certain condition. - *

- * @param entrance the entrance to decide if it is a valid target entrance - * @returns true if the path may end with this entrance, false otherwise - */ - isValidTargetEntrance(entrance:yfiles.router.CellEntrance):boolean; - /** - * Gets the configuration used for the path search. - *

- * This property is initialized in {@link yfiles.router.PathSearchExtension#initialize}. - *

- * @type {yfiles.router.PathSearchConfiguration} - */ - configuration:yfiles.router.PathSearchConfiguration; - /** - * Gets the current context of the path search. - *

- * This property is initialized in {@link yfiles.router.PathSearchExtension#initializeEdges}. - *

- * @protected - * @type {yfiles.router.PathSearchContext} - */ - context:yfiles.router.PathSearchContext; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.PathSearchExtension; - } - /** - * This class manages the best {@link yfiles.router.Path}s found for each edge and provides according {@link yfiles.router.EdgeInfo}s. - *

- * These are used by the {@link yfiles.router.ChannelBasedPathRouting} algorithm to calculate the final segment locations for the - * segments of an edge path. - *

- * @class - */ - export interface PathSearchResult extends yfiles.lang.Object{} - export class PathSearchResult { - /** - * Creates a new instance of {@link yfiles.router.PathSearchResult}. - * @param configuration the configuration used for the path search - */ - constructor(configuration:yfiles.router.PathSearchConfiguration); - /** - * Returns an {@link yfiles.router.EdgeInfo} for the given edge. - *

- * If the given edge shall be routed but no path has been set for it, yet, null is returned. If no {@link yfiles.router.EdgeInfo} - * has been created for the path by this context before, a new one is instantiated, otherwise the stored one is returned. - *

- * @param edge the edge for which the {@link } will be returned - * @returns an {@link } describing the path of the edge - * @see yfiles.router.PathSearchResult#setPath - */ - getEdgeInfo(edge:yfiles.algorithms.Edge):yfiles.router.EdgeInfo; - /** - * Returns an {@link yfiles.router.EdgeInfo} for the given path. - *

- * If no {@link yfiles.router.EdgeInfo} has been created for this path by this context before, a new one is instantiated, otherwise - * the stored one is returned. - *

- * @param path the path for which the {@link } will be returned - * @returns an {@link } describing the given path - */ - getEdgeInfo(path:yfiles.router.Path):yfiles.router.EdgeInfo; - /** - * Returns the previously registered path found for the edge. - * @param edge the edge for which the path is provided - * @returns the previously registered path found for the edge or null if no path has been registered, yet - */ - getPath(edge:yfiles.algorithms.Edge):yfiles.router.Path; - /** - * Specifies a found path for an edge. - * @param edge the edge for which the path is set - * @param path the found path - */ - setPath(edge:yfiles.algorithms.Edge,path:yfiles.router.Path):void; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.PathSearchResult; - } - /** - * This class provides the cost penalties that are applied for violating restrictions during a {@link yfiles.router.PathSearch}. - *

- * The {@link yfiles.router.PathSearch} calculates the shortest path from the source to the target, where shortest path means the path with the - * lowest costs. Costs result from violations of restrictions that are defined by the different - * {@link yfiles.router.PathSearchExtension}s. This class defines penalties for the various violations. The {@link yfiles.router.PathSearch} - * can be adapted to specific needs by varying these penalties. In order to avoid a certain violation, the appropriate - * penalty must be increased. - *

- *

- * There are some predefined penalty settings which set a different focus for the path search: - * {@link yfiles.router.PenaltySettings#OPTIMIZATION_BALANCED}, {@link yfiles.router.PenaltySettings#OPTIMIZATION_EDGE_BENDS}, {@link yfiles.router.PenaltySettings#OPTIMIZATION_EDGE_LENGTHS} - * and {@link yfiles.router.PenaltySettings#OPTIMIZATION_EDGE_CROSSINGS}. - *

- * @class - */ - export interface PenaltySettings extends yfiles.lang.Object{} - export class PenaltySettings { - /** - * Creates a new instance of {@link yfiles.router.PenaltySettings}. - */ - constructor(); - /** - * Creates a copy of this {@link yfiles.router.PenaltySettings} instance. - *

- * This implementation uses method {@link yfiles.router.PenaltySettings#newInstance} to obtain a new instance which adopts all - * settings. - *

- * @returns a copy of this instance - */ - createCopy():yfiles.router.PenaltySettings; - /** - * Creates a new instance of {@link yfiles.router.PenaltySettings}. - *

- * This factory method is used by - * {@link yfiles.router.PenaltySettings#createCopy}. Subclasses can override this method in order to return a more specialized - * version. - *

- * @returns a specialized {@link } - * @protected - */ - newInstance():yfiles.router.PenaltySettings; - /** - * Optimization strategy that balances bends and edge crossings in the edge routes. - *

- * By default, this strategy is used for the path search. - *

- * @const - * @static - * @type {yfiles.router.PenaltySettings} - */ - static OPTIMIZATION_BALANCED:yfiles.router.PenaltySettings; - /** - * Optimization strategy that minimizes bends in the edge routes. - *

- * Edges may cross other edges to prevent bends occurring around them. - *

- * @const - * @static - * @type {yfiles.router.PenaltySettings} - */ - static OPTIMIZATION_EDGE_BENDS:yfiles.router.PenaltySettings; - /** - * Optimization strategy that minimizes edge crossings in the edge routes. - *

- * This may cause more bends. - *

- * @const - * @static - * @type {yfiles.router.PenaltySettings} - */ - static OPTIMIZATION_EDGE_CROSSINGS:yfiles.router.PenaltySettings; - /** - * Optimization strategy that minimizes the length of the edge routes. - *

- * In consequence, there may be more edge crossings. - *

- * @const - * @static - * @type {yfiles.router.PenaltySettings} - */ - static OPTIMIZATION_EDGE_LENGTHS:yfiles.router.PenaltySettings; - /** - * Gets or sets the penalty for the edge length. - *

- * This penalty will make long routes more expensive than short routes so edges will preferably be kept short. - *

- *

- * Increasing the edge length penalty will raise the importance of short edges in relation to all other penalties while - * decreasing this penalty will raise the importance of all other restrictions. A high edge length penalty will result in - * routes that have less bends and more edge crossings to maintain the edge as short as possible. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @type {number} - */ - edgeLengthPenalty:number; - /** - * Gets or sets the penalty for an edge bend. - *

- * This penalty will make routes with many bends more expensive than routes with few or no bends. Hence, edges will have - * preferably few bends. - *

- *

- * Increasing bend penalty will raise the importance of avoiding bends in relation to other penalties while decreasing this - * penalty will raise the importance of all other restrictions. A high bend penalty will result in routes that will - * preferably cross other edges instead of bending to avoid other edges. When increasing the edge bend penalty, the - * resulting routes will have more edge crossings. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @type {number} - */ - bendPenalty:number; - /** - * Gets or sets the penalty for a crossing of two edges. - *

- * This penalty will make routes that cross many other edges more expensive than routes that cross few other edges or no - * edges at all. Hence, edges preferably won't cross other edges. - *

- *

- * Increasing the edge crossing penalty will raise the importance of avoiding edge crossings in relation to other - * penalties, while decreasing this penalty will raise the importance of all other restrictions. When increasing the edge - * crossing penalty, the resulting route will be longer and have more bends because crossing other edges needs to be - * avoided. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @type {number} - */ - edgeCrossingPenalty:number; - /** - * Gets or sets the penalty for an edge crossing a regular node. - *

- * This penalty will make routes that cross normal nodes more expensive than routes that avoid crossing nodes. Hence, edges - * won't preferably cross any nodes. - *

- *

- * Increasing the node crossing penalty will raise the importance of avoiding node crossings in relation to other - * penalties, while decreasing this penalty will raise the importance of all other restrictions. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @type {number} - */ - nodeCrossingPenalty:number; - /** - * Gets or sets the penalty for an edge crossing a group node. - *

- * This penalty will make routes that cross group nodes more expensive than routes that avoid crossing group nodes. Hence, - * edges won't preferably cross any group nodes. - *

- *

- * Increasing the group node crossing penalty will raise the importance of avoiding group node crossings in relation to - * other penalties, while decreasing this penalty will raise the importance of all other restrictions. - *

- * @type {number} - */ - groupNodeCrossingPenalty:number; - /** - * Gets or sets the penalty for an edge crossing a node label. - *

- * This penalty will make routes that cross node labels more expensive than routes that avoid crossing node labels. Hence, - * edges won't preferably cross any node labels. - *

- *

- * Increasing the node label crossing penalty will raise the importance of avoiding node labels crossings in relation to - * other penalties, while decreasing this penalty will raise the importance of all other restrictions. A high label - * crossing penalty will cause edges to bend more often to avoid passing straight through labels. - *

- *

- * The crossing penalty can be weighted for each label individually using the - * {@link yfiles.router.EdgeRouter#LABEL_CROSSING_PENALTY_FACTOR_DP_KEY}. - *

- *

- * Use {@link yfiles.router.EdgeRouter#considerNodeLabels} to set whether node labels should be considered when routing the edges. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @see yfiles.router.EdgeRouter#considerNodeLabels - * @type {number} - */ - nodeLabelCrossingPenalty:number; - /** - * Gets or sets the penalty for an edge crossing an edge label. - *

- * This penalty will make routes that cross edge labels of fixed edges more expensive than routes that avoid crossing edge - * labels, so edges won't preferably cross any edge labels that belong to fixed edges. - *

- *

- * Increasing the edge label crossing penalty will raise the importance of avoiding edge labels crossings in relation to - * other penalties, while decreasing this penalty will raise the importance of all other restrictions. A high label - * crossing penalty will cause edges to bend more often to avoid passing straight through labels. - *

- *

- * The crossing penalty can be weighted for each label individually using the - * {@link yfiles.router.EdgeRouter#LABEL_CROSSING_PENALTY_FACTOR_DP_KEY}. - *

- *

- * Use {@link yfiles.router.EdgeRouter#considerEdgeLabels} to set whether edge labels should be considered when routing the edges. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @see yfiles.router.EdgeRouter#considerEdgeLabels - * @type {number} - */ - edgeLabelCrossingPenalty:number; - /** - * Gets or sets the penalty for violations of the minimum distance between any edge and any normal node side. - *

- * This penalty will make routes that pass too close to normal nodes more expensive than routes that maintain the specified - * minimum node to edge distance. - *

- *

- * Increasing the minimum node to edge distance penalty will raise the importance of maintaining the minimum distance to - * nodes, while decreasing this penalty will raise the importance of all other restrictions. A high penalty for violating - * the minimum distance between edges and nodes will produce edges that rather use a long route around nodes to maintain - * the specified distance than pass through a small channel between two nodes. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @see yfiles.router.EdgeRouter#minimumNodeToEdgeDistance - * @type {number} - */ - minimumNodeToEdgeDistancePenalty:number; - /** - * Gets or sets the penalty for violations of the minimum distance between any edge and any group node side. - *

- * This penalty will make routes that pass group nodes too close more expensive than routes that maintain the specified - * minimum node to edge distance. - *

- *

- * Increasing the minimum group node to edge distance penalty will raise the importance of maintaining the minimum distance - * to group nodes, while decreasing this penalty will raise the importance of all other restrictions. A high penalty for - * violating the minimum distance between edges and group nodes will produce edges that rather use a long route around - * group nodes to maintain the specified distance than pass through a small channel between two group nodes. - *

- *

- * Use {@link yfiles.router.EdgeRouter#minimumNodeToEdgeDistance} to set the minimum distance. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @see yfiles.router.EdgeRouter#minimumNodeToEdgeDistance - * @type {number} - */ - minimumGroupNodeToEdgeDistancePenalty:number; - /** - * Gets or sets the penalty for violations of the minimum distance between any two edges. - *

- * This penalty will make routes that pass other edges too close more expensive than routes that maintain the specified - * minimum edge to edge distance. - *

- *

- * Increasing the minimum edge to edge distance penalty will raise the importance of maintaining the minimum distance to - * other edges, while decreasing this penalty will raise the importance of all other restrictions. When this penalty has a - * high value, edges will maintain the specified distance. This may also reduce the number of edges that pass through a - * small channel between nodes. So, if such a channel is part of the shortest routes for many edges, some of them will take - * a longer way. - *

- *

- * Use {@link yfiles.router.EdgeLayoutDescriptor#minimumEdgeToEdgeDistance} to set the minimum distance for a certain edge to any other edge. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @see yfiles.router.EdgeLayoutDescriptor#minimumEdgeToEdgeDistance - * @type {number} - */ - minimumEdgeToEdgeDistancePenalty:number; - /** - * Gets or sets the penalty for violations of the minimum distance the edge shall maintain from node corners when entering - * or leaving the node. - *

- * This penalty will make routes that end too close to the corner of their source or target node more expensive than routes - * that maintain the specified minimum node corner distance. - *

- *

- * Increasing the node corner distance penalty will raise the importance of maintaining the minimum distance to the corner - * of the adjacent nodes, while decreasing this penalty will raise the importance of all other restrictions. - *

- *

- * Use {@link yfiles.router.EdgeLayoutDescriptor#minimumNodeCornerDistance} to set the minimum node corner distance for a certain edge. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @see yfiles.router.EdgeLayoutDescriptor#minimumNodeCornerDistance - * @type {number} - */ - minimumNodeCornerDistancePenalty:number; - /** - * Gets or sets the penalty for violations of the minimum length of the first and last segment of an edge. - *

- * This penalty will make routes whose first/last bend is too close to their source or target node more expensive than - * routes that maintain the specified minimum first/last segment length. - *

- *

- * Increasing the minimum first last segment length penalty will raise the importance of maintaining the first and last - * segment as long as they fit the minimum first/last segment length, while decreasing this penalty will raise the - * importance of all other restrictions. - *

- *

- * Use {@link yfiles.router.EdgeLayoutDescriptor#minimumFirstSegmentLength} to set the minimum length of the first segment and {@link yfiles.router.EdgeLayoutDescriptor#minimumLastSegmentLength} to set the minimum length of the last segment of a certain - * edge. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @see yfiles.router.EdgeLayoutDescriptor#minimumFirstSegmentLength - * @see yfiles.router.EdgeLayoutDescriptor#minimumLastSegmentLength - * @type {number} - */ - minimumFirstLastSegmentLengthPenalty:number; - /** - * Gets or sets the penalty for an edge bend being closer to the border of the source node, the target node or one of their - * ancestor group nodes than the minimum node to edge distance. - *

- * This penalty will make routes that bend too close to their source or target node more expensive than routes that - * maintain the specified minimum node to edge distance. - *

- *

- * Increasing the bends in node to edge distance penalty will raise the importance of avoiding bends that violate the - * minimum node to edge distance, while decreasing this penalty will raise the importance of all other restrictions. This - * penalty supports - * {@link yfiles.router.EdgeRouter#minimumNodeToEdgeDistance}. In case the path search finally reaches the target node, the minimum node to edge distance for this node must be - * violated. Penalizing bends that are too close to the node forces the edge to directly cross this distance and connect to - * the node. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @see yfiles.router.EdgeRouter#minimumNodeToEdgeDistance - * @type {number} - */ - bendsInNodeToEdgeDistancePenalty:number; - /** - * Gets or sets the penalty for violating the monotonic path restrictions of an edge. - *

- * This penalty will make routes with detours m ore expensive than routes that stay monotone. - *

- *

- * Increasing the monotony violation penalty will raise the importance of avoiding detours in the specified direction, - * while decreasing this penalty will raise the importance of all other restrictions. - *

- *

- * Use {@link yfiles.router.EdgeLayoutDescriptor#monotonicPathRestriction} to set the monotonic path restrictions of a certain edge. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @see yfiles.router.EdgeLayoutDescriptor#monotonicPathRestriction - * @type {number} - */ - monotonyViolationPenalty:number; - /** - * Gets or sets the penalty for an edge leaving and reentering in the same {@link yfiles.layout.PartitionGrid partition grid} cell. - *

- * This penalty will make routes that re-enter the same partition grid cell more expensive than routes taking a more direct - * way. - *

- *

- * Increasing the partition grid reentrance penalty will raise the importance of taking the most direct way through the - * partition grid, while decreasing this penalty will raise the importance of all other restrictions. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @see yfiles.layout.PartitionGrid - * @type {number} - */ - partitionGridCellReentrancePenalty:number; - /** - * Gets or sets the penalty if an edge does not comply with its {@link yfiles.layout.PortCandidate}s or - * {@link yfiles.layout.PortConstraint}s. - *

- * This penalty will make routes that start or end at a point that doesn't comply with its port constraints more expensive - * than routes that obey them. - *

- *

- * Increasing the port violation penalty will raise the importance of maintaining port constraints, while decreasing this - * penalty will raise the importance of all other restrictions. It is recommended to have high penalties for port violation - * since the constraints lose purpose if they are disregarded. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @see yfiles.layout.PortCandidate - * @see yfiles.layout.PortConstraint - * @type {number} - */ - portViolationPenalty:number; - /** - * Gets or sets the penalty for an edge with a group ID that is not grouped at source or target side. - *

- * This penalty will make routes for grouped edges that don't use partly the same path as the other edges in this group - * more expensive than routes that stick to the group. - *

- *

- * Increasing the invalid edge grouping penalty will raise the importance of grouping edges with the same group ID, while - * decreasing this penalty will raise the importance of all other restrictions. As edge groups require that the route of an - * edge belonging to an edge group stays partly identical to the other edges of the group, the route may not be optimal - * with respect to the other restrictions. To maintain the edges together as long as possible, this penalty should be - * higher than most others. - *

- *

- * Grouped edges have the same source or target group ID assigned in the data provider registered with the graph with the {@link yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY} - * or {@link yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY} key. - *

- *

- * The value must be greater than or equal to 0, otherwise the default value will be assigned. - *

- * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @type {number} - */ - invalidEdgeGroupingPenalty:number; - /** - * Gets or sets the penalty for bends of a self-loop edge. - *

- * This penalty will make self-loops leave and enter the node at different sides unless they are forced to one side by - * {@link yfiles.layout.PortConstraint}s or {@link yfiles.layout.PortCandidate}s. - *

- *

- * Increasing this penalty will stronger enforce routing the self-loops between two sides of the node but it will also - * require more time for determining the edge path. Decreasing the penalty may result in self-loops that only connect to - * one side of the node. - *

- *

- * By default this value is set to 9. The value must be >= 0, otherwise the default value will be assigned. - *

- * @type {number} - */ - singleSideSelfLoopPenalty:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.PenaltySettings; - } - /** - * {@link yfiles.router.PolylineLayoutStage} extends the orthogonal edge paths with polyline segments. - *

- * The current implementation only adds octilinear segments to all orthogonal edges. Non-orthogonal edges are completely - * ignored. - *

- *

- * An octilinear segment is added between two consecutive vertical and horizontal segments. The length of an octilinear - * segment can be influenced by the {@link yfiles.router.PolylineLayoutStage#maximumNonOrthogonalSegmentRatio maximum non-orthogonal segment ratio} and the {@link yfiles.router.PolylineLayoutStage#preferredPolylineSegmentLength preferred polyline segment length}. The new - * octilinear segments maintain a {@link yfiles.router.PolylineLayoutStage#minimumNodeToEdgeDistance minimum distance} between the edges and all nodes in the graph if possible. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface PolylineLayoutStage extends yfiles.layout.LayoutStageBase{} - export class PolylineLayoutStage { - /** - * Creates a new instance of {@link yfiles.router.PolylineLayoutStage} using the given {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - * @param [coreLayouter=null] the core layout routine - */ - constructor(coreLayouter?:yfiles.layout.ILayoutAlgorithm); - /** - * Gets or sets the {@link yfiles.algorithms.IDataProvider} key used for looking up the selected state of the nodes of the graph to - * be laid out. - *

- * If the {@link yfiles.router.PolylineLayoutStage#scope scope} is set to - * {@link yfiles.router.Scope#ROUTE_EDGES_AT_AFFECTED_NODES}, only edges of selected nodes are routed, while all other edges are - * considered to have fixed routes. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified key is null - * @see yfiles.router.PolylineLayoutStage#scope - * @type {any} - */ - affectedNodesDpKey:any; - /** - * Gets or sets the {@link yfiles.algorithms.IDataProvider} key used for looking up the selected state of the edges of the graph to - * be laid out. - *

- * If the {@link yfiles.router.PolylineLayoutStage#scope scope} is set to - * {@link yfiles.router.Scope#ROUTE_AFFECTED_EDGES}, only the selected edges are routed, while all other edges are considered to - * have fixed routes. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified key is null - * @see yfiles.router.PolylineLayoutStage#scope - * @type {any} - */ - affectedEdgesDpKey:any; - /** - * Gets or sets the (sub-)set of edges to be routed in a polyline fashion. - * @throws {Stubs.Exceptions.ArgumentError} if the given argument is none of the predefined scope values - * @see yfiles.router.PolylineLayoutStage#affectedEdgesDpKey - * @see yfiles.router.PolylineLayoutStage#affectedNodesDpKey - * @type {yfiles.router.Scope} - */ - scope:yfiles.router.Scope; - /** - * Gets or sets the minimum distance between edges and node bounds. - *

- * Values should be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the distance is negative - * @type {number} - */ - minimumNodeToEdgeDistance:number; - /** - * Gets or sets the maximum segment length ratio at each end of an orthogonal segment that may get converted into a - * (non-orthogonal) polyline segment. - *

- * The ratio must be between 0 and 0.5. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the ratio does not lie within [0,0.5] interval - * @type {number} - */ - maximumNonOrthogonalSegmentRatio:number; - /** - * Gets or sets the preferred segment length for (non-orthogonal) polyline segments. - *

- * Values should be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the length is negative - * @type {number} - */ - preferredPolylineSegmentLength:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.PolylineLayoutStage; - } - /** - * Represents a group of segments of different edges that shall be combined at their common source or target. - *

- * Grouped edges have the same source or target group ID assigned in the {@link yfiles.algorithms.IDataProvider} registered with - * the graph with {@link yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY} or {@link yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY} - * keys. - *

- *

- * The {@link yfiles.router.SegmentGroup} contains the {@link yfiles.router.SegmentGroup#commonLocationRange common location range} for the edge group and provides a {@link yfiles.router.SegmentGroup#commonSegmentInfo common segment info} - * representing the grouped segments. - *

- * @class - */ - export interface SegmentGroup extends yfiles.lang.Object{} - export class SegmentGroup { - /** - * Creates a new instance of {@link yfiles.router.SegmentGroup} that contains the given segments and a range to place them. - * @param commonLocationRange the location range of the given {@link }s - * @param segmentInfos the list containing the grouped {@link }s - */ - constructor(commonLocationRange:yfiles.router.Interval,segmentInfos:yfiles.collections.IList); - /** - * Gets the common location range for the {@link yfiles.router.SegmentGroup#segmentInfos segments} in this group. - *

- * For vertical grouped segments, this interval describes the horizontal range where this segment can be placed. Horizontal - * grouped segments are placed in a vertical range. - *

- * @type {yfiles.router.Interval} - */ - commonLocationRange:yfiles.router.Interval; - /** - * Gets the list of {@link yfiles.router.SegmentInfo}s contained in this group. - * @type {yfiles.collections.IList.} - */ - segmentInfos:yfiles.collections.IList; - /** - * Gets the common {@link yfiles.router.SegmentInfo} representing the grouped segments. - *

- * The returned segment info is used for placing the common segment. The coordinates are applied to all edges in the bundle - * later. - *

- * @type {yfiles.router.SegmentInfo} - */ - commonSegmentInfo:yfiles.router.SegmentInfo; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.SegmentGroup; - } - /** - * A {@link yfiles.router.SegmentInfo} holds information about the possible location of an orthogonal edge segment. - *

- * Most notably, it stores the {@link yfiles.router.SegmentInfoBase#direction direction} of the segment and the {@link yfiles.router.SegmentInfoBase#locationRange interval} that restricts the location of the segment. - *

- * @class - * @extends {yfiles.router.SegmentInfoBase} - */ - export interface SegmentInfo extends yfiles.router.SegmentInfoBase{} - export class SegmentInfo { - /** - * Creates a new instance of {@link yfiles.router.SegmentInfo} with the given information. - * @param edge the edge to which the segment of this info belongs - * @param segmentIndex the index of the segment to which this info belongs - * @param direction the direction to which the segment of this info points - * @param locationRange the range within which the common location of this segment has to lie - * @param minExtension the minimum interval in extension direction this segment is known to intersect - * @param maxExtension the maximum interval in extension direction this segment will span - * @param cellSegmentInfos the list of {@link } objects upon which this segment info is built - */ - constructor(edge:yfiles.algorithms.Edge,segmentIndex:number,direction:yfiles.layout.Direction,locationRange:yfiles.router.Interval,minExtension:yfiles.router.Interval,maxExtension:yfiles.router.Interval,cellSegmentInfos:yfiles.collections.IList); - /** - * Creates a new instance of {@link yfiles.router.SegmentInfo} using a {@link yfiles.algorithms.LineSegment} to describe the edge segment. - * @param edge the edge to which the segment of this info belongs - * @param segmentIndex the index of the segment to which this info belongs - * @param segment a line segment describing the edge segment - */ - constructor(edge:yfiles.algorithms.Edge,segmentIndex:number,segment:yfiles.algorithms.LineSegment); - /** - * Returns the number of {@link yfiles.router.CellSegmentInfo} of this segment info. - * @returns the number of {@link } of this segment info - */ - cellSegmentInfoCount():number; - /** - * Returns the {@link yfiles.router.CellSegmentInfo} at the given index of this segment info. - * @param index the index of the {@link } to return - * @returns the {@link } at the given index of this segment info - */ - getCellSegmentInfo(index:number):yfiles.router.CellSegmentInfo; - /** - * Sets the {@link yfiles.router.SegmentGroup segment group} for this segment info and its associated {@link yfiles.router.CellSegmentInfo}s. - *

- * The {@link yfiles.router.SegmentInfoBase#locationRange location ranges} are adjusted to use the {@link yfiles.router.SegmentGroup#commonLocationRange}. - *

- * @see yfiles.router.SegmentGroup - * @type {yfiles.router.SegmentGroup} - */ - segmentGroup:yfiles.router.SegmentGroup; - /** - * Gets or sets whether or not this edge segment has the restriction of a strong {@link yfiles.layout.PortConstraint}. - * @type {boolean} - */ - atStrongPortConstraint:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.SegmentInfo; - } - /** - * This class stores location information for orthogonal edge segments. - *

- * Most notably, {@link yfiles.router.SegmentInfoBase} stores the {@link yfiles.router.SegmentInfoBase#direction direction} to which the segment points and the {@link yfiles.router.SegmentInfoBase#locationRange interval} describing - * possible locations and extensions of a segment. - *

- * @class - */ - export interface SegmentInfoBase extends yfiles.lang.Object{} - export class SegmentInfoBase { - /** - * Creates a new instance of {@link yfiles.router.SegmentInfoBase}. - * @param edge the edge to which the segment of this info belongs - * @param segmentIndex the index of the segment to which this info belongs - * @param direction the direction to which the segment of this info points - * @param locationRange the range within which the common location of this segment has to lie - * @param minExtension the minimum interval in extension direction this segment is known to intersect - * @param maxExtension the maximum interval in extension direction this segment will span - * @protected - */ - constructor(edge:yfiles.algorithms.Edge,segmentIndex:number,direction:yfiles.layout.Direction,locationRange:yfiles.router.Interval,minExtension:yfiles.router.Interval,maxExtension:yfiles.router.Interval); - /** - * Creates a new instance of {@link yfiles.router.SegmentInfoBase} using a line segment to describe the edge segment. - *

- * This constructor is meant to be used for fixed orthogonal edge segments. - *

- * @param edge the edge to which this segment info belongs - * @param segmentIndex the index of the segment to which this info belongs - * @param segment a line segment describing the edge segment - * @protected - */ - constructor(edge:yfiles.algorithms.Edge,segmentIndex:number,segment:yfiles.algorithms.LineSegment); - /** - * Gets the minimum known extension of the segment, i.e., the minimum interval that this segment will cover in any case. - *

- * For horizontal intervals, this is the minimum horizontal extension; for vertical intervals, this is the minimum vertical - * extension. - *

- * @type {yfiles.router.Interval} - */ - minExtension:yfiles.router.Interval; - /** - * Gets the maximum extension that this segment can span. - *

- * For horizontal intervals, this is the maximum horizontal extension; for vertical intervals, this is the maximum vertical - * extension. - *

- * @type {yfiles.router.Interval} - */ - maxExtension:yfiles.router.Interval; - /** - * Gets the range, i.e., the interval within which the segment should be placed. - *

- * For horizontal segments, this is the range containing the vertical location; for vertical segments, this is the range - * containing the horizontal location. - *

- * @type {yfiles.router.Interval} - */ - locationRange:yfiles.router.Interval; - /** - * Gets or sets the preferred placement of this segment within its location range. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown alignment is given - * @type {yfiles.router.Alignment} - */ - preferredAlignment:yfiles.router.Alignment; - /** - * Gets or sets the {@link yfiles.router.SegmentInfoBase#fixed fixed} location within the {@link yfiles.router.SegmentInfoBase#locationRange location range} for this segment info. - *

- * For horizontal segments, this is the vertical location; for vertical segments, this is the horizontal location. - *

- * @throws {Stubs.Exceptions.InvalidOperationError} if the segment info already has a fixed location - * @throws {Stubs.Exceptions.ArgumentError} if the given location does not lie within the location range - * @see yfiles.router.SegmentInfoBase#fixed - * @see yfiles.router.SegmentInfoBase#locationRange - * @type {number} - */ - location:number; - /** - * Gets whether or not this segment info is fixed, i.e., a {@link yfiles.router.SegmentInfoBase#location fixed location} has been determined within its {@link yfiles.router.SegmentInfoBase#locationRange location range}. - * @type {boolean} - */ - fixed:boolean; - /** - * Gets whether or not the associated segment is vertical. - * @type {boolean} - */ - vertical:boolean; - /** - * Gets the {@link yfiles.layout.Direction} to which the segment of this info points. - * @type {yfiles.layout.Direction} - */ - direction:yfiles.layout.Direction; - /** - * Gets the edge to which the segment of this info belongs. - * @type {yfiles.algorithms.Edge} - */ - edge:yfiles.algorithms.Edge; - /** - * Gets the index of the segment of this info. - * @type {number} - */ - segmentIndex:number; - /** - * Gets or sets the segment group to which this segment info belongs. - *

- * When defining the segment group, the {@link yfiles.router.SegmentInfoBase#locationRange location range} will be adjusted to use the common interval of the segment group. - *

- * @see yfiles.router.SegmentGroup#commonLocationRange - * @type {yfiles.router.SegmentGroup} - */ - segmentGroup:yfiles.router.SegmentGroup; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.SegmentInfoBase; - } - /** - * A descriptor for bus-related information to be associated with an edge. - *

- * It consists of a bus ID defining the bus of the associated edge, two optional edge group IDs for specifying the edge - * grouping at the source and target side, respectively, and an optional boolean flag to mark the edge as fixed. - *

- *

- * Every object except null can be used as a valid bus ID. Every edge of ID null forms a group of its own. Also, every - * object except null can be used as a valid edge group ID. If there is no group ID defined for an edge or if null is set, - * a default group ID is used. Therefore, all such edges ending at the same node belong to the same group. - *

- * @see yfiles.router.BusRouter#EDGE_DESCRIPTOR_DP_KEY - * @class - */ - export interface BusDescriptor extends yfiles.lang.Object{} - export class BusDescriptor { - /** - * Creates a new instance of {@link yfiles.router.BusDescriptor} for the specified parameters. - * @param busID the ID of the bus to which the associated edge belongs - * @param fixed true if associated edge is fixed, false otherwise - * @param sourceGroupID the group ID of the source side - * @param targetGroupID the group ID of the target side - */ - constructor(busID:any,fixed:boolean,sourceGroupID:any,targetGroupID:any); - /** - * Creates a new instance of {@link yfiles.router.BusDescriptor} for the specified parameters and default group IDs. - * @param busID the ID of the bus to which the associated edge belongs - * @param fixed true if associated edge is fixed, false otherwise - */ - constructor(busID:any,fixed:boolean); - /** - * Creates a new instance of {@link yfiles.router.BusDescriptor} for the specified parameters and marks it as not fixed. - * @param busID the ID of the bus to which the associated edge belongs - * @param sourceGroupID the group ID of the source side - * @param targetGroupID the group ID of the target side - */ - constructor(busID:any,sourceGroupID:any,targetGroupID:any); - /** - * Creates a new instance of {@link yfiles.router.BusDescriptor} for the specified bus ID which is marked as not fixed and uses the - * default edge group IDs. - * @param busID the ID of the bus to which the associated edge belongs - */ - constructor(busID:any); - /** - * Gets or sets the bus ID. - *

- * Edges associated with {@link yfiles.router.BusDescriptor descriptor instances} having the same bus ID belong to a common bus. Every edge associated with ID - * null forms a group of its own. - *

- * @type {any} - */ - busId:any; - /** - * Gets or sets the group ID for the source side of the edge. - *

- * Edges incident to the same node v but associated with different group IDs at this endpoint, use separate bus connections - * at v. - *

- * @type {any} - */ - sourceGroupId:any; - /** - * Gets or sets the group ID for the target side of the edge. - *

- * Edges incident to the same node v but associated with different group IDs at this endpoint, use separate bus connections - * at v. - *

- * @type {any} - */ - targetGroupId:any; - /** - * Gets or sets whether or not the associated edge is fixed. - *

- * The algorithm doesn't change the route of fixed edges but tries to prevent overlaps with non-fixed edges. - *

- * @type {boolean} - */ - fixed:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.BusDescriptor; - } - /** - * This class provides helper methods to convert between buses given by complete subgraphs and buses represented by - * specific hub nodes. - *

- * In a representation by means of hubs, each connected subgraph induced by hubs establishes a bus. All regular nodes - * (non-hubs) which are connected to hubs of the same component are end-nodes of the same bus. In other words, nodes which - * are reachable on paths consisting of only hubs belong to the same bus. Of course, a node can be an end-node of more than - * one bus. - *

- *

- * Since a bus models a group of nodes in which every node is connected to every other node, it can be represented as a - * complete subgraph of these nodes. To distinguish buses in this representation, each edge must be associated with a - * unique ID which identifies the bus to which it is associated. This is the representation expected by - * {@link yfiles.router.BusRouter}. - *

- * @class - */ - export interface BusRepresentations extends yfiles.lang.Object{} - export class BusRepresentations { - /** - * Changes the representation of buses from hubs to complete subgraphs by creating new edges between regular nodes and - * removing the hubs. - *

- * This method respects multiple connections of nodes and creates appropriate - * {@link yfiles.router.BusDescriptor}s consisting of the bus ID as well as source and target group IDs. - *

- *

- * The path of each new edge follows the route defined by the component of the hubs. If the subgraph of hubs is not a tree, - * these paths are ambiguous. In this case, an arbitrary tree is computed from the hub's subgraph which defines all the - * paths. - *

- * @param graph the graph of the bus - * @param hubEdgesLists an array of {@link }s each containing the edges of a bus - * @param hubMarker a {@link } that marks hub nodes - * @param fixedMarker a {@link } that marks fixed edges - * @param descriptorAcceptor a {@link } for storing the created bus descriptors - * @returns a list of the created edges - * @static - */ - static replaceHubsBySubgraph(graph:yfiles.layout.LayoutGraph,hubEdgesLists:yfiles.algorithms.EdgeList[],hubMarker:yfiles.algorithms.IDataProvider,fixedMarker:yfiles.algorithms.IDataProvider,descriptorAcceptor:yfiles.algorithms.IDataAcceptor):yfiles.algorithms.EdgeList; - /** - * Changes the representation of buses from hubs to complete subgraphs. - *

- * This method delegates to {@link yfiles.router.BusRepresentations#replaceHubsBySubgraph}. - *

- * @param graph the graph of the bus - * @param hubMarker a {@link } that marks hub nodes - * @param descriptorAcceptor a {@link } for storing the created bus descriptors - * @returns a list of the created edges - * @see yfiles.router.BusRepresentations#replaceHubsBySubgraph - * @see yfiles.router.BusRepresentations#toEdgeLists - * @static - */ - static replaceHubsBySubgraph(graph:yfiles.layout.LayoutGraph,hubMarker:yfiles.algorithms.IDataProvider,descriptorAcceptor:yfiles.algorithms.IDataAcceptor):yfiles.algorithms.EdgeList; - /** - * Changes the representation of buses from complete subgraphs to hubs by replacing intersection points by hubs. - *

- * The edges of the given graph must form an orthogonal, cycle-free bus, otherwise an {@link yfiles.lang.Exception} is thrown. - *

- * @param graph the graph where each bus is represented by a complete subgraph of the corresponding nodes - * @param edgeCursor an {@link } of the regular edges - * @param descriptorProvider a {@link } that provides a {@link } for each edge - * @param busIDAcceptor an optional {@link } that stores the bus ID for each new edge - * @throws {Stubs.Exceptions.InvalidOperationError} if the path of an edge is not orthogonal or if some paths form a cycle - * @static - */ - static replaceSubgraphByHubs(graph:yfiles.layout.LayoutGraph,edgeCursor:yfiles.algorithms.IEdgeCursor,descriptorProvider:yfiles.algorithms.IDataProvider,busIDAcceptor:yfiles.algorithms.IDataAcceptor):void; - /** - * Calculates for every bus represented by hubs a list of all of its edges. - * @param graph the graph where buses are represented by means of hubs - * @param hubMarker a {@link } which marks hub nodes - * @returns an array of {@link }s where each list contains all edges of a bus - * @static - */ - static toEdgeLists(graph:yfiles.algorithms.Graph,hubMarker:yfiles.algorithms.IDataProvider):yfiles.algorithms.EdgeList[]; - /** - * Data acceptor key to transfer a user-defined object from each original edge to the respective newly created edge - *

- * Since there is no one-to-one mapping between original and new edges, the data provider of this key is responsible for - * the edges whose source endpoint is a regular node. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static SOURCE_ID_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data acceptor key to transfer a user-defined object from each original edge to the respective newly created edge - *

- * Since there is no one-to-one mapping between original and new edges, the data provider of this key is responsible for - * the edges whose target endpoint is a regular node. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static TARGET_ID_DP_KEY:yfiles.algorithms.EdgeDpKey; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.BusRepresentations; - } - /** - * An edge routing algorithm which routes edges of a graph in an orthogonal bus-style. - *

- * Carefully observe that the resulting representation, with many edge segments drawn on top of each other, leaves little - * room for a sensible interpretation of edge direction. - *

- *

- * Layout Style - *

- *

- * Edge segments are bundled to buses. A bus is a segment shared by multiple edges to which shorter segments that connect - * to actual nodes are attached. Buses and all other segments are routed orthogonally. - *

- *

- * A bus can, for example, be created in parts of a diagram where each node is connected to each other node. There are no - * cycles induced by any two edge paths of the same bus, that is, the combination of all edge routes looks like an - * orthogonal tree. - *

- *

- * The algorithm tries to produce routes where the edges share as much of their paths as possible. It yields long line - * segments (so-called backbone segments) where ideally all but the first and last segments of all edge paths are drawn on top of each other - * (forming a - * bus), with short connections branching off to the nodes - * (bus connections). These short connections bundle the respective first or last segments of a node's incident edges. - *

- *

- * This algorithm will not modify positions or sizes of nodes in any way, but will route the edges of the graph. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":0},"n":[[375,165],[375,255],[585,165],[585,255],[585,345],[705,345],[705,165],[705,255],[825,165],[495,435],[585,435],[585,525]],"e":[[2,1,-15,0,0,15,[555,180,555,315,390,315]],[2,3,-15,0,-15,0,[555,180,555,270]],[3,1,-15,0,0,15,[555,270,555,315,390,315]],[2,4,-15,0,-15,0,[555,180,555,360]],[3,4,-15,0,-15,0,[555,270,555,360]],[1,4,0,15,-15,0,[390,315,555,315,555,360]],[5,4,0,-15,-15,0,[720,315,555,315,555,360]],[5,1,0,-15,0,15,[720,315,390,315]],[5,3,0,-15,-15,0,[720,315,555,315,555,270]],[5,2,0,-15,-15,0,[720,315,555,315,555,180]],[5,7,0,-15,0,15],[7,4,0,15,-15,0,[720,315,555,315,555,360]],[7,1,0,15,0,15,[720,315,390,315]],[7,3,0,15,-15,0,[720,315,555,315,555,270]],[7,2,0,15,-15,0,[720,315,555,315,555,180]],[5,9,0,-15,15,0,[720,315,555,315,555,450]],[7,9,0,15,15,0,[720,315,555,315,555,450]],[2,9,-15,0,15,0,[555,180,555,450]],[3,9,-15,0,15,0,[555,270,555,450]],[1,9,0,15,15,0,[390,315,555,315,555,450]],[4,9,-15,0,15,0,[555,360,555,450]],[5,10,0,-15,-15,0,[720,315,555,315,555,450]],[7,10,0,15,-15,0,[720,315,555,315,555,450]],[2,10,-15,0,-15,0,[555,180,555,450]],[3,10,-15,0,-15,0,[555,270,555,450]],[1,10,0,15,-15,0,[390,315,555,315,555,450]],[4,10,-15,0,-15,0,[555,360,555,450]],[9,10,15,0,-15,0],[5,11,0,-15,-15,0,[720,315,555,315,555,540]],[7,11,0,15,-15,0,[720,315,555,315,555,540]],[2,11,-15,0,-15,0,[555,180,555,540]],[3,11,-15,0,-15,0,[555,270,555,540]],[1,11,0,15,-15,0,[390,315,555,315,555,540]],[4,11,-15,0,-15,0,[555,360,555,540]],[9,11,15,0,-15,0,[555,450,555,540]],[10,11,-15,0,-15,0,[555,450,555,540]],[0,1,0,15,0,-15,1],[0,2,0,15,0,15,1,[390,225,600,225]],[1,2,0,-15,0,15,1,[390,225,600,225]],[0,3,0,15,0,-15,1,[390,225,600,225]],[1,3,0,-15,0,-15,1,[390,225,600,225]],[3,2,0,-15,0,15,1],[0,6,0,15,0,15,1,[390,225,720,225]],[1,6,0,-15,0,15,1,[390,225,720,225]],[3,6,0,-15,0,15,1,[600,225,720,225]],[6,2,0,15,0,15,1,[720,225,600,225]],[0,7,0,15,0,-15,1,[390,225,720,225]],[1,7,0,-15,0,-15,1,[390,225,720,225]],[3,7,0,-15,0,-15,1,[600,225,720,225]],[7,2,0,-15,0,15,1,[720,225,600,225]],[7,6,0,-15,0,15,1],[0,8,0,15,0,15,1,[390,225,840,225]],[1,8,0,-15,0,15,1,[390,225,840,225]],[3,8,0,-15,0,15,1,[600,225,840,225]],[7,8,0,-15,0,15,1,[720,225,840,225]],[8,2,0,15,0,15,1,[840,225,600,225]],[8,6,0,15,0,15,1,[840,225,720,225]]],"vp":[375.0,165.0,480.0,390.0]}} Bus-style edge routing with default settings {@graph {"ann":{"s":[30,30],"d":0},"n":[[529,405,120,120],[765,405],[765,495],[945,405],[945,495],[255,405],[255,495],[435,405],[345,495],[435,495],[345,405],[765,212],[765,302],[945,212],[855,302],[945,302],[855,212],[675,302],[900,302],[900,212],[810,212],[810,302],[511,212],[435,212],[359,212],[283,212],[555,105],[622,105],[555,30],[622,30],[622,-45]],"e":[[0,1,60,0,0,15,[780,465]],[0,2,60,0,0,-15,[780,465]],[0,3,60,0,0,15,[960,465]],[0,4,60,0,0,-15,[960,465]],[0,5,-60,0,0,15,[270,465]],[0,6,-60,0,0,-15,[270,465]],[0,7,-60,0,0,15,[450,465]],[0,8,-60,0,0,-15,[360,465]],[0,9,-60,0,0,-15,[450,465]],[0,10,-60,0,0,15,[360,465]],[0,11,0,-60,0,15,[589,272,780,272]],[0,12,0,-60,0,-15,[589,272,780,272]],[0,13,0,-60,0,15,[589,272,960,272]],[0,14,0,-60,0,-15,[589,272,870,272]],[0,15,0,-60,0,-15,[589,272,960,272]],[0,16,0,-60,0,15,[589,272,870,272]],[0,17,0,-60,0,-15,[589,272,690,272]],[0,18,0,-60,0,-15,[589,272,915,272]],[0,19,0,-60,0,15,[589,272,915,272]],[0,20,0,-60,0,15,[589,272,825,272]],[0,21,0,-60,0,-15,[589,272,825,272]],[0,22,0,-60,0,15,[589,272,526,272]],[0,23,0,-60,0,15,[589,272,450,272]],[0,24,0,-60,0,15,[589,272,374,272]],[0,25,0,-60,0,15,[589,272,298,272]],[0,26,15,-60,15,0,[604,120]],[0,27,15,-60,-15,0,[604,120]],[0,28,15,-60,15,0,[604,45]],[0,29,15,-60,-15,0,[604,45]],[0,30,15,-60,-15,0,[604,-30]]],"vp":[255.0,-45.0,720.0,570.0]}} Edge routing sample including four different busesConcept - *

- *

- * The algorithm uses a two-phase process: - *

- *
    - *
  1. Backbone Selection: a set of suitable initial backbone segments is determined.
  2. - *
  3. - * Routing and Recombination: each initial backbone segment is connected to all other backbone segments and to each node by using orthogonal edge - * paths. Then, the resulting structure is reduced to the most optimal structure where backbone segments are long and - * connections to the nodes are short. - *
  4. - *
- *

- * Features - *

- *

- * To determine which edges belong to a common bus, a mapping that assigns a bus ID to each edge must be specified using - * {@link yfiles.router.BusDescriptor}s. A {@link yfiles.algorithms.IDataProvider} holding {@link yfiles.router.BusDescriptor} instances is - * expected to be registered with the graph using the - * {@link yfiles.router.BusRouter#EDGE_DESCRIPTOR_DP_KEY descriptor key}. In the absence of an individual bus ID for an edge, a bus consisting only of the single edge is - * created. - *

- *

- * This algorithm supports {@link yfiles.layout.PortConstraint}s as well as - * {@link yfiles.layout.PortCandidate}s to control where edges should connect to nodes. - *

- *

- * Note that if edges of the same bus connect to a common node but have inconsistent or contradicting port - * constraints/candidates, then any of these constraints/candidates can determine the actual location of the common port. - * The same applies for edges that, in addition, belong to the same edge group. - *

- *

- * Also, the cardinality defined with a {@link yfiles.layout.PortCandidateSet} object is interpreted in terms of different bus IDs - * (group IDs) instead of number of edges. - *

- *

- * This algorithm supports incremental edge routing, that is, extending or updating an already existing bus-style - * representation. This is useful to rearrange existing edges or to include additional edges in an existing bus. - *
- * Incremental routing is supported by denoting so-called fixed edges using the - * {@link yfiles.router.BusDescriptor#fixed corresponding BusDescriptor property}. The paths of edges which are not marked as fixed are calculated by the algorithm. - * The structure induced by the fixed edges must be orthogonal and cycle-free. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface BusRouter extends yfiles.layout.LayoutStageBase{} - export class BusRouter { - /** - * Creates a new instance of {@link yfiles.router.BusRouter} with default settings. - */ - constructor(); - /** - * Data provider key for specifying a bus descriptor object for each edge - *

- * The {@link yfiles.router.BusDescriptor} for an edge provides the edge's bus ID, its optional group IDs and whether or not the - * edge is fixed. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static EDGE_DESCRIPTOR_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for specifying the edge subset to be routed - *

- * This key is used if no custom key for specifying the subset is defined using {@link yfiles.router.BusRouter#affectedEdgesDpKey}. - *

- * @see yfiles.router.BusRouter#scope - * @see yfiles.router.BusRouter#affectedEdgesDpKey - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static DEFAULT_AFFECTED_EDGES_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Gets or sets the equidistant spacing between the horizontal and vertical grid lines. - *

- * Positive values greater than 2 are allowed. Positive values less than 2 are ignored, while negative values are mapped to - * their absolute value. - *

- * @see yfiles.router.BusRouter#gridRouting - * @type {number} - */ - gridSpacing:number; - /** - * Gets or sets whether or not to route edge segments on grid lines only. - * @type {boolean} - */ - gridRouting:boolean; - /** - * Gets or sets the minimum distance between edge segments and nodes. - *

- * Positive values greater than 2 are allowed. Positive values less than 2 are ignored, while negative values are mapped to - * their absolutes. - *

- * @type {number} - */ - minimumDistanceToNode:number; - /** - * Gets or sets the minimum distance between any two edge segments. - *

- * The edge routing algorithm adheres to this value if possible, but reduces the distance value selectively, i.e., only for - * a currently processed edge, when there is not enough space to find a path with the proper value. - *

- *

- * Positive values greater than 4 are allowed. Positive values less than 4 are ignored, while negative values are mapped to - * their absolute values. - *

- * @type {number} - */ - minimumDistanceToEdge:number; - /** - * Gets or sets the cost for each edge crossing. - *

- * A cost value of n means that it is more profitable for a path to change its direction n times rather than crossing the - * path of an edge. If the cost value is set to 0.0, no global crossing optimization is performed. - *

- *

- * The cost is defined to be a non-negative value. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given cost value is negative - * @type {number} - */ - crossingCost:number; - /** - * Gets or sets whether or not to perform an additional step to reroute the edges such that the number of edge crossings is - * reduced. - *

- * This features does not guarantee that the number of crossings will be the minimal. - *

- * @see yfiles.router.BusRouter#crossingCost - * @type {boolean} - */ - rerouting:boolean; - /** - * Gets or sets the maximum number of selected backbone segments with the same orientation. - *

- * This setting defines the number of backbone segments of the same orientation which are computed by the backbone - * selection phase. The final number of backbone segments may be different due to changes in the routing and recombination - * phase. - *

- *

- * The number must be a value greater than or equal to 1. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given preferred number is smaller than 1 - * @type {number} - */ - preferredBackboneSegmentCount:number; - /** - * Gets or sets the preferred minimum length of a backbone segment. - *

- * This number defines the minimum length of backbone segments which are computed by the backbone selection phase. Some of - * the final backbone segments may be shorter due to changes in the routing and recombination phase. - *

- *

- * The minimum length is defined to be a value greater than or equal to 1.0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given minimum length is smaller than 1.0 - * @type {number} - */ - minimumBackboneSegmentLength:number; - /** - * Gets or sets the minimum number of bus connections a backbone segment must have. - *

- * If a backbone segment has less connections, it is removed and the affected nodes connect to another backbone segment. - *

- *

- * The minimum connection count must be a value greater than or equal to 1. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given minimum count is smaller than 1 - * @type {number} - */ - minimumBusConnectionsCount:number; - /** - * Gets or sets whether or not collinear bends are removed from the layout. - *

- * A collinear bend is a bend that lies on a common line with its predecessor bend and successor bend. - *

- *

- * If an edge has a collinear bend, there is another edge which has a real bend at this point, i.e., the bend location is - * an intersection of the bus. Therefore, it may be advantageous for some applications to keep such bends. - *

- * @type {boolean} - */ - removeCollinearBends:boolean; - /** - * Gets or sets the key to register a {@link yfiles.algorithms.IDataProvider} for marking edges as selected. - *

- * If the {@link yfiles.router.BusRouter#scope scope} is set to {@link yfiles.router.Scope#ROUTE_AFFECTED_EDGES}, only the edges for which the registered {@link yfiles.algorithms.IDataProvider} - * returns true will be routed. All other edges will be considered to have fixed routes. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified key is null - * @type {any} - */ - affectedEdgesDpKey:any; - /** - * Gets or sets the scope for this routing algorithm that determines which edges are routed. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown scope is given - * @type {yfiles.router.Scope} - */ - scope:yfiles.router.Scope; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.BusRouter; - } - /** - * This edge routing algorithm generates orthogonal routes for the edges of the graph. - *

- * Compared to the routing algorithm implemented by class - * {@link yfiles.router.EdgeRouter}, this implementation is usually faster but supports less constraints and, by default, may - * produce node-edge overlaps. - *

- *

- * Layout Style Edges are routed in an orthogonal fashion, i.e., edge paths consist only of vertical and horizontal segments. - *

- *

- * During the routing process, the positions of the nodes are considered to be fixed and the routing algorithm will not - * modify their locations or their sizes in any way. - *

- *

- * The edge routing algorithm can be applied wherever it is required to route the edges as orthogonal segments, while - * keeping the positions of the nodes in the diagram fixed. Some potential applications include electric circuit design, - * floor planning, UML class diagrams/inheritance diagrams and navigation maps. - *

- *

- * {@graph {"ann":{"s":[45,30],"d":0},"n":[[210,270,60,30],[405,165,60,30],[120,270,60,30],[-7.5,270],[75,375,60,30],[502.5,165],[615,270,60,30],[630,330,30,30],[292.5,225,75,30],[232.5,60],[112.5,165,75,30],[630,60,30,30],[225,0,60,30],[712.5,330],[-7.5,375],[712.5,0],[120,330,60,30],[307.5,330],[712.5,270],[585,165,30,30],[412.5,225],[502.5,225],[232.5,120],[465,105,75,30]],"e":[[7,6,0,-15,0,15],[8,17,0,15,0,-15],[9,3,-22.5,0,-5,-15,[10,75]],[1,9,0,-15,22.5,0,[435,75]],[11,6,0,15,0,-15],[3,2,22.5,0,-30,0],[18,6,-22.5,0,30,0],[3,14,0,15,0,-15],[12,10,-30,0,-5,-15,[145,15]],[10,1,37.5,-5,-30,-5],[10,2,0,15,0,-15],[6,0,-30,0,30,0],[5,19,22.5,0,-15,0],[1,8,-8.75,15,5,-15,[426.25,205,335,205]],[9,11,5,-15,0,-15,[260,50,645,50]],[10,3,-37.5,0,5,-15,[20,180]],[8,0,-37.5,0,0,-15,[240,240]],[18,15,0,-15,0,15],[13,7,-22.5,0,15,0],[2,0,30,0,-30,0],[10,8,37.5,5,-5,-15,[325,185]],[16,17,30,0,-22.5,0],[13,18,0,-15,0,15],[1,5,30,0,-22.5,0],[12,15,30,0,-22.5,0],[12,9,-5,15,-5,-15],[14,4,22.5,0,-30,0],[16,2,0,-15,0,15],[8,20,37.5,0,-22.5,0],[20,1,1.25,-15,1.25,15],[21,5,0,-15,0,15],[22,9,0,-15,0,15],[22,10,-22.5,0,5,-15,[155,135]],[21,20,-22.5,0,22.5,0],[7,17,-15,0,22.5,0],[13,4,0,15,30,0,[735,390]],[23,11,0,-15,-15,0,[502.5,75]],[23,19,37.5,0,0,-15,[600,120]]],"vp":[-8.0,0.0,766.0,405.0]}} Sample output of the orthogonal edge routing algorithm with default settingsConcept This edge routing algorithm combines two - * strategic steps of edge routing and executes them one after the other. The first strategy is called path finder strategy - * and will route the edges, potentially with edge overlaps. The second strategy will then split overlapping edge segments - * inside their channels and distribute them according to the specific distribution strategy. - *

- *

- * The default path finding strategy is {@link yfiles.router.OrthogonalPatternEdgeRouter}. The default edge distribution strategy - * is {@link yfiles.router.OrthogonalSegmentDistributionStage}. - *

- *

- * Features - *

- *

- * This class itself has no special routing options except from specifying the {@link yfiles.router.ChannelEdgeRouter#pathFinderStrategy path finding} and {@link yfiles.router.ChannelEdgeRouter#edgeDistributionStrategy edge distribution} strategy. - * Most of the features like minimum element distances, grid spacing and path restrictions have to be set on the used - * instances for the two routing steps. - *

- *

- * For incremental edge routing, {@link yfiles.algorithms.IDataProvider} key {@link yfiles.router.ChannelEdgeRouter#AFFECTED_EDGES_DP_KEY} - * has to be registered with the graph to mark all edges that should be routed by the algorithm. The routes of the other - * edges remain unchanged. If there is no such key registered, the algorithm routes all edges. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface ChannelEdgeRouter extends yfiles.layout.LayoutStageBase{} - export class ChannelEdgeRouter { - /** - * Creates a new {@link yfiles.router.ChannelEdgeRouter} instance with default settings. - */ - constructor(); - /** - * Checks the sizes of the nodes to be non-zero. - * @param g The graph to check. - * @protected - */ - checkNodeSize(g:yfiles.layout.LayoutGraph):void; - /** - * Data provider key for marking the edges that should be routed - *

- * If this key is not registered with the graph, the algorithm will route all edges. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static AFFECTED_EDGES_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Gets or sets the strategy for the path finding step. - *

- * This step routes the edges and may produce edge overlaps which are later resolved in the {@link yfiles.router.ChannelEdgeRouter#edgeDistributionStrategy edge distribution} step. - *

- * @type {yfiles.layout.ILayoutAlgorithm} - */ - pathFinderStrategy:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets the strategy for the edge distribution step. - *

- * This step distributes overlapping edge segments in their channel. The channel in which the segments can be distributed - * is defined by the surrounding graph elements. - *

- * @type {yfiles.layout.ILayoutAlgorithm} - */ - edgeDistributionStrategy:yfiles.layout.ILayoutAlgorithm; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.ChannelEdgeRouter; - } - /** - * This edge routing algorithm applies organic routes to the edges of the graph. - *

- * Layout Style Edges are routed organically, i.e. in smooth curves around the nodes observing a {@link yfiles.router.OrganicEdgeRouter#minimumDistance minimum distance} to the nodes. - *

- *

- * During the routing process, the positions of the nodes are considered to be fixed and the router will not modify their - * locations or their sizes in any way. - *

- *

- * The edge routing algorithm can be applied whenever edge paths should avoid crossing any nodes in organic or cyclic - * layout styles. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":0,"c":1},"n":[[339,332],[314,663],[246,391],[112,365],[280,143],[309,245],[521,184],[519,462],[638,200],[118,200],[289,600],[419,153],[194,257],[564,349],[39,419],[266,76],[637,149],[247,23],[663,356],[420,517],[583,496],[183,525],[406,271],[498,406],[519,95],[250,263],[634,471],[340,459],[93,504],[368,110],[488,592],[177,154],[266,548],[470,161],[180,365],[606,400],[0,309],[130,256],[154,631],[60,311],[397,568],[16,241],[421,51],[22,368],[463,102],[67,224],[139,45],[196,95],[238,606],[347,510],[471,535],[365,631],[199,314],[125,96],[99,445],[421,463],[457,281],[497,35],[351,161],[572,190],[288,340],[400,220],[119,147],[570,98],[340,569],[526,513],[416,636],[196,35],[447,412],[242,496],[559,292],[150,416],[348,403],[38,477],[539,581],[228,146],[594,554],[610,280],[297,194],[329,0],[406,0],[181,206],[163,467],[317,66],[661,305],[55,150],[508,307],[180,576],[689,231],[96,555],[240,657],[543,241],[111,308],[555,405],[467,643],[449,352],[232,445],[666,416]],"e":[[0,1,[335.66,406.18,333.37,416.82,331.63,427.45,326.91,469.44,325.45,574.7,326.08,585.88,329.61,608.76,330.67,620.69]],[0,2,[322.18,373.25,310.13,381.03]],[0,3,[324.5,334.9,309.02,329.8,293.4,330.34,236.16,351.02,222.05,355.29,206.97,355.02,192.08,353.11,178.03,357.07]],[0,4,[351.49,268.72,349.88,254.78,343.6,242.42,331.57,234.82,303.36,234.17,292.35,226.33,286.5,215.59,286.02,203.04]],[0,5],[0,6,[428.62,311.49,440.22,302.84,454.41,274.85]],[0,7,[446.52,392.65,474.45,404,484.01,413.8,488.6,427.79,494.98,440.48]],[0,8,[426.01,313.31,439.52,303.87,453.15,277.95,464.34,271.34,476.96,270.23,500.5,273.67,544.26,281.36,555.61,282.65,567.08,280.79,577.87,275.33]],[0,9,[308.77,326.66,262.87,308.22,248.01,300.72,238.93,288.48,235.94,272.58,231.01,257.56,219.51,247.31,188.2,245.93,173.56,238.97]],[0,10,[338.79,396.59,334.49,413.65,328.25,447.31,320.83,497.58,312.44,564.66]],[0,11,[389.21,229.75,395.29,218.04]],[0,12,[317.61,329.41,260.47,307.45,250.73,302.73,241.57,296.79]],[0,13,[455.92,337.29,471.02,338.02,485.35,341.25,511.94,349.47]],[0,14,[322.04,373.66,309.3,379.72,294.9,380.89,266.5,377.98,252.08,379.76,238.85,386.12,213.64,401.5,199.41,406.7,183.85,406.68,167.87,404.99,151.09,407.31,134.98,411.26]],[0,15,[353.71,330.4,350.89,263.48,348.57,246.47,341.24,213.46,336.58,196.79,325.52,164.96,319.31,148.97,310.63,133.49]],[0,16,[414.67,318.85,438.09,305.77,445.29,294.3,450.39,282.07,458.9,273.15,469,266.59,548.02,222.11,556.91,213.74,565.88,190.33,574.87,182.39,586.14,178.03]],[0,17,[351.18,260.4,349.73,248.97,342.55,215.84,336.08,193.14,323.88,159.03,318.91,147.37,310.73,137.35,299.46,130.24,274.92,118.04,263.72,110.5,256.06,98.75,255.2,83.29]],[0,18,[449.23,337.24,460.44,336.84,472.05,337.94,483.25,340.2,515.57,347.93,527.01,348.23,538.21,346.05,570.17,336.94,581.97,336.14,593.53,338.61]],[0,19,[386.75,401.74,391.67,414.2,406.76,475.79,410.7,488.12,416.28,499.76,422.43,510.76,429.28,521.1]],[0,20,[441.16,390.65,454.09,396.14,467.28,401.18,479.65,408.23,486.46,419.97,490.73,433.62,499.82,443.19,513.09,447.19,527.26,449.42,540.69,452.14,552.84,459.14,562.64,469.33]],[0,21,[346.85,359.59,309.35,420.4,300.65,431.95,292.74,444.04,275.05,467.54,264.99,478.94,237.08,493.01,226.61,504.8]],[0,22],[0,23,[441.87,390.83,452.09,395.12,474.02,402.99]],[0,24,[394.9,278.08,405.38,265.78,420.33,260.03,433.54,253.67,440.93,239.63,453.72,194.88,457.41,179.4,462.73,163.54,473.96,151.35,489.87,142.62,505.68,131.98]],[0,25],[0,26,[443.76,391.94,454.52,396.46,465.49,400.4,475.94,405.45,483.96,413.69,487.9,425.26,492.62,436.58,501.97,444.03,513.85,447.54,538.88,451.1,551.26,454.29]],[0,27,[335.47,409.13,335.91,425.89,341.76,442.39]],[0,28,[304.63,401.81,279.42,427.37,264.93,433.6,249.25,434.04,233.94,436,177.31,454.17,162.81,461.08,150.78,471.69]],[0,29,[391.99,183.49,392.17,168.35]],[0,30,[379.7,389.49,387.21,404.3,392.85,419.75,407.6,477.96,412.89,491.58,422.65,501.66,437.13,505.23,451.35,510.41,461.14,523.17,460.71,539.45,459.43,556.24,467.8,571.02]],[0,31,[345.1,335.21,335.76,323.75,326.96,311.7,289.98,263.58,279.75,251.93]],[0,32,[343.55,373.14,315.75,453.99]],[0,33,[395.41,277.39,404.28,266.36,430.24,255.67,439.95,245.33,447.72,233.23,455.38,222.46,462.6,210.62,470.24,199.31]],[0,34,[320.5,374.57,310.3,379.58,299.25,381.01,267,377.27,256.18,376.82]],[0,35,[447.26,393.05,464.75,396.92,517.71,393.94,552.46,393.96,570.56,394.48,588.29,399.05]],[0,36,[324.51,334.8,313.86,330.99,302.52,329.37,291.4,331,229.75,353.05,218.61,355.85,206.54,355.04,194.57,352.53,183.37,351.65,140.67,350.4,74.42,351.92,63.14,348.81,43.25,339.26]],[0,37,[315.65,330.79,302.24,326.14,221.99,302.44,208.11,298.95,194.21,294.54]],[0,38,[291.97,443.38,271.04,472.33,261.99,480.94,249.87,486.16,238.48,492.54,232.04,503.67,229.86,516.59,221.46,592.14,216.53,604.24,208.21,614.3]],[0,39,[322.7,334.1,305.86,329.69,288.77,331.39,222.92,355.38,204.68,355.06,185.55,351.32,166.46,350.31,147.42,349.96,127.91,348.98,109.08,344.26]],[0,40,[385.83,399.93,391.14,415,405.18,536.96]],[0,41,[315.73,330.32,285.46,320.65,224.16,303.07,212.95,301.44,150.12,299.63,138.87,297.96,128.22,294.68]],[0,42,[392.06,206.63]],[0,43,[327.11,335.97,312.77,330.73,298.03,329.65,284.06,333.44,230.99,352.58,217.24,355.83,202.62,354.37,187.97,351.92,130.42,351.25,115.65,353.54]],[0,44,[389.02,229.97,397.45,216.12,410.94,207.76,438.95,194.72,452.19,186.4,459.38,173.33,463.33,158.21]],[0,45,[319.72,332.86,301.9,326.53,232.62,305.39,198.66,296.17,186.46,286.52,170.91,259.6,160.55,248.12,145.88,243.01]],[0,46,[286.25,258.53,248.79,216.04,242.43,206.94,235,197.31,228.43,187.39,221.82,176.16,217.01,162.99,210.26,150.25,198.66,139.63,188.34,129.15,180.36,115.63,173.55,101.92]],[0,47,[280.19,249.76,224.45,181.39,217.36,164.22]],[0,48,[285.9,512.16,276.58,527.31,263.6,539.9,254.29,553.79,252.08,570.91]],[0,49,[337.85,400.86,335.22,412.8,335.86,425.11,341.55,436.2,351.73,443.92,363.37,449.51,373.84,456.56,379.94,467.39,380.17,479.84,376.25,491.95,371.73,503.11]],[0,50,[363.53,357.76,373.66,368.31,383.38,379.43,393.44,390.12,433.18,435.74,454.89,458.54,463.23,472.48]],[0,51,[338.15,399.57,334.71,417.74,339.34,434.34,353.71,444.87,370.07,453.14,380.21,466.15,383.35,483.6,387.37,519.13,387.54,537.38,384.43,573.7]],[0,52,[319.73,332.96,301.78,329.04,283.75,328.69]],[0,53,[301.52,278.38,291.52,264.42,231.87,190.09,222.09,176.91,216.51,161.08,208.24,148.12,194.61,139.94]],[0,54,[328.75,368.24,314.97,377.91,298.88,381.42,264.15,377.59,247.67,381.71,234.12,393.32,188.56,445.62,174.64,454.91,158.8,458.39]],[0,55,[385.81,395.38]],[0,56,[442.78,309.64]],[0,57,[378.17,262.12,383.23,246.33,389.07,230.06,397.76,216.16,410.81,208.08,437.76,195.53,450.07,188.37,458.21,177.78,459.5,164.06,457.17,151.5,451.13,127.97,450.06,115.65,453.12,104.07,460.33,94.22]],[0,58],[0,59,[421.29,315.21,437.79,306.24,446.01,291.77,453.41,277.31,467.69,267.94]],[0,60],[0,61,[391.19,276.52]],[0,62,[343.32,333.1,332.31,319.71,321.89,305.25,289,262.94,276.51,250.23,222.11,206.93,207.08,197.5,173.74,189.82]],[0,63,[397.1,274,408.19,264.17,424.19,258.19,439.83,249.88,494.17,203.53]],[0,64,[336.87,404.08,333.8,419.28,329.35,464.32,329.41,479.8,333.11,509.98,335.6,525.23,339.44,540.66]],[0,65,[440.17,441.81,452.51,453.34]],[0,66,[384.08,396.29,390.86,414.32,393.85,433.39,403.11,506.26,405.93,524.42,409.95,542.54,421.55,555.65,435.45,567.44,440.34,583.83,438.64,600.97]],[0,67,[306.34,281.88,300.22,271.55,295.69,260.61,279.48,207.91,267.29,152.86,263.63,142.28,239.06,94.7]],[0,68],[0,69],[0,70,[469.45,323.87,482.71,319.47,494.32,311.46,505.19,301.93,517.88,296.03,532.51,296.41]],[0,71,[323.13,372.77,310.98,379.24,297.29,381.04,270.49,378.25,256.85,378.74,244.01,383.32,199,411.8]],[0,72],[0,73,[325.78,370.71,315.11,377.72,302.8,380.91,290.09,380.37,265.1,378.01,251.79,380.05,241.04,386.57,231.83,395.9,189.43,444.63,178.23,453.01,164.62,459.94,151.89,468.02,140.08,477.64,127.82,485.49,113.2,489.69,97.78,490.87]],[0,74,[453.85,457.25,464.04,469.46]],[0,75,[306.38,281.75,298.95,269.69]],[0,76,[440.85,442.45,452.16,452.04,509.45,492.6,521.63,499.85,535.67,502.44,550.32,503.97,562.01,512.5,580.43,536.15]],[0,77,[474.36,323,489.4,315.19,502.42,304.25,516.41,296.03,531.84,291.13,562.99,282.6,579.4,281.42,595.17,285.3]],[0,78,[353.21,311.51,351.75,274.78,349.92,255.71,341.42,238.46]],[0,79,[352.32,266.07,350.2,244.99,339.48,182.86,339.24,171.66,340.97,160.66,357.4,88.15,357.65,76.64,355.99,65.74]],[0,80,[375.1,267.1,384.99,225.91,396.91,184.78,409.57,132.2,410.69,121.28,408.94,67.51,410.21,56.22,412.62,45.46]],[0,81,[291.41,265.52,281.99,255.89,270.2,249.04]],[0,82,[289.83,417.4,279.44,426.99,267.12,432.95,253.03,433.84,239.16,435.43,227.3,441.61]],[0,83,[351.51,265.09,349.93,248.44,339.25,182.25,337.18,165.16]],[0,84,[455.7,337.03,469.05,337.55,481.96,339.78,505.92,345.81,518.43,348.12,531.41,347.66,567.71,337.38,580.54,334.73]],[0,85,[316.07,329.16,263.32,308.39,250.39,302.01,240.77,292.16,236.59,279.05,234.5,265.5,228.38,254.17,217.84,247.14,204.95,246.22,191.96,246.62,180.26,242.04,172.3,232.48,166.36,221.23,160.82,209.17,153.71,198.91,143.37,190.93,113.51,182.34]],[0,86],[0,87,[306.22,421.73,276.69,464.63,265.95,478.34,238.46,492.28,231.78,504.76,228.46,518.2,223.15,544.77,217.77,557.47]],[0,88,[476.59,322,487.46,316.77,506.01,301.68,516.62,295.9,628.38,263.9]],[0,89,[304.58,402.64,286.25,421.15,275.66,429.7,262.67,433.71,248.08,433.9,234.11,437.41,223.91,447.62,217.54,460.12,206.11,485.16,198.82,497.66,189.34,507.33]],[0,90,[348.03,366.59,344.43,376.17,335.23,405.79,332.53,416.36,309.42,567.16,304.71,578.23,296.24,587.44,286.64,595.91,279.81,606.85,278.36,620.58,275.34,634.69]],[0,91,[428.72,311.52,440.09,302.99,453.32,277.82,465.13,270.94,478.69,267.74]],[0,92,[327.03,335.9,312.92,330.7,298.41,329.58,284.16,333.41,230.95,352.66,216.96,355.85,202.5,353.87]],[0,93,[444.66,391.69,459.07,395.94,474.15,396.91,503.46,395.07,518.07,396.29,531.89,400.88]],[0,94,[386.41,400.52,390.51,410.75,392.91,421.24,405.97,527.76,408.98,540.16,416.51,551.43,428.68,560.5,438.65,572.18,453.33,600.22]],[0,95],[0,96,[288.85,419.25,275.08,433.27]],[0,97,[435.13,387.04,451.62,394.24,468.82,397.13,501.49,394.44,533.26,393.31,563.5,393.53,578.12,395.81,590.16,403.49,595.24,416.31,599.59,429.12,608.91,437.7,621.12,440.69,633.66,439.71,669.2,433.82]]],"vp":[0.0,0.0,719.0,693.0]}}Concept The edge routing algorithm uses a force-directed approach to calculate the edge paths. Nodes are considered to be - * repulsive forces while edges will try to become as short as possible. - *

- *

- * Each edge is routed separately and is influenced by the nodes in a certain area around it. The algorithm will add bends - * to the edge path that are placed by balancing the forces. - *

- *

- * The quality of the result highly depends on how much space there is between the nodes. More precisely, the distance - * between each pair of nodes should be at least twice the specified {@link yfiles.router.OrganicEdgeRouter#minimumDistance minimum distance}. If it is not necessary that the - * nodes keep their locations, this can be ensured using a combination of {@link yfiles.organic.RemoveOverlapsStage} and - * {@link yfiles.router.OrganicEdgeRouter#createNodeEnlargementStage node enlargement stage}. - *

- *

- * Features - *

- *

- * {@link yfiles.router.OrganicEdgeRouter#minimumDistance} will make edges keep a custom distance to the nodes. However, if there is not enough space between the nodes, this - * distance may be undershot (i.e. edges will be closer to nodes). - *

- *

- * {@link yfiles.router.OrganicEdgeRouter} is able to - * {@link yfiles.router.OrganicEdgeRouter#keepExistingBends reuse existing bends}. Edges will contain those bends along with other bends added by the layout algorithm. - *

- *

- * This edge routing algorithm is realized as a {@link yfiles.layout.ILayoutStage} which can be applied to a graph directly or - * using a {@link yfiles.router.OrganicEdgeRouter#coreLayout core layout algorithm}. - *

- * @class - * @implements {yfiles.layout.ILayoutStage} - */ - export interface OrganicEdgeRouter extends yfiles.lang.Object,yfiles.layout.ILayoutStage{} - export class OrganicEdgeRouter { - /** - * Creates a new {@link yfiles.router.OrganicEdgeRouter} with the given {@link yfiles.router.OrganicEdgeRouter#coreLayout core layout algorithm}. - * @param core the core layout algorithm - */ - constructor(core:yfiles.layout.ILayoutAlgorithm); - /** - * Creates a new {@link yfiles.router.OrganicEdgeRouter} instance with the default settings. - */ - constructor(); - /** - * Performs the organic routing of the edges of the input graph. - * @param graph the input graph - */ - applyLayout(graph:yfiles.layout.LayoutGraph):void; - /** - * Checks the sizes of the nodes to be non-zero. - * @param g The graph to check. - * @protected - */ - checkNodeSize(g:yfiles.layout.LayoutGraph):void; - /** - * Returns a {@link yfiles.layout.ILayoutStage} which temporarily increases the sizes of the nodes to avoid overlaps. - *

- * The edges will keep a greater distance to the nodes. Therefore, they won't cross them. - *

- * @returns the {@link } that resizes the nodes - */ - createNodeEnlargementStage():yfiles.layout.ILayoutStage; - /** - * Data provider key for selecting edges that should be routed - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static AFFECTED_EDGES_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Gets or sets whether or not edges are allowed to cross nodes. - *

- * Allowing edges to overlap with nodes will produce smoother edges, because the edge paths can be closer to the nodes. - *

- * @see yfiles.router.OrganicEdgeRouter#createNodeEnlargementStage - * @see yfiles.router.OrganicEdgeRouter#minimumDistance - * @type {boolean} - */ - edgeNodeOverlapAllowed:boolean; - /** - * Gets or sets the core layout algorithm which arranges the graph before edge routing. - * @type {yfiles.layout.ILayoutAlgorithm} - */ - coreLayout:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets the minimum distance the algorithm should guarantee between nodes and non-incident edges. - *

- * The distance also influences how many bends are added to the path (a higher distance leads to less bends). - *

- *

- * The minimum distance is defined to be a non-negative value. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given minimum distance is negative - * @type {number} - */ - minimumDistance:number; - /** - * Gets or sets whether or not the initial bend coordinates are kept when determining the edge path. - *

- * The bends are considered as fixed nodes and stay part of the path. - *

- * @type {boolean} - */ - keepExistingBends:boolean; - /** - * Gets or sets whether a rerouting step is performed on all edges or just on a subset where distances are violated. - *

- * If only a subset of edges is rerouted, only those edges which cross nodes or come too close to a node are included. - * During rerouting, more bends are added to the edges that will be influenced by the repulsive forces. - *

- * @type {boolean} - */ - routeAllEdges:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.OrganicEdgeRouter; - } - /** - * {@link yfiles.router.OrthogonalPatternEdgeRouter} routes edges orthogonally such that the resulting layout of the edges consists - * only of vertical and horizontal segments. - *

- * Note that the location and size of the nodes in a diagram remains unchanged. - *

- *

- * The edge router will not try to find a perfect route from source to edge (unlike to what {@link yfiles.router.EdgeRouter} does) - * but chooses the best path out of a set of fixed paths. The best path out of these possible paths is determined by its - * cost. The costs may be influenced by setting several cost factors. The distance that an edge will have from its source - * and target node is determined by {@link yfiles.router.OrthogonalPatternEdgeRouter#minimumDistance}. - *

- *

- * The edges whose paths have to be routed can be defined registering a {@link yfiles.algorithms.IDataProvider} with key - * {@link yfiles.router.OrthogonalPatternEdgeRouter#DEFAULT_AFFECTED_EDGES_DP_KEY}. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface OrthogonalPatternEdgeRouter extends yfiles.layout.LayoutStageBase{} - export class OrthogonalPatternEdgeRouter { - /** - * Creates a new instance of {@link yfiles.router.OrthogonalPatternEdgeRouter} with default settings. - */ - constructor(); - /** - * Calculates the costs for all bends of the given path. - *

- * This method is called by {@link yfiles.router.OrthogonalPatternEdgeRouter#calculateCost}. The default implementation multiplies - * the number of bends with the according {@link yfiles.router.OrthogonalPatternEdgeRouter#bendCost costs}. It may be overridden to change the calculation of these costs. - *

- * @param edge the edge for which the costs are calculated - * @param path the path of the given edge - * @param spc the source {@link } for this edge - * @param tpc the target {@link } for this edge - * @returns the costs for the bends of this path - * @protected - */ - calculateBendCost(edge:yfiles.algorithms.Edge,path:yfiles.algorithms.YList,spc:yfiles.layout.PortCandidate,tpc:yfiles.layout.PortCandidate):number; - /** - * Calculates the edge cost of a possible edge path, in order to determine which path is the best, i.e., the cheapest. - *

- * This method is called by {@link yfiles.router.OrthogonalPatternEdgeRouter#applyLayout} in order to decide which path is the - * best. The default implementation considers the edge length, the number of bends, edge crossings, - * {@link yfiles.layout.PortCandidate}s and monotonic path restrictions. It may be overridden to apply a different set of costs or - * a different weighting. - *

- * @param edge the edge whose costs to calculate - * @param path the edge's path - * @param spc the source {@link } for this edge - * @param tpc the target {@link } for this edge - * @returns the sum of all costs for this edge's path - * @protected - */ - calculateCost(edge:yfiles.algorithms.Edge,path:yfiles.algorithms.YList,spc:yfiles.layout.PortCandidate,tpc:yfiles.layout.PortCandidate):number; - /** - * Calculates the overall crossing costs of the given path, including edge crossings, edge overlaps and node crossings. - *

- * This method is called by - * {@link yfiles.router.OrthogonalPatternEdgeRouter#calculateCost}. The default implementation will determine overlaps and - * crossings between edge segments and nodes and sum up the costs. It may be overridden to use a different combination of - * costs. - *

- * @param edge the edge for which the costs are calculated - * @param path the path of the given edge - * @param spc the source {@link } for this edge - * @param tpc the target {@link } for this edge - * @returns the overall crossing costs of the given path, including edge crossings, edge overlaps and node crossings - * @protected - */ - calculateCrossingCosts(edge:yfiles.algorithms.Edge,path:yfiles.algorithms.YList,spc:yfiles.layout.PortCandidate,tpc:yfiles.layout.PortCandidate):number; - /** - * Calculates the costs for the length of the given path. - *

- * This method is called by {@link yfiles.router.OrthogonalPatternEdgeRouter#calculateCost}. The default implementation returns - * costs between 0 for short paths and 1 for long paths. Hence, it has relatively little impact on the overall costs. The - * method may be overridden to introduce a different weighting of the edge length. - *

- * @param edge the edge for which the costs are calculated - * @param path the path of the given edge - * @param spc the source {@link } for this edge - * @param tpc the target {@link } for this edge - * @returns the costs for the length of the given path - * @protected - */ - calculateEdgeLength(edge:yfiles.algorithms.Edge,path:yfiles.algorithms.YList,spc:yfiles.layout.PortCandidate,tpc:yfiles.layout.PortCandidate):number; - /** - * Calculates the costs for the chosen {@link yfiles.layout.PortCandidate}s. - *

- * This method is called by {@link yfiles.router.OrthogonalPatternEdgeRouter#calculateCost}. The default implementation will return - * the {@link yfiles.layout.PortCandidate#cost candidates' costs}. It may be overridden to change the calculation of these costs. - *

- * @param edge the edge for which the costs are calculated - * @param path the path of the given edge - * @param spc the source {@link } for this edge - * @param tpc the target {@link } for this edge - * @returns the costs for the {@link }s - * @protected - */ - calculatePortCandidateCost(edge:yfiles.algorithms.Edge,path:yfiles.algorithms.YList,spc:yfiles.layout.PortCandidate,tpc:yfiles.layout.PortCandidate):number; - /** - * Calculates the extra penalty that is added to the path's cost if the edge is a self-loop and source and target ports - * have the same direction. - *

- * This method is called by - * {@link yfiles.router.OrthogonalPatternEdgeRouter#calculateCost}. The default implementation adds costs for another bend if - * source and target ports share the same node side. In this manner, paths with different source and target directions are - * cheaper and thus preferred. The method may be overridden to change the calculation of this penalty. - *

- * @param edge the edge for which the costs are calculated - * @param path the path of the given edge - * @param spc the source {@link } for this edge - * @param tpc the target {@link } for this edge - * @returns an extra penalty for specific self-loop paths - * @protected - */ - calculateSelfLoopSelfSidePenaltyCost(edge:yfiles.algorithms.Edge,path:yfiles.algorithms.YList,spc:yfiles.layout.PortCandidate,tpc:yfiles.layout.PortCandidate):number; - /** - * Checks the sizes of the nodes to be non-zero. - * @param g The graph to check. - * @protected - */ - checkNodeSize(g:yfiles.layout.LayoutGraph):void; - /** - * Data provider key for determining which edges are routed - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static DEFAULT_AFFECTED_EDGES_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Gets or sets the monotonic path restriction that should be applied. - * @throws {Stubs.Exceptions.ArgumentError} if the specified path restriction is unknown - * @type {yfiles.router.MonotonicPathRestriction} - */ - monotonicPathRestriction:yfiles.router.MonotonicPathRestriction; - /** - * Gets or sets the key to register a {@link yfiles.algorithms.IDataProvider} which determines the edges that shall be routed by - * this algorithm. - * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.algorithms.IDataProvider} key is null - * @type {any} - */ - affectedEdgesDpKey:any; - /** - * Gets or sets the minimum distance that an edge will maintain from its source and target node. - *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @type {number} - */ - minimumDistance:number; - /** - * Gets or sets the spacing of the grid on which edges are routed. - *

- * The spacing between two grid lines must be at least 2. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified grid spacing is less than 2 - * @see yfiles.router.OrthogonalPatternEdgeRouter#gridRouting - * @type {number} - */ - gridSpacing:number; - /** - * Gets or sets the origin of the grid. - * @throws {Stubs.Exceptions.ArgumentError} if the specified point is null - * @see yfiles.router.OrthogonalPatternEdgeRouter#gridRouting - * @type {yfiles.algorithms.YPoint} - */ - gridOrigin:yfiles.algorithms.YPoint; - /** - * Gets or sets whether or not to route the edges on a grid. - *

- * The grid can be defined using methods {@link yfiles.router.OrthogonalPatternEdgeRouter#gridOrigin} and {@link yfiles.router.OrthogonalPatternEdgeRouter#gridSpacing}. - *

- * @see yfiles.router.OrthogonalPatternEdgeRouter#gridOrigin - * @see yfiles.router.OrthogonalPatternEdgeRouter#gridSpacing - * @type {boolean} - */ - gridRouting:boolean; - /** - * Gets or sets the costs for a crossing between two edges. - *

- * These costs are used for finding the best path out of the predefined paths from which the router can choose. - *

- *

- * The costs need to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified costs are negative - * @type {number} - */ - edgeCrossingCost:number; - /** - * Gets or sets the costs for edges that cross nodes. - *

- * These costs are used for finding the best path out of the predefined paths from which the router can choose. - *

- *

- * The costs need to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified costs are negative - * @type {number} - */ - nodeCrossingCost:number; - /** - * Gets or sets the costs for creating a bend on the edge's path. - *

- * These costs are used for finding the best path out of the predefined paths from which the router can choose. - *

- *

- * The costs need to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified costs are negative - * @type {number} - */ - bendCost:number; - /** - * Gets or sets the costs for overlapping edge paths. - *

- * These costs are used for finding the best path out of the predefined paths from which the router can choose. - *

- *

- * The costs need to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified costs are negative - * @type {number} - */ - edgeOverlapCost:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.OrthogonalPatternEdgeRouter; - } - /** - * {@link yfiles.router.OrthogonalSegmentDistributionStage} distributes overlapping edge segments of orthogonally routed edges. - *

- * The edge segments are assigned to the so-called channels within which they are distributed. Those channels are defined by the - * surrounding graph elements. - *

- *

- * The algorithm will not distribute the segments, whose endpoints connect to a node using a port that has a strong {@link yfiles.layout.PortConstraint} - * or a fixed {@link yfiles.layout.PortCandidate}. - *

- *

- * Features - *

- *

- * It is possible to define a {@link yfiles.router.OrthogonalSegmentDistributionStage#preferredDistance preferred distance} between distributed edge segments. This distance will only be applied if - * there is enough space in the according channel. In the case where there is not enough space, the preferred distance may - * be {@link yfiles.router.OrthogonalSegmentDistributionStage#flexiblePreferredDistance reduced} for the edges. If the layout algorithm is not allowed to reduce the preferred distance, these edges won't be - * distributed. - *

- *

- * Edges can be distributed on {@link yfiles.router.OrthogonalSegmentDistributionStage#gridRouting grid coordinates}. The grid can only be considered if there is enough space in the according - * channel for at least as many grid lines as the number of segments. In the case where there is not enough space, the {@link yfiles.router.OrthogonalSegmentDistributionStage#gridSpacing grid spacing} - * may be {@link yfiles.router.OrthogonalSegmentDistributionStage#flexibleGridSpacing reduced} in this channel. If the layout algorithm is not allowed to reduce the grid spacing, these edges won't be - * distributed. - *

- *

- * Method {@link yfiles.router.OrthogonalSegmentDistributionStage#lockFirstAndLastSegment} can be used to guarantee that the first and last segment of an edge won't be distributed. So, ports can easily - * be maintained without setting explicit strong {@link yfiles.layout.PortConstraint}s or fixed {@link yfiles.layout.PortCandidate}s. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface OrthogonalSegmentDistributionStage extends yfiles.layout.LayoutStageBase{} - export class OrthogonalSegmentDistributionStage { - /** - * Creates a new instance of {@link yfiles.router.OrthogonalSegmentDistributionStage} with default settings. - */ - constructor(); - /** - * Specifies the coordinates of the origin of the grid. - *

- * The grid coordinates will be multiples of the {@link yfiles.router.OrthogonalSegmentDistributionStage#gridSpacing grid spacing} added to this origin. - *

- * @param offsetX the x-coordinate of the grid origin - * @param offsetY the y-coordinate of the grid origin - * @see yfiles.router.OrthogonalSegmentDistributionStage#gridRouting - */ - setGridOrigin(offsetX:number,offsetY:number):void; - /** - * Data provider key for determining which edges are distributed - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static DEFAULT_AFFECTED_EDGES_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Gets or sets the key to register a {@link yfiles.algorithms.IDataProvider} which determines the edges that shall be routed by - * this algorithm. - * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.algorithms.IDataProvider} key is null - * @type {any} - */ - affectedEdgesDpKey:any; - /** - * Gets or sets whether or not the preferred distance between edges can be reduced if there is not enough space. - *

- * The space between the nodes restricts the distribution of the orthogonal segments while considering the - * {@link yfiles.router.OrthogonalSegmentDistributionStage#preferredDistance preferred distance}. In case this option is enabled, the layout algorithm may reduce the preferred distance, otherwise - * the algorithm will only distribute segments if there is enough space. - *

- * @type {boolean} - */ - flexiblePreferredDistance:boolean; - /** - * Gets or sets whether or not the grid spacing can be reduced if there is not enough space. - *

- * The space between the nodes limits the number of grid lines on which edges are placed. In case this option is enabled, - * the layout algorithm will divide the given grid spacing by 2 as long as there are not enough grid lines on which the - * segments can be distributed, otherwise the grid spacing remains unchanged. - *

- * @type {boolean} - */ - flexibleGridSpacing:boolean; - /** - * Gets or sets whether or not the orthogonal segments are distributed on grid coordinates. - * @see yfiles.router.OrthogonalSegmentDistributionStage#setGridOrigin - * @see yfiles.router.OrthogonalSegmentDistributionStage#gridSpacing - * @see yfiles.router.OrthogonalSegmentDistributionStage#flexibleGridSpacing - * @type {boolean} - */ - gridRouting:boolean; - /** - * Gets or sets the spacing between two grid lines. - *

- * The spacing should be at least 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified spacing is negative - * @see yfiles.router.OrthogonalSegmentDistributionStage#gridRouting - * @see yfiles.router.OrthogonalSegmentDistributionStage#gridRouting - * @see yfiles.router.OrthogonalSegmentDistributionStage#flexibleGridSpacing - * @type {number} - */ - gridSpacing:number; - /** - * Gets the x-coordinate of the origin of the grid. - *

- * The grid coordinates will be multiples of the {@link yfiles.router.OrthogonalSegmentDistributionStage#gridSpacing grid spacing} added to this origin. - *

- * @see yfiles.router.OrthogonalSegmentDistributionStage#setGridOrigin - * @see yfiles.router.OrthogonalSegmentDistributionStage#gridRouting - * @see yfiles.router.OrthogonalSegmentDistributionStage#gridOriginY - * @type {number} - */ - gridOriginX:number; - /** - * Gets the y-coordinate of the origin of the grid. - *

- * The grid coordinates will be multiples of the {@link yfiles.router.OrthogonalSegmentDistributionStage#gridSpacing grid spacing} added to this origin. - *

- * @see yfiles.router.OrthogonalSegmentDistributionStage#setGridOrigin - * @see yfiles.router.OrthogonalSegmentDistributionStage#gridRouting - * @see yfiles.router.OrthogonalSegmentDistributionStage#gridOriginX - * @type {number} - */ - gridOriginY:number; - /** - * Gets or sets whether or not the first and last segment of an edge will be distributed. - * @type {boolean} - */ - lockFirstAndLastSegment:boolean; - /** - * Gets or sets the preferred distance between each two segments. - *

- * This value also applies to the distance between a segment and the border of the containing channel. - *

- *

- * The preferred distance should be at least 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @see yfiles.router.OrthogonalSegmentDistributionStage#flexiblePreferredDistance - * @type {number} - */ - preferredDistance:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.OrthogonalSegmentDistributionStage; - } - /** - * {@link yfiles.router.SnapOuterPortsToNodeBorderStage} moves edge ports that are outside the corresponding area of the nodes to - * their border. - *

- * Thus, it guarantees that ports are always in the interior of the nodes or on their borders. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface SnapOuterPortsToNodeBorderStage extends yfiles.layout.LayoutStageBase{} - export class SnapOuterPortsToNodeBorderStage { - /** - * Creates a new instance of {@link yfiles.router.SnapOuterPortsToNodeBorderStage}. - */ - constructor(); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.SnapOuterPortsToNodeBorderStage; - } - /** - * Specifies custom data for the {@link yfiles.router.BusRouter}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface BusRouterData extends yfiles.layout.LayoutData{} - export class BusRouterData { - constructor(); - /** - * Gets or sets the collection of edges affected by this router. - *

- * This collection is only used by the router if the {@link yfiles.router.BusRouter#scope} is set to {@link yfiles.router.Scope#ROUTE_AFFECTED_EDGES}. The {@link yfiles.layout.DpKeyItemCollection.#dpKey} only has to - * be specified if the {@link yfiles.router.BusRouter#affectedEdgesDpKey} is not {@link yfiles.router.BusRouter#DEFAULT_AFFECTED_EDGES_DP_KEY} - *

- * @see yfiles.router.BusRouter#affectedEdgesDpKey - * @type {yfiles.layout.DpKeyItemCollection.} - */ - affectedEdges:yfiles.layout.DpKeyItemCollection; - /** - * Gets or sets the mapping of edges to their {@link yfiles.router.BusDescriptor} - * @see yfiles.router.BusRouter#EDGE_DESCRIPTOR_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeDescriptors:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their source {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourcePortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their target {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetPortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to a collection of their source port {@link yfiles.layout.PortCandidate candidates}. - * @see yfiles.layout.PortCandidate#SOURCE_PORT_CANDIDATE_COLLECTION_DP_KEY - * @type {yfiles.layout.ItemMapping.>} - */ - sourcePortCandidates:yfiles.layout.ItemMapping>; - /** - * Gets or sets a mapping from edges to a collection of their target port {@link yfiles.layout.PortCandidate candidates}. - * @see yfiles.layout.PortCandidate#TARGET_PORT_CANDIDATE_COLLECTION_DP_KEY - * @type {yfiles.layout.ItemMapping.>} - */ - targetPortCandidates:yfiles.layout.ItemMapping>; - /** - * Gets or sets a mapping from nodes to their {@link yfiles.layout.PortCandidateSet}. - * @see yfiles.layout.PortCandidateSet#NODE_PORT_CANDIDATE_SET_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodePortCandidateSets:yfiles.layout.ItemMapping; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.BusRouterData; - } - /** - * Specifies custom data for the {@link yfiles.router.ChannelEdgeRouter}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface ChannelEdgeRouterData extends yfiles.layout.LayoutData{} - export class ChannelEdgeRouterData { - constructor(); - /** - * Gets or sets the collection of edges affected by this router. - * @see yfiles.router.ChannelEdgeRouter#AFFECTED_EDGES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - affectedEdges:yfiles.layout.ItemCollection; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.ChannelEdgeRouterData; - } - /** - * Specifies custom data for the {@link yfiles.router.OrganicEdgeRouter}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface OrganicEdgeRouterData extends yfiles.layout.LayoutData{} - export class OrganicEdgeRouterData { - constructor(); - /** - * Gets or sets the collection of edges routed by this router. - * @see yfiles.router.OrganicEdgeRouter#AFFECTED_EDGES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - affectedEdges:yfiles.layout.ItemCollection; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.OrganicEdgeRouterData; - } - /** - * Specifies custom data for the {@link yfiles.router.OrthogonalPatternEdgeRouter}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface OrthogonalPatternEdgeRouterData extends yfiles.layout.LayoutData{} - export class OrthogonalPatternEdgeRouterData { - constructor(); - /** - * Gets or sets the collection of edges affected by this router. - * @see yfiles.router.OrthogonalPatternEdgeRouter#affectedEdgesDpKey - * @type {yfiles.layout.DpKeyItemCollection.} - */ - affectedEdges:yfiles.layout.DpKeyItemCollection; - /** - * Gets or sets a mapping from edges to their source {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourcePortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their target {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetPortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to a collection of their source port {@link yfiles.layout.PortCandidate candidates}. - * @see yfiles.layout.PortCandidate#SOURCE_PORT_CANDIDATE_COLLECTION_DP_KEY - * @type {yfiles.layout.ItemMapping.>} - */ - sourcePortCandidates:yfiles.layout.ItemMapping>; - /** - * Gets or sets a mapping from edges to a collection of their target port {@link yfiles.layout.PortCandidate candidates}. - * @see yfiles.layout.PortCandidate#TARGET_PORT_CANDIDATE_COLLECTION_DP_KEY - * @type {yfiles.layout.ItemMapping.>} - */ - targetPortCandidates:yfiles.layout.ItemMapping>; - /** - * Gets or sets a mapping from nodes to their {@link yfiles.layout.PortCandidateSet}. - * @see yfiles.layout.PortCandidateSet#NODE_PORT_CANDIDATE_SET_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodePortCandidateSets:yfiles.layout.ItemMapping; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.OrthogonalPatternEdgeRouterData; - } - /** - * Specifies custom data for the {@link yfiles.router.ParallelEdgeRouter}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface ParallelEdgeRouterData extends yfiles.layout.LayoutData{} - export class ParallelEdgeRouterData { - constructor(); - /** - * Gets or sets the collection of edges affected by this router. - * @see yfiles.router.ParallelEdgeRouter#AFFECTED_EDGES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - affectedEdges:yfiles.layout.ItemCollection; - /** - * Gets or sets the collection of leading edges. - *

- * A leading edge is the edge whose layout is used to obtain the layout of the corresponding parallel edges. - *

- * @see yfiles.router.ParallelEdgeRouter#LEADING_EDGE_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - leadingEdges:yfiles.layout.ItemCollection; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.ParallelEdgeRouterData; - } - /** - * Specifies custom data for the {@link yfiles.router.EdgeRouter}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface PolylineEdgeRouterData extends yfiles.layout.LayoutData{} - export class PolylineEdgeRouterData { - constructor(); - /** - * Gets or sets the collection of affected edges. - *

- * This collection is only used by the router if the {@link yfiles.router.EdgeRouter#scope} is set to {@link yfiles.router.Scope#ROUTE_AFFECTED_EDGES}. - *

- * @see yfiles.router.EdgeRouter#affectedEdgesDpKey - * @type {yfiles.layout.DpKeyItemCollection.} - */ - affectedEdges:yfiles.layout.DpKeyItemCollection; - /** - * Gets or sets the collection of affected nodes. - *

- * This collection is only used by the router if the {@link yfiles.router.EdgeRouter#scope} is set to {@link yfiles.router.Scope#ROUTE_EDGES_AT_AFFECTED_NODES}. - *

- * @see yfiles.router.EdgeRouter#affectedNodesDpKey - * @type {yfiles.layout.DpKeyItemCollection.} - */ - affectedNodes:yfiles.layout.DpKeyItemCollection; - /** - * Gets or sets the collection of labels of nodes or fixed edges that are ignored by the router. - * @see yfiles.layout.LabelLayoutKeys#IGNORED_LABELS_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - ignoredLabels:yfiles.layout.ItemCollection; - /** - * Gets or sets the mapping of edges to their {@link yfiles.router.EdgeLayoutDescriptor} - *

- * If an edge is mapped to null, the {@link yfiles.router.EdgeRouter#defaultEdgeLayoutDescriptor default descriptor} is used. - *

- * @see yfiles.router.EdgeRouter#EDGE_LAYOUT_DESCRIPTOR_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeLayoutDescriptors:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from labels to a crossing penalty factor. - *

- * The crossing penalty factor of a label is multiplied with the basic penalty for an edge crossing the label so crossing a - * label with a higher cost factor is stronger avoided then crossing one with a lower factor. - *

- * @see yfiles.router.PenaltySettings#edgeLabelCrossingPenalty - * @see yfiles.router.PenaltySettings#nodeLabelCrossingPenalty - * @see yfiles.router.EdgeRouter#LABEL_CROSSING_PENALTY_FACTOR_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - labelCrossingPenaltyFactors:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their {@link yfiles.layout.NodeHalo}. - * @see yfiles.layout.NodeHalo#NODE_HALO_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeHalos:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their source {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourcePortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their target {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetPortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to a collection of their source port {@link yfiles.layout.PortCandidate candidates}. - * @see yfiles.layout.PortCandidate#SOURCE_PORT_CANDIDATE_COLLECTION_DP_KEY - * @type {yfiles.layout.ItemMapping.>} - */ - sourcePortCandidates:yfiles.layout.ItemMapping>; - /** - * Gets or sets a mapping from edges to a collection of their target port {@link yfiles.layout.PortCandidate candidates}. - * @see yfiles.layout.PortCandidate#TARGET_PORT_CANDIDATE_COLLECTION_DP_KEY - * @type {yfiles.layout.ItemMapping.>} - */ - targetPortCandidates:yfiles.layout.ItemMapping>; - /** - * Gets or sets a mapping from nodes to their {@link yfiles.layout.PortCandidateSet}. - * @see yfiles.layout.PortCandidateSet#NODE_PORT_CANDIDATE_SET_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodePortCandidateSets:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to an object representing their source edge group. - * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourceGroupIds:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to an object representing their target edge group. - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetGroupIds:yfiles.layout.ItemMapping; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - /** - * Gets or sets the partition grid layout data. - * @type {yfiles.layout.PartitionGridData} - */ - partitionGridData:yfiles.layout.PartitionGridData; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.PolylineEdgeRouterData; - } - /** - * Specifies custom data for the {@link yfiles.router.StraightLineEdgeRouter}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface StraightLineEdgeRouterData extends yfiles.layout.LayoutData{} - export class StraightLineEdgeRouterData { - constructor(); - /** - * Gets or sets the collection of affected edges. - *

- * This collection is only used by the router if the {@link yfiles.router.StraightLineEdgeRouter#scope} is set to {@link yfiles.router.Scope#ROUTE_AFFECTED_EDGES}. - *

- * @see yfiles.router.StraightLineEdgeRouter#affectedEdgesDpKey - * @type {yfiles.layout.DpKeyItemCollection.} - */ - affectedEdges:yfiles.layout.DpKeyItemCollection; - /** - * Gets or sets the collection of affected nodes. - *

- * This collection is only used by the router if the {@link yfiles.router.StraightLineEdgeRouter#scope} is set to {@link yfiles.router.Scope#ROUTE_EDGES_AT_AFFECTED_NODES}. - *

- * @see yfiles.router.StraightLineEdgeRouter#affectedNodesDpKey - * @type {yfiles.layout.DpKeyItemCollection.} - */ - affectedNodes:yfiles.layout.DpKeyItemCollection; - /** - * Gets or sets a mapping from edges to their source {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourcePortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their target {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetPortConstraints:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.router.StraightLineEdgeRouterData; - } - }export namespace partial{ - export enum EdgeRoutingStrategy{ - /** - * A routing strategy that produces orthogonal routes for partial edges and inter-edges. - *

- * A route of an edge is called orthogonal if it only consists of vertical and horizontal segments. - *

- *

- * Inter-edges are edges between fixed and partial nodes as well as edges between different subgraph components. - *

- * @see yfiles.partial.PartialLayout#edgeRoutingStrategy - */ - ORTHOGONAL, - /** - * A routing strategy that produces straight-line routes for partial edges and inter-edges. - *

- * Inter-edges are edges between fixed and partial nodes as well as edges between different subgraph components. - *

- * @see yfiles.partial.PartialLayout#edgeRoutingStrategy - */ - STRAIGHTLINE, - /** - * Automatically chooses a suitable routing strategy for partial edges and inter-edges by analyzing the routes of the fixed - * edges. If, for example, all fixed edges have orthogonal edge routes, inter-edges will be routed orthogonally, too. - *

- * Inter-edges are edges between fixed and partial nodes as well as edges between different subgraph components. - *

- * @see yfiles.partial.PartialLayout#edgeRoutingStrategy - */ - AUTOMATIC, - /** - * A routing strategy that produces organic routes for partial edges and inter-edges. - *

- * Inter-edges are edges between fixed and partial nodes as well as edges between different subgraph components. - *

- * @see yfiles.partial.PartialLayout#edgeRoutingStrategy - */ - ORGANIC, - /** - * A routing strategy that produces octilinear routes for partial edges and inter-edges. - *

- * A route of an edge is called octilinear if the slope of each segment is a multiple of 45 degrees. - *

- *

- * Inter-edges are edges between fixed and partial nodes as well as edges between different subgraph components. - *

- * @see yfiles.partial.PartialLayout#edgeRoutingStrategy - */ - OCTILINEAR - } - export enum ComponentAssignmentStrategy{ - /** - * A component assignment strategy that assigns each partial node to a separate subgraph component. - * @see yfiles.partial.PartialLayout#componentAssignmentStrategy - */ - SINGLE, - /** - * A component assignment strategy where the subgraph components correspond to the connected components of the graph - * induced by the partial elements. - * @see yfiles.partial.PartialLayout#componentAssignmentStrategy - */ - CONNECTED, - /** - * A component assignment strategy where the subgraph components correspond to the clusters computed by a clustering - * algorithm based on {@link yfiles.algorithms.Groups#edgeBetweennessClustering edge betweenness centrality}. - * @see yfiles.partial.PartialLayout#componentAssignmentStrategy - */ - CLUSTERING, - /** - * A component assignment strategy where the subgraph components are defined by the user. Two partial nodes are considered - * to be in the same component if the {@link yfiles.algorithms.IDataProvider} associated with key {@link yfiles.partial.PartialLayout#COMPONENT_ID_DP_KEY} - * returns the same object for both of them. - * @see yfiles.partial.PartialLayout#COMPONENT_ID_DP_KEY - * @see yfiles.partial.PartialLayout#componentAssignmentStrategy - */ - CUSTOMIZED - } - export enum SubgraphPlacement{ - /** - * A positioning strategy which tries to place each subgraph component close to the barycenter of its graph neighbors. - * @see yfiles.partial.PartialLayout#subgraphPlacement - */ - BARYCENTER, - /** - * A positioning strategy which tries to place each subgraph component close to its original position. - * @see yfiles.partial.PartialLayout#subgraphPlacement - */ - FROM_SKETCH - } - export enum LayoutOrientation{ - /** - * Layout orientation specifier where the algorithm tries to place partial nodes (subgraph components) such that each - * predecessor of a node v is placed above v and each successor below v. - * @see yfiles.partial.PartialLayout#layoutOrientation - */ - TOP_TO_BOTTOM, - /** - * Layout orientation specifier where the algorithm tries to place partial nodes (subgraph components) such that each - * predecessor of a node v is placed below v and each successor above v. - * @see yfiles.partial.PartialLayout#layoutOrientation - */ - BOTTOM_TO_TOP, - /** - * Layout orientation specifier where the algorithm tries to place partial nodes (subgraph components) such that each - * predecessor of a node v is placed to the left of v and each successor to the right of v. - * @see yfiles.partial.PartialLayout#layoutOrientation - */ - LEFT_TO_RIGHT, - /** - * Layout orientation specifier where the algorithm tries to place partial nodes (subgraph components) such that each - * predecessor of a node v is placed to the right of v and each successor to the left of v. - * @see yfiles.partial.PartialLayout#layoutOrientation - */ - RIGHT_TO_LEFT, - /** - * Layout orientation specifier where the algorithm automatically detects the layout orientation. - *

- * The algorithm analyzes the flow direction of fixed edges in the current drawing. If there is no common flow direction, - * the results are the same as for {@link yfiles.partial.LayoutOrientation#NONE}. Otherwise, the layout orientation is either - * {@link yfiles.partial.LayoutOrientation#TOP_TO_BOTTOM}, {@link yfiles.partial.LayoutOrientation#BOTTOM_TO_TOP}, {@link yfiles.partial.LayoutOrientation#LEFT_TO_RIGHT} - * or {@link yfiles.partial.LayoutOrientation#RIGHT_TO_LEFT}. - *

- * @see yfiles.partial.PartialLayout#layoutOrientation - */ - AUTO_DETECT, - /** - * Layout orientation specifier where the layout orientation is completely ignored. - * @see yfiles.partial.PartialLayout#layoutOrientation - */ - NONE - } - /** - * This class represents a partial layout algorithm which changes the coordinates for a given set of graph elements (called - * partial elements) only. - *

- * The location and size of the remaining elements (called fixed elements) is not allowed to be changed.Layout Style - *

- *

- * This partial layout algorithm offers a kind of generic partial layout support for other existing layout algorithms. - * Hence, its layout style heavily depends on the selected {@link yfiles.partial.PartialLayout#coreLayout core layout algorithm} as well as the specified {@link yfiles.partial.PartialLayout#edgeRouter edge router} or - * {@link yfiles.partial.PartialLayout#edgeRoutingStrategy edge routing strategy}. - *

- *

- * The partial layout is suitable for applications where users may incrementally add new elements to an existing drawing. - * The added elements should be arranged so that they fit best possible into the given diagram without making any changes - * to the already existing layout. Hence, the so-called mental map of the existing drawing is preserved. - *

- *

- * {@graph {"ann":{"s":[60,30],"d":1},"n":[[49.74,127.62,295.26,342.38,2,[[49.74,150,295.26,22.38,"Group"]]],[270,425,[[291.33,449.35,17.35,18.7,"16"]]],[270,375,[[291.33,399.35,17.35,18.7,"18"]]],[200,375,[[221.33,399.35,17.35,18.7,"19"]]],[64.74,405.17,1,[[86.07,429.52,17.35,18.7,"13"]]],[200,265,[[221.33,289.35,17.35,18.7,"20"]]],[100,215,[[124.66,239.35,10.67,18.7,"2"]]],[100,165,[[124.66,189.35,10.67,18.7,"3"]]],[100,265,[[121.33,289.35,17.35,18.7,"22"]]],[-420.63,317.87,375.21,302.93,3,[[-420.63,340.25,375.21,22.38,"Group"]]],[-179.98,534.8,1,[[-155.31,559.15,10.67,18.7,"6"]]],[-163.42,363.25,1,[[-142.09,387.6,17.35,18.7,"12"]]],[-371.63,364.65,1,[[-346.96,389,10.67,18.7,"8"]]],[-333.29,532.76,1,[[-308.62,557.11,10.67,18.7,"9"]]],[-176.17,453.25,1,[[-154.84,477.6,17.35,18.7,"11"]]],[370,215,[[394.66,239.35,10.67,18.7,"1"]]],[370,165,[[394.66,189.35,10.67,18.7,"4"]]],[-130.4,215,1,[[-105.74,239.35,10.67,18.7,"5"]]],[-224.19,264.44,1,[[-199.52,288.79,10.67,18.7,"7"]]],[370,425,[[391.33,449.35,17.35,18.7,"10"]]],[370,265,[[391.33,289.35,17.35,18.7,"14"]]],[370,375,[[391.33,399.35,17.35,18.7,"15"]]],[270,505,[[291.33,529.35,17.35,18.7,"17"]]],[440,165,[[461.33,189.35,17.35,18.7,"21"]]]],"e":[[13,12,0,-15,0,15],[13,14],[10,13,-30,4,0,0],[14,11],[6,7,0,-15,0,15],[5,8,-30,0,30,0],[1,2,0,-15,0,15],[2,3,-30,0,30,0],[4,3],[15,6,-30,0,30,0],[15,16,0,-15,0,15],[7,16,30,0,-30,0],[6,17],[17,18],[18,12],[10,19],[15,20,0,15,0,-15],[19,21,0,-15,0,15],[21,20,0,-15,0,15],[19,1,-30,0,30,0],[1,22,0,15,0,-15],[20,5,-30,0,30,0],[16,23,30,0,-30,0],[11,4,-30,0,0,0]],"vp":[-421.0,127.0,921.0,494.0]}} The input graph where marked nodes denote the partial elements that were incrementally added to the existing diagram. {@graph {"ann":{"s":[60,30],"d":1},"n":[[67.37,127.62,260,342.38,2,[[67.37,150,260,22.38,"Group"]]],[252.37,425,[[273.7,449.35,17.35,18.7,"16"]]],[252.37,375,[[273.7,399.35,17.35,18.7,"18"]]],[182.37,375,[[203.7,399.35,17.35,18.7,"19"]]],[182.37,321,1,[[203.7,345.35,17.35,18.7,"13"]]],[182.37,265,[[203.7,289.35,17.35,18.7,"20"]]],[82.37,215,[[107.03,239.35,10.67,18.7,"2"]]],[82.37,165,[[107.03,189.35,10.67,18.7,"3"]]],[82.37,265,[[103.7,289.35,17.35,18.7,"22"]]],[-147.05,387.62,180,185.56,3,[[-147.05,410,180,22.38,"Group"]]],[-42.05,425,1,[[-17.38,449.35,10.67,18.7,"6"]]],[-42.05,474.19,1,[[-20.72,498.54,17.35,18.7,"12"]]],[-132.05,425,1,[[-107.38,449.35,10.67,18.7,"8"]]],[-132.05,474.19,1,[[-107.38,498.54,10.67,18.7,"9"]]],[-42.05,528.19,1,[[-20.72,552.54,17.35,18.7,"11"]]],[352.37,215,[[377.03,239.35,10.67,18.7,"1"]]],[352.37,165,[[377.03,189.35,10.67,18.7,"4"]]],[-13.63,215,1,[[11.03,239.35,10.67,18.7,"5"]]],[-13.63,265,1,[[11.03,289.35,10.67,18.7,"7"]]],[352.37,425,[[373.7,449.35,17.35,18.7,"10"]]],[352.37,265,[[373.7,289.35,17.35,18.7,"14"]]],[352.37,375,[[373.7,399.35,17.35,18.7,"15"]]],[252.37,505,[[273.7,529.35,17.35,18.7,"17"]]],[422.37,165,[[443.7,189.35,17.35,18.7,"21"]]]],"e":[[13,12,0,-15,0,15],[13,14,0,15,-30,0,[-102.05,543.19]],[10,13,-30,0,30,0,[-54.55,440,-54.55,489.19]],[14,11,0,-15,0,15],[6,7,0,-15,0,15],[5,8,-30,0,30,0],[1,2,0,-15,0,15],[2,3,-30,0,30,0],[4,3,0,15,0,-15],[15,6,-30,0,30,0],[15,16,0,-15,0,15],[7,16,30,0,-30,0],[6,17,-30,0,30,0],[17,18,0,15,0,-15],[18,12,-30,0,0,-15,[-102.05,280]],[10,19,30,0,0,15,[27.95,440,27.95,474,382.37,474]],[15,20,0,15,0,-15],[19,21,0,-15,0,15],[21,20,0,-15,0,15],[19,1,-30,0,30,0],[1,22,0,15,0,-15],[20,5,-30,0,30,0],[16,23,30,0,-30,0],[11,4,30,5.2,-30,0,[119.87,494.39,119.87,336]]],"vp":[-148.0,127.0,631.0,447.0]}} - * The result of a partial layout run with {@link yfiles.partial.PartialLayout#componentAssignmentStrategy component assignment strategy} set to {@link yfiles.partial.ComponentAssignmentStrategy#SINGLE} - * and with {@link yfiles.partial.PartialLayout#considerNodeAlignment node alignment} enabled.Features - *

- *

- * Similar to the layout style, the supported feature set mainly depends on the features supported by the specified {@link yfiles.partial.PartialLayout#coreLayout core layout algorithm} - * as well as the specified {@link yfiles.partial.PartialLayout#edgeRouter edge router} or {@link yfiles.partial.PartialLayout#edgeRoutingStrategy edge routing strategy}. The internal step that {@link yfiles.partial.PartialLayout#placeSubgraphs places the components} can handle - * group nodes as well as minimum distance constraints. Furthermore, it is able to consider node labels. - *

- *

- * Concept The layout algorithm tries to place the partial elements such that the resulting drawing (including the fixed elements) - * has a good quality with respect to common graph drawing aesthetics. - *

- *

- * The layout algorithm handles each selected graph element as partial element. For this, it looks up the {@link yfiles.algorithms.IDataProvider} - * keys {@link yfiles.partial.PartialLayout#AFFECTED_NODES_DP_KEY} and {@link yfiles.partial.PartialLayout#AFFECTED_EDGES_DP_KEY}. Partial - * node elements can be assigned to the so-called subgraph components. During the layout process each subgraph induced by the nodes of a - * component is first laid out using the specified {@link yfiles.partial.PartialLayout#coreLayout core layout algorithm}. Then, the different components are placed - * one-by-one onto the drawing area such that the number of overlaps among graph elements is small. The user can specify - * different objectives for finding 'good' positions for subgraph components (see {@link yfiles.partial.PartialLayout#subgraphPlacement}), e.g., {@link yfiles.partial.SubgraphPlacement#BARYCENTER} - * specifies that the component should be placed close to the barycenter of its graph neighbors and {@link yfiles.partial.SubgraphPlacement#FROM_SKETCH} - * specifies that the component should be placed close to its original position. - *

- *

- * Method {@link yfiles.partial.PartialLayout#componentAssignmentStrategy} allows to specify the strategy that assigns partial nodes to subgraph components. Possible values are - * {@link yfiles.partial.ComponentAssignmentStrategy#CLUSTERING}, {@link yfiles.partial.ComponentAssignmentStrategy#CONNECTED}, {@link yfiles.partial.ComponentAssignmentStrategy#SINGLE} - * and - * {@link yfiles.partial.ComponentAssignmentStrategy#CUSTOMIZED}. The last value allows to use a customized component assignment. - * Note that nodes of a component cannot be assigned to different group nodes. - *

- *

- * Furthermore, the user can specify the edge routing strategy (see {@link yfiles.partial.PartialLayout#edgeRoutingStrategy}) that is used for routing partial edges and edges - * between different subgraph components (so-called inter-edges). Possible values are {@link yfiles.partial.EdgeRoutingStrategy#ORGANIC}, - * {@link yfiles.partial.EdgeRoutingStrategy#ORTHOGONAL}, {@link yfiles.partial.EdgeRoutingStrategy#STRAIGHTLINE}, {@link yfiles.partial.EdgeRoutingStrategy#OCTILINEAR} - * and {@link yfiles.partial.EdgeRoutingStrategy#AUTOMATIC}. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface PartialLayout extends yfiles.layout.LayoutStageBase{} - export class PartialLayout { - /** - * Creates a new instance of {@link yfiles.partial.PartialLayout} which uses the specified {@link yfiles.layout.ILayoutAlgorithm} instance - * as the core layout algorithm. - *

- * This instance is applied to each subgraph component, see {@link yfiles.partial.PartialLayout#componentAssignmentStrategy}. - *

- * @param [subgraphLayouter=null] the layout algorithm that is applied to the subgraph components - * @see yfiles.partial.PartialLayout#componentAssignmentStrategy - */ - constructor(subgraphLayouter?:yfiles.layout.ILayoutAlgorithm); - /** - * This method is called each time when edges are routed with an edge router. - *

- * Subclasses may modify the configuration of the given edge router instance. - *

- *

- * The type of the given instance depends on the edge routing strategy, i.e., if the routing strategy is set to {@link yfiles.partial.EdgeRoutingStrategy#OCTILINEAR} - * or {@link yfiles.partial.EdgeRoutingStrategy#ORTHOGONAL} it's an instance of {@link yfiles.router.EdgeRouter}, if the routing strategy - * is set to {@link yfiles.partial.EdgeRoutingStrategy#ORGANIC} it's an instance of {@link yfiles.organic.OrganicLayout}, and, if the - * routing strategy is set to {@link yfiles.partial.EdgeRoutingStrategy#STRAIGHTLINE} it's an instance of a private - * {@link yfiles.router.StraightLineEdgeRouter}. If the edge routing strategy is set to - * {@link yfiles.partial.EdgeRoutingStrategy#AUTOMATIC}, the layout algorithm chooses one of the above strategies that best fits - * the routing style of the fixed edges. - *

- * @param edgeRouter the instance used for routing the edges - * @see yfiles.partial.PartialLayout#edgeRouter - * @see yfiles.partial.PartialLayout#edgeRoutingStrategy - * @protected - */ - configureEdgeRouter(edgeRouter:yfiles.layout.ILayoutAlgorithm):void; - /** - * This method is called during the {@link yfiles.partial.PartialLayout#applyLayout layout process} and calculates the layout for the given subgraph component using the - * specified {@link yfiles.partial.PartialLayout#coreLayout core layout algorithm}. - *

- * It is called once for each subgraph component. - *

- *

- * Subclasses may implement a custom layout strategy or add some additional data. - *

- * @param subGraph the subgraph component - * @protected - */ - layoutSubgraph(subGraph:yfiles.layout.LayoutGraph):void; - /** - * This method is called during the {@link yfiles.partial.PartialLayout#applyLayout layout process} and places the subgraph components one-by-one onto the drawing area. - *

- * Therefore, it considers the {@link yfiles.partial.PartialLayout#subgraphPlacement specified objective} for finding a suitable position. - *

- *

- * Subclasses may implement a custom placement strategy or add some additional data. However, they must not modify the - * given subgraph component lists. - *

- * @param graph the input graph - * @param subgraphComponents each entry contains a {@link } that induces a subgraph component - * @protected - */ - placeSubgraphs(graph:yfiles.layout.LayoutGraph,subgraphComponents:yfiles.algorithms.NodeList[]):void; - /** - * This method is called during the {@link yfiles.partial.PartialLayout#applyLayout layout process} and routes all partial edges that connect two fixed elements. - *

- * It either uses a {@link yfiles.partial.PartialLayout#edgeRouter custom edge router} or an internal edge router that produces routes according to the specified - * {@link yfiles.partial.PartialLayout#edgeRoutingStrategy routing strategy}. - *

- *

- * Subclasses may implement a custom routing strategy or add some additional data. - *

- * @param graph the subgraph of the input graph induced by the fixed nodes - * @param partialEdges the {@link list of partial edges} to be routed - * @protected - */ - routeEdgesBetweenFixedElements(graph:yfiles.layout.LayoutGraph,partialEdges:yfiles.algorithms.EdgeList):void; - /** - * This method is called during the {@link yfiles.partial.PartialLayout#applyLayout layout process} and routes all inter-edges. - *

- * Inter-edges are edges between different subgraph components including edges between fixed and partial elements. For the routing, - * this method uses the edge router instance set with method {@link yfiles.partial.PartialLayout#edgeRouter}. If no edge router was specified by the user, it uses an - * internal edge router with routing strategy {@link yfiles.partial.PartialLayout#edgeRoutingStrategy}. - *

- *

- * Subclasses may implement a custom routing strategy or add some additional data. - *

- * @param graph the relevant subgraph - * @param interEdges the {@link list of inter-edges} to be routed - * @protected - */ - routeInterEdges(graph:yfiles.layout.LayoutGraph,interEdges:yfiles.algorithms.EdgeList):void; - /** - * Data provider key for marking partial nodes - * @see yfiles.partial.PartialLayout#AFFECTED_EDGES_DP_KEY - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static AFFECTED_NODES_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for specifying the edges that should be considered to be directed - *

- * If a layout orientation is specified (i.e., {@link yfiles.partial.PartialLayout#layoutOrientation} is not - * {@link yfiles.partial.LayoutOrientation#NONE}), the algorithm tries to route directed edges such that they adhere to that - * orientation. - *

- * @see yfiles.partial.PartialLayout#layoutOrientation - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static DIRECTED_EDGES_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for marking partial edges - * @see yfiles.partial.PartialLayout#AFFECTED_NODES_DP_KEY - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static AFFECTED_EDGES_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for obtaining the edges that should be routed by the edge router - * @see yfiles.partial.PartialLayout#edgeRouter - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static ROUTE_EDGE_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for defining custom subgraph components - * @see yfiles.partial.ComponentAssignmentStrategy#CUSTOMIZED - * @see yfiles.partial.PartialLayout#componentAssignmentStrategy - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static COMPONENT_ID_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets or sets the {@link yfiles.layout.ILayoutAlgorithm} instance that is applied to each subgraph component. - *

- * More precisely, during the layout process each subgraph induced by the (partial) nodes of a component (see - * {@link yfiles.partial.PartialLayout#componentAssignmentStrategy}) is first laid out using this instance. - *

- * @type {yfiles.layout.ILayoutAlgorithm} - */ - coreLayout:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets the preferred time limit (in milliseconds) for the layout algorithm. - *

- * The specified value has to be greater than or equal to 0. If the value is 0x7FFFFFFF, the time is not limited. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the maximum duration is negative - * @type {number} - */ - maximumDuration:number; - /** - * Gets or sets whether or not edges between different subgraph components should be routed immediately. - *

- * If this option is enabled, edges are routed during the placement of the subgraph components, i.e., immediately after a - * component is placed, its edges to other already placed components are routed. Otherwise, these edges are routed in a - * separate step after placing all subgraph components. Hence, while enabling this option usually leads to shorter edge - * routes, the placement of subgraph components is less compact. - *

- * @see yfiles.partial.PartialLayout#routeInterEdges - * @see yfiles.partial.PartialLayout#placeSubgraphs - * @type {boolean} - */ - routeInterEdgesImmediately:boolean; - /** - * Gets or sets whether or not a subgraph component may be placed within another subgraph component. - *

- * Enabling this option leads to more compact layout results but requires more runtime. - *

- * @type {boolean} - */ - componentCompaction:boolean; - /** - * Gets or sets whether or not fixed (non-partial) group nodes may be resized. - *

- * Enabling this option may lead to better results if there are fixed group nodes, since there is more space for the - * partial elements. - *

- * @type {boolean} - */ - resizeFixedGroups:boolean; - /** - * Gets or sets the objective used for finding 'good' positions for subgraph components. - * @throws {Stubs.Exceptions.ArgumentError} if the specified strategy does not match one of the predefined positioning strategies - * @type {yfiles.partial.SubgraphPlacement} - */ - subgraphPlacement:yfiles.partial.SubgraphPlacement; - /** - * Gets or sets the minimum distance between two adjacent nodes. - *

- * The specified value has to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the distance is negative - * @type {number} - */ - minimumNodeDistance:number; - /** - * Gets or sets whether or not partial nodes should be aligned. - *

- * If this option is enabled, the algorithm tries to align the center of partial nodes with other nodes. - *

- * @type {boolean} - */ - considerNodeAlignment:boolean; - /** - * Gets or sets the strategy that assigns partial nodes to subgraph components. - *

- * The specified core layouter (see {@link yfiles.partial.PartialLayout#coreLayout}) independently calculates the layout for each such subgraph component. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified strategy does not match one of the predefined assignment strategies. - * @see yfiles.partial.PartialLayout#coreLayout - * @type {yfiles.partial.ComponentAssignmentStrategy} - */ - componentAssignmentStrategy:yfiles.partial.ComponentAssignmentStrategy; - /** - * Gets or sets whether or not a postprocessing step should be applied to reduce the number of directed edges that do not - * comply with the specified layout orientation. - * @see yfiles.partial.PartialLayout#layoutOrientation - * @see yfiles.partial.PartialLayout#DIRECTED_EDGES_DP_KEY - * @type {boolean} - */ - optimizeOrientation:boolean; - /** - * Gets or sets the custom edge router instance that is used for partial edges and edges between different subgraph - * components (so-called inter-edges). - * @see yfiles.partial.PartialLayout#ROUTE_EDGE_DP_KEY - * @see yfiles.partial.PartialLayout#edgeRoutingStrategy - * @type {yfiles.layout.ILayoutAlgorithm} - */ - edgeRouter:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets the routing strategy that is used for partial edges and edges between different subgraph components - * (so-called inter-edges). - * @throws {Stubs.Exceptions.ArgumentError} if the specified strategy does not match one of the predefined routing strategies - * @see yfiles.partial.PartialLayout#edgeRouter - * @type {yfiles.partial.EdgeRoutingStrategy} - */ - edgeRoutingStrategy:yfiles.partial.EdgeRoutingStrategy; - /** - * Gets or sets the layout orientation that is considered during the placement of partial elements. - *

- * More precisely, the algorithm tries to place each {@link yfiles.partial.PartialLayout#componentAssignmentStrategy subgraph component} such that each predecessor of a component's node v - * is placed before v and each successor after v with respect to the layout orientation. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified orientation does not match one of the predefined orientations - * @see yfiles.partial.PartialLayout#DIRECTED_EDGES_DP_KEY - * @type {yfiles.partial.LayoutOrientation} - */ - layoutOrientation:yfiles.partial.LayoutOrientation; - /** - * Gets or sets whether or not subgraph components are mirrored to improve the layout quality. - *

- * If enabled, the algorithm checks for each component which of the four possible mirrorings minimizes the edge length. - *

- * @type {boolean} - */ - allowMirroring:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.partial.PartialLayout; - } - /** - * Specifies custom data for the {@link yfiles.partial.PartialLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface PartialLayoutData extends yfiles.layout.LayoutData{} - export class PartialLayoutData { - constructor(); - /** - * Gets or sets the collection of nodes placed by the layout. - * @see yfiles.partial.PartialLayout#AFFECTED_NODES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - affectedNodes:yfiles.layout.ItemCollection; - /** - * Gets or sets the collection of edges placed by the layout. - * @see yfiles.partial.PartialLayout#AFFECTED_EDGES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - affectedEdges:yfiles.layout.ItemCollection; - /** - * Gets or sets the collection of edges that are considered as directed by the layout. - *

- * Only if the {@link yfiles.partial.PartialLayout#layoutOrientation} is not {@link yfiles.partial.LayoutOrientation#NONE} the directedness of edges has an effect. - *

- * @see yfiles.partial.PartialLayout#DIRECTED_EDGES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - directedEdges:yfiles.layout.ItemCollection; - /** - * Gets or sets the mapping from partial nodes to an object defining their component assignment. - *

- * All partial nodes associated with the same object are assigned to the same subgraph component. - *

- * @see yfiles.partial.PartialLayout#COMPONENT_ID_DP_KEY - * @see yfiles.partial.ComponentAssignmentStrategy#CUSTOMIZED - * @see yfiles.partial.PartialLayout#componentAssignmentStrategy - * @type {yfiles.layout.ItemMapping.} - */ - componentIds:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their {@link yfiles.layout.NodeHalo}. - * @see yfiles.layout.NodeHalo#NODE_HALO_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeHalos:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their source {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourcePortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their target {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetPortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to a collection of their source port {@link yfiles.layout.PortCandidate candidates}. - * @see yfiles.layout.PortCandidate#SOURCE_PORT_CANDIDATE_COLLECTION_DP_KEY - * @type {yfiles.layout.ItemMapping.>} - */ - sourcePortCandidates:yfiles.layout.ItemMapping>; - /** - * Gets or sets a mapping from edges to a collection of their target port {@link yfiles.layout.PortCandidate candidates}. - * @see yfiles.layout.PortCandidate#TARGET_PORT_CANDIDATE_COLLECTION_DP_KEY - * @type {yfiles.layout.ItemMapping.>} - */ - targetPortCandidates:yfiles.layout.ItemMapping>; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - /** - * Gets or sets the partition grid layout data. - * @type {yfiles.layout.PartitionGridData} - */ - partitionGridData:yfiles.layout.PartitionGridData; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.partial.PartialLayoutData; - } - }export namespace tree{ - /** - * Encapsulates information bound to a node while the algorithm calculates a layout. - * @class - */ - export interface BalloonLayoutNodeInfo extends yfiles.lang.Object{} - export class BalloonLayoutNodeInfo { - /** - * The upper angle of the subtree wedge rooted at the node. - * @type {number} - */ - upperAngle:number; - /** - * The lower angle of the subtree wedge rooted at the node. - * @type {number} - */ - lowerAngle:number; - /** - * The angle of the gap to the wedge of the previous child node. - * @type {number} - */ - gapAngle:number; - /** - * The distance of the node to its root node. - * @type {number} - */ - dist:number; - /** - * Gets the sum of all wedge angles of the subtree rooted at this node. - * @type {number} - */ - angleSum:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.BalloonLayoutNodeInfo; - } - /** - * A tree layout algorithm that arranges the subtrees of the tree in a balloon-like fashion. - *

- * Layout Style {@link yfiles.tree.BalloonLayout} is designed to arrange directed and undirected tree graphs. Subtrees rooted at a node are - * placed in a radial fashion around their root node. All direct children of one node can be placed on a common circle - * around their parent node (depending on the {@link yfiles.tree.BalloonLayout#childAlignmentPolicy alignment policy}). Therefore, subtrees look like balloons or stars, - * especially if subtrees have similar sizes. The edges of the tree are drawn as straight lines. {@graph {"ann":{"s":[30,30],"d":1,"c":1},"n":[[765.94,466.2],[616.19,1035.44],[858.96,1192.81],[289.45,1092.35],[983.21,685.48],[390.63,1191.59],[1141.69,322.61],[1215.22,473.98],[599.06,923.71],[924.21,1082.3],[291.41,844.85],[1077.22,396.06],[999.14,1284.78],[391.43,1274.01],[324.89,753.04],[236.05,1223.63],[930.33,1330.15],[1013.36,1203.58],[1165.73,539.9],[1084.13,551.52],[612.56,192.18],[1004.03,1061.74],[901.39,675.54],[684.7,152.3],[1022.85,458.01],[190.18,1336.4],[767.32,1282.66],[473.05,1190.8],[684.09,233.13],[385.33,871.88],[1139.17,442.18],[925.13,116.39],[353.13,675.6],[334.78,932.43],[685.33,1291.17],[152.25,1056.81],[427.86,640.81],[1239.04,331.19],[1006.49,764.55],[934.86,198.24],[732.68,1169.96],[1046.6,632.79],[412.14,1021.39],[1266.98,538.13],[716.32,76.19],[1068.06,1329.99],[76.94,1090.32],[792.51,44.73],[576.22,1141.17],[944.59,280.09],[718.72,987.86],[132.38,1277.64],[1007.52,113.83],[318.35,600.87],[686.08,946.6],[0,1060.76],[621.34,1239.22],[684.87,0],[47.38,1167.26],[929.76,34.1],[866.88,1320.91],[425.22,944.01],[1181.1,233.18],[374.69,793.72],[118.75,981.5],[903.65,1002.48],[532.13,493.99],[200.85,981.73],[760.81,183.93],[633.38,1355.17],[1177.35,621.5],[775.83,1364.64],[784.35,1446.63],[1237.23,394.55],[272.59,1334.67],[974.02,603.57],[457.46,831.99],[159.13,1412.75],[260.6,752.11],[1069.67,256.55],[1044.67,310.87],[1121.63,226.96],[1225.82,272.87],[597.56,111.13],[530.37,198.46],[610.06,274.57],[555.63,251.79],[547.23,141.92],[1062.07,709.49],[929.94,748.38],[843.55,104.61],[857.02,162.82],[1295.93,457.26],[193.97,837.29],[246.66,931.74],[206.06,892.47],[214.43,784.65],[979.61,1149.06],[838.99,1066.04],[786.55,1086.86],[172.43,1172.3],[317.44,1231.28],[428.9,1117.65],[872.95,52.59],[984.14,58.85],[987.6,170.17],[521.61,289.78],[410.77,300.73],[412.02,412.1],[523.07,420.56],[465.9,437.92],[389.75,356.66],[464.06,273.7],[553.17,340.51],[472.17,355.73]],"e":[[0,1],[1,2],[1,3],[0,4],[3,5],[0,6],[6,7],[1,8],[2,9],[3,10],[6,11],[2,12],[5,13],[10,14],[3,15],[12,16],[12,17],[7,18],[18,19],[0,20],[9,21],[4,22],[20,23],[11,24],[15,25],[2,26],[5,27],[20,28],[10,29],[7,30],[0,31],[14,32],[10,33],[26,34],[3,35],[32,36],[6,37],[4,38],[31,39],[2,40],[4,41],[3,42],[7,43],[23,44],[12,45],[35,46],[44,47],[1,48],[39,49],[1,50],[25,51],[31,52],[32,53],[1,54],[46,55],[34,56],[44,57],[46,58],[31,59],[2,60],[29,61],[6,62],[10,63],[35,64],[9,65],[0,66],[3,67],[23,68],[34,69],[18,70],[26,71],[71,72],[7,73],[25,74],[4,75],[29,76],[25,77],[10,78],[6,79],[6,80],[6,81],[6,82],[20,83],[20,84],[20,85],[20,86],[20,87],[4,88],[4,89],[31,90],[31,91],[7,92],[10,93],[10,94],[10,95],[10,96],[2,97],[2,98],[2,99],[3,100],[3,101],[3,102],[31,103],[31,104],[31,105],[0,114],[114,106],[114,107],[114,108],[114,109],[114,110],[114,111],[114,112],[114,113]],"vp":[0.0,0.0,1326.0,1477.0]}} Sample balloon-drawing of - * a large tree obtained with default settings {@graph {"ann":{"s":[20,20],"d":1,"c":1},"n":[[302.82,325.51,70,70,[[323.15,369.86,29.35,18.7,"Root"]]],[467.87,433.16,35,35],[555.28,457.63,[[581.09,480.55,27.36,18.7,0.20775573281806076,-0.978180737635551,"Leaf"]]],[539.95,490.69,[[558.57,519.19,27.36,18.7,0.6124052098749311,-0.7905440271851036,"Leaf"]]],[511.78,513.79,[[521.49,544.2,27.36,18.7,0.8952174454926904,-0.4456295830457645,"Leaf"]]],[617.42,438.44,[[645.7,457.5,27.36,18.7,-0.01562900399598557,-0.9998778596579152,"Leaf"]]],[604.25,500.42,[[626.78,526.54,27.36,18.7,0.42067550054279435,-0.9072111789672069,"Leaf"]]],[168.96,426.6,35,35],[122.16,495.14,[[108.91,545.35,27.36,18.7,-0.7471310564613752,-0.6646767518658294,"Leaf"]]],[101.02,465.46,[[72.6,501.56,27.36,18.7,-0.38380727069642384,-0.9234132222144982,"Leaf"]]],[94.89,429.54,[[58.95,446.33,27.36,18.7,0.0558744858236695,-0.9984378006836183,"Leaf"]]],[108.08,558.63,[[104.38,613.01,27.36,18.7,-0.8765491095440469,-0.48131243341257923,"Leaf"]]],[60.74,516.51,[[39.11,560.52,27.36,18.7,-0.5800788870754927,-0.8145603014935467,"Leaf"]]],[472.4,260.75,35,35],[534.73,207.69,[[563.84,210.51,27.36,18.7,-0.7413022827299817,-0.6711713086979497,"Leaf"]]],[555.61,237.55,[[585.94,249.4,27.36,18.7,-0.3757344582282841,-0.9267273692407589,"Leaf"]]],[561.43,273.52,[[588.93,294.02,27.36,18.7,0.06458526120504259,-0.997912192547559,"Leaf"]]],[549.36,144.32,[[576.39,143.07,27.36,18.7,-0.8723155432038684,-0.48894334343044304,"Leaf"]]],[596.34,186.85,[[626.56,194.12,27.36,18.7,-0.5729485100623841,-0.8195913645331399,"Leaf"]]],[316.53,515.88,35,35],[349.51,601,[[356.29,631.15,27.36,18.7,0.9501038773669919,-0.3119336823945245,"Leaf"]]],[313.23,604.36,[[326.48,660.69,27.36,18.7,-0.9912225732921417,-0.1322036693745865,"Leaf"]]],[279.09,591.61,[[271.88,644.75,27.36,18.7,-0.8351387927609661,-0.5500392684397689,"Leaf"]]],[397.33,645.07,[[408.68,675.44,27.36,18.7,0.8566078613378385,-0.5159679950289693,"Leaf"]]],[337.13,664.84,[[339.49,693.76,27.36,18.7,0.9957417304784997,-0.09218680048511825,"Leaf"]]],[52.71,198.2,[[17.59,197.15,27.36,18.7,0.42857629306653433,-0.9035055954565794,"Leaf"]]],[39,260.06,[[3.57,279.73,27.36,18.7,-0.006902939255060647,-0.9999761744309916,"Leaf"]]],[145.3,185.63,[[126.97,158.82,27.36,18.7,0.8990721607310399,-0.43780046801987216,"Leaf"]]],[116.92,208.49,[[85.4,197.66,27.36,18.7,0.6192806018773118,-0.7851697498875478,"Leaf"]]],[101.3,241.41,[[64.86,250.7,27.36,18.7,0.21628395104715628,-0.9763305037329477,"Leaf"]]],[173.56,251.58,35,35],[321.26,36.12,[[318.14,1.56,27.36,18.7,0.9965082870714412,-0.08349391473599899,"Leaf"]]],[260.88,55.36,[[239.7,30.94,27.36,18.7,0.861077857359917,-0.5084731296385823,"Leaf"]]],[378.65,109.85,[[406.52,110,27.36,18.7,-0.8303070560332068,-0.557306192950939,"Leaf"]]],[344.63,96.81,[[366.44,90.16,27.36,18.7,-0.9900311505600138,-0.14084857443657478,"Leaf"]]],[308.31,99.85,[[295.59,69.34,27.36,18.7,0.9527898006751772,-0.30363068970273144,"Leaf"]]],[325.62,170.19,35,35],[620.15,245.57,[[649.55,261.91,27.36,18.7,-0.15959409597274285,-0.9871827209441234,"Leaf"]]],[565.45,550.51,[[579.72,580.47,27.36,18.7,0.7732871466592579,-0.6340559823955481,"Leaf"]]],[36.42,458,[[3.15,484.87,27.36,18.7,-0.1682027041762925,-0.9857524285071697,"Leaf"]]],[91.95,148.45,[[66.13,128.88,27.36,18.7,0.7787908142925284,-0.6272837217508362,"Leaf"]]],[383.99,45.04,[[409.22,41.45,27.36,18.7,-0.933684654259895,-0.3580963088326663,"Leaf"]]],[274.32,656.46,[[277.16,712.35,27.36,18.7,-0.9367740425600954,-0.34993484134280844,"Leaf"]]]],"e":[[0,1,[],[[405.66,401.96,61.37,18.7,0.5213485166954306,-0.8533438487148509,"Root-Edge"]]],[1,2],[1,3],[1,4],[1,5],[1,6],[0,7,[],[[268.23,398.95,61.37,18.7,0.4834440722369951,0.8753752504034548,"Root-Edge"]]],[7,8],[7,9],[7,10],[7,11],[7,12],[0,13,[],[[407.74,322.69,61.37,18.7,-0.4757866709710364,-0.8795607106540735,"Root-Edge"]]],[13,14],[13,15],[13,16],[13,17],[13,18],[0,19,[],[[336.08,439.99,61.37,18.7,0.999759704932882,0.02192104907427582,"Root-Edge"]]],[19,20],[19,21],[19,22],[19,23],[19,24],[0,30,[],[[270.35,318.48,61.37,18.7,-0.5287754007295448,0.8487617896579165,"Root-Edge"]]],[30,29],[30,28],[30,27],[30,26],[30,25],[0,36,[],[[340.26,281.05,61.37,18.7,-0.9995303423338449,-0.030644652942837143,"Root-Edge"]]],[36,35],[36,34],[36,33],[36,32],[36,31],[13,37],[1,38],[7,39],[30,40],[36,41],[19,42]],"vp":[-1.0,0.0,678.0,722.0]}} Sample balloon-drawing featuring interleaved child placement and ray-like - * node labels ConceptThe algorithm executes the following steps: - *

- *
    - *
  1. Select a root node according to the specified {@link yfiles.tree.BalloonLayout#rootNodePolicy root policy}.
  2. - *
  3. Determine the placement of subtrees around the root using a bottom-up recursive approach (starting with leaf nodes).
  4. - *
  5. Assign the actual coordinates of nodes, again using a recursive approach (starting with the root node).
  6. - *
- *

- * Features - *

- *

- * The algorithm features integrated {@link yfiles.tree.BalloonLayout#integratedEdgeLabeling edge labeling} as well as {@link yfiles.tree.BalloonLayout#integratedNodeLabeling node labeling}. Edge labels and node labels are placed - * automatically without generating overlaps with other labels or graph elements. There are different {@link yfiles.tree.BalloonLayout#nodeLabelingPolicy ways} to place node - * labels. Edge labeling will take the settings of {@link yfiles.layout.PreferredPlacementDescriptor} into account. - *

- *

- * Defining a {@link yfiles.tree.BalloonLayout#preferredChildWedge preferred wedge angle} has a great influence on the layout style. Subtrees rooted at a node get a certain - * amount of radial space to be placed around the parent node, such that a preferred angle close to 360 degrees will - * generate drawings where subtrees look like balloons, while an angle close to 180 degrees could be chosen to get drawings - * where subtrees look like semicircles. - *

- *

- * Since it is computationally not very complex, {@link yfiles.tree.BalloonLayout} is very well suited for large tree graphs. It - * performs well even for huge graphs. - *

- *

- * This layout algorithm can only handle graphs with a tree structure. To apply it to a general graph, a {@link yfiles.tree.TreeReductionStage} - * can be appended. This stage will temporarily remove some edges of the input graph until a tree is obtained. These edges - * will later be reinserted and routed separately. - *

- * @class - * @extends {yfiles.layout.MultiStageLayout} - */ - export interface BalloonLayout extends yfiles.layout.MultiStageLayout{} - export class BalloonLayout { - /** - * Creates a new {@link yfiles.tree.BalloonLayout} instance with default settings. - */ - constructor(); - /** - * Calculates the wedge angle that has to be reserved for the subtree rooted at the given node scaling the {@link yfiles.tree.BalloonLayoutNodeInfo#dist distance} with - * the given scale factor. - *

- * Given some {@link yfiles.tree.BalloonLayoutNodeInfo#dist distance} the {@link yfiles.tree.BalloonLayoutNodeInfo#upperAngle upper angle} and {@link yfiles.tree.BalloonLayoutNodeInfo#lowerAngle lower angle} of the wedge belonging to the subtree rooted at root will be - * calculated and stored in the {@link yfiles.tree.BalloonLayoutNodeInfo} instance associated with root - * ({@link yfiles.tree.BalloonLayout#getInfo}). - *

- *

- * This method may be overridden to perform a custom wedge angle assignment scheme. The method is called when - * {@link yfiles.tree.BalloonLayout#calculateChildArrangement arranging child nodes}. Large edge labels on the incoming edge to root need to be considered, if {@link yfiles.tree.BalloonLayout#integratedEdgeLabeling integrated edge labeling} - * should still work properly. - *

- * @param root the node for which the wedge angles are calculated - * @param [scaleFactor=1.0] a factor to be applied to the {@link #dist distance} of root - * @returns the sum of the upper and lower wedge angle of the subtree rooted at the given root node - * @see yfiles.tree.BalloonLayout#calculateChildArrangement - * @protected - */ - calculateAngles(root:yfiles.algorithms.Node,scaleFactor?:number):number; - /** - * Calculates a child node arrangement for a given root node of the tree. - *

- * During the arrangement, child nodes of root will be {@link yfiles.tree.BalloonLayout#sortChildNodes sorted}. Furthermore, distances of the child nodes will be chosen - * such that the wedge of the subtree of root fits into the preferred wedge angle, which is either defined via {@link yfiles.tree.BalloonLayout#preferredRootWedge} or {@link yfiles.tree.BalloonLayout#preferredChildWedge}. - * Calculated distances are stored in {@link yfiles.tree.BalloonLayoutNodeInfo#dist}. - *

- *

- * The angle values - upper and lower wedge angle - may also be updated during this process and stored in {@link yfiles.tree.BalloonLayoutNodeInfo#upperAngle} - * and {@link yfiles.tree.BalloonLayoutNodeInfo#lowerAngle}, respectively. To compute the angles of wedges, method {@link yfiles.tree.BalloonLayout#calculateAngles} - * is used. - *

- *

- * This method may be overridden to perform a custom child node arrangement. If support for available features like {@link yfiles.tree.BalloonLayout#interleavedMode interleaving} - * should be maintained, then these features need to be carefully considered during the arrangement. - *

- * @param root the node for whose children to compute an arrangement - * @protected - */ - calculateChildArrangement(root:yfiles.algorithms.Node):void; - /** - * Determines the root node of {@link yfiles.tree.BalloonLayout#graph} according to the chosen {@link yfiles.tree.BalloonLayout#rootNodePolicy root node policy}. - *

- * This method may be overridden to implement some other strategy for choosing the root node of the input graph. It is - * called before the rest of the layout process within {@link yfiles.tree.BalloonLayout#applyLayoutCore}. - *

- * @returns the root node of {@link #graph} - * @see yfiles.tree.BalloonLayout#rootNodePolicy - * @protected - */ - determineRoot():yfiles.algorithms.Node; - /** - * Returns the {@link yfiles.tree.BalloonLayoutNodeInfo} object associated with the given node while the layout algorithm is - * active. - *

- * The returned object contains detailed information describing the placement of a node in the layout being computed, e.g., - * a node's distance to its parent or the wedge angle of the subtree rooted at a node. - *

- *

- * Subclasses may want to override this method to realize another node information setup. This method is called throughout - * the algorithm, each time some information associated with a node needs to be retrieved or stored. - *

- * @param node the node whose information object should be retrieved - * @returns the {@link } instance associated to the given node - * @see yfiles.tree.BalloonLayoutNodeInfo - */ - getInfo(node:yfiles.algorithms.Node):yfiles.tree.BalloonLayoutNodeInfo; - /** - * Returns the preferred radial amount (wedge) in degrees that child nodes may in total occupy around the given node. - *

- * The wedge angle controls the degree to which the child nodes may radiate from the center of layout. A value close to 360 - * means that the child nodes may radiate in (almost) any direction from their parent node, edge lengths can in consequence - * stay rather small. On the other hand, a small value means that children are restricted to a small angle; thus, edges - * lengths (and drawings) may become large. - *

- *

- * This method returns the {@link yfiles.tree.BalloonLayout#preferredRootWedge preferred root wedge} if node root was selected as global root node ({@link yfiles.tree.BalloonLayout#rootNodePolicy}). Otherwise, it either - * returns {@link yfiles.tree.BalloonLayout#preferredChildWedge} or if the given node has an outdegree equal to 2, it returns the minimum of {@link yfiles.tree.BalloonLayout#preferredChildWedge} and 180. - *

- *

- * This method may be overridden to provide a custom child wedge function. - *

- * @param root the node to get the preferred wedge angle for - * @returns the preferred wedge angle for root in degrees - * @see yfiles.tree.BalloonLayout#preferredChildWedge - * @see yfiles.tree.BalloonLayout#preferredRootWedge - * @protected - */ - getPreferredChildWedge(root:yfiles.algorithms.Node):number; - /** - * Sorts the child nodes (successors) of the given node. - *

- * This implementation uses the original node coordinates if {@link yfiles.tree.BalloonLayout#fromSketchMode From Sketch mode} is enabled. Otherwise it uses {@link yfiles.tree.BalloonLayout#comparer the specified comparator} - * to sort the outgoing edges and thus the children of root. If there is no such comparator, then the sorting depends on - * whether or not the child nodes are placed in an {@link yfiles.tree.BalloonLayout#interleavedMode interleaved} fashion: - *

- *
    - *
  • Normal: Children are sorted according to the chosen {@link yfiles.tree.BalloonLayout#childOrderingPolicy child ordering policy}.
  • - *
  • - * Interleaved: Children are sorted such that the resulting interleaved node placement is compact, while children inducing - * larger subgraphs are placed next to smaller ones. - *
  • - *
- *

- * This method may be overridden to realize a custom child node ordering. It gets called in method {@link yfiles.tree.BalloonLayout#calculateChildArrangement} - * before coordinates are assigned and just after the wedge sizes for all subtrees rooted at root are determined. - *

- * @param root the node whose child nodes will be sorted - * @protected - */ - sortChildNodes(root:yfiles.algorithms.Node):void; - /** - * Data provider key for marking nodes whose child nodes should be placed in an interleaved fashion - *

- * This {@link yfiles.algorithms.IDataProvider} allows to individually configure the interleaving feature for each node in the - * graph. - *

- * @see yfiles.tree.BalloonLayout#interleavedMode - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static INTERLEAVED_NODES_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for marking the node that will be used as root node of the tree - * @see yfiles.tree.BalloonLayout#rootNodePolicy - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static SELECTED_ROOT_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * The layout graph being acted upon. - * @protected - * @type {yfiles.layout.LayoutGraph} - */ - graph:yfiles.layout.LayoutGraph; - /** - * Gets or sets the {@link yfiles.collections.IComparer.} instance that determines the order of the outgoing edges for each node of the tree. - *

- * If no {@link yfiles.collections.IComparer.} is specified (i.e. the {@link yfiles.collections.IComparer.} is null), the outgoing edges will be sorted according to the current - * {@link yfiles.tree.BalloonLayout#childOrderingPolicy child ordering policy}. - *

- * @see yfiles.tree.BalloonLayout#childOrderingPolicy - * @see yfiles.tree.BalloonLayout#fromSketchMode - * @type {yfiles.collections.IComparer.} - */ - comparer:yfiles.collections.IComparer; - /** - * Gets or sets the child ordering policy for sorting the child nodes around their parents. - *

- * The sorting policy can affect the compactness of drawings. Advantageous orderings allow adjacent subtrees to be close - * together and can thus make the whole layout more compact. - *

- * @throws {Stubs.Exceptions.ArgumentError} if an unknown ordering policy is given - * @see yfiles.tree.BalloonLayout#fromSketchMode - * @see yfiles.tree.BalloonLayout#comparer - * @type {yfiles.tree.ChildOrderingPolicy} - */ - childOrderingPolicy:yfiles.tree.ChildOrderingPolicy; - /** - * Gets or sets the minimum distance to be kept between the nodes in the tree. - *

- * The distance needs to be a non-negative integer value. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given minimum distance is negative - * @see yfiles.tree.BalloonLayout#allowOverlaps - * @type {number} - */ - minimumNodeDistance:number; - /** - * Gets or sets whether or not to consider the given coordinates of the input diagram when arranging the tree. - *

- * Enabling this feature, the original circular order of child nodes around their parent nodes will be maintained according - * to the initial coordinates when determining the order of the child nodes. - *

- * @type {boolean} - */ - fromSketchMode:boolean; - /** - * Gets or sets the root node selection policy of this layout algorithm. - *

- * The policy determines which node is chosen as (virtual) tree root during the layout process. - *

- * @throws {Stubs.Exceptions.ArgumentError} if an unknown root node policy is given - * @type {yfiles.tree.RootNodePolicy} - */ - rootNodePolicy:yfiles.tree.RootNodePolicy; - /** - * Gets or sets the preferred radial amount (wedge) in degrees that child nodes may in total occupy around their parent - * node. - *

- * The wedge angle controls the degree to which the child nodes may radiate from the center of layout. A value close to 360 - * means that the child nodes may radiate in (almost) any direction from their parent node, edge lengths can in consequence - * stay rather small. On the other hand, a small value means that children are restricted to a small angle; thus, edge - * lengths (and drawings) may become large. - *

- *

- * The minimum allowed wedge angle is 1 and the maximum allowed value is 359. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given angle is smaller than 1 or larger than 359 - * @see yfiles.tree.BalloonLayout#preferredRootWedge - * @type {number} - */ - preferredChildWedge:number; - /** - * Gets or sets the preferred radial amount (wedge) in degrees that child nodes may in total occupy around the global - * root. - *

- * This property allows to separately control the wedge angle for the designated root node of the tree, while {@link yfiles.tree.BalloonLayout#preferredChildWedge} controls the - * angles of all child nodes. The root node will be determined depending on the {@link yfiles.tree.BalloonLayout#rootNodePolicy root node policy}. - *

- *

- * The minimum allowed root wedge angle is 1 and the maximum allowed value is 360. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given angle is smaller than 1 or larger than 360 - * @see yfiles.tree.BalloonLayout#preferredChildWedge - * @type {number} - */ - preferredRootWedge:number; - /** - * Gets or sets whether or not (partially) overlapping nodes are allowed. - *

- * If overlaps are allowed, the resulting layouts can become significantly more compact. Overlaps will mostly occur at the - * borders of nodes. Nodes will not be totally covered by other nodes. - *

- * @type {boolean} - */ - allowOverlaps:boolean; - /** - * Gets or sets the factor defining how compact layout results will potentially be, where a smaller factor produces - * potentially more compact layouts. - *

- * The algorithm tries to optimize the child node arrangement around each tree node such that each subtree is as close to - * its root as possible, while still fitting into the {@link yfiles.tree.BalloonLayout#preferredChildWedge preferred wedge angle} and not overlapping with adjacent subtrees. - *

- *

- * High compactness factor values induce the optimization procedure to be less strict and accept less optimal results, - * while low factor values mean that the optimization will only stop when being nearly optimal. Thus, lower values lead to - * a potentially higher runtime. - *

- *

- * The minimum factor value is 0.05 and the maximum is 1.0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the factor is smaller than 0.05 or greater than 1.0 - * @type {number} - */ - compactnessFactor:number; - /** - * Gets or sets the minimum length that this layout algorithm assigns to edges of the graph. - *

- * A lower minimum edge length allows generally more compact layouts. It has the highest effect if most nodes of the graph - * have a low degree, as the minimum can potentially be met for such graphs. - *

- *

- * The minimum length must be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given length is negative - * @type {number} - */ - minimumEdgeLength:number; - /** - * Gets or sets whether or not the layout algorithm reserves space for node labels. - *

- * The size of nodes will temporarily be adjusted such that the label is included. Therefore, result drawings may get - * significantly larger if this feature is enabled. - *

- * @type {boolean} - */ - considerNodeLabels:boolean; - /** - * Gets or sets the mode for child node arrangement. - *

- * Child nodes are either placed interleaved or on a single layer around their parent node. Interleaved placement means - * that child nodes are placed around their common parent in two different layers in an alternating fashion. For example, - * the first child is on the inner layer, the second child on the outer layer, the third one again on the inner layer, - * etc. - *

- *

- * Independent of this mode, the alignment of child nodes on the same layer is still defined by the {@link yfiles.tree.BalloonLayout#childAlignmentPolicy alignment policy}. - * However, {@link yfiles.tree.ChildAlignmentPolicy#SMART} is only supported for non-interleaved arrangement. - *

- * @throws {Stubs.Exceptions.ArgumentError} if an unknown mode for interleaved arrangement is given - * @see yfiles.tree.BalloonLayout#childAlignmentPolicy - * @type {yfiles.tree.InterleavedMode} - */ - interleavedMode:yfiles.tree.InterleavedMode; - /** - * Gets or sets the child alignment policy for this layout algorithm. - *

- * This policy influences the distance of child nodes to their parent nodes and the alignment of children with the same - * parent. - *

- * @throws {Stubs.Exceptions.ArgumentError} if an unknown policy is given - * @type {yfiles.tree.ChildAlignmentPolicy} - */ - childAlignmentPolicy:yfiles.tree.ChildAlignmentPolicy; - /** - * Gets or sets whether or not the layout algorithm automatically places node labels. - *

- * If enabled, this layout algorithm will calculate the positions for the node labels assuring that no overlaps occur. - *

- *

- * Different labeling strategies may be selected using {@link yfiles.tree.BalloonLayout#nodeLabelingPolicy}. - *

- * @see yfiles.tree.BalloonLayout#nodeLabelingPolicy - * @type {boolean} - */ - integratedNodeLabeling:boolean; - /** - * Gets or sets whether or not the layout algorithm automatically places edge labels. - *

- * If enabled, this layout algorithm will calculate the positions for the edge labels assuring that no overlaps occur. - *

- * @type {boolean} - */ - integratedEdgeLabeling:boolean; - /** - * Gets or sets the policy defining how node labels are placed by the integrated node labeling mechanism (for example, the - * desired label orientation). - * @throws {Stubs.Exceptions.ArgumentError} if an unknown labeling policy is given - * @see yfiles.tree.BalloonLayout#integratedNodeLabeling - * @type {yfiles.tree.NodeLabelingPolicy} - */ - nodeLabelingPolicy:yfiles.tree.NodeLabelingPolicy; - /** - * Gets or sets the distance between node labels belonging to the same node. - *

- * It also defines the distance between labels and the node they belong to in case of label placement outside of the node - * (e.g. for {@link yfiles.tree.NodeLabelingPolicy#RAY_LIKE ray-like label placement}). - *

- *

- * The spacing must have a non-negative value. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given spacing value is negative - * @see yfiles.tree.BalloonLayout#integratedNodeLabeling - * @type {number} - */ - nodeLabelSpacing:number; - /** - * Gets or sets the distance between edge labels belonging to the same edge as well as the distance of the edge labels to - * the target node of the edge. - *

- * The spacing must have a non-negative value. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given label spacing value is negative - * @see yfiles.tree.BalloonLayout#integratedEdgeLabeling - * @type {number} - */ - edgeLabelSpacing:number; - /** - * Gets or sets whether or not chains are drawn straight or not. - *

- * A chain is defined as a tree node with exactly one child node. If this feature is enabled, then the incoming edge and - * outgoing edge of the chain will have the same orientation, i.e., the whole chain looks straight. - *

- *

- * Straightening all chains can lead to smoother, more symmetric results. - *

- * @type {boolean} - */ - chainStraighteningMode:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for arranging the components of the graph is activated. - * @see yfiles.layout.MultiStageLayout#componentLayoutEnabled - * @see yfiles.layout.MultiStageLayout#componentLayout - * @see yfiles.layout.ComponentLayout - * @type {boolean} - */ - componentLayoutEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for hiding group nodes is activated. - * @see yfiles.layout.MultiStageLayout#hideGroupsStageEnabled - * @see yfiles.layout.MultiStageLayout#hideGroupsStage - * @see yfiles.layout.HideGroupsStage - * @type {boolean} - */ - hideGroupsStageEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} that modifies the orientation of the layout is activated. - * @see yfiles.layout.MultiStageLayout#orientationLayoutEnabled - * @see yfiles.layout.MultiStageLayout#orientationLayout - * @see yfiles.layout.MultiStageLayout#layoutOrientation - * @see yfiles.layout.OrientationLayout - * @type {boolean} - */ - orientationLayoutEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing parallel edges is activated. - * @see yfiles.layout.MultiStageLayout#parallelEdgeRouterEnabled - * @see yfiles.layout.MultiStageLayout#parallelEdgeRouter - * @see yfiles.router.ParallelEdgeRouter - * @type {boolean} - */ - parallelEdgeRouterEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing self-loops is activated. - * @see yfiles.layout.MultiStageLayout#selfLoopRouterEnabled - * @see yfiles.layout.MultiStageLayout#selfLoopRouter - * @see yfiles.layout.SelfLoopRouter - * @type {boolean} - */ - selfLoopRouterEnabled:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.BalloonLayout; - } - export enum FillStyle{ - /** - * Style specifier which defines that rows/columns are aligned with their leading side. - * @see yfiles.tree.AspectRatioNodePlacer#fillStyle - */ - LEADING, - /** - * Style specifier which defines that rows/columns are aligned with their center. - * @see yfiles.tree.AspectRatioNodePlacer#fillStyle - */ - CENTERED, - /** - * Style specifier which defines that rows/columns are justified to have the same width/height. - * @see yfiles.tree.AspectRatioNodePlacer#fillStyle - */ - JUSTIFY, - /** - * Style specifier which defines that rows/columns are aligned with their trailing side. - * @see yfiles.tree.AspectRatioNodePlacer#fillStyle - */ - TRAILING - } - export enum RootPlacement{ - /** - * A root placement specifier for placing the root centered above its subtree, depending on the actual {@link yfiles.layout.MultiStageLayout#layoutOrientation layout orientation}. - * @see yfiles.tree.AspectRatioTreeLayout#ROOT_PLACEMENT_DP_KEY - */ - TOP, - /** - * A root placement specifier for placing the root in the upper left corner of the subtree bounds with respect to the - * actual {@link yfiles.layout.MultiStageLayout#layoutOrientation layout orientation}. - *

- * Whether the root is placed entirely beside the subtree with no horizontal overlaps or entirely above the subtree without - * vertical overlaps will be determined by the layout of the subtree. The layout algorithm tries to minimize the bounds of - * the subtree. - *

- * @see yfiles.tree.AspectRatioTreeLayout#ROOT_PLACEMENT_DP_KEY - * @see yfiles.tree.RootPlacement#CORNER_TOP - * @see yfiles.tree.RootPlacement#CORNER_SIDE - */ - CORNER, - /** - * A root placement specifier for placing the root in the upper left corner of the subtree bounds with respect to the - * actual {@link yfiles.layout.MultiStageLayout#layoutOrientation layout orientation}. - *

- * The root is placed entirely beside the subtree with no horizontal overlaps. This might by important if the root's height - * is very large while its width is small. - *

- * @see yfiles.tree.AspectRatioTreeLayout#ROOT_PLACEMENT_DP_KEY - */ - CORNER_SIDE, - /** - * A root placement specifier for placing the root of a subtree in the upper left corner of the subtree bounds with respect - * to the actual {@link yfiles.layout.MultiStageLayout#layoutOrientation layout orientation}. - *

- * The root is placed entirely above the subtree with no vertical overlaps. This might by important if the root's width is - * very large while its height is small. - *

- * @see yfiles.tree.AspectRatioTreeLayout#ROOT_PLACEMENT_DP_KEY - */ - CORNER_TOP - } - export enum SubtreeArrangement{ - /** - * A direction specifier for placing the child nodes next to each other in direction of the actual - * {@link yfiles.layout.MultiStageLayout#layoutOrientation layout orientation}, with the edges connecting in the direction of flow. - * @see yfiles.tree.AspectRatioTreeLayout#SUBTREE_ROUTING_POLICY_DP_KEY - */ - HORIZONTAL, - /** - * A direction specifier for placing the child nodes above each other in direction of the actual - * {@link yfiles.layout.MultiStageLayout#layoutOrientation layout orientation}, with the edges connecting orthogonally to the direction of flow. - * @see yfiles.tree.AspectRatioTreeLayout#SUBTREE_ROUTING_POLICY_DP_KEY - */ - VERTICAL - } - export enum InterleavedMode{ - /** - * A child placement mode where all child nodes are placed around their parent with equal distances. - * @see yfiles.tree.BalloonLayout#interleavedMode - */ - OFF, - /** - * A child placement mode where nodes are placed in an interleaved fashion, that is, with two different, alternating - * distances to the parent node. - * @see yfiles.tree.BalloonLayout#interleavedMode - */ - ALL_NODES, - /** - * A child placement mode where child nodes of selected nodes are placed in an interleaved fashion, that is, with two - * different, alternating distances to the parent node. - *

- * All other nodes are placed without interleaving. The node selection can be specified by registering an appropriate {@link yfiles.algorithms.IDataProvider} - * for key {@link yfiles.tree.BalloonLayout#INTERLEAVED_NODES_DP_KEY}. - *

- * @see yfiles.tree.BalloonLayout#interleavedMode - */ - MARKED_NODES - } - export enum NodeLabelingPolicy{ - /** - * Node labeling policy for ray-like label placement at nodes with zero or one child node. - *

- * Labels belonging to leaf nodes and nodes with exactly one successor (thus forming a sort of chain) will not be oriented - * horizontal but ray-like; they get the same orientation as their nodes' incoming edge. The labels of the other nodes will - * be oriented horizontally and placed at the center of the corresponding node. - *

- * @see yfiles.tree.BalloonLayout#nodeLabelingPolicy - */ - RAY_LIKE, - /** - * Node labeling policy for ray-like label placement at leaf nodes. - *

- * Labels corresponding to leaf nodes get the same orientation as their nodes' incoming edge and are placed outside the - * node (without overlaps). The labels of the other nodes will be oriented horizontally and placed at the center of the - * corresponding node. - *

- * @see yfiles.tree.BalloonLayout#nodeLabelingPolicy - */ - RAY_LIKE_LEAVES, - /** - * Node labeling policy for horizontal label placement at all nodes. - *

- * The node labels are placed at the center of the corresponding node. - *

- * @see yfiles.tree.BalloonLayout#nodeLabelingPolicy - */ - HORIZONTAL - } - export enum ChildAlignmentPolicy{ - /** - * Alignment policy to align child nodes rooted at the same parent such that the border of their convex hull has the same - * distance to the parent node's center. - * @see yfiles.tree.BalloonLayout#childAlignmentPolicy - */ - PLAIN, - /** - * Alignment policy to align child nodes rooted at the same parent such that each child has the same center-to-center - * distance to the parent node. - *

- * All nodes will be placed on a common radius around their parent, respective to their center coordinates. - *

- * @see yfiles.tree.BalloonLayout#childAlignmentPolicy - */ - SAME_CENTER, - /** - * Alignment policy for aligning child nodes such that the distances to their parent are kept short and drawings can - * potentially become more compact. - *

- * This policy realizes the exact same child alignment as {@link yfiles.tree.ChildAlignmentPolicy#PLAIN} if there are no edge - * labels associated with edges going to child nodes or if {@link yfiles.tree.BalloonLayout#integratedEdgeLabeling integrated edge labeling} is disabled. - *

- *

- * If edge labels need to be considered, edge labels will be added to the convex hull of the child node to which the edge - * connects. This means that child nodes connected with a labeled edge will be aligned at the border where the edge label - * begins. In consequence, edge labels will be aligned with neighboring edge labels as well as neighboring child nodes if a - * child node has no edge label at its incoming edge. - *

- *

- * This alignment strategy is especially effective if large edge labels need to be considered while drawings should still - * be compact and distances from parent to child nodes short. - *

- * @see yfiles.tree.BalloonLayout#childAlignmentPolicy - */ - COMPACT, - /** - * Alignment policy to align child nodes rooted at the same parent using a mixture of the other policies and aiming to - * achieve symmetry and compactness at the same time. - *

- * Similar to - * {@link yfiles.tree.ChildAlignmentPolicy#SAME_CENTER}, this policy aims to achieve alignments featuring equal distances between - * parent and child node centers. However, a much larger distance for all child nodes caused by single large subtrees is - * avoided by this policy. In such cases, the smaller subtrees may be placed on a common radius and the large subtrees are - * placed with different distances. - *

- * @see yfiles.tree.BalloonLayout#childAlignmentPolicy - */ - SMART - } - export enum ChildOrderingPolicy{ - /** - * Child ordering policy which orders child nodes depending on their subtree size such that large subtrees are placed next - * to small ones in order to save space. - *

- * The actual area of a subtree is used as the subtree size. The smallest subtree is placed next to the largest subtree, - * followed by the second smallest subtree and so on. This way, drawings can become more compact, because the adjacent - * placement of large subtrees is avoided (which would require edges to become longer for subtrees to fit next to each - * other). - *

- * @see yfiles.tree.BalloonLayout#childOrderingPolicy - */ - COMPACT, - /** - * Child ordering policy which sorts the child nodes according to their wedge angles. - *

- * The node with the greatest angle gets median position in the sorting order. The smaller the wedges, the farther away a - * node will be placed from the median position. Using this policy, the produced results are often more symmetric. - *

- * @see yfiles.tree.BalloonLayout#childOrderingPolicy - */ - SYMMETRIC - } - export enum RootNodePolicy{ - /** - * Root node policy for choosing a node with indegree 0 as root node of the tree. - *

- * The selection of the root node will happen according to {@link yfiles.algorithms.Trees#getRoot}. - *

- * @see yfiles.tree.BalloonLayout#rootNodePolicy - * @see yfiles.algorithms.Trees#getRoot - */ - DIRECTED_ROOT, - /** - * Root node policy for choosing the center node as root node of the tree. - *

- * A {@link yfiles.algorithms.Trees#getCenterRoot center node} induces a minimum depth tree when being used as the root of that tree. - *

- * @see yfiles.tree.BalloonLayout#rootNodePolicy - * @see yfiles.algorithms.Trees#getCenterRoot - */ - CENTER_ROOT, - /** - * Root node policy for choosing a weighted center node as root node of the tree. - *

- * A {@link yfiles.algorithms.Trees#getWeightedCenterNode weighted center node} is a node which is part of the greatest number of all undirected paths in a graph. - *

- * @see yfiles.tree.BalloonLayout#rootNodePolicy - */ - WEIGHTED_CENTER_ROOT, - /** - * Root node policy for choosing a custom node as the root node of the tree. - *

- * The root node is specified using a {@link yfiles.algorithms.IDataProvider} registered with the graph with key - * {@link yfiles.tree.BalloonLayout#SELECTED_ROOT_DP_KEY}. - *

- * @see yfiles.tree.BalloonLayout#rootNodePolicy - */ - SELECTED_ROOT - } - export enum ChildPlacement{ - /** - * Placement specifier which defines that subtrees are placed one below the other and left of the root node. - * @see yfiles.tree.DefaultNodePlacer#childPlacement - */ - VERTICAL_TO_LEFT, - /** - * Placement specifier which defines that subtrees are placed one below the other and right of the root node. - * @see yfiles.tree.DefaultNodePlacer#childPlacement - */ - VERTICAL_TO_RIGHT, - /** - * Placement specifier which defines that subtrees are placed horizontally next to each other and above the root node. - * @see yfiles.tree.DefaultNodePlacer#childPlacement - */ - HORIZONTAL_UPWARD, - /** - * Placement specifier which defines that subtrees are placed horizontally next to each other and below the root node. - * @see yfiles.tree.DefaultNodePlacer#childPlacement - */ - HORIZONTAL_DOWNWARD - } - export enum RootAlignment{ - /** - * Alignment specifier which defines that the root node is placed ahead of all its child subtrees. - *

- * Depending on the {@link yfiles.tree.DefaultNodePlacer#childPlacement child placement}, the root node is placed ahead (e.g. - * {@link yfiles.tree.ChildPlacement#HORIZONTAL_DOWNWARD}: left) of the combined bounding box of all subtrees without labels. - *

- * @see yfiles.tree.DefaultNodePlacer#rootAlignment - */ - LEADING_OFFSET, - /** - * Alignment specifier which defines that the root node is placed aligned with its first subtree. - *

- * Depending on the {@link yfiles.tree.DefaultNodePlacer#childPlacement child placement}, the root node is placed aligned with the bounding box of its first (e.g. - * {@link yfiles.tree.ChildPlacement#HORIZONTAL_DOWNWARD}: left) subtree. - *

- * @see yfiles.tree.DefaultNodePlacer#rootAlignment - */ - LEADING, - /** - * Alignment specifier which defines that the root node is placed aligned with the center of its subtrees. - * @see yfiles.tree.DefaultNodePlacer#rootAlignment - */ - CENTER, - /** - * Alignment specifier which defines that the root node is placed at the median of the connection points to its subtrees. - * @see yfiles.tree.DefaultNodePlacer#rootAlignment - */ - MEDIAN, - /** - * Alignment specifier which defines that the root node is placed aligned with its last subtree. - *

- * Depending on the {@link yfiles.tree.DefaultNodePlacer#childPlacement child placement}, the root node is placed aligned with the bounding box of its last (e.g. - * {@link yfiles.tree.ChildPlacement#HORIZONTAL_DOWNWARD}: right) subtree. - *

- * @see yfiles.tree.DefaultNodePlacer#rootAlignment - */ - TRAILING, - /** - * Alignment specifier which defines that the root is placed after all its subtree. - *

- * Depending on the {@link yfiles.tree.DefaultNodePlacer#childPlacement child placement}, the root node is placed after (e.g. - * {@link yfiles.tree.ChildPlacement#HORIZONTAL_DOWNWARD}: right) of the combined bounding box of all subtrees without labels. - *

- * @see yfiles.tree.DefaultNodePlacer#rootAlignment - */ - TRAILING_OFFSET, - /** - * Alignment specifier which defines that the root is placed after all its subtrees, centered on the bus. - *

- * Depending on the {@link yfiles.tree.DefaultNodePlacer#childPlacement child placement}, the root node is placed after (e.g. - * {@link yfiles.tree.ChildPlacement#HORIZONTAL_DOWNWARD}: right) of the combined bounding box of all subtrees without labels. The - * bus leaves directly from the root node. - *

- * @see yfiles.tree.DefaultNodePlacer#rootAlignment - */ - TRAILING_ON_BUS, - /** - * Alignment specifier which defines that the root is placed ahead of all its subtrees, centered on the bus. - *

- * Depending on the {@link yfiles.tree.DefaultNodePlacer#childPlacement child placement}, the root node is placed ahead (e.g. - * {@link yfiles.tree.ChildPlacement#HORIZONTAL_DOWNWARD}: left) of the combined bounding box of all subtrees without labels. The - * bus leaves directly from the root node. - *

- * @see yfiles.tree.DefaultNodePlacer#rootAlignment - */ - LEADING_ON_BUS - } - export enum RoutingStyle{ - /** - * Routing style specifier which defines that edge paths are routed orthogonally with the bends located in the channel - * between the root node and the child nodes. - * @see yfiles.tree.DefaultNodePlacer#routingStyle - */ - FORK, - /** - * Routing style specifier which defines that edge paths are routed orthogonally with just one bend. - *

- * Edges will leave the root node at its sides and bend exactly above the according child node. If the child node is placed - * directly below the root node, the edge will bend inside of the root node and leave it at the bottom. - *

- * @see yfiles.tree.DefaultNodePlacer#routingStyle - */ - FORK_AT_ROOT, - /** - * Routing style specifier which defines that edge paths are routed with a straight segment to the center of the child - * nodes. - * @see yfiles.tree.DefaultNodePlacer#routingStyle - */ - STRAIGHT, - /** - * Routing style constant which defines that edge paths are routed with a straight segment to the connector of the {@link yfiles.tree.SubtreeShape} - * of the child nodes. - * @see yfiles.tree.DefaultNodePlacer#routingStyle - */ - POLYLINE - } - export enum PortAssignmentMode{ - /** - * A port assignment specifier that defines that - * {@link yfiles.layout.PortConstraint}s are considered. Ports are placed using the following rules: - *
    - *
  • edges without a {@link yfiles.layout.PortConstraint} are anchored at the center of the node
  • - *
  • edges with a weak {@link yfiles.layout.PortConstraint} are anchored at the center of their specified side
  • - *
  • edges with a strong {@link yfiles.layout.PortConstraint} are anchored at their initial coordinates
  • - *
- *

- * If edges with - * {@link yfiles.layout.PortConstraint}s are grouped, all edges in the same group will use the port coordinates of the first edge - * in the group. - *

- * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - */ - PORT_CONSTRAINT, - /** - * A port assignment specifier which defines that edges are distributed evenly at the northern side of their nodes. - *

- * Grouped edges will use the same port coordinate and will be considered as a single edge when calculating the - * distribution. - *

- * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - */ - DISTRIBUTED_NORTH, - /** - * A port assignment specifier which defines that edges are distributed evenly at the southern side of their nodes. - *

- * Grouped edges will use the same port coordinate and will be considered as a single edge when calculating the - * distribution. - *

- * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - */ - DISTRIBUTED_SOUTH, - /** - * A port assignment specifier which defines that edges are distributed evenly at the eastern side of their nodes. - *

- * Grouped edges will use the same port coordinate and will be considered as a single edge when calculating the - * distribution. - *

- * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - */ - DISTRIBUTED_EAST, - /** - * A port assignment specifier which defines that edges are distributed evenly at the western side of their nodes. - *

- * Grouped edges will use the same port coordinate and will be considered as a single edge when calculating the - * distribution. - *

- * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - */ - DISTRIBUTED_WEST, - /** - * A port assignment specifier which defines that all ports are reset to the center of their nodes. - */ - NONE - } - export enum ConnectorDirection{ - /** - * A direction constant that describes that the last connector segment points up. The edge from the parent will connect to - * the north of the {@link yfiles.tree.SubtreeShape}. - * @see yfiles.tree.SubtreeShape#connectorDirection - */ - NORTH, - /** - * A direction constant that describes that the last connector segment points to the right. The edge from the parent will - * connect to the east of the {@link yfiles.tree.SubtreeShape}. - * @see yfiles.tree.SubtreeShape#connectorDirection - */ - EAST, - /** - * A direction constant that describes that the last connector segment points down. The edge from the parent will connect - * to the south of the {@link yfiles.tree.SubtreeShape}. - * @see yfiles.tree.SubtreeShape#connectorDirection - */ - SOUTH, - /** - * A direction constant that describes that the last connector segment points to the left. The edge from the parent will - * connect to the west of the {@link yfiles.tree.SubtreeShape}. - * @see yfiles.tree.SubtreeShape#connectorDirection - */ - WEST - } - export enum BorderLineSide{ - /** - * Side constant that defines the index of the northern border line. - * @see yfiles.tree.SubtreeShape#getBorderLine - */ - NORTH, - /** - * Side constant that defines the index of the eastern border line. - * @see yfiles.tree.SubtreeShape#getBorderLine - */ - EAST, - /** - * Side constant that defines the index of the southern border line. - * @see yfiles.tree.SubtreeShape#getBorderLine - */ - SOUTH, - /** - * Side constant that defines the index of the western border line. - * @see yfiles.tree.SubtreeShape#getBorderLine - */ - WEST - } - export enum LayeredRoutingStyle{ - /** - * Routing style specifier which defines that edges consist of one straight segment. - * @see yfiles.tree.LayeredNodePlacer#routingStyle - */ - STRAIGHT, - /** - * Routing style specifier which defines that edges are routed in an orthogonal, bus-like fashion. - * @see yfiles.tree.LayeredNodePlacer#routingStyle - */ - ORTHOGONAL - } - export enum MultiParentRoutingStyle{ - /** - * Routing style for routing non-shared edge segments in a polyline fashion. - *

- * The edges connected to a multi-parent structure will share their paths until shortly above/below the multi-parent nodes. - * This style only applies to the part of the edges where they split to connect to different multi-parents. - *

- * @see yfiles.tree.MultiParentDescriptor#edgeStyle - */ - POLYLINE, - /** - * Routing style for routing non-shared edge segments in an orthogonal fashion. - *

- * The edges connected to a multi-parent structure will share their paths until shortly above/below the multi-parent nodes. - * This style only applies to the part of the edges where they split to connect to different multi-parents. - *

- * @see yfiles.tree.MultiParentDescriptor#edgeStyle - */ - ORTHOGONAL, - /** - * Routing style for routing non-shared edge segments straight. This style will route the part of the edges that doesn't - * share the same path directly from the center of the multi-parent to the common point of the edges in the multi-parent - * structure. - *

- * The edges connected to a multi-parent structure will share their paths until shortly above/below the multi-parent nodes. - * This style only applies to the part of the edges where they split to connect to different multi-parents. - *

- * @see yfiles.tree.MultiParentDescriptor#edgeStyle - */ - STRAIGHT - } - export enum ParentConnectorDirection{ - /** - * Direction specifier which indicates that no connector should be calculated. - * @see yfiles.tree.INodePlacer#placeSubtree - */ - NONE, - /** - * Direction specifier which indicates that any direction can be used for the connector to the parent node. - * @see yfiles.tree.INodePlacer#placeSubtree - */ - ANY, - /** - * Direction specifier which indicates that the connector to the parent node should end in a segment that can be extended - * by a segment that goes north. - * @see yfiles.tree.INodePlacer#placeSubtree - */ - NORTH, - /** - * Direction specifier which indicates that the connector to the parent node should end in a segment that can be extended - * by a segment that goes east. - * @see yfiles.tree.INodePlacer#placeSubtree - */ - EAST, - /** - * Direction specifier which indicates that the connector to the parent node should end in a segment that can be extended - * by a segment that goes south. - * @see yfiles.tree.INodePlacer#placeSubtree - */ - SOUTH, - /** - * Direction specifier which indicates that the connector to the parent node should end in a segment that can be extended - * by a segment that goes west. - * @see yfiles.tree.INodePlacer#placeSubtree - */ - WEST - } - export enum PortStyle{ - /** - * A constant defining that ports are placed at the center of the nodes. - *

- * This constant uses (0,0) as port offset. - *

- * @see yfiles.tree.ClassicTreeLayout#portStyle - */ - NODE_CENTER, - /** - * A constant defining that ports are placed at the center of the border of the nodes. - * @see yfiles.tree.ClassicTreeLayout#portStyle - */ - BORDER_CENTER, - /** - * A constant defining that ports are evenly distributed along the border of the nodes. - * @see yfiles.tree.ClassicTreeLayout#portStyle - */ - BORDER_DISTRIBUTED, - /** - * A constant defining that ports are assigned based on given {@link yfiles.layout.PortConstraint port constraints}. - * @see yfiles.tree.ClassicTreeLayout#portStyle - */ - PORT_CONSTRAINTS_AWARE - } - export enum EdgeRoutingStyle{ - /** - * A constant for routing the edges as straight-line segments. - * @see yfiles.tree.ClassicTreeLayout#edgeRoutingStyle - */ - PLAIN, - /** - * A constant for routing the edges orthogonally in a bus-like fashion. - * @see yfiles.tree.ClassicTreeLayout#edgeRoutingStyle - */ - ORTHOGONAL - } - export enum LeafPlacement{ - /** - * A policy for placing the leaf nodes in a stack-like fashion with balanced stack heights. - *

- * In this context, a stack-like fashion means that leaf nodes that connect to the same parent node are placed one upon the - * other, resulting in horizontally compact layouts. - *

- *

- * This policy tries to balance stack heights, i.e., for each subtree that consists only of leaf nodes, {@link yfiles.tree.LeafPlacement#LEAVES_STACKED_RIGHT} - * or {@link yfiles.tree.LeafPlacement#LEAVES_STACKED_LEFT_AND_RIGHT} will be used depending on the number of leaves in the - * subtree. - *

- * @see yfiles.tree.ClassicTreeLayout#leafPlacement - * @see yfiles.tree.ClassicTreeLayout#leafPlacement - */ - LEAVES_STACKED, - /** - * A policy for placing the leaf nodes in a stack-like fashion using a single stack left. - *

- * In this context, a stack-like fashion means that leaf nodes that connect to the same root node are placed one upon the - * other, resulting in horizontally compact layouts. - *

- *

- * This policy uses a single stack that lies to the left relative to the center of the parent node. - *

- * @see yfiles.tree.ClassicTreeLayout#leafPlacement - * @see yfiles.tree.ClassicTreeLayout#leafPlacement - */ - LEAVES_STACKED_LEFT, - /** - * A policy for placing the leaf nodes in a stack-like fashion using a single stack right. - *

- * In this context, a stack-like fashion means that leaf nodes that connect to the same root node are placed one upon the - * other, resulting in horizontally compact layouts. - *

- *

- * This policy uses a single stack that lies to the right relative to the center of the parent node. - *

- * @see yfiles.tree.ClassicTreeLayout#leafPlacement - * @see yfiles.tree.ClassicTreeLayout#leafPlacement - */ - LEAVES_STACKED_RIGHT, - /** - * A policy for placing the leaf nodes in a stack-like fashion using two stacks. - *

- * In this context, a stack-like fashion means that leaf nodes that connect to the same root node are placed one upon the - * other, resulting in horizontally compact layouts. - *

- *

- * This policy distributes leaf nodes among two stacks, one to the left and one to the right relative to the center of the - * parent node. - *

- * @see yfiles.tree.ClassicTreeLayout#leafPlacement - * @see yfiles.tree.ClassicTreeLayout#leafPlacement - */ - LEAVES_STACKED_LEFT_AND_RIGHT, - /** - * A policy for placing the leaf nodes in a Dendrogram-like fashion. - *

- * According to this policy, all leaf nodes are placed in one layer (i.e. all leaves are placed on one horizontal line in a - * top-to-bottom or in a bottom-to-top layout). - *

- * @see yfiles.tree.ClassicTreeLayout#leafPlacement - * @see yfiles.tree.ClassicTreeLayout#leafPlacement - */ - ALL_LEAVES_ON_SAME_LAYER, - /** - * A policy for placing the leaf nodes with the same parent in the same layer. - *

- * For example, siblings are being placed on a horizontal line in a top-to-bottom or in a bottom-to-top layout. - *

- *

- * This policy produces vertically compact layouts. - *

- * @see yfiles.tree.ClassicTreeLayout#leafPlacement - * @see yfiles.tree.ClassicTreeLayout#leafPlacement - */ - SIBLINGS_ON_SAME_LAYER - } - /** - * This {@link yfiles.tree.INodePlacer} places the subtrees such that the overall aspect ratio of the arranged subtree will be - * close to a preferred aspect ratio. - *

- * Layout Style The aspect ratio describes the relation between width and height of the subtree. To achieve the desired aspect ratio, - * this {@link yfiles.tree.INodePlacer} divides the child {@link yfiles.tree.SubtreeShape}s into as much rows as needed. The edges are - * either routed along the rows or along the columns. {@graph {"ann":{"s":[30,30],"d":1},"n":[[0,0],[70,70],[140,70],[210,70],[280,70],[70,140],[140,140],[210,140],[280,140],[70,210],[140,210],[210,210],[280,210],[70,280],[140,280],[210,280],[280,280]],"e":[[0,1,[50,15,50,85]],[0,2,[120,15,120,85]],[0,3,[190,15,190,85]],[0,4,[260,15,260,85]],[0,5,[50,15,50,155]],[0,6,[120,15,120,155]],[0,7,[190,15,190,155]],[0,8,[260,15,260,155]],[0,9,[50,15,50,225]],[0,10,[120,15,120,225]],[0,11,[190,15,190,225]],[0,12,[260,15,260,225]],[0,13,[50,15,50,295]],[0,14,[120,15,120,295]],[0,15,[190,15,190,295]],[0,16,[260,15,260,295]]],"vp":[0.0,0.0,310.0,310.0]}} - *

- *

- * Aspect ratio 1 - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[0,0],[70,70],[140,70],[210,70],[70,140],[140,140],[210,140],[70,210],[140,210],[210,210],[70,280],[140,280],[210,280],[70,350],[140,350],[210,350],[70,420]],"e":[[0,1,[50,15,50,85]],[0,2,[120,15,120,85]],[0,3,[190,15,190,85]],[0,4,[50,15,50,155]],[0,5,[120,15,120,155]],[0,6,[190,15,190,155]],[0,7,[50,15,50,225]],[0,8,[120,15,120,225]],[0,9,[190,15,190,225]],[0,10,[50,15,50,295]],[0,11,[120,15,120,295]],[0,12,[190,15,190,295]],[0,13,[50,15,50,365]],[0,14,[120,15,120,365]],[0,15,[190,15,190,365]],[0,16,[50,15,50,435]]],"vp":[0.0,0.0,240.0,450.0]}} - *

- *

- * Aspect ratio 0.5 - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[0,0],[70,70],[140,70],[210,70],[280,70],[350,70],[420,70],[490,70],[560,70],[70,140],[140,140],[210,140],[280,140],[350,140],[420,140],[490,140],[560,140]],"e":[[0,1,[50,15,50,85]],[0,2,[120,15,120,85]],[0,3,[190,15,190,85]],[0,4,[260,15,260,85]],[0,5,[330,15,330,85]],[0,6,[400,15,400,85]],[0,7,[470,15,470,85]],[0,8,[540,15,540,85]],[0,9,[50,15,50,155]],[0,10,[120,15,120,155]],[0,11,[190,15,190,155]],[0,12,[260,15,260,155]],[0,13,[330,15,330,155]],[0,14,[400,15,400,155]],[0,15,[470,15,470,155]],[0,16,[540,15,540,155]]],"vp":[0.0,0.0,590.0,170.0]}} - *

- *

- * Aspect ratio 2 - *

- * @class - * @extends {yfiles.tree.NodePlacerBase} - * @implements {yfiles.tree.IFromSketchNodePlacer} - */ - export interface AspectRatioNodePlacer extends yfiles.tree.NodePlacerBase,yfiles.tree.IFromSketchNodePlacer{} - export class AspectRatioNodePlacer { - /** - * Creates a new instance of {@link yfiles.tree.AspectRatioNodePlacer} with default settings. - */ - constructor(); - /** - * Creates an {@link yfiles.collections.IComparer. edge comparator} which takes the initial coordinates of the nodes into account. - *

- * This {@link yfiles.collections.IComparer.} defines the order of the outgoing edges of a node before the actual placement of the node's subtree is calculated. - * It also considers whether or not the rows are placed {@link yfiles.tree.AspectRatioNodePlacer#horizontal horiontally}. - *

- * @returns the {@link } for the edges - */ - createFromSketchComparer():yfiles.collections.IComparer; - /** - * Gets or sets whether child nodes are distributed in horizontal rows or vertical columns. - * @type {boolean} - */ - horizontal:boolean; - /** - * Gets or sets the vertical distance between the {@link yfiles.tree.SubtreeShape}s. - *

- * The nodes will be placed below each other, keeping this distance. - *

- *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @type {number} - */ - verticalDistance:number; - /** - * Gets or sets the horizontal distance between the {@link yfiles.tree.SubtreeShape}s. - *

- * The nodes will be placed next to each other, keeping this distance. - *

- *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @type {number} - */ - horizontalDistance:number; - /** - * Gets or sets the preferred aspect ratio (width/height) for the subtrees. - *

- * This ratio determines among how many rows/columns the nodes will be distributed. - *

- *

- * The aspect ratio needs to be positive. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified aspect ratio is 0 or negative - * @type {number} - */ - aspectRatio:number; - /** - * Gets or sets how rows/columns are aligned with each other. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown fill style is specified - * @type {yfiles.tree.FillStyle} - */ - fillStyle:yfiles.tree.FillStyle; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.AspectRatioNodePlacer; - } - /** - * The {@link yfiles.tree.AspectRatioTreeLayout} arranges tree graphs in a compact fashion. - *

- * Layout Style This layout algorithm tries to generate compact tree layouts with a certain preferred aspect ratio. {@graph {"ann":{"s":[30,30],"d":1},"n":[[0,0],[40,740],[360,740],[480,810],[400,810],[240,810],[80,810],[160,810],[560,810],[200,880],[200,940],[200,1000],[200,1060],[200,1120],[120,880],[120,940],[120,1000],[120,1060],[120,1120],[280,880],[280,940],[320,880],[320,940],[600,880],[600,940],[600,1000],[520,880],[520,940],[520,1000],[440,880],[440,940],[440,1000],[440,1060],[440,1120],[40,70],[390,70],[80,450],[80,640],[200,140],[200,450],[80,140],[150,680],[190,680],[240,210],[240,270],[240,330],[120,520],[120,580],[160,520],[160,580],[270,490],[270,550],[310,490],[310,550],[350,490],[350,550],[120,210],[120,270],[120,330],[120,390],[160,210],[160,270],[160,330],[430,610],[580,510],[430,510],[430,140],[510,140],[590,140],[470,610],[650,550],[500,550],[540,550],[630,210],[630,270],[630,330],[470,210],[470,270],[470,330],[470,390],[470,450],[550,210],[550,270],[550,330],[550,390],[550,450]],"e":[[0,1,-10,0,0,0,[5,50,5,720,55,720]],[0,2,-10,0,0,0,[5,50,5,720,375,720]],[2,3,-10,0,0,0,[365,790,495,790]],[2,4,-10,0,0,0,[365,790,415,790]],[1,5,-10,0,0,0,[45,790,255,790]],[1,6,-10,0,0,0,[45,790,95,790]],[1,7,-10,0,0,0,[45,790,175,790]],[2,8,-10,0,0,0,[365,790,575,790]],[7,9,-10,0,0,0,[165,860,215,860]],[7,10,-10,0,0,0,[165,860,165,920,215,920]],[7,11,-10,0,0,0,[165,860,165,980,215,980]],[7,12,-10,0,0,0,[165,860,165,1040,215,1040]],[7,13,-10,0,0,0,[165,860,165,1100,215,1100]],[6,14,-10,0,0,0,[85,860,135,860]],[6,15,-10,0,0,0,[85,860,85,920,135,920]],[6,16,-10,0,0,0,[85,860,85,980,135,980]],[6,17,-10,0,0,0,[85,860,85,1040,135,1040]],[6,18,-10,0,0,0,[85,860,85,1100,135,1100]],[5,19,-10,0,0,0,[245,860,295,860]],[5,20,-10,0,0,0,[245,860,245,920,295,920]],[5,21,-10,0,0,0,[245,860,335,860]],[5,22,-10,0,0,0,[245,860,245,920,335,920]],[8,23,-10,0,0,0,[565,860,615,860]],[8,24,-10,0,0,0,[565,860,565,920,615,920]],[8,25,-10,0,0,0,[565,860,565,980,615,980]],[3,26,-10,0,0,0,[485,860,535,860]],[3,27,-10,0,0,0,[485,860,485,920,535,920]],[3,28,-10,0,0,0,[485,860,485,980,535,980]],[4,29,-10,0,0,0,[405,860,455,860]],[4,30,-10,0,0,0,[405,860,405,920,455,920]],[4,31,-10,0,0,0,[405,860,405,980,455,980]],[4,32,-10,0,0,0,[405,860,405,1040,455,1040]],[4,33,-10,0,0,0,[405,860,405,1100,455,1100]],[0,34,-10,0,0,0,[5,50,55,50]],[0,35,-10,0,0,0,[5,50,405,50]],[34,36,-10,0,0,0,[45,120,45,430,95,430]],[34,37,-10,0,0,0,[45,120,45,620,95,620]],[34,38,-10,0,0,0,[45,120,215,120]],[34,39,-10,0,0,0,[45,120,45,430,215,430]],[34,40,-10,0,0,0,[45,120,95,120]],[37,41,0,-10,0,0,[130,645,130,660,165,660]],[37,42,0,-10,0,0,[130,645,130,660,205,660]],[38,43,-10,0,0,0,[205,190,255,190]],[38,44,-10,0,0,0,[205,190,205,250,255,250]],[38,45,-10,0,0,0,[205,190,205,310,255,310]],[36,46,-10,0,0,0,[85,500,135,500]],[36,47,-10,0,0,0,[85,500,85,560,135,560]],[36,48,-10,0,0,0,[85,500,175,500]],[36,49,-10,0,0,0,[85,500,85,560,175,560]],[39,50,0,-10,0,0,[250,455,250,470,285,470]],[39,51,0,-10,0,0,[250,455,250,530,285,530]],[39,52,0,-10,0,0,[250,455,250,470,325,470]],[39,53,0,-10,0,0,[250,455,250,530,325,530]],[39,54,0,-10,0,0,[250,455,250,470,365,470]],[39,55,0,-10,0,0,[250,455,250,530,365,530]],[40,56,-10,0,0,0,[85,190,135,190]],[40,57,-10,0,0,0,[85,190,85,250,135,250]],[40,58,-10,0,0,0,[85,190,85,310,135,310]],[40,59,-10,0,0,0,[85,190,85,370,135,370]],[40,60,-10,0,0,0,[85,190,175,190]],[40,61,-10,0,0,0,[85,190,85,250,175,250]],[40,62,-10,0,0,0,[85,190,85,310,175,310]],[35,63,-10,0,0,0,[395,120,395,590,445,590]],[35,64,-10,0,0,0,[395,120,395,490,595,490]],[35,65,-10,0,0,0,[395,120,395,490,445,490]],[35,66,-10,0,0,0,[395,120,445,120]],[35,67,-10,0,0,0,[395,120,525,120]],[35,68,-10,0,0,0,[395,120,605,120]],[35,69,-10,0,0,0,[395,120,395,590,485,590]],[64,70,0,-10,0,0,[630,515,630,530,665,530]],[65,71,0,-10,0,0,[480,515,480,530,515,530]],[65,72,0,-10,0,0,[480,515,480,530,555,530]],[68,73,-10,0,0,0,[595,190,645,190]],[68,74,-10,0,0,0,[595,190,595,250,645,250]],[68,75,-10,0,0,0,[595,190,595,310,645,310]],[66,76,-10,0,0,0,[435,190,485,190]],[66,77,-10,0,0,0,[435,190,435,250,485,250]],[66,78,-10,0,0,0,[435,190,435,310,485,310]],[66,79,-10,0,0,0,[435,190,435,370,485,370]],[66,80,-10,0,0,0,[435,190,435,430,485,430]],[67,81,-10,0,0,0,[515,190,565,190]],[67,82,-10,0,0,0,[515,190,515,250,565,250]],[67,83,-10,0,0,0,[515,190,515,310,565,310]],[67,84,-10,0,0,0,[515,190,515,370,565,370]],[67,85,-10,0,0,0,[515,190,515,430,565,430]]],"vp":[0.0,0.0,680.0,1150.0]}} - *

- *

- * Example layout with an aspect ratio of 0.5 - *

- *

- * Concept - *

- *

- * The layout algorithm starts from the root and recursively assigns coordinates to all tree nodes. In this manner, leaf - * nodes will be placed first, while each parent node is placed centered above its child nodes. - *

- *

- * Features - *

- *

- * The aspect ratio of each subtree can be specified individually. A {@link yfiles.algorithms.IDataProvider} registered with {@link yfiles.tree.AspectRatioTreeLayout#SUBTREE_ASPECT_RATIO_DP_KEY} - * returns the aspect ratio for each local root node. - *

- *

- * A custom node can be defined as root of the tree using a {@link yfiles.algorithms.IDataProvider} registered with the graph with - * key {@link yfiles.tree.AspectRatioTreeLayout#SELECTED_ROOT_DP_KEY}. - *

- * @class - * @extends {yfiles.layout.MultiStageLayout} - */ - export interface AspectRatioTreeLayout extends yfiles.layout.MultiStageLayout{} - export class AspectRatioTreeLayout { - /** - * Creates a new {@link yfiles.tree.AspectRatioTreeLayout} instance with default settings. - */ - constructor(); - /** - * Adds bends to the given {@link yfiles.layout.IEdgeLayout}. - *

- * This method is called by {@link yfiles.tree.AspectRatioTreeLayout#applyLayoutCore} for each edge, after the nodes are placed, to - * route the path of the edges. It may be overridden to apply a custom routing style. - *

- * @param edgeLayout the layout of the edge that is routed - * @param localRoot the local root of the subtree - * @param child the child connected to the local root with the given edge - * @param rootPlacement the placement specifier of the local root - * @param routingPolicy the direction specifier for the routing - * @protected - */ - createBends(edgeLayout:yfiles.layout.IEdgeLayout,localRoot:yfiles.algorithms.Node,child:yfiles.algorithms.Node,rootPlacement:yfiles.tree.RootPlacement,routingPolicy:yfiles.tree.SubtreeArrangement):void; - /** - * Retrieves the aspect ratio for the subtree that is rooted at the given node. - *

- * If there is an individual aspect ratio for the subtree provided by a {@link yfiles.algorithms.IDataProvider} registered with key - * {@link yfiles.tree.AspectRatioTreeLayout#SUBTREE_ASPECT_RATIO_DP_KEY}, that ratio will be returned. Otherwise, the {@link yfiles.tree.AspectRatioTreeLayout#aspectRatio default aspect ratio} - * will be returned. - *

- *

- * This method is called by {@link yfiles.tree.AspectRatioTreeLayout#applyLayoutCore} before a subtree is arranged. It may be - * overridden to use another approach to define the aspect ratio for subtrees. - *

- * @param localRoot the root node of the subtree - * @returns the aspect ratio of the subtree rooted at the local root node - * @see yfiles.tree.AspectRatioTreeLayout#SUBTREE_ASPECT_RATIO_DP_KEY - * @see yfiles.tree.AspectRatioTreeLayout#aspectRatio - * @protected - */ - getAspectRatio(localRoot:yfiles.algorithms.Node):number; - /** - * Retrieves the root placement for the subtree that is rooted at the given node. - *

- * Either an individual root placement for the subtree (defined via a {@link yfiles.algorithms.IDataProvider} registered with - * {@link yfiles.tree.AspectRatioTreeLayout#ROOT_PLACEMENT_DP_KEY}), or if there is none, the {@link yfiles.tree.AspectRatioTreeLayout#rootPlacement default root placement} is returned. - *

- *

- * This method is called by {@link yfiles.tree.AspectRatioTreeLayout#applyLayoutCore} after a subtree is arranged to align the - * local root node. It may be overridden to use another approach to define the root placement for a subtree. - *

- * @param localRoot the root of the subtree - * @returns the root placement of the subtree - * @see yfiles.tree.AspectRatioTreeLayout#ROOT_PLACEMENT_DP_KEY - * @see yfiles.tree.AspectRatioTreeLayout#rootPlacement - * @protected - */ - getRootPlacement(localRoot:any):yfiles.tree.RootPlacement; - /** - * Retrieves the routing for the subtree that is rooted at the given node. - *

- * Either an individual routing for the subtree (defined via a {@link yfiles.algorithms.IDataProvider} registered with - * {@link yfiles.tree.AspectRatioTreeLayout#SUBTREE_ROUTING_POLICY_DP_KEY}), or if there is none, the {@link yfiles.tree.AspectRatioTreeLayout#subtreeArrangement default routing} is returned. - *

- *

- * This method is called by {@link yfiles.tree.AspectRatioTreeLayout#applyLayoutCore} to determine the direction of the subtrees. - * It may be overridden to use another approach to define the routing for a subtree. - *

- * @param localRoot the root of the subtree - * @returns the routing policy for the subtree - * @see yfiles.tree.AspectRatioTreeLayout#SUBTREE_ROUTING_POLICY_DP_KEY - * @see yfiles.tree.AspectRatioTreeLayout#subtreeArrangement - * @protected - */ - getSubtreeArrangement(localRoot:any):yfiles.tree.SubtreeArrangement; - /** - * Retrieves all children of the given local root. - *

- * This method is called by {@link yfiles.tree.AspectRatioTreeLayout#applyLayoutCore} to arrange the subtrees below the local - * root. - *

- * @param localRoot the root of a subtree - * @returns all successors of the given node - * @protected - */ - getSuccessors(localRoot:yfiles.algorithms.Node):yfiles.algorithms.INodeCursor; - /** - * Data provider key for specifying a target aspect ratio for each subtree - *

- * The aspect ratio needs to be greater than 0. - *

- *
    - *
  • aspect ratio 1: width and height of the layout should be the same
  • - *
  • aspect ratio between 0 and 1: the height of the layout should be greater than its width
  • - *
  • aspect ratio greater than 1: the width of the layout should be greater than its height
  • - *
- *

- * If no specific ratio is defined for a subtree, the layout algorithm falls back to the default {@link yfiles.tree.AspectRatioTreeLayout#aspectRatio aspect ratio}. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static SUBTREE_ASPECT_RATIO_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for specifying the placement of each subtree root - *

- * If no root placement is specified for one of the subtree roots, the default {@link yfiles.tree.AspectRatioTreeLayout#rootPlacement root placement} will be used. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static ROOT_PLACEMENT_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for specifying the routing direction for each subtree root - *

- * The children in a subtree are arranged either horizontally or vertically. The edges are routed to the top of the child - * nodes or at the side, respectively. Directions depend on the {@link yfiles.layout.MultiStageLayout#layoutOrientation layout orientation} and refer to {@link yfiles.layout.LayoutOrientation#TOP_TO_BOTTOM} - * for this description. - *

- *

- * If no specific routing policy is specified for a subtree root, the layout algorithm uses the default {@link yfiles.tree.AspectRatioTreeLayout#subtreeArrangement routing direction}. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static SUBTREE_ROUTING_POLICY_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for marking the node that will be used as root node of the tree - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static SELECTED_ROOT_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * The input graph this algorithm is handling. - * @protected - * @type {yfiles.layout.LayoutGraph} - */ - graph:yfiles.layout.LayoutGraph; - /** - * Gets or sets the horizontal distance between adjacent nodes. - *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @type {number} - */ - horizontalDistance:number; - /** - * Gets or sets the vertical distance between adjacent nodes. - *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @type {number} - */ - verticalDistance:number; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for arranging the components of the graph is activated. - * @see yfiles.layout.MultiStageLayout#componentLayoutEnabled - * @see yfiles.layout.MultiStageLayout#componentLayout - * @see yfiles.layout.ComponentLayout - * @type {boolean} - */ - componentLayoutEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for hiding group nodes is activated. - * @see yfiles.layout.MultiStageLayout#hideGroupsStageEnabled - * @see yfiles.layout.MultiStageLayout#hideGroupsStage - * @see yfiles.layout.HideGroupsStage - * @type {boolean} - */ - hideGroupsStageEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing parallel edges is activated. - * @see yfiles.layout.MultiStageLayout#parallelEdgeRouterEnabled - * @see yfiles.layout.MultiStageLayout#parallelEdgeRouter - * @see yfiles.router.ParallelEdgeRouter - * @type {boolean} - */ - parallelEdgeRouterEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing self-loops is activated. - * @see yfiles.layout.MultiStageLayout#selfLoopRouterEnabled - * @see yfiles.layout.MultiStageLayout#selfLoopRouter - * @see yfiles.layout.SelfLoopRouter - * @type {boolean} - */ - selfLoopRouterEnabled:boolean; - /** - * Gets or sets the {@link yfiles.collections.IComparer.} that will be used for sorting the {@link yfiles.algorithms.Node#sortOutEdges outgoing edges} of each local root in the tree before they are being - * arranged. - * @type {yfiles.collections.IComparer.} - */ - comparer:yfiles.collections.IComparer; - /** - * Gets or sets the default aspect ratio for this {@link yfiles.tree.AspectRatioTreeLayout}. - *

- * This aspect ratio is used for all subtrees for which there is no specific aspect ratio defined in a {@link yfiles.algorithms.IDataProvider} - * registered with {@link yfiles.tree.AspectRatioTreeLayout#SUBTREE_ASPECT_RATIO_DP_KEY}. - *

- *

- * The aspect ratio needs to have a positive value. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified aspect ratio is 0 or negative - * @type {number} - */ - aspectRatio:number; - /** - * Gets or sets the desired placement of the tree's root node. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown placement specifiers is set - * @type {yfiles.tree.RootPlacement} - */ - rootPlacement:yfiles.tree.RootPlacement; - /** - * Gets or sets how the children of a local root are arranged and how the edges between them are routed. - * @throws {Stubs.Exceptions.ArgumentError} if the specified routing policy is unknown - * @type {yfiles.tree.SubtreeArrangement} - */ - subtreeArrangement:yfiles.tree.SubtreeArrangement; - /** - * Gets or sets the preferred distance between any two bends of an edge. - *

- * Additionally, the preferred bend distance governs the distance between the first and last edges and the corresponding - * ports. - *

- *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @type {number} - */ - bendDistance:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.AspectRatioTreeLayout; - } - /** - * The {@link yfiles.tree.AssistantNodePlacer} places nodes that are marked as assistants left and right of their parents and all - * other nodes below the assistant nodes. - *

- * Layout Style {@graph {"ann":{"s":[30,30],"d":1},"n":[[75,0],[100,171],[50,171],[0,171],[150,171],[110,50,1],[40,100,1],[40,50,1]],"e":[[0,1,[90,150.5,115,150.5]],[0,2,[90,150.5,65,150.5]],[0,3,[90,150.5,15,150.5]],[0,4,[90,150.5,165,150.5]],[0,5,[90,65]],[0,6,[90,115]],[0,7,[90,65]]],"vp":[0.0,0.0,180.0,201.0]}} - *

- *

- * Assistants are marked - *

- *

- * Concept This {@link yfiles.tree.INodePlacer} delegates the placement of all assistant nodes to an instance of - * {@link yfiles.tree.LeftRightNodePlacer}. The non-assistant nodes are handled by another {@link yfiles.tree.AssistantNodePlacer#childNodePlacer node placer}. To be able to do this, {@link yfiles.tree.AssistantNodePlacer} - * uses a {@link yfiles.tree.IProcessor} which prepares the graph for node placing. - *

- *

- * A {@link yfiles.algorithms.IDataProvider} that is registered using {@link yfiles.tree.AssistantNodePlacer#ASSISTANT_NODE_DP_KEY} returns - * true for assistant nodes and false for all other nodes. - *

- * @class - * @extends {yfiles.tree.RotatableNodePlacerBase} - */ - export interface AssistantNodePlacer extends yfiles.tree.RotatableNodePlacerBase{} - export class AssistantNodePlacer { - /** - * Creates a new {@link yfiles.tree.AssistantNodePlacer} instance that uses the transformation defined by the given matrix. - * @param modificationMatrix the transformation matrix - */ - constructor(modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix); - /** - * Creates a new {@link yfiles.tree.AssistantNodePlacer} instance with default settings. - */ - constructor(); - /** - * Creates a {@link yfiles.collections.IComparer.} that compares outgoing edges connecting to assistant nodes and edges connecting to non-assistant nodes - * separately. - * @param assistantComparer the {@link } for edges connecting to assistant nodes - * @param childComparer the {@link } for edges connecting to non-assistant nodes - * @returns a {@link } that compares edges to assistant nodes separately from edges to non-assistant nodes - * @static - */ - static createCompoundComparer(assistantComparer:yfiles.collections.IComparer,childComparer:yfiles.collections.IComparer):yfiles.collections.IComparer; - /** - * Data provider key for marking which nodes are placed as assistants - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static ASSISTANT_NODE_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets or sets the spacing between subtrees for the delegate {@link yfiles.tree.INodePlacer}. - *

- * The spacing needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given spacing is negative - * @type {number} - */ - spacing:number; - /** - * Gets or sets the {@link yfiles.tree.INodePlacer} instance that places the non-assistant children. - *

- * These non-assistant child nodes will be placed below the assistant child nodes and are arranged by the given - * {@link yfiles.tree.INodePlacer}. Non-assistant child nodes are the ones that are not marked in the {@link yfiles.algorithms.IDataProvider} - * registered with {@link yfiles.tree.AssistantNodePlacer#ASSISTANT_NODE_DP_KEY}. - *

- * @see yfiles.tree.AssistantNodePlacer#ASSISTANT_NODE_DP_KEY - * @type {yfiles.tree.INodePlacer} - */ - childNodePlacer:yfiles.tree.INodePlacer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.AssistantNodePlacer; - } - /** - * The {@link yfiles.tree.BusNodePlacer} creates a bus to which all child nodes and the local root node are connected. - *

- * Layout Style {@graph {"ann":{"s":[30,30],"d":1},"n":[[40,0],[140,0],[190,0],[50,70],[0,70],[100,70],[150,70],[90,0,1]],"e":[[7,0,[105,50,55,50]],[7,1,[105,50,155,50]],[7,2,[105,50,205,50]],[7,3,[105,50,65,50]],[7,4,[105,50,15,50]],[7,5,[105,50,115,50]],[7,6,[105,50,165,50]]],"vp":[0.0,0.0,220.0,100.0]}} - *

- *

- * The root node is marked - *

- * @class - * @extends {yfiles.tree.RotatableNodePlacerBase} - */ - export interface BusNodePlacer extends yfiles.tree.RotatableNodePlacerBase{} - export class BusNodePlacer { - /** - * Creates a new {@link yfiles.tree.BusNodePlacer} instance that uses the transformation defined by the given matrix. - * @param modificationMatrix the transformation matrix - */ - constructor(modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix); - /** - * Creates a new instance of {@link yfiles.tree.BusNodePlacer} with default settings. - */ - constructor(); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.BusNodePlacer; - } - /** - * This layout algorithm arranges graphs with a tree structure. - *

- * Layout Style {@link yfiles.tree.ClassicTreeLayout} is designed to arrange directed and undirected trees that have a unique root node. All - * children are placed below their parent in relation to the main layout direction. The edges of the graph are routed as - * straight-line segments or in an orthogonal bus-like fashion. - *

- *

- * Tree layout algorithms are commonly used for visualizing relational data and for producing diagrams of high quality that - * are able to reveal possible hierarchic properties of the graph. More precisely, they find applications in dataflow - * analysis, software engineering, bioinformatics and business administration. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[215.62,70],[365.62,0],[706.25,210],[25,140],[331.25,140],[100,280],[512.5,210],[325,280],[762.5,280],[200,210],[150,350],[400,350],[825,350],[350,350],[25,210],[900,420],[700,420],[100,350],[575,280],[575,350],[600,420],[200,280],[150,420],[25,280],[550,420],[300,420],[850,420],[800,420],[400,420],[200,350],[350,420],[50,350],[500,420],[100,420],[750,420],[450,420],[0,420],[50,420],[200,420],[650,280],[250,420],[650,420],[650,350]],"e":[[1,0,0,15,0,-15,[230.62,50]],[1,2,0,15,0,-15,[721.25,50]],[1,3,0,15,0,-15,[40,50]],[0,4,0,15,0,-15,[346.25,120]],[0,5,0,15,0,-15,[115,120]],[4,6,0,15,0,-15,[527.5,190]],[4,7,0,15,0,-15,[340,190]],[2,8,0,15,0,-15,[777.5,260]],[4,9,0,15,0,-15,[215,190]],[4,10,0,15,0,-15,[165,190]],[7,11,0,15,0,-15,[415,330]],[8,12,0,15,0,-15,[840,330]],[7,13,0,15,0,-15,[365,330]],[3,14,0,15,0,-15],[12,15,0,15,0,-15,[915,400]],[8,16,0,15,0,-15,[715,330]],[5,17,0,15,0,-15],[6,18,0,15,0,-15,[590,260]],[18,19,0,15,0,-15],[19,20,0,15,0,-15,[615,400]],[9,21,0,15,0,-15],[10,22,0,15,0,-15],[14,23,0,15,0,-15],[19,24,0,15,0,-15,[565,400]],[7,25,0,15,0,-15,[315,330]],[12,26,0,15,0,-15,[865,400]],[12,27,0,15,0,-15,[815,400]],[11,28,0,15,0,-15],[21,29,0,15,0,-15],[13,30,0,15,0,-15],[23,31,0,15,0,-15,[65,330]],[6,32,0,15,0,-15,[515,260]],[17,33,0,15,0,-15],[12,34,0,15,0,-15,[765,400]],[6,35,0,15,0,-15,[465,260]],[23,36,0,15,0,-15,[15,330]],[31,37,0,15,0,-15],[29,38,0,15,0,-15],[2,39,0,15,0,-15,[665,260]],[7,40,0,15,0,-15,[265,330]],[39,42,0,15,0,-15],[42,41,0,15,0,-15]],"vp":[0.0,0.0,930.0,450.0]}} A Dendrogram {@graph {"ann":{"s":[30,30],"d":1},"n":[[983.12,0],[495,85],[495,170],[151.25,170],[495,240],[42.5,255],[85,325],[0,325],[520,310],[470,310],[520,380],[135,395],[470,380],[85,395],[520,450],[35,395],[185,240,265,270,2],[260,255],[320,325],[405,395],[320,395],[370,465],[320,465],[235,395],[270,465],[200,325],[570,155,560,510,2],[670,170],[1060,240],[670,240],[1060,310],[670,325],[585,240],[1085,380],[670,395],[670,465],[620,325],[1035,380],[720,310,295,340,2],[810,325],[920,395],[835,395],[920,465],[785,395],[835,465],[970,535],[920,535],[735,395],[735,465],[870,535],[920,605],[1150,70,440,495,2],[1471.25,85],[1545,155],[1397.5,155],[1510,240],[1435,240],[1460,310],[1360,240],[1460,380],[1485,450],[1410,310],[1360,310],[1435,450],[1510,310],[1360,380],[1435,520],[1165,225,175,230,2],[1230,240],[1280,310],[1230,310],[1180,310],[1265,380,60,60,2],[1280,395]],"e":[[0,1,[998.12,50,510,50]],[1,2],[1,3,[510,135,166.25,135]],[2,4],[3,5,[166.25,220,57.5,220]],[5,6,[57.5,305,100,305]],[5,7,[57.5,305,15,305]],[4,8,[510,290,535,290]],[4,9,[510,290,485,290]],[8,10],[6,11,[100,375,150,375]],[9,12],[6,13],[10,14],[6,15,[100,375,50,375]],[3,17,[166.25,220,275,220]],[17,18,[275,305,335,305]],[18,19,[335,375,420,375]],[18,20],[20,21,[335,445,385,445]],[20,22],[18,23,[335,375,250,375]],[20,24,[335,445,285,445]],[17,25,[275,305,215,305]],[1,27,[510,135,685,135]],[27,28,[685,220,1075,220]],[27,29],[28,30],[29,31],[27,32,[685,220,600,220]],[30,33,[1075,360,1100,360]],[31,34],[34,35],[29,36,[685,290,635,290]],[30,37,[1075,360,1050,360]],[29,39,[685,290,825,290]],[39,40,[825,375,935,375]],[39,41,[825,375,850,375]],[40,42],[39,43,[825,375,800,375]],[41,44],[42,45,[935,515,985,515]],[42,46],[39,47,[825,375,750,375]],[47,48],[42,49,[935,515,885,515]],[46,50],[0,52,[998.12,50,1486.25,50]],[52,53,[1486.25,135,1560,135]],[52,54,[1486.25,135,1412.5,135]],[54,55,[1412.5,205,1525,205]],[54,56,[1412.5,205,1450,205]],[56,57,[1450,290,1475,290]],[54,58,[1412.5,205,1375,205]],[57,59],[59,60,[1475,430,1500,430]],[56,61,[1450,290,1425,290]],[58,62],[59,63,[1475,430,1450,430]],[55,64],[62,65],[63,66],[54,68,[1412.5,205,1245,205]],[68,69,[1245,290,1295,290]],[68,70],[68,71,[1245,290,1195,290]],[69,73]],"vp":[0.0,0.0,1590.0,665.0]}} A graph containing group nodes {@graph {"ann":{"s":[30,30],"d":1},"n":[[4.33,440.22],[74.33,418.34,73.78,73.78],[188.11,41,48,48],[197.11,417.95],[298,245.33],[298,445.67],[389.89,393.78,73.78,73.78],[411.78,146.89],[298,25],[411.78,243.78],[411.78,293.78],[298,590.56],[503.67,100,73.78,73.78],[197.11,708.56],[188.11,821.45,48,48],[525.56,415.67],[525.56,243.78],[399.84,13.06,53.88,53.88],[276.11,661.67,73.78,73.78],[411.78,343.78],[411.78,497.56],[402.78,547.56,48,48],[402.78,615.56,48,48],[298,755.45],[525.56,472.56],[525.56,293.78],[629.39,243.78],[525.56,0],[525.56,50],[525.56,522.56],[298,805.45],[617.45,485.62,53.88,53.88],[629.39,50],[411.78,755.45],[711.33,38.06,53.88,53.88],[629.39,559.5],[298,75],[411.78,683.56],[525.56,599.56],[411.78,805.45],[723.27,559.5],[629.39,293.78],[525.56,193.78],[723.27,497.56],[298,855.45],[525.56,649.56]],"e":[[0,1],[1,2,[168.11,455.22,168.11,65]],[1,3,[168.11,455.22,168.11,432.95]],[3,4,[256.11,432.95,256.11,260.33]],[3,5,[256.11,432.95,256.11,460.67]],[5,6,[369.89,460.67,369.89,430.67]],[4,7,[369.89,260.33,369.89,161.89]],[2,8,[256.11,65,256.11,40]],[4,9,[369.89,260.33,369.89,258.78]],[4,10,[369.89,260.33,369.89,308.78]],[3,11,[256.11,432.95,256.11,605.56]],[7,12,[483.67,161.89,483.67,136.89]],[1,13,[168.11,455.22,168.11,723.56]],[1,14,[168.11,455.22,168.11,845.45]],[6,15],[9,16],[8,17],[13,18,[256.11,723.56,256.11,698.56]],[4,19,[369.89,260.33,369.89,358.78]],[5,20,[369.89,460.67,369.89,512.56]],[11,21,[369.89,605.56,369.89,571.56]],[11,22,[369.89,605.56,369.89,639.56]],[13,23,[256.11,723.56,256.11,770.45]],[20,24,[483.67,512.56,483.67,487.56]],[10,25],[16,26],[17,27,[483.67,40,483.67,15]],[17,28,[483.67,40,483.67,65]],[20,29,[483.67,512.56,483.67,537.56]],[14,30,[256.11,845.45,256.11,820.45]],[29,31,[597.45,537.56,597.45,512.56]],[28,32],[23,33],[32,34],[29,35,[597.45,537.56,597.45,574.5]],[2,36,[256.11,65,256.11,90]],[18,37],[22,38,[483.67,639.56,483.67,614.56]],[30,39],[35,40],[25,41],[7,42,[483.67,161.89,483.67,208.78]],[31,43],[14,44,[256.11,845.45,256.11,870.45]],[22,45,[483.67,639.56,483.67,664.56]]],"vp":[4.0,0.0,762.0,886.0]}} Left-to-right layout with global layeringConcept - *

- *

- * The layout algorithm starts from the root and recursively assigns coordinates to all tree nodes. In this manner, leaf - * nodes will be placed first, while each parent node is placed centered above its children. - *

- *

- * Features - *

- *

- * The layout algorithm supports custom sorting of sibling nodes by using a specific {@link yfiles.tree.NodeOrderComparer}. Each - * tree node may have an individual {@link yfiles.tree.NodeOrderComparer} that is stored in a {@link yfiles.algorithms.IDataProvider} - * registered with the graph with {@link yfiles.tree.NodeOrderComparer#NODE_ORDER_COMPARABLE_DP_KEY}. If this {@link yfiles.tree.NodeOrderComparer} - * uses the initial coordinates of the nodes, it allows the incremental insertion of child nodes while keeping the relative - * locations of the other nodes. - *

- *

- * A custom node can be defined as root of the tree using a {@link yfiles.algorithms.IDataProvider} registered with the graph with - * key {@link yfiles.tree.ClassicTreeLayout#SELECTED_ROOT_DP_KEY}. - *

- *

- * {@link yfiles.tree.ClassicTreeLayout} can be configured to {@link yfiles.tree.ClassicTreeLayout#considerNodeLabels reserve space for node labels}. It can also {@link yfiles.tree.ClassicTreeLayout#integratedEdgeLabeling place edge labels along edges} - * such that the labels won't overlap with other graph elements. Edge labels are placed according to the information stored - * in a {@link yfiles.layout.PreferredPlacementDescriptor} instance. However, the placement along the edge will only affect the - * order of multiple labels at the same edge. The algorithm will always place the labels close to the target node. - *

- *

- * Grouping of nodes can also be handled by this layout algorithm. It is important that a group node contains a whole - * subtree. Otherwise, the group nodes may overlap with each other or with other nodes. Furthermore, the user may specify - * minimum size constraints for each group node using {@link yfiles.algorithms.IDataProvider} key - * {@link yfiles.layout.GroupingKeys#MINIMUM_NODE_SIZE_DP_KEY}. - *

- *

- * This layout algorithm can only handle graphs with a tree structure. To apply it to a general graph, a {@link yfiles.tree.TreeReductionStage} - * can be appended. This stage will temporarily remove some edges of the input graph until a tree is obtained. After the - * layout calculation, the stage will reinsert the edges that were removed and route them separately. - *

- * @class - * @extends {yfiles.layout.MultiStageLayout} - */ - export interface ClassicTreeLayout extends yfiles.layout.MultiStageLayout{} - export class ClassicTreeLayout { - /** - * Creates a new {@link yfiles.tree.ClassicTreeLayout} instance with default settings. - */ - constructor(); - /** - * Data provider key for marking the node that will be used as root node of the tree - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static SELECTED_ROOT_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets or sets whether or not a global layering is enforced, that is, each node spans exactly one layer. - *

- * If it is enabled, the algorithm ensures that nodes never span more than one layer. Otherwise, nodes with larger size - * might span two or more layers such that a more compact layout is produced. - *

- *

- * This setting can be advantageous, if the hierarchical structure of the tree should be emphasized. - *

- * @see yfiles.tree.ClassicTreeLayout#verticalAlignment - * @see yfiles.tree.ClassicTreeLayout#verticalAlignment - * @type {boolean} - */ - enforceGlobalLayering:boolean; - /** - * Gets or sets the layout policy for leaf nodes. - * @throws {Stubs.Exceptions.ArgumentError} if the specified policy is unknown - * @type {yfiles.tree.LeafPlacement} - */ - leafPlacement:yfiles.tree.LeafPlacement; - /** - * Gets or sets whether or not group nodes are handled by the layout algorithm. - * @see yfiles.layout.MultiStageLayout#hideGroupsStageEnabled - * @type {boolean} - */ - groupingSupported:boolean; - /** - * Gets or sets the {@link yfiles.collections.IComparer.} instance that is used for sorting the outgoing edges of each node of the tree. - *

- * This comparator defines the relative order of the child nodes in the layout. - *

- * @type {yfiles.collections.IComparer.} - */ - comparer:yfiles.collections.IComparer; - /** - * Gets or sets the port assignment policy that will be applied. - * @type {yfiles.tree.PortStyle} - */ - portStyle:yfiles.tree.PortStyle; - /** - * Gets or sets the edge routing style used by this layout algorithm. - *

- * If {@link yfiles.tree.EdgeRoutingStyle#PLAIN} is set, the edges will be routed as straight-line segments. If {@link yfiles.tree.EdgeRoutingStyle#ORTHOGONAL} - * is set, all edges will be routed orthogonally in a bus-like fashion. - *

- * @throws {Stubs.Exceptions.ArgumentError} if an invalid layout style is provided - * @type {yfiles.tree.EdgeRoutingStyle} - */ - edgeRoutingStyle:yfiles.tree.EdgeRoutingStyle; - /** - * Gets or sets the minimum horizontal distance between adjacent nodes within the same layer. - * @throws {Stubs.Exceptions.ArgumentError} if the given distance is negative - * @type {number} - */ - minimumNodeDistance:number; - /** - * Gets or sets the minimum distance between two adjacent layers. - * @throws {Stubs.Exceptions.ArgumentError} if the given distance is negative - * @type {number} - */ - minimumLayerDistance:number; - /** - * Gets or sets whether or not the layout algorithm reserves space for node labels. - * @type {boolean} - */ - considerNodeLabels:boolean; - /** - * Gets or sets whether or not the layout algorithm reserves space for edge labels and places them. - *

- * To define the desired placement for each label add a {@link yfiles.layout.PreferredPlacementDescriptor} on - * {@link yfiles.layout.IEdgeLabelLayout}. - *

- *

- * This method is a convenience method that assures that the {@link yfiles.layout.MultiStageLayout#labeling label layouter} is of type {@link yfiles.layout.LabelLayoutTranslator} - * and {@link yfiles.layout.LabelLayoutTranslator#translateEdgeLabels} is set to true. - *

- * @type {boolean} - */ - integratedEdgeLabeling:boolean; - /** - * Gets or sets the vertical bus alignment for orthogonally routed edge buses. - *

- * The bus alignment determines the relative position of an edge bus between two subsequent layers. The value of this - * property must lie within the interval [0,1] where: - *

- *
    - *
  • A value of 0 places the bus at the top, directly below the parent node.
  • - *
  • A value of 0.5 places the bus in the middle between parent and child nodes.
  • - *
  • A value of 1 places the bus at the bottom, directly above the child nodes.
  • - *
- * @throws {Stubs.Exceptions.ArgumentError} if busAlignment is not in [0,1] - * @see yfiles.tree.ClassicTreeLayout#edgeRoutingStyle - * @see yfiles.tree.ClassicTreeLayout#enforceGlobalLayering - * @see yfiles.tree.ClassicTreeLayout#leafPlacement - * @type {number} - */ - busAlignment:number; - /** - * Gets or sets the vertical alignment of the nodes within their corresponding layers. - *

- * The value for the vertical alignment is considered as relative to the height of the corresponding layer, which is - * determined by the maximum height of the nodes that belong to the particular layer. - *

- *

- * The value of this property must lie within the interval [0,1], where: - *

- *
    - *
  • A value of 0 corresponds to top-alignment.
  • - *
  • A value of 0.5 corresponds to center-alignment.
  • - *
  • A value of 1 corresponds to bottom-alignment.
  • - *
- * @throws {Stubs.Exceptions.ArgumentError} if vertical alignment value does not lie within [0,1] - * @see yfiles.tree.ClassicTreeLayout#enforceGlobalLayering - * @type {number} - */ - verticalAlignment:number; - /** - * Gets or sets the modification matrix used for rotating / mirroring the layout. - * @type {yfiles.tree.RotatableNodePlacerMatrix} - */ - modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for arranging the components of the graph is activated. - * @see yfiles.layout.MultiStageLayout#componentLayoutEnabled - * @see yfiles.layout.MultiStageLayout#componentLayout - * @see yfiles.layout.ComponentLayout - * @type {boolean} - */ - componentLayoutEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing parallel edges is activated. - * @see yfiles.layout.MultiStageLayout#parallelEdgeRouterEnabled - * @see yfiles.layout.MultiStageLayout#parallelEdgeRouter - * @see yfiles.router.ParallelEdgeRouter - * @type {boolean} - */ - parallelEdgeRouterEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing self-loops is activated. - * @see yfiles.layout.MultiStageLayout#selfLoopRouterEnabled - * @see yfiles.layout.MultiStageLayout#selfLoopRouter - * @see yfiles.layout.SelfLoopRouter - * @type {boolean} - */ - selfLoopRouterEnabled:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.ClassicTreeLayout; - } - /** - * {@link yfiles.tree.DefaultNodePlacer} is the default implementation of interface {@link yfiles.tree.INodePlacer}. - *

- * Layout Style The layout style can be customized in several ways. Subtrees sharing the same local root node are either placed above - * or below each other. {@graph {"ann":{"s":[30,30],"d":1},"n":[[135,0],[0,70],[70,70],[120,149],[170,149],[220,149],[270,149],[70,199],[120,278],[170,278],[220,278],[270,278]],"e":[[0,1,0,15,0,0,[150,50,15,50]],[1,2],[2,3,-11.25,15,0,0,[73.75,116,135,133]],[2,4,-3.75,15,0,0,[81.25,116,185,133]],[2,5,3.75,15,0,0,[88.75,116,235,133]],[2,6,11.25,15,0,0,[96.25,116,285,133]],[1,7,[50,85,50,214]],[7,8,-11.25,15,0,0,[73.75,245,135,262]],[7,9,-3.75,15,0,0,[81.25,245,185,262]],[7,10,3.75,15,0,0,[88.75,245,235,262]],[7,11,11.25,15,0,0,[96.25,245,285,262]]],"vp":[0.0,0.0,300.0,308.0]}} - *

- *

- * Each layer in the tree uses different configurations of {@link yfiles.tree.DefaultNodePlacer} - *

- *

- * Features - *

- *

- * {@link yfiles.tree.SubtreeShape}s can be arranged in each main direction specified in - * {@link yfiles.tree.DefaultNodePlacer#childPlacement}. That way, the subtrees of the same graph can have different directions. - *

- *

- * This node placer aligns the local root node according to a chosen {@link yfiles.tree.DefaultNodePlacer#rootAlignment alignment}. - *

- *

- * There are various {@link yfiles.tree.DefaultNodePlacer#routingStyle routing styles} that result in different edge routes. - *

- * @class - * @extends {yfiles.tree.NodePlacerBase} - * @implements {yfiles.tree.IFromSketchNodePlacer} - * @implements {yfiles.lang.ICloneable} - */ - export interface DefaultNodePlacer extends yfiles.tree.NodePlacerBase,yfiles.tree.IFromSketchNodePlacer,yfiles.lang.ICloneable{} - export class DefaultNodePlacer { - /** - * Creates a new {@link yfiles.tree.DefaultNodePlacer} instance with custom settings. - * @param childPlacement the child placement specifier describing the style of the arrangement - * @param rootAlignment the alignment specifier describing how the root node is aligned with its child nodes - * @param routingStyle the routing style specifier - * @param verticalDistance the vertical distance between the {@link }s - * @param horizontalDistance the horizontal distance between the {@link }s - * @param minFirstSegmentLength the minimum length of the first edge segment (connected to the root node) - * @param minLastSegmentLength the minimum length of the last edge segment (connected to the child node) - * @param minSlope the minimum slope between the root node and the {@link }s - * @param minSlopeHeight the minimum vertical height of sloped edge segments - * @throws {Stubs.Exceptions.ArgumentError} if the placement specifier or the root alignment or the routing style is unknown or if the horizontal/vertical distance - * or the minimum first/last segment length or the minimum slope or the minimum vertical height is negative - * @see yfiles.tree.DefaultNodePlacer#childPlacement - * @see yfiles.tree.DefaultNodePlacer#rootAlignment - * @see yfiles.tree.DefaultNodePlacer#routingStyle - * @see yfiles.tree.DefaultNodePlacer#verticalDistance - * @see yfiles.tree.DefaultNodePlacer#horizontalDistance - * @see yfiles.tree.DefaultNodePlacer#minimumFirstSegmentLength - * @see yfiles.tree.DefaultNodePlacer#minimumLastSegmentLength - * @see yfiles.tree.DefaultNodePlacer#minimumSlope - * @see yfiles.tree.DefaultNodePlacer#minimumSlopeHeight - */ - constructor(childPlacement:yfiles.tree.ChildPlacement,rootAlignment:yfiles.tree.RootAlignment,routingStyle:yfiles.tree.RoutingStyle,verticalDistance:number,horizontalDistance:number,minFirstSegmentLength:number,minLastSegmentLength:number,minSlope:number,minSlopeHeight:number); - /** - * Creates a new {@link yfiles.tree.DefaultNodePlacer} instance with customized {@link yfiles.tree.DefaultNodePlacer#childPlacement child placement}, {@link yfiles.tree.DefaultNodePlacer#rootAlignment root alignment}, {@link yfiles.tree.DefaultNodePlacer#routingStyle routing style}, {@link yfiles.tree.DefaultNodePlacer#verticalDistance vertical} - * and {@link yfiles.tree.DefaultNodePlacer#horizontalDistance horizontal distance}. - * @param childPlacement the child placement specifier describing the style of the arrangement - * @param rootAlignment the alignment specifier describing how the root node is aligned with its child nodes - * @param routingStyle the routing style specifier - * @param verticalDistance the vertical distance between the {@link }s - * @param horizontalDistance the horizontal distance between the {@link }s - * @throws {Stubs.Exceptions.ArgumentError} if the placement specifier or the root alignment or the routing style is unknown or if the horizontal/vertical distance - * is negative - * @see yfiles.tree.DefaultNodePlacer#childPlacement - * @see yfiles.tree.DefaultNodePlacer#rootAlignment - * @see yfiles.tree.DefaultNodePlacer#routingStyle - * @see yfiles.tree.DefaultNodePlacer#verticalDistance - * @see yfiles.tree.DefaultNodePlacer#horizontalDistance - */ - constructor(childPlacement:yfiles.tree.ChildPlacement,rootAlignment:yfiles.tree.RootAlignment,routingStyle:yfiles.tree.RoutingStyle,verticalDistance:number,horizontalDistance:number); - /** - * Creates a new {@link yfiles.tree.DefaultNodePlacer} instance with customized {@link yfiles.tree.DefaultNodePlacer#childPlacement child placement}, {@link yfiles.tree.DefaultNodePlacer#rootAlignment root alignment}, {@link yfiles.tree.DefaultNodePlacer#verticalDistance vertical} and - * {@link yfiles.tree.DefaultNodePlacer#horizontalDistance horizontal distance}. - * @param childPlacement the child placement specifier describing the style of the arrangement - * @param rootAlignment the alignment specifier describing how the root node is aligned with its child nodes - * @param verticalDistance the vertical distance between the {@link }s - * @param horizontalDistance the horizontal distance between the {@link }s - * @throws {Stubs.Exceptions.ArgumentError} if the placement specifier or the root alignment specifier is unknown or if the horizontal/vertical distance is - * negative - * @see yfiles.tree.DefaultNodePlacer#childPlacement - * @see yfiles.tree.DefaultNodePlacer#rootAlignment - * @see yfiles.tree.DefaultNodePlacer#verticalDistance - * @see yfiles.tree.DefaultNodePlacer#horizontalDistance - */ - constructor(childPlacement:yfiles.tree.ChildPlacement,rootAlignment:yfiles.tree.RootAlignment,verticalDistance:number,horizontalDistance:number); - /** - * Creates a new {@link yfiles.tree.DefaultNodePlacer} instance with customized {@link yfiles.tree.DefaultNodePlacer#childPlacement child placement}, {@link yfiles.tree.DefaultNodePlacer#verticalDistance vertical} and {@link yfiles.tree.DefaultNodePlacer#horizontalDistance horizontal distance}. - * @param childPlacement the child placement specifier describing the style of the arrangement - * @param verticalDistance the vertical distance between the {@link }s - * @param horizontalDistance the horizontal distance between the {@link }s - * @throws {Stubs.Exceptions.ArgumentError} if the placement specifier is unknown or if the horizontal/vertical distance is negative - * @see yfiles.tree.DefaultNodePlacer#childPlacement - * @see yfiles.tree.DefaultNodePlacer#verticalDistance - * @see yfiles.tree.DefaultNodePlacer#horizontalDistance - */ - constructor(childPlacement:yfiles.tree.ChildPlacement,verticalDistance:number,horizontalDistance:number); - /** - * Creates a new {@link yfiles.tree.DefaultNodePlacer} instance with default settings. - */ - constructor(); - /** - * Calculates the bends for the connector to the parent node. - *

- * This implementation adds bends to the connector for edges that route the edges around the child node in case there are - * {@link yfiles.layout.PortConstraint}s that conflict with the direction of the {@link yfiles.tree.DefaultNodePlacer#childPlacement child placement}. - *

- *

- * This method is called in {@link yfiles.tree.DefaultNodePlacer#placeSubtreeOfNode} to route the edges after the - * {@link yfiles.tree.SubtreeShape}s are arranged. It may be overridden to customize the routing style. - *

- * @param graph the input graph - * @param localRoot the local root node whose connector is calculated and stored in the given subtree shape - * @param rootLayout the {@link } of the root node - * @param subtreeShape the shape of the whole subtree of the local root - * @param parentEdge the incoming edge of the local root node that will be the connector for the given subtree shape - * @param parentEdgeLayout the current {@link } of the connector edge - * @param direction the direction specifier as defined in the {@link } interface which should be used for the connector - * @see yfiles.tree.NodePlacerBase#determineChildConnectors - * @protected - */ - calculateParentConnector(graph:yfiles.layout.LayoutGraph,localRoot:yfiles.algorithms.Node,rootLayout:yfiles.layout.INodeLayout,subtreeShape:yfiles.tree.SubtreeShape,parentEdge:yfiles.algorithms.Edge,parentEdgeLayout:yfiles.layout.IEdgeLayout,direction:number):void; - /** - * Calculates the routing of the source side of the edge to the given child node. - *

- * This method delegates to {@link yfiles.tree.DefaultNodePlacer#calculateSourceEdgeLayout} if the {@link yfiles.tree.DefaultNodePlacer#routingStyle routing style} is not - * {@link yfiles.tree.RoutingStyle#FORK}. It may be overridden to implement a custom routing style. - *

- * @param rootLayout the {@link } of the local root node - * @param childShape the {@link } instance of the corresponding child's subtree - * @param edge the edge - * @param rootForkCoordinate the y-coordinate of the first bend of the edge if the placement is horizontal, the x-coordinate otherwise - * @param childForkCoordinate the y-coordinate of the second (= last) bend of the edge if the placement is horizontal, the x-coordinate otherwise - * @protected - */ - calculateSlopedSourceEdgeLayout(rootLayout:yfiles.layout.INodeLayout,childShape:yfiles.tree.SubtreeShape,edge:yfiles.algorithms.Edge,childForkCoordinate:number,rootForkCoordinate:number):void; - /** - * Calculates the routing of the source side of the edge to the given child node. - *

- * This implementation adds bends to the {@link yfiles.layout.IEdgeLayout} of the given edge according to the specified {@link yfiles.tree.DefaultNodePlacer#routingStyle routing style} - * and {@link yfiles.tree.DefaultNodePlacer#childPlacement child placement}. It also updates the target points in the {@link yfiles.tree.SubtreeShape}. - *

- *

- * This method is called by {@link yfiles.tree.DefaultNodePlacer#calculateSlopedSourceEdgeLayout} to route the edges. It may be - * overridden to implement a custom edge routing style. - *

- * @param rootLayout the {@link } of the local root node - * @param childShape the {@link } of the child's subtree that is connected through the given edge - * @param edge the edge - * @protected - */ - calculateSourceEdgeLayout(rootLayout:yfiles.layout.INodeLayout,childShape:yfiles.tree.SubtreeShape,edge:yfiles.algorithms.Edge):void; - /** - * Calculates the routing of the target side of the edge to the given child node. - *

- * This implementation just resets the current {@link yfiles.layout.IEdgeLayout}. - *

- *

- * This method is called by {@link yfiles.tree.DefaultNodePlacer#placeSubtreeOfNode} after the {@link yfiles.tree.SubtreeShape shapes} of the local root's children - * are placed. It may be overridden to add some {@link yfiles.tree.SubtreeShape#addTargetPoint target points} to the edge. - *

- * @param rootLayout the {@link } of the local root node - * @param childShape the {@link } of the child's subtree that is connected through the given edge - * @param edge the edge - * @protected - */ - calculateTargetEdgeLayout(rootLayout:yfiles.layout.INodeLayout,childShape:yfiles.tree.SubtreeShape,edge:yfiles.algorithms.Edge):void; - /** - * Creates a {@link yfiles.collections.IComparer.} for outgoing edges which takes the initial coordinates of the edges' targets into account. - *

- * Child nodes are sorted in a way that the layout will resemble the current arrangement of the nodes. This is especially - * useful for interactive or incremental layout calculation. - *

- * @returns a {@link } that considers the initial coordinates of the nodes - */ - createComparer():yfiles.collections.IComparer; - /** - * Delegates to {@link yfiles.tree.DefaultNodePlacer#createComparer}. - * @returns the From Sketch {@link } - * @see yfiles.tree.DefaultNodePlacer#createComparer - */ - createFromSketchComparer():yfiles.collections.IComparer; - /** - * Gets or sets the direction in which the child nodes are placed with respect to their parent node. - *

- * Subtrees can be placed below, above, left or right of their roots. - *

- * @throws {Stubs.Exceptions.ArgumentError} if an unknown placement specifier is set - * @type {yfiles.tree.ChildPlacement} - */ - childPlacement:yfiles.tree.ChildPlacement; - /** - * Gets or sets how the root node is aligned with its children and their {@link yfiles.tree.SubtreeShape}s. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown root alignment specifier is set - * @type {yfiles.tree.RootAlignment} - */ - rootAlignment:yfiles.tree.RootAlignment; - /** - * Gets or sets the relative vertical alignment of nodes with the same parent. - *

- * All values between 0 and 1 result in a valid alignment. - *

- *
    - *
  • 0 - nodes are top-aligned
  • - *
  • 0.5 - nodes are center-aligned
  • - *
  • 1 - nodes are bottom-aligned
  • - *
- *

- * Values outside the interval [0,1] will result in a more compact node placement with unaligned nodes. - *

- * @type {number} - */ - verticalAlignment:number; - /** - * Gets or sets the style in which edge paths are routed. - * @throws {Stubs.Exceptions.ArgumentError} if the specified routing style is unknown - * @type {yfiles.tree.RoutingStyle} - */ - routingStyle:yfiles.tree.RoutingStyle; - /** - * Gets or sets the vertical distance between nodes or {@link yfiles.tree.SubtreeShape}s. - *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @type {number} - */ - verticalDistance:number; - /** - * Gets or sets the minimum length for the first segment of an edge. - *

- * During layout calculation, the edges of the tree are directed. Hence, the first segment is always the segment that is - * attached to the source, which is the local root node. - *

- *

- * The length needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum segment length is negative - * @type {number} - */ - minimumFirstSegmentLength:number; - /** - * Gets or sets the minimum length for the last segment of an edge. - *

- * During layout calculation, the edges of the tree are directed. Hence, the last segment is always the segment that is - * attached to the target, which is a child node. - *

- *

- * The length needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum segment length is negative - * @type {number} - */ - minimumLastSegmentLength:number; - /** - * Gets or sets the minimum slope of the edge segments. - *

- * These sloped segments are between the vertical first and last segment of the edge. - *

- *

- * The segments may become steeper but they will have at least the specified slope. Negative minimum slopes can lead to - * edge routes looking like spider legs. - *

- * @see yfiles.tree.DefaultNodePlacer#minimumSlopeHeight - * @type {number} - */ - minimumSlope:number; - /** - * Gets or sets the minimum height for sloped edge segments. - *

- * These sloped segments are between the vertical first and last segment of the edge. - *

- *

- * The segments may become steeper to reach the specified height. - *

- * @see yfiles.tree.DefaultNodePlacer#minimumSlope - * @type {number} - */ - minimumSlopeHeight:number; - /** - * Gets or sets the horizontal distance between nodes or {@link yfiles.tree.SubtreeShape}s. - *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @type {number} - */ - horizontalDistance:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.DefaultNodePlacer; - } - /** - * The {@link yfiles.tree.DefaultPortAssignment} provides some simple {@link yfiles.tree.DefaultPortAssignment#mode port assignment styles}. - *

- * Ports are either {@link yfiles.tree.PortAssignmentMode#NONE centered} on the node, distributed at one side of the node or placed considering - * {@link yfiles.layout.PortConstraint}s. - *

- * @class - * @implements {yfiles.tree.IPortAssignment} - */ - export interface DefaultPortAssignment extends yfiles.lang.Object,yfiles.tree.IPortAssignment{} - export class DefaultPortAssignment { - /** - * Creates a new {@link yfiles.tree.DefaultPortAssignment} instance using the given port assignment mode and ratio between the - * border and the ports and the gap between the ports themselves. - * @param mode one of the predefined port assignment specifiers - * @param [ratio=0.5] the ratio of the distance between outer ports and the border to the distance between any two ports - * @throws {Stubs.Exceptions.ArgumentError} if an unknown mode is specified or if the specified ratio is negative - */ - constructor(mode:yfiles.tree.PortAssignmentMode,ratio?:number); - /** - * Creates a new {@link yfiles.tree.DefaultPortAssignment} instance with default settings. - */ - constructor(); - /** - * Assigns relative coordinates to the source port of the outgoing edge to a child of the given node. - *

- * This method is called by {@link yfiles.tree.DefaultPortAssignment#assignPorts} for each outgoing edge of the given node. It may - * be overridden to assign a custom location to the source port of outgoing edges. - *

- * @param graph the input graph - * @param node the node - * @param edge the edge to the child node - * @param index the zero-based index of the child edge - * @see yfiles.layout.IEdgeLayout#sourcePoint - * @protected - */ - assignChildEdgeSourcePort(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node,edge:yfiles.algorithms.Edge,index:number):void; - /** - * Assigns relative coordinates to the target port of the incoming edge from the parent of the given node. - *

- * This method is called by {@link yfiles.tree.DefaultPortAssignment#assignPorts} if the given node has a parent node. It may be - * overridden to assign a custom location to the target port of the incoming edge. - *

- * @param graph the input graph - * @param node the node - * @param edge the edge from the parent node - * @see yfiles.layout.IEdgeLayout#targetPoint - * @protected - */ - assignParentEdgeTargetPort(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node,edge:yfiles.algorithms.Edge):void; - /** - * Places the ports of edges connecting to the given node according to the {@link yfiles.tree.DefaultPortAssignment#mode port assignment mode}. - * @param graph the input graph - * @param node the node whose adjacent edges' ports should be placed - * @see yfiles.tree.DefaultPortAssignment#mode - */ - assignPorts(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node):void; - /** - * Determines the distance between the outer ports and the border of the node. - *

- * This implementation calculates the gap according to the number of edges at one side of the node. It also includes the - * {@link yfiles.tree.DefaultPortAssignment#borderGapToPortGapRatio ratio between border gap and port gap}. - *

- *

- * This method is called by {@link yfiles.tree.DefaultPortAssignment#assignChildEdgeSourcePort} to calculate the location of the - * first port. It may be overridden to implement a different distribution of ports on the node's side. - *

- * @param sideLength the width/height of the side - * @param edgeCount the number of edges that connect to this side - * @returns the absolute gap to be used on both sides of the ports - * @see yfiles.tree.DefaultPortAssignment#assignChildEdgeSourcePort - * @see yfiles.tree.DefaultPortAssignment#borderGapToPortGapRatio - * @protected - */ - getPortBorderGap(sideLength:number,edgeCount:number):number; - /** - * Determines the distance between two adjacent ports. - *

- * This implementation calculates the gap according to the number of edges at one side of the node. The edges are - * distributed keeping the given gap to the border of the node. - *

- *

- * This method is called by {@link yfiles.tree.DefaultPortAssignment#assignChildEdgeSourcePort} to calculate the distance between - * two ports. It may be overridden to implement a different distribution of ports on the node's side. - *

- * @param sideLength the width/height of the side - * @param edgeCount the number of edges/ports that connect to this side - * @param portBorderGap the port border gap (i.e. calculated by {@link #getPortBorderGap}) - * @returns the absolute distance to be used between two adjacent ports - * @see yfiles.tree.DefaultPortAssignment#assignChildEdgeSourcePort - * @see yfiles.tree.DefaultPortAssignment#getPortBorderGap - * @protected - */ - getPortDistanceDelta(sideLength:number,edgeCount:number,portBorderGap:number):number; - /** - * Retrieves the source {@link yfiles.layout.PortConstraint} for the given edge. - *

- * This implementation accesses the {@link yfiles.algorithms.IDataProvider} registered with - * {@link yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY}. - *

- *

- * This method is called by {@link yfiles.tree.DefaultPortAssignment#assignChildEdgeSourcePort} in - * {@link yfiles.tree.PortAssignmentMode#PORT_CONSTRAINT}. - *

- * @param graph the input graph - * @param edge the edge - * @param index the index of the child that is the target of the given edge - * @returns the source {@link } or null if no source {@link } is specified - * @see yfiles.layout.PortConstraint - * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @see yfiles.tree.DefaultPortAssignment#assignChildEdgeSourcePort - * @protected - */ - getSourcePortConstraint(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge,index:number):yfiles.layout.PortConstraint; - /** - * Retrieves the target {@link yfiles.layout.PortConstraint} for the given edge. - *

- * This implementation accesses the {@link yfiles.algorithms.IDataProvider} registered with - * {@link yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY}. - *

- *

- * This method is called by {@link yfiles.tree.DefaultPortAssignment#assignParentEdgeTargetPort} in - * {@link yfiles.tree.PortAssignmentMode#PORT_CONSTRAINT}. - *

- * @param graph the input graph - * @param edge the edge - * @returns the target {@link } or null if no target {@link } is specified - * @see yfiles.layout.PortConstraint - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @see yfiles.tree.DefaultPortAssignment#assignParentEdgeTargetPort - * @protected - */ - getTargetPortConstraint(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):yfiles.layout.PortConstraint; - /** - * Gets or sets the mode that describes how ports are placed. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown mode is specified - * @type {yfiles.tree.PortAssignmentMode} - */ - mode:yfiles.tree.PortAssignmentMode; - /** - * Gets or sets the ratio of the border gap (distance between the outer ports to the node border) to the port gap (distance between adjacent - * ports). - *

- * The ratio must have a positive value. When the ratio is 0 the ports will be distributed along the whole side of the node - * without a gap between the last port and the corner. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified ratio is negative - * @type {number} - */ - borderGapToPortGapRatio:number; - /** - * Gets or sets whether or not the port assignment should reverse the order of the ports. - *

- * The normal order is from left to right and from top to bottom. It will be reversed if this option is enabled. - *

- * @type {boolean} - */ - reversedPortOrder:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.DefaultPortAssignment; - } - /** - * {@link yfiles.tree.DelegatingNodePlacer} delegates the arrangement of the children to two different {@link yfiles.tree.INodePlacer}s. - *

- * Layout Style This {@link yfiles.tree.INodePlacer} can, for example, be used for creating mind maps or a playing schedule of a sports - * competition. {@graph {"ann":{"s":[130,30],"d":1},"n":[[662,400,[[669.97,424.35,114.05,18.7]]],[662,175,[[669.97,199.35,114.05,18.7]]],[662,625,[[685.65,649.35,82.7,18.7]]],[812,175,[[829.98,199.35,94.04,18.7]]],[982,275,[[999.98,299.35,94.04,18.7]]],[812,625,[[835.65,649.35,82.7,18.7]]],[512,175,[[519.97,199.35,114.05,18.7]]],[982,725,[[1010.64,749.35,72.71,18.7]]],[1152,775,[[1180.64,799.35,72.71,18.7]]],[1322,800,[[1341.97,824.35,90.05,18.7]]],[982,75,[[1004.32,99.35,85.37,18.7]]],[1152,675,[[1163.65,699.35,106.71,18.7]]],[1152,325,[[1177.32,349.35,79.36,18.7]]],[982,525,[[1005.65,549.35,82.7,18.7]]],[1152,125,[[1190.32,149.35,53.37,18.7]]],[1152,575,[[1175.65,599.35,82.7,18.7]]],[1322,350,[[1347.32,374.35,79.36,18.7]]],[1322,150,[[1343.65,174.35,86.7,18.7]]],[1322,300,[[1347.32,324.35,79.36,18.7]]],[1152,225,[[1169.98,249.35,94.04,18.7]]],[1152,25,[[1174.32,49.35,85.37,18.7]]],[342,75,[[372.66,99.35,68.69,18.7]]],[1152,475,[[1165.65,499.35,102.7,18.7]]],[1322,500,[[1326,524.35,122.06,18.7]]],[1322,250,[[1339.98,274.35,94.04,18.7]]],[1322,600,[[1330.31,624.35,113.38,18.7]]],[172,25,[[188.64,49.35,96.72,18.7]]],[342,275,[[349.97,299.35,114.05,18.7]]],[2,0,[[26.32,24.35,81.36,18.7]]],[1322,550,[[1345.65,574.35,82.7,18.7]]],[172,125,[[202.66,149.35,68.69,18.7]]],[1322,200,[[1344.32,224.35,85.36,18.7]]],[2,100,[[32.32,124.35,69.37,18.7]]],[1322,450,[[1335.65,474.35,102.7,18.7]]],[1322,750,[[1350.64,774.35,72.71,18.7]]],[512,625,[[532.65,649.35,88.69,18.7]]],[172,225,[[179.97,249.35,114.05,18.7]]],[1322,700,[[1329.63,724.35,114.74,18.7]]],[172,325,[[200.98,349.35,72.03,18.7]]],[1322,50,[[1344.32,74.35,85.37,18.7]]],[2,300,[[4.98,324.35,124.05,18.7]]],[2,50,[[18.64,74.35,96.72,18.7]]],[2,150,[[32.66,174.35,68.69,18.7]]],[1322,650,[[1333.65,674.35,106.71,18.7]]],[1322,0,[[1356.66,24.35,60.69,18.7]]],[1322,100,[[1360.32,124.35,53.37,18.7]]],[342,525,[[347.31,549.35,119.39,18.7]]],[172,475,[[171.97,499.35,130.06,18.7]]],[2,350,[[30.98,374.35,72.03,18.7]]],[2,450,[[1.97,474.35,130.06,18.7]]],[342,725,[[362.65,749.35,88.69,18.7]]],[2,200,[[25.31,224.35,83.37,18.7]]],[172,575,[[177.31,599.35,119.39,18.7]]],[172,675,[[197.32,699.35,79.35,18.7]]],[2,500,[[15.98,524.35,102.04,18.7]]],[2,550,[[14.63,574.35,104.73,18.7]]],[2,600,[[7.31,624.35,119.39,18.7]]],[2,250,[[9.97,274.35,114.05,18.7]]],[172,775,[[192.65,799.35,88.69,18.7]]],[2,750,[[22.65,774.35,88.69,18.7]]],[2,800,[[16.64,824.35,100.72,18.7]]],[2,650,[[11.97,674.35,110.07,18.7]]],[2,700,[[27.32,724.35,79.35,18.7]]]],"e":[[0,1],[0,2],[1,3],[3,4,[954,190,954,290]],[2,5],[1,6],[5,7,[954,640,954,740]],[7,8,[1124,740,1124,790]],[8,9,[1294,790,1294,815]],[3,10,[954,190,954,90]],[7,11,[1124,740,1124,690]],[4,12,[1124,290,1124,340]],[5,13,[954,640,954,540]],[10,14,[1124,90,1124,140]],[13,15,[1124,540,1124,590]],[12,16,[1294,340,1294,365]],[14,17,[1294,140,1294,165]],[12,18,[1294,340,1294,315]],[4,19,[1124,290,1124,240]],[10,20,[1124,90,1124,40]],[6,21,[500,190,500,90]],[13,22,[1124,540,1124,490]],[22,23,[1294,490,1294,515]],[19,24,[1294,240,1294,265]],[15,25,[1294,590,1294,615]],[21,26,[330,90,330,40]],[6,27,[500,190,500,290]],[26,28,[160,40,160,15]],[15,29,[1294,590,1294,565]],[21,30,[330,90,330,140]],[19,31,[1294,240,1294,215]],[30,32,[160,140,160,115]],[22,33,[1294,490,1294,465]],[8,34,[1294,790,1294,765]],[2,35],[27,36,[330,290,330,240]],[11,37,[1294,690,1294,715]],[27,38,[330,290,330,340]],[20,39,[1294,40,1294,65]],[38,40,[160,340,160,315]],[26,41,[160,40,160,65]],[30,42,[160,140,160,165]],[11,43,[1294,690,1294,665]],[20,44,[1294,40,1294,15]],[14,45,[1294,140,1294,115]],[35,46,[500,640,500,540]],[46,47,[330,540,330,490]],[38,48,[160,340,160,365]],[47,49,[160,490,160,465]],[35,50,[500,640,500,740]],[36,51,[160,240,160,215]],[46,52,[330,540,330,590]],[50,53,[330,740,330,690]],[47,54,[160,490,160,515]],[52,55,[160,590,160,565]],[52,56,[160,590,160,615]],[36,57,[160,240,160,265]],[50,58,[330,740,330,790]],[58,59,[160,790,160,765]],[58,60,[160,790,160,815]],[53,61,[160,690,160,665]],[53,62,[160,690,160,715]]],"vp":[1.0,0.0,1451.0,830.0]}} - *

- *

- * There are two subtrees that are placed above and below the root; Both subtrees consist of two subtrees that are placed - * left and right of their local root - *

- * @class - * @extends {yfiles.tree.RotatableNodePlacerBase} - */ - export interface DelegatingNodePlacer extends yfiles.tree.RotatableNodePlacerBase{} - export class DelegatingNodePlacer { - /** - * Creates a new {@link yfiles.tree.DefaultNodePlacer} instance with default settings using the given modification matrix and the - * given node placers as delegates. - * @param modificationMatrix the transformation matrix - * @param placerUpperLeft the first delegate {@link } which places the left subtrees - * @param placerLowerRight the second delegate {@link } which places the right subtrees - * @see yfiles.tree.DelegatingNodePlacer#PRIMARY_NODES_DP_KEY - */ - constructor(modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix,placerUpperLeft:yfiles.tree.INodePlacer,placerLowerRight:yfiles.tree.INodePlacer); - /** - * Returns all upper-left children of the local root node. - *

- * Which children belong to this list is determined using the {@link yfiles.algorithms.IDataProvider} registered with - * {@link yfiles.tree.DelegatingNodePlacer#PRIMARY_NODES_DP_KEY}. If no such {@link yfiles.algorithms.IDataProvider} is registered, the - * first half of the children is returned. - *

- *

- * These children are placed using the {@link yfiles.tree.INodePlacer} returned by {@link yfiles.tree.DelegatingNodePlacer#primaryPlacer}. - *

- * @param localRoot the local root node - * @param graph the input graph - * @returns the list of upper-left child {@link }s - * @see yfiles.tree.DelegatingNodePlacer#PRIMARY_NODES_DP_KEY - */ - primaryChildren(localRoot:yfiles.algorithms.Node,graph:yfiles.layout.LayoutGraph):yfiles.algorithms.NodeList; - /** - * Returns all lower-right children of the local root node. - *

- * Which children belong to this list is determined using the {@link yfiles.algorithms.IDataProvider} registered with - * {@link yfiles.tree.DelegatingNodePlacer#PRIMARY_NODES_DP_KEY}. If no such {@link yfiles.algorithms.IDataProvider} is registered, the - * second half of the children is returned. - *

- *

- * These children are placed using the {@link yfiles.tree.INodePlacer} returned by {@link yfiles.tree.DelegatingNodePlacer#secondaryPlacer}. - *

- * @param localRoot the local root node - * @param graph the input graph - * @returns the list of lower-right child {@link }s - * @see yfiles.tree.DelegatingNodePlacer#PRIMARY_NODES_DP_KEY - */ - secondaryChildren(localRoot:yfiles.algorithms.Node,graph:yfiles.layout.LayoutGraph):yfiles.algorithms.NodeList; - /** - * Data provider key for dividing the children into two sets - *

- * If there is no {@link yfiles.algorithms.IDataProvider} registered with this key, half of the nodes are placed left of the root - * and the remaining nodes are placed right of the root. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static PRIMARY_NODES_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets the {@link yfiles.tree.INodePlacer} instance that will arrange the lower-right part of the graph. - * @see yfiles.tree.DelegatingNodePlacer#primaryPlacer - * @see yfiles.tree.DelegatingNodePlacer#secondaryChildren - * @type {yfiles.tree.INodePlacer} - */ - secondaryPlacer:yfiles.tree.INodePlacer; - /** - * Gets the {@link yfiles.tree.INodePlacer} instance that will arrange the upper-left part of the graph. - * @see yfiles.tree.DelegatingNodePlacer#secondaryPlacer - * @see yfiles.tree.DelegatingNodePlacer#primaryChildren - * @type {yfiles.tree.INodePlacer} - */ - primaryPlacer:yfiles.tree.INodePlacer; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.DelegatingNodePlacer; - } - /** - * The {@link yfiles.tree.DendrogramNodePlacer} arranges subtrees as dendrograms. - *

- * Layout Style This {@link yfiles.tree.INodePlacer} arranges nodes from top to bottom. It arranges subtrees in such a way that all subtrees of - * a single local root are aligned with their bottom border. {@graph {"ann":{"s":[30,30],"d":1},"n":[[212.5,0],[400,70],[450,140],[300,210],[400,210],[450,210],[150,140],[25,70],[200,280],[150,280],[50,210],[450,280],[350,280],[25,140],[100,210],[400,280],[0,280],[300,280],[50,280],[100,280],[250,280]],"e":[[0,1,[227.5,50,415,50]],[1,2,[415,120,465,120]],[0,3,[227.5,50,315,50]],[1,4],[2,5],[0,6,[227.5,50,165,50]],[0,7,[227.5,50,40,50]],[6,8,[165,190,215,190]],[6,9],[5,11],[1,12,[415,120,365,120]],[7,13],[13,10,[40,190,65,190]],[6,14,[165,190,115,190]],[4,15],[13,16,[40,190,15,190]],[3,17],[10,18],[14,19],[0,20,[227.5,50,265,50]]],"vp":[0.0,0.0,480.0,310.0]}} - *

- *

- * Note: This implementation does not support {@link yfiles.layout.PortConstraint}s. - *

- * @class - * @implements {yfiles.tree.IFromSketchNodePlacer} - */ - export interface DendrogramNodePlacer extends yfiles.lang.Object,yfiles.tree.IFromSketchNodePlacer{} - export class DendrogramNodePlacer { - /** - * Creates a new {@link yfiles.tree.DendrogramNodePlacer} instance with default settings. - */ - constructor(); - /** - * Creates a {@link yfiles.collections.IComparer.} that sorts outgoing edges according to the x-coordinate of their target nodes. - *

- * This {@link yfiles.collections.IComparer.} can be used for achieving a From Sketch layout. - *

- * @returns the {@link } - * @see yfiles.tree.DendrogramNodePlacer#createFromSketchComparer - */ - createComparer():yfiles.collections.IComparer; - /** - * Creates a {@link yfiles.collections.IComparer.} for the edges which takes the initial x-coordinates of the nodes into account. - *

- * This implementation delegates to {@link yfiles.tree.DendrogramNodePlacer#createComparer}. - *

- * @returns the {@link } for the edges - * @see yfiles.tree.DendrogramNodePlacer#createComparer - */ - createFromSketchComparer():yfiles.collections.IComparer; - /** - * Creates an optional {@link yfiles.tree.IProcessor} for pre- and post-processing. - *

- * This implementation returns null. Hence, no pre- or post-processing is done. - *

- * @param layouter the current {@link } instance - * @param graph the input graph - * @param currentRoot the root node handled by this {@link } - * @returns null - */ - createProcessor(layouter:yfiles.tree.TreeLayout,graph:yfiles.layout.LayoutGraph,currentRoot:yfiles.algorithms.Node):yfiles.tree.IProcessor; - /** - * Provides {@link yfiles.tree.ParentConnectorDirection#NORTH} for all children. - *

- * Edges will always connect to the top of the child nodes. - *

- * @param localRoot the local root node - * @param connectorMap the map that is used for storing the direction specifiers of the child nodes - */ - determineChildConnectors(localRoot:yfiles.algorithms.Node,connectorMap:yfiles.algorithms.IDataMap):void; - /** - * Arranges the {@link yfiles.tree.SubtreeShape SubtreeShapes} of the local root and its children as a dendrogram. - * @param nodeShapeProvider the {@link } for obtaining an initial shape of the root node - * @param subtreeShapeProvider the {@link } for accessing the pre-calculated shapes of the subtrees - * @param graph the input graph - * @param localRoot the root of the subtree that should be arranged by this method - * @param parentConnectorDirection the direction specifier for the connector of the local root node to its parent node - * @returns the combined shape of the whole subtree rooted at the given local root node - */ - placeSubtree(nodeShapeProvider:yfiles.algorithms.IDataProvider,subtreeShapeProvider:yfiles.algorithms.IDataProvider,graph:yfiles.layout.LayoutGraph,localRoot:yfiles.algorithms.Node,parentConnectorDirection:yfiles.tree.ParentConnectorDirection):yfiles.tree.SubtreeShape; - /** - * Gets or sets the minimum distance between the {@link yfiles.tree.SubtreeShape} of a root node and the bus connecting to all of - * its children. - *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @type {number} - */ - minimumRootDistance:number; - /** - * Gets or sets the minimum horizontal distance between adjacent {@link yfiles.tree.SubtreeShape SubtreeShapes}. - *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @type {number} - */ - minimumSubtreeDistance:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.DendrogramNodePlacer; - } - /** - * The {@link yfiles.tree.DoubleLineNodePlacer} arranges the children of a local root alternating in two lines. - *

- * Layout Style This {@link yfiles.tree.INodePlacer} arranges nodes from top to bottom. It places the subtrees in two horizontal lines below - * the root. They are distributed in an alternating fashion, i.e., adjacent subtrees are in different lines. - *

- *

- * This node placer is especially useful for leaves with a large width. - *

- *

- * {@graph {"ann":{"s":[141.67,30],"d":1},"n":[[298.33,0,60,30],[0,60],[85.83,99.9],[171.67,60],[257.5,99.9],[343.33,60],[429.17,99.9],[515,60]],"e":[[0,1,[70.83,15]],[0,2,[156.67,15]],[0,3,[242.5,15]],[0,4],[0,5,[414.17,15]],[0,6,[500,15]],[0,7,[585.83,15]]],"vp":[0.0,0.0,657.0,130.0]}} - *

- * @class - * @extends {yfiles.tree.RotatableNodePlacerBase} - */ - export interface DoubleLineNodePlacer extends yfiles.tree.RotatableNodePlacerBase{} - export class DoubleLineNodePlacer { - /** - * Creates a new {@link yfiles.tree.DoubleLineNodePlacer} instance whose direction is specified by the given modification matrix. - * @param modificationMatrix the transformation matrix for this {@link } - */ - constructor(modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix); - /** - * Creates a new {@link yfiles.tree.DoubleLineNodePlacer} instance with the default settings. - */ - constructor(); - /** - * Gets or sets the {@link yfiles.tree.RootNodeAlignment RootAlginment} that defines how the root node is aligned with its children and their shapes. - * @type {yfiles.tree.RootNodeAlignment} - */ - rootAlignment:yfiles.tree.RootNodeAlignment; - /** - * Gets or sets the ratio of the {@link yfiles.tree.RotatableNodePlacerBase#spacing spacing} between the root and the children in the upper line and the spacing between the - * two lines of subtrees. - * @type {number} - */ - doubleLineSpacingRatio:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.DoubleLineNodePlacer; - } - /** - * A {@link yfiles.tree.FreeNodePlacer} is a simple pseudo-placer. - *

- * The children of local root nodes are not moved. The {@link yfiles.tree.INodePlacer} just merges their rotated shapes and routes - * the edges. - *

- *

- * This {@link yfiles.tree.INodePlacer} may be useful if a local root node does not have any children or you want to place them - * manually. - *

- * @class - * @extends {yfiles.tree.RotatableNodePlacerBase} - */ - export interface FreeNodePlacer extends yfiles.tree.RotatableNodePlacerBase{} - export class FreeNodePlacer { - /** - * Creates a new instance of {@link yfiles.tree.FreeNodePlacer} with default settings. - */ - constructor(); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.FreeNodePlacer; - } - /** - * The {@link yfiles.tree.GridNodePlacer} arranges the shapes of the children of a local root in a grid. - *

- * Layout Style The grid consists of a number of rows. The subtrees are assigned to the rows using a {@link yfiles.algorithms.IDataProvider} - * that is registered with the graph with {@link yfiles.tree.GridNodePlacer#ROW_INDEX_DP_KEY}. {@graph {"ann":{"s":[30,30],"d":1},"n":[[0,0],[50,140],[50,210],[50,70],[100,140],[100,210],[100,70],[150,140],[150,210],[150,70],[200,140],[200,210],[200,70]],"e":[[0,1,[40,15,40,120,65,120]],[0,2,[40,15,40,190,65,190]],[0,3,[40,15,40,50,65,50]],[0,4,[40,15,40,120,115,120]],[0,5,[40,15,40,190,115,190]],[0,6,[40,15,40,50,115,50]],[0,7,[40,15,40,120,165,120]],[0,8,[40,15,40,190,165,190]],[0,9,[40,15,40,50,165,50]],[0,10,[40,15,40,120,215,120]],[0,11,[40,15,40,190,215,190]],[0,12,[40,15,40,50,215,50]]],"vp":[0.0,0.0,230.0,240.0]}} - *

- *

- * Child nodes placed in a grid using three rows and four columns - *

- * @class - * @extends {yfiles.tree.RotatableNodePlacerBase} - */ - export interface GridNodePlacer extends yfiles.tree.RotatableNodePlacerBase{} - export class GridNodePlacer { - /** - * Creates a new {@link yfiles.tree.GridNodePlacer} instance with the given {@link yfiles.tree.RotatableNodePlacerBase#modificationMatrix modification matrix} and {@link yfiles.tree.GridNodePlacer#rootAlignment root alignment}. - * @param modificationMatrix the transformation matrix for this {@link } - * @param rootAlignment the alignment of the local root with its subtrees - */ - constructor(modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix,rootAlignment:yfiles.tree.RootNodeAlignment); - /** - * Creates a new {@link yfiles.tree.GridNodePlacer} instance whose direction is specified by the given modification matrix. - * @param modificationMatrix the transformation matrix for this {@link } - */ - constructor(modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix); - /** - * Creates a new {@link yfiles.tree.GridNodePlacer} with default settings. - */ - constructor(); - /** - * Data provider key for assigning nodes to the rows in the grid - *

- * If no {@link yfiles.algorithms.IDataProvider} is registered with this key, all nodes will be placed in the same row. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static ROW_INDEX_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets or sets the {@link yfiles.tree.RootNodeAlignment RootAlginment} that defines how the root node is aligned with its children and their shapes. - * @type {yfiles.tree.RootNodeAlignment} - */ - rootAlignment:yfiles.tree.RootNodeAlignment; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.GridNodePlacer; - } - /** - * This {@link yfiles.tree.INodePlacer} places the children of a local root in groups. - *

- * The groups are determined by the grouping of the edges that connect the children to its root. The placement of the - * groups is specified by a {@link yfiles.tree.INodePlacer} which will consider grouped children as one child. The children within - * a group are placed by another {@link yfiles.tree.INodePlacer}. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[70.15,0,91.19,30],[0,91],[111,91],[201.5,91],[0,141],[111,141],[201.5,141]],"e":[[0,1,-30,15,0,0,[85.75,50,50,50,50,106]],[0,2,0,15,0,0,[115.75,50,91,50,91,106]],[0,3,30,15,0,0,[145.75,50,181.5,50,181.5,106]],[0,4,-30,15,0,0,[85.75,50,50,50,50,156]],[0,5,0,15,0,0,[115.75,50,91,50,91,156]],[0,6,30,15,0,0,[145.75,50,181.5,50,181.5,156]]],"vp":[0.0,0.0,232.0,171.0]}} There are three edge groups whose target nodes are placed above each other - *

- * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @class - * @implements {yfiles.tree.INodePlacer} - */ - export interface GroupedNodePlacer extends yfiles.lang.Object,yfiles.tree.INodePlacer{} - export class GroupedNodePlacer { - /** - * Creates a new {@link yfiles.tree.GroupedNodePlacer} instance. - * @param groupPlacer the {@link } which places the child groups - * @param childPlacer the {@link } which places the children within their group - */ - constructor(groupPlacer:yfiles.tree.INodePlacer,childPlacer:yfiles.tree.INodePlacer); - /** - * Creates a {@link yfiles.tree.IProcessor} that prepares the graph for edge grouping. - *

- * In a pre-processing step, the {@link yfiles.tree.IProcessor} inserts a dummy node for each edge group and connects it to the - * local root and the edges of the according group. The child node placer is assigned to those dummy nodes and will arrange - * them during the layout calculation. - *

- *

- * The changes to the graph are restored in a post-processing step. - *

- * @param layouter the current {@link } instance - * @param graph the input graph - * @param currentRoot the root node handled by this {@link } - * @returns the {@link } responsible for preparing the graph - * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - */ - createProcessor(layouter:yfiles.tree.TreeLayout,graph:yfiles.layout.LayoutGraph,currentRoot:yfiles.algorithms.Node):yfiles.tree.IProcessor; - /** - * Delegates to the {@link yfiles.tree.INodePlacer} responsible for arranging the nodes in one group. - * @param localRoot the local root node - * @param connectorMap the map used for storing the direction specifiers of the child nodes - */ - determineChildConnectors(localRoot:yfiles.algorithms.Node,connectorMap:yfiles.algorithms.IDataMap):void; - /** - * Places the groups of {@link yfiles.tree.SubtreeShape}s according to their group IDs. - * @param nodeShapeProvider the {@link } for obtaining an initial shape of the root node - * @param subtreeShapeProvider the {@link } for accessing the pre-calculated shapes of the subtrees - * @param graph the input graph - * @param localRoot the root of the subtree that should be arranged by this method - * @param parentConnectorDirection the direction specifier for the connector of the local root node to its parent node - * @returns the merged {@link }s of the local root and its children - * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - */ - placeSubtree(nodeShapeProvider:yfiles.algorithms.IDataProvider,subtreeShapeProvider:yfiles.algorithms.IDataProvider,graph:yfiles.layout.LayoutGraph,localRoot:yfiles.algorithms.Node,parentConnectorDirection:yfiles.tree.ParentConnectorDirection):yfiles.tree.SubtreeShape; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.GroupedNodePlacer; - } - /** - * A {@link yfiles.tree.IFromSketchNodePlacer} arranges the subtrees while taking the initial locations of the nodes into account. - *

- * It provides a {@link yfiles.collections.IComparer.} which sorts the outgoing edges of a node according to the initial coordinates of their target nodes. - * Keeping the original order of nodes, this {@link yfiles.collections.IComparer.} allows to incrementally add new nodes to the graph. - *

- * @interface - * @implements {yfiles.tree.INodePlacer} - */ - export interface IFromSketchNodePlacer extends yfiles.lang.Object,yfiles.tree.INodePlacer{ - /** - * Creates an {@link yfiles.collections.IComparer. edge comparator} which takes the initial coordinates of the nodes into account. - *

- * This {@link yfiles.collections.IComparer.} defines the order of the outgoing edges of a node before the actual placement of the node's subtree is - * calculated. - *

- * @returns the {@link } for the edges - * @abstract - */ - createFromSketchComparer():yfiles.collections.IComparer; - } - var IFromSketchNodePlacer:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.tree.IFromSketchNodePlacer; - }; - /** - * A {@link yfiles.tree.INodePlacer} is responsible for the arrangement of a local root node and all of its subtrees. - *

- * Subtrees are represented as {@link yfiles.tree.SubtreeShape SubtreeShape}s with a connecting edge to the root of the subtree. - *

- *

- * Implementations of this interface have to: - *

- *
    - *
  • - * arrange the {@link yfiles.tree.SubtreeShape SubtreeShapes} and the root node (only the relative position matters, shapes can be placed at any absolute - * location, {@link yfiles.tree.TreeLayout} will perform the final alignment). - *
  • - *
  • - * perform the edge routing from the root node to all child nodes with respect to the connector provided by the - * {@link yfiles.tree.SubtreeShape SubtreeShapes} - *
  • - *
  • calculate the union of the {@link yfiles.tree.SubtreeShape SubtreeShapes} and the shape of the root node as well as any added edges
  • - *
  • initialize the connector of the root node with respect to the preferred connection direction
  • - *
  • return the {@link yfiles.tree.SubtreeShape SubtreeShape} for the subtree including the local root
  • - *
- * @interface - */ - export interface INodePlacer extends yfiles.lang.Object{ - /** - * Creates an optional {@link yfiles.tree.IProcessor} for pre- and post-processing. - *

- * This method is called by {@link yfiles.tree.TreeLayout} before arranging the {@link yfiles.tree.SubtreeShape SubtreeShapes}. If no pre- or post-processing is - * needed, this method may return null. - *

- * @param layouter the current {@link } instance - * @param graph the input graph - * @param currentRoot the root node handled by this {@link } - * @returns a {@link } instance or null - * @abstract - */ - createProcessor(layouter:yfiles.tree.TreeLayout,graph:yfiles.layout.LayoutGraph,currentRoot:yfiles.algorithms.Node):yfiles.tree.IProcessor; - /** - * Provides the direction of the connector to the {@link yfiles.tree.SubtreeShape SubtreeShape} for each child node. - *

- * This method is called by {@link yfiles.tree.TreeLayout} before the {@link yfiles.tree.SubtreeShape SubtreeShapes} for the children of the local root node are - * calculated. The direction specifiers are stored in the given map for all child nodes of the local root. - *

- * @param localRoot the local root node - * @param connectorMap the map that must be used for storing the direction specifiers of the child nodes - * @abstract - */ - determineChildConnectors(localRoot:yfiles.algorithms.Node,connectorMap:yfiles.algorithms.IDataMap):void; - /** - * Arranges the {@link yfiles.tree.SubtreeShape SubtreeShapes} of the local root and its children and routes the edges that connect them. - *

- * This method is the main method of the tree layout algorithm. It is called by {@link yfiles.tree.TreeLayout} in each recursion - * step to place the local root in relation to its children. Their shapes will be merged into one - * {@link yfiles.tree.SubtreeShape SubtreeShape}, which is returned by this method. - *

- *

- * The {@link yfiles.tree.SubtreeShape SubtreeShape} for the local root can be obtained from the nodeShapeProvider. subtreeShapeProvider contains the {@link yfiles.tree.SubtreeShape SubtreeShapes} - * assigned to the child nodes. - *

- *

- * Due to the order in which the tree nodes are processed, it is guaranteed that at the time of the invocation of this - * method the {@link yfiles.tree.SubtreeShape SubtreeShape} of every descendant node has already been calculated. - *

- * @param nodeShapeProvider the {@link } for obtaining an initial shape of the root node - * @param subtreeShapeProvider the {@link } for accessing the pre-calculated shapes of the subtrees - * @param graph the input graph - * @param localRoot the root of the subtree that should be arranged by this method - * @param parentConnectorDirection the direction specifier for the connector of the local root node to its parent node - * @returns the combined shape of the whole subtree - * @abstract - */ - placeSubtree(nodeShapeProvider:yfiles.algorithms.IDataProvider,subtreeShapeProvider:yfiles.algorithms.IDataProvider,graph:yfiles.layout.LayoutGraph,localRoot:yfiles.algorithms.Node,parentConnectorDirection:yfiles.tree.ParentConnectorDirection):yfiles.tree.SubtreeShape; - } - var INodePlacer:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.tree.INodePlacer; - }; - /** - * A {@link yfiles.tree.IPortAssignment} places the ports of edges connecting to the same node. - *

- * Classes implementing this interface are responsible for the assignment of the edges' ports. {@link yfiles.tree.INodePlacer} - * instances need to obey the currently set ports. - *

- * @interface - */ - export interface IPortAssignment extends yfiles.lang.Object{ - /** - * Places the ports of edges connecting to the given node. - *

- * This method is called by {@link yfiles.tree.TreeLayout} before the actual layout calculation takes place. It assigns both the - * single incoming edge's target port as well as all source ports of all outgoing child edges. - *

- * @param graph the graph - * @param node the node whose adjacent edges' ports should be set - * @abstract - */ - assignPorts(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node):void; - } - var IPortAssignment:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.tree.IPortAssignment; - }; - /** - * A {@link yfiles.tree.IProcessor} provides the possibility for each {@link yfiles.tree.INodePlacer} to prepare (and clean up) the graph - * for the children of the local root. - *

- * It is created by {@link yfiles.tree.INodePlacer#createProcessor} and called by the {@link yfiles.tree.TreeLayout} before and after the - * actual arrangement of the nodes. - *

- *

- * A {@link yfiles.tree.IProcessor} may change values within the - * {@link yfiles.algorithms.IDataMap}s for its children. It can also temporarily change the graph by hiding nodes or adding dummy - * nodes. - *

- * @interface - */ - export interface IProcessor extends yfiles.lang.Object{ - /** - * This method is called by the {@link yfiles.tree.TreeLayout} after the layout has finished. - *

- * It can be used for cleanup tasks. - *

- *

- * Changes on the graph structure that have been made in {@link yfiles.tree.IProcessor#preProcess} can be undone here. - *

- * @abstract - */ - postProcess():void; - /** - * Performs preparations for the actual tree layout in a pre-processing step. - *

- * This method is called by {@link yfiles.tree.TreeLayout} before the {@link yfiles.tree.INodePlacer}s are called recursively. A {@link yfiles.tree.IProcessor} - * may change some settings within this method. This can be used for specifying values for the children of the local root, - * manipulate the graph structure or do anything else that needs to be done. - *

- * @param nodePlacerDataProvider the map that stores a {@link } instance for each node - * @param portAssignmentDataProvider The map that stores a {@link } instance for each node - * @param childComparatorProvider the map that stores a {@link } instance for each node - * @abstract - */ - preProcess(nodePlacerDataProvider:yfiles.algorithms.IDataMap,portAssignmentDataProvider:yfiles.algorithms.IDataMap,childComparatorProvider:yfiles.algorithms.IDataMap):void; - } - var IProcessor:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.tree.IProcessor; - }; - /** - * A {@link yfiles.tree.LayeredNodePlacer} arranges the nodes of a subtree respecting layers. - *

- * Layout Style Nodes that have the same depth in the tree will be placed in the same horizontal layer. They will be vertically - * {@link yfiles.tree.LayeredNodePlacer#verticalAlignment aligned}. {@graph {"ann":{"s":[30,30],"d":1},"n":[[245.52,0],[69.46,77.5],[7.5,162.5],[181.42,240,45,45],[57.5,155,45,45],[0,240,45,45],[246.42,77.5],[406.58,70,45,45],[181.42,155,45,45],[246.42,155,45,45],[375.88,247.5],[7.5,332.5],[122.5,158.04,38.92,38.92],[409.62,158.04,38.92,38.92],[311.42,162.5],[65,247.5],[443.38,243.04,38.92,38.92],[138.92,332.5],[338.92,325,45,45],[311.42,247.5],[403.92,328.04,38.92,38.92],[188.92,332.5],[238.92,332.5]],"e":[[0,1,[260.52,42,84.46,42]],[1,2,[84.46,127,22.5,127]],[1,4,[84.46,127,80,127]],[2,5],[0,6,[260.52,42,261.42,42]],[0,7,[260.52,42,429.08,42]],[6,8,[261.42,127,203.92,127]],[8,3],[6,9,[261.42,127,268.92,127]],[5,11],[1,12,[84.46,127,141.96,127]],[7,13],[13,10,[429.08,212,390.88,212]],[6,14,[261.42,127,326.42,127]],[4,15],[13,16,[429.08,212,462.83,212]],[3,17,[203.92,297,153.92,297]],[10,18,[390.88,297,361.42,297]],[14,19],[10,20,[390.88,297,423.38,297]],[3,21],[3,22,[203.92,297,253.92,297]]],"vp":[0.0,0.0,483.0,370.0]}} - *

- * @class - * @extends {yfiles.tree.RotatableNodePlacerBase} - */ - export interface LayeredNodePlacer extends yfiles.tree.RotatableNodePlacerBase{} - export class LayeredNodePlacer { - /** - * Creates a new {@link yfiles.tree.LayeredNodePlacer} instance whose direction is specified by the given modification matrix. - *

- * The given ID identifies different {@link yfiles.tree.LayeredNodePlacer} instances that share the same layer heights. - *

- * @param modificationMatrix the transformation matrix for this {@link } - * @param id the {@link } ID - */ - constructor(modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix,id:any); - /** - * Creates a new {@link yfiles.tree.LayeredNodePlacer} instance with the default settings. - */ - constructor(); - /** - * Gets or sets whether or not the layering is done dendrogram-like. - *

- * When enabled, leaves are placed in the same layer and remaining tree nodes are assigned to a layer as close to their - * children as possible. - *

- * @type {boolean} - */ - dendrogramStyle:boolean; - /** - * Gets or sets the {@link yfiles.tree.RootNodeAlignment RootAlginment} that defines how the root node is aligned with its children and their shapes. - * @type {yfiles.tree.RootNodeAlignment} - */ - rootAlignment:yfiles.tree.RootNodeAlignment; - /** - * Gets or sets the relative vertical alignment of nodes within their respective layers. - *

- * A value of 0 means that nodes are top-aligned; a value of 0.5 means that nodes are center-aligned; a value of 1 means - * that nodes are bottom-aligned; - *

- *

- * Values for a valid vertical alignment are in the range [0..1]. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified alignment is outside [0..1] - * @type {number} - */ - verticalAlignment:number; - /** - * Gets the ID of this {@link yfiles.tree.LayeredNodePlacer}. - *

- * The ID is used for identifying - * {@link yfiles.tree.LayeredNodePlacer}s that share information about the layer height. Using different IDs allows aligned layouts - * within different subtrees. - *

- * @type {any} - */ - id:any; - /** - * Gets or sets the distance between two adjacent layers. - *

- * The spacing needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified spacing is negative - * @type {number} - */ - layerSpacing:number; - /** - * Gets or sets the routing style for the edges in the subtree. - * @throws {Stubs.Exceptions.ArgumentError} if the specified routing style specifier is unknown - * @type {yfiles.tree.LayeredRoutingStyle} - */ - routingStyle:yfiles.tree.LayeredRoutingStyle; - /** - * Gets or sets the vertical bus alignment for orthogonally routed edges. - *

- * The bus alignment determines the relative position of an edge bus in between two subsequent layers of nodes. - *

- *

- * Values for a valid vertical alignment are in the range [0..1], such that: - *

- *
    - *
  • A value of 0.0 places the bus at the top, right below the parent node.
  • - *
  • A value of 0.5 places the bus in the middle between parent and child nodes.
  • - *
  • A value of 1.0 places the bus at the bottom, right above the child nodes.
  • - *
- * @throws {Stubs.Exceptions.ArgumentError} if the specified alignment is outside [0..1] - * @type {number} - */ - busAlignment:number; - /** - * Gets or sets whether or not straight edges are extended to avoid label overlaps. - *

- * If enabled, polyline connectors between the parent and its children are added to the according subtree shape. Node or - * edge labels will not be crossed. - *

- * @type {boolean} - */ - polylineLabeling:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.LayeredNodePlacer; - } - /** - * A {@link yfiles.tree.LeafNodePlacer} creates a {@link yfiles.tree.SubtreeShape SubtreeShape} for a leaf node and routes its incoming edge at the target side. - * @class - * @implements {yfiles.tree.INodePlacer} - */ - export interface LeafNodePlacer extends yfiles.lang.Object,yfiles.tree.INodePlacer{} - export class LeafNodePlacer { - /** - * Creates a new {@link yfiles.tree.LeafNodePlacer} instance with default settings. - */ - constructor(); - /** - * Creates an optional {@link yfiles.tree.IProcessor} for pre- and post-processing. - *

- * This implementation returns null. Hence, no pre- or post-processing is done. - *

- * @param layouter the current {@link } instance - * @param graph the input graph - * @param currentRoot the root node handled by this {@link } - * @returns null - */ - createProcessor(layouter:yfiles.tree.TreeLayout,graph:yfiles.layout.LayoutGraph,currentRoot:yfiles.algorithms.Node):yfiles.tree.IProcessor; - /** - * Does nothing because leaf nodes don't have children so there are no child connectors. - * @param localRoot the local root node - * @param connectorMap the map that must be used for storing the direction specifiers of the child nodes - */ - determineChildConnectors(localRoot:yfiles.algorithms.Node,connectorMap:yfiles.algorithms.IDataMap):void; - /** - * Creates a {@link yfiles.tree.SubtreeShape} for the local root node (a leaf node in this case) and adds target points to the - * incoming edge. - *

- * The incoming edge is routed according to possibly assigned {@link yfiles.layout.PortConstraint}s. - *

- * @param nodeShapeProvider the {@link } for obtaining an initial shape of the root node - * @param subtreeShapeProvider the {@link } for accessing the pre-calculated shapes of the subtrees - * @param graph the input graph - * @param localRoot the root of the subtree that should be arranged by this method - * @param parentConnectorDirection the direction specifier for the connector of the local root node to its parent node - * @returns the {@link } of the leaf node including the connector - */ - placeSubtree(nodeShapeProvider:yfiles.algorithms.IDataProvider,subtreeShapeProvider:yfiles.algorithms.IDataProvider,graph:yfiles.layout.LayoutGraph,localRoot:yfiles.algorithms.Node,parentConnectorDirection:yfiles.tree.ParentConnectorDirection):yfiles.tree.SubtreeShape; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.LeafNodePlacer; - } - /** - * The {@link yfiles.tree.LeftRightNodePlacer} arranges the children in a subtree on the left and the right of a vertical bus. - *

- * Layout Style {@graph {"ann":{"s":[30,30],"d":1},"n":[[35,0],[0,50],[70,50],[0,100],[70,100],[0,150],[70,150],[0,200],[70,200],[35,250]],"e":[[0,1,[50,65]],[0,2,[50,65]],[0,3,[50,115]],[0,4,[50,115]],[0,5,[50,165]],[0,6,[50,165]],[0,7,[50,215]],[0,8,[50,215]],[0,9]],"vp":[0.0,0.0,100.0,280.0]}} - *

- * @class - * @extends {yfiles.tree.RotatableNodePlacerBase} - */ - export interface LeftRightNodePlacer extends yfiles.tree.RotatableNodePlacerBase{} - export class LeftRightNodePlacer { - /** - * Creates a new {@link yfiles.tree.LeftRightNodePlacer} instance using the given modification matrix. - * @param modificationMatrix the transformation matrix for this {@link } - */ - constructor(modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix); - /** - * Creates a new {@link yfiles.tree.LeftRightNodePlacer} instance with default settings. - */ - constructor(); - /** - * Creates a special {@link yfiles.algorithms.IDataProvider} that determines whether a given node is placed left or right of the - * parent node. - *

- * This {@link yfiles.algorithms.IDataProvider} can be registered with the graph with key - * {@link yfiles.tree.LeftRightNodePlacer#LEFT_RIGHT_DP_KEY}. It calculates the side with respect to the initial coordinates of the - * nodes in the graph, considering the orientation of the subtree. - *

- *

- * If a node is assigned to the left side, this {@link yfiles.algorithms.IDataProvider} will return true. For the right side, it - * will return false. - *

- * @param nodePlacerMap a {@link } containing the corresponding {@link }s for the node - * @returns - * @static - */ - static createLeftRightDataProvider(nodePlacerMap:yfiles.algorithms.IDataProvider):yfiles.algorithms.IDataProvider; - /** - * Data provider key for assigning nodes to the left or the right side of the bus - *

- * If no {@link yfiles.algorithms.IDataProvider} is specified using this key, the nodes will be placed alternating from left to - * right. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static LEFT_RIGHT_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets or sets the horizontal distance between nodes or subtrees. - *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @type {number} - */ - horizontalDistance:number; - /** - * Gets or sets the vertical distance between nodes or subtrees. - *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is negative - * @type {number} - */ - verticalDistance:number; - /** - * Sets a uniform horizontal and vertical spacing between subtrees. - *

- * This method sets the given distance value for the {@link yfiles.tree.LeftRightNodePlacer#horizontalDistance horizontal spacing} and for the {@link yfiles.tree.LeftRightNodePlacer#verticalDistance vertical spacing}. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified spacing value is negative - * @see yfiles.tree.LeftRightNodePlacer#horizontalDistance - * @see yfiles.tree.LeftRightNodePlacer#verticalDistance - * @type {number} - */ - spacing:number; - /** - * Gets or sets whether or not the last child is placed centered, aligned with the bus and below the other child nodes. - *

- * When enabled, the last child will always be centered independent of the number of siblings. - *

- * @type {boolean} - */ - placeLastOnBottom:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.LeftRightNodePlacer; - } - /** - * The {@link yfiles.tree.MultiParentDescriptor} provides style information for multi-parent structures. - *

- * This class is used by {@link yfiles.tree.TreeLayout} to determine the desired layout of nodes that constitute a multi-parent - * structure. All nodes of such a structure are placed side by side and the incident edges are routed over common points - * for incoming edges and for outgoing edges. - *

- *

- * {@graph {"ann":{"s":[40,40],"d":1},"n":[[411.25,0],[682.5,85],[210,155],[612.5,165],[35,225],[577.5,235],[385,320.5],[682.5,155,40,60],[70,305],[210,85],[0,295,40,60],[0,385],[210,225],[700,320.5],[175,295],[245,295],[315,225],[752.5,165],[420,405.5],[647.5,235],[752.5,235],[770,406],[140,380.5,40,60],[210,390.5],[315,295,40,60],[490,405.5],[175,485.5],[455,320.5],[481.25,0],[700,406],[560,406],[630,406],[560,491],[630,491],[525,320.5],[280,380.5,40,60],[70,390.5]],"e":[[0,1,[431.25,55.5,466.25,55.5,466.25,70,702.5,70]],[1,3,[702.5,140,632.5,140]],[2,4,[230,210,55,210]],[3,5,[632.5,220,597.5,220]],[5,6,[597.5,290,475,290,475,305,405,305]],[1,7],[4,8,[55,280,90,280]],[0,9,[431.25,55.5,466.25,55.5,466.25,70,230,70]],[9,2],[4,10,[55,280,20,280]],[10,11],[2,12],[5,13,[597.5,290,720,290]],[12,14,[230,280,195,280]],[12,15,[230,280,265,280]],[2,16,[230,210,335,210]],[1,17,[702.5,140,772.5,140]],[6,18,[405,376,475,376,475,390.5,440,390.5]],[3,19,[632.5,220,667.5,220]],[17,20],[13,21,[720,375.5,790,375.5]],[14,22,[195,365,160,365]],[14,23,[195,365,230,365]],[16,24],[6,25,[405,376,475,376,475,390.5,510,390.5]],[22,26,[160,456,195,456]],[23,26,[230,456,195,456]],[5,27,[597.5,290,475,290]],[27,18,[475,390.5,440,390.5]],[27,25,[475,390.5,510,390.5]],[28,9,[501.25,55.5,466.25,55.5,466.25,70,230,70]],[28,1,[501.25,55.5,466.25,55.5,466.25,70,702.5,70]],[13,29],[13,30,[720,375.5,615,375.5,615,390.5,580,390.5]],[13,31,[720,375.5,615,375.5,615,390.5,650,390.5]],[30,32,[580,461.5,615,461.5,615,476,580,476]],[31,32,[650,461.5,615,461.5,615,476,580,476]],[30,33,[580,461.5,615,461.5,615,476,650,476]],[31,33,[650,461.5,615,461.5,615,476,650,476]],[5,34,[597.5,290,475,290,475,305,545,305]],[34,18,[545,376,475,376,475,390.5,440,390.5]],[34,25,[545,376,475,376,475,390.5,510,390.5]],[14,35,[195,365,300,365]],[35,26,[300,456,195,456]],[14,36,[195,365,90,365]],[36,26,[90,456,195,456]]],"vp":[0.0,0.0,810.0,531.0]}} - *

- *

- * A tree graph containing multi-parent structures - *

- * @see yfiles.tree.TreeLayout#MULTI_PARENT_DESCRIPTOR_DP_KEY - * @class - */ - export interface MultiParentDescriptor extends yfiles.lang.Object{} - export class MultiParentDescriptor { - /** - * Creates a new {@link yfiles.tree.MultiParentDescriptor} instance with default settings. - */ - constructor(); - /** - * Gets or sets the minimum distance between two nodes belonging to the same multi-parent structure. - *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given node distance is negative - * @type {number} - */ - minimumNodeDistance:number; - /** - * Gets or sets the minimum distance between the nodes of a multi-parent structure and the bus connecting these nodes. - *

- * In case the edge style is not orthogonal, the bus only consists of a common point. - *

- *

- * The minimum distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given bus distance is negative - * @type {number} - */ - minimumBusDistance:number; - /** - * Gets or sets the relative vertical alignment of nodes belonging to the same multi-parent structure. - *

- * A value of 0 means that nodes are top-aligned; a value of 1 means that nodes are bottom-aligned; a value of 0.5 means - * that nodes are center-aligned. - *

- *

- * Values outside the interval [0,1] will result in a compact node placement with unaligned nodes, especially when labels - * are considered. - *

- * @type {number} - */ - verticalAlignment:number; - /** - * Gets or sets the routing style for edges that connect to nodes which constitute a multi-parent structure. - * @throws {Stubs.Exceptions.ArgumentError} if the given routing style is unknown - * @type {yfiles.tree.MultiParentRoutingStyle} - */ - edgeStyle:yfiles.tree.MultiParentRoutingStyle; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.MultiParentDescriptor; - } - /** - * The {@link yfiles.tree.NodeOrderComparer} compares edges according to a specified order. - *

- * It obtains the order from a {@link yfiles.algorithms.IDataProvider} registered with the graph with key - * {@link yfiles.tree.NodeOrderComparer#NODE_ORDER_COMPARABLE_DP_KEY}. - *

- *

- * Various tree layout algorithms can use this {@link yfiles.collections.IComparer.} to influence the resulting layout. To achieve this, use this comparator and - * assign it to the comparator property of the layout algorithm classes. - *

- * @see yfiles.tree.ClassicTreeLayout#comparer - * @see yfiles.tree.TreeLayout#defaultOutEdgeComparer - * @see yfiles.tree.TreeLayout#OUT_EDGE_COMPARER_DP_KEY - * @see yfiles.tree.BalloonLayout#comparer - * @see yfiles.tree.AspectRatioTreeLayout#comparer - * @see yfiles.tree.NodeOrderComparer#NODE_ORDER_COMPARABLE_DP_KEY - * @class - * @implements {yfiles.collections.IComparer.} - */ - export interface NodeOrderComparer extends yfiles.lang.Object,yfiles.collections.IComparer{} - export class NodeOrderComparer { - /** - * Creates a new {@link yfiles.tree.NodeOrderComparer} instance. - */ - constructor(); - /** - * Compares two edges according to their index in the order specified using a {@link yfiles.algorithms.IDataProvider}. - *

- * Target nodes for which the {@link yfiles.algorithms.IDataProvider} registered with {@link yfiles.tree.NodeOrderComparer#NODE_ORDER_COMPARABLE_DP_KEY} - * returns null or an {@link any} that does not implement {@link yfiles.lang.IComparable} are treated as being smaller than other target - * nodes. - *

- * @param edge1 the first edge - * @param edge2 the second edge - * @returns - * @see yfiles.tree.NodeOrderComparer#NODE_ORDER_COMPARABLE_DP_KEY - */ - compare(edge1:any,edge2:any):number; - /** - * Data provider key for registering an order for each node in the graph - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static NODE_ORDER_COMPARABLE_DP_KEY:yfiles.algorithms.NodeDpKey; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.NodeOrderComparer; - } - /** - * Abstract base class for implementations of the {@link yfiles.tree.INodePlacer} interface. - *

- * This class provides convenience methods for sub-tasks that are often used during the arrangement of a local root and its - * children. It also offers prepared implementations for the methods of the {@link yfiles.tree.INodePlacer} interface. - *

- *

- * Subclasses just need to override the following two abstract methods: {@link yfiles.tree.NodePlacerBase#placeSubtreeOfNode} and - * {@link yfiles.tree.NodePlacerBase#determineChildConnectors}. - *

- * @class - * @implements {yfiles.tree.INodePlacer} - * @implements {yfiles.lang.ICloneable} - */ - export interface NodePlacerBase extends yfiles.lang.Object,yfiles.tree.INodePlacer,yfiles.lang.ICloneable{} - export class NodePlacerBase { - /** - * Creates a new instance of {@link yfiles.tree.NodePlacerBase}. - */ - constructor(); - /** - * Returns a clone of this {@link yfiles.tree.INodePlacer} instance. - * @returns an exact copy of this {@link } instance - */ - clone():any; - /** - * Creates an optional {@link yfiles.tree.IProcessor} for pre- and post-processing. - *

- * This implementation returns null. Hence, no pre- or post-processing will be done. - *

- * @param layouter the current {@link } instance - * @param graph the input graph - * @param currentRoot the root node handled by this {@link } - * @returns null - */ - createProcessor(layouter:yfiles.tree.TreeLayout,graph:yfiles.layout.LayoutGraph,currentRoot:yfiles.algorithms.Node):yfiles.tree.IProcessor; - /** - * Determines a connector direction for the given child node. - *

- * This method is used in {@link yfiles.tree.NodePlacerBase#determineChildConnectors} and must be implemented by subclasses. - *

- * @param child the child node - * @returns a direction specifier as defined in the {@link } interface - * @protected - * @abstract - */ - determineChildConnector(child:yfiles.algorithms.Node):yfiles.tree.ParentConnectorDirection; - /** - * Provides the direction of the connector to the {@link yfiles.tree.SubtreeShape SubtreeShape} for each child node. - *

- * This implementation uses {@link yfiles.tree.NodePlacerBase#determineChildConnector} to retrieve the direction for the - * connectors. - *

- * @param localRoot the local root node - * @param connectorMap the map that must be used for storing the direction specifiers of the child nodes - */ - determineChildConnectors(localRoot:yfiles.algorithms.Node,connectorMap:yfiles.algorithms.IDataMap):void; - /** - * Returns the {@link yfiles.tree.SubtreeShape} for the given node. - *

- * This is a convenience method that retrieves a {@link yfiles.tree.SubtreeShape} for a single node from the corresponding - * {@link yfiles.algorithms.IDataProvider}. - *

- *

- * This method is used in {@link yfiles.tree.NodePlacerBase#placeSubtreeOfNode} for retrieving the {@link yfiles.tree.SubtreeShape}s for - * the local root nodes. It may be overridden to return a custom implementation of {@link yfiles.tree.SubtreeShape}. - *

- * @param node the node - * @returns the {@link } for the given node - * @protected - */ - getNodeShape(node:yfiles.algorithms.Node):yfiles.tree.SubtreeShape; - /** - * Returns the {@link yfiles.tree.SubtreeShape} for the subtree rooted at the given node. - *

- * This is a convenience method that retrieves a {@link yfiles.tree.SubtreeShape} of a complete subtree from the corresponding - * {@link yfiles.algorithms.IDataProvider}. - *

- *

- * This method is used in {@link yfiles.tree.NodePlacerBase#placeSubtreeOfNode} for retrieving the {@link yfiles.tree.SubtreeShape}s for - * the subtrees that are arranged. It may be overridden to return a custom implementation of {@link yfiles.tree.SubtreeShape}. - *

- * @param node the local root node - * @returns the {@link } of the subtree rooted at the given local root node - * @protected - */ - getSubtreeShape(node:yfiles.algorithms.Node):yfiles.tree.SubtreeShape; - /** - * Initializes the local data structures and then delegates the work to the abstract variant of this method - * ({@link yfiles.tree.NodePlacerBase#placeSubtreeOfNode}) - * @param nodeShapeProvider the {@link } for obtaining an initial shape of the root node - * @param subtreeShapeProvider the {@link } for accessing the pre-calculated shapes of the subtrees - * @param graph the input graph - * @param localRoot the root of the subtree that should be arranged by this method - * @param parentConnectorDirection the direction specifier for the connector of the local root node to its parent node - * @returns the merged {@link } for the subtree rooted at the local root node - * @see yfiles.tree.NodePlacerBase#placeSubtreeOfNode - */ - placeSubtree(nodeShapeProvider:yfiles.algorithms.IDataProvider,subtreeShapeProvider:yfiles.algorithms.IDataProvider,graph:yfiles.layout.LayoutGraph,localRoot:yfiles.algorithms.Node,parentConnectorDirection:yfiles.tree.ParentConnectorDirection):yfiles.tree.SubtreeShape; - /** - * Arranges the local root relative to the {@link yfiles.tree.SubtreeShape} of its children. - *

- * This is the main method that must be implemented by subclasses. It is called by - * {@link yfiles.tree.NodePlacerBase#placeSubtree}. - *

- * @param localRoot the local root node - * @param parentConnectorDirection the direction of the connector - * @returns a {@link } instance that describes the shape of the whole subtree rooted at the given local root - * @protected - * @abstract - */ - placeSubtreeOfNode(localRoot:yfiles.algorithms.Node,parentConnectorDirection:yfiles.tree.ParentConnectorDirection):yfiles.tree.SubtreeShape; - /** - * The graph instance this class is working on. - * @protected - * @type {yfiles.layout.LayoutGraph} - */ - graph:yfiles.layout.LayoutGraph; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.NodePlacerBase; - } - /** - * A {@link yfiles.tree.RootNodeAlignment} describes how a local root node is arranged in relation to its children. - *

- * The actual placement depends on the orientation of the subtree rooted at the current local root node. All descriptions - * of the provided alignments refer to the top-to-bottom orientation described by - * {@link yfiles.tree.RotatableNodePlacerMatrix#DEFAULT}. In this case, the subtrees are placed below the local root and the local - * root is aligned horizontally above them. - *

- * @class - */ - export interface RootNodeAlignment extends yfiles.lang.Object{} - export class RootNodeAlignment { - /** - * Calculates the common bounds of the given subtree shapes. - *

- * This method can be used when placing the local root above its subtrees in method - * {@link yfiles.tree.RootNodeAlignment#placeParentHorizontal}. - *

- * @param shapes a list of rotated subtree shapes - * @returns the rectangle describing the bounds containing all given shapes - * @protected - * @static - */ - static getBounds(shapes:yfiles.collections.IList):yfiles.algorithms.Rectangle2D; - /** - * Moves the shape of the local root to a suitable position relative to the children's shapes. - *

- * The movement should only be done on the x-axis (horizontally). - *

- *

- * This method is called by {@link yfiles.tree.RotatableNodePlacerBase}s when they {@link yfiles.tree.RotatableNodePlacerBase#placeSubtreeOfNode place the subtrees}. - *

- * @param rootShape the shape of the local root node that will be moved - * @param shapes a list of rotated subtree shapes, representing the shapes of the child nodes - * @param shapeBounds accumulated bounds of the shapes of all child nodes - * @param spacing the spacing value that should be used - * @protected - * @abstract - */ - placeParentHorizontal(rootShape:yfiles.tree.RotatedSubtreeShape,shapes:yfiles.collections.IList,shapeBounds:yfiles.algorithms.Rectangle2D,spacing:number):void; - /** - * Horizontal {@link yfiles.tree.RootNodeAlignment} at the center of the subtrees. - *

- * The root node is placed centered above its whole subgraph. To determine the alignment, only {@link yfiles.layout.INodeLayout}s - * are considered. Node labels are not included although they are also contained in {@link yfiles.tree.SubtreeShape}s. - *

- * @const - * @static - * @type {yfiles.tree.RootNodeAlignment} - */ - static CENTER:yfiles.tree.RootNodeAlignment; - /** - * Horizontal {@link yfiles.tree.RootNodeAlignment} at the median child node. - *

- * The root node is placed above the median of its children. To determine the alignment, only {@link yfiles.layout.INodeLayout}s - * are considered. Node labels are not included although they are also contained in {@link yfiles.tree.SubtreeShape}s. - *

- * @const - * @static - * @type {yfiles.tree.RootNodeAlignment} - */ - static MEDIAN:yfiles.tree.RootNodeAlignment; - /** - * Horizontal {@link yfiles.tree.RootNodeAlignment} left of the children. - *

- * The local root node leaves a distance specified by the given spacing to the leftmost child. To determine the alignment, - * only {@link yfiles.layout.INodeLayout}s are considered. Node labels are not included although they are also contained in - * {@link yfiles.tree.SubtreeShape}s. - *

- * @const - * @static - * @type {yfiles.tree.RootNodeAlignment} - */ - static LEADING:yfiles.tree.RootNodeAlignment; - /** - * Horizontal {@link yfiles.tree.RootNodeAlignment} right of the children. - *

- * The root node leaves a distance specified by the given spacing to the rightmost child. To determine the alignment, only - * {@link yfiles.layout.INodeLayout}s are considered. Node labels are not included although they are also contained in - * {@link yfiles.tree.SubtreeShape}s. - *

- * @const - * @static - * @type {yfiles.tree.RootNodeAlignment} - */ - static TRAILING:yfiles.tree.RootNodeAlignment; - /** - * Horizontal {@link yfiles.tree.RootNodeAlignment} at the left side. - *

- * The root node is placed left aligned with its leftmost child. To determine the alignment, only - * {@link yfiles.layout.INodeLayout}s are considered. Node labels are not included although they are also contained in - * {@link yfiles.tree.SubtreeShape}s. - *

- * @const - * @static - * @type {yfiles.tree.RootNodeAlignment} - */ - static LEFT:yfiles.tree.RootNodeAlignment; - /** - * Horizontal {@link yfiles.tree.RootNodeAlignment} at the right side. - *

- * The root node is placed right aligned with its rightmost child. To determine the alignment, only - * {@link yfiles.layout.INodeLayout}s are considered. Node labels are not included although they are also contained in - * {@link yfiles.tree.SubtreeShape}s. - *

- * @const - * @static - * @type {yfiles.tree.RootNodeAlignment} - */ - static RIGHT:yfiles.tree.RootNodeAlignment; - /** - * Horizontal alignment at the center of the children. - *

- * The root node is placed centered over its direct children. To determine the alignment, only {@link yfiles.layout.INodeLayout}s - * are considered. Node labels are not included although they are also contained in {@link yfiles.tree.SubtreeShape}s. - *

- * @const - * @static - * @type {yfiles.tree.RootNodeAlignment} - */ - static CENTER_OVER_CHILDREN:yfiles.tree.RootNodeAlignment; - /** - * An array containing all supported {@link yfiles.tree.RootNodeAlignment}s. - * @const - * @static - * @type {Array.} - */ - static ALL:yfiles.tree.RootNodeAlignment[]; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.RootNodeAlignment; - } - /** - * A matrix describes the rotation of the subtree handled by {@link yfiles.tree.RotatableNodePlacerBase}. - *

- * Subtrees may be rotated or mirrored. Also, matrices offering a combination of rotation and mirroring are provided. - *

- * @class - */ - export interface RotatableNodePlacerMatrix extends yfiles.lang.Object{} - export class RotatableNodePlacerMatrix { - /** - * Compares the values of the current {@link yfiles.tree.RotatableNodePlacerMatrix} with the values of the given - * {@link yfiles.tree.RotatableNodePlacerMatrix}. - * @param other the matrix - * @returns true if this matrix and the given other matrix contain the same values, false otherwise - */ - equalValues(other:yfiles.tree.RotatableNodePlacerMatrix):boolean; - /** - * Multiplies this {@link yfiles.tree.RotatableNodePlacerMatrix} with the given other {@link yfiles.tree.RotatableNodePlacerMatrix}. - * @param other the other matrix - * @returns the product of both matrices - */ - multiply(other:yfiles.tree.RotatableNodePlacerMatrix):yfiles.tree.RotatableNodePlacerMatrix; - /** - * The identity matrix which does not apply any rotation or mirroring. - * @const - * @static - * @type {yfiles.tree.RotatableNodePlacerMatrix} - */ - static DEFAULT:yfiles.tree.RotatableNodePlacerMatrix; - /** - * A matrix which applies a counter-clockwise rotation by 90 degrees. - * @const - * @static - * @type {yfiles.tree.RotatableNodePlacerMatrix} - */ - static ROT90:yfiles.tree.RotatableNodePlacerMatrix; - /** - * A matrix which applies a rotation by 180 degrees. - * @const - * @static - * @type {yfiles.tree.RotatableNodePlacerMatrix} - */ - static ROT180:yfiles.tree.RotatableNodePlacerMatrix; - /** - * A matrix which applies a counter-clockwise rotation by 270 degrees. - * @const - * @static - * @type {yfiles.tree.RotatableNodePlacerMatrix} - */ - static ROT270:yfiles.tree.RotatableNodePlacerMatrix; - /** - * A matrix which applies a horizontal mirroring. - * @const - * @static - * @type {yfiles.tree.RotatableNodePlacerMatrix} - */ - static MIR_HOR:yfiles.tree.RotatableNodePlacerMatrix; - /** - * A matrix which applies a vertical mirroring. - * @const - * @static - * @type {yfiles.tree.RotatableNodePlacerMatrix} - */ - static MIR_VERT:yfiles.tree.RotatableNodePlacerMatrix; - /** - * A matrix which applies a horizontal mirroring and a counter-clockwise rotation by 90 degrees. - * @const - * @static - * @type {yfiles.tree.RotatableNodePlacerMatrix} - */ - static MIR_HOR_ROT90:yfiles.tree.RotatableNodePlacerMatrix; - /** - * A matrix which applies a vertical mirroring and a counter-clockwise rotation by 90 degrees. - * @const - * @static - * @type {yfiles.tree.RotatableNodePlacerMatrix} - */ - static MIR_VERT_ROT90:yfiles.tree.RotatableNodePlacerMatrix; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.RotatableNodePlacerMatrix; - } - /** - * Abstract base class for {@link yfiles.tree.INodePlacer}s that support rotations of the subtrees. - *

- * The direction specified in this {@link yfiles.tree.RotatableNodePlacerBase} (defined by a - * {@link yfiles.tree.RotatableNodePlacerBase#modificationMatrix transformation matrix}) rotates the subtree that is placed. This is the final direction of this subtree. Rotations are - * not accumulated. - *

- *

- * {@link yfiles.tree.INodePlacer}s of this type will only implement the default direction (i.e. top-to-bottom). The other - * directions are calculated using the specified modification {@link yfiles.tree.RotatableNodePlacerMatrix}. The direction used by - * the implementing - * {@link yfiles.tree.INodePlacer}s is called the model direction while the actual direction in the graph is the real direction. - *

- *

- * Note that using rotatable {@link yfiles.tree.INodePlacer}s has some pitfalls. Calculations must be aware of the rotations. - * Especially operations on {@link yfiles.algorithms.BorderLine}s should not be called directly (e.g. - * {@link yfiles.algorithms.BorderLine#mergeWithMin}, {@link yfiles.algorithms.BorderLine#mergeWithMax}). The corresponding methods of {@link yfiles.tree.RotatableNodePlacerBase} - * already support the different directions. - *

- *

- * Subclasses just need to override the following two abstract methods: {@link yfiles.tree.RotatableNodePlacerBase#placeSubtreeOfNode} - * and {@link yfiles.tree.RotatableNodePlacerBase#determineChildConnectors}. - *

- * @class - * @implements {yfiles.tree.IFromSketchNodePlacer} - */ - export interface RotatableNodePlacerBase extends yfiles.lang.Object,yfiles.tree.IFromSketchNodePlacer{} - export class RotatableNodePlacerBase { - /** - * Creates a new instance of {@link yfiles.tree.RotatableNodePlacerBase} whose direction is specified by the given modification - * matrix. - * @param modificationMatrix the transformation matrix for the {@link } - * @protected - */ - constructor(modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix); - /** - * Creates a {@link yfiles.collections.IComparer.} for outgoing edges that takes the rotation into account. - * @returns the {@link } that considers the rotation - */ - createComparer():yfiles.collections.IComparer; - /** - * Delegates to {@link yfiles.tree.RotatableNodePlacerBase#createComparer}. - * @returns the From Sketch {@link } - * @see yfiles.tree.RotatableNodePlacerBase#createComparer - */ - createFromSketchComparer():yfiles.collections.IComparer; - /** - * Creates an optional {@link yfiles.tree.IProcessor} for pre- and post-processing. - *

- * This implementation returns null. Hence, no pre- or post-processing is done. - *

- * @param layouter the current {@link } instance - * @param graph the input graph - * @param currentRoot the root node handled by this {@link } - * @returns null - */ - createProcessor(layouter:yfiles.tree.TreeLayout,graph:yfiles.layout.LayoutGraph,currentRoot:yfiles.algorithms.Node):yfiles.tree.IProcessor; - /** - * Determines a connector direction for the given child node. - *

- * This method is called by {@link yfiles.tree.RotatableNodePlacerBase#determineChildConnectors} and must be implemented by - * subclasses. Implementations can assume the default direction (top-to-bottom) for their arrangement. - *

- * @param child the child node - * @returns a direction specifier as defined in the {@link } interface - * @protected - * @abstract - */ - determineChildConnector(child:yfiles.algorithms.Node):yfiles.tree.ParentConnectorDirection; - /** - * Provides the direction of the connector to the {@link yfiles.tree.SubtreeShape SubtreeShape} for each child node. - *

- * This implementation uses {@link yfiles.tree.RotatableNodePlacerBase#determineChildConnector} and the {@link yfiles.tree.RotatableNodePlacerBase#modificationMatrix modification matrix} to - * retrieve the direction for the connectors. - *

- * @param localRoot the local root - * @param connectorMap the map that must be used for storing the direction specifiers of the child nodes - * @see yfiles.tree.RotatableNodePlacerBase#determineChildConnector - */ - determineChildConnectors(localRoot:yfiles.algorithms.Node,connectorMap:yfiles.algorithms.IDataMap):void; - /** - * Returns the rotated subtree shape for the given node. - *

- * This is a convenience method that retrieves a rotated subtree shape for a single node from the corresponding - * {@link yfiles.algorithms.IDataProvider}. This shape may be modified and returned by - * {@link yfiles.tree.RotatableNodePlacerBase#placeSubtreeOfNode}. - *

- * @param node the node - * @returns the subtree shape for the given node - * @protected - */ - getNodeShape(node:yfiles.algorithms.Node):yfiles.tree.RotatedSubtreeShape; - /** - * Returns the target {@link yfiles.layout.PortConstraint} for the local root's incoming edge. - *

- * This method translates the {@link yfiles.layout.PortConstraint} according to the rotation described by the {@link yfiles.tree.RotatableNodePlacerBase#modificationMatrix modification matrix}. - * It should be used instead of {@link yfiles.layout.PortConstraint#getTPC}. - *

- *

- * This method may be used in {@link yfiles.tree.RotatableNodePlacerBase#placeSubtreeOfNode} to route the edges to the according - * port. It may be overridden to provide constant {@link yfiles.layout.PortConstraint}s for each node. - *

- * @param localRoot the local root - * @returns the {@link } for the incoming edge of the local root or {@link #ANY} if no {@link } - * is assigned for that edge - * @protected - */ - getPortConstraint(localRoot:yfiles.algorithms.Node):yfiles.layout.PortConstraint; - /** - * Returns the absolute source point of the given edge depending on the rotation of this {@link yfiles.tree.INodePlacer}. - *

- * This method translates the source point according to the rotation described by the {@link yfiles.tree.RotatableNodePlacerBase#modificationMatrix modification matrix}. It should be - * used instead of {@link yfiles.layout.LayoutGraph#getSourcePointAbs}. - *

- *

- * It can be used in an implementation of {@link yfiles.tree.RotatableNodePlacerBase#placeSubtreeOfNode}. - *

- * @param edge the edge whose absolute source point should be calculated - * @returns the translated absolute source point for the given edge and current modification matrix - * @protected - */ - getSourcePointAbs(edge:yfiles.algorithms.Edge):yfiles.algorithms.YPoint; - /** - * Returns the rotated subtree shape for the subtree rooted at the given node. - *

- * This is a convenience method that retrieves a subtree shape of a complete subtree from the corresponding - * {@link yfiles.algorithms.IDataProvider}. - *

- * @param node the local root node - * @returns the rotated subtree shape of the subtree rooted at the given local root node - * @protected - */ - getSubtreeShape(node:yfiles.algorithms.Node):yfiles.tree.RotatedSubtreeShape; - /** - * Initializes the local data structures and then delegates the work to the abstract variant of this method - * ({@link yfiles.tree.RotatableNodePlacerBase#placeSubtreeOfNode}). - * @param nodeShapeProvider the {@link } for obtaining an initial shape of the root node - * @param subtreeShapeProvider the {@link } for accessing the pre-calculated shapes of the subtrees - * @param graph the input graph - * @param localRoot the root of the subtree that should be arranged by this method - * @param parentConnectorDirection the direction specifier for the connector of the local root node to its parent node - * @returns the merged {@link } for the subtree rooted at the local root node - * @see yfiles.tree.RotatableNodePlacerBase#placeSubtreeOfNode - */ - placeSubtree(nodeShapeProvider:yfiles.algorithms.IDataProvider,subtreeShapeProvider:yfiles.algorithms.IDataProvider,graph:yfiles.layout.LayoutGraph,localRoot:yfiles.algorithms.Node,parentConnectorDirection:yfiles.tree.ParentConnectorDirection):yfiles.tree.SubtreeShape; - /** - * Arranges the local root relative to the rotated subtree shapes of its children. - *

- * This is the main method that must be implemented by subclasses. For calculations and locations subclasses should use the - * corresponding methods of {@link yfiles.tree.RotatableNodePlacerBase} which already consider the {@link yfiles.tree.RotatableNodePlacerBase#modificationMatrix modification matrix}. - *

- * @param localRoot the local root node - * @param parentConnectorDirection the direction specifier for the connector of the local root node to its parent node - * @returns the merged subtree shape that contains the local root node and all its children - * @protected - * @abstract - */ - placeSubtreeOfNode(localRoot:yfiles.algorithms.Node,parentConnectorDirection:yfiles.tree.ParentConnectorDirection):yfiles.tree.RotatedSubtreeShape; - /** - * Translates the given real direction of the resulting layout to the model direction of this - * {@link yfiles.tree.RotatableNodePlacerBase}. - *

- * This method is used in {@link yfiles.tree.RotatableNodePlacerBase#placeSubtreeOfNode} to be able to retrieve the model direction - * for the connector - *

- * @param realDirection the real direction - * @returns the model direction - * @throws {Stubs.Exceptions.ArgumentError} if translation for the given real direction is not implemented - * @protected - */ - translateDirectionToModel(realDirection:yfiles.tree.ParentConnectorDirection):number; - /** - * Translates the given model direction to the real direction in the resulting layout. - *

- * This method is used in {@link yfiles.tree.RotatableNodePlacerBase#determineChildConnectors} to be able to return the real - * connector direction. - *

- * @param modelDirection the model direction - * @returns the real direction - * @throws {Stubs.Exceptions.ArgumentError} if translation for the given model direction is not implemented - * @protected - */ - translateDirectionToReal(modelDirection:yfiles.tree.ParentConnectorDirection):number; - /** - * Translates a point from the real layout direction to the model direction using the given modification matrix. - * @param modificationMatrix the modification matrix to use for the translation - * @param realWorldPoint the point with coordinates from the real world - * @returns the translated point with coordinates from the model - * @static - */ - static translatePoint(modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix,realWorldPoint:yfiles.algorithms.YPoint):yfiles.algorithms.YPoint; - /** - * The graph instance this {@link yfiles.tree.INodePlacer} is working on. - * @protected - * @type {yfiles.layout.LayoutGraph} - */ - graph:yfiles.layout.LayoutGraph; - /** - * The provider of {@link yfiles.tree.SubtreeShape}s for whole subtrees. - * @protected - * @type {yfiles.algorithms.IDataProvider} - */ - subtreeShapeProvider:yfiles.algorithms.IDataProvider; - /** - * The provider of {@link yfiles.tree.SubtreeShape}s for single nodes. - * @protected - * @type {yfiles.algorithms.IDataProvider} - */ - nodeShapeProvider:yfiles.algorithms.IDataProvider; - /** - * The list containing the created children. - * @protected - * @type {yfiles.collections.IList.} - */ - createdChildren:yfiles.collections.IList; - /** - * Gets the modification matrix that defines the direction of the subtree. - * @type {yfiles.tree.RotatableNodePlacerMatrix} - */ - modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix; - /** - * Gets or sets the spacing between subtrees. - *

- * The spacing needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given spacing is negative - * @type {number} - */ - spacing:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.RotatableNodePlacerBase; - } - /** - * Decorates a SubtreeShape and provides rotated access on it. - * @class - */ - export interface RotatedSubtreeShape extends yfiles.lang.Object{} - export class RotatedSubtreeShape { - /** - * For testing purposes only - * @protected - */ - constructor(); - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.RotatedSubtreeShape; - } - /** - * The {@link yfiles.tree.SimpleNodePlacer} arranges all children of a local root in a single row. - *

- * Layout Style {@graph {"ann":{"s":[30,30],"d":1},"n":[[0,0],[50,50],[235,50],[370,50],[720,50],[100,100],[770,100],[285,100],[420,50],[520,50],[570,100],[670,100],[150,150],[720,150],[470,100],[335,100],[620,150],[820,150],[520,150],[185,100]],"e":[[0,1,[65,15]],[0,2,[250,15]],[0,3,[385,15]],[0,4,[735,15]],[1,5,[115,65]],[4,6,[785,65]],[2,7,[300,65]],[0,8,[435,15]],[0,9,[535,15]],[9,10,[585,65]],[9,11,[685,65]],[5,12,[165,115]],[11,13,[735,115]],[8,14,[485,65]],[2,15,[350,65]],[10,16,[635,115]],[6,17,[835,115]],[14,18,[535,115]],[1,19,[200,65]]],"vp":[0.0,0.0,850.0,180.0]}} - *

- * @class - * @extends {yfiles.tree.RotatableNodePlacerBase} - */ - export interface SimpleNodePlacer extends yfiles.tree.RotatableNodePlacerBase{} - export class SimpleNodePlacer { - /** - * Creates a new {@link yfiles.tree.SimpleNodePlacer} instance that uses the given {@link yfiles.tree.RotatableNodePlacerBase#modificationMatrix modification matrix} and {@link yfiles.tree.SimpleNodePlacer#rootAlignment root alignment}. - * @param modificationMatrix the transformation matrix for this {@link } - * @param rootAlignment the alignment for the local root in relation to its subtrees - */ - constructor(modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix,rootAlignment:yfiles.tree.RootNodeAlignment); - /** - * Creates a new {@link yfiles.tree.SimpleNodePlacer} instance that uses the given {@link yfiles.tree.RotatableNodePlacerBase#modificationMatrix modification matrix}. - * @param modificationMatrix the transformation matrix for this {@link } - */ - constructor(modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix); - /** - * Creates a new {@link yfiles.tree.SimpleNodePlacer} instance with default settings. - */ - constructor(); - /** - * Gets or sets the {@link yfiles.tree.RootNodeAlignment RootAlignment} that defines how the root node is aligned with its children and their shapes. - * @type {yfiles.tree.RootNodeAlignment} - */ - rootAlignment:yfiles.tree.RootNodeAlignment; - /** - * Gets or sets the relative vertical alignment of nodes with the same parent. - *

- * All values between 0 and 1 result in a valid alignment. - *

- *
    - *
  • 0 - nodes are top-aligned
  • - *
  • 0.5 - nodes are center-aligned
  • - *
  • 1 - nodes are bottom-aligned
  • - *
- *

- * Values outside the interval [0,1] may result in a more compact node placement with unaligned nodes, especially when - * labels are considered. - *

- * @type {number} - */ - verticalAlignment:number; - /** - * Gets or sets whether or not a bus is created in the space between the parent and its children. - * @type {boolean} - */ - createBus:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.SimpleNodePlacer; - } - /** - * The {@link yfiles.tree.TreeComponentLayout} arranges tree-like subgraph structures in a mixed layout style. - *

- * {@graph {"ann":{"s":[37.5,37.5],"d":1},"n":[[-18.75,231.25],[56.25,231.25],[131.25,231.25],[-18.75,631.25],[631.25,231.25],[631.25,631.25],[131.25,631.25],[-18.75,-18.75],[631.25,-18.75],[631.25,131.25],[631.25,56.25],[131.25,406.25],[131.25,556.25],[447.5,75,1],[560,162.5,1],[497.5,162.5,1],[391.25,343.75,1],[328.75,343.75,1],[247.5,500,1],[247.5,587.5,1],[310,500,1],[310,587.5,1],[266.25,343.75,1],[272.5,75,1],[385,162.5,1],[322.5,162.5,1],[97.5,75,1],[210,162.5,1],[147.5,162.5,1]],"e":[[0,1,18.75,-0,-18.75,-0],[1,2,18.75,-0,-18.75,-0],[0,3,-0,18.75,-0,-18.75],[2,4,18.75,-0,-18.75,-0],[4,5,-0,18.75,-0,-18.75],[5,6,-18.75,-0,18.75,-0],[6,3,-18.75,-0,18.75,-0],[0,7,-0,-18.75,-0,18.75],[7,8,18.75,-0,-18.75,-0],[4,9,-0,-18.75,-0,18.75],[8,10,-0,18.75,-0,-18.75],[10,9,-0,18.75,-0,-18.75],[11,2,-0,-18.75,-0,18.75],[11,12,-0,18.75,-0,-18.75],[6,12,-0,-18.75,-0,18.75],[7,13,18.75,12.5,0,0,[52.5,12.5,52.5,50,466.25,50]],[13,14,-13.75,0,-0,-0,[452.5,137.5,578.75,137.5]],[13,15,-13.75,0,-0,-0,[452.5,137.5,516.25,137.5]],[2,16,18.75,12.5,0,0,[221.25,262.5,221.25,318.75,410,318.75]],[2,17,18.75,12.5,0,0,[221.25,262.5,221.25,318.75,347.5,318.75]],[11,18,18.75,-0,0,0,[202.5,425,202.5,475,266.25,475]],[11,19,18.75,-0,0,0,[202.5,425,202.5,562.5,266.25,562.5]],[11,20,18.75,-0,0,0,[202.5,425,202.5,475,328.75,475]],[11,21,18.75,-0,0,0,[202.5,425,202.5,562.5,328.75,562.5]],[2,22,18.75,12.5,0,0,[221.25,262.5,221.25,318.75,285,318.75]],[7,23,18.75,12.5,0,0,[52.5,12.5,52.5,50,291.25,50]],[23,24,-13.75,0,-0,-0,[277.5,137.5,403.75,137.5]],[23,25,-13.75,0,-0,-0,[277.5,137.5,341.25,137.5]],[7,26,18.75,12.5,0,0,[52.5,12.5,52.5,50,116.25,50]],[26,27,-13.75,0,-0,-0,[102.5,137.5,228.75,137.5]],[26,28,-13.75,0,-0,-0,[102.5,137.5,166.25,137.5]]],"vp":[-19.0,-19.0,688.0,688.0]}} - *

- *

- * The tree components are marked - *

- * @class - * @implements {yfiles.layout.ILayoutStage} - */ - export interface TreeComponentLayout extends yfiles.lang.Object,yfiles.layout.ILayoutStage{} - export class TreeComponentLayout { - /** - * Creates a new {@link yfiles.tree.TreeComponentLayout} instance using the specified layouter for arranging the subtrees. - * @param treeCoreLayouter the layout algorithm used for arranging the tree components - * @throws {Stubs.Exceptions.ArgumentError} if the specified layout algorithm is null - */ - constructor(treeCoreLayouter:yfiles.layout.ILayoutAlgorithm); - /** - * Finds the tree components inside the given graph and applies a {@link yfiles.tree.TreeComponentLayout#treeComponentCoreLayout tree layout} to them. - * @param graph the input graph - */ - applyLayout(graph:yfiles.layout.LayoutGraph):void; - /** - * Delegates the layout calculation to the {@link yfiles.tree.TreeComponentLayout#coreLayout core layout algorithm} and handles the dummy nodes. - *

- * The dummy nodes are marked using the given {@link yfiles.algorithms.IDataProvider}. - *

- *

- * This implementation just registers the dummy node {@link yfiles.algorithms.IDataProvider} with the graph with key - * {@link yfiles.tree.TreeComponentLayout#DUMMY_NODE_DP_KEY}, executes the core layout algorithm and finally removes the data - * provider again. - *

- *

- * This method is called by {@link yfiles.tree.TreeComponentLayout#applyLayout} to invoke the core layout algorithm. It may be - * overridden to customize the handling of the dummy nodes. - *

- * @param graph the input graph - * @param dummyDp the {@link } which marks the dummy nodes - * @protected - */ - applyLayoutUsingDummies(graph:yfiles.layout.LayoutGraph,dummyDp:yfiles.algorithms.IDataProvider):void; - /** - * Data provider key for identifying dummy nodes during the layout calculation - *

- * This {@link yfiles.algorithms.IDataProvider} is registered and also removed in - * {@link yfiles.tree.TreeComponentLayout#applyLayoutUsingDummies}. - *

- * @see yfiles.tree.TreeComponentLayout#applyLayoutUsingDummies - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static DUMMY_NODE_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * - * @type {yfiles.layout.ILayoutAlgorithm} - */ - coreLayout:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets the layout algorithm that is applied to tree components. - * @type {yfiles.layout.ILayoutAlgorithm} - */ - treeComponentCoreLayout:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets whether or not tree component arrangement is improved by changing the orientation of components. - * @type {boolean} - */ - optimizeOrientation:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.TreeComponentLayout; - } - /** - * A {@link yfiles.tree.SubtreeShape} represents the position and the borders of a subtree. - *

- * {@link yfiles.tree.INodePlacer}s will move {@link yfiles.tree.SubtreeShape}s and use the borders to calculate distances between the - * subtrees. When two subtrees are placed in relation to their common root, their - * {@link yfiles.tree.SubtreeShape}s are merged to represent the new subtree. - *

- *

- * The borders on each side of the {@link yfiles.tree.SubtreeShape} are modeled with - * {@link yfiles.algorithms.BorderLine}s. The resulting area includes the borders of each node and edge in the corresponding - * subtree. It can also contain the bounds of labels belonging to those nodes and edges. - *

- *

- * The {@link yfiles.tree.SubtreeShape} also describes a connector defining the location to which the edge from its parent is - * attached. It is possible to add some bends (target points) at the end of this edge and include them in the - * {@link yfiles.tree.SubtreeShape}. During layout calculation, the last target point is the connection point for the edge. - *

- * @see yfiles.tree.SubtreeShape#getBorderLine - * @see yfiles.tree.SubtreeShape#connectorX - * @see yfiles.tree.SubtreeShape#connectorY - * @see yfiles.tree.SubtreeShape#addBoundsToShape - * @see yfiles.tree.SubtreeShape#addTargetPoint - * @class - * @final - */ - export interface SubtreeShape extends yfiles.lang.Object{} - export class SubtreeShape { - /** - * Extends this {@link yfiles.tree.SubtreeShape} instance by the given rectangle. - *

- * The border lines are updated with this segment. - *

- * @param x the x-coordinate of the upper-left corner of the rectangle - * @param y the y-coordinate of the upper-left corner of the rectangle - * @param width the width of the rectangle - * @param height the height of the rectangle - * @see yfiles.tree.SubtreeShape#getBorderLine - */ - addBoundsToShape(x:number,y:number,width:number,height:number):void; - /** - * Adds all edge segments of the given edge to this {@link yfiles.tree.SubtreeShape} instance. - *

- * The border lines are updated. - *

- * @param graph the input graph - * @param edge the given edge - * @see yfiles.tree.SubtreeShape#getBorderLine - * @see yfiles.tree.SubtreeShape#addLineSegment - */ - addEdgeSegments(graph:yfiles.layout.LayoutGraph,edge:yfiles.algorithms.Edge):void; - /** - * Extends this {@link yfiles.tree.SubtreeShape} instance by the given segment. - *

- * The border lines are updated with this segment. - *

- * @param x1 the x-coordinate of the first point of the segment - * @param y1 the y-coordinate of the first point of the segment - * @param x2 the x-coordinate of the second point of the segment - * @param y2 the y-coordinate of the second point of the segment - * @see yfiles.tree.SubtreeShape#getBorderLine - * @see yfiles.tree.SubtreeShape#addEdgeSegments - * @see yfiles.tree.SubtreeShape#updateConnectorShape - */ - addLineSegment(x1:number,y1:number,x2:number,y2:number):void; - /** - * Adds another point to the connector. - *

- * The points will appear as bend of the incoming edge. Points are added in reverse direction of the edge. Hence, the last - * target point is further away from the target node than the points before. - *

- * @param x the current x-coordinate of the point - * @param y the current y-coordinate of the point - */ - addTargetPoint(x:number,y:number):void; - /** - * Appends all target points that have previously been added to this shape to the given {@link yfiles.layout.IEdgeLayout} - * instance. - *

- * This method is used by {@link yfiles.tree.INodePlacer} instances for the final edge paths. - *

- * @param edgeLayout the {@link } that will be modified - * @see yfiles.tree.SubtreeShape#addTargetPoint - */ - appendTargetPoints(edgeLayout:yfiles.layout.IEdgeLayout):void; - /** - * Copies the state of this {@link yfiles.tree.SubtreeShape} instance to the given shape applying a modification matrix. - * @param toShape the given shape that gets the assigned values - * @param modificationMatrix the matrix that may add geometrical modifications - */ - assignValuesTo(toShape:yfiles.tree.SubtreeShape,modificationMatrix:yfiles.tree.RotatableNodePlacerMatrix):void; - /** - * Creates a clone of this {@link yfiles.tree.SubtreeShape} instance, modifying it using the provided modification matrix. - * @param matrix the matrix that defines the modification for the new instance - * @returns the clone of this {@link } instance - * @see yfiles.tree.RotatableNodePlacerMatrix#DEFAULT - */ - createCopy(matrix:yfiles.tree.RotatableNodePlacerMatrix):yfiles.tree.SubtreeShape; - /** - * Returns the {@link yfiles.algorithms.BorderLine} instance that describes the {@link yfiles.tree.SubtreeShape} at the given side. - * @param index one of the predefined borderline directions - * @returns the {@link } instance for the given side - * @throws {Stubs.Exceptions.ArgumentError} if the given index is invalid - */ - getBorderLine(index:number):yfiles.algorithms.BorderLine; - /** - * Merges the given {@link yfiles.tree.SubtreeShape} instance with this {@link yfiles.tree.SubtreeShape} instance. - *

- * The border lines are updated. - *

- * @param other the {@link } to be merged with this {@link } - */ - mergeWith(other:yfiles.tree.SubtreeShape):void; - /** - * Moves this {@link yfiles.tree.SubtreeShape} instance and its connector by the given offsets. - *

- * Border lines are updated. - *

- * @param dx the delta x-offset by which this shape will be moved - * @param dy the delta y-offset by which this shape will be moved - */ - move(dx:number,dy:number):void; - /** - * Adds the line segments of the connector to the bounds of this {@link yfiles.tree.SubtreeShape} instance. - *

- * The line segments result from the target points. - *

- * @see yfiles.tree.SubtreeShape#addTargetPoint - */ - updateConnectorShape():void; - /** - * Gets the bounds of the {@link yfiles.layout.INodeLayout} of the root node of this {@link yfiles.tree.SubtreeShape} instance. - * @type {yfiles.algorithms.Rectangle2D} - */ - coreBounds:yfiles.algorithms.Rectangle2D; - /** - * Gets the current bounds of this {@link yfiles.tree.SubtreeShape} instance. - * @type {yfiles.algorithms.Rectangle2D} - */ - bounds:yfiles.algorithms.Rectangle2D; - /** - * Gets the current x-coordinate of the connection point to which the layout algorithm connects the ingoing edge. - *

- * The connection point can change when target points are added to the {@link yfiles.tree.SubtreeShape} instance. - *

- * @see yfiles.tree.SubtreeShape#addTargetPoint - * @see yfiles.tree.SubtreeShape#appendTargetPoints - * @type {number} - */ - connectorX:number; - /** - * Gets the current y-coordinate of the connection point to which the layout algorithm connects the ingoing edge. - *

- * The connection point can change when target points are added to the {@link yfiles.tree.SubtreeShape} instance. - *

- * @see yfiles.tree.SubtreeShape#addTargetPoint - * @see yfiles.tree.SubtreeShape#appendTargetPoints - * @type {number} - */ - connectorY:number; - /** - * Gets the direction of the last connector segment. - * @type {yfiles.tree.ConnectorDirection} - */ - connectorDirection:yfiles.tree.ConnectorDirection; - /** - * Gets the current minimum x-coordinate of this {@link yfiles.tree.SubtreeShape} instance. - * @type {number} - */ - minX:number; - /** - * Gets the current minimum y-coordinate of this {@link yfiles.tree.SubtreeShape} instance. - * @type {number} - */ - minY:number; - /** - * Gets the current maximum x-coordinate of this {@link yfiles.tree.SubtreeShape} instance. - * @type {number} - */ - maxX:number; - /** - * Gets the current maximum y-coordinate of this {@link yfiles.tree.SubtreeShape} instance. - * @type {number} - */ - maxY:number; - /** - * Gets the current x-coordinate of the origin of this {@link yfiles.tree.SubtreeShape} instance. - *

- * The origin is defined as the upper left corner of the {@link yfiles.layout.INodeLayout} of the local root of this shape. - *

- * @type {number} - */ - originX:number; - /** - * Gets the current y-coordinate of the origin of this {@link yfiles.tree.SubtreeShape} instance. - *

- * The origin is defined as the upper left corner of the {@link yfiles.layout.INodeLayout} of the local root of this shape. - *

- * @type {number} - */ - originY:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.SubtreeShape; - } - /** - * This layout algorithm arranges graphs with a tree structure. - *

- * Layout Style {@link yfiles.tree.TreeLayout} provides multiple different arrangements of trees and subtrees. It is easy to customize the - * {@link yfiles.tree.TreeLayout#OUT_EDGE_COMPARER_DP_KEY order of edges}, the {@link yfiles.tree.TreeLayout#PORT_ASSIGNMENT_DP_KEY port assignment} and the {@link yfiles.tree.TreeLayout#NODE_PLACER_DP_KEY arrangement of the nodes} for each subtree. - *

- *

- * Tree layout algorithms are commonly applied to visualize relational data and produce diagrams of high quality that are - * able to reveal possible hierarchic properties of the graph. More precisely, they find applications in dataflow analysis, - * software engineering, bioinformatics and business administration. - *

- *

- * {@graph {"ann": {"s": [37.5,37.5], "d": 1},"n": [[209.96,0], [71.88,77.5], [348.04,77.5], [348.04,155], [202.77,232.5], [172.5,310], [71.88,232.5], [115,387.5], [115,310], [233.04,310], [71.88,155], [348.04,232.5], [319.29,310], [376.79,310], [463.04,232.5], [491.79,310], [434.29,310], [28.75,310], [57.5,387.5], [0,387.5], [376.79,387.5], [261.79,387.5], [204.29,387.5]], "e": [[0,1], [0,2], [2,3], [3,4], [4,5], [6,8], [8,7], [4,9], [1,10], [10,6], [3,11], [11,12], [11,13], [3,14], [14,15], [14,16], [6,17], [17,18], [17,19], [13,20], [9,21], [9,22]], "vp": [0.0,0.0,530.0,425.0]}} Example graph with a layout calculated by {@link yfiles.tree.TreeLayout} using default settings {@graph {"ann": {"s": [60,30], "d": 1},"n": [[1190,0], [0,50], [160,120], [80,120], [240,120], [120,190], [200,190], [280,190], [160,310], [80,310], [240,310], [120,240], [200,240], [280,240], [330,50], [460,256.6], [410,306.6], [510,306.6], [410,356.6], [510,356.6], [460,406.6], [650,441.6], [410,491.6], [490,491.6], [570,491.6], [710,50], [790,100], [870,170], [950,170], [1030,170], [1110,170], [1190,170], [870,240], [950,240], [1030,240], [1110,240], [1190,240], [870,310], [950,310], [1030,310], [1110,310], [1190,310], [870,380], [950,380], [1030,380], [1110,380], [1190,380], [430,120], [500,170], [540,206.6], [580,170], [620,206.6], [660,170], [80,520], [160,430], [160,480], [226.6,405], [226.6,455], [160,380], [790,465], [870,430], [950,430], [950,500], [1030,465], [870,500]], "e": [[0,1,[30,15]], [1,2,[30,100,190,100]], [2,3,[190,170,110,170]], [2,4,[190,170,270,170]], [2,5,[190,170,150,170]], [2,6,[190,170,230,170]], [2,7,[190,170,310,170]], [1,8,[30,360,190,360]], [8,9,[190,290,110,290]], [8,10,[190,290,270,290]], [8,11,[190,290,150,290]], [8,12,[190,290,230,290]], [8,13,[190,290,310,290]], [0,14,[360,15]], [14,15,[360,271.6]], [15,16,[490,321.6]], [15,17,[490,321.6]], [15,18,[490,371.6]], [15,19,[490,371.6]], [15,20], [14,21,[360,456.6]], [21,22,[440,456.6]], [21,23,[520,456.6]], [21,24,[600,456.6]], [0,25,[740,15]], [25,26,[740,115]], [26,27,[860,115,860,150,900,150]], [26,28,[860,115,860,150,980,150]], [26,29,[860,115,860,150,1060,150]], [26,30,[860,115,860,150,1140,150]], [26,31,[860,115,860,150,1220,150]], [26,32,[860,115,860,220,900,220]], [26,33,[860,115,860,220,980,220]], [26,34,[860,115,860,220,1060,220]], [26,35,[860,115,860,220,1140,220]], [26,36,[860,115,860,220,1220,220]], [26,37,[860,115,860,290,900,290]], [26,38,[860,115,860,290,980,290]], [26,39,[860,115,860,290,1060,290]], [26,40,[860,115,860,290,1140,290]], [26,41,[860,115,860,290,1220,290]], [26,42,[860,115,860,360,900,360]], [26,43,[860,115,860,360,980,360]], [26,44,[860,115,860,360,1060,360]], [26,45,[860,115,860,360,1140,360]], [26,46,[860,115,860,360,1220,360]], [14,47,[360,100,410,100,410,135]], [47,48,[530,135]], [47,49,[570,135]], [47,50,[610,135]], [47,51,[650,135]], [47,52,[690,135]], [1,53,[30,535]], [53,54,[110,445]], [53,55,[110,495]], [53,56,[110,420]], [53,57,[110,470]], [53,58,[110,395]], [25,59,[740,480]], [59,60,[900,480]], [59,61,[980,480]], [59,62,[980,480]], [59,63], [59,64,[900,480]]], "vp": [0.0,0.0,1250.0,550.0]}} Tree layout using different - * {@link yfiles.tree.INodePlacer}s and rotationsConcept - *

- *

- * The layout algorithm starts from the leaves and continues with their parents, then with the parents of the parents and - * so on. When a node is processed, the algorithm will use the corresponding {@link yfiles.tree.INodePlacer} instance to move its - * children (along with their subtrees) to a suitable position and to route the outgoing edges of this node. Then, the next - * local root node will be processed. - *

- *

- * To avoid moving all nodes several times and to know the area that the subtrees occupy, the layout algorithm uses - * {@link yfiles.tree.SubtreeShape}s. These {@link yfiles.tree.SubtreeShape}s are moved and merged during layout calculation. - *

- *

- * Features - *

- *

- * Each subtree can have a different style of node placement. {@link yfiles.tree.INodePlacer}s are responsible for arranging - * subtrees and their common root node. They can be specified separately for each local root with a {@link yfiles.algorithms.IDataProvider} - * registered with the graph using key {@link yfiles.tree.TreeLayout#NODE_PLACER_DP_KEY}. - *

- *

- * A custom node can be defined as root of the tree using a {@link yfiles.algorithms.IDataProvider} registered with the graph with - * key {@link yfiles.tree.TreeLayout#SELECTED_ROOT_DP_KEY}. - *

- *

- * The layout algorithm can be configured to reserve space for node labels and place the edge labels along edges such that - * the labels won't overlap with other graph elements. Edge labels are placed according to the information stored in a {@link yfiles.layout.PreferredPlacementDescriptor} - * instance. However, the placement along the edge will only affect the order of multiple labels at the same edge. The - * algorithm will always place the labels close to the target node. - *

- *

- * Grouping of nodes can also be handled by this layout algorithm. It is important that a group node contains a whole - * subtree. Otherwise, the group nodes may overlap with each other or with other nodes. Furthermore, the user may specify - * minimum size constraints for each group node using {@link yfiles.algorithms.IDataProvider} key - * {@link yfiles.layout.GroupingKeys#MINIMUM_NODE_SIZE_DP_KEY}. - *

- *

- * {@link yfiles.tree.TreeLayout} supports custom sorting of the outgoing edges of a node. For example, a {@link yfiles.tree.INodePlacer} - * instance that implements {@link yfiles.tree.IFromSketchNodePlacer} provides a comparator that keeps the current order of - * siblings, allowing to extend the graph incrementally. - *

- *

- * This layout algorithm can only handle graphs with a tree structure. To apply it to a general graph, a {@link yfiles.tree.TreeReductionStage} - * can be appended. This stage will temporarily remove some edges of the input graph until a tree is obtained. After the - * layout calculation, the stage will reinsert the edges that were removed and route them separately. - *

- * @class - * @extends {yfiles.layout.MultiStageLayout} - */ - export interface TreeLayout extends yfiles.layout.MultiStageLayout{} - export class TreeLayout { - /** - * Creates a new {@link yfiles.tree.TreeLayout} instance with default settings. - */ - constructor(); - /** - * Creates a {@link yfiles.tree.SubtreeShape} for the given node that consists only of the bounds of this particular node. - *

- * It may also include node labels or {@link yfiles.layout.NodeHalo}s. - *

- *

- * This method may be overridden to return a custom {@link yfiles.tree.SubtreeShape} for the given node. - *

- * @param node the given node - * @returns a {@link } instance - */ - createNodeShape(node:yfiles.algorithms.Node):yfiles.tree.SubtreeShape; - /** - * Returns a list of edges that need to be reversed in order to obtain a valid rooted and directed tree from the input - * graph. - *

- * The root node of the tree is either a node marked by a {@link yfiles.algorithms.IDataProvider} registered with the graph with - * key {@link yfiles.tree.TreeLayout#SELECTED_ROOT_DP_KEY} or is defined according to {@link yfiles.algorithms.Trees#getRoot}. - *

- *

- * This method is called initially to calculate a rooted tree from the input graph. It may be overridden to apply a custom - * algorithm that determines which edges need to be reversed. - *

- * @returns a list of edges that need to be reversed - * @see yfiles.tree.TreeLayout#reverseEdges - * @protected - */ - directTree():yfiles.algorithms.EdgeList; - /** - * Returns the {@link yfiles.tree.INodePlacer} instance that is used for the placement of the local root node and the - * {@link yfiles.tree.SubtreeShape}s. - *

- * The method may be overridden to return custom {@link yfiles.tree.INodePlacer} instances. It is possible to return a shared - * instance for multiple different nodes because the instances are not used after subsequent calls to this method. - *

- *

- * The current implementation returns the {@link yfiles.tree.INodePlacer} defined by the {@link yfiles.algorithms.IDataProvider} registered - * with key {@link yfiles.tree.TreeLayout#NODE_PLACER_DP_KEY}. It falls back to the default {@link yfiles.tree.INodePlacer} if there is no - * specific {@link yfiles.tree.INodePlacer} for the given node. - *

- * @param localRoot the root of the local subtree - * @returns the {@link } instance that places the subtree below the given local root node - * @see yfiles.tree.TreeLayout#NODE_PLACER_DP_KEY - * @see yfiles.tree.TreeLayout#defaultNodePlacer - * @protected - */ - getNodePlacer(localRoot:yfiles.algorithms.Node):yfiles.tree.INodePlacer; - /** - * Returns the {@link yfiles.collections.IComparer.} instance that will sort the outgoing edges connecting to the given node. - *

- * The {@link yfiles.collections.IComparer.} can be null in case the initial edge order shall be used. - *

- *

- * The method may be overridden to return custom {@link yfiles.collections.IComparer.} instances. It is possible to return a shared instance for multiple - * different nodes because the instances are not used after subsequent calls to this method. - *

- *

- * The current implementation returns the {@link yfiles.collections.IComparer.} defined in the {@link yfiles.algorithms.IDataProvider} registered with key - * {@link yfiles.tree.TreeLayout#OUT_EDGE_COMPARER_DP_KEY}. It falls back to the default {@link yfiles.collections.IComparer.} if there is no specific {@link yfiles.collections.IComparer.} for the given - * node. - *

- * @param localRoot the root of the local subtree - * @returns the {@link } or null that sorts the outgoing edges of the given node - * @see yfiles.tree.TreeLayout#OUT_EDGE_COMPARER_DP_KEY - * @see yfiles.tree.TreeLayout#defaultOutEdgeComparer - */ - getOutEdgeComparer(localRoot:yfiles.algorithms.Node):yfiles.collections.IComparer; - /** - * Returns the {@link yfiles.tree.IPortAssignment} instance that places the ports of the connecting edges of the given node. - *

- * The method may be overridden to return customized {@link yfiles.tree.IPortAssignment} instances. It is possible to return a - * shared instance for multiple different nodes because the instances are not used after subsequent calls to this method. - *

- *

- * The current implementation returns the {@link yfiles.tree.IPortAssignment} defined by the {@link yfiles.algorithms.IDataProvider} - * registered with key {@link yfiles.tree.TreeLayout#OUT_EDGE_COMPARER_DP_KEY}. It falls back to the default {@link yfiles.tree.IPortAssignment} - * if there is no specific {@link yfiles.tree.IPortAssignment} for the given node. - *

- * @param localRoot the root of the local subtree - * @returns the {@link } instance that assigns the ports of the edges at the given node - * @see yfiles.tree.TreeLayout#PORT_ASSIGNMENT_DP_KEY - * @see yfiles.tree.TreeLayout#defaultPortAssignment - * @protected - */ - getPortAssignment(localRoot:yfiles.algorithms.Node):yfiles.tree.IPortAssignment; - /** - * Returns an array of the nodes that will be laid out. - *

- * The given node will be considered as the root of the tree. The order of the elements ensures that no parent is processed - * before one of its successors. - *

- *

- * This method may be overridden to change the order in which the nodes (and their subtrees) are handled. However, it is - * important to keep the parents after the successors. Only siblings can change places. - *

- * @param root the node to be considered as root of the tree - * @returns an array of nodes that will be laid out - * @protected - */ - getRootsArray(root:yfiles.algorithms.Node):yfiles.algorithms.Node[]; - /** - * Provides access to the {@link yfiles.tree.SubtreeShape} for the given node. - *

- * The {@link yfiles.tree.SubtreeShape} contains information about the current extent and location of the subtree rooted at the - * node. It should only be modified during the layout of the parent node. Also, it won't be initialized before the layout - * of the corresponding subtree is calculated. - *

- *

- * This method updates the {@link yfiles.tree.SubtreeShape} in {@link yfiles.tree.TreeLayout#layoutRoot}. - *

- * @param localRoot the root of the subtree - * @returns the {@link } instance if it has already been calculated, null otherwise - * @protected - */ - getSubtreeShape(localRoot:yfiles.algorithms.Node):yfiles.tree.SubtreeShape; - /** - * Calculates the layout for the given root node and its subtrees. - *

- * This method is invoked for each node in the tree exactly once. Thus, children are always handled before their parents. - * In this manner, the subtrees already have a layout and can be arranged with their parent. - *

- *

- * To retrieve the shapes of the subtrees of all children of the local root, this method uses - * {@link yfiles.tree.TreeLayout#getSubtreeShape}. - *

- *

- * The method may be overridden to add configuration code. - *

- * @param localRoot the root of the subtree that whose layout is calculated - * @returns the combined {@link } of the local root node and all of its children and connecting edges - * @protected - */ - layoutRoot(localRoot:yfiles.algorithms.Node):yfiles.tree.SubtreeShape; - /** - * Reverses the direction of given edges. - *

- * This method will be called initially after the {@link yfiles.tree.TreeLayout#directTree} method and finally after the layout has - * been calculated. It may be overridden to additionally reverse data that depends on the direction of the edges. - *

- * @param reversedEdges the edges that will be reversed - * @protected - */ - reverseEdges(reversedEdges:yfiles.algorithms.EdgeList):void; - /** - * Data provider key for specifying a child node placer for each node - * @see yfiles.tree.TreeLayout#defaultNodePlacer - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static NODE_PLACER_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for assigning ports to nodes - * @see yfiles.tree.TreeLayout#defaultPortAssignment - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static PORT_ASSIGNMENT_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for specifying the comparator for the outgoing edges - * @see yfiles.tree.TreeLayout#defaultOutEdgeComparer - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.>} - */ - static OUT_EDGE_COMPARER_DP_KEY:yfiles.algorithms.NodeDpKey>; - /** - * Data provider key for defining the priority of critical edges - *

- * The layout algorithm tries to align each node pair that is connected by a critical edge (integer value > - * 0). This feature can, for example, be used for highlighting different edge paths that are important for a user. - * Conflicts between different critical edges are always resolved in favor of the higher priority. - *

- *

- * Critical edges will always align the centers of source and target node, thus replacing the current root alignment of the - * {@link yfiles.tree.INodePlacer}. - *

- *

- * The critical edge may not be straight if subtrees are rotated or port constraints are assigned. - *

- *

- * This feature is only supported by the following {@link yfiles.tree.INodePlacer}s: - *

- *
    - *
  • {@link yfiles.tree.DefaultNodePlacer}
  • - *
  • {@link yfiles.tree.SimpleNodePlacer}
  • - *
  • {@link yfiles.tree.LayeredNodePlacer}
  • - *
  • {@link yfiles.tree.DoubleLineNodePlacer}
  • - *
  • {@link yfiles.tree.DendrogramNodePlacer}
  • - *
- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static CRITICAL_EDGE_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for retrieving descriptors for nodes in multi-parent structures - *

- * The returned descriptor affects the layout of the multi-parent structure. - *

- * @see yfiles.tree.TreeLayout#multiParentAllowed - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static MULTI_PARENT_DESCRIPTOR_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for marking the node that will be used as root node of the tree - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static SELECTED_ROOT_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * The input graph for which a layout is calculated. - * @protected - * @type {yfiles.layout.LayoutGraph} - */ - graph:yfiles.layout.LayoutGraph; - /** - * Gets or sets whether or not group nodes are handled by the layout algorithm. - * @type {boolean} - */ - groupingSupported:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for arranging the components of the graph is activated. - * @see yfiles.layout.MultiStageLayout#componentLayoutEnabled - * @see yfiles.layout.MultiStageLayout#componentLayout - * @see yfiles.layout.ComponentLayout - * @type {boolean} - */ - componentLayoutEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing parallel edges is activated. - * @see yfiles.layout.MultiStageLayout#parallelEdgeRouterEnabled - * @see yfiles.layout.MultiStageLayout#parallelEdgeRouter - * @see yfiles.router.ParallelEdgeRouter - * @type {boolean} - */ - parallelEdgeRouterEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing self-loops is activated. - * @see yfiles.layout.MultiStageLayout#selfLoopRouterEnabled - * @see yfiles.layout.MultiStageLayout#selfLoopRouter - * @see yfiles.layout.SelfLoopRouter - * @type {boolean} - */ - selfLoopRouterEnabled:boolean; - /** - * Gets a {@link yfiles.algorithms.IDataAcceptor} that can overwrite the source {@link yfiles.layout.PortConstraint port contraint} temporarily used during the layout. - *

- * This method sets temporary source {@link yfiles.layout.PortConstraint}s, e.g., after edge reversal. It may be overridden to - * handle those {@link yfiles.layout.PortConstraint}s separately. - *

- * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.algorithms.IDataAcceptor} - */ - sourcePortConstraintDataAcceptor:yfiles.algorithms.IDataAcceptor; - /** - * Gets a {@link yfiles.algorithms.IDataAcceptor} that can overwrite the target {@link yfiles.layout.PortConstraint port contraint} temporarily used during the layout. - *

- * This method sets temporary target {@link yfiles.layout.PortConstraint}s, e.g., after edge reversal. It may be overridden to - * handle those {@link yfiles.layout.PortConstraint}s separately. - *

- * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @protected - * @type {yfiles.algorithms.IDataAcceptor} - */ - targetPortConstraintDataAcceptor:yfiles.algorithms.IDataAcceptor; - /** - * Gets a {@link yfiles.algorithms.IDataAcceptor} that can be used for temporarily overwriting the source group information used - * during the layout. - *

- * This method may be overridden to handle those edge groups separately. - *

- * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @protected - * @type {yfiles.algorithms.IDataAcceptor} - */ - sourceGroupDataAcceptor:yfiles.algorithms.IDataAcceptor; - /** - * Gets a {@link yfiles.algorithms.IDataAcceptor} that can be used for temporarily overwriting the target group information used - * during the layout. - *

- * This method may be overridden to handle those edge groups separately. - *

- * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @protected - * @type {yfiles.algorithms.IDataAcceptor} - */ - targetGroupDataAcceptor:yfiles.algorithms.IDataAcceptor; - /** - * Gets or sets the default {@link yfiles.tree.INodePlacer} instance that arranges all subtrees that do not have a specific {@link yfiles.tree.INodePlacer} - * assigned using a {@link yfiles.algorithms.IDataProvider}. - * @throws {Stubs.Exceptions.ArgumentError} if the default {@link yfiles.tree.INodePlacer} is set to null - * @see yfiles.tree.TreeLayout#NODE_PLACER_DP_KEY - * @type {yfiles.tree.INodePlacer} - */ - defaultNodePlacer:yfiles.tree.INodePlacer; - /** - * Gets or sets the default {@link yfiles.tree.INodePlacer} instance that places the leaf nodes of the tree. - * @throws {Stubs.Exceptions.ArgumentError} if the default {@link yfiles.tree.INodePlacer} is set to null - * @see yfiles.tree.TreeLayout#defaultNodePlacer - * @type {yfiles.tree.INodePlacer} - */ - defaultLeafPlacer:yfiles.tree.INodePlacer; - /** - * Gets or sets the default {@link yfiles.tree.IPortAssignment} instance for all subtrees that do not have a specific {@link yfiles.tree.IPortAssignment} - * assigned using a {@link yfiles.algorithms.IDataProvider}. - * @throws {Stubs.Exceptions.ArgumentError} if the default {@link yfiles.tree.IPortAssignment} is set to null - * @see yfiles.tree.TreeLayout#PORT_ASSIGNMENT_DP_KEY - * @type {yfiles.tree.IPortAssignment} - */ - defaultPortAssignment:yfiles.tree.IPortAssignment; - /** - * Gets or sets the default {@link yfiles.collections.IComparer.} instance that sorts the outgoing edges in all subtrees that do not have a specific {@link yfiles.collections.IComparer.} assigned - * using a {@link yfiles.algorithms.IDataProvider}. - * @see yfiles.tree.TreeLayout#OUT_EDGE_COMPARER_DP_KEY - * @type {yfiles.collections.IComparer.} - */ - defaultOutEdgeComparer:yfiles.collections.IComparer; - /** - * Gets or sets whether or not the layout algorithm reserves space for node labels. - *

- * If this feature is enabled, the {@link yfiles.tree.SubtreeShape} of the nodes will also hold the shapes of its labels. - *

- * @type {boolean} - */ - considerNodeLabels:boolean; - /** - * Gets or sets whether or not edge labels are placed by the layout algorithm. - *

- * If this is enabled, the {@link yfiles.tree.SubtreeShape}s of the subtrees are extended by the edge labels. - *

- *

- * The layout algorithm uses the information of {@link yfiles.layout.PreferredPlacementDescriptor} for an edge label to determine - * the corresponding placement. However, edge labels are always placed at the target side of the edge. The placement along - * the edge only affects the order of the edge labels at the same edge. - *

- * @type {boolean} - */ - integratedEdgeLabeling:boolean; - /** - * Gets or sets whether or not multi-parent structures are allowed for this tree layout. - *

- * If multi-parent structures are allowed, the directed input graph may contain structures of multiple nodes that share the - * same predecessors as well as the same successors. All nodes belonging to such a structure are placed side by side and - * the incident edges are routed in a bus-style manner. - *

- * @type {boolean} - */ - multiParentAllowed:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.TreeLayout; - } - /** - * The {@link yfiles.tree.TreeReductionStage} temporarily reduces general graphs to trees. - *

- * Layout Style - *

- *

- * This stage prepares a non-tree graph such that it can be processed by a tree layout algorithm. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[150,0],[260,70],[210,70],[260,140],[310,210],[335,280],[75,70],[285,280],[25,70],[25,140],[75,140],[150,70],[25,210],[185,280],[175,140],[50,280],[0,280],[210,210],[235,280],[125,140]],"e":[[0,1,[165,50,275,50]],[0,2,[165,50,225,50]],[1,3],[3,4,[275,190,325,190]],[4,5,[325,260,350,260]],[0,6,[165,50,90,50]],[4,7,[325,260,300,260]],[0,8,[165,50,40,50]],[8,9],[6,10],[0,11],[9,12],[11,14,[165,120,190,120]],[12,15,[40,260,65,260]],[12,16,[40,260,15,260]],[3,17,[275,190,225,190]],[17,13,[225,260,200,260]],[17,18,[225,260,250,260]],[11,19,[165,120,140,120]],[2,11,1],[12,13,1],[17,14,1]],"vp":[0.0,0.0,365.0,310.0]}} - *

- *

- * The non-tree edges are marked - *

- *

- * Concept This {@link yfiles.layout.ILayoutStage} works in three steps: - *

- *
    - *
  1. Remove some edges to get a tree or forest from the graph
  2. - *
  3. Invoke the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} which supports tree graph handling
  4. - *
  5. Reinsert all previously removed edges
  6. - *
  7. - * Optionally route these edges using the non-tree edge router and place their labels using the non-tree edge labeling - * algorithm. - *
  8. - *
- *

- * Features - *

- *

- * The routing of the temporarily hidden non-tree edges can be customized by specifying an {@link yfiles.tree.TreeReductionStage#nonTreeEdgeRouter edge routing algorithm} for those - * edges. Similarly, the placement of edge labels of non-tree edges can be delegated to a custom - * {@link yfiles.tree.TreeReductionStage#nonTreeEdgeLabelingAlgorithm edge labeling algorithm}. As default, both custom algorithms are not specified and, thus, non-tree edges are not routed - * and edge labels not placed. - *

- *

- * This stage is also able to handle multi-parent structures, i.e., structures of multiple nodes that share the same - * predecessors as well as the same successors. More precisely, if the specified {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} supports - * multi-parent structures (see {@link yfiles.tree.TreeLayout#multiParentAllowed}) and option {@link yfiles.tree.TreeReductionStage#multiParentAllowed} is enabled, this stage does not hide such structures, i.e., the multi-parent - * structures are passed to the {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *

- *

- * Non-tree edges can also be bundled together such that their common parts are to some degree merged into a bundled part. - * The edge bundling can be specified by means of method {@link yfiles.tree.TreeReductionStage#edgeBundling}. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface TreeReductionStage extends yfiles.layout.LayoutStageBase{} - export class TreeReductionStage { - /** - * Creates a new {@link yfiles.tree.TreeReductionStage} instance with the given core layout algorithm and default settings. - * @param core the core layout algorithm - */ - constructor(core:yfiles.layout.ILayoutAlgorithm); - /** - * Creates a new {@link yfiles.tree.TreeReductionStage} instance with default settings. - */ - constructor(); - /** - * Creates a routing algorithm that routes edges as a single straight segment. - *

- * The created instance can be used for {@link yfiles.tree.TreeReductionStage#nonTreeEdgeRouter routing non-tree edges}. - *

- * @returns an edge routing algorithm that produces straight-line edges - * @see yfiles.tree.TreeReductionStage#nonTreeEdgeRouter - */ - createStraightLineRouter():yfiles.layout.ILayoutAlgorithm; - /** - * Routes all edges that do not belong to the chosen spanning tree. - *

- * This method is called by {@link yfiles.tree.TreeReductionStage#applyLayout} after the tree was arranged by the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. It may be overridden to apply custom edge routes. - *

- * @param graph the graph containing tree and non-tree edges - * @param nonTreeEdgeMap the {@link } that marks all non-tree edges in the graph - * @protected - */ - routeNonTreeEdges(graph:yfiles.layout.LayoutGraph,nonTreeEdgeMap:yfiles.algorithms.IEdgeMap):void; - /** - * Data provider key for explicitly marking (some) edges that should not be considered for the tree - * @see yfiles.tree.TreeReductionStage#nonTreeEdgeRouter - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static NON_TREE_EDGES_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Gets or sets whether or not multi-parent structures (structures of multiple nodes that share the same predecessors as - * well as the same successors) are allowed. - *

- * More precisely, if this option is enabled and the specified {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} can handle multi-parent structures - * (see {@link yfiles.tree.TreeLayout#multiParentAllowed}), this stage does not hide such structures, but the multi-parent structures are passed on to the {@link yfiles.layout.LayoutStageBase#coreLayout} core layout - * algorithm}. - *

- * @type {boolean} - */ - multiParentAllowed:boolean; - /** - * Gets or sets the edge routing algorithm that is applied to all non-tree edges. - * @see yfiles.tree.TreeReductionStage#nonTreeEdgeSelectionKey - * @type {yfiles.layout.ILayoutAlgorithm} - */ - nonTreeEdgeRouter:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets the key to register a {@link yfiles.algorithms.IDataProvider} that will be used by the {@link yfiles.tree.TreeReductionStage#nonTreeEdgeRouter non-tree edge routing algorithm} - * to determine the edges that need to be routed. - * @see yfiles.tree.TreeReductionStage#nonTreeEdgeRouter - * @type {any} - */ - nonTreeEdgeSelectionKey:any; - /** - * Gets or sets the labeling algorithm that is applied to all edge labels that belong to non-tree edges. - *

- * It is required that a suitable {@link yfiles.tree.TreeReductionStage#nonTreeEdgeLabelSelectionKey edge label selection key} is set. Otherwise, the edge labeling algorithm might also place - * labels of tree edges. - *

- * @see yfiles.tree.TreeReductionStage#nonTreeEdgeLabelSelectionKey - * @type {yfiles.layout.ILayoutAlgorithm} - */ - nonTreeEdgeLabelingAlgorithm:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets the key to register a {@link yfiles.algorithms.IDataProvider} that is used by the {@link yfiles.tree.TreeReductionStage#nonTreeEdgeLabelingAlgorithm non-tree edge labeling algorithm} - * to determine which edge labels it should place. - * @see yfiles.tree.TreeReductionStage#nonTreeEdgeLabelingAlgorithm - * @type {any} - */ - nonTreeEdgeLabelSelectionKey:any; - /** - * Gets the {@link yfiles.layout.EdgeBundling} instance that defines the settings of the edge bundling feature. - *

- * The specified {@link yfiles.layout.EdgeBundling} defines global bundling properties. Settings for individual edges can be - * defined by assigning an {@link yfiles.layout.EdgeBundleDescriptor} to an edge using a {@link yfiles.algorithms.IDataProvider} registered - * with key {@link yfiles.layout.EdgeBundling#EDGE_BUNDLE_DESCRIPTOR_DP_KEY}. To enable bundling for all non-tree edges, set a {@link yfiles.layout.EdgeBundling#defaultBundleDescriptor default bundle descriptor} - * which has {@link yfiles.layout.EdgeBundleDescriptor#bundled bundling} enabled. - *

- *

- * If the graph contains self-loops that belong to the set of non-tree edges, the stage will invoke the router defined for - * the non-tree edges in order to route them. In the case where this is not desired, the user has to hide them from the - * stage and route them afterwards as desired. - *

- * @type {yfiles.layout.EdgeBundling} - */ - edgeBundling:yfiles.layout.EdgeBundling; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.TreeReductionStage; - } - /** - * Specifies custom data for the {@link yfiles.tree.AspectRatioTreeLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface AspectRatioTreeLayoutData extends yfiles.layout.LayoutData{} - export class AspectRatioTreeLayoutData { - constructor(); - /** - * Gets or sets the mapping from nodes to the aspect ratio of their sub tree. - * @see yfiles.tree.AspectRatioTreeLayout#SUBTREE_ASPECT_RATIO_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - subtreeAspectRatios:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes with sub trees to their placements. - * @see yfiles.tree.AspectRatioTreeLayout#ROOT_PLACEMENT_DP_KEY - * @see yfiles.tree.AspectRatioTreeLayout#getRootPlacement - * @type {yfiles.layout.ItemMapping.} - */ - rootPlacements:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to the routing policies of their sub trees. - * @see yfiles.tree.AspectRatioTreeLayout#SUBTREE_ROUTING_POLICY_DP_KEY - * @see yfiles.tree.AspectRatioTreeLayout#getSubtreeArrangement - * @type {yfiles.layout.ItemMapping.} - */ - subtreeRoutingPolicies:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.AspectRatioTreeLayoutData; - } - /** - * Specifies custom data for the {@link yfiles.tree.BalloonLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface BalloonLayoutData extends yfiles.layout.LayoutData{} - export class BalloonLayoutData { - constructor(); - /** - * Gets or sets the collection of nodes that should be arranged in an interleaved fashion. - * @see yfiles.tree.BalloonLayout#INTERLEAVED_NODES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - interleavedNodes:yfiles.layout.ItemCollection; - /** - * Gets or sets the mapping from nodes to their {@link yfiles.layout.NodeHalo}. - * @see yfiles.layout.NodeHalo#NODE_HALO_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeHalos:yfiles.layout.ItemMapping; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - /** - * Gets or sets the mapping for marking the node that will be used as root node of the tree. - *

- * The custom root node selection induced by this property is only considered if the {@link yfiles.tree.BalloonLayout#rootNodePolicy root node policy} is set to - * {@link yfiles.tree.RootNodePolicy#SELECTED_ROOT}. - *

- * @see yfiles.tree.BalloonLayout#SELECTED_ROOT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - treeRoot:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping that provides a {@link yfiles.layout.PreferredPlacementDescriptor} instance for edge - * {@link yfiles.graph.ILabel}s. - * @see yfiles.layout.PreferredPlacementDescriptor - * @see yfiles.layout.LayoutGraphAdapter#EDGE_LABEL_LAYOUT_PREFERRED_PLACEMENT_DESCRIPTOR_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeLabelPreferredPlacement:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.BalloonLayoutData; - } - /** - * Specifies custom data for the {@link yfiles.tree.TreeLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface TreeLayoutData extends yfiles.layout.LayoutData{} - export class TreeLayoutData { - constructor(); - /** - * Gets or sets the mapping from nodes to their {@link yfiles.tree.INodePlacer}. - * @see yfiles.tree.TreeLayout#NODE_PLACER_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodePlacers:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their {@link yfiles.tree.IPortAssignment}. - * @see yfiles.tree.TreeLayout#PORT_ASSIGNMENT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - portAssignments:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to comparison functions used to sort the nodes' outgoing edges. - * @see yfiles.tree.TreeLayout#OUT_EDGE_COMPARER_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - outEdgeComparers:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their {@link yfiles.layout.NodeHalo}. - * @see yfiles.layout.NodeHalo#NODE_HALO_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeHalos:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their source {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#SOURCE_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourcePortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to their target {@link yfiles.layout.PortConstraint}. - * @see yfiles.layout.PortConstraintKeys#TARGET_PORT_CONSTRAINT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetPortConstraints:yfiles.layout.ItemMapping; - /** - * Gets or sets the collection of nodes the {@link yfiles.tree.AssistantNodePlacer} considers as assistants. - *

- * This collection is only considered if {@link yfiles.tree.TreeLayoutData#nodePlacers} returns any {@link yfiles.tree.AssistantNodePlacer} . - *

- * @see yfiles.tree.AssistantNodePlacer#ASSISTANT_NODE_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - assistantNodes:yfiles.layout.ItemCollection; - /** - * Gets or sets the collection of nodes the {@link yfiles.tree.DelegatingNodePlacer} places with its {@link yfiles.tree.DelegatingNodePlacer#primaryPlacer}. - *

- * This collection is only considered if {@link yfiles.tree.TreeLayoutData#nodePlacers} returns any {@link yfiles.tree.DelegatingNodePlacer} . - *

- * @see yfiles.tree.DelegatingNodePlacer#PRIMARY_NODES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - delegatingNodePlacersPrimaryNodes:yfiles.layout.ItemCollection; - /** - * Gets or sets a mapping from nodes to a boolean value that specifies whether a node should be placed left of the bus - * (true) or right of the bus (false). - *

- * This mapping is only considered if {@link yfiles.tree.TreeLayoutData#nodePlacers} returns a {@link yfiles.tree.LeftRightNodePlacer} . - *

- * @see yfiles.tree.LeftRightNodePlacer#LEFT_RIGHT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - leftRightPlacersLeftNodes:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to the index of the row the {@link yfiles.tree.GridNodePlacer} shall place the node in. - *

- * This collection is only considered if {@link yfiles.tree.TreeLayoutData#nodePlacers} returns any {@link yfiles.tree.GridNodePlacer} . - *

- * @see yfiles.tree.GridNodePlacer#ROW_INDEX_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - gridNodePlacerRowIndices:yfiles.layout.ItemMapping; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - /** - * Gets or sets the mapping for marking the node that will be used as root node of the tree. - * @see yfiles.tree.TreeLayout#SELECTED_ROOT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - treeRoot:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping that provides a {@link yfiles.layout.PreferredPlacementDescriptor} instance for edge - * {@link yfiles.graph.ILabel}s. - * @see yfiles.layout.PreferredPlacementDescriptor - * @see yfiles.layout.LayoutGraphAdapter#EDGE_LABEL_LAYOUT_PREFERRED_PLACEMENT_DESCRIPTOR_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeLabelPreferredPlacement:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.TreeLayoutData; - } - /** - * Specifies custom data for the {@link yfiles.tree.TreeReductionStage}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface TreeReductionStageData extends yfiles.layout.LayoutData{} - export class TreeReductionStageData { - constructor(); - /** - * Gets or sets the collection of edges explicitly marked as not belonging to a tree. - * @see yfiles.tree.TreeReductionStage#NON_TREE_EDGES_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - nonTreeEdges:yfiles.layout.ItemCollection; - /** - * Gets or sets the mapping of edges to their {@link yfiles.layout.EdgeBundleDescriptor}. - *

- * Bundling together multiple edges means that their common parts are to some degree merged into a bundled part. At the - * source and target point, the edges are again clearly split. - *

- *

- * If an edge is mapped to null, the {@link yfiles.layout.EdgeBundling#defaultBundleDescriptor default descriptor} is used. - *

- * @see yfiles.layout.EdgeBundleDescriptor - * @see yfiles.tree.TreeReductionStage#edgeBundling - * @type {yfiles.layout.ItemMapping.} - */ - edgeBundleDescriptors:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.tree.TreeReductionStageData; - } - }export namespace genealogy{ - /** - * This layout algorithm arranges genealogical graphs (family trees). - *

- * Layout Style The family trees consist of nodes that represent individuals and nodes that represent families. Individuals are - * connected via these family nodes. The graph is arranged in layers that describe generations. {@graph {"ann":{"s":[122.27,30],"d":1},"styles":{"5":{"c":1}},"n":[[364.55,210,[[405.01,234.35,41.35,18.7,"Mother"]]],[364.55,140,[[406.35,164.35,38.68,18.7,"Father"]]],[182.27,385,[[206.06,409.35,74.7,18.7,"Grandmother"]]],[182.27,315,[[209.39,339.35,68.04,18.7,"Grandfather"]]],[182.27,175,[[206.06,199.35,74.7,18.7,"Grandmother"]]],[182.27,105,[[209.39,129.35,68.04,18.7,"Grandfather"]]],[0,490,[[6.78,514.35,108.71,18.7,"Great-Grandmother"]]],[0,420,[[10.11,444.35,102.04,18.7,"Great-Grandfather"]]],[0,350,[[6.78,374.35,108.71,18.7,"Great-Grandmother"]]],[0,280,[[10.11,304.35,102.04,18.7,"Great-Grandfather"]]],[0,210,[[6.78,234.35,108.71,18.7,"Great-Grandmother"]]],[0,140,[[10.11,164.35,102.04,18.7,"Great-Grandfather"]]],[0,70,[[6.78,94.35,108.71,18.7,"Great-Grandmother"]]],[0,0,[[10.11,24.35,102.04,18.7,"Great-Grandfather"]]],[56.14,45,10,10,5],[56.14,185,10,10,5],[56.14,325,10,10,5],[56.14,465,10,10,5],[238.41,360,10,10,5],[238.41,150,10,10,5],[420.69,185,10,10,5],[556.82,245,[[597.95,269.35,40.02,18.7,"Sibling"]]],[556.82,315,[[597.95,339.35,40.02,18.7,"Sibling"]]],[556.82,175,[[602.29,199.35,31.35,18.7,"Child"]]]],"e":[[12,14],[13,14],[14,5,5,0,-61.14,0,[132.27,50,132.27,120]],[11,15],[10,15],[15,4,5,0,-61.14,0],[8,16],[9,16],[16,3,5,0,-61.14,0],[6,17],[7,17],[17,2,5,0,-61.14,0,[132.27,470,132.27,400]],[2,18],[3,18],[18,0,5,0,-61.14,0,[314.55,365,314.55,225]],[4,19],[5,19],[19,1,5,0,-61.14,0],[0,20],[1,20],[20,21,5,0,-61.14,0,[536.82,190,536.82,260]],[20,22,5,0,-61.14,0,[536.82,190,536.82,330]],[20,23,5,0,-61.14,0]],"vp":[0.0,0.0,680.0,520.0]}} - *

- *

- * Basic Family Tree - *

- *

- * Concept - *

- *

- * In order to determine whether a node represents an individual or a partnership, a {@link yfiles.algorithms.IDataProvider} has to - * be registered with key {@link yfiles.genealogy.FamilyTreeLayout#FAMILY_TYPE_DP_KEY}. If this {@link yfiles.algorithms.IDataProvider} is - * missing, an {@link yfiles.lang.Exception} will be thrown. - *

- *

- * This {@link yfiles.algorithms.IDataProvider} provides: - *

- *
    - *
  • {@link yfiles.genealogy.FamilyType#MALE} for a node representing a male individual.
  • - *
  • {@link yfiles.genealogy.FamilyType#FEMALE} for a node representing a female individual.
  • - *
  • {@link yfiles.genealogy.FamilyType#FAMILY} for a node representing a family.
  • - *
- *

- * All other values will be interpreted as if the node represents an individual. - *

- *

- * A {@link yfiles.genealogy.FamilyType#FAMILY} node links all members of a family. It can only have two incoming edges from the - * parents. Two nodes of the same type (families or individuals) cannot be directly connected. If the input graph violates - * these specifications, a {@link yfiles.lang.Exception} exception will be thrown. - *

- *

- * The layout is calculated basically in two steps: - *

- *
    - *
  • The families are laid out by the inner layouter in a compact way.
  • - *
  • - * The relations between these "family groups" and their children and other families are laid out by the - * {@link yfiles.genealogy.FamilyTreeLayout#topLayout top layout algorithm}. - *
  • - *
- *

- * Features - *

- *

- * The distances between nodes {@link yfiles.genealogy.FamilyTreeLayout#spacingBetweenFamilyMembers in the same generation} as well as between {@link yfiles.genealogy.FamilyTreeLayout#offsetForFamilyNodes individuals and family nodes} can be adjusted. - *

- *

- * Nodes in the same generation can be {@link yfiles.genealogy.FamilyTreeLayout#alignment aligned} at three different coordinates: top, center, bottom. - *

- *

- * The location of {@link yfiles.genealogy.FamilyType#FAMILY} nodes can be {@link yfiles.genealogy.FamilyTreeLayout#familyNodesAlwaysBelow specified} in relation to the partners. This placement - * can be set independently for {@link yfiles.genealogy.FamilyTreeLayout#partnerlessBelow parents}. - *

- * @class - * @extends {yfiles.layout.MultiStageLayout} - */ - export interface FamilyTreeLayout extends yfiles.layout.MultiStageLayout{} - export class FamilyTreeLayout { - /** - * Creates a new instance of {@link yfiles.genealogy.FamilyTreeLayout} with default settings. - */ - constructor(); - /** - * Data provider key for assigning a node type for each node - *

- * The layout algorithm will handle the nodes according to this type. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static FAMILY_TYPE_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets or sets the {@link yfiles.layout.ILayoutAlgorithm layout algorithm} that is responsible for the layout between family groups. - *

- * If the specified layout algorithm is null, fallback algorithm {@link yfiles.hierarchic.HierarchicLayout} is used. - *

- * @type {yfiles.layout.ILayoutAlgorithm} - */ - topLayout:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets the spacing between two nodes representing members of the same family in one generation. - *

- * Values should be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given spacing is negative - * @type {number} - */ - spacingBetweenFamilyMembers:number; - /** - * Gets or sets the offset by which a {@link yfiles.genealogy.FamilyType#FAMILY} node is shifted down if its parents are not direct - * neighbors. - *

- * Values should be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given offset is negative - * @type {number} - */ - offsetForFamilyNodes:number; - /** - * Gets or sets whether or not {@link yfiles.genealogy.FamilyType#FAMILY} nodes of individuals that have only children but no - * partners are placed below this individual or next to it. - * @type {boolean} - */ - partnerlessBelow:boolean; - /** - * Gets or sets whether or not {@link yfiles.genealogy.FamilyType#FAMILY} nodes are placed between or below the partners. - * @see yfiles.genealogy.FamilyType#FAMILY - * @type {boolean} - */ - familyNodesAlwaysBelow:boolean; - /** - * Gets or sets the vertical alignment of the individual nodes in the same generation. - * @throws {Stubs.Exceptions.ArgumentError} if the specified alignment is unknown - * @type {yfiles.genealogy.VerticalNodeAlignment} - */ - alignment:yfiles.genealogy.VerticalNodeAlignment; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing parallel edges is activated. - * @see yfiles.layout.MultiStageLayout#parallelEdgeRouterEnabled - * @see yfiles.layout.MultiStageLayout#parallelEdgeRouter - * @see yfiles.router.ParallelEdgeRouter - * @type {boolean} - */ - parallelEdgeRouterEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing self-loops is activated. - * @see yfiles.layout.MultiStageLayout#selfLoopRouterEnabled - * @see yfiles.layout.MultiStageLayout#selfLoopRouter - * @see yfiles.layout.SelfLoopRouter - * @type {boolean} - */ - selfLoopRouterEnabled:boolean; - /** - * Gets or sets the order of individuals in the same generation (siblings, partners) based on their sex. - * @throws {Stubs.Exceptions.ArgumentError} if the specified order is unknown - * @type {yfiles.genealogy.FamilyMembersSortingPolicy} - */ - familyMembersSortingPolicy:yfiles.genealogy.FamilyMembersSortingPolicy; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.genealogy.FamilyTreeLayout; - } - export enum FamilyType{ - /** - * Type specifier for nodes that connect partners with each other and their children. - * @see yfiles.genealogy.FamilyTreeLayout#FAMILY_TYPE_DP_KEY - */ - FAMILY, - /** - * Type specifier for nodes that represent men. - * @see yfiles.genealogy.FamilyTreeLayout#FAMILY_TYPE_DP_KEY - */ - MALE, - /** - * Type specifier for nodes that represent women. - * @see yfiles.genealogy.FamilyTreeLayout#FAMILY_TYPE_DP_KEY - */ - FEMALE - } - export enum VerticalNodeAlignment{ - /** - * Alignment specifier that defines that all nodes in the same layer (generation) are aligned based on their top - * coordinate. - *

- * The descriptions of the directions are based on {@link yfiles.layout.LayoutOrientation#TOP_TO_BOTTOM}. - *

- * @see yfiles.genealogy.FamilyTreeLayout#alignment - */ - TOP, - /** - * Alignment specifier that defines that all nodes in the same layer (generation) are aligned based on their center - * coordinate. - *

- * The descriptions of the directions are based on {@link yfiles.layout.LayoutOrientation#TOP_TO_BOTTOM}. - *

- * @see yfiles.genealogy.FamilyTreeLayout#alignment - */ - CENTER, - /** - * Alignment specifier that defines that all nodes in the same layer (generation) are aligned based on their bottom - * coordinate. - *

- * The descriptions of the directions are based on {@link yfiles.layout.LayoutOrientation#TOP_TO_BOTTOM}. - *

- * @see yfiles.genealogy.FamilyTreeLayout#alignment - */ - BOTTOM - } - export enum FamilyMembersSortingPolicy{ - /** - * Order specifier that disables sorting of individuals according to their sex. - * @see yfiles.genealogy.FamilyTreeLayout#familyMembersSortingPolicy - */ - NO_SORTING, - /** - * Order specifier that places female individuals before their male siblings and partners, if possible. - * @see yfiles.genealogy.FamilyTreeLayout#familyMembersSortingPolicy - */ - FEMALE_FIRST, - /** - * Order specifier that places female individuals before their male siblings and partners. - * @see yfiles.genealogy.FamilyTreeLayout#familyMembersSortingPolicy - */ - FEMALE_ALWAYS_FIRST, - /** - * Order specifier that places male individuals before their female siblings and partners, if possible. - * @see yfiles.genealogy.FamilyTreeLayout#familyMembersSortingPolicy - */ - MALE_FIRST, - /** - * Order specifier that places male individuals before their female siblings and partners. - * @see yfiles.genealogy.FamilyTreeLayout#familyMembersSortingPolicy - */ - MALE_ALWAYS_FIRST - } - /** - * Specifies custom data for the {@link yfiles.genealogy.FamilyTreeLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface FamilyTreeLayoutData extends yfiles.layout.LayoutData{} - export class FamilyTreeLayoutData { - constructor(); - /** - * Gets or sets the mapping from nodes to their family type. - * @see yfiles.genealogy.FamilyTreeLayout#FAMILY_TYPE_DP_KEY - * @see yfiles.genealogy.FamilyType - * @type {yfiles.layout.ItemMapping.} - */ - familyTypes:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.genealogy.FamilyTreeLayoutData; - } - }export namespace multipage{ - /** - * This class is a default implementation of interface {@link yfiles.multipage.IElementFactory}. - * @see yfiles.multipage.IElementFactory - * @class - * @implements {yfiles.multipage.IElementFactory} - */ - export interface DefaultElementFactory extends yfiles.lang.Object,yfiles.multipage.IElementFactory{} - export class DefaultElementFactory { - /** - * Creates a new instance of {@link yfiles.multipage.DefaultElementFactory}. - */ - constructor(); - /** - * - * @param context - * @param connector - * @param opposite - * @param origEdgeId - * @param atTarget - * @returns - */ - createConnectorEdge(context:yfiles.multipage.LayoutContext,connector:yfiles.algorithms.Node,opposite:yfiles.algorithms.Node,origEdgeId:any,atTarget:boolean):yfiles.algorithms.Edge; - /** - * - * @param context - * @param edgeIds - * @param representedNodeId - * @returns - */ - createConnectorNode(context:yfiles.multipage.LayoutContext,edgeIds:yfiles.algorithms.YList,representedNodeId:any):yfiles.algorithms.Node; - /** - * - * @param context - * @param proxyNode - * @param opposite - * @param replacingEdgeId - * @param origNodeId - * @returns - */ - createProxyEdge(context:yfiles.multipage.LayoutContext,proxyNode:yfiles.algorithms.Node,opposite:yfiles.algorithms.Node,replacingEdgeId:any,origNodeId:any):yfiles.algorithms.Edge; - /** - * - * @param context - * @param origNodeId - * @returns - */ - createProxyNode(context:yfiles.multipage.LayoutContext,origNodeId:any):yfiles.algorithms.Node; - /** - * - * @param context - * @param proxyReference - * @param opposite - * @param referencingCopyId - * @returns - */ - createProxyReferenceEdge(context:yfiles.multipage.LayoutContext,proxyReference:yfiles.algorithms.Node,opposite:yfiles.algorithms.Node,referencingCopyId:any):yfiles.algorithms.Edge; - /** - * - * @param context - * @param referringProxyId - * @returns - */ - createProxyReferenceNode(context:yfiles.multipage.LayoutContext,referringProxyId:any):yfiles.algorithms.Node; - /** - * Returns the default size for nodes created by this factory. - *

- * This method is called from {@link yfiles.multipage.DefaultElementFactory#createConnectorNode}, - * {@link yfiles.multipage.DefaultElementFactory#createProxyReferenceNode}, and/or - * {@link yfiles.multipage.DefaultElementFactory#createProxyNode}. It must return a non-null size with positive width and height. - *

- *

- * Subclasses may implement this method to use custom size values. - *

- * @param context an object providing relevant layout information, for example, the current graph as well as various information about the - * graph elements - * @param id the element ID - * @param type the type of the node to be created - * @returns the default size of the new node - * @protected - */ - getDefaultNodeSize(context:yfiles.multipage.LayoutContext,id:any,type:number):yfiles.algorithms.YDimension; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.multipage.DefaultElementFactory; - } - export enum EdgeType{ - /** - * An edge type that specifies a normal edge. - *

- * An edge is called normal if it does not belong to any other type. - *

- * @see yfiles.multipage.IEdgeInfo#type - */ - NORMAL, - /** - * An edge type that specifies a connector edge. - *

- * An edge is called connector if it is connected to a connector node (a node of {@link yfiles.multipage.INodeInfo#type type} - * {@link yfiles.multipage.NodeType#CONNECTOR}), i.e., it represents an edge of the input graph whose endpoints lie on different - * pages. - *

- * @see yfiles.multipage.IEdgeInfo#representedEdge - * @see yfiles.multipage.IEdgeInfo#type - * @see yfiles.multipage.NodeType#CONNECTOR - */ - CONNECTOR, - /** - * An edge type that specifies a proxy reference edge. - *

- * An edge is called proxy reference if it is connected to a proxy reference node (a node of {@link yfiles.multipage.INodeInfo#type type} - * {@link yfiles.multipage.NodeType#PROXY_REFERENCE}), i.e., a node that refers to a proxy of an original node lying on another - * page. - *

- * @see yfiles.multipage.IEdgeInfo#type - * @see yfiles.multipage.NodeType#PROXY_REFERENCE - */ - PROXY_REFERENCE, - /** - * An edge type that specifies a proxy edge. - *

- * An edge is called proxy if it is connected to a proxy node (a node of {@link yfiles.multipage.INodeInfo#type type} - * {@link yfiles.multipage.NodeType#PROXY}), i.e., a node that is a proxy of an original node lying on another page. - *

- * @see yfiles.multipage.IEdgeInfo#type - * @see yfiles.multipage.NodeType#PROXY - */ - PROXY - } - export enum GroupingMode{ - /** - * Node grouping specifier used when group nodes should be ignored. - * @see yfiles.multipage.MultiPageLayout#groupingMode - */ - IGNORE, - /** - * Node grouping specifier used when only original nodes should be assigned to group nodes. Hence, connector and proxy - * nodes (see {@link yfiles.multipage.NodeType#CONNECTOR} and - * {@link yfiles.multipage.NodeType#PROXY}) are never assigned to group nodes even though the associated node lies within a group. - * @see yfiles.multipage.MultiPageLayout#groupingMode - */ - ORIGINAL_NODES_ONLY, - /** - * Node grouping specifier used when special nodes like, e.g., connector and proxy nodes (see {@link yfiles.multipage.NodeType#CONNECTOR} - * and {@link yfiles.multipage.NodeType#PROXY}) should be assigned to group nodes, too. - * @see yfiles.multipage.MultiPageLayout#groupingMode - */ - ALL_NODES - } - export enum EdgeBundleModes{ - /** - * Edge bundle mode constant that specifies that all multi-edges (edges with same endpoints) should be distinguished. - * Hence, if such edges connect two nodes on different pages, a separate connector pair (see - * {@link yfiles.multipage.NodeType#CONNECTOR}) is used for each of them. - * @see yfiles.multipage.MultiPageLayout#edgeBundleModeMask - */ - DISTINGUISH_MULTI_EDGES, - /** - * Edge bundle mode constant that specifies that multi-edges (edges with same endpoints) should be distinguished if they - * have different directions. Hence, two edges with the same endpoints may share a connector pair (see - * {@link yfiles.multipage.NodeType#CONNECTOR}) if they point in the same direction (i.e., both have the same source and target - * node). - * @see yfiles.multipage.MultiPageLayout#edgeBundleModeMask - */ - DISTINGUISH_DIRECTIONS, - /** - * Edge bundle mode constant that specifies that multi-edges (edges with same endpoints) should be distinguished if they - * are of different (user specified) type, see {@link yfiles.multipage.MultiPageLayout#EDGE_TYPE_DP_KEY}. Hence, two edges with the - * same endpoints and same type may share a connector pair (see {@link yfiles.multipage.NodeType#CONNECTOR}). - * @see yfiles.multipage.MultiPageLayout#edgeBundleModeMask - * @see yfiles.multipage.MultiPageLayout#EDGE_TYPE_DP_KEY - */ - DISTINGUISH_TYPES - } - export enum NodeType{ - /** - * A node type that specifies a normal node. - *

- * A node is called normal if it does not belong to any other type. - *

- * @see yfiles.multipage.INodeInfo#type - */ - NORMAL, - /** - * A node type that specifies a group node. - *

- * A group node is a node that may contain other nodes. - *

- * @see yfiles.multipage.INodeInfo#type - */ - GROUP, - /** - * A node type that specifies a proxy node. - *

- * A proxy node is a copy of a {@link yfiles.multipage.NodeType#NORMAL normal node}. It is created by the algorithm if a normal node and its neighbors or associated {@link yfiles.multipage.NodeType#CONNECTOR connectors} - * do not fit onto a single page. Hence, in such cases, the neighbors/connectors associated with a normal node may be - * distributed among different proxy nodes associated with this node. - *

- * @see yfiles.multipage.INodeInfo#type - * @see yfiles.multipage.NodeType#NORMAL - * @see yfiles.multipage.NodeType#PROXY_REFERENCE - */ - PROXY, - /** - * A node type that specifies a proxy reference node. - *

- * For each {@link yfiles.multipage.NodeType#PROXY proxy node} there is exactly one matching proxy reference node. The reference node refers to the proxy and is - * either connected to the {@link yfiles.multipage.NodeType#NORMAL normal node} associated with this proxy or one of its other proxy nodes (a normal node may be - * associated with multiple proxy nodes). Hence, for a node connected to a proxy reference node there always exists a copy - * located on another page. - *

- * @see yfiles.multipage.INodeInfo#type - * @see yfiles.multipage.NodeType#PROXY - */ - PROXY_REFERENCE, - /** - * A node type that specifies a connector node. - *

- * Each edge of the input graph that connects two nodes v and w that are placed on different pages is split by a pair of - * matching connector nodes (one for each of the two pages). One of the connector nodes is connected to v and the other to - * w. Hence, each connector represents a jump mark to the matching connector and guarantees that no information is lost as - * it would be the case if such edges are simply removed. - *

- * @see yfiles.multipage.INodeInfo#type - */ - CONNECTOR - } - /** - * A class that holds all information associated with an edge. - * @interface - */ - export interface IEdgeInfo extends yfiles.lang.Object{ - /** - * Gets the unique ID of the associated edge. - * @see yfiles.multipage.MultiPageLayoutResult#getEdgeInfo - * @see yfiles.multipage.IElementInfoManager#getEdgeInfo - * @abstract - * @type {any} - */ - id:any; - /** - * Gets the type of the associated edge. - * @abstract - * @type {yfiles.multipage.EdgeType} - */ - type:yfiles.multipage.EdgeType; - /** - * Gets the original edge associated with this {@link yfiles.multipage.IEdgeInfo}. - *

- * More precisely, for edges of {@link yfiles.multipage.IEdgeInfo#type type} {@link yfiles.multipage.EdgeType#CONNECTOR}, this method returns the edge of the input graph - * that was split by the connector edge. Otherwise, it returns null. - *

- * @see yfiles.multipage.EdgeType#CONNECTOR - * @abstract - * @type {yfiles.algorithms.Edge} - */ - representedEdge:yfiles.algorithms.Edge; - } - var IEdgeInfo:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.multipage.IEdgeInfo; - }; - /** - * A class that holds all information related to an edge label. - * @interface - */ - export interface IEdgeLabelInfo extends yfiles.lang.Object{ - /** - * Gets the unique ID of the associated edge label. - * @see yfiles.multipage.MultiPageLayoutResult#getEdgeLabelInfo - * @see yfiles.multipage.IElementInfoManager#getEdgeLabelInfo - * @abstract - * @type {any} - */ - id:any; - } - var IEdgeLabelInfo:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.multipage.IEdgeLabelInfo; - }; - /** - * Factory used by class {@link yfiles.multipage.MultiPageLayout} to create special nodes and edges. - * @interface - */ - export interface IElementFactory extends yfiles.lang.Object{ - /** - * Callback method for creating an edge of type {@link yfiles.multipage.EdgeType#CONNECTOR}. - *

- * Such an edge connects the given {@link yfiles.multipage.NodeType#CONNECTOR connector} and opposite node. - *

- * @param context an object providing relevant layout information, for example, the current graph as well as various information about the - * graph elements - * @param connector the endpoint of the edge that represents the connector node - * @param opposite the other endpoint of the edge - * @param origEdgeId the ID of the edge that is split by the connector edge - * @param atTarget true if the connector node is the target of the edge, false otherwise - * @returns the created connector edge - * @see yfiles.multipage.EdgeType#CONNECTOR - * @see yfiles.multipage.NodeType#CONNECTOR - * @see yfiles.multipage.LayoutContext#createEdge - * @abstract - */ - createConnectorEdge(context:yfiles.multipage.LayoutContext,connector:yfiles.algorithms.Node,opposite:yfiles.algorithms.Node,origEdgeId:any,atTarget:boolean):yfiles.algorithms.Edge; - /** - * Callback method for creating a node of type {@link yfiles.multipage.NodeType#CONNECTOR}. - * @param context an object providing relevant layout information, for example, the current graph as well as various information about the - * graph elements - * @param edgesIds a {@link list} that contains the IDs of edges that are split by this connector - * @param representedNodeId the ID of the node that is represented by this connector - * @returns the created connector node - * @see yfiles.multipage.NodeType#CONNECTOR - * @see yfiles.multipage.LayoutContext#createNode - * @see yfiles.multipage.INodeInfo#representedNode - * @abstract - */ - createConnectorNode(context:yfiles.multipage.LayoutContext,edgesIds:yfiles.algorithms.YList,representedNodeId:any):yfiles.algorithms.Node; - /** - * Callback method for creating an edge of type {@link yfiles.multipage.EdgeType#PROXY}. - *

- * Such an edge should connect the given {@link yfiles.multipage.NodeType#PROXY proxy} and opposite node. - *

- * @param context an object providing relevant layout information, for example, the current graph as well as various information about the - * graph elements - * @param proxyNode the endpoint of the edge that represents the proxy node - * @param opposite the other endpoint of the new edge - * @param replacingEdgeId the ID of the related edge that is connected to the original node - * @param origNodeId the ID of the original node to which the proxy node refers - * @returns the created proxy edge - * @see yfiles.multipage.EdgeType#PROXY - * @see yfiles.multipage.NodeType#PROXY - * @see yfiles.multipage.LayoutContext#createEdge - * @abstract - */ - createProxyEdge(context:yfiles.multipage.LayoutContext,proxyNode:yfiles.algorithms.Node,opposite:yfiles.algorithms.Node,replacingEdgeId:any,origNodeId:any):yfiles.algorithms.Edge; - /** - * Callback method for creating a node of type {@link yfiles.multipage.NodeType#PROXY}. - * @param context an object providing relevant layout information, for example, the current graph as well as various information about the - * graph elements - * @param origNodeId the ID of the node for which a proxy has to be created - * @returns the created proxy node - * @see yfiles.multipage.LayoutContext#createNode - * @see yfiles.multipage.NodeType#PROXY_REFERENCE - * @see yfiles.multipage.NodeType#PROXY - * @abstract - */ - createProxyNode(context:yfiles.multipage.LayoutContext,origNodeId:any):yfiles.algorithms.Node; - /** - * Callback method for creating an edge of type {@link yfiles.multipage.EdgeType#PROXY_REFERENCE}. - *

- * Such an (undirected) edge should connect the given {@link yfiles.multipage.NodeType#PROXY_REFERENCE proxy reference} and opposite node. - *

- * @param context an object providing relevant layout information, for example, the current graph as well as various information about the - * graph elements - * @param proxyReference the endpoint of the edge that represents the proxy reference node - * @param opposite the other endpoint of the new edge - * @param referencingCopyId the ID of the proxy node that is referenced by the proxy reference node - * @returns the created proxy reference edge - * @see yfiles.multipage.EdgeType#PROXY_REFERENCE - * @see yfiles.multipage.NodeType#PROXY_REFERENCE - * @see yfiles.multipage.LayoutContext#createEdge - * @abstract - */ - createProxyReferenceEdge(context:yfiles.multipage.LayoutContext,proxyReference:yfiles.algorithms.Node,opposite:yfiles.algorithms.Node,referencingCopyId:any):yfiles.algorithms.Edge; - /** - * Callback method for creating a node of type {@link yfiles.multipage.NodeType#PROXY_REFERENCE}. - * @param context an object providing relevant layout information, for example, the current graph as well as various information about the - * graph elements - * @param referringProxyId the ID of the proxy to which the created node refers - * @returns the new proxy reference node - * @see yfiles.multipage.NodeType#PROXY_REFERENCE - * @see yfiles.multipage.LayoutContext#createNode - * @see yfiles.multipage.NodeType#PROXY - * @abstract - */ - createProxyReferenceNode(context:yfiles.multipage.LayoutContext,referringProxyId:any):yfiles.algorithms.Node; - } - var IElementFactory:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.multipage.IElementFactory; - }; - /** - * Interface that offers access to the information objects of graph elements. - * @interface - */ - export interface IElementInfoManager extends yfiles.lang.Object{ - /** - * Returns the edge information object of the given edge. - * @param edge the edge for which the information object should be returned - * @returns the edge information object of the given edge - * @abstract - */ - getEdgeInfo(edge:yfiles.algorithms.Edge):yfiles.multipage.IEdgeInfo; - /** - * Returns the edge label information object of the given edge label layout. - * @param edgeLabelLayout the edge label layout for which the information object should be returned - * @returns the edge label information object of the given edge label layout - * @abstract - */ - getEdgeLabelInfo(edgeLabelLayout:yfiles.layout.IEdgeLabelLayout):yfiles.multipage.IEdgeLabelInfo; - /** - * Returns the node information object of the given node. - * @param node the node for which the information object should be returned - * @returns the node information object of the given node - * @abstract - */ - getNodeInfo(node:yfiles.algorithms.Node):yfiles.multipage.INodeInfo; - /** - * Returns the node label layout information object of the given node label layout. - * @param nodeLabelLayout the node label layout for which the information object should be returned - * @returns the node label information object of the given node label layout - * @abstract - */ - getNodeLabelInfo(nodeLabelLayout:yfiles.layout.INodeLabelLayout):yfiles.multipage.INodeLabelInfo; - } - var IElementInfoManager:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.multipage.IElementInfoManager; - }; - /** - * Callback that is invoked when a {@link yfiles.multipage.MultiPageLayout} has calculated a new multi-page layout. - * @interface - */ - export interface ILayoutCallback extends yfiles.lang.Object{ - /** - * Invoked from {@link yfiles.multipage.MultiPageLayout#applyLayout} when a new multi-page layout has been calculated. - * @param result the result of the layout calculation - * @see yfiles.multipage.MultiPageLayout#applyLayout - * @abstract - */ - layoutDone(result:yfiles.multipage.MultiPageLayoutResult):void; - } - var ILayoutCallback:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.multipage.ILayoutCallback; - }; - /** - * This interface offers access to information associated with a node. - *

- * The information can be either obtained from {@link yfiles.multipage.MultiPageLayoutResult#getNodeInfo} or - * {@link yfiles.multipage.LayoutContext#getNodeInfo}. - *

- * @interface - */ - export interface INodeInfo extends yfiles.lang.Object{ - /** - * Gets the node of the input graph that is represented by the node associated with this {@link yfiles.multipage.INodeInfo info object}. - *

- * Note that, for the special nodes inserted to guarantee that no information is lost, there are no corresponding nodes in - * the input graph. Hence, special nodes are mapped to common nodes in the following way: - *

- *
    - *
  • A {@link yfiles.multipage.NodeType#CONNECTOR connector node} is mapped to the common node connected to the matching connector.
  • - *
  • A {@link yfiles.multipage.NodeType#PROXY proxy node} is mapped to the associated common node (i.e., the proxy is a copy of that node).
  • - *
  • A {@link yfiles.multipage.NodeType#PROXY_REFERENCE proxy reference node} is not mapped to any node, and, thus this method returns null for such nodes.
  • - *
- * @abstract - * @type {yfiles.algorithms.Node} - */ - representedNode:yfiles.algorithms.Node; - /** - * Gets the page number of the {@link yfiles.multipage.MultiPageLayoutResult#getPage page graph} that contains the node associated with this {@link yfiles.multipage.INodeInfo info object}. - * @abstract - * @type {number} - */ - pageNo:number; - /** - * Gets the type of the node associated with this {@link yfiles.multipage.INodeInfo info object}. - * @abstract - * @type {yfiles.multipage.NodeType} - */ - type:yfiles.multipage.NodeType; - /** - * Gets the unique ID of the node associated with this {@link yfiles.multipage.INodeInfo info object}. - * @see yfiles.multipage.MultiPageLayout#NODE_ID_DP_KEY - * @abstract - * @type {any} - */ - id:any; - /** - * Gets the node that refers to the one associated with this {@link yfiles.multipage.INodeInfo info object}. - *

- * More precisely, if the node associated with this info object - *

- *
    - *
  • is a {@link yfiles.multipage.NodeType#CONNECTOR connector node}, this method returns the matching connector node,
  • - *
  • is a {@link yfiles.multipage.NodeType#PROXY proxy node}, it returns the corresponding {@link yfiles.multipage.NodeType#PROXY_REFERENCE proxy reference node},
  • - *
  • is a {@link yfiles.multipage.NodeType#PROXY_REFERENCE proxy reference node}, it returns the corresponding {@link yfiles.multipage.NodeType#PROXY proxy node},
  • - *
  • or otherwise, it returns null.
  • - *
- * @see yfiles.multipage.NodeType#CONNECTOR - * @see yfiles.multipage.NodeType#PROXY - * @see yfiles.multipage.NodeType#PROXY_REFERENCE - * @abstract - * @type {yfiles.algorithms.Node} - */ - referencingNode:yfiles.algorithms.Node; - } - var INodeInfo:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.multipage.INodeInfo; - }; - /** - * A class that holds all information related to a node label. - * @interface - */ - export interface INodeLabelInfo extends yfiles.lang.Object{ - /** - * Gets the unique ID of the associated node label. - * @see yfiles.multipage.MultiPageLayoutResult#getNodeLabelInfo - * @see yfiles.multipage.IElementInfoManager#getNodeLabelInfo - * @abstract - * @type {any} - */ - id:any; - } - var INodeLabelInfo:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.multipage.INodeLabelInfo; - }; - /** - * This class represents the layout context. - *

- * It provides several methods to access data as well as adding and removing elements. - *

- * @class - * @implements {yfiles.multipage.IElementInfoManager} - */ - export interface LayoutContext extends yfiles.lang.Object,yfiles.multipage.IElementInfoManager{} - export class LayoutContext { - /** - * Adds a label to a given edge. - * @param label the label that should be added to the given edge - * @param labeledElement the edge to which the label should be added - */ - addEdgeLabel(label:yfiles.layout.IEdgeLabelLayout,labeledElement:yfiles.algorithms.Edge):void; - /** - * Adds a label to a given node. - * @param label the label that should be added to the given node - * @param labeledElement the node to which the label should be added - */ - addNodeLabel(label:yfiles.layout.INodeLabelLayout,labeledElement:yfiles.algorithms.Node):void; - /** - * All methods of the {@link yfiles.multipage.IElementFactory} have to use this method to create an edge. - * @param source the source of the edge - * @param target the target of the edge - * @param sameDataElementId the ID of the edge whose data should be copied to the created edge (or null if no data should be copied) - * @returns the created edge - * @see yfiles.multipage.IElementFactory - */ - createEdge(source:yfiles.algorithms.Node,target:yfiles.algorithms.Node,sameDataElementId:any):yfiles.algorithms.Edge; - /** - * All methods of the {@link yfiles.multipage.IElementFactory} have to use this method to create a node. - * @param sameDataElementId the ID of the node whose data should be copied to the created node (or null if no data should be copied) - * @returns the created node - * @see yfiles.multipage.IElementFactory - */ - createNode(sameDataElementId:any):yfiles.algorithms.Node; - /** - * - * @param edge - * @returns - */ - getEdgeInfo(edge:yfiles.algorithms.Edge):yfiles.multipage.IEdgeInfo; - /** - * - * @param edgeLabelLayout - * @returns - */ - getEdgeLabelInfo(edgeLabelLayout:yfiles.layout.IEdgeLabelLayout):yfiles.multipage.IEdgeLabelInfo; - /** - * - * @param node - * @returns - */ - getNodeInfo(node:yfiles.algorithms.Node):yfiles.multipage.INodeInfo; - /** - * - * @param nodeLabelLayout - * @returns - */ - getNodeLabelInfo(nodeLabelLayout:yfiles.layout.INodeLabelLayout):yfiles.multipage.INodeLabelInfo; - /** - * Returns the edge of the input graph with the given ID or null if there is no such edge. - * @param id the ID of the edge that should be returned - * @returns the edge of the input graph with the given ID or null if there is no such edge - */ - getOriginalEdge(id:any):yfiles.algorithms.Edge; - /** - * Returns the node of the input graph with the given ID or null if there is no such node. - * @param id the ID of the node that should be returned - * @returns the node of the input graph with the given ID or null if there is no such node - */ - getOriginalNode(id:any):yfiles.algorithms.Node; - /** - * Returns the edge of a page graph (a graph that represents the result of the multi-page layout) with the given ID or null - * if there is no such edge. - * @param id the ID of the edge that should be returned - * @returns the edge of a page graph with the given ID or null if there is no such edge - */ - getPageEdge(id:any):yfiles.algorithms.Edge; - /** - * Returns the node of a page graph (a graph that represents the result of the multi-page layout) with the given ID or null - * if there is no such node. - * @param id the ID of the node that should be returned - * @returns the node of a page graph with the given ID or null if there is no such node - */ - getPageNode(id:any):yfiles.algorithms.Node; - /** - * Removes a label from a given edge. - * @param label the label that should be removed - * @param labeledElement the edge owning the label - * @returns - */ - removeEdgeLabel(label:yfiles.layout.IEdgeLabelLayout,labeledElement:yfiles.algorithms.Edge):boolean; - /** - * Removes a label from a given node. - * @param label the label that should be removed - * @param labeledElement the node owning the label - * @returns - */ - removeNodeLabel(label:yfiles.layout.INodeLabelLayout,labeledElement:yfiles.algorithms.Node):boolean; - /** - * Gets the relevant graph. - * @type {yfiles.layout.LayoutGraph} - */ - graph:yfiles.layout.LayoutGraph; - /** - * Gets the layouter object that belongs to this layout context. - * @type {yfiles.multipage.MultiPageLayout} - */ - layout:yfiles.multipage.MultiPageLayout; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.multipage.LayoutContext; - } - /** - * This layout algorithm subdivides the input graph into several {@link yfiles.layout.LayoutGraph}s (called page graphs) such that - * the layout (calculated by the specified {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}) of each graph fits the {@link yfiles.multipage.MultiPageLayout#maximumPageSize specified maximum page size}. - *

- * The algorithm adds special nodes to guarantee that no information is lost when splitting edges that connect nodes placed - * on different pages (for more details take a look at the concept described below). {@graph {"ann":{"s":[45,30],"d":1},"n":[[165,210,60,30,[[187.94,234.96,14.11,19.93,"G"]]],[271.88,210,30,30,[[280.18,234.96,13.39,19.93,"H"]]],[148.12,450,60,30,[[171.79,474.96,12.67,19.93,"V"]]],[166.88,375,[[183.04,399.96,12.67,19.93,"P"]]],[391.88,510,60,30,[[415.9,534.96,11.94,19.93,"Z"]]],[23.12,510,[[39.29,534.96,12.67,19.93,"Y"]]],[436.88,375,[[453.4,399.96,11.94,19.93,"T"]]],[376.88,375,30,30,[[385.54,399.96,12.67,19.93,"S"]]],[455.62,210,30,30,[[466.82,234.96,7.61,19.93,"I"]]],[30,450,60,30,[[53.31,474.96,13.39,19.93,"U"]]],[436.88,450,[[453.04,474.96,12.67,19.93,"X"]]],[15,375,30,30,[[23.31,399.96,13.39,19.93,"N"]]],[455.62,285,30,30,[[463.21,309.96,14.83,19.93,"M"]]],[350.62,285,75,30,[[382.51,309.96,11.23,19.93,"L"]]],[165,285,[[182.25,309.96,10.5,19.93,"J"]]],[166.88,135,75,30,[[198.04,159.96,12.67,19.93,"E"]]],[241.88,375,30,30,[[249.82,399.96,14.11,19.93,"Q"]]],[75,375,30,30,[[82.94,399.96,14.11,19.93,"O"]]],[120,60,60,30,[[143.31,84.96,13.39,19.93,"C"]]],[33.75,0,[[49.91,24.96,12.67,19.93,"A"]]],[358.12,450,[[372.49,474.96,16.27,19.93,"W"]]],[75,135,[[90.81,159.96,13.39,19.93,"D"]]],[256.88,285,60,30,[[280.54,309.96,12.67,19.93,"K"]]],[301.88,375,[[317.68,399.96,13.39,19.93,"R"]]],[45,60,[[61.16,84.96,12.67,19.93,"B"]]],[271.88,135,30,30,[[280.9,159.96,11.94,19.93,"F"]]]],"e":[[11,9,0,15,-20,-15,[30,420,40,420]],[13,6,25,15,-11.25,-15,[413.12,330,448.12,330]],[7,20,0,15,11.25,-15],[25,1,0,15,0,-15],[13,23,-25,15,11.25,-15,[363.12,330,335.62,330]],[10,4,0,15,20,-15,[459.38,495,441.88,495]],[1,22,0,15,0,-15],[22,16,-20,15,0,-15,[266.88,330,256.88,330]],[14,3,11.25,15,-11.25,-15,[198.75,345,178.12,345]],[0,14,0,15,11.25,-15,[195,255,198.75,255]],[17,9,0,15,20,-15,[90,420,80,420]],[3,2,-11.25,15,0,-15],[24,9,-11.25,15,0,-15,[56.25,105,60,105]],[3,20,11.25,15,-11.25,-15,[200.62,420,369.38,420]],[18,15,20,15,0,-15,[170,105,204.38,105]],[15,0,-9.38,15,0,-15],[9,5,0,15,11.25,-15,[60,495,56.88,495]],[15,2,-28.12,15,-20,-15,[176.25,180,150,180,150,420,158.12,420]],[12,6,0,15,11.25,-15],[0,13,20,15,-18.75,-15,[215,255,369.38,255]],[14,17,-11.25,15,0,-15,[176.25,330,90,330]],[15,3,9.38,15,11.25,-15,[213.75,195,240,195,240,360,200.62,360]],[24,21,11.25,15,-11.25,-15,[78.75,105,86.25,105]],[19,11,-11.25,15,0,-15,[45,45,30,45]],[15,13,28.12,15,18.75,-15,[232.5,180,406.88,180]],[22,23,20,15,-11.25,-15,[306.88,330,313.12,330]],[19,24,11.25,15,0,-15],[0,5,-20,15,-11.25,-15,[175,255,0,255,0,495,34.38,495]],[8,12,0,15,0,-15],[18,21,-20,15,11.25,-15,[130,105,108.75,105]],[18,14,0,15,-11.25,-15,[150,120,135,120,135,270,176.25,270]],[20,4,0,15,-20,-15,[380.62,495,401.88,495]],[13,4,0,15,0,-15,[388.12,345,421.88,345]],[22,2,0,15,20,-15,[286.88,435,198.12,435]]],"vp":[0.0,0.0,486.0,540.0]}} - *

- *

- * The input graph. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"styles":{"1":{"c": 1}},"n":[[523.12,293.69,500,500,2,[[523.12,316.06,500,22.38,"Page 2"]]],[-80.94,293.69,500,500,2,[[-80.94,316.06,500,22.38,"Page 1"]]],[261.56,588.69,45,30,[[277.73,613.65,12.67,19.93,"X"]]],[239.06,528.69,[[247.73,553.65,12.67,19.93,"S"]]],[186.56,588.69,45,30,[[200.93,613.65,16.27,19.93,"W"]]],[164.06,528.69,45,30,[[180.23,553.65,12.67,19.93,"P"]]],[15.94,458.69,75,30,[[47.1,483.65,12.67,19.93,"E"]]],[99.06,528.69,1,[[107.4,553.04,13.33,18.7,"G"]]],[29.06,528.69,1,[[38.73,553.04,10.67,18.7,"L"]]],[38.44,398.69,1,[[47.1,423.04,12.67,18.7,"C"]]],[322.81,458.69,45,30,[[340.06,483.65,10.5,19.93,"J"]]],[271.56,398.69,1,[[279.9,423.04,13.33,18.7,"G"]]],[341.56,398.69,1,[[350.23,423.04,12.67,18.7,"C"]]],[179.06,648.69,60,30,[[203.09,673.65,11.94,19.93,"Z"]]],[121.56,588.69,1,[[131.23,613.04,10.67,18.7,"L"]]],[341.56,528.69,[[349.51,553.65,14.11,19.93,"O"]]],[341.56,588.69,1,[[350.23,613.04,12.67,18.7,"U"]]],[-40.94,528.69,1,[[-31.94,553.04,12,18.7,"K"]]],[-20.94,588.69,60,30,[[2.73,613.65,12.67,19.93,"V"]]],[961.88,408.69,[[973.07,433.65,7.61,19.93,"I"]]],[961.88,468.69,[[969.46,493.65,14.83,19.93,"M"]]],[943.12,528.69,45,30,[[959.65,553.65,11.94,19.93,"T"]]],[855.62,468.69,75,30,[[887.51,493.65,11.23,19.93,"L"]]],[878.12,528.69,1,[[887.46,553.04,11.33,18.7,"Z"]]],[896.88,408.69,1,[[905.87,433.04,12,18.7,"E"]]],[775.62,408.69,60,30,[[798.57,433.65,14.11,19.93,"G"]]],[790.62,468.69,1,[[800.62,493.04,10,18.7,"J"]]],[790.62,358.69,1,[[799.62,383.04,12,18.7,"E"]]],[798.12,528.69,45,30,[[813.93,553.65,13.39,19.93,"R"]]],[620.62,468.69,60,30,[[644.29,493.65,12.67,19.93,"K"]]],[570.62,528.69,1,[[579.62,553.04,12,18.7,"V"]]],[710.62,468.69,45,30,[[726.79,493.65,12.67,19.93,"Y"]]],[635.62,408.69,[[643.93,433.65,13.39,19.93,"H"]]],[635.62,528.69,[[643.57,553.65,14.11,19.93,"Q"]]],[635.62,358.69,[[644.65,383.65,11.94,19.93,"F"]]],[615.62,728.69,60,30,[[638.93,753.65,13.39,19.93,"U"]]],[630.62,668.69,1,[[638.96,693.04,13.33,18.7,"O"]]],[695.62,668.69,45,30,[[711.79,693.65,12.67,19.93,"B"]]],[565.62,668.69,[[573.93,693.65,13.39,19.93,"N"]]],[718.12,728.69,45,30,[[733.93,753.65,13.39,19.93,"D"]]],[783.12,668.69,60,30,[[806.43,693.65,13.39,19.93,"C"]]],[798.12,728.69,1,[[807.12,753.04,12,18.7,"E"]]],[868.12,728.69,1,[[878.12,753.04,10,18.7,"J"]]],[569.38,608.69,45,30,[[585.54,633.65,12.67,19.93,"A"]]]],"e":[[9,6,0,15,0,-15],[4,13,0,15,0,-15],[15,16,0,15,0,-15],[3,4,0,15,11.25,-15,[254.06,568.69,220.31,568.69]],[12,10,0,15,11.25,-15],[6,7,9.38,15,0,-15,[62.81,508.69,114.06,508.69]],[10,15,11.25,15,0,-15],[5,4,11.25,15,-11.25,-15],[11,10,0,15,-11.25,-15,[286.56,438.69,334.06,438.69]],[17,18,0,15,-20,-15,[-25.94,568.69,-10.94,568.69]],[6,8,-9.38,15,0,-15],[14,13,0,15,-20,-15,[136.56,628.69,189.06,628.69]],[2,13,0,15,20,-15,[284.06,628.69,229.06,628.69]],[6,5,28.12,15,-11.25,-15,[81.56,498.69,175.31,498.69]],[5,18,-11.25,15,20,-15,[175.31,568.69,29.06,568.69]],[10,5,-11.25,15,11.25,-15,[334.06,498.69,197.81,498.69]],[6,18,-28.12,15,0,-15,[25.31,498.69,9.06,498.69]],[27,25,0,15,0,-15],[34,32,0,15,0,-15],[19,20,0,15,0,-15],[22,23,0,15,0,-15],[25,26,0,15,0,-15],[32,29,0,15,0,-15],[29,33,0,15,0,-15],[36,35,0,15,0,-15],[40,41,0,15,0,-15],[20,21,0,15,11.25,-15],[43,38,-11.25,15,0,-15],[24,22,0,15,18.75,-15],[37,39,11.25,15,-11.25,-15],[29,30,-20,15,0,-15,[630.62,508.69,585.62,508.69]],[38,35,0,15,-20,-15,[580.62,708.69,625.62,708.69]],[40,42,20,15,0,-15,[833.12,708.69,883.12,708.69]],[22,21,25,15,-11.25,-15,[918.12,508.69,954.38,508.69]],[22,28,-25,15,11.25,-15,[868.12,508.69,831.88,508.69]],[25,31,-20,15,11.25,-15,[785.62,448.69,744.38,448.69]],[37,35,-11.25,15,20,-15,[706.88,708.69,665.62,708.69]],[40,39,-20,15,11.25,-15,[793.12,708.69,751.88,708.69]],[25,22,20,15,-18.75,-15,[825.62,448.69,874.38,448.69]],[43,37,11.25,15,0,-15,[603.12,648.69,718.12,648.69]],[29,28,20,15,-11.25,-15,[670.62,508.69,809.38,508.69]],[35,31,-30,0,-14.5,-15,[555.62,743.69,555.62,348.69,718.62,348.69]]],"vp":[-81.0,293.0,1105.0,501.0]}} - *

- *

- * The input graph is subdivided into two pages with size 500x500. Circular nodes denote the so-called {@link yfiles.multipage.NodeType#CONNECTOR connectors} that - * split edges to nodes placed on other pages. The label of a connector corresponds to that of the opposite node of the - * split edge. - *

- *

- * Layout Style - *

- *

- * This multi-page layout algorithm subdivides the input graph into several smaller ones and applies existing layout - * algorithms to each of them. Hence, its layout style heavily depends on the selected {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm} used for each - * single page. Furthermore, the algorithm uses several refinement steps to produce more compact results. - *

- *

- * Features - *

- *

- * Similar to the layout style, the supported feature set mainly depends on the features supported by the specified - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. Note that due to the underlying approach of the {@link yfiles.multipage.MultiPageLayout} it doesn't - * support {@link yfiles.layout.PartitionGrid}s. Furthermore, while the {@link yfiles.multipage.MultiPageLayout} is able to support groups - * (see {@link yfiles.multipage.MultiPageLayout#groupingMode}), it doesn't support edges incident to group nodes. - *

- *

- * Concept - *

- *

- * To guarantee that no information is lost, this layout algorithm replaces edges between nodes on different pages by - * so-called {@link yfiles.multipage.NodeType#CONNECTOR connector nodes}. Furthermore, it may replicate nodes (the clones are called {@link yfiles.multipage.NodeType#PROXY proxy nodes}) and insert special - * nodes to refer to such nodes (so-called {@link yfiles.multipage.NodeType#PROXY_REFERENCE proxy reference nodes}). - *

- *

- * Unlike other yFiles layout algorithms, {@link yfiles.multipage.MultiPageLayout} does not modify its input graph but returns its - * result as a {@link yfiles.multipage.MultiPageLayoutResult}. To be able to profit as much as possible from existing layout - * support, this layout algorithm implements the {@link yfiles.layout.ILayoutAlgorithm} interface, although method {@link yfiles.layout.ILayoutAlgorithm#applyLayout doLayout} does - * not specify a return value. Therefore, client code has to {@link yfiles.multipage.MultiPageLayout#layoutCallback register} a {@link yfiles.multipage.ILayoutCallback} that is invoked - * when the algorithm has calculated a new multi-page result. - *

- * @class - * @extends {yfiles.layout.LayoutStageBase} - */ - export interface MultiPageLayout extends yfiles.layout.LayoutStageBase{} - export class MultiPageLayout { - /** - * Creates a new {@link yfiles.multipage.MultiPageLayout} instance. - * @param core the layout algorithm used for a single page - */ - constructor(core:yfiles.layout.ILayoutAlgorithm); - /** - * This method is called to further improve the layout results. - *

- * The marked nodes have to be placed without changing the coordinates of the fixed (non-marked) elements and without - * exceeding the specified maximum page size. Furthermore, the basic layout properties should be maintained. - *

- *

- * Subclasses may implement a custom layout strategy for this step. - *

- * @param graph the input graph - * @param incrementalNodesDP a {@link } that returns a boolean value indicating whether or not a node is marked; the positions - * of the non-marked nodes are not allowed to change - * @param context the current layout context - * @see yfiles.multipage.LayoutContext - * @protected - */ - applyIncrementalLayout(graph:yfiles.layout.LayoutGraph,incrementalNodesDP:yfiles.algorithms.IDataProvider,context:yfiles.multipage.LayoutContext):void; - /** - * Calculates a new multi-page layout for the specified graph. - *

- * Unlike method {@link yfiles.multipage.MultiPageLayout#applyLayout}, this method ignores the registered {@link yfiles.multipage.MultiPageLayout#layoutCallback layout callback} and - * directly returns the calculated {@link yfiles.multipage.MultiPageLayoutResult}. - *

- * @param graph the input graph - * @returns an instance of {@link } that represents the result of the layout run - * @throws {Stubs.Exceptions.ArgumentError} if for one of the keys {@link yfiles.multipage.MultiPageLayout#NODE_ID_DP_KEY}, {@link yfiles.multipage.MultiPageLayout#EDGE_ID_DP_KEY}, - * {@link yfiles.multipage.MultiPageLayout#NODE_LABEL_ID_DP_KEY} and {@link yfiles.multipage.MultiPageLayout#EDGE_LABEL_ID_DP_KEY} no {@link yfiles.algorithms.IDataProvider} - * is registered with the given graph - * @see yfiles.multipage.MultiPageLayoutResult - */ - calculateLayout(graph:yfiles.layout.LayoutGraph):yfiles.multipage.MultiPageLayoutResult; - /** - * This method creates the {@link yfiles.multipage.IElementFactory element factory} for multi-page layouts. - *

- * It is called once from {@link yfiles.multipage.MultiPageLayout#elementFactory} if no factory has been explicitly set using {@link yfiles.multipage.MultiPageLayout#elementFactory}. By default, this method returns an instance of - * {@link yfiles.multipage.DefaultElementFactory}. - *

- *

- * Subclasses may create a custom implementation of the element factory. - *

- * @returns the created element factory - * @see yfiles.multipage.MultiPageLayout#elementFactory - * @see yfiles.multipage.MultiPageLayout#elementFactory - * @see yfiles.multipage.IElementFactory - * @protected - */ - createElementFactory():yfiles.multipage.IElementFactory; - /** - * This method is called during a postprocessing step that reduces the number of connectors. - *

- * A pair of connectors can be removed if both connector nodes are placed on the same page. The method removes both - * connector nodes and restores the original edges by calling {@link yfiles.multipage.MultiPageLayout#routeRestoredEdges}. - *

- *

- * Subclasses may implement a custom remove/restore strategy. - *

- * @param connector1 the first connector of the connector pair - * @param connector2 the second connector of the connector pair - * @param originalEdgeIds the IDs of the original edges that have to be restored - * @param context the current layout context - * @returns true if the removal of the connector pair was successful, false otherwise - * @see yfiles.multipage.MultiPageLayout#routeRestoredEdges - * @protected - */ - removeConnectorPair(connector1:yfiles.algorithms.Node,connector2:yfiles.algorithms.Node,originalEdgeIds:yfiles.algorithms.YList,context:yfiles.multipage.LayoutContext):boolean; - /** - * This method is called whenever some single edges have to be routed without changing the position of nodes (e.g., by {@link yfiles.multipage.MultiPageLayout#removeConnectorPair} - * to route the restored edges). - *

- * It has to guarantee that the routes are fully contained within the given bounding rectangle. - *

- *

- * Subclasses may implement a custom routing strategy for the restored edges. - *

- * @param graph the relevant graph - * @param selectedEdgesDP a {@link } that returns a boolean value indicating whether or not an edge should be rerouted - * @param boundingRectangle the edge routes should be fully contained within this rectangle - * @see yfiles.multipage.MultiPageLayout#removeConnectorPair - * @protected - */ - routeRestoredEdges(graph:yfiles.layout.LayoutGraph,selectedEdgesDP:yfiles.algorithms.IDataProvider,boundingRectangle:yfiles.algorithms.YRectangle):void; - /** - * Data provider key for assigning a cluster ID to common (non-group) nodes - * @see yfiles.multipage.MultiPageLayout#strictClusterSeparation - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static NODE_CLUSTER_ID_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for mapping each node of the input graph to a unique ID - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static NODE_ID_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for mapping each edge of the input graph to a unique ID - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static EDGE_ID_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for mapping each edge label of the input graph to a unique ID - * @const - * @static - * @type {yfiles.algorithms.IEdgeLabelLayoutDpKey.} - */ - static EDGE_LABEL_ID_DP_KEY:yfiles.algorithms.IEdgeLabelLayoutDpKey; - /** - * Data provider key for mapping each node label of the input graph to a unique ID - * @const - * @static - * @type {yfiles.algorithms.INodeLabelLayoutDpKey.} - */ - static NODE_LABEL_ID_DP_KEY:yfiles.algorithms.INodeLabelLayoutDpKey; - /** - * Data provider key for specifying the type of multi-edges - *

- * If {@link yfiles.multipage.MultiPageLayout#edgeBundleModeMask} & {@link yfiles.multipage.EdgeBundleModes#DISTINGUISH_TYPES} == 1, multi-edges (edges with same endpoints) associated with - * different types (objects) are distinguished, i.e., they are split by different connector pairs (see - * {@link yfiles.multipage.NodeType#CONNECTOR}). - *

- * @see yfiles.multipage.EdgeBundleModes#DISTINGUISH_TYPES - * @see yfiles.multipage.MultiPageLayout#edgeBundleModeMask - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static EDGE_TYPE_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Gets or sets whether or not the algorithm should separate nodes with different {@link yfiles.multipage.MultiPageLayout#NODE_CLUSTER_ID_DP_KEY cluster IDs}. - *

- * More precisely, if this option is enabled, the algorithm doesn't place nodes with different cluster IDs onto the same - * page. Otherwise, such a placement is possible. - *

- * @see yfiles.multipage.MultiPageLayout#NODE_CLUSTER_ID_DP_KEY - * @type {boolean} - */ - strictClusterSeparation:boolean; - /** - * Gets or sets whether or not the given {@link yfiles.multipage.MultiPageLayout#labeling labeling algorithm} places the labels of the input graph. - *

- * If this option is disabled, the labels are either ignored or placed by the integrated labeling approach of the - * {@link yfiles.layout.LayoutStageBase#coreLayout core layout algorithm}. - *

- * @see yfiles.multipage.MultiPageLayout#labeling - * @type {boolean} - */ - labelingEnabled:boolean; - /** - * Gets or sets the {@link yfiles.multipage.IElementFactory element factory} for creating special nodes and edges in a multi-page layout. - *

- * If no element factory is set explicitly (see method {@link yfiles.multipage.MultiPageLayout#elementFactory}), a new instance is created and set by method {@link yfiles.multipage.MultiPageLayout#createElementFactory} - * during the first layout run. - *

- * @see yfiles.multipage.MultiPageLayout#createElementFactory - * @see yfiles.multipage.IElementFactory - * @type {yfiles.multipage.IElementFactory} - */ - elementFactory:yfiles.multipage.IElementFactory; - /** - * Gets or sets the {@link yfiles.multipage.ILayoutCallback callback} that is notified upon completion of multi-page layout calculation runs. - * @see yfiles.multipage.ILayoutCallback - * @type {yfiles.multipage.ILayoutCallback} - */ - layoutCallback:yfiles.multipage.ILayoutCallback; - /** - * Gets or sets the bit mask for defining edge bundles. - *

- * All multi-edges (edges with same endpoints) belonging to the same edge bundle are split by the same connector pair (see - * {@link yfiles.multipage.NodeType#CONNECTOR}). - *

- * @see yfiles.multipage.NodeType#CONNECTOR - * @type {yfiles.multipage.EdgeBundleModes} - */ - edgeBundleModeMask:yfiles.multipage.EdgeBundleModes; - /** - * Gets or sets how to handle special nodes (like connector and proxy nodes) with respect to groups. - * @throws {Stubs.Exceptions.ArgumentError} if the specified group mode is unknown - * @see yfiles.multipage.NodeType#CONNECTOR - * @see yfiles.multipage.NodeType#PROXY - * @type {yfiles.multipage.GroupingMode} - */ - groupingMode:yfiles.multipage.GroupingMode; - /** - * Gets or sets the preferred time limit (in milliseconds) for the layout algorithm. - *

- * The specified value has to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the preferred time limit is negative - * @type {number} - */ - maximumDuration:number; - /** - * Gets or sets the {@link yfiles.layout.ILayoutStage} that places the labels of the input graph. - * @see yfiles.multipage.MultiPageLayout#labelingEnabled - * @see yfiles.labeling.GenericLabeling - * @type {yfiles.layout.ILayoutStage} - */ - labeling:yfiles.layout.ILayoutStage; - /** - * Gets or sets the maximum size of a single page. - *

- * The layout algorithm subdivides the input graph such that each part is placed on a different page that fits the - * specified maximum size. - *

- *

- * Both the specified width and height have to be positive. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified width or height is not positive - * @see yfiles.multipage.MultiPageLayout#maximumDuration - * @type {yfiles.algorithms.YDimension} - */ - maximumPageSize:yfiles.algorithms.YDimension; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.multipage.MultiPageLayout; - } - /** - * This class represents the result of a layout run of {@link yfiles.multipage.MultiPageLayout}. - *

- * A layout run subdivides the input graph into several {@link yfiles.layout.LayoutGraph}s (called page graphs) such that the - * layout of each graph fits the {@link yfiles.multipage.MultiPageLayout#maximumPageSize specified maximum page size}. This class provides access to the different page graphs (see - * method {@link yfiles.multipage.MultiPageLayoutResult#getPage}). - *

- *

- * An instance of this class can be either obtained by calling {@link yfiles.multipage.MultiPageLayout#calculateLayout} or - * {@link yfiles.multipage.MultiPageLayout#applyLayout}. In the latter case, a {@link yfiles.multipage.ILayoutCallback} has to be {@link yfiles.multipage.MultiPageLayout#layoutCallback set} - * before starting the layout run. - *

- * @class - * @implements {yfiles.multipage.IElementInfoManager} - */ - export interface MultiPageLayoutResult extends yfiles.lang.Object,yfiles.multipage.IElementInfoManager{} - export class MultiPageLayoutResult { - /** - * - * @param edge - * @returns - */ - getEdgeInfo(edge:yfiles.algorithms.Edge):yfiles.multipage.IEdgeInfo; - /** - * - * @param edgeLabelLayout - * @returns - */ - getEdgeLabelInfo(edgeLabelLayout:yfiles.layout.IEdgeLabelLayout):yfiles.multipage.IEdgeLabelInfo; - /** - * - * @param node - * @returns - */ - getNodeInfo(node:yfiles.algorithms.Node):yfiles.multipage.INodeInfo; - /** - * - * @param nodeLabelLayout - * @returns - */ - getNodeLabelInfo(nodeLabelLayout:yfiles.layout.INodeLabelLayout):yfiles.multipage.INodeLabelInfo; - /** - * Returns the page graph associated with the given page number. - *

- * A page graph is a subgraph of the input graph whose layout fits the {@link yfiles.multipage.MultiPageLayout#maximumPageSize specified maximum page size}. - *

- * @param pageNo the given page number - * @returns the page graph associated with the given page number - * @throws {Stubs.Exceptions.IndexOutOfRangeError} if pageNo >= pageCount or pageNo < 0 - * @see yfiles.multipage.MultiPageLayoutResult#pageCount - */ - getPage(pageNo:number):yfiles.layout.LayoutGraph; - /** - * Returns the number of pages available in this {@link yfiles.multipage.MultiPageLayoutResult}. - *

- * Each page contains a {@link yfiles.multipage.MultiPageLayoutResult#getPage page graph} whose layout fits the {@link yfiles.multipage.MultiPageLayout#maximumPageSize specified maximum page size}. - *

- * @returns the number of available pages - * @see yfiles.multipage.MultiPageLayoutResult#getPage - */ - pageCount():number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.multipage.MultiPageLayoutResult; - } - /** - * Specifies custom data for the {@link yfiles.multipage.MultiPageLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface MultiPageLayoutData extends yfiles.layout.LayoutData{} - export class MultiPageLayoutData { - constructor(); - /** - * Gets or sets the mapping from nodes to their unique IDs. - * @see yfiles.multipage.MultiPageLayout#NODE_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeIds:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from edges to their unique IDs. - * @see yfiles.multipage.MultiPageLayout#EDGE_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeIds:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from node labels to their unique IDs. - * @see yfiles.multipage.MultiPageLayout#NODE_LABEL_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeLabelIds:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from edge labels to their unique IDs. - * @see yfiles.multipage.MultiPageLayout#EDGE_LABEL_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeLabelIds:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their cluster id. - *

- * Nodes with the same cluster id should preferably be placed on the same page. - *

- * @see yfiles.multipage.MultiPageLayout#NODE_CLUSTER_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeClusterIds:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from edges to their type. - *

- * Multi-edges (edges with same endpoints) of different kind are distinguished if {@link yfiles.multipage.MultiPageLayout#edgeBundleModeMask} & {@link yfiles.multipage.EdgeBundleModes#DISTINGUISH_TYPES} - * == 1. - *

- * @see yfiles.multipage.MultiPageLayout#EDGE_TYPE_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeTypes:yfiles.layout.ItemMapping; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.multipage.MultiPageLayoutData; - } - }export namespace circular{ - /** - * This layout algorithm arranges graphs in a circular fashion. - *

- * Layout Style The nodes are arranged in circles and stars which emphasize group and tree structures inside a graph. Circular layout - * algorithms find applications in many areas such as social networking, network management, WWW visualization, eCommerce, - * telecommunications. {@graph {"ann": {"s": [30,30], "d": 0, "c": 1},"n": [[558.09,362.1], [95.35,12.18], [0,148.17], [441.83,243.3], [540.68,299.26], [142.21,0], [298.88,449.09], [347.79,497.99], [232.08,466.99], [143.67,101.87], [100.64,154.2], [137.11,211.3], [206.74,126.62], [202.69,194.26], [263.08,582.7], [329.89,564.8], [214.18,533.79], [453.2,487.29], [528.46,21.5], [587.42,54.88], [478.49,67.27], [573.89,121.27], [506.57,128.93], [603.52,281.85], [620.93,344.69], [285.81,262.6], [259.33,689.12], [213.12,676.73], [311.63,331.4], [358.3,274.64]], "e": [[4,0], [4,3], [6,7], [6,8], [8,7], [1,9], [9,5], [9,10], [10,2], [10,11], [12,9], [11,13], [13,12], [15,14], [15,7], [14,16], [16,8], [16,7], [7,17], [18,19], [20,18], [19,21], [21,20], [20,22], [22,21], [22,3], [4,23], [0,24], [24,23], [25,13], [14,26], [14,27], [25,28], [28,6], [28,29], [29,25], [29,3]], "vp": [0.0,0.0,651.0,720.0]}} Circular layout with default settings {@graph {"ann": {"s": [30,30], "d": 0, "c" : 1},"n": [[452.67,672.8], [684.06,272.02], [661.72,203.26], [518.72,643.4], [29.9,484.57], [238.95,672.8], [661.72,484.57], [238.95,15.03], [0,343.92], [309.66,0], [114.42,600.9], [29.9,203.26], [452.67,15.03], [7.56,415.81], [114.42,86.93], [309.66,687.83], [381.96,0], [625.58,140.65], [172.91,643.4], [577.2,86.93], [381.96,687.83], [691.62,343.92], [7.56,272.02], [577.2,600.9], [625.58,547.18], [66.04,140.65], [684.06,415.81], [66.04,547.18], [518.72,44.44], [172.91,44.44]], "e": [[1,0], [1,2], [3,0], [1,5], [5,4], [4,6], [8,4], [9,7], [1,12], [13,4], [4,15], [5,15], [10,18], [18,7], [18,5], [18,1], [17,19], [19,2], [15,20], [20,0], [4,21], [8,21], [21,6], [11,22], [22,8], [20,23], [23,3], [23,13], [23,4], [23,24], [6,24], [14,25], [25,11], [25,22], [22,26], [2,26], [17,26], [26,24], [26,21], [1,27], [27,10], [27,18], [12,28], [28,2], [28,19], [7,29], [12,29], [29,14], [29,16], [29,18]], "vp": [0.0,0.0,722.0,718.0]}} Circular layout with {@link yfiles.circular.LayoutStyle#SINGLE_CYCLE} - * layout style ConceptThe layout algorithm performs three steps when calculating a circular arrangement for a graph: - *

- *
    - *
  1. - * It searches for partitions in the input graph depending on connectivity and on the given - * {@link yfiles.circular.CircularLayout#layoutStyle layout style}. Considering each partition as a node, the resulting graph has a tree-like structure. - *
  2. - *
  3. The partitions are laid out as circles using the selected {@link yfiles.circular.CircularLayout#partitionStyle partition style}.
  4. - *
  5. - * The algorithm delegates the layout calculation for the underlying tree (in which each node corresponds to a partition) - * to a specialized layout algorithm accessible by {@link yfiles.circular.CircularLayout#singleCycleLayout} or {@link yfiles.circular.CircularLayout#balloonLayout}. The partitions are moved to their final location. - *
  6. - *
- *

- * Features - *

- *

- * The layout algorithm places the nodes in circles that represent a partition. There are several ways to find partitions - * in the input graph. Which one is applied is defined using {@link yfiles.circular.CircularLayout#layoutStyle}. - *

- *

- * The nodes in a partition can either lie on or in the interior of a circle. The placement of the nodes affects the - * compactness of the layout and can be specified using {@link yfiles.circular.CircularLayout#partitionStyle}. - *

- *

- * Since edges are routed as straight lines, they may overlap with nodes or node labels. To resolve these overlaps, an edge - * routing algorithm (e.g. {@link yfiles.router.EdgeRouter} or {@link yfiles.router.OrganicEdgeRouter}) can be appended. - *

- *

- * This layout algorithm supports {@link yfiles.circular.CircularLayout#edgeBundling edge bundling}. In order to bundle the edges, the nodes of the graph are clustered in - * groups. Edge bundling is supported only if {@link yfiles.circular.CircularLayout#partitionStyle partition layout style} is set to {@link yfiles.circular.PartitionStyle#CYCLE} and {@link yfiles.circular.CircularLayout#layoutStyle layout style} - * is other than {@link yfiles.circular.LayoutStyle#BCC_ISOLATED}. - *

- * @class - * @extends {yfiles.layout.MultiStageLayout} - */ - export interface CircularLayout extends yfiles.layout.MultiStageLayout{} - export class CircularLayout { - /** - * Creates a new {@link yfiles.circular.CircularLayout} instance with the default settings. - */ - constructor(); - /** - * Data acceptor key for publishing the final circle information - *

- * For each node, the ID of the circle on which it was placed will be stored. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static CIRCLE_ID_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for defining custom node partitions - *

- * The {@link yfiles.algorithms.IDataProvider} needs to provide a mapping from {@link yfiles.algorithms.Node}s to unique {@link any} IDs for each - * group of nodes. These groups will form the circles in the layout. - *

- * @see yfiles.circular.LayoutStyle#CUSTOM_GROUPS - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static CUSTOM_GROUPS_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets or sets whether or not the layout algorithm reserves space for node labels preventing possible overlaps. - *

- * Nodes get temporarily enlarged such that they contain their labels. - *

- *

- * This might result in layouts that need much space. - *

- * @type {boolean} - */ - considerNodeLabels:boolean; - /** - * Gets or sets whether or not, in the underlying tree, the children of a tree node are placed on a common radius. - *

- * Disabling this feature may produce more compact layout results. - *

- * @type {boolean} - */ - placeChildrenOnCommonRadius:boolean; - /** - * Gets or sets whether or not to take the coordinates of the input diagram into account when arranging the nodes of the - * partitions and the partitions themselves. - *

- * If enabled: - *

- *
    - *
  • - * For complex partitions (those consisting of more than one node), the layout algorithm tries to keep peripheral nodes and - * maintain their circular order around the center of the disk/circle. Other partitions that connect to this node are moved - * accordingly, if possible. - *
  • - *
  • - * For multiple partitions that connect to the same node, the layout algorithm tries to keep their circular order around - * this node. This only works as expected for {@link yfiles.circular.LayoutStyle#BCC_COMPACT} as layout style, since otherwise the - * underlying tree structure is not well defined. - *
  • - *
- * @type {boolean} - */ - fromSketchMode:boolean; - /** - * Gets or sets the maximum deviation angle allowed for an edge. - *

- * The deviation angle for an edge is the difference between its optimal angle away from the parent cycle and its actual - * angle. - *

- * @type {number} - */ - maximumDeviationAngle:number; - /** - * Gets or sets the global layout style for this layout algorithm. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown layout style is set - * @type {yfiles.circular.LayoutStyle} - */ - layoutStyle:yfiles.circular.LayoutStyle; - /** - * Gets the {@link yfiles.circular.SingleCycleLayout} instance used for laying out nodes on a single cycle. - *

- * Configuring this layout algorithm only affects layouts with only one partition. - *

- * @see yfiles.circular.CircularLayout#layoutStyle - * @type {yfiles.circular.SingleCycleLayout} - */ - singleCycleLayout:yfiles.circular.SingleCycleLayout; - /** - * Gets the {@link yfiles.tree.BalloonLayout} instance used for arranging multiple partitions. - *

- * Configuring this layout algorithm affects the arrangement of the partitions within the overall layout. - *

- * @see yfiles.circular.CircularLayout#layoutStyle - * @type {yfiles.tree.BalloonLayout} - */ - balloonLayout:yfiles.tree.BalloonLayout; - /** - * Gets or sets the style for the arrangement of each partition. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown style is given - * @type {yfiles.circular.PartitionStyle} - */ - partitionStyle:yfiles.circular.PartitionStyle; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for arranging the components of the graph is activated. - * @see yfiles.layout.MultiStageLayout#componentLayoutEnabled - * @see yfiles.layout.MultiStageLayout#componentLayout - * @see yfiles.layout.ComponentLayout - * @type {boolean} - */ - componentLayoutEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for hiding group nodes is activated. - * @see yfiles.layout.MultiStageLayout#hideGroupsStageEnabled - * @see yfiles.layout.MultiStageLayout#hideGroupsStage - * @see yfiles.layout.HideGroupsStage - * @type {boolean} - */ - hideGroupsStageEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} that modifies the orientation of the layout is activated. - * @see yfiles.layout.MultiStageLayout#orientationLayoutEnabled - * @see yfiles.layout.MultiStageLayout#orientationLayout - * @see yfiles.layout.MultiStageLayout#layoutOrientation - * @see yfiles.layout.OrientationLayout - * @type {boolean} - */ - orientationLayoutEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing self-loops is activated. - * @see yfiles.layout.MultiStageLayout#selfLoopRouterEnabled - * @see yfiles.layout.MultiStageLayout#selfLoopRouter - * @see yfiles.layout.SelfLoopRouter - * @type {boolean} - */ - selfLoopRouterEnabled:boolean; - /** - * Gets the {@link yfiles.layout.EdgeBundling} instance that defines the settings of the edge bundling feature. - *

- * The specified {@link yfiles.layout.EdgeBundling} defines global bundling properties. Settings for individual edges can be - * defined by assigning an {@link yfiles.layout.EdgeBundleDescriptor} to an edge using a {@link yfiles.algorithms.IDataProvider} registered - * with key {@link yfiles.layout.EdgeBundling#EDGE_BUNDLE_DESCRIPTOR_DP_KEY}. - *

- * @type {yfiles.layout.EdgeBundling} - */ - edgeBundling:yfiles.layout.EdgeBundling; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.circular.CircularLayout; - } - export enum LayoutStyle{ - /** - * The specifier for a layout style where the nodes within a biconnected component of the input graph are treated as - * separate partitions. - *

- * If a node belongs to more than one biconnected component, it will be assigned to the one that seems to be more - * suitable. - *

- * @see yfiles.circular.CircularLayout#layoutStyle - */ - BCC_COMPACT, - /** - * The specifier for a layout style where the nodes within a biconnected component of the input graph are treated as - * separate partitions. - *

- * If a node belongs to more than one biconnected component, it will form an isolated partition and will be laid out in - * between of all its biconnected component cycles. - *

- * @see yfiles.circular.CircularLayout#layoutStyle - */ - BCC_ISOLATED, - /** - * The specifier for a layout style where the user can specify groups that will form separate partitions. To define the - * groups, a {@link yfiles.algorithms.IDataProvider} with key {@link yfiles.circular.CircularLayout#CUSTOM_GROUPS_DP_KEY} must be - * registered. - * @see yfiles.circular.CircularLayout#layoutStyle - */ - CUSTOM_GROUPS, - /** - * The specifier for a layout style where all nodes of the input graph will be placed on or in the interior of a single - * cycle. - * @see yfiles.circular.CircularLayout#layoutStyle - */ - SINGLE_CYCLE - } - export enum PartitionStyle{ - /** - * Specifier for a partition layout style where all nodes of a partition are placed on the boundary of a circle. - * @see yfiles.circular.CircularLayout#partitionStyle - */ - CYCLE, - /** - * Specifier for a partition style with a semi-compact layout for each partition. - *

- * This style places nodes in the interior and on the border of a circle and arranges them in an organic manner, leading to - * a more compact layout. Only nodes with connections to other partitions are guaranteed to lie on the boundary of the - * resulting disk. - *

- * @see yfiles.circular.CircularLayout#partitionStyle - */ - DISK, - /** - * Specifier for a partition style with a compact layout for each partition. - *

- * This style creates an organic circular layout for each partition. Even nodes that connect to different partitions may be - * placed in the interior of the resulting disk. - *

- * @see yfiles.circular.CircularLayout#partitionStyle - */ - ORGANIC - } - /** - * This layout algorithm places all nodes of a graph on a single cycle. - *

- * Layout Style - *

- *

- * All nodes of a graph are placed on one common circle, generating circular layouts. The edges are drawn as simple, straight lines. The - * resulting layouts look like a ring. Edges connecting nodes which are not next to each other on the ring are routed inside of the - * circle. If a graph contains many edges, the number of edge crossings inside the circle may be quite high. - *

- *

- * Single-cycle circular layouts are suitable for the visualization of networks such as ring networks or smaller social - * networks. They are also useful to layout cyclic subgraphs of a larger graph. - *

- *

- * {@graph {"ann":{"s":[40,40],"d":1,"c":1},"n":[[39.45,439.2],[459.2,19.45],[336.26,-5],[39.45,193.32],[109.09,543.42],[563.42,89.09],[633.06,193.32],[15,316.26],[213.32,613.06],[563.42,543.42],[336.26,637.52],[459.2,613.06],[633.06,439.2],[657.52,316.26],[213.32,19.45],[109.09,89.09]],"e":[[2,1,0,-4.59,0,-4.59],[4,0,-6.01,0,-6.01,0],[0,4,4.16,-2.78,4.16,-2.78],[1,5],[5,6],[1,2,-0.88,4.41,-0.88,4.41],[11,9],[10,11],[9,12,-4.16,-2.78,-4.16,-2.78],[13,12],[12,9,6.01,0,6.01,0],[14,15],[15,13,0,-4.87,0,-4.87],[7,12,0.88,-4.41,0.88,-4.41],[6,8],[8,14,-5,0,-5,0],[14,8,5,0,5,0],[7,3],[3,15,-4.16,-2.78,-4.16,-2.78],[15,3,6.01,0,6.01,0],[12,7,0,4.59,0,4.59],[0,7],[10,8],[6,13],[4,8]],"vp":[15.0,-5.0,683.0,683.0]}} An example of a single cycle layoutConceptFirst, the nodes are sorted by applying either a custom or some default - * {@link yfiles.algorithms.INodeSequencer}. Then, all nodes are placed on a circle with an appropriate radius according to the - * calculated order. Features - *

- *

- * The order in which the nodes are placed on the circle is a crucial aspect of this algorithm. By specifying a {@link yfiles.algorithms.INodeSequencer} - * instance via {@link yfiles.circular.SingleCycleLayout#nodeSequencer}, the order can be customized. - *

- *

- * There are two options to determine the radius of the circle on which nodes are placed: - *

- *
    - *
  1. The radius can be determined automatically. A specified {@link yfiles.circular.SingleCycleLayout#minimumRadius minimum radius} will be obeyed when choosing the radius.
  2. - *
  3. The radius can be chosen manually. To do so, disable the {@link yfiles.circular.SingleCycleLayout#automaticRadius automatic radius selection} and specify the custom radius via {@link yfiles.circular.SingleCycleLayout#fixedRadius}.
  4. - *
- * @class - * @extends {yfiles.layout.MultiStageLayout} - */ - export interface SingleCycleLayout extends yfiles.layout.MultiStageLayout{} - export class SingleCycleLayout { - /** - * Creates a new {@link yfiles.circular.SingleCycleLayout} instance with default settings. - */ - constructor(); - /** - * Gets or sets the angle that describes the location on the circle of the first node. - *

- * The angle is measured in radians and world coordinates, e.g., 0 means east, Pi/2 means south. - *

- * @type {number} - */ - initialAngle:number; - /** - * Gets or sets whether or not to consider the coordinates of the input diagram when arranging the graph. - *

- * If this feature is enabled, the original circular order of peripheral nodes around an estimated circle center will be - * preserved. - *

- * @type {boolean} - */ - fromSketchModeEnabled:boolean; - /** - * Gets or sets the minimum distance between nodes that are next to each other on the circle. - * @throws {Stubs.Exceptions.ArgumentError} if the given distance is negative - * @type {number} - */ - minimumNodeDistance:number; - /** - * Gets or sets a fixed radius for the circle on which the nodes will be placed. - * @throws {Stubs.Exceptions.ArgumentError} if the given radius is negative - * @see yfiles.circular.SingleCycleLayout#minimumRadius - * @see yfiles.circular.SingleCycleLayout#automaticRadius - * @type {number} - */ - fixedRadius:number; - /** - * Gets or sets the minimum radius for the circle on which the nodes are placed. - * @throws {Stubs.Exceptions.ArgumentError} if the given minimum radius is negative - * @see yfiles.circular.SingleCycleLayout#fixedRadius - * @see yfiles.circular.SingleCycleLayout#automaticRadius - * @type {number} - */ - minimumRadius:number; - /** - * Gets or sets whether or not the radius of the circle should be determined automatically. - *

- * If enabled, the radius will be chosen such that the distance between nodes which are next to each other on the circle is - * approximately the same as the {@link yfiles.circular.SingleCycleLayout#minimumNodeDistance minimum node distance}. - *

- *

- * If this feature is disabled, the radius specified via {@link yfiles.circular.SingleCycleLayout#fixedRadius} will be applied. - *

- * @see yfiles.circular.SingleCycleLayout#minimumRadius - * @see yfiles.circular.SingleCycleLayout#fixedRadius - * @type {boolean} - */ - automaticRadius:boolean; - /** - * Gets or sets the custom {@link yfiles.algorithms.INodeSequencer} that will be used for determining the order of the nodes for - * the circle placement. - * @type {yfiles.algorithms.INodeSequencer} - */ - nodeSequencer:yfiles.algorithms.INodeSequencer; - /** - * Gets the radius that was applied to the last layout calculated by this algorithm. - *

- * This method is useful if one wants to know the actual radius of a layout calculated by this algorithm. - *

- * @type {number} - */ - lastAppliedRadius:number; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} that modifies the orientation of the layout is activated. - * @see yfiles.layout.MultiStageLayout#orientationLayoutEnabled - * @see yfiles.layout.MultiStageLayout#orientationLayout - * @see yfiles.layout.MultiStageLayout#layoutOrientation - * @see yfiles.layout.OrientationLayout - * @type {boolean} - */ - orientationLayoutEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing self-loops is activated. - * @see yfiles.layout.MultiStageLayout#selfLoopRouterEnabled - * @see yfiles.layout.MultiStageLayout#selfLoopRouter - * @see yfiles.layout.SelfLoopRouter - * @type {boolean} - */ - selfLoopRouterEnabled:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.circular.SingleCycleLayout; - } - /** - * Specifies custom data for the {@link yfiles.circular.CircularLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface CircularLayoutData extends yfiles.layout.LayoutData{} - export class CircularLayoutData { - constructor(); - /** - * Gets or sets the mapper from nodes to their circle id. - *

- * If this property is set, the mapper is filled by the layout with the circle information. - *

- * @see yfiles.circular.CircularLayout#CIRCLE_ID_DP_KEY - * @type {yfiles.collections.IMapper.} - */ - circleIds:yfiles.collections.IMapper; - /** - * Gets or sets the mapping from nodes to their custom group object. - *

- * The custom groups are only considered if {@link yfiles.circular.CircularLayout#layoutStyle} is set to {@link yfiles.circular.LayoutStyle#CUSTOM_GROUPS} - *

- * @see yfiles.circular.CircularLayout#CUSTOM_GROUPS_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - customGroups:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their {@link yfiles.layout.NodeHalo}. - * @see yfiles.layout.NodeHalo#NODE_HALO_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeHalos:yfiles.layout.ItemMapping; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - /** - * Gets or sets the mapping of edges to their {@link yfiles.layout.EdgeBundleDescriptor}. - *

- * Bundling together multiple edges means that their common parts are to some degree merged into a bundled part. At the - * source and target point, the edges are again clearly split. - *

- *

- * If an edge is mapped to null, the {@link yfiles.layout.EdgeBundling#defaultBundleDescriptor default descriptor} is used. - *

- * @see yfiles.layout.EdgeBundleDescriptor - * @see yfiles.circular.CircularLayout#edgeBundling - * @type {yfiles.layout.ItemMapping.} - */ - edgeBundleDescriptors:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.circular.CircularLayoutData; - } - }export namespace orthogonal{ - /** - * This class provides layout information for the edges of the graph. - *

- * {@link yfiles.orthogonal.EdgeLayoutDescriptor} is used by {@link yfiles.orthogonal.OrthogonalLayout} to determine the routing details - * for the edges (e.g. the segment length). - *

- *

- * An {@link yfiles.orthogonal.EdgeLayoutDescriptor} can be specified individually for each edge by using a {@link yfiles.algorithms.IDataProvider} - * which maps from an {@link yfiles.algorithms.Edge} to an {@link yfiles.orthogonal.EdgeLayoutDescriptor} instance. The {@link yfiles.algorithms.IDataProvider} - * is registered with the graph with key {@link yfiles.orthogonal.OrthogonalLayout#EDGE_LAYOUT_DESCRIPTOR_DP_KEY}. - *

- * @see yfiles.orthogonal.OrthogonalLayout#EDGE_LAYOUT_DESCRIPTOR_DP_KEY - * @class - */ - export interface EdgeLayoutDescriptor extends yfiles.lang.Object{} - export class EdgeLayoutDescriptor { - /** - * Creates a new instance of {@link yfiles.orthogonal.EdgeLayoutDescriptor} with the default settings. - */ - constructor(); - /** - * Creates a copy of this {@link yfiles.orthogonal.EdgeLayoutDescriptor} instance. - * @returns a copy of this {@link } instance - */ - createCopy():yfiles.orthogonal.EdgeLayoutDescriptor; - /** - * Gets or sets the minimum length of the first segment of the edge path (at the source node). - *

- * The minimum length must be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum length of the first segment is negative - * @type {number} - */ - minimumFirstSegmentLength:number; - /** - * Gets or sets the minimum length of the last segment of the edge path (at the target node). - *

- * The minimum length must be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum length of the last segment is negative - * @type {number} - */ - minimumLastSegmentLength:number; - /** - * Gets or sets the minimum segment length of an edge. - *

- * The minimum length must be greater than or equal to 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the minimum length is negative - * @type {number} - */ - minimumSegmentLength:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.orthogonal.EdgeLayoutDescriptor; - } - export enum LayoutStyle{ - /** - * A layout style that produces orthogonal edges while maintaining the original node size. - * @see yfiles.orthogonal.OrthogonalLayout#layoutStyle - */ - NORMAL, - /** - * A layout style that produces orthogonal edges and nodes of uniform size. - *

- * Before calculating the layout, all nodes will be assigned equal sizes. - *

- * @see yfiles.orthogonal.OrthogonalLayout#layoutStyle - */ - UNIFORM, - /** - * A layout style that modifies the size of nodes to minimize the overall number of bends. - *

- * The layout algorithm will enlarge nodes based on the number and position of their neighbors in order to minimize the - * number of required bends. The segments of all edges are either horizontal or vertical. - *

- * @see yfiles.orthogonal.OrthogonalLayout#layoutStyle - */ - BOX, - /** - * A layout style that produces non-orthogonal edges and resizes the nodes to a small uniform size. - *

- * This layout style resembles {@link yfiles.orthogonal.LayoutStyle#BOX}, but it resizes all nodes to equal size. - *

- *

- * It introduces additional bends into some edges and routes the last edge segment of these edges non-orthogonally to their - * adjacent nodes. - *

- * @see yfiles.orthogonal.OrthogonalLayout#layoutStyle - */ - MIXED, - /** - * A layout style similar to {@link yfiles.orthogonal.LayoutStyle#NORMAL} that is best-suited for tree-like structures. - *

- * Larger subtrees are processed using a specialized tree layout algorithm which arranges all directed subtree structures - * in an optimized way. - *

- * @see yfiles.orthogonal.OrthogonalLayout#layoutStyle - */ - NORMAL_TREE, - /** - * A layout style similar to {@link yfiles.orthogonal.LayoutStyle#MIXED} that maintains the original node size. - *

- * This style introduces additional bends into some edges and routes the last edge segment of these edges non-orthogonally - * to their adjacent nodes. - *

- * @see yfiles.orthogonal.OrthogonalLayout#layoutStyle - */ - FIXED_MIXED, - /** - * A layout style similar to {@link yfiles.orthogonal.LayoutStyle#BOX} that maintains the original node size. - *

- * Nodes will be placed at the same positions as with - * {@link yfiles.orthogonal.LayoutStyle#FIXED_MIXED}, but edges will be routed strictly orthogonally. - *

- * @see yfiles.orthogonal.OrthogonalLayout#layoutStyle - */ - FIXED_BOX - } - /** - * This layout algorithm arranges graphs in an orthogonal fashion. - *

- * Layout Style - *

- *

- * This layout algorithm arranges the nodes of a given graph such that each edge is drawn as an alternating sequence of - * horizontal and vertical segments. - *

- *

- * It produces compact drawings with no overlapping nodes, few crossings and few bends and is well suited for small and - * medium-sized sparse graphs. - *

- *

- * Orthogonal drawings are common in engineering applications since they are able to provide clear representations of - * complex networks that can also be optimal with respect to diverse objective functions such as bend minimization or area - * minimization. Application domains of orthogonal drawings include software engineering, database schema representation, - * system management, knowledge representation, VLSI circuits and floor planning applications. - *

- *

- * {@graph {"ann": {"s": [30,30], "d": 0},"n": [[135,160], [210,385], [210,60], [285,160], [360,60], [435,285], [60,110], [135,385], [60,435], [210,160], [-15,110], [285,335], [360,235], [360,160], [435,385]], "e": [[3,4,0,-15,-15,10,[300,85]], [0,4,0,-15,0,-15,[150,25,375,25]], [2,4,15,0,-15,0], [3,5,5,15,-15,0,[305,300]], [4,5,15,0,0,-15,[450,75]], [0,6,-15,0,10,15,[85,175]], [5,6,15,0,0,-15,[500,300,500,0,75,0]], [7,1,15,0,-15,0], [7,0,0,-15,0,15], [1,8,0,15,15,0,[225,450]], [8,6,0,-15,0,15], [0,9,15,0,-15,0], [9,6,-10,-15,15,0,[215,125]], [9,3,15,0,-15,0], [9,2,0,-15,0,15], [9,1,0,15,0,-15], [10,8,0,15,-15,0,[0,450]], [10,6,15,0,-15,0], [3,11,0,15,0,-15], [11,1,0,15,15,-10,[300,390]], [12,5,15,0,-10,-15,[440,250]], [12,3,-15,0,10,15,[310,250]], [4,13,0,15,0,-15], [13,12,0,15,0,-15], [13,3,-15,0,15,0], [14,5,0,-15,0,15], [14,1,-15,0,15,0]], "vp": [-15.0,0.0,515.0,465.0]}} Orthogonal layout with default settings - *

- *

- * This algorithm also optionally supports {@link yfiles.orthogonal.OrthogonalLayout#DIRECTED_EDGE_DP_KEY directed edge drawings} (although not in combination with hierarchically nested - * graphs or the non-default - * {@link yfiles.orthogonal.OrthogonalLayout#layoutStyle layout styles}). Application domains of directed orthogonal drawings include, for example, software engineering, database - * schema and system management. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[165,-15],[205,305],[45,345],[45,65],[205,145],[105,105],[45,405],[-15,405],[285,-15],[205,225],[125,185]],"e":[[5,0,15,-0,-5,15,[175,120]],[5,4,0,15,-15,-0,[120,160]],[5,2,-15,-0,10,-15,[70,120]],[6,4,15,-0,15,-0,[280,420,280,160]],[6,2,0,-15,0,15],[6,7,-15,-0,15,-0],[7,3,0,-15,-15,-0,[0,80]],[8,0,-15,-0,15,-0],[8,7,0,15,0,15,[300,460,0,460]],[2,9,15,-0,15,-0,[260,360,260,240]],[4,10,-10,15,15,-0,[210,200]],[10,1,0,15,-15,-0,[140,320]],[0,1,0,15,-10,-15,1,[180,280,210,280]],[0,3,-10,15,0,-15,1,[170,40,60,40]],[3,2,0,15,0,-15,1],[0,4,10,15,0,-15,1,[190,120,220,120]],[4,9,0,15,0,-15,1],[9,1,0,15,0,-15,1]],"vp":[-15.0,-15.0,330.0,475.0]}} Sample output of {@link yfiles.orthogonal.OrthogonalLayout} with default settings. Marked edges are considered as directed and - * the layout orientation is top-to-bottom. {@graph {"ann":{"s":[30,30],"d":1},"n":[[85,45],[265,105],[185,-15],[-15,165],[485,165],[265,225],[365,165],[85,225]],"e":[[0,1,15,-0,-15,-0,[160,60,160,120]],[0,2,15,-0,-15,-0,[160,60,160,0]],[2,1,15,10,-15,-10,[240,10,240,110]],[3,0,15,-0,-15,-0,[60,180,60,60]],[2,4,15,-0,-15,-0,[440,0,440,180]],[5,4,15,10,-15,-0,[340,250,340,280,440,280,440,180]],[1,6,15,-0,-15,-0,[320,120,320,180]],[5,6,15,-0,-15,-0,[320,240,320,180]],[6,4,15,-0,-15,-0],[3,7,15,-0,-15,-0,[60,180,60,240]],[7,5,15,-0,-15,-0]],"vp":[-15.0,-15.0,530.0,295.0]}} Sample output of {@link yfiles.orthogonal.OrthogonalLayout} with edge grouping. All - * edges are considered directed and the layout orientation is left-to-right. - *

- *

- * Also this algorithm supports hierarchically nested graphs (although not in combination with the directed edge drawings, - * the {@link yfiles.orthogonal.OrthogonalLayout#fromSketchMode from sketch} option, or the non-default {@link yfiles.orthogonal.OrthogonalLayout#layoutStyle layout styles}) feature: - *

- *

- * {@graph {"ann":{"s":[30,30],"d":0},"n":[[165,585],[0,220,240,340,2,[[0,242.38,240,22.38,"Group 2"]]],[165,385],[165,485],[45,485],[45,385],[105,385],[260,200,200,260,2,[[260,222.38,200,22.38,"Group 3"]]],[305,325],[305,265],[365,325],[305,385],[0,0,240,200,2,[[0,22.38,240,22.38,"Group 1"]]],[165,125],[105,125],[45,125],[45,65],[165,65],[265,485]],"e":[[3,2,0,-15,0,15],[3,0,0,15,0,-15],[4,3,15,0,-15,0],[5,4,0,15,0,-15],[2,6,-15,0,15,0],[6,5,-15,0,15,0],[8,9,0,-15,0,15],[2,9,0,-15,-15,0,[180,280]],[8,10,15,0,-15,0],[10,9,0,-15,15,10,[380,290]],[9,11,15,0,15,0,[420,280,420,400]],[8,11,0,15,0,-15],[2,11,15,0,-15,0],[11,10,15,-10,0,15,[380,390]],[6,14,0,-15,0,15],[14,13,15,0,-15,0],[5,15,0,-15,0,15],[15,14,15,0,-15,0],[16,15,0,15,0,-15],[13,17,0,-15,0,15],[17,16,-15,0,15,0],[3,18,15,0,-15,0]],"vp":[0.0,0.0,460.0,615.0]}} Orthogonal layout of a grouped graph with default settings {@graph {"ann":{"s":[30,30],"d":1},"n":[[-15,-17.38,670,794.75,2,[[-15,5,670,22.38,"Group 6"]]],[0,20,620,680,2,[[0,42.38,620,22.38,"Group 5"]]],[40,460,240,200,2,[[40,482.38,240,22.38,"Group 2"]]],[205,585,[[214.66,609.35,10.67,18.7,"9"]]],[205,525,[[211.33,549.35,17.35,18.7,"10"]]],[85,525,[[91.33,549.35,17.35,18.7,"11"]]],[85,585,[[91.33,609.35,17.35,18.7,"10"]]],[120,80,460,360,2,[[120,102.38,460,22.38,"Group 4"]]],[160,140,180,260,2,[[160,162.38,180,22.38,"Group 1"]]],[265,325,[[274.66,349.35,10.67,18.7,"1"]]],[205,325,[[214.66,349.35,10.67,18.7,"2"]]],[205,205,[[214.66,229.35,10.67,18.7,"3"]]],[265,205,[[274.66,229.35,10.67,18.7,"4"]]],[265,265,[[274.66,289.35,10.67,18.7,"5"]]],[360,160,180,240,2,[[360,182.38,180,22.38,"Group 3"]]],[405,325,[[411.33,349.35,17.35,18.7,"12"]]],[405,265,[[411.33,289.35,17.35,18.7,"13"]]],[465,265,[[471.33,289.35,17.35,18.7,"14"]]],[85,725,[[91.33,749.35,17.35,18.7,"19"]]],[205,725,[[211.33,749.35,17.35,18.7,"18"]]]],"e":[[4,3,0,15,0,-15],[4,5,-15,0,15,0],[3,6,-15,0,15,0],[6,5,0,-15,0,15],[9,10,-15,0,15,0],[10,5,-15,0,0,-15,[100,340]],[10,4,0,15,0,-15],[10,11,0,-15,0,15],[11,12,15,0,-15,0],[12,13,0,15,0,-15],[13,9,0,15,0,-15],[15,16,0,-15,0,15],[16,13,-15,0,15,0],[16,12,0,-15,15,0,[420,220]],[16,17,15,0,-15,0],[6,18,0,15,0,-15],[3,19,0,15,0,-15]],"vp":[-15.0,-18.0,670.0,796.0]}} Orthogonal layout of a graph with nested - * groupsConceptThe orthogonal layout algorithm is based on the topology-shape-metrics approach and runs in three phases: - *

- *
    - *
  • Planarization – A planar embedding is computed.
  • - *
  • Orthogonalization – The bends and the angles are computed.
  • - *
  • Compaction – The coordinates for the nodes and edges are determined.
  • - *
- *

- * Features - *

- *

- * There exist several different layout styles that the orthogonal layout algorithm supports depending on whether or not - * the edges should be routed completely orthogonal, or whether or not the original size of the nodes should be maintained. - * Such layout styles are {@link yfiles.orthogonal.LayoutStyle#NORMAL}, {@link yfiles.orthogonal.LayoutStyle#UNIFORM}, - * {@link yfiles.orthogonal.LayoutStyle#BOX}, {@link yfiles.orthogonal.LayoutStyle#NORMAL_TREE}, {@link yfiles.orthogonal.LayoutStyle#MIXED}, - * {@link yfiles.orthogonal.LayoutStyle#FIXED_BOX}, {@link yfiles.orthogonal.LayoutStyle#FIXED_MIXED} and can be applied using {@link yfiles.orthogonal.OrthogonalLayout#layoutStyle}. - *

- *

- * {@link yfiles.orthogonal.OrthogonalLayout} is able to consider edge label data when arranging a graph. This means that the - * layout algorithm will determine the positions of the nodes and edges such that the edge labels do not overlap with the - * rest of the layout. Integrated edge labeling can be activated using method {@link yfiles.orthogonal.OrthogonalLayout#integratedEdgeLabeling}. - *

- *

- * {@link yfiles.orthogonal.EdgeLayoutDescriptor} instances can be used for specifying individual information (e.g. distances) for - * each edge in the graph. The descriptors are bound to the graph using {@link yfiles.algorithms.IDataProvider}s registered with - * key {@link yfiles.orthogonal.OrthogonalLayout#EDGE_LAYOUT_DESCRIPTOR_DP_KEY}. If there is no descriptor assigned to some edges, - * a default descriptor will be used. To set default descriptors, use {@link yfiles.orthogonal.OrthogonalLayout#edgeLayoutDescriptor}. - *

- *

- * {@link yfiles.orthogonal.OrthogonalLayout} tries to optimize diverse objective functions such as bend minimization, number of - * edge crossings, edge length minimization or face maximization. These settings can be enabled using the corresponding - * methods {@link yfiles.orthogonal.OrthogonalLayout#optimizePerceivedBends}, {@link yfiles.orthogonal.OrthogonalLayout#crossingReduction}, {@link yfiles.orthogonal.OrthogonalLayout#edgeLengthReduction}, and - * {@link yfiles.orthogonal.OrthogonalLayout#faceMaximization}, respectively. The drawback when these settings are enabled is that the running time of the algorithm may be - * drastically increased. - *

- * @class - * @extends {yfiles.layout.MultiStageLayout} - */ - export interface OrthogonalLayout extends yfiles.layout.MultiStageLayout{} - export class OrthogonalLayout { - /** - * Creates a new {@link yfiles.orthogonal.OrthogonalLayout} instance with default settings. - */ - constructor(); - /** - * Returns a new {@link yfiles.orthogonal.EdgeLayoutDescriptor} instance that will be used during the various phases of the layout - * algorithm to determine the drawing details of the edges of the graph. - *

- * This method may be overridden to create a new {@link yfiles.orthogonal.EdgeLayoutDescriptor} instance with different - * configuration settings. - *

- * @returns a new {@link } instance - * @protected - */ - createEdgeLayoutDescriptor():yfiles.orthogonal.EdgeLayoutDescriptor; - /** - * Data provider key for providing layout information for each edge - *

- * If no edge layout descriptor is mapped for an edge, a default edge layout descriptor will be obtained using method - * {@link yfiles.orthogonal.OrthogonalLayout#createEdgeLayoutDescriptor}. - *

- * @see yfiles.orthogonal.OrthogonalLayout#layoutStyle - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static EDGE_LAYOUT_DESCRIPTOR_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for marking edges which should be routed such that they point to the main layout orientation - *

- * The main layout orientation can be set using method {@link yfiles.layout.MultiStageLayout#layoutOrientation}. - *

- * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static DIRECTED_EDGE_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Gets or sets the {@link yfiles.orthogonal.EdgeLayoutDescriptor} instance used for all those edges that do not have a specific - * layout descriptor assigned. - *

- * By default, this method will return an {@link yfiles.orthogonal.EdgeLayoutDescriptor} instance created with - * {@link yfiles.orthogonal.OrthogonalLayout#createEdgeLayoutDescriptor}. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.orthogonal.EdgeLayoutDescriptor} is null - * @see yfiles.orthogonal.OrthogonalLayout#EDGE_LAYOUT_DESCRIPTOR_DP_KEY - * @type {yfiles.orthogonal.EdgeLayoutDescriptor} - */ - edgeLayoutDescriptor:yfiles.orthogonal.EdgeLayoutDescriptor; - /** - * Gets or sets whether or not the layout algorithm considers node labels when calculating node positions to avoid - * overlaps. - *

- * This method is a convenience method that assures that the {@link yfiles.layout.MultiStageLayout#labeling labeling algorithm} is of type {@link yfiles.layout.LabelLayoutTranslator} - * and {@link yfiles.layout.LabelLayoutTranslator#translateNodeLabels} is set to true. - *

- * @throws {Stubs.Exceptions.InvalidOperationError} if no properly configured {@link yfiles.layout.LabelLayoutTranslator} is registered even though this property was enabled - * earlier (can happen when manually specifying the {@link yfiles.layout.MultiStageLayout#labeling labeling algorithm}). - * @type {boolean} - */ - considerNodeLabels:boolean; - /** - * Gets or sets whether or not the layout algorithm preserves space and places edge labels. - *

- * To define the desired placement for each label add a {@link yfiles.layout.PreferredPlacementDescriptor} on - * {@link yfiles.layout.IEdgeLabelLayout}. - *

- *

- * This method also assures that the {@link yfiles.layout.MultiStageLayout#labeling labeling algorithm} is of type {@link yfiles.layout.LabelLayoutTranslator} and {@link yfiles.layout.LabelLayoutTranslator#translateEdgeLabels} is set to - * true. - *

- * @throws {Stubs.Exceptions.InvalidOperationError} if no properly configured {@link yfiles.layout.LabelLayoutTranslator} is registered even though integrated labeling was enabled - * earlier (can happen when manually specifying the {@link yfiles.layout.MultiStageLayout#labeling labeling algorithm}). - * @type {boolean} - */ - integratedEdgeLabeling:boolean; - /** - * Gets or sets whether or not a randomization strategy should be performed. - *

- * The randomization will increase the overall layout quality with high probability. The drawback is that the running time - * of the layout algorithm may increase. - *

- * @type {boolean} - */ - randomization:boolean; - /** - * Gets or sets whether or not degree-one nodes that have the same neighbor should be aligned. - * @type {boolean} - */ - alignDegreeOneNodes:boolean; - /** - * Gets or sets whether or not one face of the embedding of the graph should be maximized. - *

- * An embedding of a graph is uniquely specified by the cyclic order of edges incident to the same node in a graph - * drawing. - *

- *

- * In any planar drawing of a planar graph, the edges divide the plane into different regions called faces. If one of these - * faces (the outer face) gets maximized, all other faces will be more compact. - *

- * @see yfiles.orthogonal.OrthogonalLayout#randomization - * @type {boolean} - */ - faceMaximization:boolean; - /** - * Gets or sets whether or not the number of edge crossings should be reduced. - *

- * The layout algorithm will try to significantly reduce the number of crossings in a post-processing step. - *

- * @type {boolean} - */ - crossingReduction:boolean; - /** - * Gets or sets whether or not the number of perceived bends should be minimized. - *

- * A perceived bend is not an actual bend but it is created when a helical arrangement of chains of nodes occurs. - *

- * @type {boolean} - */ - optimizePerceivedBends:boolean; - /** - * Gets or sets the equidistant spacing between the horizontal and vertical grid lines. - *

- * Each node will be placed on a grid point. Edges will be routed such that all segments but the first and last one lie on - * grid lines. (The first and last segments of an edge may or may not lie on grid lines.) Edges consisting of a single - * segment always lie on grid lines. - *

- *

- * The grid spacing has to be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the grid spacing is negative - * @type {number} - */ - gridSpacing:number; - /** - * Gets or sets the layout style for this layout algorithm. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown layout style is given - * @type {yfiles.orthogonal.LayoutStyle} - */ - layoutStyle:yfiles.orthogonal.LayoutStyle; - /** - * Gets or sets whether or not the overall edge length should be optimized. - *

- * The algorithm will try to significantly reduce the length of some edges. - *

- * @type {boolean} - */ - edgeLengthReduction:boolean; - /** - * Gets or sets whether or not the existing drawing should be used as a sketch of the resulting orthogonal layout. - *

- * The layout algorithm will try to orthogonalize the given sketch without making too many modifications with respect to - * the original drawing. - *

- * @type {boolean} - */ - fromSketchMode:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for arranging the components of the graph is activated. - * @see yfiles.layout.MultiStageLayout#componentLayoutEnabled - * @see yfiles.layout.MultiStageLayout#componentLayout - * @see yfiles.layout.ComponentLayout - * @type {boolean} - */ - componentLayoutEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for hiding group nodes is activated. - * @see yfiles.layout.MultiStageLayout#hideGroupsStageEnabled - * @see yfiles.layout.MultiStageLayout#hideGroupsStage - * @see yfiles.layout.HideGroupsStage - * @type {boolean} - */ - hideGroupsStageEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} that modifies the orientation of the layout is activated. - * @see yfiles.layout.MultiStageLayout#orientationLayoutEnabled - * @see yfiles.layout.MultiStageLayout#orientationLayout - * @see yfiles.layout.MultiStageLayout#layoutOrientation - * @see yfiles.layout.OrientationLayout - * @type {boolean} - */ - orientationLayoutEnabled:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.orthogonal.OrthogonalLayout; - } - /** - * This layout algorithm arranges a graph in a compact, orthogonal fashion. - *

- * Layout Style - *

- *

- * This layout algorithm is a variant of {@link yfiles.orthogonal.OrthogonalLayout} that tries to arrange nodes in a more compact - * way. It allows to specify a desired aspect ratio for the bounds of the calculated layout. Nodes of a given graph are - * arranged such that each edge is drawn as an alternating sequence of horizontal and vertical segments. - *

- *

- * {@link yfiles.orthogonal.CompactOrthogonalLayout} is well suited for small and medium-sized sparse graphs and produces compact - * drawings with no overlapping nodes, few crossings and few bends. It is also especially suitable for printing the diagram - * on a paper of predefined size. As a disadvantage, this algorithm will usually produce less elegant edge routes than the - * ones of {@link yfiles.orthogonal.OrthogonalLayout}. - *

- *

- * Application domains of orthogonal drawings are software engineering, project management, function call graphs and - * object-oriented class diagrams. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":0},"n":[[165,65],[285,405],[285,125],[225,285],[25,285],[225,365],[105,365],[285,205],[105,285],[165,205],[165,-15],[365,205]],"e":[[0,2,15,0,-5,-15,[295,80]],[4,1,-5,15,-15,0,[35,420]],[5,3,0,-15,0,15],[5,6,-15,5,15,5],[6,4,-15,0,5,15,[45,380]],[1,7,0,-15,0,15],[3,7,5,-15,-15,5,[245,225]],[2,7,0,15,0,-15],[4,8,15,0,-15,0],[3,8,-15,0,15,0],[6,8,0,-15,0,15],[4,9,-0,-15,-15,-5,[40,215]],[0,9,-5,15,-5,-15],[3,9,-5,-15,5,15,[235,261,185,261]],[8,9,-0,-15,-15,5,[120,225]],[9,5,-5,15,-15,-5,[175,375]],[9,7,15,-5,-15,-5],[9,2,5,-15,-15,0,[185,140]],[0,10,0,-15,0,15],[4,10,-15,0,-15,0,[23,300,23,0]],[10,3,15,-5,15,0,[397,-5,397,300]],[10,2,15,5,5,-15,[305,5]],[2,11,15,0,0,-15,[380,140]],[11,5,0,15,15,0,[380,380]],[11,7,-15,0,15,0]],"vp":[23.0,-15.0,374.0,450.0]}} Sample output of the layout algorithm with aspect ratio 1.0Concept - *

- *

- * This algorithm is implemented as a {@link yfiles.layout.PartitionLayout} and applies the following steps: - *

- *
    - *
  • - * Divides the graph into smaller partitions using the partition finder instance created by - * {@link yfiles.layout.PartitionLayout#createEdgeBetweennessPartitionFinder}. - *
  • - *
  • Arranges the nodes of each graph partition using {@link yfiles.orthogonal.OrthogonalLayout}.
  • - *
  • - * Arranges the partitions themselves in a compact manner using the partition placer instance created by - * {@link yfiles.layout.PartitionLayout#createComponentPartitionPlacer}. - *
  • - *
  • Routes the edges between partitions (inter-edges) using the router instance created by CreateChannelInterEdgeRouter.
  • - *
- *

- * Each of these steps can be individually configured and/or replaced. To do so, use methods {@link yfiles.layout.PartitionLayout#partitionFinder}, {@link yfiles.layout.LayoutStageBase#coreLayout}, {@link yfiles.layout.PartitionLayout#partitionPlacer} and {@link yfiles.layout.PartitionLayout#interEdgeRouter}, respectively. - *

- *

- * Features - *

- *

- * The aspect ratio of the resulting layout bounds, i.e., the ratio of width/height of the layout, can be configured using - * {@link yfiles.orthogonal.CompactOrthogonalLayout#aspectRatio}. {@link yfiles.orthogonal.CompactOrthogonalLayout} tries to reach this preferred value. However, depending on the actual graph - * structure, this may not always be possible. - *

- *

- * Octilinear routing of edges can be supported by appending {@link yfiles.router.PolylineLayoutStage}. - *

- * @class - * @extends {yfiles.layout.PartitionLayout} - */ - export interface CompactOrthogonalLayout extends yfiles.layout.PartitionLayout{} - export class CompactOrthogonalLayout { - /** - * Creates a new {@link yfiles.orthogonal.CompactOrthogonalLayout} instance with default settings. - */ - constructor(); - /** - * Gets or sets the equidistant spacing between the horizontal and vertical grid lines. - *

- * Each node will be placed on a grid point. Edges will be routed such that their segments lie on grid lines, if the - * endpoints of the edges allow to place the ports accordingly. - *

- *

- * The grid spacing has to be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the grid spacing is negative or zero - * @type {number} - */ - gridSpacing:number; - /** - * Gets or sets the desired aspect ratio (i.e. - *

- * the quotient width/height) of the resulting layout bounds. - *

- *

- * The aspect ratio needs to be greater than 0. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given aspect ratio is less than or equal to zero - * @see yfiles.layout.PartitionLayout#partitionPlacer - * @see yfiles.layout.PartitionLayout.T1 - * @type {number} - */ - aspectRatio:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.orthogonal.CompactOrthogonalLayout; - } - /** - * Specifies custom data for the {@link yfiles.orthogonal.OrthogonalLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface OrthogonalLayoutData extends yfiles.layout.LayoutData{} - export class OrthogonalLayoutData { - constructor(); - /** - * Gets or sets the mapping from edges to their {@link yfiles.orthogonal.EdgeLayoutDescriptor}. - * @see yfiles.orthogonal.EdgeLayoutDescriptor - * @see yfiles.orthogonal.OrthogonalLayout#EDGE_LAYOUT_DESCRIPTOR_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeLayoutDescriptors:yfiles.layout.ItemMapping; - /** - * Gets or sets the collection of edges that should be routed in a way that point in the main layout direction. - * @see yfiles.orthogonal.OrthogonalLayout#DIRECTED_EDGE_DP_KEY - * @type {yfiles.layout.ItemCollection.} - */ - directedEdges:yfiles.layout.ItemCollection; - /** - * Gets or sets a mapping from edges to an object representing their source edge group. - * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourceGroupIds:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to an object representing their target edge group. - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetGroupIds:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their {@link yfiles.layout.NodeHalo}. - * @see yfiles.layout.NodeHalo#NODE_HALO_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeHalos:yfiles.layout.ItemMapping; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - /** - * Gets or sets the mapping that provides a {@link yfiles.layout.PreferredPlacementDescriptor} instance for edge - * {@link yfiles.graph.ILabel}s. - * @see yfiles.layout.PreferredPlacementDescriptor - * @see yfiles.layout.LayoutGraphAdapter#EDGE_LABEL_LAYOUT_PREFERRED_PLACEMENT_DESCRIPTOR_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeLabelPreferredPlacement:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.orthogonal.OrthogonalLayoutData; - } - }export namespace radial{ - export enum CenterNodesPolicy{ - /** - * Specifier for a center nodes policy which chooses all nodes with in-degree equal to 0 as center nodes. If no node with - * this property is present, an arbitrary node will be selected. - * @see yfiles.radial.RadialLayout#centerNodesPolicy - * @see yfiles.algorithms.Trees#getRoot - */ - DIRECTED, - /** - * Specifier for a center nodes policy which chooses the node with the highest centrality as center node. - * @see yfiles.radial.RadialLayout#centerNodesPolicy - * @see yfiles.algorithms.Trees#getCenterRoot - */ - CENTRALITY, - /** - * Specifier for a center nodes policy which chooses the node with the highest weighted centrality as center node. - * @see yfiles.radial.RadialLayout#centerNodesPolicy - * @see yfiles.algorithms.Trees#getWeightedCenterNode - */ - WEIGHTED_CENTRALITY, - /** - * Specifier for a center nodes policy which uses center nodes specified by the user. The center nodes have to be specified - * using a {@link yfiles.algorithms.IDataProvider} registered with the {@link yfiles.radial.RadialLayout#centerNodesDpKey according key}. The {@link yfiles.algorithms.IDataProvider} returns true - * for nodes that should be placed in the center. - *

- * If there exists more than one center node, they will be placed on the innermost circle while the center position stays - * empty. - *

- * @see yfiles.radial.RadialLayout#centerNodesPolicy - * @see yfiles.radial.RadialLayout#centerNodesDpKey - */ - CUSTOM - } - export enum LayeringStrategy{ - /** - * Specifier for a layering strategy that uses breadth first search (BFS) to determine a layering for the graph. All edges - * will span at most one layer in the resulting drawing. Edges between nodes that belong to the same layer are possible. - * @see yfiles.radial.RadialLayout#layeringStrategy - */ - BFS, - /** - * Specifier for a layering strategy that uses an optimal hierarchical layering strategy. The layer distance of an edge is - * the absolute difference between the layer numbers of its source and target node. Layer assignment will be done such that - * the overall sum of the layer distances of all edges in the layout is minimal. - * @see yfiles.radial.RadialLayout#layeringStrategy - */ - HIERARCHICAL - } - export enum EdgeRoutingStrategy{ - /** - * Specifier for an edge routing strategy that will route edges with polyline segments from source to target with one bend - * on each spanned circle. - * @see yfiles.radial.RadialLayout#edgeRoutingStrategy - */ - POLYLINE, - /** - * Specifier for an edge routing strategy that will route edges as arcs. The source and target of an edge as well as one - * bend on each spanned circle are used as main control points. An easing function is applied in order to calculate - * additional control points between the polar coordinates of the main control points. - * @see yfiles.radial.RadialLayout#edgeRoutingStrategy - */ - ARC - } - /** - * Info object used for retrieving information about each node from the layout algorithm. - *

- * The information can be retrieved by registering with the graph a {@link yfiles.algorithms.IDataProvider} (which should also - * implement the {@link yfiles.algorithms.IDataAcceptor} interface) using key {@link yfiles.radial.RadialLayout#NODE_INFO_DP_KEY}. The - * layout algorithm will return a {@link yfiles.radial.RadialLayoutNodeInfo} object with appropriately filled fields for each {@link yfiles.algorithms.Node} - * when the layout is calculated. - *

- * @class - */ - export interface RadialLayoutNodeInfo extends yfiles.lang.Object{} - export class RadialLayoutNodeInfo { - /** - * Creates a new {@link yfiles.radial.RadialLayoutNodeInfo} instance. - */ - constructor(); - /** - * Gets the index of the circle the node is placed on. - *

- * The circles used by the {@link yfiles.radial.RadialLayout} are indexed from the innermost to the outermost circle. Index 0 - * represents the center, i.e. the circle with radius 0. - *

- * @type {number} - */ - circleIndex:number; - /** - * Gets the radius of the circle the node is placed on. - * @type {number} - */ - radius:number; - /** - * Gets the offset from the center of the circle, the node is placed on, to the center of the node. - * @type {yfiles.algorithms.YPoint} - */ - centerOffset:yfiles.algorithms.YPoint; - /** - * Gets the start angle in degrees of the sector the node is placed in. - *

- * The angle refers to a counter-clockwise rotation starting at the 3 o'clock position. - *

- * @see yfiles.radial.RadialLayoutNodeInfo#sectorSize - * @type {number} - */ - sectorStart:number; - /** - * Gets the size in degrees of the sector the node is placed in. - * @see yfiles.radial.RadialLayoutNodeInfo#sectorStart - * @type {number} - */ - sectorSize:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.radial.RadialLayoutNodeInfo; - } - /** - * This layout algorithm arranges graphs in a radial fashion. - *

- * Layout Style The nodes are distributed into circles (layers) around a common center based on predefined {@link yfiles.radial.RadialLayout#layeringStrategy layering strategies}. Some - * potential applications include visualization of social networks, data clustering and bioinformatics. {@graph {"ann":{"s":[30,30],"d":1, "c":1, "bg": 0}, "styles" : {"6" : {"a" : 0.5,"c" : 1,"bg" : 1,"f" : null}},"n":[[-15,-15,1],[13.93,106.61],[65.6,80.55],[109.84,-8.76],[64.87,-111.16],[-81.77,-120.67],[-13.62,-139.99],[-133.34,-55.24],[-132.35,28.06],[-74.13,95.13],[-51.74,-262.29],[27.21,-261.41],[144.74,-207.31],[217.89,-105.89],[279.81,-246.76],[224.61,-303.47],[158.73,-347.33],[207.67,98.65],[230.47,32.36],[233.97,-37.66],[-114.67,214.27],[-185.45,167.88],[-53,232.09],[-295.24,234.18],[-243.87,282.06],[-220.04,-158.04],[-251.69,-95.49],[-264.73,-26.61],[-375,-381.52,750,750,6],[-255.95,-247.77,500,500,6],[-120,-120,240.76,240,6]],"e":[[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[9,8,[-70.52,125.91,-86.2,136.85,-105.19,140.56,-124.87,135.74,-141.6,122.91,-151.95,104.54,-153.96,84.38,-147.61,66.1,-134.58,52.11]],[6,10,[-1.65,-142.85,-15.61,-195.81,-28.91,-230.34]],[6,11,[4.82,-142.78,19.94,-195.41,34,-229.64]],[4,11,[82.38,-111.82,83.32,-128.06,82.62,-144.75,80.23,-161.75,76.13,-178.92,70.29,-196.12,62.69,-213.2,53.33,-230.01]],[4,12],[4,13,[94.6,-101.69,110.18,-105.84,126.49,-108.53,143.41,-109.7,160.83,-109.28,178.62,-107.22,214.79,-98.06]],[3,13,[138.89,0.42,165.98,-15.1,191.14,-35.68,213.67,-61.05,223.74,-75.44]],[12,14,[175.06,-199.78,223.92,-217.98,276.56,-229.49]],[12,15],[12,16,[164.26,-208.75,173.19,-260.12,174.85,-313.97]],[3,17,[138.24,13.42,163.65,31.57,186.64,54.55,206.52,82.04,215.1,97.36]],[3,18,[142.51,9.99,211.87,32.11,228.78,39.39]],[3,19,[142.79,4.26,214.01,-10.83,231.56,-16.39]],[9,20,[-67.21,129.42,-94.25,208.89]],[9,21,[-72.16,123.29,-101.29,147.07,-134.19,167.07,-151.93,175.53]],[21,7,[-170.54,166.68,-181.84,45.73,-180.63,25.53,-175.63,6.64,-167.31,-9.76,-156.5,-22.85,-144.15,-32.21,-131.17,-37.89]],[9,22,[-61.2,126.61,-61.38,160.54,-56.17,195.2,-45.44,229.93]],[21,23,[-185.24,193.48,-263.69,240.87]],[21,24,[-179.99,198.37,-221.74,279.97]],[7,25,[-131.46,-49.93,-155.99,-72.16,-177.9,-98.03,-196.82,-127.26]],[7,26],[7,27,[-134.65,-40.57,-167.65,-37.89,-200.78,-30.75,-233.59,-19.11]]],"vp":[-375.0,-382.0,750.0,751.0]}} Sample output of - * the layout algorithm with default settings and one center node {@graph {"ann":{"s":[30,30],"d":1, "c":1, "bg": 0}, "styles" : {"6" : {"a" : 0.5,"c" : 1,"bg" : 1,"f" : null}},"n":[[-168.28,-179.72],[-227.35,-89.37],[195.73,63.85],[208.34,-42.28],[-239.94,-9.73],[-217.86,82.33],[154.4,133.08],[-136.84,174.15],[96.65,-210.34],[-286.03,-236.46],[-80.8,-230.16],[-216.41,-301.24],[-345.33,-130.69],[-330.56,136.4],[-204.53,279.24],[-48.25,207.53],[170.9,-141.76],[-0.72,-239.55],[59.22,197.41],[153.75,291.63],[64.99,325.74],[93.56,447.43],[158.68,-318.87],[-415.1,241.02],[-465.07,136.87],[-272.22,384.33],[332.42,-57.43],[0.83,-113.74,1],[49.15,61.71,1],[80.56,-44.46,1],[-89.99,51.16,1],[-97,-72.24,1],[-465.42,-448.52,920,920,6],[-355.1,-344.73,700,700,6],[-226.03,-218.04,445,445,6],[-97,-100.15,194,194,6]],"e":[[0,9],[0,10],[0,11],[1,12],[1,13],[13,5],[7,14],[19,18],[20,18],[20,21],[8,22],[13,23],[23,14],[13,24],[14,25],[3,26],[10,27],[16,27],[27,17],[27,8],[28,18],[28,6],[28,2],[29,28],[29,16],[29,27],[29,3],[7,30],[30,28],[30,15],[30,4],[30,5],[31,27],[31,0],[31,1],[31,30]],"vp":[-466.0,-449.0,921.0,927.0]}} Sample output of the layout algorithm with straight-line - * edges and five center nodes using {@link yfiles.radial.CenterNodesPolicy#CUSTOM} policyConcept The layout algorithm creates a virtual - * tree structure for the input graph whose root node is placed in the center of the circles. All children of a tree node - * are placed on a higher layer (i.e. on a circle of larger radius) than their parent. A sector is calculated for each node - * such that the sector of each child node in the virtual tree is a sub-sector of its parent's sector. The radii of the - * circles are calculated based on the sizes of the sectors required to accommodate each whole subtree. Features - *

- *

- * There are different {@link yfiles.radial.RadialLayout#centerNodesPolicy center nodes policies} that can be applied in order to determine the nodes that will be placed in the - * center (single center node) or on the innermost circle (more than one center node). The distribution of the nodes to the - * circles is specified by a {@link yfiles.radial.RadialLayout#layeringStrategy layering strategy}. - *

- *

- * The edges are routed based on the - * {@link yfiles.radial.RadialLayout#edgeRoutingStrategy edge routing strategy}. Note that the edge routing cannot always prevent node-edge overlaps. - *

- *

- * The minimum distance between nodes of the same circle is specified using - * {@link yfiles.radial.RadialLayout#minimumNodeToNodeDistance}. If there are too many nodes assigned to a circle, the radius of the particular circle will be increased until all - * nodes fit onto it. - *

- *

- * The distance between consecutive layers is specified using {@link yfiles.radial.RadialLayout#layerSpacing}. The radii of the circles are a multiple of this spacing - * value. If the layer spacing is 0, the radii are chosen such that all nodes fit on their corresponding circles. A minimum - * layer distance is specified by {@link yfiles.radial.RadialLayout#minimumLayerDistance}. - *

- * @class - * @extends {yfiles.layout.MultiStageLayout} - */ - export interface RadialLayout extends yfiles.layout.MultiStageLayout{} - export class RadialLayout { - /** - * Creates a new {@link yfiles.radial.RadialLayout} instance with the default settings. - */ - constructor(); - /** - * Data acceptor key for publishing the circle ID and sector data - *

- * For each node, the ID of the circle and data regarding the circular sector on which it was placed will be stored. - *

- * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static NODE_INFO_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Gets or sets the minimum distance between two neighboring nodes of the same circle. - * @throws {Stubs.Exceptions.ArgumentError} if the given minimum distance is negative - * @type {number} - */ - minimumNodeToNodeDistance:number; - /** - * Gets or sets the spacing between two consecutive circles (layers). - *

- * The spacing is a non-negative value, where 0 means that no spacing is considered. - *

- *

- * The radius of each circle will be a multiple of this value. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the spacing value is negative - * @type {number} - */ - layerSpacing:number; - /** - * Gets or sets the minimum distance between two circles. - * @throws {Stubs.Exceptions.ArgumentError} if the minimum layer distance is negative - * @type {number} - */ - minimumLayerDistance:number; - /** - * Gets or sets the maximum sector angle around a node within which the node's children will be placed. - *

- * Based on the location of a given node, the sector of its children that lie on the next outer layer is described by this - * angle. The vertex of the angle is located in the center of the node while its sides point away from the inner circles. - * The child nodes are placed inside this angle. If there is not enough space, the radius of the child circle is - * increased. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the sector angle is negative or greater than 360 degrees - * @type {number} - */ - maximumChildSectorAngle:number; - /** - * Gets or sets the minimum bend angle (in degrees) between two adjacent edge segments. - *

- * The minimum bend angle is defined to be a value between 0 and 90 degrees. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given minimum bend angle is negative or greater than 90 - * @type {number} - */ - minimumBendAngle:number; - /** - * Gets or sets the policy that determines which nodes are selected as roots of the (virtual) tree for the layout process - * and are set in the center of the circles. - * @throws {Stubs.Exceptions.ArgumentError} if an invalid center node policy is given - * @type {yfiles.radial.CenterNodesPolicy} - */ - centerNodesPolicy:yfiles.radial.CenterNodesPolicy; - /** - * Gets or sets the {@link yfiles.algorithms.IDataProvider} key used for looking up the selected nodes that should be placed in the - * center. - * @throws {Stubs.Exceptions.ArgumentError} if the specified key is null - * @type {any} - */ - centerNodesDpKey:any; - /** - * Gets or sets the layering strategy that determines how nodes are distributed into different layers. - *

- * All nodes of a given layer will be placed on the same circle. - *

- * @throws {Stubs.Exceptions.ArgumentError} if an invalid layering strategy is set - * @type {yfiles.radial.LayeringStrategy} - */ - layeringStrategy:yfiles.radial.LayeringStrategy; - /** - * Gets or sets the edge routing strategy. - * @throws {Stubs.Exceptions.ArgumentError} if an invalid edge routing strategy is set - * @type {yfiles.radial.EdgeRoutingStrategy} - */ - edgeRoutingStrategy:yfiles.radial.EdgeRoutingStrategy; - /** - * Gets or sets whether or not node labels are taken into account when calculating node positions. - *

- * Thereby, possible node/node label or node label/node label overlaps are prevented. - *

- * @type {boolean} - */ - considerNodeLabels:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} that modifies the orientation of the layout is activated. - * @see yfiles.layout.MultiStageLayout#orientationLayoutEnabled - * @see yfiles.layout.MultiStageLayout#orientationLayout - * @see yfiles.layout.MultiStageLayout#layoutOrientation - * @see yfiles.layout.OrientationLayout - * @type {boolean} - */ - orientationLayoutEnabled:boolean; - /** - * Gets the {@link yfiles.layout.EdgeBundling} instance that defines the settings of the edge bundling feature. - *

- * The specified {@link yfiles.layout.EdgeBundling} defines global bundling properties. Settings for individual edges can be - * defined by assigning an {@link yfiles.layout.EdgeBundleDescriptor} to an edge using a {@link yfiles.algorithms.IDataProvider} registered - * with key {@link yfiles.layout.EdgeBundling#EDGE_BUNDLE_DESCRIPTOR_DP_KEY}. - *

- * @type {yfiles.layout.EdgeBundling} - */ - edgeBundling:yfiles.layout.EdgeBundling; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.radial.RadialLayout; - } - /** - * Specifies custom data for the {@link yfiles.radial.RadialLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface RadialLayoutData extends yfiles.layout.LayoutData{} - export class RadialLayoutData { - constructor(); - /** - * Gets or sets the collection of nodes that shall be placed in the center with {@link yfiles.radial.RadialLayout#centerNodesPolicy center node policy} set to {@link yfiles.radial.CenterNodesPolicy#CUSTOM} - * . - * @see yfiles.radial.RadialLayout#centerNodesDpKey - * @type {yfiles.layout.DpKeyItemCollection.} - */ - centerNodes:yfiles.layout.DpKeyItemCollection; - /** - * Gets or sets the mapping from nodes to a {@link yfiles.radial.RadialLayoutNodeInfo} describing on which circle and in which - * sector the node is placed. - *

- * If the mapper contains a {@link yfiles.radial.RadialLayoutNodeInfo} for a node, the layout will update its property during the - * layout. - *

- * @see yfiles.radial.RadialLayout#NODE_INFO_DP_KEY - * @type {yfiles.collections.IMapper.} - */ - nodeInfos:yfiles.collections.IMapper; - /** - * Gets or sets a mapping from edges to an object representing their source edge group. - * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourceGroups:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to an object representing their target edge group. - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetGroups:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their {@link yfiles.layout.NodeHalo}. - * @see yfiles.layout.NodeHalo#NODE_HALO_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - nodeHalos:yfiles.layout.ItemMapping; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - /** - * Gets or sets the mapping of edges to their {@link yfiles.layout.EdgeBundleDescriptor}. - *

- * Bundling together multiple edges means that their common parts are to some degree merged into a bundled part. At the - * source and target point, the edges are again clearly split. - *

- *

- * If an edge is mapped to null, the {@link yfiles.layout.EdgeBundling#defaultBundleDescriptor default descriptor} is used. - *

- * @see yfiles.layout.EdgeBundleDescriptor - * @see yfiles.radial.RadialLayout#edgeBundling - * @type {yfiles.layout.ItemMapping.} - */ - edgeBundleDescriptors:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.radial.RadialLayoutData; - } - }export namespace seriesparallel{ - /** - * {@link yfiles.seriesparallel.DefaultOutEdgeComparer} is the default implementation for the out-edge comparator used in - * {@link yfiles.seriesparallel.SeriesParallelLayout}. - *

- * It keeps the order of the edges in the graph for edges without {@link yfiles.layout.PortConstraint}s and considers the - * {@link yfiles.layout.PortConstraint}s such that the order of the target nodes of the outgoing edges is similar to the port - * location at the source node. Note that this won't work for all cases because the target nodes may not be completely - * independent. - *

- * @see yfiles.seriesparallel.SeriesParallelLayout#defaultOutEdgeComparer - * @class - * @implements {yfiles.collections.IComparer.} - */ - export interface DefaultOutEdgeComparer extends yfiles.lang.Object,yfiles.collections.IComparer{} - export class DefaultOutEdgeComparer { - /** - * Creates a {@link yfiles.seriesparallel.DefaultOutEdgeComparer} instance with default settings. - */ - constructor(); - /** - * Compares the two given edges considering their {@link yfiles.layout.PortConstraint}s. - *

- * The order of edges is kept unless there are - * {@link yfiles.layout.PortConstraint}s assigned. Then the edges will be sorted to avoid edge crossings. - *

- * @param o1 the first edge - * @param o2 the second edge - * @returns the order of the given two edges - */ - compare(o1:any,o2:any):number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.seriesparallel.DefaultOutEdgeComparer; - } - /** - * {@link yfiles.seriesparallel.DefaultPortAssignment} implements the default port assignment strategy. - *

- * Ports are either placed at the {@link yfiles.seriesparallel.PortAssignmentMode#CENTER center} or get {@link yfiles.seriesparallel.PortAssignmentMode#DISTRIBUTED distributed} at the sides of the node. - *

- *

- * If {@link yfiles.layout.PortConstraint}s are specified, the strong {@link yfiles.layout.PortConstraint}s are handled separately and keep - * their initial location relative to the node while weak - * {@link yfiles.layout.PortConstraint}s just influence on which side of the node the port is placed. - *

- *

- * If there are edge groups specified, the edges which belong to the same group get the same port locations. - *

- * @see yfiles.layout.PortConstraint - * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @class - * @implements {yfiles.seriesparallel.IPortAssignment} - */ - export interface DefaultPortAssignment extends yfiles.lang.Object,yfiles.seriesparallel.IPortAssignment{} - export class DefaultPortAssignment { - /** - * Creates a new {@link yfiles.seriesparallel.DefaultPortAssignment} instance using the given {@link yfiles.seriesparallel.DefaultPortAssignment#mode mode} and a given value for the {@link yfiles.seriesparallel.DefaultPortAssignment#borderGapToPortGapRatio ratio} - * of the gap between the border and the ports to the gap between the ports themselves. - * @param mode one of the predefined port assignment modes - * @param [ratio=0.5] the ratio of the distance between outer ports and the border to the distance between any two ports - * @throws {Stubs.Exceptions.ArgumentError} if the given mode is unknown or the given ratio is negative - */ - constructor(mode:yfiles.seriesparallel.PortAssignmentMode,ratio?:number); - /** - * Creates a new {@link yfiles.seriesparallel.DefaultPortAssignment} with default settings. - */ - constructor(); - /** - * Places the ports of edges connecting to the given node according to the {@link yfiles.seriesparallel.DefaultPortAssignment#mode port assignment mode}. - * @param graph the input graph - * @param node the node whose adjacent edges' ports should be placed - * @see yfiles.seriesparallel.DefaultPortAssignment#mode - */ - assignPorts(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node):void; - /** - * Determines the distance between the outer ports and the border of the node. - *

- * This implementation calculates the gap according to the number of edges at one side of the node. It also includes the - * {@link yfiles.seriesparallel.DefaultPortAssignment#borderGapToPortGapRatio ratio between border gap and port gap}. - *

- *

- * This method is called by {@link yfiles.seriesparallel.DefaultPortAssignment#assignPorts} to calculate the location of the first - * port. It may be overridden to implement a different distribution of ports on the node's side. - *

- * @param sideLength the width/height of the side - * @param edgeCount the number of edges that connect to this side - * @returns the absolute gap to be used on both sides of the ports - * @see yfiles.seriesparallel.DefaultPortAssignment#assignPorts - * @see yfiles.seriesparallel.DefaultPortAssignment#borderGapToPortGapRatio - * @protected - */ - getPortBorderGap(sideLength:number,edgeCount:number):number; - /** - * Determines the distance between two adjacent ports. - *

- * This implementation calculates the gap according to the number of edges at one side of the node. The edges are - * distributed keeping the given gap to the border of the node. - *

- *

- * This method is called by {@link yfiles.seriesparallel.DefaultPortAssignment#assignPorts} to calculate the distance between two - * ports. It may be overridden to implement a different distribution of ports on the node's side. - *

- * @param sideLength the width/height of the side - * @param edgeCount the number of edges/ports that connect to this side - * @param portBorderGap the port border gap (i.e. calculated by {@link #getPortBorderGap}) - * @returns the absolute distance to be used between two adjacent ports - * @see yfiles.seriesparallel.DefaultPortAssignment#assignPorts - * @see yfiles.seriesparallel.DefaultPortAssignment#getPortBorderGap - * @protected - */ - getPortDistanceDelta(sideLength:number,edgeCount:number,portBorderGap:number):number; - /** - * Gets or sets the mode that describes how ports are placed. - * @throws {Stubs.Exceptions.ArgumentError} if an unknown mode is specified - * @type {yfiles.seriesparallel.PortAssignmentMode} - */ - mode:yfiles.seriesparallel.PortAssignmentMode; - /** - * Gets or sets the ratio of the border gap (distance between the outer ports and the node border) to the port gap (distance between adjacent - * ports). - *

- * The ratio must have a positive value. If the ratio is - * 0, the ports will be distributed along the whole side of the node without a gap between the last port and the corner. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified ratio is negative - * @type {number} - */ - borderGapToPortGapRatio:number; - /** - * Gets or sets the fork style which influences the port assignment. - *

- * If the fork style is set to - * {@link yfiles.seriesparallel.ForkStyle#OUTSIDE_NODE}, edges without port constraints will be assigned in flow direction. - *

- *

- * If the fork style is set to - * {@link yfiles.seriesparallel.ForkStyle#AT_NODE}, the ports of edges in flow direction also get distributed to the sides unless - * they are without bends. Due to large minimum first/last segment lengths edges may overlap. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified fork style is unknown - * @type {yfiles.seriesparallel.ForkStyle} - */ - forkStyle:yfiles.seriesparallel.ForkStyle; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.seriesparallel.DefaultPortAssignment; - } - /** - * An {@link yfiles.seriesparallel.EdgeLayoutDescriptor} provides routing details for an edge that are considered by - * {@link yfiles.seriesparallel.SeriesParallelLayout}. - *

- * Such an {@link yfiles.seriesparallel.EdgeLayoutDescriptor} can either be specified for a single edge or shared by several edges. - * It is assigned by registering a {@link yfiles.algorithms.IDataProvider} with key - * {@link yfiles.seriesparallel.SeriesParallelLayout#EDGE_LAYOUT_DESCRIPTOR_DP_KEY}. If no {@link yfiles.algorithms.IDataProvider} is - * registered with this key, {@link yfiles.seriesparallel.SeriesParallelLayout#defaultEdgeLayoutDescriptor a default descriptor} is used. - *

- * @see yfiles.seriesparallel.SeriesParallelLayout#EDGE_LAYOUT_DESCRIPTOR_DP_KEY - * @see yfiles.seriesparallel.SeriesParallelLayout#defaultEdgeLayoutDescriptor - * @class - */ - export interface EdgeLayoutDescriptor extends yfiles.lang.Object{} - export class EdgeLayoutDescriptor { - /** - * Creates a new instance of {@link yfiles.seriesparallel.EdgeLayoutDescriptor} with default settings. - */ - constructor(); - /** - * Creates a copy of this {@link yfiles.seriesparallel.EdgeLayoutDescriptor} instance. - * @returns a copy of this {@link } instance - */ - createCopy():yfiles.seriesparallel.EdgeLayoutDescriptor; - /** - * Gets or sets the minimum length for the associated edge. - *

- * The minimum length needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} for negative edge lengths - * @type {number} - */ - minimumLength:number; - /** - * Gets or sets the minimum length for the first segment of the associated edge. - *

- * The minimum first segment length needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} for negative minimum segment lengths - * @type {number} - */ - minimumFirstSegmentLength:number; - /** - * Gets or sets the minimum length for the last segment of the associated edge. - *

- * The minimum last segment length needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} for negative minimum segment lengths - * @type {number} - */ - minimumLastSegmentLength:number; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.seriesparallel.EdgeLayoutDescriptor; - } - export enum PortAssignmentMode{ - /** - * A port assignment specifier which defines that all ports are reset to the center of their nodes. - * @see yfiles.layout.PortConstraint - */ - CENTER, - /** - * A port assignment specifier which defines that the ports of incoming and outgoing edges are distributed evenly at the - * side of their nodes. - *

- * The source ports of edges without {@link yfiles.layout.PortConstraint}s will be distributed at the sides of their source and - * target nodes. Edges with weak {@link yfiles.layout.PortConstraint}s are distributed at the side of the nodes which is specified - * in the {@link yfiles.layout.PortConstraint}. - *

- *

- * Grouped edges will get the same port location. - *

- * @see yfiles.layout.PortConstraint - * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - */ - DISTRIBUTED - } - export enum ForkStyle{ - /** - * Fork style specifier that defines that the edges will fork outside a node. Edges leave/enter the nodes south/north and - * bend between their source and target. - */ - OUTSIDE_NODE, - /** - * Fork style specifier that defines that the edges will fork on a node. Edges leave/enter the nodes south/north if they - * are straight (no bends) or east and west of the node. - */ - AT_NODE - } - export enum RoutingStyle{ - /** - * Style constant describing an orthogonal edge style. If this style is used, edges will contain only horizontal and - * vertical segments. - * @see yfiles.seriesparallel.SeriesParallelLayout#routingStyle - */ - ORTHOGONAL, - /** - * Style constant describing an octilinear edge style. If this style is used, edges will contain horizontal, vertical and - * 45-degree sloped segments. - * @see yfiles.seriesparallel.SeriesParallelLayout#routingStyle - */ - OCTILINEAR, - /** - * Style constant describing a polyline edge style. If this style is used, edges will contain vertical and other sloped - * segments. - * @see yfiles.seriesparallel.SeriesParallelLayout#routingStyle - */ - POLYLINE - } - /** - * A {@link yfiles.seriesparallel.IPortAssignment} is used by {@link yfiles.seriesparallel.SeriesParallelLayout} for determining the - * locations of the edges' ports at their incident nodes. - * @interface - */ - export interface IPortAssignment extends yfiles.lang.Object{ - /** - * Assigns both the incoming edges' target ports as well as all source ports for the outgoing edges. - *

- * Outgoing edges are sorted according to the specified out-edge comparator from left to right and incoming edges are in - * the order of the subgraphs they are coming from. - *

- *

- * This method is called by {@link yfiles.seriesparallel.SeriesParallelLayout} before the actual layout of the graph takes place. - *

- * @param graph the graph instance the node is part of - * @param node the node whose incident edges' ports are assigned - * @see yfiles.seriesparallel.SeriesParallelLayout#OUT_EDGE_COMPARER_DP_KEY - * @see yfiles.seriesparallel.SeriesParallelLayout#defaultOutEdgeComparer - * @abstract - */ - assignPorts(graph:yfiles.layout.LayoutGraph,node:yfiles.algorithms.Node):void; - } - var IPortAssignment:{ - $class:yfiles.lang.Class; - isInstance(o:any):o is yfiles.seriesparallel.IPortAssignment; - }; - /** - * This layout algorithm arranges series-parallel graphs. - *

- * Layout Style Series-parallel graphs are directed graphs with a single source (node without incoming edges) and a single sink (node - * without outgoing edges). The layout algorithm highlights the main layout direction (from source to sink). It also - * emphasizes the paths through the graph because edges are routed with few bends. - *

- *

- * {@link yfiles.seriesparallel.SeriesParallelLayout} is suitable for the visualization of circuits, call trees or flowcharts. - *

- *

- * {@graph {"ann":{"s":[30,30],"d":1},"n":[[226,0],[226,480],[278,60],[278,420],[0,270],[360,300],[300,300],[240,300],[240,180],[60,240],[0,330],[180,120],[120,240],[0,150],[180,270],[180,210],[338,180],[300,240],[436,240],[0,210],[240,240],[180,360],[360,240]],"e":[[0,1,[241,45,481.5,45,481.5,465,241,465]],[0,2,[241,45,293,45]],[3,1,[293,465,241,465]],[5,3,[375,405,293,405]],[6,3,[315,405,293,405]],[0,9,[241,45,75,45]],[9,1,[75,465,241,465]],[4,10],[10,1,[15,465,241,465]],[2,11,[293,105,195,105]],[11,8,[195,165,255,165]],[11,12,[195,165,135,165]],[0,13,[241,45,15,45]],[11,15],[15,14],[2,16,[293,105,353,105]],[16,3,[353,225,405.5,225,405.5,405,293,405]],[16,17,[353,225,315,225]],[17,6],[2,18,[293,105,451,105]],[18,3,[451,405,293,405]],[13,19],[19,4],[8,20],[20,7],[7,21,[255,345,195,345]],[14,21],[12,21,[135,345,195,345]],[21,3,[195,405,293,405]],[16,22,[353,225,375,225]],[22,5]],"vp":[0.0,0.0,482.0,510.0]}}Concept Series-parallel graphs are directed graphs with a single source (node without incoming edges) and a single sink (node - * without outgoing edges) that are built using only the following two rules: - *

- *
    - *
  1. Series composition: The source of a subgraph is merged with the sink of a second subgraph.
  2. - *
  3. Parallel composition: The sources and sinks of two subgraphs are merged.
  4. - *
- *

- * From the recursive structure of series-parallel graphs, the layout algorithm retrieves a decomposition tree where each - * node represents one of the decomposition types. Then, this tree is traversed recursively from bottom to top, aligning - * subgraphs above (series) or next to (parallel) each other until the whole graph is arranged. The edges are routed when - * both end nodes are placed. Different {@link yfiles.seriesparallel.SeriesParallelLayout#routingStyle routing styles} can be used. - *

- *

- * To avoid moving all nodes several times and to be aware of the area that the subtrees occupy, the layout algorithm keeps - * track of the shape of the subtrees. These shapes are moved and merged during the layout calculation. The layout - * algorithm also stores the connections between nodes and nodes that haven't already been placed in these shapes. - *

- *

- * Features - *

- *

- * {@link yfiles.seriesparallel.SeriesParallelLayout} can take strong - * {@link yfiles.layout.PortConstraint}s into account. It will connect the edges to the specified locations, the directions, - * however, will be ignored. - *

- *

- * Grouping of nodes can also be handled by this layout algorithm. It is important that a group node contains a whole - * series-parallel subgraph. Otherwise, the group nodes may overlap with each other or with other nodes. Edges which are - * connected to non-empty group nodes are not allowed. Furthermore, the user may specify minimum size constraints for each - * group node using {@link yfiles.algorithms.IDataProvider} key {@link yfiles.layout.GroupingKeys#MINIMUM_NODE_SIZE_DP_KEY}. - *

- *

- * The layout algorithm can be configured to reserve space for node labels and to place the edge labels along the edge such - * that the labels won't overlap with other graph elements. Edge labels are placed according to the information stored in a - * {@link yfiles.layout.PreferredPlacementDescriptor} instance. However, labels that should be centered between source and target - * are placed close to the target node, unless this edge connects to the local source and sink of a subgraph. - *

- *

- * Parallel subgraphs can be aligned in different ways. Depending on the node sizes, a different alignment can increase the - * compactness of the layout. - *

- *

- * The way in which edges are distributed around their incident nodes is computed by an instance of - * {@link yfiles.seriesparallel.IPortAssignment}. The {@link yfiles.seriesparallel.DefaultPortAssignment default assignment} is able to consider - * {@link yfiles.layout.PortConstraint}s and edge groups. - *

- *

- * The {@link yfiles.seriesparallel.SeriesParallelLayout#fromSketchMode From Sketch mode} allows to take the initial locations of the nodes into account. However, the layout algorithm won't - * insert crossings because it maintains the order of children of each node. - *

- *

- * {@link yfiles.seriesparallel.SeriesParallelLayout} supports custom sorting of the outgoing edges of a node. A {@link yfiles.collections.IComparer.} can be assigned - * individually for the nodes using a {@link yfiles.algorithms.IDataProvider} registered with key - * {@link yfiles.seriesparallel.SeriesParallelLayout#OUT_EDGE_COMPARER_DP_KEY}. For all nodes for which the {@link yfiles.algorithms.IDataProvider} - * returns null, the layout algorithm falls back to the {@link yfiles.seriesparallel.SeriesParallelLayout#defaultOutEdgeComparer default comparator}. - *

- *

- * By default, this layout algorithm can only handle graphs with a series-parallel structure. To apply it to a general - * graph, {@link yfiles.seriesparallel.SeriesParallelLayout#generalGraphHandling general graph handling} needs to be activated. Then, the layout algorithm will temporarily add and/or remove some - * edges from the input graph until a series-parallel graph is obtained. The edges that were removed will be routed - * separately afterwards. - *

- * @class - * @extends {yfiles.layout.MultiStageLayout} - */ - export interface SeriesParallelLayout extends yfiles.layout.MultiStageLayout{} - export class SeriesParallelLayout { - /** - * Creates a new {@link yfiles.seriesparallel.SeriesParallelLayout} instance with default settings. - */ - constructor(); - /** - * Determines whether or not the given graph has a series-parallel structure. - *

- * The current implementation detects the series-parallel graph structure in linear time. - *

- * @param graph the input graph - * @returns true if the given graph is series-parallel, false otherwise - * @static - */ - static isSeriesParallelGraph(graph:yfiles.algorithms.Graph):boolean; - /** - * Data provider key for storing individual settings for edges - *

- * If no edge layout descriptor is mapped for an edge, a default edge layout descriptor will be obtained by method {@link yfiles.seriesparallel.SeriesParallelLayout#defaultEdgeLayoutDescriptor}. - *

- * @see yfiles.seriesparallel.SeriesParallelLayout#defaultEdgeLayoutDescriptor - * @const - * @static - * @type {yfiles.algorithms.EdgeDpKey.} - */ - static EDGE_LAYOUT_DESCRIPTOR_DP_KEY:yfiles.algorithms.EdgeDpKey; - /** - * Data provider key for assigning different orderings for outgoing edges of the nodes - *

- * If the {@link yfiles.collections.IComparer.} associated with a node is null, the outgoing edges maintain their initial order. - *

- * @see yfiles.seriesparallel.SeriesParallelLayout#defaultOutEdgeComparer - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.>} - */ - static OUT_EDGE_COMPARER_DP_KEY:yfiles.algorithms.NodeDpKey>; - /** - * Data provider key for providing an individual port distribution at nodes - *

- * If there is no {@link yfiles.seriesparallel.IPortAssignment} specified for a node, the layout algorithm uses the - * {@link yfiles.seriesparallel.SeriesParallelLayout#defaultPortAssignment default assignment}. - *

- * @see yfiles.seriesparallel.SeriesParallelLayout#defaultPortAssignment - * @const - * @static - * @type {yfiles.algorithms.NodeDpKey.} - */ - static PORT_ASSIGNMENT_DP_KEY:yfiles.algorithms.NodeDpKey; - /** - * Data provider key for marking edge labels of non-series-parallel edges - * @see yfiles.seriesparallel.SeriesParallelLayout#nonSeriesParallelEdgeLabelSelectionKey - * @see yfiles.seriesparallel.SeriesParallelLayout#nonSeriesParallelEdgeLabelingAlgorithm - * @const - * @static - * @type {yfiles.algorithms.IEdgeLabelLayoutDpKey.} - */ - static NON_SERIES_PARALLEL_EDGE_LABELS_DP_KEY:yfiles.algorithms.IEdgeLabelLayoutDpKey; - /** - * Gets or sets whether or not the layout algorithm reserves space for node labels to avoid overlaps. - * @type {boolean} - */ - considerNodeLabels:boolean; - /** - * Gets or sets whether or not the layout algorithm will place edge labels and reserve space for them. - * @type {boolean} - */ - integratedEdgeLabeling:boolean; - /** - * Gets or sets the vertical alignment of parallel subgraphs. - *

- * The alignment is defined by a ratio: - *

- *
    - *
  • Ratio 0 means that nodes are top-aligned
  • - *
  • Ratio 0.5 means that nodes are center-aligned
  • - *
  • Ratio 1 means that nodes are bottom-aligned
  • - *
- * @type {number} - */ - verticalAlignment:number; - /** - * Gets or sets whether or not the layout algorithm can handle general graphs. - *

- * General graphs are required to be transformed before being laid out (by adding or removing some edges) such that they - * satisfy the criteria of a series-parallel graph. After the layout, the graph will be restored and the initial edges - * which weren't included in the series-parallel graph are routed by a separate {@link yfiles.seriesparallel.SeriesParallelLayout#nonSeriesParallelEdgeRouter edge routing algorithm}. Furthermore, the - * labels of these edges are placed by a customizable {@link yfiles.seriesparallel.SeriesParallelLayout#nonSeriesParallelEdgeLabelingAlgorithm edge labeling algorithm}. - *

- * @type {boolean} - */ - generalGraphHandling:boolean; - /** - * Gets or sets the edge routing algorithm used for the edges of a general graph that are not part of the series-parallel - * subgraph whose layout is calculated. - * @throws {Stubs.Exceptions.ArgumentError} if null is specified - * @see yfiles.seriesparallel.SeriesParallelLayout#generalGraphHandling - * @see yfiles.seriesparallel.SeriesParallelLayout#nonSeriesParallelEdgesDpKey - * @type {yfiles.layout.ILayoutAlgorithm} - */ - nonSeriesParallelEdgeRouter:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets the key to register a {@link yfiles.algorithms.IDataProvider} that is used for marking non-series-parallel edges. - *

- * This key is used for determining the edges that are not part of the series-parallel structure in a general graph, such - * that the specified non-series-parallel edge router only routes marked edges. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the given key is set to null - * @see yfiles.seriesparallel.SeriesParallelLayout#generalGraphHandling - * @see yfiles.seriesparallel.SeriesParallelLayout#nonSeriesParallelEdgeRouter - * @type {any} - */ - nonSeriesParallelEdgesDpKey:any; - /** - * Gets or sets the labeling algorithm that is applied to all edge labels that belong to non-series-parallel edges. - * @see yfiles.seriesparallel.SeriesParallelLayout#generalGraphHandling - * @see yfiles.seriesparallel.SeriesParallelLayout#nonSeriesParallelEdgeLabelSelectionKey - * @type {yfiles.layout.ILayoutAlgorithm} - */ - nonSeriesParallelEdgeLabelingAlgorithm:yfiles.layout.ILayoutAlgorithm; - /** - * Gets or sets the key to register a {@link yfiles.algorithms.IDataProvider} that is used by the {@link yfiles.seriesparallel.SeriesParallelLayout#nonSeriesParallelEdgeLabelingAlgorithm non-series-parallel edge labeling algorithm} - * to determine which edge labels it should place. - *

- * During the layout, a {@link yfiles.algorithms.IDataProvider} with this key will be registered with the graph. It will mark all - * {@link yfiles.layout.IEdgeLabelLayout}s that belong to non-series-parallel edges. A specified custom non-series-parallel edge - * labeling algorithm needs to obey this selection. If using {@link yfiles.labeling.GenericLabeling} as labeling algorithm, set - * this key as value of property {@link yfiles.labeling.LabelingBase#affectedLabelsDpKey}. - *

- *

- * The labeling algorithm set as default is already configured such that it uses the correct selection key. - *

- * @see yfiles.seriesparallel.SeriesParallelLayout#nonSeriesParallelEdgeLabelingAlgorithm - * @type {any} - */ - nonSeriesParallelEdgeLabelSelectionKey:any; - /** - * Gets or sets the default {@link yfiles.seriesparallel.IPortAssignment} used for those nodes that do not have their own specific - * instance. - *

- * A {@link yfiles.seriesparallel.IPortAssignment} instance is defined using a {@link yfiles.algorithms.IDataProvider} registered with the - * graph with key {@link yfiles.seriesparallel.SeriesParallelLayout#PORT_ASSIGNMENT_DP_KEY}. - *

- * @throws {Stubs.Exceptions.ArgumentError} if null is specified - * @type {yfiles.seriesparallel.IPortAssignment} - */ - defaultPortAssignment:yfiles.seriesparallel.IPortAssignment; - /** - * Gets or sets the default {@link yfiles.collections.IComparer.} used for sorting the outgoing edges incident to nodes that do not have a specific {@link yfiles.collections.IComparer.}. - *

- * Such a comparator is defined using a {@link yfiles.algorithms.IDataProvider} registered with the graph with key - * {@link yfiles.seriesparallel.SeriesParallelLayout#OUT_EDGE_COMPARER_DP_KEY}. - *

- * @type {yfiles.collections.IComparer.} - */ - defaultOutEdgeComparer:yfiles.collections.IComparer; - /** - * Gets or sets the currently used routing style for edges. - * @type {yfiles.seriesparallel.RoutingStyle} - */ - routingStyle:yfiles.seriesparallel.RoutingStyle; - /** - * Gets or sets the minimum vertical distance of the edge segments that are not orthogonal. - *

- * The distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified length is smaller than 0 - * @see yfiles.seriesparallel.SeriesParallelLayout#minimumSlope - * @see yfiles.seriesparallel.SeriesParallelLayout#routingStyle - * @see yfiles.seriesparallel.RoutingStyle#POLYLINE - * @type {number} - */ - minimumPolylineSegmentLength:number; - /** - * Gets or sets the minimum slope which a non-orthogonal edge segment should have. - *

- * A higher minimum slope prevents those segments in very wide graphs from becoming nearly horizontal. The slope needs to - * have a non-negative value. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified slope is smaller than 0 - * @see yfiles.seriesparallel.SeriesParallelLayout#minimumPolylineSegmentLength - * @see yfiles.seriesparallel.SeriesParallelLayout#routingStyle - * @see yfiles.seriesparallel.RoutingStyle#POLYLINE - * @type {number} - */ - minimumSlope:number; - /** - * Gets or sets the preferred length for non-orthogonal segments in octilinear edge routes. - *

- * If there is not enough space, those segments may be shorter than the specified length. The length needs to be - * non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified length is smaller than 0 - * @see yfiles.seriesparallel.SeriesParallelLayout#routingStyle - * @see yfiles.seriesparallel.RoutingStyle#OCTILINEAR - * @type {number} - */ - preferredOctilinearSegmentLength:number; - /** - * Gets or sets the {@link yfiles.seriesparallel.EdgeLayoutDescriptor} instance used for all those edges that do not have a - * specific layout descriptor assigned. - * @throws {Stubs.Exceptions.ArgumentError} if the specified {@link yfiles.seriesparallel.EdgeLayoutDescriptor} is null - * @see yfiles.seriesparallel.SeriesParallelLayout#EDGE_LAYOUT_DESCRIPTOR_DP_KEY - * @type {yfiles.seriesparallel.EdgeLayoutDescriptor} - */ - defaultEdgeLayoutDescriptor:yfiles.seriesparallel.EdgeLayoutDescriptor; - /** - * Gets or sets the minimum distance between nodes. - *

- * This distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is smaller than 0 - * @type {number} - */ - minimumNodeToNodeDistance:number; - /** - * Gets or sets the minimum distance between nodes and edges. - *

- * This distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is smaller than 0 - * @type {number} - */ - minimumNodeToEdgeDistance:number; - /** - * Gets or sets the minimum distance between edges. - *

- * This distance needs to be non-negative. - *

- * @throws {Stubs.Exceptions.ArgumentError} if the specified distance is smaller than 0 - * @type {number} - */ - minimumEdgeToEdgeDistance:number; - /** - * Gets or sets whether or not to take the coordinates of the input diagram into account when arranging the nodes. - *

- * The order of edges incident to the same source node will remain the same as in the original layout. - *

- * @type {boolean} - */ - fromSketchMode:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for arranging the components of the graph is activated. - * @see yfiles.layout.MultiStageLayout#componentLayoutEnabled - * @see yfiles.layout.MultiStageLayout#componentLayout - * @see yfiles.layout.ComponentLayout - * @type {boolean} - */ - componentLayoutEnabled:boolean; - /** - * Sets whether or not the {@link yfiles.layout.ILayoutStage} used for routing self-loops is activated. - * @see yfiles.layout.MultiStageLayout#selfLoopRouterEnabled - * @see yfiles.layout.MultiStageLayout#selfLoopRouter - * @see yfiles.layout.SelfLoopRouter - * @type {boolean} - */ - selfLoopRouterEnabled:boolean; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.seriesparallel.SeriesParallelLayout; - } - /** - * Specifies custom data for the {@link yfiles.seriesparallel.SeriesParallelLayout}. - * @class - * @extends {yfiles.layout.LayoutData} - */ - export interface SeriesParallelLayoutData extends yfiles.layout.LayoutData{} - export class SeriesParallelLayoutData { - constructor(); - /** - * Gets or sets the mapping from edges to their {@link yfiles.seriesparallel.EdgeLayoutDescriptor}. - * @see yfiles.seriesparallel.EdgeLayoutDescriptor - * @see yfiles.seriesparallel.SeriesParallelLayout#EDGE_LAYOUT_DESCRIPTOR_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeLayoutDescriptors:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to their {@link yfiles.seriesparallel.IPortAssignment}. - * @see yfiles.seriesparallel.SeriesParallelLayout#PORT_ASSIGNMENT_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - portAssignments:yfiles.layout.ItemMapping; - /** - * Gets or sets the mapping from nodes to comparison functions used to sort the nodes' outgoing edges. - * @see yfiles.seriesparallel.SeriesParallelLayout#OUT_EDGE_COMPARER_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - outEdgeComparers:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to an object representing their source edge group. - * @see yfiles.layout.PortConstraintKeys#SOURCE_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - sourceGroupIds:yfiles.layout.ItemMapping; - /** - * Gets or sets a mapping from edges to an object representing their target edge group. - * @see yfiles.layout.PortConstraintKeys#TARGET_GROUP_ID_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - targetGroupIds:yfiles.layout.ItemMapping; - /** - * Gets or sets the AbortHandler used during the layout. - * @see yfiles.algorithms.AbortHandler#ABORT_HANDLER_DP_KEY - * @type {yfiles.algorithms.AbortHandler} - */ - abortHandler:yfiles.algorithms.AbortHandler; - /** - * Gets or sets the mapping that provides a {@link yfiles.layout.PreferredPlacementDescriptor} instance for edge - * {@link yfiles.graph.ILabel}s. - * @see yfiles.layout.PreferredPlacementDescriptor - * @see yfiles.layout.LayoutGraphAdapter#EDGE_LABEL_LAYOUT_PREFERRED_PLACEMENT_DESCRIPTOR_DP_KEY - * @type {yfiles.layout.ItemMapping.} - */ - edgeLabelPreferredPlacement:yfiles.layout.ItemMapping; - static $class:yfiles.lang.Class; - static isInstance(o:any):o is yfiles.seriesparallel.SeriesParallelLayoutData; - } - }} - -type yfiles_namespace = typeof yfiles; -declare module 'yfiles/algorithms' { export = yfiles; } -declare module 'yfiles/complete' { export = yfiles; } -declare module 'yfiles/lang' { export = yfiles.lang; } -declare module 'yfiles/layout' { export = yfiles; } -declare module 'yfiles/layout-familytree' { export = yfiles; } -declare module 'yfiles/layout-hierarchic' { export = yfiles; } -declare module 'yfiles/layout-multipage' { export = yfiles; } -declare module 'yfiles/layout-organic' { export = yfiles; } -declare module 'yfiles/layout-orthogonal' { export = yfiles; } -declare module 'yfiles/layout-orthogonal-compact' { export = yfiles; } -declare module 'yfiles/layout-partial' { export = yfiles; } -declare module 'yfiles/layout-radial' { export = yfiles; } -declare module 'yfiles/layout-seriesparallel' { export = yfiles; } -declare module 'yfiles/layout-tree' { export = yfiles; } -declare module 'yfiles/router-other' { export = yfiles; } -declare module 'yfiles/router-polyline' { export = yfiles; } -declare module 'yfiles/view' { export = yfiles; } -declare module 'yfiles/view-component' { export = yfiles; } -declare module 'yfiles/view-editor' { export = yfiles; } -declare module 'yfiles/view-folding' { export = yfiles; } -declare module 'yfiles/view-graphml' { export = yfiles; } -declare module 'yfiles/view-layout-bridge' { export = yfiles; } -declare module 'yfiles/view-table' { export = yfiles; } \ No newline at end of file diff --git a/types/yfiles/tslint.json b/types/yfiles/tslint.json deleted file mode 100644 index a41bf5d19a..0000000000 --- a/types/yfiles/tslint.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "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/yfiles/yfiles-tests.ts b/types/yfiles/yfiles-tests.ts deleted file mode 100644 index 5d13f4de75..0000000000 --- a/types/yfiles/yfiles-tests.ts +++ /dev/null @@ -1,175 +0,0 @@ -class BasicTest { - private readonly graphComponent:yfiles.view.GraphComponent; - - constructor() { - this.graphComponent = new yfiles.view.GraphComponent("graphControl"); - - let graphEditorInputMode = new yfiles.input.GraphEditorInputMode(); - - // Modify the MyHitTestable class to be usable with our class framework - yfiles.lang.Class.injectInterfaces(MyHitTestable.prototype, [yfiles.input.IHitTestable]); - let myHitTestable = new MyHitTestable(); - - if (yfiles.input.IHitTestable.isInstance(myHitTestable)) { - // If myHitTestable is recognized as instance of yfiles.drawing.IHitTestable by the yFiles class - // framework, set it as hit testable to prevent clicking any item. - // If you cannot click-select the nodes in the GraphControl, this worked correctly. - graphEditorInputMode.clickInputMode.validClickHitTestable = myHitTestable; - } - - this.graphComponent.inputMode = graphEditorInputMode; - - this.graphComponent.graph.nodeDefaults.style = new yfiles.styles.ShinyPlateNodeStyle({ fill: yfiles.view.Fill.ORANGE }); - - this.graphComponent.graph.createNode(new yfiles.geometry.Rect(0, 0, 10, 10), new MyNodeStyle()); - - this.layout(); - } - - start() { - for (let i = 0; i < 5; i++) { - for (let j = 0; j < 5; j++) { - this.graphComponent.graph.createNodeAt(new yfiles.geometry.Point(100 * i, 100 * j)); - } - } - this.graphComponent.graph.nodes.forEach((node) => this.graphComponent.graph.addLabel(node, "Label")); - this.graphComponent.fitGraphBounds(); - } - - /** - * Runs a layout algorithm and animates the transition to the new layout. - */ - layout() { - let layouter = new yfiles.hierarchic.HierarchicLayout(); - let layoutExecutor = new yfiles.layout.LayoutExecutor(this.graphComponent, - new yfiles.layout.MinimumNodeSizeStage(layouter)); - - layoutExecutor.duration = yfiles.lang.TimeSpan.fromSeconds(1); - layoutExecutor.animateViewport = true; - layoutExecutor.updateContentRect = true; - layoutExecutor.start().then(() => { - return null; - }) - .catch(error => { - throw error; - }); - } - - /** - * Runs a shortest path analysis. - */ - analyze() { - let graph = this.graphComponent.graph; - - // Create the graph model adapter to get a proper analysis graph structure. - let graphAdapter = new yfiles.layout.YGraphAdapter(graph); - - // Create an array the size of the edge set with costs for each edge. - let cost = new Array(graph.edges.size); - for (let i = 0; i < graph.edges.size; i++) { - cost[i] = Math.random(); - } - - let pred:yfiles.algorithms.Edge[] = null; - - // Suppose the first node from the graph is the node named "Start." - let startNode = graphAdapter.getCopiedNode(graph.nodes.first()); - // Suppose the last node from the graph is the node named "Destination." - let destinationNode = graphAdapter.getCopiedNode(graph.nodes.last()); - - // Run the single-source single-sink algorithm on the graph. - let result = yfiles.algorithms.ShortestPaths.singleSourceSingleSink(graphAdapter.yGraph, startNode, - destinationNode, true, cost, pred); - // Transfer back the result. - let predIGraph = new Array(pred.length); - for (let i = 0; i < pred.length; i++) { - predIGraph[i] = graphAdapter.getOriginalEdge(pred[i]); - } - } - - coreLib() { - new yfiles.lang.AttributeDefinition(() => { return {} }); - new yfiles.lang.ClassDefinition(() => { return {} }); - new yfiles.lang.EnumDefinition(() => { return {} }); - new yfiles.lang.StructDefinition(() => { return {} }); - } - - namespacesExist() { - let a01 = new yfiles.algorithms.AbortHandler(); - let a02 = new yfiles.binding.AdjacentNodesGraphBuilder(this.graphComponent.graph); - let a03 = new yfiles.circular.CircularLayout(); - let a04 = new yfiles.collections.List(); - let a05 = new yfiles.genealogy.FamilyTreeLayout(); - let a06 = new yfiles.geometry.Matrix(); - let a07 = new yfiles.graph.GraphClipboard(); - let a08:yfiles.graphml.ChildParseContext; - let a09 = new yfiles.hierarchic.AsIsLayerer(); - let a10 = new yfiles.input.GraphEditorInputMode(); - let a11 = new yfiles.labeling.GenericLabeling(); - let a12 = new yfiles.lang.Attribute(); - let a13 = new yfiles.layout.BendConverter(); - let a14 = new yfiles.multipage.DefaultElementFactory(); - let a15 = new yfiles.organic.OrganicLayout(); - let a16 = new yfiles.orthogonal.CompactOrthogonalLayout(); - let a17 = new yfiles.partial.PartialLayout(); - let a18 = new yfiles.radial.RadialLayout(); - let a19 = new yfiles.router.BusRouter(); - let a20 = new yfiles.seriesparallel.SeriesParallelLayout(); - let a21 = new yfiles.styles.ArcEdgeStyle(); - let a22 = new yfiles.tree.AspectRatioTreeLayout(); - let a23 = new yfiles.view.GraphComponent(); - let yfilesNamespace : yfiles_namespace; - } - - testsForVersion2001() { - var element:SVGElement; - yfiles.view.SvgVisual.setScale(element, 4, 2); - yfiles.view.SvgVisual.setTranslate(element, 4, 2); - - var args = new yfiles.lang.EventArgs(); - yfiles.input.KeyEventRecognizers.META_PRESSED(null, args); - } - - testsForVersion2012() { - //isInstance type-guard - let r : any; - let p : any; - if(yfiles.geometry.Rect.isInstance(r) && yfiles.geometry.Point.isInstance(p)) { - r.contains(p); - } - - //Typings for yfiles.lang.Object instance methods. - let r2 : yfiles.geometry.Rect = new yfiles.geometry.Rect(0,0,100,100); - let r3 : yfiles.geometry.Rect = new yfiles.geometry.Rect(0,0,100,100); - r2.equals(r3); - } -} - -class MyHitTestable extends yfiles.lang.BaseClass(yfiles.input.IHitTestable) implements yfiles.input.IHitTestable { - isHit(ctx:yfiles.input.IInputModeContext, p:yfiles.geometry.Point):boolean { - return false; - } -} - -class MyNodeStyle extends yfiles.styles.NodeStyleBase { - createVisual(renderContext:yfiles.view.IRenderContext, node:yfiles.graph.INode):yfiles.view.SvgVisual { - let g = document.createElementNS("http://www.w3.org/2000/svg", "g"); - return new yfiles.view.SvgVisual(g); - } -} - -// tests for version 2.0.1.2 - -// parameterless baseclass call. -class MyHitTestable2 extends yfiles.lang.BaseClass(yfiles.input.IHitTestable) implements yfiles.input.IHitTestable { - isHit(context: yfiles.input.IInputModeContext, location: yfiles.geometry.Point): boolean { - return null; - } -} - -// yfiles.lang.Object as baseclass. -class MyHitTestable3 extends yfiles.lang.BaseClass(yfiles.input.IHitTestable) implements yfiles.input.IHitTestable { - isHit(context: yfiles.input.IInputModeContext, location: yfiles.geometry.Point): boolean { - return null; - } -} diff --git a/types/yog-bigpipe/tsconfig.json b/types/yog-bigpipe/tsconfig.json index 74dfc3ae1e..c45bd9de69 100644 --- a/types/yog-bigpipe/tsconfig.json +++ b/types/yog-bigpipe/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/yog-log/tsconfig.json b/types/yog-log/tsconfig.json index 056d458bf6..8e78df5624 100644 --- a/types/yog-log/tsconfig.json +++ b/types/yog-log/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/yog2-kernel/tsconfig.json b/types/yog2-kernel/tsconfig.json index 56155a7fec..b3b149bdcb 100644 --- a/types/yog2-kernel/tsconfig.json +++ b/types/yog2-kernel/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/yosay/tsconfig.json b/types/yosay/tsconfig.json index 884e37fabf..20a91a2203 100644 --- a/types/yosay/tsconfig.json +++ b/types/yosay/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/youtube-dl/tsconfig.json b/types/youtube-dl/tsconfig.json index 2634bd2234..38ff7be5c1 100644 --- a/types/youtube-dl/tsconfig.json +++ b/types/youtube-dl/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "lib": ["es6"], + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,6 +18,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/youtube/index.d.ts b/types/youtube/index.d.ts index a636894060..b9e45aab2d 100644 --- a/types/youtube/index.d.ts +++ b/types/youtube/index.d.ts @@ -383,7 +383,7 @@ declare namespace YT /** * ID of the video to load. */ - videoId: string; + videoId?: string; /** * Player parameters. diff --git a/types/youtube/tsconfig.json b/types/youtube/tsconfig.json index 82e6284376..bbed57fc93 100644 --- a/types/youtube/tsconfig.json +++ b/types/youtube/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/yui/tsconfig.json b/types/yui/tsconfig.json index 02963e3afd..352332b6c7 100644 --- a/types/yui/tsconfig.json +++ b/types/yui/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts" diff --git a/types/yup/tsconfig.json b/types/yup/tsconfig.json index c0aa18bfc2..4c10bc70c7 100644 --- a/types/yup/tsconfig.json +++ b/types/yup/tsconfig.json @@ -14,6 +14,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, "strictFunctionTypes": true }, "files": [ @@ -21,4 +22,4 @@ "lib/customLocale.d.ts", "yup-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/z-schema/tsconfig.json b/types/z-schema/tsconfig.json index 54782d4c86..e96a6c3643 100644 --- a/types/z-schema/tsconfig.json +++ b/types/z-schema/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/zapier-platform-core/tsconfig.json b/types/zapier-platform-core/tsconfig.json index c197914893..d4ce3793e1 100644 --- a/types/zapier-platform-core/tsconfig.json +++ b/types/zapier-platform-core/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/zen-observable/tsconfig.json b/types/zen-observable/tsconfig.json index 8f7b9ad757..b31226f4a1 100644 --- a/types/zen-observable/tsconfig.json +++ b/types/zen-observable/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/zen-push/tsconfig.json b/types/zen-push/tsconfig.json index d3e8efb833..ab99022dc4 100644 --- a/types/zen-push/tsconfig.json +++ b/types/zen-push/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "zen-push-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/zenscroll/tsconfig.json b/types/zenscroll/tsconfig.json index 89fc59c020..0629a445a4 100644 --- a/types/zenscroll/tsconfig.json +++ b/types/zenscroll/tsconfig.json @@ -8,17 +8,18 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, - "strictFunctionTypes": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", - "zenscroll-tests.ts" + "zenscroll-tests.ts" ] } \ No newline at end of file diff --git a/types/zepto/tsconfig.json b/types/zepto/tsconfig.json index cc7da64133..c2da9656bf 100644 --- a/types/zepto/tsconfig.json +++ b/types/zepto/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/zeroclipboard/tsconfig.json b/types/zeroclipboard/tsconfig.json index 135f2186a1..4844201b54 100644 --- a/types/zeroclipboard/tsconfig.json +++ b/types/zeroclipboard/tsconfig.json @@ -19,6 +19,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true } } \ No newline at end of file diff --git a/types/zeroclipboard/v1/tsconfig.json b/types/zeroclipboard/v1/tsconfig.json index 357f8f8784..70c6d4cc6a 100644 --- a/types/zeroclipboard/v1/tsconfig.json +++ b/types/zeroclipboard/v1/tsconfig.json @@ -20,7 +20,8 @@ ] }, "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/zeromq/index.d.ts b/types/zeromq/index.d.ts index 949a5f567b..d1088aba8f 100644 --- a/types/zeromq/index.d.ts +++ b/types/zeromq/index.d.ts @@ -1,6 +1,8 @@ -// Type definitions for zeromq 4.5 +// Type definitions for zeromq 4.6 // Project: https://github.com/zeromq/zeromq.js -// Definitions by: Dave McKeown , Erik Mavrinac +// Definitions by: Dave McKeown +// Erik Mavrinac +// Philippe D'Alva // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // // Forked from the DefinitelyTyped 'zmq' project originally created by Dave McKeown, @@ -149,9 +151,10 @@ export class Socket { * Each event receives the parameters: (eventValue, eventEndpointAddrress, error) * * @param timer interval in ms > 0 or Undefined for default + * @param numOfEvents The maximum number of events to read on each interval, default is 1, use 0 for reading all events * @return for chaining */ - monitor(interval?: number): Socket; + monitor(interval?: number, numOfEvents?: number): Socket; /** * Close the socket. @@ -237,3 +240,14 @@ export function createSocket(type: string, options?: any): Socket; * @return The public and secret portions of the key. */ export function curveKeypair(): CurveKeyPair; + +/** + * Connects a frontend socket to a backend socket. + * @param frontend The frontend socket to connect with the backend socket. + * Frontend socket should be a 'push', 'pull', 'xpub', 'router' or 'xrep' socket. + * @param backend The backend socket to connect with the frontend socket. + * Backend socket should be a 'pull', 'push', 'xsub', 'dealer' or 'xreq' socket. + * @param capture If defined, this socket will receive all messages from frontend and backend socket + * Capture socket should be a 'pub', 'dealer', 'push' or 'pair' socket. + */ +export function proxy(frontend: Socket, backend: Socket, capture ?: Socket): void; diff --git a/types/zeromq/tsconfig.json b/types/zeromq/tsconfig.json index ada0d8a1c7..8191817265 100644 --- a/types/zeromq/tsconfig.json +++ b/types/zeromq/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/zeromq/zeromq-tests.ts b/types/zeromq/zeromq-tests.ts index a49de9cc7d..466deaf4b7 100644 --- a/types/zeromq/zeromq-tests.ts +++ b/types/zeromq/zeromq-tests.ts @@ -37,6 +37,7 @@ function test5() { }); sock.monitor(); sock.monitor(10); + sock.monitor(10, 2); } function test6() { @@ -47,3 +48,13 @@ function test6() { sock.pause(); sock.resume(); } + +function test7() { + const xPubSocket = zeromq.socket('xpub'); + const xPSubSocket = zeromq.socket('xsub'); + + xPubSocket.bindSync(`tcp://127.0.0.1:3000`); + xPSubSocket.bindSync('tcp://127.0.0.1:3001'); + + zeromq.proxy(xPubSocket, xPSubSocket); +} diff --git a/types/zip.js/tsconfig.json b/types/zip.js/tsconfig.json index a655a790d8..ef85f2f086 100644 --- a/types/zip.js/tsconfig.json +++ b/types/zip.js/tsconfig.json @@ -15,7 +15,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/zipcodes/tsconfig.json b/types/zipcodes/tsconfig.json index ff98ed05f8..8c2869c026 100644 --- a/types/zipcodes/tsconfig.json +++ b/types/zipcodes/tsconfig.json @@ -1,23 +1,24 @@ { - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "zipcodes-tests.ts" - ] + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "zipcodes-tests.ts" + ] } \ No newline at end of file diff --git a/types/zipkin-context-cls/tsconfig.json b/types/zipkin-context-cls/tsconfig.json index 6cd3375b4f..5b2ca84bc2 100644 --- a/types/zipkin-context-cls/tsconfig.json +++ b/types/zipkin-context-cls/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "zipkin-context-cls-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/zipkin-instrumentation-express/tsconfig.json b/types/zipkin-instrumentation-express/tsconfig.json index 8038e5a2cd..16d973e846 100644 --- a/types/zipkin-instrumentation-express/tsconfig.json +++ b/types/zipkin-instrumentation-express/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "zipkin-instrumentation-express-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/zipkin-instrumentation-fetch/tsconfig.json b/types/zipkin-instrumentation-fetch/tsconfig.json index 1cf310ea24..c334eb552c 100644 --- a/types/zipkin-instrumentation-fetch/tsconfig.json +++ b/types/zipkin-instrumentation-fetch/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "zipkin-instrumentation-fetch-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/zipkin-transport-http/tsconfig.json b/types/zipkin-transport-http/tsconfig.json index 4f892dbef3..8d1b312d10 100644 --- a/types/zipkin-transport-http/tsconfig.json +++ b/types/zipkin-transport-http/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "zipkin-transport-http-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/zmq/tsconfig.json b/types/zmq/tsconfig.json index 03a35a4048..1224fce889 100644 --- a/types/zmq/tsconfig.json +++ b/types/zmq/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/zookeeper/tsconfig.json b/types/zookeeper/tsconfig.json index 281f393e23..c3c04d56cc 100644 --- a/types/zookeeper/tsconfig.json +++ b/types/zookeeper/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "zookeeper-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/zui/tsconfig.json b/types/zui/tsconfig.json index a2d866908a..32b9886589 100644 --- a/types/zui/tsconfig.json +++ b/types/zui/tsconfig.json @@ -16,7 +16,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", diff --git a/types/zxcvbn/tsconfig.json b/types/zxcvbn/tsconfig.json index 72bae94375..9361d06492 100644 --- a/types/zxcvbn/tsconfig.json +++ b/types/zxcvbn/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "zxcvbn-tests.ts" ] -} +} \ No newline at end of file