diff --git a/.travis.yml b/.travis.yml
index c8c468a417..07914721a9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,6 @@
language: node_js
node_js:
- - 6.9.2
+ - node
sudo: false
diff --git a/acorn/acorn-tests.ts b/acorn/acorn-tests.ts
index bda6844c84..72ca71d2f6 100644
--- a/acorn/acorn-tests.ts
+++ b/acorn/acorn-tests.ts
@@ -1,5 +1,3 @@
-///
-
import acorn = require('acorn');
import * as ESTree from 'estree';
diff --git a/amplify/amplify-tests.ts b/amplify/amplify-tests.ts
index edf2988122..b4f98ccd5b 100644
--- a/amplify/amplify-tests.ts
+++ b/amplify/amplify-tests.ts
@@ -1,6 +1,3 @@
-
-///
-
import amplify = require("amplify");
// Copied examples directly from AmplifyJs site
diff --git a/angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts b/angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts
index 4ff5b4cf19..1efc5d0391 100644
--- a/angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts
+++ b/angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts
@@ -1,6 +1,3 @@
-///
-///
-
var myApp = angular.module('testModule');
interface MyAppScope extends ng.IScope {
diff --git a/angular-dynamic-locale/angular-dynamic-locale-tests.ts b/angular-dynamic-locale/angular-dynamic-locale-tests.ts
index fd88de0d25..1e30aafd94 100644
--- a/angular-dynamic-locale/angular-dynamic-locale-tests.ts
+++ b/angular-dynamic-locale/angular-dynamic-locale-tests.ts
@@ -15,6 +15,9 @@ class LocaleTestController {
var newLocale = "mt"
tmhDynamicLocaleService.set(newLocale);
+
+ newLocale = "en";
+ tmhDynamicLocaleService.set(newLocale).then((value) => {});
}
}
diff --git a/angular-feature-flags/angular-feature-flags-tests.ts b/angular-feature-flags/angular-feature-flags-tests.ts
index 8ca17e4962..ac956dd657 100644
--- a/angular-feature-flags/angular-feature-flags-tests.ts
+++ b/angular-feature-flags/angular-feature-flags-tests.ts
@@ -1,5 +1,3 @@
-///
-
import * as angular from "angular";
let myApp = angular.module('myApp', ['feature-flags']);
diff --git a/angular-hotkeys/angular-hotkeys-tests.ts b/angular-hotkeys/angular-hotkeys-tests.ts
index 1f87ecefdf..c0bd9b974d 100644
--- a/angular-hotkeys/angular-hotkeys-tests.ts
+++ b/angular-hotkeys/angular-hotkeys-tests.ts
@@ -1,5 +1,3 @@
-///
-
var scope: ng.IScope;
var hotkeyProvider: ng.hotkeys.HotkeysProvider;
var hotkeyObj: ng.hotkeys.Hotkey;
diff --git a/angular-jwt/angular-jwt-tests.ts b/angular-jwt/angular-jwt-tests.ts
index b20b2eea9d..88b177ba74 100644
--- a/angular-jwt/angular-jwt-tests.ts
+++ b/angular-jwt/angular-jwt-tests.ts
@@ -1,5 +1,3 @@
-///
-
var app = angular.module("angular-jwt-tests", ["angular-jwt"]);
var $jwtHelper: ng.jwt.IJwtHelper;
diff --git a/angular-modal/angular-modal-tests.ts b/angular-modal/angular-modal-tests.ts
index 5be313840b..edb4d7e6ef 100644
--- a/angular-modal/angular-modal-tests.ts
+++ b/angular-modal/angular-modal-tests.ts
@@ -1,5 +1,3 @@
-///
-
var btfModal: angularModal.AngularModalFactory;
// Using template URL
diff --git a/angular-oauth2/angular-oauth2-tests.ts b/angular-oauth2/angular-oauth2-tests.ts
index 2b2328d5ee..042fe537aa 100644
--- a/angular-oauth2/angular-oauth2-tests.ts
+++ b/angular-oauth2/angular-oauth2-tests.ts
@@ -1,7 +1,7 @@
import * as angular from 'angular';
angular.module('angular-oauth2-test', ['angular-oauth2'])
- .config(['OAuthProvider', function(OAuthProvider:angular.oauth2.OAuthProvider){
+ .config(['OAuthProvider', (OAuthProvider: angular.oauth2.OAuthProvider) => {
OAuthProvider.configure({
baseUrl: 'https://api.website.com',
clientId: 'CLIENT_ID',
diff --git a/angular-oauth2/tsconfig.json b/angular-oauth2/tsconfig.json
index 717721bf79..e8a5250748 100644
--- a/angular-oauth2/tsconfig.json
+++ b/angular-oauth2/tsconfig.json
@@ -2,6 +2,10 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
+ "lib": [
+ "es6",
+ "dom"
+ ],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
diff --git a/angular/angular-tests.ts b/angular/angular-tests.ts
index 4e1f33ce47..b4e394aa37 100644
--- a/angular/angular-tests.ts
+++ b/angular/angular-tests.ts
@@ -587,7 +587,8 @@ namespace TestPromise {
function test_angular_forEach() {
const values: { [key: string]: string } = { name: 'misko', gender: 'male' };
const log: string[] = [];
- angular.forEach(values, (value, key) => {
+ angular.forEach(values, (value, key, obj) => {
+ obj[key] = value;
this.push(key + ': ' + value);
}, log);
// expect(log).toEqual(['name: misko', 'gender: male']);
diff --git a/angular/index.d.ts b/angular/index.d.ts
index bbbbdb021a..5d47751844 100644
--- a/angular/index.d.ts
+++ b/angular/index.d.ts
@@ -97,7 +97,7 @@ declare namespace angular {
* @param iterator Iterator function.
* @param context Object to become context (this) for the iterator function.
*/
- forEach(obj: T[], iterator: (value: T, key: number) => any, context?: any): any;
+ forEach(obj: T[], iterator: (value: T, key: number, obj: T[]) => void, context?: any): T[];
/**
* Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
*
@@ -107,7 +107,7 @@ declare namespace angular {
* @param iterator Iterator function.
* @param context Object to become context (this) for the iterator function.
*/
- forEach(obj: { [index: string]: T; }, iterator: (value: T, key: string) => any, context?: any): any;
+ forEach(obj: { [index: string]: T; }, iterator: (value: T, key: string, obj: { [index: string]: T; }) => void, context?: any): { [index: string]: T; };
/**
* Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
*
@@ -117,7 +117,7 @@ declare namespace angular {
* @param iterator Iterator function.
* @param context Object to become context (this) for the iterator function.
*/
- forEach(obj: any, iterator: (value: any, key: any) => any, context?: any): any;
+ forEach(obj: any, iterator: (value: any, key: any, obj: any) => void, context?: any): any;
fromJson(json: string): any;
identity(arg?: T): T;
@@ -1332,9 +1332,19 @@ declare namespace angular {
// see http://docs.angularjs.org/api/ng.$controller
// see http://docs.angularjs.org/api/ng.$controllerProvider
///////////////////////////////////////////////////////////////////////////
+
+ /**
+ * The minimal local definitions required by $controller(ctrl, locals) calls.
+ */
+ interface IControllerLocals {
+ $scope: ng.IScope;
+ $element: JQuery;
+ }
+
interface IControllerService {
// Although the documentation doesn't state this, locals are optional
(controllerConstructor: new (...args: any[]) => T, locals?: any, later?: boolean, ident?: string): T;
+ (controllerConstructor: Function, locals?: IControllerLocals, later?: boolean, ident?: string): T;
(controllerConstructor: Function, locals?: any, later?: boolean, ident?: string): T;
(controllerName: string, locals?: any, later?: boolean, ident?: string): T;
}
diff --git a/arcgis-js-api/index.d.ts b/arcgis-js-api/index.d.ts
index 87df41a8d8..293c5190e9 100644
--- a/arcgis-js-api/index.d.ts
+++ b/arcgis-js-api/index.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for ArcGIS API for JavaScript 4.2
+// Type definitions for ArcGIS API for JavaScript 4.3
// Project: http://js.arcgis.com
// Definitions by: Esri
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -32,14 +32,19 @@ declare namespace JSX {
declare namespace __esri {
export class Accessor {
+ constructor(obj?: any);
+
destroyed: boolean;
initialized: boolean;
declaredClass: string;
destroy(): void;
+
get(propertyName: string): T;
get(propertyName: string): any;
set(propertyName: string, value: T): this;
set(props: HashMap): this;
+ watch(path: string | string[], callback: WatchCallback, sync?: boolean): WatchHandle;
+
protected notifyChange(propertyName: string): void;
protected _get(propertyName: string): any;
protected _get(propertyName: string): T;
@@ -69,18 +74,521 @@ declare namespace __esri {
remove(): void;
}
+ export interface EachAlwaysResult {
+ promise: IPromise;
+ value: any;
+ error: any;
+ }
+
export interface PausableWatchHandle {
remove(): void;
pause(): void;
resume(): void;
}
+ export interface FeatureEditResult {
+ objectId: number;
+ error: any;
+ }
+
export interface AttributeParamValue {
attributeName: string;
parameterName: string;
value: string;
}
+ export interface DataWorkspace {
+ id: string;
+ name: string;
+ }
+
+ export interface GroupMembership {
+ id: number;
+ name: string;
+ }
+
+ export interface HoldType {
+ description: string;
+ id: number;
+ name: string;
+ }
+
+ export interface JobPriority {
+ description: string;
+ name: string;
+ value: number;
+ }
+
+ export interface JobQuery {
+ id: number;
+ name: string;
+ }
+
+ export interface JobStatus {
+ caption: string;
+ description: string;
+ id: number;
+ name: string;
+ }
+
+ export interface JobQueryContainer {
+ containers: JobQueryContainer[];
+ id: number;
+ name: string;
+ queries: JobQuery[];
+ }
+
+ export interface JobQueryDetails {
+ aliases: string[];
+ fields: string[];
+ id: number;
+ name: string;
+ orderBy: string;
+ tables: string[];
+ where: string;
+ }
+
+ export interface Privilege {
+ description: string;
+ id: number;
+ name: string;
+ }
+
+ export interface UserDetails {
+ lastName: string;
+ address: string;
+ faxNumber: string;
+ firstName: string;
+ fullName: string;
+ groups: GroupMembership[];
+ email: string;
+ phoneNumber: string;
+ privileges: Privilege[];
+ roomNumber: string;
+ userName: string;
+ userQueries: JobQueryContainer[];
+ zipCode: string;
+ }
+
+ export interface VersionInfo {
+ access: string;
+ name: string;
+ parent: string;
+ }
+
+ export interface WorkflowManagerServiceInfo {
+ jobPriorities: JobPriority[];
+ activityTypes: ActivityType[];
+ currentVersion: number;
+ dataWorkspaces: DataWorkspace[];
+ holdTypes: HoldType[];
+ configProperties: any;
+ jobStatuses: JobStatus[];
+ jobTypes: JobType[];
+ notificationTypes: NotificationType[];
+ privileges: Privilege[];
+ publicQueries: JobQueryContainer[];
+ }
+
+ export interface JobType {
+ category: string;
+ description: string;
+ id: string;
+ name: string;
+ state: string;
+ }
+
+ export interface JobTypeDetails {
+ defaultParentVersionName: string;
+ autoExecuteCreatedJobs: boolean;
+ category: string;
+ defaultAssignedTo: string;
+ defaultAssignedType: string;
+ defaultDataWorkspaceId: string;
+ defaultDescription: string;
+ defaultDueDate: string;
+ defaultJobDuration: number;
+ canDataWorkspaceChange: boolean;
+ defaultPriority: string;
+ defaultStartDate: Date;
+ description: string;
+ id: string;
+ jobNamingScheme: string;
+ jobVersionNamingScheme: string;
+ mxdNamingScheme: string;
+ name: string;
+ state: string;
+ }
+
+ export interface TableRelationship {
+ cardinality: string;
+ linkField: string;
+ tableAlias: string;
+ tableName: string;
+ }
+
+ export interface JobCreationParameters {
+ loi: Geometry;
+ assignedTo: string;
+ autoCommitWorkflow: boolean;
+ autoExecute: boolean;
+ dataWorkspaceId: string;
+ description: string;
+ dueDate: Date;
+ jobTypeId: number;
+ assignedType: string;
+ name: string;
+ numJobs: string;
+ ownedBy: string;
+ parentJobId: number;
+ parentVersion: string;
+ priority: number;
+ startDate: Date;
+ user: string;
+ }
+
+ export interface JobQueryParameters {
+ aliases: string;
+ fields: string;
+ orderBy: string;
+ tables: string;
+ where: string;
+ user: string;
+ }
+
+ export interface JobUpdateParameters {
+ ownedBy: string;
+ assignedTo: string;
+ dataWorkspaceId: string;
+ description: string;
+ dueDate: Date;
+ loi: Geometry;
+ jobId: number;
+ name: string;
+ assignedType: string;
+ parentJobId: number;
+ parentVersion: string;
+ percent: number;
+ priority: number;
+ startDate: Date;
+ status: number;
+ versionName: string;
+ user: string;
+ }
+
+ export interface AuxRecordDescription {
+ properties: any;
+ recordId: number;
+ tableName: string;
+ }
+
+ export interface ActivityType {
+ desription: string;
+ id: number;
+ message: string;
+ name: string;
+ }
+
+ export interface AuxRecordContainer {
+ records: AuxRecord;
+ relationshipType: string;
+ tableAlias: string;
+ tableName: string;
+ }
+
+ export interface JobTaskJobInfo {
+ name: string;
+ assignedTo: string;
+ childJobIds: number[];
+ createdBy: string;
+ createdDate: Date;
+ dataWorkspaceId: string;
+ description: string;
+ dueDate: Date;
+ endDate: Date;
+ id: number;
+ jobTypeId: number;
+ loi: Geometry;
+ assignedType: string;
+ ownedBy: string;
+ parentJobId: number;
+ parentVersion: string;
+ pendingDays: number;
+ percentageComplete: number;
+ priority: number;
+ stage: string;
+ startDate: Date;
+ status: number;
+ versionExists: boolean;
+ versionInfo: JobVersionInfo;
+ versionName: string;
+ }
+
+ export interface QueryResult {
+ fields: QueryFieldInfo[];
+ rows: string[];
+ }
+
+ export interface AuxRecord {
+ displayProperty: any;
+ id: number;
+ recordvalues: AuxRecordValue;
+ }
+
+ export interface AuxRecordValue {
+ filter: string;
+ alias: string;
+ data: any;
+ dataType: string;
+ displayOrder: number;
+ displayType: string;
+ domain: string;
+ canUpdate: boolean;
+ length: number;
+ name: string;
+ required: boolean;
+ tableListClass: string;
+ tableListDisplayField: string;
+ tableListStoreField: string;
+ userVisible: boolean;
+ }
+
+ export interface FieldValue {
+ description: string;
+ value: any;
+ }
+
+ export interface JobVersionInfo {
+ dataWorkspaceId: string;
+ name: string;
+ parent: string;
+ created: boolean;
+ owner: string;
+ }
+
+ export interface QueryFieldInfo {
+ alias: string;
+ length: string;
+ name: string;
+ type: string;
+ }
+
+ export interface JobAttachment {
+ filename: string;
+ folder: string;
+ id: number;
+ storageType: string;
+ }
+
+ export interface JobDependency {
+ depJobId: number;
+ depOnType: string;
+ depOnValue: string;
+ heldOnValue: number;
+ holdOnType: string;
+ id: number;
+ jobID: string;
+ }
+
+ export interface ChangeRule {
+ description: string;
+ evaluators: any[];
+ id: number;
+ name: string;
+ notifier: any;
+ summarize: boolean;
+ }
+
+ export interface DataSetEvaluator {
+ dataSetConfigurations: DatasetConfiguration[];
+ name: string;
+ type: string;
+ }
+
+ export interface AOIEvaluator {
+ aoi: Polygon;
+ inverse: boolean;
+ name: string;
+ relation: string;
+ type: string;
+ useJobAOI: boolean;
+ }
+
+ export interface DatasetConfiguration {
+ changeCondition: number;
+ changeFields: string;
+ dataset: string;
+ dataWorkspaceId: string;
+ name: string;
+ whereConditions: WhereCondition[];
+ }
+
+ export interface EmailNotifier {
+ attachJobAttachments: boolean;
+ message: string;
+ name: string;
+ senderEmail: string;
+ senderName: string;
+ subject: string;
+ subscribers: string[];
+ type: string;
+ }
+
+ export interface WhereCondition {
+ compareValue: any;
+ field: string;
+ operator: string;
+ }
+
+ export interface NotificationType {
+ attachJobAttachments: boolean;
+ id: number;
+ message: string;
+ senderEmail: string;
+ senderName: string;
+ subject: string;
+ subscribers: string[];
+ type: string;
+ }
+
+ export interface ChangeRuleMatch {
+ changeTime: Date;
+ changeType: string;
+ dataset: string;
+ dataWorkspaceId: string;
+ id: string;
+ jobID: string;
+ ruleID: string;
+ }
+
+ export interface ReportDataGroup {
+ aggregateLabel: string;
+ aggregateValue: string;
+ row: string[];
+ value: string;
+ }
+
+ export interface ReportData {
+ columns: string[];
+ description: string;
+ groups: ReportDataGroup[];
+ title: string;
+ }
+
+ export interface Report {
+ description: string;
+ hierarchy: string;
+ id: number;
+ name: string;
+ title: string;
+ }
+
+ export interface ExecuteInfo {
+ conflicts: WorkflowConflicts;
+ errorCode: number;
+ errorDescription: string;
+ executionResult: string;
+ hasConflicts: boolean;
+ hasReturnCode: boolean;
+ jobID: number;
+ returnCode: number;
+ stepID: number;
+ threwError: boolean;
+ }
+
+ export interface Step {
+ hasBeenExecuted: boolean;
+ assignedTo: string;
+ async: boolean;
+ autoRun: boolean;
+ canSkip: boolean;
+ canSpawnConcurrency: boolean;
+ commonId: number;
+ defaultPercentComplete: number;
+ assignedType: string;
+ hasBeenStarted: boolean;
+ id: number;
+ name: string;
+ selfCheck: boolean;
+ statusId: number;
+ stepPercentComplete: number;
+ notificationType: string;
+ stepType: StepType;
+ }
+
+ export interface StepType {
+ program: string;
+ arguments: string;
+ executionType: string;
+ id: number;
+ name: string;
+ description: string;
+ stepDescriptionLink: string;
+ stepDescriptionType: string;
+ stepIndicatorType: string;
+ supportedPlatform: string;
+ visible: boolean;
+ }
+
+ export interface WorkflowDisplayDetails {
+ annotations: WorkflowAnnotationDisplayDetails[];
+ paths: WorkflowPathDisplayDetails[];
+ steps: WorkflowStepDisplayDetails[];
+ }
+
+ export interface WorkflowOption {
+ returnCode: number;
+ steps: WorkflowStepInfo[];
+ }
+
+ export interface WorkflowStepInfo {
+ id: number;
+ name: string;
+ }
+
+ export interface WorkflowAnnotationDisplayDetails {
+ centerX: number;
+ centerY: number;
+ fillColor: any;
+ height: number;
+ label: string;
+ labelColor: any;
+ OutlineColor: any;
+ width: number;
+ }
+
+ export interface WorkflowConflicts {
+ jobID: number;
+ options: WorkflowOption[];
+ spawnsConcurrency: boolean;
+ stepId: number;
+ }
+
+ export interface WorkflowPathDisplayDetails {
+ destStepId: number;
+ sourceStepID: number;
+ label: string;
+ labelColor: any;
+ labelX: number;
+ labelY: number;
+ lineColor: any;
+ pathObject: any;
+ }
+
+ export interface WorkflowStepDisplayDetails {
+ labelColor: any;
+ centerX: number;
+ fillColor: any;
+ height: number;
+ label: string;
+ centerY: number;
+ OutlineColor: any;
+ shape: string;
+ stepId: number;
+ stepType: string;
+ width: number;
+ }
+
export interface ExternalRenderer {
setup(): void;
render(): void;
@@ -139,26 +647,6 @@ declare namespace __esri {
suggestionTemplate: string;
}
- export interface SearchViewModelLocatorSource {
- categories: string[];
- countryCode: string;
- localSearchOptions: any;
- locationToAddressDistance: number;
- searchTemplate: string;
- locator: Locator;
- singleLineFieldName: string;
- }
-
- export interface SearchViewModelFeatureLayerSource {
- displayField: string;
- exactMatch: boolean;
- featureLayer: FeatureLayer;
- searchFields: string[];
- searchQueryParams: any;
- suggestQueryParams: any;
- suggestionTemplate: string;
- }
-
export type GetHeader = (headerName: string) => string;
export type WatchCallback = (newValue: any, oldValue: any, propertyName: string, target: Accessor) => void;
@@ -282,11 +770,33 @@ declare namespace __esri {
offset?: number;
}
+ export interface FeatureLayerApplyEditsEdits {
+ addFeatures?: Graphic[];
+ updateFeatures?: Graphic[];
+ deleteFeatures?: Graphic[] | any[];
+ }
+
+ export interface FeatureLayerCapabilities {
+ operations: FeatureLayerCapabilitiesOperations;
+ }
+
+ export interface FeatureLayerCapabilitiesOperations {
+ supportsAdd: boolean;
+ supportsDelete: boolean;
+ supportsUpdate: boolean;
+ supportsEditing: boolean;
+ supportsQuery: boolean;
+ }
+
export interface FeatureLayerElevationInfo {
mode: string;
offset?: number;
}
+ export interface FeatureLayerGetFieldDomainOptions {
+ feature: Graphic;
+ }
+
export interface GraphicsLayerElevationInfo {
mode: string;
offset?: number;
@@ -306,6 +816,21 @@ declare namespace __esri {
offset?: number;
}
+ export interface StreamLayerFilter {
+ geometry: Extent;
+ where: string;
+ }
+
+ export interface StreamLayerPurgeOptions {
+ displayCount: number;
+ age: number;
+ }
+
+ export interface StreamLayerUpdateFilterFilterChanges {
+ geometry: Extent;
+ where: string;
+ }
+
export interface VectorTileLayerCurrentStyleInfo {
serviceUrl: string;
styleUrl: string;
@@ -382,6 +907,14 @@ declare namespace __esri {
label: string;
}
+ export interface PointCloudRendererPointSizeAlgorithm {
+ type: string;
+ useRealWorldSymbolSizes: boolean;
+ size: number;
+ scaleFactor: number;
+ minSize: number;
+ }
+
export interface PointCloudClassBreaksRendererColorClassBreakInfos {
minValue: number;
maxValue: number;
@@ -422,8 +955,8 @@ declare namespace __esri {
}
export interface Symbol3DStyleOrigin {
- styleName: string;
- styleUrl: string;
+ styleName?: string;
+ styleUrl?: string;
name: string;
}
@@ -508,6 +1041,294 @@ declare namespace __esri {
tolerance: number;
}
+ export interface ConfigurationTaskGetDataWorkspaceDetailsParams {
+ dataWorkspaceId: string;
+ user: string;
+ }
+
+ export interface ConfigurationTaskGetUserJobQueryDetailsParams {
+ queryId: number;
+ user: string;
+ }
+
+ export interface JobTaskAddEmbeddedAttachmentParams {
+ jobId: number;
+ form: any;
+ user: string;
+ }
+
+ export interface JobTaskAddLinkedAttachmentParams {
+ jobId: number;
+ attachmentType: number;
+ path: string;
+ user: string;
+ }
+
+ export interface JobTaskAddLinkedRecordParams {
+ jobId: number;
+ tableName: string;
+ user: string;
+ }
+
+ export interface JobTaskAssignJobsParams {
+ jobIds: number[];
+ assignedType: string;
+ assignedTo: string;
+ user: string;
+ }
+
+ export interface JobTaskCloseJobsParams {
+ jobIds: number[];
+ user: string;
+ }
+
+ export interface JobTaskCreateDependencyParams {
+ jobId: number;
+ heldOnType: string;
+ heldOnValue: number;
+ depJobId: number;
+ depOnType: string;
+ depOnValue: number;
+ user: string;
+ }
+
+ export interface JobTaskCreateHoldParams {
+ jobId: number;
+ holdTypeId: number;
+ comments: string;
+ user: string;
+ }
+
+ export interface JobTaskCreateJobVersionParams {
+ jobId: number;
+ name: string;
+ parent: string;
+ user: string;
+ }
+
+ export interface JobTaskDeleteAttachmentParams {
+ jobId: number;
+ attachmentId: number;
+ user: string;
+ }
+
+ export interface JobTaskDeleteDependencyParams {
+ jobId: number;
+ dependencyId: number;
+ user: string;
+ }
+
+ export interface JobTaskDeleteJobsParams {
+ jobIds: number[];
+ deleteHistory?: boolean;
+ user: string;
+ }
+
+ export interface JobTaskDeleteLinkedRecordParams {
+ jobId: number;
+ tableName: string;
+ recordId: number;
+ user: string;
+ }
+
+ export interface JobTaskGetAttachmentContentUrlParams {
+ jobId: number;
+ attachmentId: number;
+ }
+
+ export interface JobTaskListFieldValuesParams {
+ jobId: number;
+ tableName: string;
+ field: string;
+ user: string;
+ }
+
+ export interface JobTaskListMultiLevelFieldValuesParams {
+ field: string;
+ previousSelectedValues: string[];
+ user: string;
+ }
+
+ export interface JobTaskLogActionParams {
+ jobId: number;
+ activityTypeId: number;
+ comments: string;
+ user: string;
+ }
+
+ export interface JobTaskQueryJobsParams {
+ queryId: number;
+ user: string;
+ }
+
+ export interface JobTaskQueryMultiLevelSelectedValuesParams {
+ field: string;
+ user: string;
+ }
+
+ export interface JobTaskReleaseHoldParams {
+ jobId: number;
+ holdId: number;
+ }
+
+ export interface JobTaskReopenClosedJobsParams {
+ jobIds: number[];
+ user: string;
+ }
+
+ export interface JobTaskSearchJobsParams {
+ text: string;
+ user: string;
+ }
+
+ export interface JobTaskUnassignJobsParams {
+ jobIds: number[];
+ user: string;
+ }
+
+ export interface JobTaskUpdateNotesParams {
+ jobId: number;
+ notes: string;
+ user: string;
+ }
+
+ export interface JobTaskUpdateRecordParams {
+ jobId: number;
+ record: AuxRecordDescription;
+ user: string;
+ }
+
+ export interface NotificationTaskAddChangeRuleParams {
+ rule: ChangeRule;
+ user: string;
+ }
+
+ export interface NotificationTaskDeleteChangeRuleParams {
+ ruleId: string;
+ user: string;
+ }
+
+ export interface NotificationTaskNotifySessionParams {
+ sessionid: string;
+ deleteAfter: boolean;
+ user: string;
+ }
+
+ export interface NotificationTaskQueryChangeRulesParams {
+ name: string;
+ description: string;
+ searchType: string;
+ user: string;
+ }
+
+ export interface NotificationTaskRunSpatialNotificationOnHistoryParams {
+ dataWorkspaceId: string;
+ from: Date;
+ to: Date;
+ logMatches: boolean;
+ send: boolean;
+ user: string;
+ }
+
+ export interface NotificationTaskSendNotificationParams {
+ jobId: number;
+ notificationType: string;
+ user: string;
+ }
+
+ export interface NotificationTaskSubscribeToNotificationParams {
+ notificationTypeId: number;
+ email: string;
+ user: string;
+ }
+
+ export interface NotificationTaskUnsubscribeFromNotificationParams {
+ notificationTypeId: number;
+ email: string;
+ user: string;
+ }
+
+ export interface ReportTaskGenerateReportParams {
+ reportId: number;
+ user: string;
+ }
+
+ export interface ReportTaskGetReportContentUrlParams {
+ reportId: number;
+ user: number;
+ }
+
+ export interface ReportTaskGetReportDataParams {
+ reportId: number;
+ user: string;
+ }
+
+ export interface TokenTaskParseTokensParams {
+ jobId: any;
+ stringToParse: string;
+ user: string;
+ }
+
+ export interface WorkflowTaskCanRunStepParams {
+ jobId: number;
+ stepId: number;
+ user: string;
+ }
+
+ export interface WorkflowTaskExecuteStepsParams {
+ jobId: number;
+ stepIds: number[];
+ auto: boolean;
+ user: string;
+ }
+
+ export interface WorkflowTaskGetStepDescriptionParams {
+ jobId: number;
+ stepId: number;
+ }
+
+ export interface WorkflowTaskGetStepFileUrlParams {
+ jobId: number;
+ stepId: number;
+ }
+
+ export interface WorkflowTaskGetStepParams {
+ jobId: number;
+ stepId: number;
+ }
+
+ export interface WorkflowTaskMarkStepsAsDoneParams {
+ jobId: number;
+ stepIds: number[];
+ user: string;
+ }
+
+ export interface WorkflowTaskMoveToNextStepParams {
+ jobId: number;
+ stepId: number;
+ returnCode: number;
+ user: string;
+ }
+
+ export interface WorkflowTaskRecreateWorkflowParams {
+ jobId: number;
+ user: string;
+ }
+
+ export interface WorkflowTaskResolveConflictParams {
+ jobId: number;
+ stepId: number;
+ optionReturnCode: number;
+ optionStepIds: number[];
+ user: string;
+ }
+
+ export interface WorkflowTaskSetCurrentStepParams {
+ jobId: number;
+ stepId: number;
+ user: string;
+ }
+
export interface MapViewConstraints {
lods?: LOD[];
minScale?: number;
@@ -804,6 +1625,17 @@ declare namespace __esri {
urlPrefix: string;
}
+ export interface configWorkers {
+ loaderConfig: configWorkersLoaderConfig;
+ }
+
+ export interface configWorkersLoaderConfig {
+ has: any;
+ paths: any;
+ map: any;
+ packages: any[];
+ }
+
export interface requestEsriRequestOptions {
callbackParamName?: string;
query?: any;
@@ -827,6 +1659,7 @@ declare namespace __esri {
cast?: Function;
readOnly?: boolean;
aliasOf?: string;
+ value?: any;
}
export interface colorCreateContinuousRendererParams {
@@ -895,21 +1728,22 @@ declare namespace __esri {
title: string;
}
- export interface sizeCreateVisualVariableParams {
+ export interface sizeCreateVisualVariablesParams {
layer: FeatureLayer | SceneLayer;
field: string;
normalizationField?: string;
basemap?: string | Basemap;
sizeScheme?: any | any | any;
- legendOptions?: sizeCreateVisualVariableParamsLegendOptions;
+ legendOptions?: sizeCreateVisualVariablesParamsLegendOptions;
statistics?: any;
minValue?: number;
maxValue?: number;
view?: SceneView;
worldScale?: boolean;
+ axis?: boolean;
}
- export interface sizeCreateVisualVariableParamsLegendOptions {
+ export interface sizeCreateVisualVariablesParamsLegendOptions {
title: string;
}
@@ -972,6 +1806,7 @@ declare namespace __esri {
}
export interface univariateColorSizeCreateVisualVariablesParamsSizeOptions {
+ axis?: boolean;
sizeScheme?: any | any | any;
legendOptions?: univariateColorSizeCreateVisualVariablesParamsSizeOptionsLegendOptions;
}
@@ -1433,6 +2268,7 @@ declare namespace __esri {
expand(factor: number): Extent;
intersection(extent: Extent): Extent;
intersects(geometry: Geometry): boolean;
+ normalize(): Extent[];
offset(dx: number, dy: number, dz: number): Extent;
union(extent: Extent): Extent;
}
@@ -1519,6 +2355,7 @@ declare namespace __esri {
copy(other: Point): void;
distance(other: Point): number;
equals(point: Point): boolean;
+ normalize(): Point;
}
interface PointConstructor {
@@ -1556,6 +2393,9 @@ declare namespace __esri {
interface PolygonConstructor {
new(properties?: PolygonProperties): Polygon;
+
+ fromExtent(extent: Extent): Polygon;
+
fromJSON(json: any): Polygon;
}
@@ -1873,6 +2713,7 @@ declare namespace __esri {
}
interface FeatureLayer extends Layer, PortalLayer, ScaleRangeLayer {
+ capabilities: FeatureLayerCapabilities;
copyright: string;
definitionExpression: string;
elevationInfo: FeatureLayerElevationInfo;
@@ -1898,7 +2739,9 @@ declare namespace __esri {
url: string;
version: number;
+ applyEdits(edits: FeatureLayerApplyEditsEdits): IPromise;
createQuery(): Query;
+ getFieldDomain(fieldName: string, options?: FeatureLayerGetFieldDomainOptions): Domain;
queryExtent(params?: Query): IPromise;
queryFeatureCount(params?: Query): IPromise;
queryFeatures(params?: Query): IPromise;
@@ -1914,6 +2757,7 @@ declare namespace __esri {
export const FeatureLayer: FeatureLayerConstructor;
interface FeatureLayerProperties extends LayerProperties, PortalLayerProperties, ScaleRangeLayerProperties {
+ capabilities?: FeatureLayerCapabilities;
copyright?: string;
definitionExpression?: string;
elevationInfo?: FeatureLayerElevationInfo;
@@ -1940,6 +2784,26 @@ declare namespace __esri {
version?: number;
}
+ interface GeoRSSLayer extends Layer {
+ lineSymbol: SimpleLineSymbol;
+ pointSymbol: PictureMarkerSymbol;
+ polygonSymbol: SimpleFillSymbol;
+ url: string;
+ }
+
+ interface GeoRSSLayerConstructor {
+ new(properties?: GeoRSSLayerProperties): GeoRSSLayer;
+ }
+
+ export const GeoRSSLayer: GeoRSSLayerConstructor;
+
+ interface GeoRSSLayerProperties extends LayerProperties {
+ lineSymbol?: SimpleLineSymbolProperties;
+ pointSymbol?: PictureMarkerSymbolProperties;
+ polygonSymbol?: SimpleFillSymbolProperties;
+ url?: string;
+ }
+
interface GraphicsLayer extends Layer, ScaleRangeLayer {
elevationInfo: GraphicsLayerElevationInfo;
graphics: Collection;
@@ -2061,6 +2925,7 @@ declare namespace __esri {
}
interface SceneLayer extends Layer, SceneService, PortalLayer {
+ definitionExpression: string;
elevationInfo: SceneLayerElevationInfo;
fields: Field[];
geometryType: string;
@@ -2072,6 +2937,7 @@ declare namespace __esri {
popupTemplate: PopupTemplate;
renderer: Renderer;
+ createQuery(): Query;
getFieldUsageInfo(fieldName: string): any;
queryExtent(params?: Query): IPromise;
queryFeatureCount(params?: Query): IPromise;
@@ -2088,6 +2954,7 @@ declare namespace __esri {
export const SceneLayer: SceneLayerConstructor;
interface SceneLayerProperties extends LayerProperties, SceneServiceProperties, PortalLayerProperties {
+ definitionExpression?: string;
elevationInfo?: SceneLayerElevationInfo;
fields?: FieldProperties[];
geometryType?: string;
@@ -2101,9 +2968,12 @@ declare namespace __esri {
}
interface StreamLayer extends FeatureLayer {
+ filter: StreamLayerFilter;
geometryDefinition: Extent;
maximumTrackPoints: number;
- purgeOptions: any;
+ purgeOptions: StreamLayerPurgeOptions;
+
+ updateFilter(filterChanges: StreamLayerUpdateFilterFilterChanges): IPromise;
}
interface StreamLayerConstructor {
@@ -2115,9 +2985,10 @@ declare namespace __esri {
export const StreamLayer: StreamLayerConstructor;
interface StreamLayerProperties extends FeatureLayerProperties {
+ filter?: StreamLayerFilter;
geometryDefinition?: ExtentProperties;
maximumTrackPoints?: number;
- purgeOptions?: any;
+ purgeOptions?: StreamLayerPurgeOptions;
}
interface UnknownLayer extends Layer {
@@ -2199,13 +3070,20 @@ declare namespace __esri {
}
interface CodedValueDomainConstructor {
- new(properties?: any): CodedValueDomain;
+ new(properties?: CodedValueDomainProperties): CodedValueDomain;
+
getName(code: string | number): string;
+
+ fromJSON(json: any): CodedValueDomain;
}
export const CodedValueDomain: CodedValueDomainConstructor;
+ interface CodedValueDomainProperties extends DomainProperties {
+ codedValues?: CodedValueDomainCodedValues[];
+ }
+
interface DimensionalDefinition {
dimensionName: string;
isSlice: boolean;
@@ -2221,20 +3099,25 @@ declare namespace __esri {
export const DimensionalDefinition: DimensionalDefinitionConstructor;
- interface Domain {
+ interface Domain extends Accessor, JSONSupport {
name: string;
type: string;
-
- toJSON(): any;
}
interface DomainConstructor {
- new(): Domain;
+ new(properties?: DomainProperties): Domain;
+
+ fromJSON(json: any): Domain;
}
export const Domain: DomainConstructor;
- interface Field extends JSONSupport {
+ interface DomainProperties {
+ name?: string;
+ type?: string;
+ }
+
+ interface Field extends Accessor, JSONSupport {
alias: string;
domain: Domain;
editable: boolean;
@@ -2254,7 +3137,7 @@ declare namespace __esri {
interface FieldProperties {
alias?: string;
- domain?: Domain;
+ domain?: DomainProperties;
editable?: boolean;
length?: number;
name?: string;
@@ -2262,7 +3145,7 @@ declare namespace __esri {
type?: string;
}
- interface ImageParameters {
+ interface ImageParameters extends Accessor {
dpi: number;
extent: Extent;
format: string;
@@ -2278,20 +3161,39 @@ declare namespace __esri {
}
interface ImageParametersConstructor {
- new(properties?: any): ImageParameters;
+ new(properties?: ImageParametersProperties): ImageParameters;
}
export const ImageParameters: ImageParametersConstructor;
+ interface ImageParametersProperties {
+ dpi?: number;
+ extent?: ExtentProperties;
+ format?: string;
+ height?: number;
+ imageSpatialReference?: SpatialReferenceProperties;
+ layerDefinitions?: string[];
+ layerIds?: number[];
+ layerOption?: string;
+ transparent?: boolean;
+ width?: number;
+ }
+
interface InheritedDomain extends Domain {
}
interface InheritedDomainConstructor {
- new(): InheritedDomain;
+ new(properties?: InheritedDomainProperties): InheritedDomain;
+
+ fromJSON(json: any): InheritedDomain;
}
export const InheritedDomain: InheritedDomainConstructor;
+ interface InheritedDomainProperties extends DomainProperties {
+
+ }
+
interface LabelClass extends Accessor, JSONSupport {
labelExpression: string;
labelExpressionInfo: LabelClassLabelExpressionInfo;
@@ -2301,6 +3203,8 @@ declare namespace __esri {
symbol: TextSymbol | LabelSymbol3D;
useCodedValues: boolean;
where: string;
+
+ clone(): LabelClass;
}
interface LabelClassConstructor {
@@ -2372,7 +3276,7 @@ declare namespace __esri {
width?: number;
}
- interface MosaicRule extends JSONSupport {
+ interface MosaicRule extends Accessor, JSONSupport {
ascending: boolean;
lockRasterIds: number[];
method: string;
@@ -2406,7 +3310,7 @@ declare namespace __esri {
where?: string;
}
- interface PixelBlock {
+ interface PixelBlock extends Accessor {
height: number;
mask: number[];
pixels: number[][];
@@ -2421,23 +3325,39 @@ declare namespace __esri {
}
interface PixelBlockConstructor {
- new(properties?: any): PixelBlock;
+ new(properties?: PixelBlockProperties): PixelBlock;
}
export const PixelBlock: PixelBlockConstructor;
+ interface PixelBlockProperties {
+ height?: number;
+ mask?: number[];
+ pixels?: number[][];
+ pixelType?: string;
+ statistics?: PixelBlockStatistics[];
+ width?: number;
+ }
+
interface RangeDomain extends Domain {
maxValue: number;
minValue: number;
}
interface RangeDomainConstructor {
- new(): RangeDomain;
+ new(properties?: RangeDomainProperties): RangeDomain;
+
+ fromJSON(json: any): RangeDomain;
}
export const RangeDomain: RangeDomainConstructor;
- interface RasterFunction extends JSONSupport {
+ interface RangeDomainProperties extends DomainProperties {
+ maxValue?: number;
+ minValue?: number;
+ }
+
+ interface RasterFunction extends Accessor, JSONSupport {
functionArguments: any;
functionName: string;
outputPixelType: string;
@@ -2875,6 +3795,7 @@ declare namespace __esri {
role: string;
roleId: string;
thumbnailUrl: string;
+ units: string;
userContentUrl: string;
username: string;
@@ -2907,6 +3828,7 @@ declare namespace __esri {
role?: string;
roleId?: string;
thumbnailUrl?: string;
+ units?: string;
userContentUrl?: string;
username?: string;
}
@@ -3005,7 +3927,7 @@ declare namespace __esri {
valueExpression: string;
valueExpressionTitle: string;
- addUniqueValueInfo(valueOrInfo: string | any, symbol: Symbol): void;
+ addUniqueValueInfo(valueOrInfo: string | any, symbol?: Symbol): void;
clone(): UniqueValueRenderer;
getUniqueValueInfo(graphic: Graphic): any;
removeUniqueValueInfo(value: string): void;
@@ -3034,6 +3956,7 @@ declare namespace __esri {
}
interface PointCloudRenderer extends Accessor, JSONSupport {
+ pointSizeAlgorithm: PointCloudRendererPointSizeAlgorithm;
pointsPerInch: number;
}
@@ -3046,6 +3969,7 @@ declare namespace __esri {
export const PointCloudRenderer: PointCloudRendererConstructor;
interface PointCloudRendererProperties {
+ pointSizeAlgorithm?: PointCloudRendererPointSizeAlgorithm;
pointsPerInch?: number;
}
@@ -3133,6 +4057,30 @@ declare namespace __esri {
type?: string;
}
+ interface Action extends Accessor {
+ className: string;
+ id: string;
+ image: string;
+ title: string;
+ visible: boolean;
+
+ clone(): Action;
+ }
+
+ interface ActionConstructor {
+ new(properties?: ActionProperties): Action;
+ }
+
+ export const Action: ActionConstructor;
+
+ interface ActionProperties {
+ className?: string;
+ id?: string;
+ image?: string;
+ title?: string;
+ visible?: boolean;
+ }
+
interface ExtrudeSymbol3DLayer extends Symbol3DLayer {
size: number;
@@ -3817,8 +4765,6 @@ declare namespace __esri {
}
interface QueryTask extends Task {
- gdbVersion: string;
-
execute(params: Query, requestOptions?: any): IPromise;
executeForCount(params: Query, requestOptions?: any): IPromise;
executeForExtent(params: Query, requestOptions?: any): IPromise;
@@ -3833,7 +4779,7 @@ declare namespace __esri {
export const QueryTask: QueryTaskConstructor;
interface QueryTaskProperties extends TaskProperties {
- gdbVersion?: string;
+
}
interface PrintTask extends Task {
@@ -4276,6 +5222,7 @@ declare namespace __esri {
foundFieldName: string;
layerId: number;
layerName: string;
+ value: void;
}
interface FindResultConstructor {
@@ -4292,6 +5239,7 @@ declare namespace __esri {
foundFieldName?: string;
layerId?: number;
layerName?: string;
+ value?: void;
}
interface GeneralizeParameters extends Accessor {
@@ -5042,6 +5990,173 @@ declare namespace __esri {
trimExtendTo?: PolylineProperties;
}
+ interface ConfigurationTask extends Task {
+ url: string;
+
+ getAllGroups(requestOptions?: any): IPromise;
+ getAllUsers(requestOptions?: any): IPromise;
+ getDataWorkspaceDetails(params: ConfigurationTaskGetDataWorkspaceDetailsParams, requestOptions?: any): IPromise;
+ getGroup(groupId: number, requestOptions?: any): IPromise;
+ getJobTypeDetails(jobTypeId: number, requestOptions?: any): IPromise;
+ getPublicJobQueryDetails(queryId: number, requestOptions?: any): IPromise;
+ getServiceInfo(requestOptions?: any): IPromise;
+ getTableRelationshipsDetails(requestOptions?: any): IPromise;
+ getUser(user: string, requestOptions?: any): IPromise;
+ getUserJobQueryDetails(params: ConfigurationTaskGetUserJobQueryDetailsParams, requestOptions?: any): IPromise;
+ getVisibleJobTypes(user: string, requestOptions?: any): IPromise;
+ }
+
+ interface ConfigurationTaskConstructor {
+ new(properties?: ConfigurationTaskProperties): ConfigurationTask;
+ }
+
+ export const ConfigurationTask: ConfigurationTaskConstructor;
+
+ interface ConfigurationTaskProperties extends TaskProperties {
+ url?: string;
+ }
+
+ interface JobTask extends Task {
+ url: string;
+
+ addEmbeddedAttachment(params: JobTaskAddEmbeddedAttachmentParams, requestOptions?: any): IPromise;
+ addLinkedAttachment(params: JobTaskAddLinkedAttachmentParams, requestOptions?: any): IPromise;
+ addLinkedRecord(params: JobTaskAddLinkedRecordParams, requestOptions?: any): IPromise;
+ assignJobs(params: JobTaskAssignJobsParams, requestOptions?: any): IPromise;
+ closeJobs(params: JobTaskCloseJobsParams, requestOptions?: any): IPromise;
+ createDependency(params: JobTaskCreateDependencyParams, requestOptions?: any): IPromise;
+ createHold(params: JobTaskCreateHoldParams, requestOptions?: any): IPromise;
+ createJobs(params: JobCreationParameters, requestOptions?: any): IPromise;
+ createJobVersion(params: JobTaskCreateJobVersionParams, requestOptions?: any): IPromise;
+ deleteAttachment(params: JobTaskDeleteAttachmentParams, requestOptions?: any): IPromise;
+ deleteDependency(params: JobTaskDeleteDependencyParams, requestOptions?: any): IPromise;
+ deleteJobs(params: JobTaskDeleteJobsParams, requestOptions?: any): IPromise;
+ deleteLinkedRecord(params: JobTaskDeleteLinkedRecordParams, requestOptions?: any): IPromise;
+ getActivityLog(jobId: number, requestOptions?: any): IPromise;
+ getAttachmentContentUrl(params: JobTaskGetAttachmentContentUrlParams): string;
+ getAttachments(jobId: number, requestOptions?: any): IPromise;
+ getDependencies(jobId: number, requestOptions?: any): IPromise;
+ getExtendedProperties(jobId: number, requestOptions?: any): IPromise;
+ getHolds(jobId: number, requestOptions?: any): IPromise;
+ getJob(jobId: number, requestOptions?: any): IPromise;
+ getJobIds(requestOptions?: any): IPromise;
+ getNotes(jobId: number, requestOptions?: any): IPromise;
+ listFieldValues(params: JobTaskListFieldValuesParams, requestOptions?: any): IPromise;
+ listMultiLevelFieldValues(params: JobTaskListMultiLevelFieldValuesParams, requestOptions?: any): IPromise;
+ logAction(params: JobTaskLogActionParams, requestOptions?: any): IPromise;
+ queryJobs(params: JobTaskQueryJobsParams, requestOptions?: any): IPromise;
+ queryJobsAdHoc(params: JobQueryParameters, requestOptions?: any): IPromise;
+ queryMultiLevelSelectedValues(params: JobTaskQueryMultiLevelSelectedValuesParams, requestOptions?: any): IPromise;
+ releaseHold(params: JobTaskReleaseHoldParams, requestOptions?: any): IPromise;
+ reopenClosedJobs(params: JobTaskReopenClosedJobsParams, requestOptions?: any): IPromise;
+ searchJobs(params: JobTaskSearchJobsParams, requestOptions?: any): IPromise;
+ unassignJobs(params: JobTaskUnassignJobsParams, requestOptions?: any): IPromise;
+ updateJob(params: JobUpdateParameters, requestOptions?: any): IPromise;
+ updateNotes(params: JobTaskUpdateNotesParams, requestOptions?: any): IPromise;
+ updateRecord(params: JobTaskUpdateRecordParams, requestOptions?: any): IPromise;
+ }
+
+ interface JobTaskConstructor {
+ new(properties?: JobTaskProperties): JobTask;
+ }
+
+ export const JobTask: JobTaskConstructor;
+
+ interface JobTaskProperties extends TaskProperties {
+ url?: string;
+ }
+
+ interface NotificationTask extends Task {
+ url: string;
+
+ addChangeRule(params: NotificationTaskAddChangeRuleParams, requestOptions?: any): IPromise;
+ deleteChangeRule(params: NotificationTaskDeleteChangeRuleParams, requestOptions?: any): IPromise;
+ getAllChangeRules(requestOptions?: any): IPromise;
+ getChangeRule(ruleId: string, requestOptions?: any): IPromise;
+ getChangeRuleMatch(matchId: string, requestOptions?: any): IPromise;
+ getDatabaseTime(dataWorkspaceId: string, requestOptions?: any): IPromise;
+ getSessionMatches(sessionId: string, requestOptions?: any): IPromise;
+ notifySession(params: NotificationTaskNotifySessionParams, requestOptions?: any): IPromise;
+ queryChangeRules(params: NotificationTaskQueryChangeRulesParams, requestOptions?: any): IPromise;
+ runSpatialNotificationOnHistory(params: NotificationTaskRunSpatialNotificationOnHistoryParams, requestOptions?: any): IPromise;
+ sendNotification(params: NotificationTaskSendNotificationParams, requestOptions?: any): IPromise;
+ subscribeToNotification(params: NotificationTaskSubscribeToNotificationParams, requestOptions?: any): IPromise;
+ unsubscribeFromNotification(params: NotificationTaskUnsubscribeFromNotificationParams, requestOptions?: any): IPromise;
+ }
+
+ interface NotificationTaskConstructor {
+ new(properties?: NotificationTaskProperties): NotificationTask;
+ }
+
+ export const NotificationTask: NotificationTaskConstructor;
+
+ interface NotificationTaskProperties extends TaskProperties {
+ url?: string;
+ }
+
+ interface ReportTask extends Task {
+ url: string;
+
+ generateReport(params: ReportTaskGenerateReportParams, requestOptions?: any): IPromise;
+ getAllReports(requestOptions?: any): IPromise;
+ getReportContentUrl(params: ReportTaskGetReportContentUrlParams): string;
+ getReportData(params: ReportTaskGetReportDataParams, requestOptions?: any): IPromise;
+ getReportStylesheet(reportId: number, requestOptions?: any): IPromise;
+ }
+
+ interface ReportTaskConstructor {
+ new(properties?: ReportTaskProperties): ReportTask;
+ }
+
+ export const ReportTask: ReportTaskConstructor;
+
+ interface ReportTaskProperties extends TaskProperties {
+ url?: string;
+ }
+
+ interface TokenTask extends Task {
+ parseTokens(params: TokenTaskParseTokensParams, requestOptions?: any): IPromise;
+ }
+
+ interface TokenTaskConstructor {
+ new(properties?: TokenTaskProperties): TokenTask;
+ }
+
+ export const TokenTask: TokenTaskConstructor;
+
+ interface TokenTaskProperties extends TaskProperties {
+
+ }
+
+ interface WorkflowTask extends Task {
+ url: string;
+
+ canRunStep(params: WorkflowTaskCanRunStepParams, requestOptions?: any): IPromise;
+ executeSteps(params: WorkflowTaskExecuteStepsParams, requestOptions?: any): IPromise;
+ getAllSteps(jobId: number, requestOptions?: any): IPromise;
+ getCurrentSteps(jobId: number, requestOptions?: any): IPromise;
+ getStep(params: WorkflowTaskGetStepParams, requestOptions?: any): IPromise;
+ getStepDescription(params: WorkflowTaskGetStepDescriptionParams, requestOptions?: any): IPromise;
+ getStepFileUrl(params: WorkflowTaskGetStepFileUrlParams): string;
+ getWorkflowDisplayDetails(jobId: number, requestOptions?: any): IPromise;
+ getWorkflowImageUrl(jobId: number): string;
+ markStepsAsDone(params: WorkflowTaskMarkStepsAsDoneParams, requestOptions?: any): IPromise;
+ moveToNextStep(params: WorkflowTaskMoveToNextStepParams, requestOptions?: any): IPromise;
+ recreateWorkflow(params: WorkflowTaskRecreateWorkflowParams, requestOptions?: any): IPromise;
+ resolveConflict(params: WorkflowTaskResolveConflictParams, requestOptions?: any): IPromise;
+ setCurrentStep(params: WorkflowTaskSetCurrentStepParams, requestOptions?: any): IPromise;
+ }
+
+ interface WorkflowTaskConstructor {
+ new(properties?: WorkflowTaskProperties): WorkflowTask;
+ }
+
+ export const WorkflowTask: WorkflowTaskConstructor;
+
+ interface WorkflowTaskProperties extends TaskProperties {
+ url?: string;
+ }
+
interface MapView extends View {
center: Point;
constraints: MapViewConstraints;
@@ -5053,6 +6168,7 @@ declare namespace __esri {
zoom: number;
goTo(target: number[] | Geometry | Geometry[] | Graphic | Graphic[] | Viewpoint | any, options?: MapViewGoToOptions): IPromise;
+ hasEventListener(type: string): boolean;
hitTest(screenPoint: MapViewHitTestScreenPoint): IPromise;
on(type: string | string[], modifiersOrHandler: string[] | Function, handler?: Function): any;
toMap(screenPoint: ScreenPoint, mapPoint?: Point): Point;
@@ -5090,6 +6206,7 @@ declare namespace __esri {
zoom: number;
goTo(target: number[] | Geometry | Geometry[] | Graphic | Graphic[] | Viewpoint | Camera | any, options?: SceneViewGoToOptions): IPromise;
+ hasEventListener(type: string): boolean;
hitTest(screenPoint: SceneViewHitTestScreenPoint): IPromise;
on(type: string | string[], modifiersOrHandler: string[] | Function, handler?: Function): any;
toMap(screenPoint: ScreenPoint, mapPoint?: Point): Point;
@@ -5116,7 +6233,7 @@ declare namespace __esri {
zoom?: number;
}
- interface View extends Accessor, corePromise, Evented, BreakpointsOwner, DOMContainer {
+ interface View extends Accessor, corePromise, BreakpointsOwner, DOMContainer {
allLayerViews: Collection;
animation: ViewAnimation;
graphics: Collection;
@@ -5238,16 +6355,33 @@ declare namespace __esri {
pixelData?: ImageryLayerViewPixelData;
}
+ interface SceneLayerView extends LayerView {
+ queryExtent(params?: Query): IPromise;
+ queryFeatureCount(params?: Query): IPromise;
+ queryFeatures(params?: Query): IPromise;
+ queryObjectIds(params?: Query): IPromise;
+ }
+
+ interface SceneLayerViewConstructor {
+ new(properties?: SceneLayerViewProperties): SceneLayerView;
+ }
+
+ export const SceneLayerView: SceneLayerViewConstructor;
+
+ interface SceneLayerViewProperties extends LayerViewProperties {
+
+ }
+
interface UI extends Accessor {
container: any;
height: number;
padding: any;
- view: SceneView | MapView;
+ view: MapView | SceneView;
width: number;
- add(component: any | any[], position?: string | any): void;
+ add(component: Widget | any | string | any | any, position?: string | any): void;
empty(position?: string): void;
- move(component: any | any[], position?: string): void;
+ move(component: Widget | any | string | any | any, position?: string): void;
remove(component: any | any[]): void;
}
@@ -5261,7 +6395,7 @@ declare namespace __esri {
container?: any;
height?: number;
padding?: any | number;
- view?: SceneView | MapView;
+ view?: MapView | SceneView;
width?: number;
}
@@ -5406,9 +6540,11 @@ declare namespace __esri {
visibleLayers?: SlideVisibleLayers;
}
- interface Attribution extends Accessor {
- view: SceneView | MapView;
+ interface Attribution extends Widget {
+ view: MapView | SceneView;
viewModel: AttributionViewModel;
+
+ render(): any;
}
interface AttributionConstructor {
@@ -5417,18 +6553,41 @@ declare namespace __esri {
export const Attribution: AttributionConstructor;
- interface AttributionProperties {
- view?: SceneView | MapView;
+ interface AttributionProperties extends WidgetProperties {
+ view?: MapView | SceneView;
viewModel?: AttributionViewModel;
}
- interface BasemapToggle extends Accessor, Evented {
+ interface BasemapGallery extends Widget {
+ activeBasemap: Basemap;
+ source: LocalBasemapsSource | PortalBasemapsSource;
+ view: MapView | SceneView;
+ viewModel: BasemapGalleryViewModel;
+
+ render(): any;
+ }
+
+ interface BasemapGalleryConstructor {
+ new(properties?: BasemapGalleryProperties): BasemapGallery;
+ }
+
+ export const BasemapGallery: BasemapGalleryConstructor;
+
+ interface BasemapGalleryProperties extends WidgetProperties {
+ activeBasemap?: BasemapProperties;
+ source?: LocalBasemapsSource | PortalBasemapsSource;
+ view?: MapView | SceneView;
+ viewModel?: BasemapGalleryViewModelProperties;
+ }
+
+ interface BasemapToggle extends Widget {
activeBasemap: Basemap;
nextBasemap: Basemap;
titleVisible: boolean;
- view: SceneView | MapView;
+ view: MapView | SceneView;
viewModel: BasemapToggleViewModel;
+ render(): any;
toggle(): void;
}
@@ -5438,15 +6597,15 @@ declare namespace __esri {
export const BasemapToggle: BasemapToggleConstructor;
- interface BasemapToggleProperties {
+ interface BasemapToggleProperties extends WidgetProperties {
activeBasemap?: BasemapProperties;
nextBasemap?: Basemap | string;
titleVisible?: boolean;
- view?: SceneView | MapView;
+ view?: MapView | SceneView;
viewModel?: BasemapToggleViewModelProperties;
}
- interface ColorSlider extends Accessor {
+ interface ColorSlider extends Accessor, Widgette {
handlesVisible: boolean;
histogram: any;
histogramVisible: boolean;
@@ -5469,7 +6628,7 @@ declare namespace __esri {
export const ColorSlider: ColorSliderConstructor;
- interface ColorSliderProperties {
+ interface ColorSliderProperties extends WidgetteProperties {
handlesVisible?: boolean;
histogram?: any;
histogramVisible?: boolean;
@@ -5486,10 +6645,11 @@ declare namespace __esri {
visualVariable?: any;
}
- interface Compass extends Accessor {
- view: SceneView | MapView;
+ interface Compass extends Widget {
+ view: MapView | SceneView;
viewModel: CompassViewModel;
+ render(): any;
reset(): void;
}
@@ -5499,17 +6659,51 @@ declare namespace __esri {
export const Compass: CompassConstructor;
- interface CompassProperties {
- view?: SceneView | MapView;
+ interface CompassProperties extends WidgetProperties {
+ view?: MapView | SceneView;
viewModel?: CompassViewModelProperties;
}
- interface Home extends Accessor, Evented {
+ interface Expand extends Widget {
+ collapseTooltip: string;
+ content: any;
+ expanded: boolean;
+ expandIconClass: string;
+ expandTooltip: string;
+ iconNumber: string;
+ view: MapView | SceneView;
+ viewModel: ExpandViewModel;
+
+ collapse(): void;
+ expand(): void;
+ render(): any;
+ toggle(): void;
+ }
+
+ interface ExpandConstructor {
+ new(properties?: ExpandProperties): Expand;
+ }
+
+ export const Expand: ExpandConstructor;
+
+ interface ExpandProperties extends WidgetProperties {
+ collapseTooltip?: string;
+ content?: any | any | string | Widget;
+ expanded?: boolean;
+ expandIconClass?: string;
+ expandTooltip?: string;
+ iconNumber?: string;
+ view?: MapView | SceneView;
+ viewModel?: ExpandViewModelProperties;
+ }
+
+ interface Home extends Widget {
view: MapView | SceneView;
viewModel: HomeViewModel;
viewpoint: Viewpoint;
go(): void;
+ render(): any;
}
interface HomeConstructor {
@@ -5518,7 +6712,7 @@ declare namespace __esri {
export const Home: HomeConstructor;
- interface HomeProperties {
+ interface HomeProperties extends WidgetProperties {
view?: MapView | SceneView;
viewModel?: HomeViewModelProperties;
viewpoint?: ViewpointProperties;
@@ -5526,10 +6720,12 @@ declare namespace __esri {
interface LayerList extends Widget {
createActionsFunction: Function;
- view: SceneView | MapView;
+ operationalItems: Collection;
+ view: MapView | SceneView;
viewModel: LayerListViewModel;
render(): any;
+ triggerAction(action: Action, item: ListItem): void;
}
interface LayerListConstructor {
@@ -5540,13 +6736,14 @@ declare namespace __esri {
interface LayerListProperties extends WidgetProperties {
createActionsFunction?: Function;
- view?: SceneView | MapView;
+ operationalItems?: Collection;
+ view?: MapView | SceneView;
viewModel?: LayerListViewModelProperties;
}
- interface Legend extends Accessor {
+ interface Legend extends Accessor, Widgette {
layerInfos: LegendLayerInfos[];
- view: SceneView | MapView;
+ view: MapView | SceneView;
}
interface LegendConstructor {
@@ -5555,12 +6752,12 @@ declare namespace __esri {
export const Legend: LegendConstructor;
- interface LegendProperties {
+ interface LegendProperties extends WidgetteProperties {
layerInfos?: LegendLayerInfos[];
- view?: SceneView | MapView;
+ view?: MapView | SceneView;
}
- interface Locate extends Accessor, Evented {
+ interface Locate extends Widget {
geolocationOptions: any;
goToLocationEnabled: boolean;
graphic: Graphic;
@@ -5568,6 +6765,7 @@ declare namespace __esri {
viewModel: LocateViewModel;
locate(): IPromise;
+ render(): any;
}
interface LocateConstructor {
@@ -5576,7 +6774,7 @@ declare namespace __esri {
export const Locate: LocateConstructor;
- interface LocateProperties {
+ interface LocateProperties extends WidgetProperties {
geolocationOptions?: any;
goToLocationEnabled?: boolean;
graphic?: GraphicProperties;
@@ -5584,11 +6782,12 @@ declare namespace __esri {
viewModel?: LocateViewModelProperties;
}
- interface NavigationToggle extends Accessor {
+ interface NavigationToggle extends Widget {
layout: string;
view: SceneView;
viewModel: NavigationToggleViewModel;
+ render(): any;
toggle(): void;
}
@@ -5598,13 +6797,13 @@ declare namespace __esri {
export const NavigationToggle: NavigationToggleConstructor;
- interface NavigationToggleProperties {
+ interface NavigationToggleProperties extends WidgetProperties {
layout?: string;
view?: SceneViewProperties;
viewModel?: NavigationToggleViewModelProperties;
}
- interface Popup extends Accessor, Evented {
+ interface Popup extends Accessor, Widgette, Evented {
actions: Collection;
content: string;
currentDockPosition: string;
@@ -5636,7 +6835,7 @@ declare namespace __esri {
export const Popup: PopupConstructor;
- interface PopupProperties {
+ interface PopupProperties extends WidgetteProperties {
actions?: Collection;
content?: string | any;
currentDockPosition?: string;
@@ -5674,12 +6873,34 @@ declare namespace __esri {
viewModel?: PrintViewModelProperties;
}
- interface Search extends Accessor, Evented {
+ interface ScaleBar extends Widget {
+ style: string;
+ unit: string;
+ view: MapView;
+ viewModel: ScaleBarViewModel;
+
+ render(): any;
+ }
+
+ interface ScaleBarConstructor {
+ new(properties?: ScaleBarProperties): ScaleBar;
+ }
+
+ export const ScaleBar: ScaleBarConstructor;
+
+ interface ScaleBarProperties extends WidgetProperties {
+ style?: string;
+ unit?: string;
+ view?: MapViewProperties;
+ viewModel?: ScaleBarViewModelProperties;
+ }
+
+ interface Search extends Widget {
activeSource: FeatureLayer | Locator;
activeSourceIndex: number;
allPlaceholder: string;
autoSelect: boolean;
- defaultSource: any;
+ defaultSource: any | any;
maxResults: number;
maxSuggestions: number;
minSuggestCharacters: number;
@@ -5690,6 +6911,7 @@ declare namespace __esri {
resultGraphicEnabled: boolean;
results: any[];
searchAllEnabled: boolean;
+ searching: boolean;
searchTerm: string;
selectedResult: any;
sources: SearchSources;
@@ -5699,6 +6921,7 @@ declare namespace __esri {
viewModel: SearchViewModel;
clear(): void;
+ render(): any;
search(searchTerm?: string | Geometry | any | number[][]): IPromise;
suggest(value?: string): IPromise;
}
@@ -5709,12 +6932,12 @@ declare namespace __esri {
export const Search: SearchConstructor;
- interface SearchProperties {
+ interface SearchProperties extends WidgetProperties {
activeSource?: FeatureLayer | Locator;
activeSourceIndex?: number;
allPlaceholder?: string;
autoSelect?: boolean;
- defaultSource?: any;
+ defaultSource?: any | any;
maxResults?: number;
maxSuggestions?: number;
minSuggestCharacters?: number;
@@ -5725,6 +6948,7 @@ declare namespace __esri {
resultGraphicEnabled?: boolean;
results?: any[];
searchAllEnabled?: boolean;
+ searching?: boolean;
searchTerm?: string;
selectedResult?: any;
sources?: SearchSources;
@@ -5734,7 +6958,7 @@ declare namespace __esri {
viewModel?: SearchViewModelProperties;
}
- interface SizeSlider extends Accessor {
+ interface SizeSlider extends Accessor, Widgette {
handlesVisible: boolean;
histogram: any;
histogramVisible: boolean;
@@ -5757,7 +6981,7 @@ declare namespace __esri {
export const SizeSlider: SizeSliderConstructor;
- interface SizeSliderProperties {
+ interface SizeSliderProperties extends WidgetteProperties {
handlesVisible?: boolean;
histogram?: any;
histogramVisible?: boolean;
@@ -5774,7 +6998,7 @@ declare namespace __esri {
visualVariable?: any;
}
- interface Track extends Accessor {
+ interface Track extends Widget {
geolocationOptions: any;
goToLocationEnabled: boolean;
graphic: Graphic;
@@ -5782,6 +7006,7 @@ declare namespace __esri {
view: MapView | SceneView;
viewModel: TrackViewModel;
+ render(): any;
start(): void;
stop(): void;
}
@@ -5792,7 +7017,7 @@ declare namespace __esri {
export const Track: TrackConstructor;
- interface TrackProperties {
+ interface TrackProperties extends WidgetProperties {
geolocationOptions?: any;
goToLocationEnabled?: boolean;
graphic?: GraphicProperties;
@@ -5801,7 +7026,7 @@ declare namespace __esri {
viewModel?: TrackViewModelProperties;
}
- interface UnivariateColorSizeSlider extends Accessor {
+ interface UnivariateColorSizeSlider extends Accessor, Widgette {
handlesVisible: boolean;
histogram: any;
histogramVisible: boolean;
@@ -5824,7 +7049,7 @@ declare namespace __esri {
export const UnivariateColorSizeSlider: UnivariateColorSizeSliderConstructor;
- interface UnivariateColorSizeSliderProperties {
+ interface UnivariateColorSizeSliderProperties extends WidgetteProperties {
handlesVisible?: boolean;
histogram?: any;
histogramVisible?: boolean;
@@ -5847,7 +7072,9 @@ declare namespace __esri {
id: string;
destroy(): void;
+ own(handles: any[]): void;
postInitialize(): void;
+ renderNow(): void;
scheduleRender(): void;
startup(): void;
}
@@ -5859,15 +7086,16 @@ declare namespace __esri {
export const Widget: WidgetConstructor;
interface WidgetProperties {
- container?: string;
+ container?: string | any;
destroyed?: boolean;
id?: string;
}
- interface Zoom extends Accessor {
- view: SceneView | MapView;
+ interface Zoom extends Widget {
+ view: MapView | SceneView;
viewModel: ZoomViewModel;
+ render(): any;
zoomIn(): void;
zoomOut(): void;
}
@@ -5878,8 +7106,8 @@ declare namespace __esri {
export const Zoom: ZoomConstructor;
- interface ZoomProperties {
- view?: SceneView | MapView;
+ interface ZoomProperties extends WidgetProperties {
+ view?: MapView | SceneView;
viewModel?: ZoomViewModelProperties;
}
@@ -5887,7 +7115,7 @@ declare namespace __esri {
attributionText: string;
itemDelimiter: string;
state: string;
- view: SceneView | MapView;
+ view: MapView | SceneView;
}
interface AttributionViewModelConstructor {
@@ -5896,11 +7124,35 @@ declare namespace __esri {
export const AttributionViewModel: AttributionViewModelConstructor;
+ interface BasemapGalleryViewModel extends Accessor {
+ activeBasemap: Basemap;
+ items: Collection;
+ source: LocalBasemapsSource | PortalBasemapsSource;
+ state: string;
+ view: MapView | SceneView;
+
+ basemapEquals(basemap1: Basemap, basemap2: Basemap): boolean;
+ }
+
+ interface BasemapGalleryViewModelConstructor {
+ new(properties?: BasemapGalleryViewModelProperties): BasemapGalleryViewModel;
+ }
+
+ export const BasemapGalleryViewModel: BasemapGalleryViewModelConstructor;
+
+ interface BasemapGalleryViewModelProperties {
+ activeBasemap?: BasemapProperties;
+ items?: Collection;
+ source?: LocalBasemapsSource | PortalBasemapsSource;
+ state?: string;
+ view?: MapView | SceneView;
+ }
+
interface BasemapToggleViewModel extends Accessor, Evented {
activeBasemap: Basemap;
nextBasemap: Basemap;
state: string;
- view: SceneView | MapView;
+ view: MapView | SceneView;
toggle(): void;
}
@@ -5915,12 +7167,13 @@ declare namespace __esri {
activeBasemap?: BasemapProperties;
nextBasemap?: Basemap | string;
state?: string;
- view?: SceneView | MapView;
+ view?: MapView | SceneView;
}
interface CompassViewModel extends Accessor {
+ orientation: any;
state: string;
- view: SceneView | MapView;
+ view: MapView | SceneView;
reset(): void;
}
@@ -5932,8 +7185,27 @@ declare namespace __esri {
export const CompassViewModel: CompassViewModelConstructor;
interface CompassViewModelProperties {
+ orientation?: any;
state?: string;
- view?: SceneView | MapView;
+ view?: MapView | SceneView;
+ }
+
+ interface ExpandViewModel extends Accessor {
+ expanded: boolean;
+ state: string;
+ view: MapView | SceneView;
+ }
+
+ interface ExpandViewModelConstructor {
+ new(properties?: ExpandViewModelProperties): ExpandViewModel;
+ }
+
+ export const ExpandViewModel: ExpandViewModelConstructor;
+
+ interface ExpandViewModelProperties {
+ expanded?: boolean;
+ state?: string;
+ view?: MapView | SceneView;
}
interface HomeViewModel extends Accessor, Evented {
@@ -5960,9 +7232,9 @@ declare namespace __esri {
createActionsFunction: Function;
operationalItems: Collection;
state: string;
- view: SceneView | MapView;
+ view: MapView | SceneView;
- triggerAction(actionIndex: number): void;
+ triggerAction(action: Action, item: ListItem): void;
}
interface LayerListViewModelConstructor {
@@ -5975,9 +7247,32 @@ declare namespace __esri {
createActionsFunction?: Function;
operationalItems?: Collection;
state?: string;
- view?: SceneView | MapView;
+ view?: MapView | SceneView;
}
+ interface ListItem {
+ actionsOpen: boolean;
+ actionsSections: Collection;
+ children: Collection;
+ error: Error;
+ layer: Layer;
+ open: boolean;
+ title: string;
+ updating: boolean;
+ view: MapView | SceneView;
+ visibilityMode: string;
+ visible: boolean;
+ visibleAtCurrentScale: boolean;
+
+ clone(): ListItem;
+ }
+
+ interface ListItemConstructor {
+ new(): ListItem;
+ }
+
+ export const ListItem: ListItemConstructor;
+
interface LocateViewModel extends Accessor, Evented, GeolocationPositioning {
state: string;
@@ -6075,6 +7370,20 @@ declare namespace __esri {
view?: MapView | SceneView;
}
+ interface ScaleBarViewModel extends Accessor {
+ view: MapView;
+ }
+
+ interface ScaleBarViewModelConstructor {
+ new(properties?: ScaleBarViewModelProperties): ScaleBarViewModel;
+ }
+
+ export const ScaleBarViewModel: ScaleBarViewModelConstructor;
+
+ interface ScaleBarViewModelProperties {
+ view?: MapViewProperties;
+ }
+
interface SearchViewModel extends Accessor, Evented {
activeSource: FeatureLayer | Locator;
activeSourceIndex: number;
@@ -6163,7 +7472,7 @@ declare namespace __esri {
canZoomIn: boolean;
canZoomOut: boolean;
state: string;
- view: SceneView | MapView;
+ view: MapView | SceneView;
zoomIn(): void;
zoomOut(): void;
@@ -6179,7 +7488,7 @@ declare namespace __esri {
canZoomIn?: boolean;
canZoomOut?: boolean;
state?: string;
- view?: SceneView | MapView;
+ view?: MapView | SceneView;
}
interface JSONSupport {
@@ -6301,6 +7610,8 @@ declare namespace __esri {
dpi: number;
gdbVersion: string;
imageFormat: string;
+ imageMaxHeight: number;
+ imageMaxWidth: number;
imageTransparency: boolean;
sublayers: Collection;
@@ -6320,6 +7631,8 @@ declare namespace __esri {
dpi?: number;
gdbVersion?: string;
imageFormat?: string;
+ imageMaxHeight?: number;
+ imageMaxWidth?: number;
imageTransparency?: boolean;
sublayers?: Collection;
}
@@ -6547,6 +7860,24 @@ declare namespace __esri {
width?: number;
}
+ interface Widgette {
+ container: string | any;
+ visible: boolean;
+
+ destroy(): void;
+ }
+
+ interface WidgetteConstructor {
+ new(): Widgette;
+ }
+
+ export const Widgette: WidgetteConstructor;
+
+ interface WidgetteProperties {
+ container?: string | any;
+ visible?: boolean;
+ }
+
interface GeolocationPositioning {
geolocationOptions: any;
goToLocationEnabled: boolean;
@@ -6569,8 +7900,10 @@ declare namespace __esri {
interface config {
geometryServiceUrl: string;
+ geoRSSServiceUrl: string;
portalUrl: string;
request: configRequest;
+ workers: configWorkers;
}
export const config: config;
@@ -6596,13 +7929,19 @@ declare namespace __esri {
export const lang: lang;
interface promiseUtils {
- eachAlways(promises: IPromise[]): IPromise[];
- reject(error?: any): IPromise;
- resolve(value?: any): IPromise;
+ eachAlways(promises: IPromise[] | any): IPromise | any;
+ reject(error?: any): IPromise;
+ resolve(value?: T): IPromise;
}
export const promiseUtils: promiseUtils;
+ interface requireUtils {
+ when(moduleRequire: any, moduleNames: string[] | string): IPromise;
+ }
+
+ export const requireUtils: requireUtils;
+
interface urlUtils {
addProxyRule(rule: urlUtilsAddProxyRuleRule): number;
getProxyRule(url: string): any;
@@ -6636,7 +7975,7 @@ declare namespace __esri {
interface decorators {
aliasOf(propertyName: string): Function;
cast(propertyName: string): Function;
- cast(classFunction: Function): void;
+ cast(classFunction: Function): Function;
declared(baseClass: T, ...mixinClasses: any[]): T;
property(propertyMetadata?: decoratorsPropertyPropertyMetadata): Function;
subclass(declaredClass?: string): Function;
@@ -6739,6 +8078,12 @@ declare namespace __esri {
export const jsonUtils: jsonUtils;
+ interface normalizeUtils {
+ normalizeCentralMeridian(geometries: Geometry[], geometryService?: GeometryService): IPromise;
+ }
+
+ export const normalizeUtils: normalizeUtils;
+
interface webMercatorUtils {
canProject(source: SpatialReference | any, target: SpatialReference | any): boolean;
geographicToWebMercator(geometry: Geometry): Geometry;
@@ -6765,7 +8110,7 @@ declare namespace __esri {
interface size {
createContinuousRenderer(params: sizeCreateContinuousRendererParams): IPromise;
- createVisualVariable(params: sizeCreateVisualVariableParams): IPromise;
+ createVisualVariables(params: sizeCreateVisualVariablesParams): IPromise;
}
export const size: size;
@@ -6787,13 +8132,17 @@ declare namespace __esri {
histogram(params: histogramHistogramParams): IPromise;
}
- export const histogram: histogram;
+ const __histogramMapped: histogram;
+ export const histogram: typeof __histogramMapped.histogram;
+
interface summaryStatistics {
summaryStatistics(params: summaryStatisticsSummaryStatisticsParams): IPromise;
}
- export const summaryStatistics: summaryStatistics;
+ const __summaryStatisticsMapped: summaryStatistics;
+ export const summaryStatistics: typeof __summaryStatisticsMapped.summaryStatistics;
+
interface symbologyColor {
cloneScheme(scheme: any): any;
@@ -6824,16 +8173,6 @@ declare namespace __esri {
export const supportJsonUtils: supportJsonUtils;
- interface Action {
- className: string;
- id: string;
- image: string;
- title: string;
- visible: boolean;
- }
-
- export const Action: Action;
-
interface symbolsSupportJsonUtils {
fromJSON(json: any): Symbol;
}
@@ -6861,20 +8200,30 @@ declare namespace __esri {
export const widget: widget;
- interface ListItem {
- actionsOpen: boolean;
- actionsSections: Collection;
- children: Collection;
+ interface BasemapGalleryItem {
+ basemap: Basemap;
error: Error;
- open: boolean;
- title: string;
- updating: boolean;
- visibilityMode: string;
- visible: boolean;
- visibleAtCurrentScale: boolean;
+ state: string;
+ view: MapView | SceneView;
}
- export const ListItem: ListItem;
+ export const BasemapGalleryItem: BasemapGalleryItem;
+
+ interface LocalBasemapsSource {
+ basemaps: Collection;
+ state: string;
+ }
+
+ export const LocalBasemapsSource: LocalBasemapsSource;
+
+ interface PortalBasemapsSource {
+ basemaps: Collection;
+ filterFunction: Function;
+ portal: Portal;
+ state: string;
+ }
+
+ export const PortalBasemapsSource: PortalBasemapsSource;
}
declare module "esri" {
@@ -6888,10 +8237,116 @@ declare module "esri" {
export import WatchHandle = __esri.WatchHandle;
+ export import EachAlwaysResult = __esri.EachAlwaysResult;
+
export import PausableWatchHandle = __esri.PausableWatchHandle;
+ export import FeatureEditResult = __esri.FeatureEditResult;
+
export import AttributeParamValue = __esri.AttributeParamValue;
+ export import DataWorkspace = __esri.DataWorkspace;
+
+ export import GroupMembership = __esri.GroupMembership;
+
+ export import HoldType = __esri.HoldType;
+
+ export import JobPriority = __esri.JobPriority;
+
+ export import JobQuery = __esri.JobQuery;
+
+ export import JobStatus = __esri.JobStatus;
+
+ export import JobQueryContainer = __esri.JobQueryContainer;
+
+ export import JobQueryDetails = __esri.JobQueryDetails;
+
+ export import Privilege = __esri.Privilege;
+
+ export import UserDetails = __esri.UserDetails;
+
+ export import VersionInfo = __esri.VersionInfo;
+
+ export import WorkflowManagerServiceInfo = __esri.WorkflowManagerServiceInfo;
+
+ export import JobType = __esri.JobType;
+
+ export import JobTypeDetails = __esri.JobTypeDetails;
+
+ export import TableRelationship = __esri.TableRelationship;
+
+ export import JobCreationParameters = __esri.JobCreationParameters;
+
+ export import JobQueryParameters = __esri.JobQueryParameters;
+
+ export import JobUpdateParameters = __esri.JobUpdateParameters;
+
+ export import AuxRecordDescription = __esri.AuxRecordDescription;
+
+ export import ActivityType = __esri.ActivityType;
+
+ export import AuxRecordContainer = __esri.AuxRecordContainer;
+
+ export import JobTaskJobInfo = __esri.JobTaskJobInfo;
+
+ export import QueryResult = __esri.QueryResult;
+
+ export import AuxRecord = __esri.AuxRecord;
+
+ export import AuxRecordValue = __esri.AuxRecordValue;
+
+ export import FieldValue = __esri.FieldValue;
+
+ export import JobVersionInfo = __esri.JobVersionInfo;
+
+ export import QueryFieldInfo = __esri.QueryFieldInfo;
+
+ export import JobAttachment = __esri.JobAttachment;
+
+ export import JobDependency = __esri.JobDependency;
+
+ export import ChangeRule = __esri.ChangeRule;
+
+ export import DataSetEvaluator = __esri.DataSetEvaluator;
+
+ export import AOIEvaluator = __esri.AOIEvaluator;
+
+ export import DatasetConfiguration = __esri.DatasetConfiguration;
+
+ export import EmailNotifier = __esri.EmailNotifier;
+
+ export import WhereCondition = __esri.WhereCondition;
+
+ export import NotificationType = __esri.NotificationType;
+
+ export import ChangeRuleMatch = __esri.ChangeRuleMatch;
+
+ export import ReportDataGroup = __esri.ReportDataGroup;
+
+ export import ReportData = __esri.ReportData;
+
+ export import Report = __esri.Report;
+
+ export import ExecuteInfo = __esri.ExecuteInfo;
+
+ export import Step = __esri.Step;
+
+ export import StepType = __esri.StepType;
+
+ export import WorkflowDisplayDetails = __esri.WorkflowDisplayDetails;
+
+ export import WorkflowOption = __esri.WorkflowOption;
+
+ export import WorkflowStepInfo = __esri.WorkflowStepInfo;
+
+ export import WorkflowAnnotationDisplayDetails = __esri.WorkflowAnnotationDisplayDetails;
+
+ export import WorkflowConflicts = __esri.WorkflowConflicts;
+
+ export import WorkflowPathDisplayDetails = __esri.WorkflowPathDisplayDetails;
+
+ export import WorkflowStepDisplayDetails = __esri.WorkflowStepDisplayDetails;
+
export import ExternalRenderer = __esri.ExternalRenderer;
export import RenderContext = __esri.RenderContext;
@@ -6906,10 +8361,6 @@ declare module "esri" {
export import FeatureLayerSource = __esri.FeatureLayerSource;
- export import SearchViewModelLocatorSource = __esri.SearchViewModelLocatorSource;
-
- export import SearchViewModelFeatureLayerSource = __esri.SearchViewModelFeatureLayerSource;
-
export import GetHeader = __esri.GetHeader;
export import WatchCallback = __esri.WatchCallback;
@@ -6966,8 +8417,16 @@ declare module "esri" {
export import CSVLayerElevationInfo = __esri.CSVLayerElevationInfo;
+ export import FeatureLayerApplyEditsEdits = __esri.FeatureLayerApplyEditsEdits;
+
+ export import FeatureLayerCapabilities = __esri.FeatureLayerCapabilities;
+
+ export import FeatureLayerCapabilitiesOperations = __esri.FeatureLayerCapabilitiesOperations;
+
export import FeatureLayerElevationInfo = __esri.FeatureLayerElevationInfo;
+ export import FeatureLayerGetFieldDomainOptions = __esri.FeatureLayerGetFieldDomainOptions;
+
export import GraphicsLayerElevationInfo = __esri.GraphicsLayerElevationInfo;
export import LayerFromArcGISServerUrlParams = __esri.LayerFromArcGISServerUrlParams;
@@ -6976,6 +8435,12 @@ declare module "esri" {
export import SceneLayerElevationInfo = __esri.SceneLayerElevationInfo;
+ export import StreamLayerFilter = __esri.StreamLayerFilter;
+
+ export import StreamLayerPurgeOptions = __esri.StreamLayerPurgeOptions;
+
+ export import StreamLayerUpdateFilterFilterChanges = __esri.StreamLayerUpdateFilterFilterChanges;
+
export import VectorTileLayerCurrentStyleInfo = __esri.VectorTileLayerCurrentStyleInfo;
export import CodedValueDomainCodedValues = __esri.CodedValueDomainCodedValues;
@@ -7004,6 +8469,8 @@ declare module "esri" {
export import UniqueValueRendererUniqueValueInfos = __esri.UniqueValueRendererUniqueValueInfos;
+ export import PointCloudRendererPointSizeAlgorithm = __esri.PointCloudRendererPointSizeAlgorithm;
+
export import PointCloudClassBreaksRendererColorClassBreakInfos = __esri.PointCloudClassBreaksRendererColorClassBreakInfos;
export import PointCloudStretchRendererStops = __esri.PointCloudStretchRendererStops;
@@ -7042,6 +8509,102 @@ declare module "esri" {
export import QueryQuantizationParameters = __esri.QueryQuantizationParameters;
+ export import ConfigurationTaskGetDataWorkspaceDetailsParams = __esri.ConfigurationTaskGetDataWorkspaceDetailsParams;
+
+ export import ConfigurationTaskGetUserJobQueryDetailsParams = __esri.ConfigurationTaskGetUserJobQueryDetailsParams;
+
+ export import JobTaskAddEmbeddedAttachmentParams = __esri.JobTaskAddEmbeddedAttachmentParams;
+
+ export import JobTaskAddLinkedAttachmentParams = __esri.JobTaskAddLinkedAttachmentParams;
+
+ export import JobTaskAddLinkedRecordParams = __esri.JobTaskAddLinkedRecordParams;
+
+ export import JobTaskAssignJobsParams = __esri.JobTaskAssignJobsParams;
+
+ export import JobTaskCloseJobsParams = __esri.JobTaskCloseJobsParams;
+
+ export import JobTaskCreateDependencyParams = __esri.JobTaskCreateDependencyParams;
+
+ export import JobTaskCreateHoldParams = __esri.JobTaskCreateHoldParams;
+
+ export import JobTaskCreateJobVersionParams = __esri.JobTaskCreateJobVersionParams;
+
+ export import JobTaskDeleteAttachmentParams = __esri.JobTaskDeleteAttachmentParams;
+
+ export import JobTaskDeleteDependencyParams = __esri.JobTaskDeleteDependencyParams;
+
+ export import JobTaskDeleteJobsParams = __esri.JobTaskDeleteJobsParams;
+
+ export import JobTaskDeleteLinkedRecordParams = __esri.JobTaskDeleteLinkedRecordParams;
+
+ export import JobTaskGetAttachmentContentUrlParams = __esri.JobTaskGetAttachmentContentUrlParams;
+
+ export import JobTaskListFieldValuesParams = __esri.JobTaskListFieldValuesParams;
+
+ export import JobTaskListMultiLevelFieldValuesParams = __esri.JobTaskListMultiLevelFieldValuesParams;
+
+ export import JobTaskLogActionParams = __esri.JobTaskLogActionParams;
+
+ export import JobTaskQueryJobsParams = __esri.JobTaskQueryJobsParams;
+
+ export import JobTaskQueryMultiLevelSelectedValuesParams = __esri.JobTaskQueryMultiLevelSelectedValuesParams;
+
+ export import JobTaskReleaseHoldParams = __esri.JobTaskReleaseHoldParams;
+
+ export import JobTaskReopenClosedJobsParams = __esri.JobTaskReopenClosedJobsParams;
+
+ export import JobTaskSearchJobsParams = __esri.JobTaskSearchJobsParams;
+
+ export import JobTaskUnassignJobsParams = __esri.JobTaskUnassignJobsParams;
+
+ export import JobTaskUpdateNotesParams = __esri.JobTaskUpdateNotesParams;
+
+ export import JobTaskUpdateRecordParams = __esri.JobTaskUpdateRecordParams;
+
+ export import NotificationTaskAddChangeRuleParams = __esri.NotificationTaskAddChangeRuleParams;
+
+ export import NotificationTaskDeleteChangeRuleParams = __esri.NotificationTaskDeleteChangeRuleParams;
+
+ export import NotificationTaskNotifySessionParams = __esri.NotificationTaskNotifySessionParams;
+
+ export import NotificationTaskQueryChangeRulesParams = __esri.NotificationTaskQueryChangeRulesParams;
+
+ export import NotificationTaskRunSpatialNotificationOnHistoryParams = __esri.NotificationTaskRunSpatialNotificationOnHistoryParams;
+
+ export import NotificationTaskSendNotificationParams = __esri.NotificationTaskSendNotificationParams;
+
+ export import NotificationTaskSubscribeToNotificationParams = __esri.NotificationTaskSubscribeToNotificationParams;
+
+ export import NotificationTaskUnsubscribeFromNotificationParams = __esri.NotificationTaskUnsubscribeFromNotificationParams;
+
+ export import ReportTaskGenerateReportParams = __esri.ReportTaskGenerateReportParams;
+
+ export import ReportTaskGetReportContentUrlParams = __esri.ReportTaskGetReportContentUrlParams;
+
+ export import ReportTaskGetReportDataParams = __esri.ReportTaskGetReportDataParams;
+
+ export import TokenTaskParseTokensParams = __esri.TokenTaskParseTokensParams;
+
+ export import WorkflowTaskCanRunStepParams = __esri.WorkflowTaskCanRunStepParams;
+
+ export import WorkflowTaskExecuteStepsParams = __esri.WorkflowTaskExecuteStepsParams;
+
+ export import WorkflowTaskGetStepDescriptionParams = __esri.WorkflowTaskGetStepDescriptionParams;
+
+ export import WorkflowTaskGetStepFileUrlParams = __esri.WorkflowTaskGetStepFileUrlParams;
+
+ export import WorkflowTaskGetStepParams = __esri.WorkflowTaskGetStepParams;
+
+ export import WorkflowTaskMarkStepsAsDoneParams = __esri.WorkflowTaskMarkStepsAsDoneParams;
+
+ export import WorkflowTaskMoveToNextStepParams = __esri.WorkflowTaskMoveToNextStepParams;
+
+ export import WorkflowTaskRecreateWorkflowParams = __esri.WorkflowTaskRecreateWorkflowParams;
+
+ export import WorkflowTaskResolveConflictParams = __esri.WorkflowTaskResolveConflictParams;
+
+ export import WorkflowTaskSetCurrentStepParams = __esri.WorkflowTaskSetCurrentStepParams;
+
export import MapViewConstraints = __esri.MapViewConstraints;
export import MapViewGoToOptions = __esri.MapViewGoToOptions;
@@ -7124,6 +8687,10 @@ declare module "esri" {
export import configRequestProxyRules = __esri.configRequestProxyRules;
+ export import configWorkers = __esri.configWorkers;
+
+ export import configWorkersLoaderConfig = __esri.configWorkersLoaderConfig;
+
export import requestEsriRequestOptions = __esri.requestEsriRequestOptions;
export import urlUtilsAddProxyRuleRule = __esri.urlUtilsAddProxyRuleRule;
@@ -7144,9 +8711,9 @@ declare module "esri" {
export import sizeCreateContinuousRendererParamsLegendOptions = __esri.sizeCreateContinuousRendererParamsLegendOptions;
- export import sizeCreateVisualVariableParams = __esri.sizeCreateVisualVariableParams;
+ export import sizeCreateVisualVariablesParams = __esri.sizeCreateVisualVariablesParams;
- export import sizeCreateVisualVariableParamsLegendOptions = __esri.sizeCreateVisualVariableParamsLegendOptions;
+ export import sizeCreateVisualVariablesParamsLegendOptions = __esri.sizeCreateVisualVariablesParamsLegendOptions;
export import univariateColorSizeCreateContinuousRendererParams = __esri.univariateColorSizeCreateContinuousRendererParams;
@@ -7351,6 +8918,11 @@ declare module "esri/layers/FeatureLayer" {
export = FeatureLayer;
}
+declare module "esri/layers/GeoRSSLayer" {
+ import GeoRSSLayer = __esri.GeoRSSLayer;
+ export = GeoRSSLayer;
+}
+
declare module "esri/layers/GraphicsLayer" {
import GraphicsLayer = __esri.GraphicsLayer;
export = GraphicsLayer;
@@ -7571,6 +9143,11 @@ declare module "esri/renderers/PointCloudUniqueValueRenderer" {
export = PointCloudUniqueValueRenderer;
}
+declare module "esri/support/Action" {
+ import Action = __esri.Action;
+ export = Action;
+}
+
declare module "esri/symbols/ExtrudeSymbol3DLayer" {
import ExtrudeSymbol3DLayer = __esri.ExtrudeSymbol3DLayer;
export = ExtrudeSymbol3DLayer;
@@ -7961,6 +9538,36 @@ declare module "esri/tasks/support/TrimExtendParameters" {
export = TrimExtendParameters;
}
+declare module "esri/tasks/workflow/ConfigurationTask" {
+ import ConfigurationTask = __esri.ConfigurationTask;
+ export = ConfigurationTask;
+}
+
+declare module "esri/tasks/workflow/JobTask" {
+ import JobTask = __esri.JobTask;
+ export = JobTask;
+}
+
+declare module "esri/tasks/workflow/NotificationTask" {
+ import NotificationTask = __esri.NotificationTask;
+ export = NotificationTask;
+}
+
+declare module "esri/tasks/workflow/ReportTask" {
+ import ReportTask = __esri.ReportTask;
+ export = ReportTask;
+}
+
+declare module "esri/tasks/workflow/TokenTask" {
+ import TokenTask = __esri.TokenTask;
+ export = TokenTask;
+}
+
+declare module "esri/tasks/workflow/WorkflowTask" {
+ import WorkflowTask = __esri.WorkflowTask;
+ export = WorkflowTask;
+}
+
declare module "esri/views/MapView" {
import MapView = __esri.MapView;
export = MapView;
@@ -8001,6 +9608,11 @@ declare module "esri/views/layers/ImageryLayerView" {
export = ImageryLayerView;
}
+declare module "esri/views/layers/SceneLayerView" {
+ import SceneLayerView = __esri.SceneLayerView;
+ export = SceneLayerView;
+}
+
declare module "esri/views/ui/UI" {
import UI = __esri.UI;
export = UI;
@@ -8046,6 +9658,11 @@ declare module "esri/widgets/Attribution" {
export = Attribution;
}
+declare module "esri/widgets/BasemapGallery" {
+ import BasemapGallery = __esri.BasemapGallery;
+ export = BasemapGallery;
+}
+
declare module "esri/widgets/BasemapToggle" {
import BasemapToggle = __esri.BasemapToggle;
export = BasemapToggle;
@@ -8061,6 +9678,11 @@ declare module "esri/widgets/Compass" {
export = Compass;
}
+declare module "esri/widgets/Expand" {
+ import Expand = __esri.Expand;
+ export = Expand;
+}
+
declare module "esri/widgets/Home" {
import Home = __esri.Home;
export = Home;
@@ -8096,6 +9718,11 @@ declare module "esri/widgets/Print" {
export = Print;
}
+declare module "esri/widgets/ScaleBar" {
+ import ScaleBar = __esri.ScaleBar;
+ export = ScaleBar;
+}
+
declare module "esri/widgets/Search" {
import Search = __esri.Search;
export = Search;
@@ -8131,6 +9758,11 @@ declare module "esri/widgets/Attribution/AttributionViewModel" {
export = AttributionViewModel;
}
+declare module "esri/widgets/BasemapGallery/BasemapGalleryViewModel" {
+ import BasemapGalleryViewModel = __esri.BasemapGalleryViewModel;
+ export = BasemapGalleryViewModel;
+}
+
declare module "esri/widgets/BasemapToggle/BasemapToggleViewModel" {
import BasemapToggleViewModel = __esri.BasemapToggleViewModel;
export = BasemapToggleViewModel;
@@ -8141,6 +9773,11 @@ declare module "esri/widgets/Compass/CompassViewModel" {
export = CompassViewModel;
}
+declare module "esri/widgets/Expand/ExpandViewModel" {
+ import ExpandViewModel = __esri.ExpandViewModel;
+ export = ExpandViewModel;
+}
+
declare module "esri/widgets/Home/HomeViewModel" {
import HomeViewModel = __esri.HomeViewModel;
export = HomeViewModel;
@@ -8151,6 +9788,11 @@ declare module "esri/widgets/LayerList/LayerListViewModel" {
export = LayerListViewModel;
}
+declare module "esri/widgets/LayerList/ListItem" {
+ import ListItem = __esri.ListItem;
+ export = ListItem;
+}
+
declare module "esri/widgets/Locate/LocateViewModel" {
import LocateViewModel = __esri.LocateViewModel;
export = LocateViewModel;
@@ -8171,6 +9813,11 @@ declare module "esri/widgets/Popup/PopupViewModel" {
export = PopupViewModel;
}
+declare module "esri/widgets/ScaleBar/ScaleBarViewModel" {
+ import ScaleBarViewModel = __esri.ScaleBarViewModel;
+ export = ScaleBarViewModel;
+}
+
declare module "esri/widgets/Search/SearchViewModel" {
import SearchViewModel = __esri.SearchViewModel;
export = SearchViewModel;
@@ -8266,6 +9913,11 @@ declare module "esri/views/DOMContainer" {
export = DOMContainer;
}
+declare module "esri/widgets/Widgette" {
+ import Widgette = __esri.Widgette;
+ export = Widgette;
+}
+
declare module "esri/widgets/support/GeolocationPositioning" {
import GeolocationPositioning = __esri.GeolocationPositioning;
export = GeolocationPositioning;
@@ -8296,6 +9948,11 @@ declare module "esri/core/promiseUtils" {
export = promiseUtils;
}
+declare module "esri/core/requireUtils" {
+ import requireUtils = __esri.requireUtils;
+ export = requireUtils;
+}
+
declare module "esri/core/urlUtils" {
import urlUtils = __esri.urlUtils;
export = urlUtils;
@@ -8331,6 +9988,11 @@ declare module "esri/geometry/support/jsonUtils" {
export = jsonUtils;
}
+declare module "esri/geometry/support/normalizeUtils" {
+ import normalizeUtils = __esri.normalizeUtils;
+ export = normalizeUtils;
+}
+
declare module "esri/geometry/support/webMercatorUtils" {
import webMercatorUtils = __esri.webMercatorUtils;
export = webMercatorUtils;
@@ -8391,11 +10053,6 @@ declare module "esri/renderers/support/jsonUtils" {
export = supportJsonUtils;
}
-declare module "esri/support/Action" {
- import Action = __esri.Action;
- export = Action;
-}
-
declare module "esri/symbols/support/jsonUtils" {
import symbolsSupportJsonUtils = __esri.symbolsSupportJsonUtils;
export = symbolsSupportJsonUtils;
@@ -8411,7 +10068,17 @@ declare module "esri/widgets/support/widget" {
export = widget;
}
-declare module "esri/widgets/LayerList/ListItem" {
- import ListItem = __esri.ListItem;
- export = ListItem;
+declare module "esri/widgets/BasemapGallery/BasemapGalleryItem" {
+ import BasemapGalleryItem = __esri.BasemapGalleryItem;
+ export = BasemapGalleryItem;
}
+
+declare module "esri/widgets/BasemapGallery/support/LocalBasemapsSource" {
+ import LocalBasemapsSource = __esri.LocalBasemapsSource;
+ export = LocalBasemapsSource;
+}
+
+declare module "esri/widgets/BasemapGallery/support/PortalBasemapsSource" {
+ import PortalBasemapsSource = __esri.PortalBasemapsSource;
+ export = PortalBasemapsSource;
+}
\ No newline at end of file
diff --git a/arcgis-js-api/v3/index.d.ts b/arcgis-js-api/v3/index.d.ts
index c32749eb26..40875ddd48 100644
--- a/arcgis-js-api/v3/index.d.ts
+++ b/arcgis-js-api/v3/index.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for ArcGIS API for JavaScript 3.19
+// Type definitions for ArcGIS API for JavaScript 3.20
// Project: https://developers.arcgis.com/javascript/3/
// Definitions by: Esri
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -21,7 +21,6 @@ declare module "esri" {
import Color = require("esri/Color");
import LocationProviderBase = require("esri/tasks/locationproviders/LocationProviderBase");
import PictureMarkerSymbol = require("esri/symbols/PictureMarkerSymbol");
- import RouteParameters = require("esri/tasks/RouteParameters");
import SimpleLineSymbol = require("esri/symbols/SimpleLineSymbol");
import Font = require("esri/symbols/Font");
import ArcGISDynamicMapServiceLayer = require("esri/layers/ArcGISDynamicMapServiceLayer");
@@ -263,6 +262,12 @@ declare module "esri" {
/** The symbol in which the BlendRenderer is applied. */
symbol: Symbol;
}
+ export interface BookmarkItemOptions {
+ /** The extent for the specified bookmark item. */
+ extent?: Extent;
+ /** The name for the bookmark item. */
+ name?: string;
+ }
export interface BookmarksOptions {
/** An array of BookmarkItem objects or a json object with the BookmarkItem format to initially display in the bookmark widget. */
bookmarks?: BookmarkItem[];
@@ -282,8 +287,14 @@ declare module "esri" {
latitudeFieldName?: string;
/** The longitude field name. */
longitudeFieldName?: string;
+ /** Opacity or transparency of layer. */
+ opacity?: number;
/** An array of strings which correspond to fields to include in the CSVLayer. */
outFields?: string[];
+ /** Refresh interval of the layer in minutes. */
+ refreshInterval?: number;
+ /** Visibility of the layer. */
+ visible?: boolean;
}
export interface ChooseBestFacilitiesOptions {
/** The URL to the analysis service, for example "http://analysis.arcgis.com/arcgis/rest/services/tasks/GPServer". */
@@ -624,8 +635,8 @@ declare module "esri" {
canModifyStops?: boolean;
/** Center the map at the start of the selected route segment. */
centerAtSegmentStart?: boolean;
- /** The returned directions object from the routing solve result. */
- directions?: any;
+ /** The locale used for the directions. */
+ directionsLanguage?: string;
/** Length units. */
directionsLengthUnits?: string;
/** Enable the dragging of stop locations on the map. */
@@ -658,8 +669,6 @@ declare module "esri" {
printTemplate?: string;
/** When true, the route will return to start point. */
returnToStart?: boolean;
- /** Specify the input parameters for the route task. */
- routeParams?: RouteParameters;
/** Define the symbol used to draw the route on the map. */
routeSymbol?: SimpleLineSymbol;
/** Specify the service that will be used to calculate directions. */
@@ -672,6 +681,8 @@ declare module "esri" {
segmentSymbol?: SimpleLineSymbol;
/** Defines whether the Directions widget will show the map-click-active toggle button. */
showActivateButton?: boolean;
+ /** Indicates whether to expose barriers when using the widget. */
+ showBarriersButton?: boolean;
/** If true, the Clear button is shown. */
showClearButton?: boolean;
/** If true, the toggle button group allowing user to choose between Miles and Kilometers is shown. */
@@ -1076,6 +1087,8 @@ declare module "esri" {
export interface GeoRSSLayerOptions {
/** The template used to display popup window for identify operation. */
infoTemplate?: InfoTemplate;
+ /** Opacity or transparency of layer. */
+ opacity?: number;
/** The output spatial reference for the GeoRSSLayer. */
outSpatialReference?: SpatialReference;
/** The default symbol use to display point features. */
@@ -1084,6 +1097,8 @@ declare module "esri" {
polygonSymbol?: Symbol;
/** The default symbol used to display polyline features. */
polylineSymbol?: Symbol;
+ /** Refresh interval of the layer in minutes. */
+ refreshInterval?: number;
}
export interface GeocoderOptions {
/** By default, the Geocoder widget uses the Esri World Locator to find search locations. */
@@ -3235,7 +3250,7 @@ declare module "esri/arcgis/Portal" {
tags: string[];
/** The url to the thumbnail image for the user. */
thumbnailUrl: string;
- /** The url for the user content. */
+ /** The URL for the user content. */
userContentUrl: string;
/** The username for the user. */
username: string;
@@ -3554,16 +3569,15 @@ declare module "esri/dijit/BasemapToggle" {
}
declare module "esri/dijit/BookmarkItem" {
- import Extent = require("esri/geometry/Extent");
+ import esri = require("esri");
/** Defines a bookmark for use in the Bookmark widget. */
class BookmarkItem {
/**
* Creates a new BookmarkItem.
- * @param name The name for the bookmark item.
- * @param extent The extent for the specified bookmark item.
+ * @param params See options list for parameters.
*/
- constructor(name: string, extent: Extent);
+ constructor(params?: esri.BookmarkItemOptions);
}
export = BookmarkItem;
}
@@ -3815,7 +3829,6 @@ declare module "esri/dijit/Directions" {
import esri = require("esri");
import DirectionsFeatureSet = require("esri/tasks/DirectionsFeatureSet");
import Graphic = require("esri/graphic");
- import RouteParameters = require("esri/tasks/RouteParameters");
import RouteTask = require("esri/tasks/RouteTask");
import Point = require("esri/geometry/Point");
import RouteResult = require("esri/tasks/RouteResult");
@@ -3832,14 +3845,14 @@ declare module "esri/dijit/Directions" {
mergedRouteGraphic: Graphic;
/** If specified, this specifies the portal where the produced route layers are going to be stored and accessed. */
portalUrl: string;
- /** Routing parameters for the widget. */
- routeParams: RouteParameters;
/** Routing task for the widget. */
routeTask: RouteTask;
/** Read-only: The Service Description object returned by the Route REST Endpoint. */
serviceDescription: any;
/** Indicates whether the Directions widget will display the map-click-active toggle button. */
showActivateButton: boolean;
+ /** Indicates whether to expose barriers when using the widget. */
+ showBarriersButton: boolean;
/** If true, the Clear button is shown. */
showClearButton: boolean;
/** If true, the toggle button group allowing user to choose between Miles and Kilometers is shown. */
@@ -9230,8 +9243,14 @@ declare module "esri/layers/CSVLayer" {
latitudeFieldName: string;
/** The longitude field name. */
longitudeFieldName: string;
+ /** Opacity or transparency of layer. */
+ opacity: number;
+ /** Refresh interval of the layer in minutes. */
+ refreshInterval: number;
/** The url to a CSV resource. */
url: string;
+ /** Visibility of the layer. */
+ visible: boolean;
/**
* Creates a CSV layer.
* @param url URL to a CSV resource.
@@ -9938,6 +9957,10 @@ declare module "esri/layers/GeoRSSLayer" {
items: Graphic[];
/** The name of the layer. */
name: string;
+ /** Opacity or transparency of layer. */
+ opacity: number;
+ /** Refresh interval of the layer in minutes. */
+ refreshInterval: number;
/** The publicly accessible URL to a GeoRSS file. */
url: string;
/**
@@ -11703,6 +11726,7 @@ declare module "esri/layers/pixelfilters/StretchFilter" {
declare module "esri/map" {
import esri = require("esri");
import Attribution = require("esri/dijit/Attribution");
+ import Color = require("esri/Color");
import Extent = require("esri/geometry/Extent");
import GraphicsLayer = require("esri/layers/GraphicsLayer");
import InfoWindowBase = require("esri/InfoWindowBase");
@@ -11721,6 +11745,8 @@ declare module "esri/map" {
attribution: Attribution;
/** Value is true when the map automatically resizes if the browser window or ContentPane widget enclosing the map is resized. */
autoResize: boolean;
+ /** The background color "behind" the map. */
+ backgroundColor: Color;
/** An array of IDs corresponding to the layers that make up the map's current basemap. */
basemapLayerIds: string[];
/** The current extent of the map in map units. */
@@ -11924,6 +11950,11 @@ declare module "esri/map" {
* @param immediate By default, the actual resize logic is delayed internally in order to throttle spurious resize events dispatched by some browsers.
*/
resize(immediate?: boolean): void;
+ /**
+ * Change the background color of the map.
+ * @param color Color specified using either a named string (e.g.
+ */
+ setBackgroundColor(color: Color | string): void;
/**
* Change the map's current basemap.
* @param basemap A valid basemap name.
diff --git a/archiver/archiver-tests.ts b/archiver/archiver-tests.ts
index d79b29f079..f186fb9bcb 100644
--- a/archiver/archiver-tests.ts
+++ b/archiver/archiver-tests.ts
@@ -1,6 +1,3 @@
-
-///
-
import Archiver = require('archiver');
import FS = require('fs');
diff --git a/atom/atom-tests.ts b/atom/atom-tests.ts
index 37b2fb314c..1b141fb492 100644
--- a/atom/atom-tests.ts
+++ b/atom/atom-tests.ts
@@ -1,5 +1,4 @@
///
-///
import path = require("path");
import _atom = require("atom");
diff --git a/aurelia-knockout/aurelia-knockout-tests.ts b/aurelia-knockout/aurelia-knockout-tests.ts
new file mode 100644
index 0000000000..6944ab5889
--- /dev/null
+++ b/aurelia-knockout/aurelia-knockout-tests.ts
@@ -0,0 +1,11 @@
+
+export class ViewModel {
+
+ constructor(private knockoutBindable: KnockoutBindable) {
+ }
+
+ activate(settings: any): void {
+ this.knockoutBindable.applyBindableValues(settings, this);
+ this.knockoutBindable.applyBindableValues(settings, this, true);
+ }
+}
diff --git a/aurelia-knockout/index.d.ts b/aurelia-knockout/index.d.ts
new file mode 100644
index 0000000000..2ccec60b46
--- /dev/null
+++ b/aurelia-knockout/index.d.ts
@@ -0,0 +1,19 @@
+// Type definitions for aurelia-knockout 2.0
+// Project: https://github.com/code-chris/aurelia-knockout
+// Definitions by: Christian Kotzbauer
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare interface KnockoutBindable {
+
+ /**
+ * Applys all values from a data object (usually the activation data) to the corresponding instance fields
+ * in the current view model if they are marked as @bindable. By default all matching values from the data object
+ * are applied. To only apply observable values set the last parameter to `true`. Subscriptions are created
+ * for all Knockout observables in the data object to update the view-model values respectively.
+ *
+ * @param data - the data object
+ * @param target - the target view model
+ * @param applyOnlyObservables - `true` if only observable values should be applied, false by default.
+ */
+ applyBindableValues(data: any, target: any, applyOnlyObservables?: boolean): void;
+}
diff --git a/aurelia-knockout/tsconfig.json b/aurelia-knockout/tsconfig.json
new file mode 100644
index 0000000000..aa45dc1157
--- /dev/null
+++ b/aurelia-knockout/tsconfig.json
@@ -0,0 +1,23 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "lib": [
+ "es6",
+ "dom"
+ ],
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": false,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "aurelia-knockout-tests.ts"
+ ]
+}
diff --git a/fine-uploader/tslint.json b/aurelia-knockout/tslint.json
similarity index 100%
rename from fine-uploader/tslint.json
rename to aurelia-knockout/tslint.json
diff --git a/auth0-js/auth0-js-tests.ts b/auth0-js/auth0-js-tests.ts
index cbd791030b..cd7789c62d 100644
--- a/auth0-js/auth0-js-tests.ts
+++ b/auth0-js/auth0-js-tests.ts
@@ -61,8 +61,6 @@ webAuth.signupAndAuthorize({
});
-
-
webAuth.client.login({
realm: 'Username-Password-Authentication', //connection name or HRD domain
username: 'info@auth0.com',
@@ -73,6 +71,26 @@ webAuth.client.login({
// Auth tokens in the result or an error
});
+webAuth.popup.buildPopupHandler();
+webAuth.popup.preload({});
+webAuth.popup.authorize({}, (err, data) => {
+ if (err) /* handle error */ return;
+ // do something with data
+});
+webAuth.popup.loginWithCredentials({}, (err, data) => {
+ if (err) /* handle error */ return;
+ // do something with data
+});
+webAuth.popup.passwordlessVerify({}, (err, data) => {
+ if (err) /* handle error */ return;
+ // do something with data
+});
+webAuth.popup.signupAndLogin({}, (err, data) => {
+ if (err) /* handle error */ return;
+ // do something with data
+});
+
+
let authentication = new auth0.Authentication({
domain: 'me.auth0.com',
clientID: '...',
@@ -101,7 +119,9 @@ authentication.delegation({
refresh_token: 'your_refresh_token',
api_type: 'app'
}, (err, data) => {
-
+ if (!err) {
+ localStorage.setItem('token', data.idToken)
+ }
});
authentication.loginWithDefaultDirectory({
@@ -146,6 +166,8 @@ let management = new auth0.Management({
management.getUser('asd', (err, user) => {});
-management.patchUserMetadata('asd', {role: 'admin'}, (err, user) => {});
+management.patchUserMetadata('asd', {role: 'admin'}, (err, user) => {
+ if (!err && user.email_verified) return; // do something
+});
management.linkUser('asd', 'eqwe', (err, user) => {});
diff --git a/auth0-js/index.d.ts b/auth0-js/index.d.ts
index f51e3979d3..d8d1e6f392 100644
--- a/auth0-js/index.d.ts
+++ b/auth0-js/index.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Auth0.js 8.2
+// Type definitions for Auth0.js 8.3
// Project: https://github.com/auth0/auth0.js
// Definitions by: Adrian Chia
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -35,7 +35,7 @@ export class Authentication {
* @param {Object} options: https://auth0.com/docs/api-auth/grant/password
* @param {Function} callback
*/
- loginWithDefaultDirectory(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void;
+ loginWithDefaultDirectory(options: any, callback: Auth0Callback): void;
/**
* Makes a call to the `/ro` endpoint
@@ -43,21 +43,29 @@ export class Authentication {
* @param {Function} callback
* @deprecated `loginWithResourceOwner` will be soon deprecated, user `login` instead.
*/
- loginWithResourceOwner(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void;
+ loginWithResourceOwner(options: any, callback: Auth0Callback): void;
/**
* Makes a call to the `oauth/token` endpoint with `password-realm` grant type
* @param {any} options
* @param {Function} callback
*/
- login(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void;
+ login(options: any, callback: Auth0Callback): void;
/**
* Makes a call to the `oauth/token` endpoint
* @param {any} options
* @param {Function} callback
*/
- oauthToken(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void;
+ oauthToken(options: any, callback: Auth0Callback): void;
+
+ /**
+ * Makes a call to the `/ssodata` endpoint
+ *
+ * @method getSSOData
+ * @param {Function} callback
+ */
+ getSSOData(callback?: Auth0Callback): void;
/**
* Makes a call to the `/ssodata` endpoint
@@ -65,19 +73,8 @@ export class Authentication {
* @method getSSOData
* @param {Boolean} withActiveDirectories
* @param {Function} callback
- * @deprecated `getSSOData` will be soon deprecated.
*/
- getSSOData(callback?: (error?: Auth0Error, authResult?: any) => any): void;
-
- /**
- * Makes a call to the `/ssodata` endpoint
- *
- * @method getSSOData
- * @param {Boolean} withActiveDirectories
- * @param {Function} callback
- * @deprecated `getSSOData` will be soon deprecated.
- */
- getSSOData(withActiveDirectories: boolean, callback?: (error?: Auth0Error, authResult?: any) => any): void;
+ getSSOData(withActiveDirectories: boolean, callback?: Auth0Callback): void;
/**
* Makes a call to the `/userinfo` endpoint and returns the user profile
@@ -86,7 +83,7 @@ export class Authentication {
* @param {String} accessToken
* @param {Function} callback
*/
- userInfo(token: string, callback: (error?: Auth0Error, user?: any) => any): void;
+ userInfo(token: string, callback: Auth0Callback): void;
/**
* Makes a call to the `/delegation` endpoint
@@ -94,9 +91,8 @@ export class Authentication {
* @method delegation
* @param {Object} options: https://auth0.com/docs/api/authentication#!#post--delegation
* @param {Function} callback
- * @deprecated `delegation` will be soon deprecated.
*/
- delegation(options: any, callback: (error?: Auth0Error, authResult?: Auth0DelegationToken) => any): any;
+ delegation(options: any, callback: Auth0Callback): any;
/**
* Fetches the user country based on the ip.
@@ -104,7 +100,7 @@ export class Authentication {
* @method getUserCountry
* @param {Function} callback
*/
- getUserCountry(callback: (error?: Auth0Error, result?: any) => any): void;
+ getUserCountry(callback: Auth0Callback<{ countryCode: string }>): void;
}
export class PasswordlessAuthentication {
@@ -126,7 +122,7 @@ export class PasswordlessAuthentication {
* @param {Object} options: https://auth0.com/docs/api/authentication#passwordless
* @param {Function} callback
*/
- start(options: PasswordlessStartOptions, callback: any): void;
+ start(options: PasswordlessStartOptions, callback: Auth0Callback): void;
/**
* Verifies the passwordless TOTP and returns an error if any.
@@ -135,7 +131,7 @@ export class PasswordlessAuthentication {
* @param {Object} options
* @param {Function} callback
*/
- verify(options: any, callback: any): void;
+ verify(options: any, callback: Auth0Callback): void;
}
export class DBConnection {
@@ -148,7 +144,7 @@ export class DBConnection {
* @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup
* @param {Function} calback
*/
- signup(options: any, callback: any): void;
+ signup(options: any, callback: Auth0Callback): void;
/**
* Initializes the change password flow
@@ -157,7 +153,7 @@ export class DBConnection {
* @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-change_password
* @param {Function} callback
*/
- changePassword(options: ChangePasswordOptions, callback: any): void;
+ changePassword(options: ChangePasswordOptions, callback: Auth0Callback): void;
}
export class Management {
@@ -170,7 +166,7 @@ export class Management {
* @param {String} userId
* @param {Function} callback
*/
- getUser(userId: string, callback: (error?: Auth0Error, user?: any) => any): void;
+ getUser(userId: string, callback: Auth0Callback): void;
/**
* Updates the user metdata. It will patch the user metdata with the attributes sent.
@@ -181,7 +177,7 @@ export class Management {
* @param {Object} userMetadata
* @param {Function} callback
*/
- patchUserMetadata(userId: string, userMetadata: any, callback: (error?: Auth0Error, user?: any) => any): void;
+ patchUserMetadata(userId: string, userMetadata: any, callback: Auth0Callback): void;
/**
* Link two users. https://auth0.com/docs/api/management/v2#!/Users/post_identities
@@ -191,7 +187,7 @@ export class Management {
* @param {String} secondaryUserToken
* @param {Function} callback
*/
- linkUser(userId: string, secondaryUserToken: string, callback: (error?: Auth0Error, user?: any) => any): void;
+ linkUser(userId: string, secondaryUserToken: string, callback: Auth0Callback): void;
}
export class WebAuth {
@@ -217,12 +213,13 @@ export class WebAuth {
*
* @method parseHash
* @param {Object} options:
+ * @param {String} options._idTokenVerification [OPTIONAL] Default: true
* @param {String} options.state [OPTIONAL] to verify the response
* @param {String} options.nonce [OPTIONAL] to verify the id_token
* @param {String} options.hash [OPTIONAL] the url hash. If not provided it will extract from window.location.hash
* @param {Function} callback: any(err, token_payload)
*/
- parseHash(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void;
+ parseHash(options: any, callback: Auth0Callback): void;
/**
* Decodes the id_token and verifies the nonce.
@@ -233,7 +230,7 @@ export class WebAuth {
* @param {String} nonce
* @param {Function} callback: function(err, {payload, transaction})
*/
- validateToken(token: string, state: string, nonce: string, callback: any): void;
+ validateToken(token: string, state: string, nonce: string, callback: Auth0Callback): void;
/**
* Executes a silent authentication transaction under the hood in order to fetch a new token.
@@ -242,7 +239,7 @@ export class WebAuth {
* @param {Object} options: any valid oauth2 parameter to be sent to the `/authorize` endpoint
* @param {Function} callback
*/
- renewAuth(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void;
+ renewAuth(options: any, callback: Auth0Callback): void;
/**
* Initialices a change password transaction
@@ -251,7 +248,7 @@ export class WebAuth {
* @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-change_password
* @param {Function} callback
*/
- changePassword(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void;
+ changePassword(options: any, callback: Auth0Callback): void;
/**
* Signs up a new user
@@ -260,7 +257,7 @@ export class WebAuth {
* @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup
* @param {Function} callback
*/
- signup(options: any, callback: any): void;
+ signup(options: any, callback: Auth0Callback): void;
/**
* Signs up a new user, automatically logs the user in after the signup and returns the user token.
@@ -270,7 +267,7 @@ export class WebAuth {
* @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup
* @param {Function} callback
*/
- signupAndAuthorize(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void;
+ signupAndAuthorize(options: any, callback: Auth0Callback): void;
/**
* Redirects to the auth0 logout page
@@ -280,7 +277,19 @@ export class WebAuth {
*/
logout(options: any): void;
- passwordlessStart(options: PasswordlessStartOptions, callback: (error?: Auth0Error, data?: any) => any): void;
+ /**
+ * Initialices a passwordless authentication transaction
+ *
+ * @method passwordlessStart
+ * @param {Object} options: https://auth0.com/docs/api/authentication#passwordless
+ * @param {Object} options.send: `link` or `code`
+ * @param {Object} options.phoneNumber: send should be code and email not set
+ * @param {Object} options.email: phoneNumber should be ignored
+ * @param {Object} options.connection
+ * @param {Object} options.authParams
+ * @param {Function} callback
+ */
+ passwordlessStart(options: PasswordlessStartOptions, callback: Auth0Callback): void;
/**
* Verifies the passwordless TOTP and redirects to finish the passwordless transaction
@@ -294,7 +303,7 @@ export class WebAuth {
* @param {Object} options.verificationCode: the TOTP code
* @param {Function} callback
*/
- passwordlessVerify(options: any, callback: any): void;
+ passwordlessVerify(options: any, callback: Auth0Callback): void;
}
export class Redirect {
@@ -308,7 +317,7 @@ export class Redirect {
* @param {Function} callback
* @deprecated `webauth.popup.loginWithCredentials` will be soon deprecated, use `webauth.client.login` instead.
*/
- loginWithCredentials(options: any, callback: any): void;
+ loginWithCredentials(options: any, callback: Auth0Callback): void;
/**
* Signs up a new user and automatically logs the user in after the signup.
@@ -317,7 +326,7 @@ export class Redirect {
* @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup
* @param {Function} callback
*/
- signupAndLogin(options: any, callback: any): void;
+ signupAndLogin(options: any, callback: Auth0Callback): void;
}
export class Popup {
@@ -338,12 +347,6 @@ export class Popup {
*/
preload(options: any): any;
- /**
- * Internal use.
- *
- * @method getPopupHandler
- */
- getPopupHandler(options: any, preload: boolean): any;
/**
* Opens in a popup the hosted login page (`/authorize`) in order to initialize a new authN/authZ transaction
*
@@ -351,7 +354,7 @@ export class Popup {
* @param {Object} options: https://auth0.com/docs/api/authentication#!#get--authorize_db
* @param {Function} callback
*/
- authorize(options: any, callback: any): void;
+ authorize(options: any, callback: Auth0Callback): void;
/**
* Initializes the legacy Lock login flow in a popup
@@ -361,7 +364,7 @@ export class Popup {
* @param {Function} callback
* @deprecated `webauth.popup.loginWithCredentials` will be soon deprecated, use `webauth.client.login` instead.
*/
- loginWithCredentials(options: any, callback: any): void;
+ loginWithCredentials(options: any, callback: Auth0Callback): void;
/**
* Verifies the passwordless TOTP and returns the requested token
@@ -375,7 +378,7 @@ export class Popup {
* @param {Object} options.verificationCode: the TOTP code
* @param {Function} callback
*/
- passwordlessVerify(options: any, callback: any): void;
+ passwordlessVerify(options: any, callback: Auth0Callback): void;
/**
* Signs up a new user and automatically logs the user in after the signup.
@@ -384,9 +387,11 @@ export class Popup {
* @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup
* @param {Function} callback
*/
- signupAndLogin(options: any, callback: any): void;
+ signupAndLogin(options: any, callback: Auth0Callback): void;
}
+type Auth0Callback = (error: null | Auth0Error, result: T) => void;
+
interface ManagementOptions {
domain: string;
token: string;
@@ -441,7 +446,7 @@ interface Auth0DecodedHash {
/** Represents the response from an API Token Delegation request. */
interface Auth0DelegationToken {
/** The length of time in seconds the token is valid for. */
- ExpiresIn: number;
+ expiresIn: number;
/** The JWT for delegated access. */
idToken: string;
/** The type of token being returned. Possible values: "Bearer" */
@@ -470,42 +475,42 @@ interface PasswordlessVerifyOptions {
}
interface Auth0UserProfile {
- name: string;
- nickname: string;
- picture: string;
- user_id: string;
- username?: string;
- given_name?: string;
- family_name?: string;
- email?: string;
- email_verified?: string;
- clientID: string;
- gender?: string;
- locale?: string;
- identities: Auth0Identity[];
- created_at: string;
- updated_at: string;
- sub: string;
- user_metadata?: any;
- app_metadata?: any;
+ name: string;
+ nickname: string;
+ picture: string;
+ user_id: string;
+ username?: string;
+ given_name?: string;
+ family_name?: string;
+ email?: string;
+ email_verified?: string;
+ clientID: string;
+ gender?: string;
+ locale?: string;
+ identities: Auth0Identity[];
+ created_at: string;
+ updated_at: string;
+ sub: string;
+ user_metadata?: any;
+ app_metadata?: any;
}
interface MicrosoftUserProfile extends Auth0UserProfile {
- emails?: string[]; //optional depending on whether email addresses permission is granted
+ emails?: string[]; //optional depending on whether email addresses permission is granted
}
interface Office365UserProfile extends Auth0UserProfile {
- tenantid: string;
- upn: string;
+ tenantid: string;
+ upn: string;
}
interface AdfsUserProfile extends Auth0UserProfile {
- issuer?: string;
+ issuer?: string;
}
interface Auth0Identity {
- connection: string;
- isSocial: boolean;
- provider: string;
- user_id: string;
+ connection: string;
+ isSocial: boolean;
+ provider: string;
+ user_id: string;
}
diff --git a/auth0/auth0-tests.ts b/auth0/auth0-tests.ts
index 502a72eec1..24a4aad87d 100644
--- a/auth0/auth0-tests.ts
+++ b/auth0/auth0-tests.ts
@@ -1,5 +1,3 @@
-///
-
import * as auth0 from 'auth0';
const management = new auth0.ManagementClient({
diff --git a/autoprefixer/autoprefixer-tests.ts b/autoprefixer/autoprefixer-tests.ts
new file mode 100644
index 0000000000..47ef1cbc08
--- /dev/null
+++ b/autoprefixer/autoprefixer-tests.ts
@@ -0,0 +1,17 @@
+import * as autopref from 'autoprefixer';
+
+const ap: autopref.Transformer = autopref({
+ browsers: ['> 5%', 'last 2 versions'],
+ env: '',
+ cascade: true,
+ add: true,
+ remove: true,
+ supports: true,
+ flexbox: true,
+ grid: true,
+ stats: {},
+});
+const ap2: autopref.Transformer = autopref({
+ flexbox: 'no-2009',
+});
+const info: string = ap.info();
diff --git a/autoprefixer/index.d.ts b/autoprefixer/index.d.ts
new file mode 100644
index 0000000000..0a01c34d9a
--- /dev/null
+++ b/autoprefixer/index.d.ts
@@ -0,0 +1,32 @@
+// Type definitions for autoprefixer 6.7
+// Project: https://github.com/postcss/autoprefixer
+// Definitions by: Armando Meziat
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+import { Plugin, Transformer as PostcssTransformer } from 'postcss';
+
+declare namespace autoprefixer {
+
+ export interface Options {
+ browsers?: string[];
+ env?: string;
+ cascade?: boolean;
+ add?: boolean;
+ remove?: boolean;
+ supports?: boolean;
+ flexbox?: boolean | 'no-2009';
+ grid?: boolean;
+ stats?: any;
+ }
+
+ export interface Transformer extends PostcssTransformer {
+ info(): string;
+ }
+
+ export interface Autoprefixer extends Plugin {
+ (opts?: Options): Transformer;
+ }
+}
+
+declare const autoprefixer: autoprefixer.Autoprefixer;
+export = autoprefixer;
diff --git a/autoprefixer/package.json b/autoprefixer/package.json
new file mode 100644
index 0000000000..aa284a6db8
--- /dev/null
+++ b/autoprefixer/package.json
@@ -0,0 +1,5 @@
+{
+ "dependencies": {
+ "postcss": "^5.2.15"
+ }
+}
diff --git a/autoprefixer/tsconfig.json b/autoprefixer/tsconfig.json
new file mode 100644
index 0000000000..244c865adf
--- /dev/null
+++ b/autoprefixer/tsconfig.json
@@ -0,0 +1,22 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "lib": [
+ "es6"
+ ],
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": true,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "autoprefixer-tests.ts"
+ ]
+}
diff --git a/autoprefixer/tslint.json b/autoprefixer/tslint.json
new file mode 100644
index 0000000000..377cc837d4
--- /dev/null
+++ b/autoprefixer/tslint.json
@@ -0,0 +1 @@
+{ "extends": "../tslint.json" }
diff --git a/autosize/autosize-tests.ts b/autosize/autosize-tests.ts
index a7eea57a62..fa0988be24 100644
--- a/autosize/autosize-tests.ts
+++ b/autosize/autosize-tests.ts
@@ -1,5 +1,3 @@
-///
-
// from a NodeList
autosize(document.querySelectorAll('textarea'));
diff --git a/awesomplete/awesomplete-tests.ts b/awesomplete/awesomplete-tests.ts
index 11abfdcba0..7998dc49e3 100644
--- a/awesomplete/awesomplete-tests.ts
+++ b/awesomplete/awesomplete-tests.ts
@@ -1,3 +1,5 @@
+import * as Awesomplete from 'awesomplete';
+
var input = document.getElementById("myinput");
new Awesomplete(input, {list: "#mylist"});
@@ -11,45 +13,48 @@ var awesomplete = new Awesomplete(input);
awesomplete.list = ["Ada", "Java", "JavaScript", "LOLCODE", "Node.js", "Ruby on Rails"];
new Awesomplete(input, {
- list: [
- { label: "Belarus", value: "BY" },
- { label: "China", value: "CN" },
- { label: "United States", value: "US" }
- ]
+ list: [
+ { label: "Belarus", value: "BY" },
+ { label: "China", value: "CN" },
+ { label: "United States", value: "US" }
+ ]
});
// Same with arrays:
new Awesomplete(input, {
- list: [
- [ "Belarus", "BY" ],
- [ "China", "CN" ],
- [ "United States", "US" ]
- ]
+ list: [
+ [ "Belarus", "BY" ],
+ [ "China", "CN" ],
+ [ "United States", "US" ]
+ ]
});
new Awesomplete('input[type="email"]', {
- list: ["aol.com", "att.net", "comcast.net", "facebook.com", "gmail.com", "gmx.com", "googlemail.com", "google.com", "hotmail.com", "hotmail.co.uk", "mac.com", "me.com", "mail.com", "msn.com", "live.com", "sbcglobal.net", "verizon.net", "yahoo.com", "yahoo.co.uk"],
- data: function (text: string, input: any) {
- return input.slice(0, input.indexOf("@")) + "@" + text;
- },
- filter: Awesomplete.FILTER_STARTSWITH
+ list: ["aol.com", "att.net", "comcast.net", "facebook.com", "gmail.com",
+ "gmx.com", "googlemail.com", "google.com", "hotmail.com",
+ "hotmail.co.uk", "mac.com", "me.com", "mail.com", "msn.com",
+ "live.com", "sbcglobal.net", "verizon.net", "yahoo.com", "yahoo.co.uk"],
+ data: (text: string, input: string) => {
+ return input.slice(0, input.indexOf("@")) + "@" + text;
+ },
+ filter: Awesomplete.FILTER_STARTSWITH
});
new Awesomplete('input[data-multiple]', {
- filter: function(text: string, input: any) {
- return Awesomplete.FILTER_CONTAINS(text, input.match(/[^,]*$/)[0]);
- },
+ filter: (text: string, input: any) => {
+ return Awesomplete.FILTER_CONTAINS(text, input.match(/[^,]*$/)[0]);
+ },
- replace: function(text: string) {
- var before = this.input.value.match(/^.+,\s*|/)[0];
- this.input.value = before + text + ", ";
- }
+ replace: (text: string) => {
+ var before = this.input.value.match(/^.+,\s*|/)[0];
+ this.input.value = before + text + ", ";
+ }
});
var ajax = new XMLHttpRequest();
ajax.open("GET", "https://restcountries.eu/rest/v1/lang/fr", true);
-ajax.onload = function() {
- var list = JSON.parse(ajax.responseText).map(function(i: any) { return i.name; });
- new Awesomplete(document.querySelector("#ajax-example input"),{ list: list });
+ajax.onload = () => {
+ var list = JSON.parse(ajax.responseText).map((i: any) => { return i.name; });
+ new Awesomplete(document.querySelector("#ajax-example input"), { list: list });
};
-ajax.send();
\ No newline at end of file
+ajax.send();
diff --git a/awesomplete/index.d.ts b/awesomplete/index.d.ts
index d39389f008..9b8976cfd1 100644
--- a/awesomplete/index.d.ts
+++ b/awesomplete/index.d.ts
@@ -1,49 +1,57 @@
-// Type definitions for Awesomplete v1.1.0
+// Type definitions for Awesomplete 1.1
// Project: https://leaverou.github.io/awesomplete/
-// Definitions by: webbiesdk , Ben Dixon
+// Definitions by: webbiesdk , Ben Dixon , Trevor Bekolay
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare class Awesomplete {
- constructor(input: Element | HTMLElement | string, o?: AwesompleteOptions);
- static all: Array;
- static $$: (expr: string | NodeSelector, con?: any) => NodeList;
- static ITEM: (text: string, input: string) => HTMLElement;
- static $: {
- (expr: string|Element, con?: NodeSelector): string | Element;
- regExpEscape: (s: { replace: (arg0: RegExp, arg1: string) => void }) => any;
- create: (tag: string, o: any) => HTMLElement;
- fire: (target: EventTarget, type: string, properties: any) => any;
- siblingIndex: (el: Element) => number;
- };
- static FILTER_STARTSWITH: (text: string, input: string) => boolean;
- static FILTER_CONTAINS: (text: string, input: string) => boolean;
- static SORT_BYLENGTH: (a: number | any[], b: number | any[]) => number;
- static REPLACE: (text: any) => void;
- next: () => void;
- container: HTMLElement;
- select: (selected?: HTMLElement, originalTarget?: HTMLElement) => void;
- previous: () => void;
- index: number;
- opened: number;
- list: string | string[] | Element | { label: string, value: any }[] | [string, string][];
- input: HTMLElement | string;
- goto: (i: number) => void;
- ul: HTMLElement;
- close: () => void;
- evaluate: () => void;
- selected: boolean;
- open: () => void;
- status: HTMLElement;
+ constructor(input: Element | HTMLElement | string, o?: Awesomplete.Options);
+ static all: any[];
+ static $$: (expr: string | NodeSelector, con?: any) => NodeList;
+ static ITEM: (text: string, input: string) => HTMLElement;
+ static $: {
+ (expr: string|Element, con?: NodeSelector): string | Element;
+ regExpEscape: (s: { replace: (arg0: RegExp, arg1: string) => void }) => any;
+ create: (tag: string, o: any) => HTMLElement;
+ fire: (target: EventTarget, type: string, properties: any) => any;
+ siblingIndex: (el: Element) => number;
+ };
+ static FILTER_STARTSWITH: (text: string, input: string) => boolean;
+ static FILTER_CONTAINS: (text: string, input: string) => boolean;
+ static SORT_BYLENGTH: (left: number | any[], right: number | any[]) => number;
+ static REPLACE: (text: string) => void;
+ static DATA: (item: Awesomplete.Suggestion) => Awesomplete.Suggestion;
+ next: () => void;
+ container: HTMLElement;
+ select: (selected?: HTMLElement, originalTarget?: HTMLElement) => void;
+ previous: () => void;
+ index: number;
+ opened: number;
+ list: string | Element | Awesomplete.Suggestion[];
+ input: HTMLElement | string;
+ goto: (i: number) => void;
+ ul: HTMLElement;
+ close: () => void;
+ evaluate: () => void;
+ selected: boolean;
+ open: () => void;
+ status: HTMLElement;
}
-interface AwesompleteOptions {
- list?: string | string[] | Element | { label: string, value: any }[] | [string, string][];
- minChars?: Number;
- maxItems?: Number;
- autoFirst?: boolean;
- data?: Function;
- filter?: Function;
- sort?: Function;
- item?: Function;
- replace?: Function;
+declare namespace Awesomplete {
+ type Suggestion = string | {label: string | any, value: string | any} | [string, string];
+
+ interface Options {
+ list?: string | string[] | Element | { label: string, value: any }[] | [string, string][];
+ minChars?: number;
+ maxItems?: number;
+ autoFirst?: boolean;
+ data?: (item: Suggestion, input: string) => string;
+ filter?: (text: string, input: string) => boolean;
+ sort?: (left: number | any[], right: number | any[]) => number;
+ item?: (text: string, input: string) => HTMLElement;
+ replace?: (text: string) => void;
+ }
}
+
+export = Awesomplete;
+export as namespace Awesomplete;
diff --git a/awesomplete/tslint.json b/awesomplete/tslint.json
new file mode 100644
index 0000000000..377cc837d4
--- /dev/null
+++ b/awesomplete/tslint.json
@@ -0,0 +1 @@
+{ "extends": "../tslint.json" }
diff --git a/aws-lambda/aws-lambda-tests.ts b/aws-lambda/aws-lambda-tests.ts
index fb09beda8a..1ffdb2980b 100644
--- a/aws-lambda/aws-lambda-tests.ts
+++ b/aws-lambda/aws-lambda-tests.ts
@@ -1,5 +1,3 @@
-///
-
var str: string = "any string";
var date: Date = new Date();
var anyObj: any = { abc: 123 };
@@ -13,6 +11,12 @@ var clientContextClient: AWSLambda.ClientContextClient;
var context: AWSLambda.Context;
var identity: AWSLambda.CognitoIdentity;
var proxyResult: AWSLambda.ProxyResult;
+var snsEvt: AWSLambda.SNSEvent;
+var snsEvtRecs: Array;
+var snsEvtRec: AWSLambda.SNSEventRecord;
+var snsMsg: AWSLambda.SNSMessage;
+var snsMsgAttr: AWSLambda.SNSMessageAttribute;
+var snsMsgAttrs: AWSLambda.SNSMessageAttributes;
/* API Gateway Event */
str = apiGwEvt.body;
@@ -44,9 +48,36 @@ str = apiGwEvt.requestContext.resourceId;
str = apiGwEvt.requestContext.resourcePath;
str = apiGwEvt.resource;
+/* SNS Event */
+snsEvtRecs = snsEvt.Records;
+
+str = snsEvtRec.EventSource;
+str = snsEvtRec.EventSubscriptionArn;
+str = snsEvtRec.EventVersion;
+snsMsg = snsEvtRec.Sns;
+
+str = snsMsg.SignatureVersion;
+str = snsMsg.Timestamp;
+str = snsMsg.Signature;
+str = snsMsg.SigningCertUrl;
+str = snsMsg.MessageId;
+str = snsMsg.Message;
+snsMsgAttrs = snsMsg.MessageAttributes;
+str = snsMsg.Type;
+str = snsMsg.UnsubscribeUrl;
+str = snsMsg.TopicArn;
+str = snsMsg.Subject;
+
+snsMsgAttrs["example"] = snsMsgAttr;
+
+str = snsMsgAttr.Type;
+str = snsMsgAttr.Value;
+
/* Lambda Proxy Result */
num = proxyResult.statusCode;
-str = proxyResult.headers["example"];
+proxyResult.headers["example"] = str;
+proxyResult.headers["example"] = b;
+proxyResult.headers["example"] = num;
str = proxyResult.body
/* Context */
diff --git a/aws-lambda/index.d.ts b/aws-lambda/index.d.ts
index e8b70db7bd..83579b4d0d 100644
--- a/aws-lambda/index.d.ts
+++ b/aws-lambda/index.d.ts
@@ -39,6 +39,41 @@ interface APIGatewayEvent {
resource: string;
}
+// SNS "event"
+interface SNSMessageAttribute {
+ Type: string;
+ Value: string;
+}
+
+interface SNSMessageAttributes {
+ [name: string]: SNSMessageAttribute;
+}
+
+interface SNSMessage {
+ SignatureVersion: string;
+ Timestamp: string;
+ Signature: string;
+ SigningCertUrl: string;
+ MessageId: string;
+ Message: string;
+ MessageAttributes: SNSMessageAttributes;
+ Type: string;
+ UnsubscribeUrl: string;
+ TopicArn: string;
+ Subject: string;
+}
+
+interface SNSEventRecord {
+ EventVersion: string;
+ EventSubscriptionArn: string;
+ EventSource: string;
+ Sns: SNSMessage;
+}
+
+interface SNSEvent {
+ Records: Array;
+}
+
// Context
// http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html
interface Context {
@@ -97,7 +132,7 @@ interface ClientContextEnv {
interface ProxyResult {
statusCode: number;
headers?: {
- [header: string]: string;
+ [header: string]: boolean | number | string;
},
body: string;
}
@@ -110,8 +145,8 @@ interface ProxyResult {
* @param context – runtime information of the Lambda function that is executing.
* @param callback – optional callback to return information to the caller, otherwise return value is null.
*/
-export type Handler = (event: any, context: Context, callback?: Callback) => void;
-export type ProxyHandler = (event: APIGatewayEvent, context: Context, callback?: ProxyCallback) => void;
+export type Handler = (event: any, context: Context, callback?: Callback) => void;
+export type ProxyHandler = (event: APIGatewayEvent, context: Context, callback?: ProxyCallback) => void;
/**
* Optional callback parameter.
diff --git a/aws-serverless-express/aws-serverless-express-tests.ts b/aws-serverless-express/aws-serverless-express-tests.ts
index c46056ed25..97d236e043 100644
--- a/aws-serverless-express/aws-serverless-express-tests.ts
+++ b/aws-serverless-express/aws-serverless-express-tests.ts
@@ -1,9 +1,10 @@
-///
-
import * as awsServerlessExpress from 'aws-serverless-express';
import * as express from 'express';
+import { eventContext } from 'aws-serverless-express/middleware';
const app = express();
+app.use(eventContext());
+
const server = awsServerlessExpress.createServer(app, () => {});
const mockEvent = {
diff --git a/aws-serverless-express/index.d.ts b/aws-serverless-express/index.d.ts
index e4601e6ccd..db49e6ca6b 100644
--- a/aws-serverless-express/index.d.ts
+++ b/aws-serverless-express/index.d.ts
@@ -1,6 +1,6 @@
-// Type definitions for aws-serverless-express
+// Type definitions for aws-serverless-express 2.1
// Project: https://github.com/awslabs/aws-serverless-express
-// Definitions by: Ben Speakman
+// Definitions by: Ben Speakman , Josh Caffey
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///
@@ -16,4 +16,4 @@ export function proxy(
server: http.Server,
event: any,
context: lambda.Context
-): void;
\ No newline at end of file
+): void;
diff --git a/aws-serverless-express/middleware.d.ts b/aws-serverless-express/middleware.d.ts
new file mode 100644
index 0000000000..ff33b4c6ea
--- /dev/null
+++ b/aws-serverless-express/middleware.d.ts
@@ -0,0 +1,8 @@
+import { RequestHandler } from 'express';
+
+export interface Options {
+ reqPropKey?: string;
+ deleteHeaders?: boolean;
+}
+
+export function eventContext(options?: Options): RequestHandler;
diff --git a/aws-serverless-express/tsconfig.json b/aws-serverless-express/tsconfig.json
index a62cead1a1..62885fcda3 100644
--- a/aws-serverless-express/tsconfig.json
+++ b/aws-serverless-express/tsconfig.json
@@ -17,6 +17,7 @@
},
"files": [
"index.d.ts",
+ "middleware.d.ts",
"aws-serverless-express-tests.ts"
]
-}
\ No newline at end of file
+}
diff --git a/aws-serverless-express/tslint.json b/aws-serverless-express/tslint.json
new file mode 100644
index 0000000000..377cc837d4
--- /dev/null
+++ b/aws-serverless-express/tslint.json
@@ -0,0 +1 @@
+{ "extends": "../tslint.json" }
diff --git a/babel-template/babel-template-tests.ts b/babel-template/babel-template-tests.ts
index b5d4547188..31e3bd44d9 100644
--- a/babel-template/babel-template-tests.ts
+++ b/babel-template/babel-template-tests.ts
@@ -1,7 +1,4 @@
-
///
-///
-
// Example from https://github.com/babel/babel/tree/master/packages/babel-template
import template = require('babel-template');
diff --git a/babel-traverse/babel-traverse-tests.ts b/babel-traverse/babel-traverse-tests.ts
index 3779852c5f..98afbbc0a7 100644
--- a/babel-traverse/babel-traverse-tests.ts
+++ b/babel-traverse/babel-traverse-tests.ts
@@ -1,5 +1,3 @@
-
-///
///
diff --git a/babylon/babylon-tests.ts b/babylon/babylon-tests.ts
index bb95625935..769d635e89 100644
--- a/babylon/babylon-tests.ts
+++ b/babylon/babylon-tests.ts
@@ -1,8 +1,3 @@
-
-///
-///
-
-
// Example from https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#babylon
import * as babylon from "babylon";
declare function assert(expr: boolean): void;
diff --git a/babylon/index.d.ts b/babylon/index.d.ts
index 45b929264d..4400a8f1a0 100644
--- a/babylon/index.d.ts
+++ b/babylon/index.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for babylon v6.7
+// Type definitions for babylon v6.16.1
// Project: https://github.com/babel/babylon
// Definitions by: Troy Gerwien
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -41,7 +41,17 @@ export interface BabylonOptions {
plugins?: PluginName[];
}
-export type PluginName = 'jsx' | 'flow' | 'asyncFunctions' | 'classConstructorCall' | 'doExpressions'
- | 'trailingFunctionCommas' | 'objectRestSpread' | 'decorators' | 'classProperties' | 'exportExtensions'
- | 'exponentiationOperator' | 'asyncGenerators' | 'functionBind' | 'functionSent' | '*';
-
+export type PluginName =
+ 'estree' |
+ 'jsx' |
+ 'flow' |
+ 'classConstructorCall' |
+ 'doExpressions' |
+ 'objectRestSpread' |
+ 'decorators' |
+ 'classProperties' |
+ 'exportExtensions' |
+ 'asyncGenerators' |
+ 'functionBind' |
+ 'functionSent' |
+ 'dynamicImport';
diff --git a/backbone.layoutmanager/backbone.layoutmanager-tests.ts b/backbone.layoutmanager/backbone.layoutmanager-tests.ts
index fe11ce9b18..edddb8352b 100644
--- a/backbone.layoutmanager/backbone.layoutmanager-tests.ts
+++ b/backbone.layoutmanager/backbone.layoutmanager-tests.ts
@@ -1,5 +1,3 @@
-///
-
import * as Backbone from 'backbone';
// Example code.
@@ -26,7 +24,7 @@ class View extends Backbone.Layout {
"mouseleave": "removeElement"
}
}
-
+
wrapElement(): void {
this.$el.wrap("");
}
diff --git a/backbone/backbone-tests.ts b/backbone/backbone-tests.ts
index accdb93979..c074ac57e5 100644
--- a/backbone/backbone-tests.ts
+++ b/backbone/backbone-tests.ts
@@ -1,5 +1,3 @@
-///
-
function test_events() {
var object = new Backbone.Events();
diff --git a/bardjs/bardjs-tests.ts b/bardjs/bardjs-tests.ts
index 2d312634ca..91172b7255 100644
--- a/bardjs/bardjs-tests.ts
+++ b/bardjs/bardjs-tests.ts
@@ -1,6 +1,3 @@
-///
-///
-
import * as angular from 'angular';
import 'angular-mocks';
diff --git a/batch-stream/batch-stream-tests.ts b/batch-stream/batch-stream-tests.ts
index d3195466e8..4554530072 100644
--- a/batch-stream/batch-stream-tests.ts
+++ b/batch-stream/batch-stream-tests.ts
@@ -1,5 +1,3 @@
-///
-
import fs = require('fs');
import BatchStream = require('batch-stream');
diff --git a/bazinga-translator/bazinga-translator-tests.ts b/bazinga-translator/bazinga-translator-tests.ts
index 8c5d1dafa8..3856ff22a1 100644
--- a/bazinga-translator/bazinga-translator-tests.ts
+++ b/bazinga-translator/bazinga-translator-tests.ts
@@ -1,5 +1,3 @@
-///
-
Translator.fallback = 'en';
Translator.defaultDomain = 'messages';
diff --git a/bezier-js/bezier-js-tests.ts b/bezier-js/bezier-js-tests.ts
index f5fba4d947..003b6e1c45 100644
--- a/bezier-js/bezier-js-tests.ts
+++ b/bezier-js/bezier-js-tests.ts
@@ -1,5 +1,3 @@
-///
-
function test() {
var bezierjs: typeof BezierJs;
diff --git a/big-integer/big-integer-tests.ts b/big-integer/big-integer-tests.ts
index 2ab3c1fad5..62f234b371 100644
--- a/big-integer/big-integer-tests.ts
+++ b/big-integer/big-integer-tests.ts
@@ -113,5 +113,6 @@ isBigInteger = x.times( "100" );
isNumber = x.toJSNumber();
isString = x.toString();
+isString = x.toString(36);
isNumber = x.valueOf();
diff --git a/big-integer/index.d.ts b/big-integer/index.d.ts
index 452593e950..f8ca2b488c 100644
--- a/big-integer/index.d.ts
+++ b/big-integer/index.d.ts
@@ -195,7 +195,7 @@ interface BigInteger {
toJSNumber(): number;
/** Converts a bigInt to a string. */
- toString(): string;
+ toString( radix?: number ): string;
/** Converts a bigInt to a native Javascript number. This override allows you to use native arithmetic operators without explicit conversion. */
valueOf(): number;
diff --git a/bignumber.js/bignumber.js-tests.ts b/bignumber.js/bignumber.js-tests.ts
new file mode 100644
index 0000000000..a375fc60cd
--- /dev/null
+++ b/bignumber.js/bignumber.js-tests.ts
@@ -0,0 +1,445 @@
+var x: BigNumber.BigNumber = new BigNumber(9)
+var y = new BigNumber(x)
+
+BigNumber(435.345)
+
+new BigNumber('5032485723458348569331745.33434346346912144534543')
+new BigNumber('4.321e+4')
+new BigNumber('-735.0918e-430')
+new BigNumber(Infinity)
+new BigNumber(NaN)
+new BigNumber('.5')
+new BigNumber('+2')
+new BigNumber(-10110100.1, 2)
+new BigNumber(-0b10110100)
+new BigNumber('123412421.234324', 5)
+new BigNumber('ff.8', 16)
+new BigNumber('0xff.8')
+
+new BigNumber(9, 2)
+
+new BigNumber(96517860459076817.4395)
+
+new BigNumber('blurgh')
+
+BigNumber.config({ DECIMAL_PLACES: 5 })
+new BigNumber(1.23456789)
+new BigNumber(1.23456789, 10)
+
+BigNumber.config({ DECIMAL_PLACES: 5 })
+var BN = BigNumber.another({ DECIMAL_PLACES: 9 })
+
+x = new BigNumber(1)
+y = new BN(1)
+
+x.div(3)
+y.div(3)
+
+BN = BigNumber.another()
+BN.config({ DECIMAL_PLACES: 9 })
+
+BigNumber.config({ DECIMAL_PLACES: 5 })
+BigNumber.set({ DECIMAL_PLACES: 5 })
+BigNumber.config(5)
+
+BigNumber.config({ ROUNDING_MODE: 0 })
+BigNumber.config(undefined, BigNumber.ROUND_UP)
+
+BigNumber.config({ EXPONENTIAL_AT: 2 })
+new BigNumber(12.3)
+new BigNumber(123)
+new BigNumber(0.123)
+new BigNumber(0.0123)
+
+BigNumber.config({ EXPONENTIAL_AT: [-7, 20] })
+new BigNumber(123456789)
+new BigNumber(0.000000123)
+
+BigNumber.config({ EXPONENTIAL_AT: 1e+9 })
+
+BigNumber.config({ EXPONENTIAL_AT: 0 })
+
+BigNumber.config({ RANGE: 500 })
+BigNumber.config().RANGE
+new BigNumber('9.999e499')
+new BigNumber('1e500')
+new BigNumber('1e-499')
+new BigNumber('1e-500')
+
+BigNumber.config({ RANGE: [-3, 4] })
+new BigNumber(99999)
+new BigNumber(100000)
+new BigNumber(0.001)
+new BigNumber(0.0001)
+
+BigNumber.config({ ERRORS: false })
+
+BigNumber.config({ CRYPTO: true })
+BigNumber.config().CRYPTO
+BigNumber.random()
+
+BigNumber.config({ MODULO_MODE: BigNumber.EUCLID })
+BigNumber.config({ MODULO_MODE: 9 })
+
+BigNumber.config({ POW_PRECISION: 100 })
+
+BigNumber.config({
+ FORMAT: {
+ decimalSeparator: '.',
+ groupSeparator: ',',
+ groupSize: 3,
+ secondaryGroupSize: 0,
+ fractionGroupSeparator: ' ',
+ fractionGroupSize: 0
+ }
+});
+
+BigNumber.config({
+ DECIMAL_PLACES: 40,
+ ROUNDING_MODE: BigNumber.ROUND_HALF_CEIL,
+ EXPONENTIAL_AT: [-10, 20],
+ RANGE: [-500, 500],
+ ERRORS: true,
+ CRYPTO: true,
+ MODULO_MODE: BigNumber.ROUND_FLOOR,
+ POW_PRECISION: 80,
+ FORMAT: {
+ groupSize: 3,
+ groupSeparator: ' ',
+ decimalSeparator: ','
+ }
+});
+
+BigNumber.config(40, 7, [-10, 20], 500, 1, 1, 3, 80)
+
+var obj = BigNumber.config();
+obj.ERRORS
+obj.RANGE
+
+x = new BigNumber('3257869345.0378653')
+BigNumber.max(4e9, x, '123456789.9')
+
+var arr = [12, '13', new BigNumber(14)]
+BigNumber.max(arr)
+
+x = new BigNumber('3257869345.0378653')
+BigNumber.min(4e9, x, '123456789.9')
+
+arr = [2, new BigNumber(-14), '-15.9999', -12]
+BigNumber.min(arr)
+
+BigNumber.config({ DECIMAL_PLACES: 10 })
+BigNumber.random()
+BigNumber.random(20)
+
+BigNumber.config({ ROUNDING_MODE: BigNumber.ROUND_CEIL })
+BigNumber.config({ ROUNDING_MODE: 2 })
+
+x = new BigNumber(-0.8)
+y = x.absoluteValue()
+var z = y.abs()
+
+x = new BigNumber(1.3)
+x.ceil()
+y = new BigNumber(-1.8)
+y.ceil()
+
+x = new BigNumber(Infinity)
+y = new BigNumber(5)
+x.comparedTo(y)
+x.comparedTo(x.minus(1))
+y.cmp(NaN)
+y.cmp('110', 2)
+
+x = new BigNumber(123.45)
+x.decimalPlaces()
+y = new BigNumber('9.9e-101')
+y.dp()
+
+x = new BigNumber(355)
+y = new BigNumber(113)
+x.dividedBy(y)
+x.div(5)
+x.div(47, 16)
+
+x = new BigNumber(5)
+y = new BigNumber(3)
+x.dividedToIntegerBy(y)
+x.divToInt(0.7)
+x.divToInt('0.f', 16)
+
+0 === 1e-324
+x = new BigNumber(0)
+x.equals('1e-324')
+BigNumber(-0).eq(x)
+BigNumber(255).eq('ff', 16)
+
+y = new BigNumber(NaN)
+y.equals(NaN)
+
+x = new BigNumber(1.8)
+x.floor()
+y = new BigNumber(-1.3)
+y.floor()
+
+0.1 > (0.3 - 0.2)
+x = new BigNumber(0.1)
+x.greaterThan(BigNumber(0.3).minus(0.2))
+BigNumber(0).gt(x)
+BigNumber(11, 3).gt(11.1, 2)
+
+x = new BigNumber(0.3).minus(0.2)
+x.greaterThanOrEqualTo(0.1)
+BigNumber(1).gte(x)
+BigNumber(10, 18).gte('i', 36)
+
+x = new BigNumber(1)
+x.isFinite()
+y = new BigNumber(Infinity)
+y.isFinite()
+
+x = new BigNumber(1)
+x.isInteger()
+y = new BigNumber(123.456)
+y.isInt()
+
+x = new BigNumber(NaN)
+x.isNaN()
+y = new BigNumber('Infinity')
+y.isNaN()
+
+x = new BigNumber(-0)
+x.isNegative()
+y = new BigNumber(2)
+y.isNeg()
+
+x = new BigNumber(-0)
+x.isZero() && x.isNeg()
+y = new BigNumber(Infinity)
+y.isZero()
+
+x = new BigNumber(0.3).minus(0.2)
+x.lessThan(0.1)
+BigNumber(0).lt(x)
+BigNumber(11.1, 2).lt(11, 3)
+
+x = new BigNumber(0.1)
+x.lessThanOrEqualTo(BigNumber(0.3).minus(0.2))
+BigNumber(-1).lte(x)
+BigNumber(10, 18).lte('i', 36)
+
+x = new BigNumber(0.3)
+x.minus(0.1)
+x.sub(0.6, 20)
+
+x = new BigNumber(1)
+x.modulo(0.9)
+y = new BigNumber(33)
+y.mod('a', 33)
+
+x = new BigNumber(1.8)
+x.negated()
+y = new BigNumber(-1.3)
+y.neg()
+
+x = new BigNumber(0.1)
+y = x.plus(0.2)
+BigNumber(0.7).plus(x).add(y)
+x.plus('0.1', 8)
+
+x = new BigNumber(1.234)
+x.precision()
+y = new BigNumber(987000)
+y.sd()
+y.sd(true)
+
+y = new BigNumber(x)
+y.round()
+y.round(1)
+y.round(2)
+y.round(10)
+y.round(0, 1)
+y.round(0, 6)
+y.round(1, 1)
+y.round(1, BigNumber.ROUND_HALF_EVEN)
+y
+
+x = new BigNumber(1.23)
+x.shift(3)
+x.shift(-3)
+
+x = new BigNumber(16)
+x.squareRoot()
+y = new BigNumber(3)
+y.sqrt()
+
+x = new BigNumber(0.6)
+y = x.times(3)
+BigNumber('7e+500').times(y)
+x.times('-a', 16)
+
+BigNumber.config({ DECIMAL_PLACES: 5, ROUNDING_MODE: 4 })
+x = new BigNumber(9876.54321)
+
+x.toDigits()
+x.toDigits(6)
+x.toDigits(6, BigNumber.ROUND_UP)
+x.toDigits(2)
+x.toDigits(2, 1)
+x
+
+y = new BigNumber(45.6)
+y.toExponential()
+y.toExponential(0)
+y.toExponential(1)
+y.toExponential(1, 1)
+y.toExponential(3)
+
+y = new BigNumber(3.456)
+y.toFixed()
+y.toFixed(0)
+y.toFixed(2)
+y.toFixed(2, 1)
+y.toFixed(5)
+
+var format = {
+ decimalSeparator: '.',
+ groupSeparator: ',',
+ groupSize: 3,
+ secondaryGroupSize: 0,
+ fractionGroupSeparator: ' ',
+ fractionGroupSize: 0
+}
+BigNumber.config({ FORMAT: format })
+
+x = new BigNumber('123456789.123456789')
+x.toFormat()
+x.toFormat(1)
+
+format.groupSeparator = ' '
+format.fractionGroupSize = 5
+x.toFormat()
+
+BigNumber.config({
+ FORMAT: {
+ decimalSeparator: ',',
+ groupSeparator: '.',
+ groupSize: 3,
+ secondaryGroupSize: 2
+ }
+})
+
+x.toFormat(6)
+
+x = new BigNumber(1.75)
+x.toFraction()
+
+var pi = new BigNumber('3.14159265358')
+pi.toFraction()
+pi.toFraction(100000)
+pi.toFraction(10000)
+pi.toFraction(100)
+pi.toFraction(10)
+pi.toFraction(1)
+
+x = new BigNumber('177.7e+457')
+y = new BigNumber(235.4325)
+z = new BigNumber('0.0098074')
+
+var str = JSON.stringify([x, y, z])
+
+JSON.parse(str, (key, val) => key === '' ? val : new BigNumber(val))
+
+x = new BigNumber(456.789)
+x.toNumber()
+{ +x }
+
+y = new BigNumber('45987349857634085409857349856430985')
+y.toNumber()
+
+z = new BigNumber(-0)
+1 / +z
+1 / z.toNumber()
+
+x = new BigNumber(0.7)
+x.toPower(2)
+BigNumber(3).pow(-2)
+
+y = new BigNumber(45.6)
+x.toPrecision()
+y.toPrecision()
+x.toPrecision(1)
+y.toPrecision(1)
+y.toPrecision(2, 0)
+y.toPrecision(2, 1)
+x.toPrecision(5)
+y.toPrecision(5)
+
+x = new BigNumber(750000)
+x.toString()
+BigNumber.config({ EXPONENTIAL_AT: 5 })
+x.toString()
+
+y = new BigNumber(362.875)
+y.toString(2)
+y.toString(9)
+y.toString(32)
+
+BigNumber.config({ DECIMAL_PLACES: 4 });
+z = new BigNumber('1.23456789')
+z.toString()
+z.toString(10)
+
+x = new BigNumber(123.456)
+x.truncated()
+y = new BigNumber(-12.3)
+y.trunc()
+
+x = new BigNumber('-0')
+x.toString()
+x.valueOf()
+y = new BigNumber('1.777e+457')
+y.valueOf()
+
+x = new BigNumber(0.123)
+x.toExponential()
+x.c
+x.e
+x.s
+
+z = new BigNumber('-123.4567000e+2')
+z.toExponential()
+z.c
+z.e
+z.s
+
+x = new BigNumber(3)
+x instanceof BigNumber
+x.isBigNumber
+
+BN = BigNumber.another();
+
+y = new BN(3)
+y instanceof BigNumber
+y.isBigNumber
+
+y = new BigNumber(-0)
+y.c
+y.e
+y.s
+
+try {
+ // ...
+} catch (e) {
+ if (e instanceof Error && e.name == 'BigNumber Error') {
+ // ...
+ }
+}
+
+x = new BigNumber("1.0")
+y = new BigNumber("1.1000")
+z = x.add(y)
+
+x = new BigNumber("1.20")
+y = new BigNumber("3.45000")
+z = x.mul(y)
diff --git a/bignumber.js/index.d.ts b/bignumber.js/index.d.ts
new file mode 100644
index 0000000000..d94be507c7
--- /dev/null
+++ b/bignumber.js/index.d.ts
@@ -0,0 +1,681 @@
+// Type definitions for bignumber.js 4.0
+// Project: https://github.com/MikeMcl/bignumber.js/
+// Definitions by: Viktor Smirnov
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.1
+
+declare var BigNumber: BigNumber.BigNumberStatic;
+
+export as namespace BigNumber;
+export = BigNumber;
+
+declare namespace BigNumber {
+
+ interface FormatConfig {
+
+ /**
+ * The decimal separator.
+ */
+ decimalSeparator: string;
+
+ /**
+ * The grouping separator of the integer part.
+ */
+ groupSeparator: string;
+
+ /**
+ * The primary grouping size of the integer part.
+ */
+ groupSize: number;
+
+ /**
+ * The secondary grouping size of the integer part.
+ */
+ secondaryGroupSize: number;
+
+ /**
+ * The grouping separator of the fraction part.
+ */
+ fractionGroupSeparator: string;
+
+ /**
+ * The grouping size of the fraction part.
+ */
+ fractionGroupSize: number;
+ }
+
+ interface BigNumberConfig {
+
+ /**
+ * The maximum number of decimal places of the results of operations involving division,
+ * i.e. division, square root and base conversion operations, and power operations with negative exponents.
+ */
+ DECIMAL_PLACES: number;
+
+ /**
+ * The rounding mode used in the above operations and the default rounding mode of round, `toExponential`, `toFixed`, `toFormat` and `toPrecision`.
+ */
+ ROUNDING_MODE: RoundingMode;
+
+ /**
+ * The exponent value(s) at which `toString` returns exponential notation.
+ *
+ * If a single number is assigned, the value is the exponent magnitude.
+ *
+ * If an array of two numbers is assigned then the first number is the negative exponent value at and beneath which exponential notation is used,
+ * and the second number is the positive exponent value at and above which the same.
+ */
+ EXPONENTIAL_AT: number | number[];
+
+ /**
+ * The exponent value(s) beyond which overflow to `Infinity` and underflow to zero occurs.
+ *
+ * If a single number is assigned, it is the maximum exponent magnitude:
+ * values wth a positive exponent of greater magnitude become `Infinity`
+ * and those with a negative exponent of greater magnitude become zero.
+ *
+ * If an array of two numbers is assigned then the first number is the negative exponent limit and the second number is the positive exponent limit.
+ */
+ RANGE: number | number[];
+
+ /**
+ * The value that determines whether BigNumber Errors are thrown.
+ *
+ * If `ERRORS` is false, no errors will be thrown.
+ */
+ ERRORS: boolean | 0 | 1;
+
+ /**
+ * The value that determines whether cryptographically-secure pseudo-random number generation is used.
+ *
+ * If `CRYPTO` is set to `true` then the `random` method will generate random digits using `crypto.getRandomValues` in browsers that support it,
+ * or `crypto.randomBytes` if using a version of Node.js that supports it.
+ *
+ * If neither function is supported by the host environment then attempting to set `CRYPTO` to `true` will fail, and if `ERRORS` is `true` an exception will be thrown.
+ *
+ * If `CRYPTO` is `false` then the source of randomness used will be `Math.random` (which is assumed to generate at least `30` bits of randomness).
+ */
+ CRYPTO: boolean | 0 | 1;
+
+ /**
+ * The modulo mode used when calculating the modulus: `a mod n`.
+ *
+ * The quotient, `q = a / n`, is calculated according to the `ROUNDING_MODE` that corresponds to the chosen `MODULO_MODE`.
+ *
+ * The remainder, `r`, is calculated as: `r = a - n * q`.
+ */
+ MODULO_MODE: ModuloMode;
+
+ /**
+ * The maximum number of significant digits of the result of the power operation (unless a modulus is specified).
+ *
+ * If set to `0`, the number of signifcant digits will not be limited.
+ */
+ POW_PRECISION: number;
+
+ /**
+ * The `FORMAT` object configures the format of the string returned by the toFormat method.
+ */
+ FORMAT: Partial
+ }
+
+ type NumberLike = number | string | BigNumber;
+ type RoundingMode = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
+ type ModuloMode = RoundingMode | 9
+
+ interface BigNumberStatic {
+
+ /**
+ * Returns a new instance of a BigNumber object.
+ */
+ (value: NumberLike, base?: number): BigNumber;
+
+ /**
+ * Returns a new instance of a BigNumber object.
+ */
+ new (value: NumberLike, base?: number): BigNumber;
+
+ /**
+ * Returns a new independent BigNumber constructor with configuration as described by obj, or with the default configuration if obj is null or undefined.
+ */
+ another(obj?: Partial): BigNumberStatic;
+
+ /**
+ * Configures the settings for this particular BigNumber constructor.
+ *
+ */
+ config(obj?: Partial): BigNumberConfig;
+
+ /**
+ * Configures the settings for this particular BigNumber constructor.
+ */
+ config(
+ DECIMAL_PLACES?: number,
+ ROUNDING_MODE?: RoundingMode,
+ EXPONENTIAL_AT?: number | number[],
+ RANGE?: number | number[],
+ ERRORS?: boolean | 0 | 1,
+ CRYPTO?: boolean | 0 | 1,
+ MODULO_MODE?: ModuloMode,
+ POW_PRECISION?: number
+ ): BigNumberConfig;
+
+ /**
+ * Configures the settings for this particular BigNumber constructor.
+ */
+ set(obj?: Partial): BigNumberConfig;
+
+ /**
+ * Configures the settings for this particular BigNumber constructor.
+ */
+ set(
+ DECIMAL_PLACES?: number,
+ ROUNDING_MODE?: RoundingMode,
+ EXPONENTIAL_AT?: number | number[],
+ RANGE?: number | number[],
+ ERRORS?: boolean | 0 | 1,
+ CRYPTO?: boolean | 0 | 1,
+ MODULO_MODE?: ModuloMode,
+ POW_PRECISION?: number
+ ): BigNumberConfig;
+
+ /**
+ * Returns a BigNumber whose value is the maximum of `args`.
+ */
+ max(...args: NumberLike[]): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the maximum of `args`.
+ */
+ max(args: NumberLike[]): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the minimum of `args`.
+ */
+ min(...args: NumberLike[]): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the minimum of `args`.
+ */
+ min(args: NumberLike[]): BigNumber;
+
+ /**
+ * Returns a new BigNumber with a pseudo-random value equal to or greater than `0` and less than `1`.
+ *
+ * The return value will have `dp` decimal places (or less if trailing zeros are produced).
+ * If `dp` is omitted then the number of decimal places will default to the current `DECIMAL_PLACES` setting.
+ *
+ * Depending on the value of this BigNumber constructor's `CRYPTO` setting and the support for the `crypto` object in the host environment,
+ * the random digits of the return value are generated by either
+ * `Math.random` (fastest),
+ * `crypto.getRandomValues` (Web Cryptography API in recent browsers)
+ * or `crypto.randomBytes` (Node.js).
+ *
+ * If `CRYPTO` is `true`, i.e. one of the `crypto` methods is to be used,
+ * the value of a returned BigNumber should be cryptographically-secure and statistically indistinguishable from a random value.
+ */
+ random(dp?: number): BigNumber;
+
+ /**
+ * Rounds away from zero
+ */
+ ROUND_UP: 0;
+
+ /**
+ * Rounds towards zero
+ */
+ ROUND_DOWN: 1;
+
+ /**
+ * Rounds towards `Infinity`
+ */
+ ROUND_CEIL: 2;
+
+ /**
+ * Rounds towards `-Infinity`
+ */
+ ROUND_FLOOR: 3;
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds away from zero.
+ */
+ ROUND_HALF_UP: 4;
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds towards zero.
+ */
+ ROUND_HALF_DOWN: 5;
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds towards even neighbour.
+ */
+ ROUND_HALF_EVEN: 6;
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds towards `Infinity`.
+ */
+ ROUND_HALF_CEIL: 7;
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds towards `-Infinity`.
+ */
+ ROUND_HALF_FLOOR: 8;
+
+ /**
+ * The remainder is always positive.
+ *
+ * Euclidian division: `q = sign(n) * floor(a / abs(n))`
+ */
+ EUCLID: 9;
+ }
+
+ interface BigNumber {
+
+ /**
+ * Returns a BigNumber whose value is the absolute value, i.e. the magnitude, of the value of this BigNumber.
+ */
+ absoluteValue(): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the absolute value, i.e. the magnitude, of the value of this BigNumber.
+ */
+ abs(): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber rounded to a whole number in the direction of positive Infinity.
+ */
+ ceil(): BigNumber;
+
+ /**
+ * Returns
+ *
+ * `1` if the value of this BigNumber is greater than the value of `n`
+ *
+ * `-1` if the value of this BigNumber is less than the value of `n`
+ *
+ * `0` if this BigNumber and `n` have the same value
+ *
+ * `null` if the value of either this BigNumber or `n` is `NaN`
+ */
+ comparedTo(n: NumberLike, base?: number): 1 | -1 | 0 | null;
+
+ /**
+ * Returns
+ *
+ * `1` if the value of this BigNumber is greater than the value of `n`
+ *
+ * `-1` if the value of this BigNumber is less than the value of `n`
+ *
+ * `0` if this BigNumber and `n` have the same value
+ *
+ * `null` if the value of either this BigNumber or `n` is `NaN`
+ */
+ cmp(n: NumberLike, base?: number): 1 | -1 | 0 | null;
+
+ /**
+ * Return the number of decimal places of the value of this BigNumber, or `null` if the value of this BigNumber is `±Infinity` or `NaN`.
+ */
+ decimalPlaces(): number;
+
+ /**
+ * Return the number of decimal places of the value of this BigNumber, or `null` if the value of this BigNumber is `±Infinity` or `NaN`.
+ */
+ dp(): number;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber divided by `n`, rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration.
+ */
+ dividedBy(n: NumberLike, base?: number): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber divided by `n`, rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration.
+ */
+ div(n: NumberLike, base?: number): BigNumber;
+
+ /**
+ * Return a BigNumber whose value is the integer part of dividing the value of this BigNumber by `n`.
+ */
+ dividedToIntegerBy(n: NumberLike, base?: number): BigNumber;
+
+ /**
+ * Return a BigNumber whose value is the integer part of dividing the value of this BigNumber by `n`.
+ */
+ divToInt(n: NumberLike, base?: number): BigNumber;
+
+ /**
+ * Returns `true` if the value of this BigNumber equals the value of `n`, otherwise returns `false`.
+ *
+ * As with JavaScript, `NaN` does not equal `NaN`.
+ */
+ equals(n: NumberLike, base?: number): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber equals the value of `n`, otherwise returns `false`.
+ *
+ * As with JavaScript, `NaN` does not equal `NaN`.
+ */
+ eq(n: NumberLike, base?: number): boolean;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber rounded to a whole number in the direction of negative `Infinity`.
+ */
+ floor(): BigNumber;
+
+ /**
+ * Returns `true` if the value of this BigNumber is greater than the value of `n`, otherwise returns `false`.
+ */
+ greaterThan(n: NumberLike, base?: number): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber is greater than the value of `n`, otherwise returns `false`.
+ */
+ gt(n: NumberLike, base?: number): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber is greater than or equal to the value of `n`, otherwise returns `false`.
+ */
+ greaterThanOrEqualTo(n: NumberLike, base?: number): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber is greater than or equal to the value of `n`, otherwise returns `false`.
+ */
+ gte(n: NumberLike, base?: number): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber is a finite number, otherwise returns `false`.
+ *
+ * The only possible non-finite values of a BigNumber are `NaN`, `Infinity` and `-Infinity`.
+ */
+ isFinite(): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber is a whole number, otherwise returns `false`.
+ */
+ isInteger(): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber is a whole number, otherwise returns `false`.
+ */
+ isInt(): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber is NaN, otherwise returns `false`.
+ */
+ isNaN(): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber is negative, otherwise returns `false`.
+ */
+ isNegative(): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber is negative, otherwise returns `false`.
+ */
+ isNeg(): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber is zero or minus zero, otherwise returns `false`.
+ */
+ isZero(): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber is less than the value of `n`, otherwise returns `false`.
+ */
+ lessThan(n: NumberLike, base?: number): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber is less than the value of `n`, otherwise returns `false`.
+ */
+ lt(n: NumberLike, base?: number): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber is less than or equal to the value of `n`, otherwise returns
+ */
+ lessThanOrEqualTo(n: NumberLike, base?: number): boolean;
+
+ /**
+ * Returns `true` if the value of this BigNumber is less than or equal to the value of `n`, otherwise returns
+ */
+ lte(n: NumberLike, base?: number): boolean;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber minus `n`.
+ */
+ minus(n: NumberLike, base?: number): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber minus `n`.
+ */
+ sub(n: NumberLike, base?: number): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber modulo `n`, i.e. the integer remainder of dividing this BigNumber by `n`.
+ *
+ * The value returned, and in particular its sign, is dependent on the value of the `MODULO_MODE` setting of this BigNumber constructor.
+ * If it is `1` (default value), the result will have the same sign as this BigNumber,
+ * and it will match that of Javascript's `%` operator (within the limits of double precision) and BigDecimal's `remainder` method.
+ */
+ modulo(n: NumberLike, base?: number): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber modulo `n`, i.e. the integer remainder of dividing this BigNumber by `n`.
+ *
+ * The value returned, and in particular its sign, is dependent on the value of the `MODULO_MODE` setting of this BigNumber constructor.
+ * If it is `1` (default value), the result will have the same sign as this BigNumber,
+ * and it will match that of Javascript's `%` operator (within the limits of double precision) and BigDecimal's `remainder` method.
+ */
+ mod(n: NumberLike, base?: number): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber negated, i.e. multiplied by `-1`.
+ */
+ negated(): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber negated, i.e. multiplied by `-1`.
+ */
+ neg(): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber plus `n`.
+ */
+ plus(n: NumberLike, base?: number): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber plus `n`.
+ */
+ add(n: NumberLike, base?: number): BigNumber;
+
+ /**
+ * Returns the number of significant digits of the value of this BigNumber.
+ *
+ * If `z` is `true` or `1` then any trailing zeros of the integer part of a number are counted as significant digits, otherwise they are not.
+ */
+ precision(z?: boolean | 0 | 1): number;
+
+ /**
+ * Returns the number of significant digits of the value of this BigNumber.
+ *
+ * If `z` is `true` or `1` then any trailing zeros of the integer part of a number are counted as significant digits, otherwise they are not.
+ */
+ sd(z?: boolean | 0 | 1): number;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber rounded by rounding mode `rm` to a maximum of `dp` decimal places.
+ *
+ * If `dp` is omitted, or is `null` or `undefined`, the return value is `n` rounded to a whole number.
+ *
+ * If `rm` is omitted, or is `null` or `undefined`, `ROUNDING_MODE` is used.
+ */
+ round(dp?: number, rm?: RoundingMode): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber shifted `n` places.
+ *
+ * The shift is of the decimal point, i.e. of powers of ten, and is to the left if `n` is negative or to the right if `n` is positive.
+ */
+ shift(n: number): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the square root of the value of this BigNumber, rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration.
+ *
+ * The return value will be correctly rounded, i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding.
+ */
+ squareRoot(): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the square root of the value of this BigNumber, rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration.
+ *
+ * The return value will be correctly rounded, i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding.
+ */
+ sqrt(): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber times `n`.
+ */
+ times(n: NumberLike, base?: number): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber times `n`.
+ */
+ mul(n: NumberLike, base?: number): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber rounded to `sd` significant digits using rounding mode `rm`.
+ *
+ * If `sd` is omitted or is `null` or `undefined`, the return value will not be rounded.
+ *
+ * If `rm` is omitted or is `null` or `undefined`, ROUNDING_MODE will be used.
+ */
+ toDigits(sd?: number, rm?: RoundingMode): BigNumber;
+
+ /**
+ * Returns a string representing the value of this BigNumber in exponential notation rounded using rounding mode `rm` to `dp` decimal places,
+ * i.e with one digit before the decimal point and `dp` digits after it.
+ *
+ * If the value of this BigNumber in exponential notation has fewer than `dp` fraction digits, the return value will be appended with zeros accordingly.
+ *
+ * If `dp` is omitted, or is `null` or `undefined`, the number of digits after the decimal point defaults to the minimum number of digits necessary to represent the value exactly.
+ *
+ * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used.
+ */
+ toExponential(dp?: number, rm?: RoundingMode): string;
+
+ /**
+ * Returns a string representing the value of this BigNumber in normal (fixed-point) notation rounded to `dp` decimal places using rounding mode `rm`.
+ *
+ * If the value of this BigNumber in normal notation has fewer than `dp` fraction digits, the return value will be appended with zeros accordingly.
+ *
+ * Unlike `Number.prototype.toFixed`, which returns exponential notation if a number is greater or equal to `10e21`, this method will always return normal notation.
+ *
+ * If `dp` is omitted or is `null` or `undefined`, the return value will be unrounded and in normal notation.
+ * This is also unlike `Number.prototype.toFixed`, which returns the value to zero decimal places.
+ * It is useful when fixed-point notation is required and the current `EXPONENTIAL_AT` setting causes `toString` to return exponential notation.
+ *
+ * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used.
+ */
+ toFixed(dp?: number, rm?: RoundingMode): string;
+
+ /**
+ * Returns a string representing the value of this BigNumber in normal (fixed-point) notation rounded to `dp` decimal places using rounding mode `rm`,
+ * and formatted according to the properties of the `FORMAT` object.
+ *
+ * If `dp` is omitted or is `null` or `undefined`, then the return value is not rounded to a fixed number of decimal places.
+ *
+ * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used.
+ */
+ toFormat(dp?: number, rm?: RoundingMode): string;
+
+ /**
+ * Returns a string array representing the value of this BigNumber as a simple fraction with an integer numerator and an integer denominator.
+ * The denominator will be a positive non-zero value less than or equal to `max`.
+ *
+ * If a maximum denominator, `max`, is not specified, or is `null` or `undefined`, the denominator will be the lowest value necessary to represent the number exactly.
+ */
+ toFraction(max?: NumberLike): [string, string];
+
+ /**
+ * As `valueOf`.
+ */
+ toJSON(): string;
+
+ /**
+ * Returns the value of this BigNumber as a JavaScript number primitive.
+ *
+ * Type coercion with, for example, the unary plus operator will also work, except that a BigNumber with the value minus zero will be converted to positive zero.
+ */
+ toNumber(): number;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber raised to the power `n`, and optionally modulo a modulus `m`.
+ *
+ * If `n` is negative the result is rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration.
+ */
+ toPower(n: number, m?: NumberLike): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber raised to the power `n`, and optionally modulo a modulus `m`.
+ *
+ * If `n` is negative the result is rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration.
+ */
+ pow(n: number, m?: NumberLike): BigNumber;
+
+ /**
+ * Returns a string representing the value of this BigNumber rounded to `sd` significant digits using rounding mode `rm`.
+ *
+ * If `sd` is less than the number of digits necessary to represent the integer part of the value in normal (fixed-point) notation, then exponential notation is used.
+ *
+ * If `sd` is omitted, or is `null` or `undefined`, then the return value is the same as `n.toString()`.
+ *
+ * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used.
+ */
+ toPrecision(sd?: number, rm?: RoundingMode): string;
+
+ /**
+ * Returns a string representing the value of this BigNumber in the specified base, or base `10` if `base` is omitted or is `null` or `undefined`.
+ */
+ toString(base?: number): string;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber truncated to a whole number.
+ */
+ truncated(): BigNumber;
+
+ /**
+ * Returns a BigNumber whose value is the value of this BigNumber truncated to a whole number.
+ */
+ trunc(): BigNumber;
+
+ /**
+ * As `toString`, but does not accept a base argument and includes the minus sign for negative zero.
+ */
+ valueOf(): string;
+
+ /**
+ * coefficient
+ * @description Array of base 1e14 numbers
+ */
+ c: number[] | null;
+
+ /**
+ * exponent
+ * @description Integer, -1000000000 to 1000000000 inclusive
+ */
+ e: number | null;
+
+ /**
+ * sign
+ */
+ s: -1 | 1 | null;
+
+ /**
+ * type identifier
+ */
+ isBigNumber: true;
+ }
+}
\ No newline at end of file
diff --git a/bignumber.js/tsconfig.json b/bignumber.js/tsconfig.json
new file mode 100644
index 0000000000..485dace353
--- /dev/null
+++ b/bignumber.js/tsconfig.json
@@ -0,0 +1,22 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "lib": [
+ "es6"
+ ],
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": true,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "bignumber.js-tests.ts"
+ ]
+}
\ No newline at end of file
diff --git a/bignumber.js/tslint.json b/bignumber.js/tslint.json
new file mode 100644
index 0000000000..2221e40e4a
--- /dev/null
+++ b/bignumber.js/tslint.json
@@ -0,0 +1 @@
+{ "extends": "../tslint.json" }
\ No newline at end of file
diff --git a/bingmaps/bingmaps-tests.ts b/bingmaps/bingmaps-tests.ts
index 239e33094a..e83ff89aba 100644
--- a/bingmaps/bingmaps-tests.ts
+++ b/bingmaps/bingmaps-tests.ts
@@ -1,10 +1,3 @@
-///
-///
-///
-///
-///
-///
-
namespace BingMapsTests {
// An interactive set of Bing Maps AJAX control usages can be found at http://www.bingmapsportal.com/isdk/ajaxv7
diff --git a/bit-array/bit-array-tests.ts b/bit-array/bit-array-tests.ts
index 7c1ff57b1b..7d50de143c 100644
--- a/bit-array/bit-array-tests.ts
+++ b/bit-array/bit-array-tests.ts
@@ -1,5 +1,3 @@
-///
-
import BitArray = require("bit-array");
const a = new BitArray(32);
diff --git a/bittorrent-protocol/index.d.ts b/bittorrent-protocol/index.d.ts
index 688527e71f..be1a60b179 100644
--- a/bittorrent-protocol/index.d.ts
+++ b/bittorrent-protocol/index.d.ts
@@ -16,6 +16,7 @@ declare namespace BittorrentProtocol {
}
export interface Extension {
+ //tslint:disable-next-line:no-misused-new - could use class instead of interface but class is not extendible
constructor(wire: Wire): this;
onHandshake?: () => void;
onExtendedHandshake?: () => void;
@@ -24,6 +25,7 @@ declare namespace BittorrentProtocol {
}
export interface Request {
+ //tslint:disable-next-line:no-misused-new - could use class instead of interface but class is not extendible
constructor(piece: number, offset: number, length: number, callback: () => void): this;
piece: number;
offset: number;
diff --git a/bittorrent-protocol/tsconfig.json b/bittorrent-protocol/tsconfig.json
index 9258205ba7..1bc778df1b 100644
--- a/bittorrent-protocol/tsconfig.json
+++ b/bittorrent-protocol/tsconfig.json
@@ -19,4 +19,4 @@
"index.d.ts",
"bittorrent-protocol-tests.ts"
]
-}
\ No newline at end of file
+}
diff --git a/blob-stream/blob-stream-tests.ts b/blob-stream/blob-stream-tests.ts
index b9174859f9..40f9888788 100644
--- a/blob-stream/blob-stream-tests.ts
+++ b/blob-stream/blob-stream-tests.ts
@@ -1,6 +1,3 @@
-
-///
-
var bl = require('blob-stream');
var blob = bl.toBlob();
diff --git a/blue-tape/blue-tape-tests.ts b/blue-tape/blue-tape-tests.ts
index 92b2641115..c34bc6e32c 100644
--- a/blue-tape/blue-tape-tests.ts
+++ b/blue-tape/blue-tape-tests.ts
@@ -1,4 +1,3 @@
-///
///
import tape = require('blue-tape');
diff --git a/bluebird-global/index.d.ts b/bluebird-global/index.d.ts
index caf873510d..e4c4920501 100644
--- a/bluebird-global/index.d.ts
+++ b/bluebird-global/index.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for bluebird 3.0
+// Type definitions for bluebird 3.5
// Project: https://github.com/petkaantonov/bluebird
// Definitions by: d-ph
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -76,6 +76,7 @@ declare global {
spread: typeof Bluebird.prototype.spread;
suppressUnhandledRejections: typeof Bluebird.prototype.suppressUnhandledRejections;
tap: typeof Bluebird.prototype.tap;
+ tapCatch: typeof Bluebird.prototype.tapCatch;
// then: typeof Bluebird.prototype.then;
thenReturn: typeof Bluebird.prototype.thenReturn;
thenThrow: typeof Bluebird.prototype.thenThrow;
diff --git a/bluebird-retry/bluebird-retry-tests.ts b/bluebird-retry/bluebird-retry-tests.ts
index b63b360160..eb3260a007 100644
--- a/bluebird-retry/bluebird-retry-tests.ts
+++ b/bluebird-retry/bluebird-retry-tests.ts
@@ -1,5 +1,3 @@
-
-///
import Promise = require('bluebird');
import retry = require('bluebird-retry');
diff --git a/bluebird-retry/index.d.ts b/bluebird-retry/index.d.ts
index 22c7b1c95e..63adc1476d 100644
--- a/bluebird-retry/index.d.ts
+++ b/bluebird-retry/index.d.ts
@@ -17,6 +17,9 @@ declare namespace retry {
timeout?: number;
max_tries?: number;
predicate?: any;
+ throw_original?: boolean;
+ context?: any;
+ args?: any;
}
}
diff --git a/bluebird/bluebird-tests.ts b/bluebird/bluebird-tests.ts
index ea1ea69882..c08a7bdc6b 100644
--- a/bluebird/bluebird-tests.ts
+++ b/bluebird/bluebird-tests.ts
@@ -151,6 +151,10 @@ var BlueBird: typeof Promise;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+var version: string = Promise.version;
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
var nodeCallbackFunc = (callback: (err: any, result: string) => void) => {}
var nodeCallbackFuncErrorOnly = (callback: (err: any) => void) => {}
@@ -336,14 +340,12 @@ fooOrBarProm = fooProm.caught(Promise.CancellationError, (reason: any) => {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{
- class CustomError extends Error {
- public customField: number;
- }
- fooProm = fooProm.catch(CustomError, reason => {
- let a: number = reason.customField
- })
+class CustomError extends Error {
+ public customField: number;
}
+fooProm = fooProm.catch(CustomError, reason => {
+ let a: number = reason.customField
+})
{
class CustomErrorWithConstructor extends Error {
@@ -433,6 +435,24 @@ fooProm = fooProm.tap(() => {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+fooProm = fooProm.tapCatch((err) => {
+ return "foo";
+});
+
+fooProm = fooProm.tapCatch(err => {
+ return Promise.resolve("foo");
+});
+
+fooProm.tapCatch(CustomError, (err: CustomError) => {
+ return err.customField;
+});
+
+fooProm.tapCatch((e: any) => e instanceof CustomError, (err: CustomError) => {
+ return err.customField;
+});
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
fooProm = fooProm.delay(num);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/bluebird/index.d.ts b/bluebird/index.d.ts
index 2faa74e285..ecacedfd0d 100644
--- a/bluebird/index.d.ts
+++ b/bluebird/index.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for bluebird 3.0.0
+// Type definitions for bluebird 3.5.0
// Project: https://github.com/petkaantonov/bluebird
// Definitions by: Leonard Hecker
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -68,19 +68,19 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection boolean, onReject: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird;
caught(predicate: (error: any) => boolean, onReject: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird;
-
+
catch(predicate: (error: any) => boolean, onReject: (error: any) => U | Bluebird.Thenable): Bluebird;
caught(predicate: (error: any) => boolean, onReject: (error: any) => U | Bluebird.Thenable): Bluebird;
-
+
catch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird;
caught(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird;
catch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => U | Bluebird.Thenable): Bluebird;
caught(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => U | Bluebird.Thenable): Bluebird;
-
+
catch(predicate: Object, onReject: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird;
caught(predicate: Object, onReject: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird;
-
+
catch(predicate: Object, onReject: (error: any) => U | Bluebird.Thenable): Bluebird;
caught(predicate: Object, onReject: (error: any) => U | Bluebird.Thenable): Bluebird;
@@ -114,6 +114,14 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(onFulFill: (value: R) => Bluebird.Thenable): Bluebird;
tap(onFulfill: (value: R) => U): Bluebird;
+ /**
+ * Like `.catch()` but rethrows the error
+ */
+ tapCatch(onReject: (error?: any) => U | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird;
+ tapCatch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => U | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird;
+ tapCatch(predicate: (error?: any) => boolean, onReject: (error?: any) => U | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird;
+
+
/**
* Same as calling `Promise.delay(ms, this)`.
*/
@@ -321,7 +329,7 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection implements Bluebird.Thenable, Bluebird.Inspection {
+ console.log(req.body);
+ res.json(req.body);
+});
+
+app.listen(8080);
diff --git a/body-parser/index.d.ts b/body-parser/index.d.ts
index 4627c2c5b3..c0ce775bb0 100644
--- a/body-parser/index.d.ts
+++ b/body-parser/index.d.ts
@@ -1,202 +1,48 @@
-// Type definitions for body-parser
-// Project: http://expressjs.com
-// Definitions by: Santi Albo , VILIC VANE , Jonathan Häberle , Gevik Babakhani
+// Type definitions for body-parser 1.16
+// Project: https://github.com/expressjs/body-parser
+// Definitions by: Santi Albo , Vilic Vane , Jonathan Häberle , Gevik Babakhani , Tomasz Łaziuk
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+///
+import { Request, RequestHandler, Response } from 'express';
+// for docs go to https://github.com/expressjs/body-parser/tree/1.16.0#body-parser
-import * as express from "express";
-
-/**
- * bodyParser: use individual json/urlencoded middlewares
- * @deprecated
- */
-
-declare function bodyParser(options?: {
- /**
- * if deflated bodies will be inflated. (default: true)
- */
- inflate?: boolean;
- /**
- * maximum request body size. (default: '100kb')
- */
- limit?: any;
- /**
- * function to verify body content, the parsing can be aborted by throwing an error.
- */
- verify?: (req: express.Request, res: express.Response, buf: Buffer, encoding: string) => void;
- /**
- * only parse objects and arrays. (default: true)
- */
- strict?: boolean;
- /**
- * passed to JSON.parse().
- */
- reviver?: (key: string, value: any) => any;
- /**
- * parse extended syntax with the qs module. (default: true)
- */
- extended?: boolean;
-}): express.RequestHandler;
+// @deprecated
+declare function bodyParser(options?: bodyParser.OptionsJson & bodyParser.OptionsText & bodyParser.OptionsUrlencoded): RequestHandler;
declare namespace bodyParser {
- /**
- * Interface for defining the options for the json() middleware
- *
- * @export
- * @interface JsonOptions
- */
- export interface JsonOptions {
- /**
- * if deflated bodies will be inflated. (default: true)
- */
+ export interface Options {
inflate?: boolean;
- /**
- * maximum request body size. (default: '100kb')
- */
- limit?: any;
- /**
- * request content-type to parse, passed directly to the type-is library. (default: 'json')
- */
- type?: any;
- /**
- * function to verify body content, the parsing can be aborted by throwing an error.
- */
- verify?: (req: express.Request, res: express.Response, buf: Buffer, encoding: string) => void;
- /**
- * only parse objects and arrays. (default: true)
- */
+ limit?: number | string;
+ type?: string | ((req: Request) => any);
+ verify?: (req: Request, res: Response, buf: Buffer, encoding: string) => void;
+ }
+
+ export interface OptionsJson extends Options {
+ reviever?: (key: string, value: any) => any;
strict?: boolean;
- /**
- * passed to JSON.parse().
- */
- reviver?: (key: string, value: any) => any;
}
- /**
- * Interface for defining the options the raw() middleware
- *
- * @export
- * @interface RawOptions
- */
- export interface RawOptions {
- /**
- * if deflated bodies will be inflated. (default: true)
- */
- inflate?: boolean;
- /**
- * maximum request body size. (default: '100kb')
- */
- limit?: any;
- /**
- * request content-type to parse, passed directly to the type-is library. (default: 'application/octet-stream')
- */
- type?: any;
- /**
- * function to verify body content, the parsing can be aborted by throwing an error.
- */
- verify?: (req: express.Request, res: express.Response, buf: Buffer, encoding: string) => void;
- }
-
- /**
- * Interface for defining the options for the text() middleware
- *
- * @export
- * @interface TextOptions
- */
- export interface TextOptions {
- /**
- * if deflated bodies will be inflated. (default: true)
- */
- inflate?: boolean;
- /**
- * maximum request body size. (default: '100kb')
- */
- limit?: any;
- /**
- * request content-type to parse, passed directly to the type-is library. (default: 'text/plain')
- */
- type?: any;
- /**
- * function to verify body content, the parsing can be aborted by throwing an error.
- */
- verify?: (req: express.Request, res: express.Response, buf: Buffer, encoding: string) => void;
- /**
- * the default charset to parse as, if not specified in content-type. (default: 'utf-8')
- */
+ export interface OptionsText extends Options {
defaultCharset?: string;
}
- /**
- * Interface for defining the options for the urlencoded() middleware
- *
- * @export
- * @interface UrlEncodedOptions
- */
- export interface UrlEncodedOptions {
- /**
- * if deflated bodies will be inflated. (default: true)
- */
- inflate?: boolean;
- /**
- * maximum request body size. (default: '100kb')
- */
- limit?: any;
- /**
- * request content-type to parse, passed directly to the type-is library. (default: 'urlencoded')
- */
- type?: any;
- /**
- * function to verify body content, the parsing can be aborted by throwing an error.
- */
- verify?: (req: express.Request, res: express.Response, buf: Buffer, encoding: string) => void;
- /**
- * parse extended syntax with the qs module.
- */
- extended: boolean;
+ export interface OptionsUrlencoded extends Options {
+ extended?: boolean;
+ parameterLimit?: number;
}
- /**
- * Returns middleware that only parses json. This parser accepts any Unicode encoding
- * of the body and supports automatic inflation of gzip and deflate encodings.
- *
- * @export
- * @param {JsonOptions} [options]
- * @returns {express.RequestHandler}
- */
- export function json(options?: JsonOptions): express.RequestHandler;
+ export function json(options?: OptionsJson): RequestHandler;
- /**
- * Returns middleware that parses all bodies as a Buffer. This parser supports automatic
- * inflation of gzip and deflate encodings.
- *
- * @export
- * @param {RawOptions} [options]
- * @returns {express.RequestHandler}
- */
- export function raw(options?: RawOptions): express.RequestHandler;
+ export function raw(options?: Options): RequestHandler;
- /**
- * Returns middleware that parses all bodies as a string. This parser supports
- * automatic inflation of gzip and deflate encodings.
- *
- * @export
- * @param {TextOptions} [options]
- * @returns {express.RequestHandler}
- */
- export function text(options?: TextOptions): express.RequestHandler;
+ export function text(options?: OptionsText): RequestHandler;
+
+ export function urlencoded(options?: OptionsUrlencoded): RequestHandler;
- /**
- * Returns middleware that only parses urlencoded bodies. This parser accepts only
- * UTF-8 encoding of the body and supports automatic inflation of gzip and deflate encodings.
- *
- * @export
- * @param {UrlEncodedOptions} [options]
- * @returns {express.RequestHandler}
- */
- export function urlencoded(options?: UrlEncodedOptions): express.RequestHandler;
}
export = bodyParser;
diff --git a/body-parser/tsconfig.json b/body-parser/tsconfig.json
index 27e01ecd7b..e798cd97d3 100644
--- a/body-parser/tsconfig.json
+++ b/body-parser/tsconfig.json
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
- "es6"
+ "es6",
+ "dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
@@ -16,6 +17,7 @@
"forceConsistentCasingInFileNames": true
},
"files": [
- "index.d.ts"
+ "index.d.ts",
+ "body-parser-tests.ts"
]
-}
\ No newline at end of file
+}
diff --git a/body-parser/tslint.json b/body-parser/tslint.json
new file mode 100644
index 0000000000..9311f348d9
--- /dev/null
+++ b/body-parser/tslint.json
@@ -0,0 +1,6 @@
+{
+ "extends": "../tslint.json",
+ "rules": {
+ "max-line-length": false
+ }
+}
diff --git a/bookshelf/bookshelf-tests.ts b/bookshelf/bookshelf-tests.ts
index 5b743bef71..98fd0f4599 100644
--- a/bookshelf/bookshelf-tests.ts
+++ b/bookshelf/bookshelf-tests.ts
@@ -1330,3 +1330,50 @@ new User({name: 'John'}).fetchAll({require: true})
/* events.trigger(), see http://bookshelfjs.org/#Events-instance-trigger */
/* events.triggerThen(), see http://bookshelfjs.org/#Events-instance-triggerThen */
+
+
+/* model - foreignKey and foreignKeyTarget, see http://bookshelfjs.org/#Model-instance-hasOne */
+
+{
+ class Capital extends bookshelf.Model {
+ get tableName() { return 'capitals'; }
+ }
+
+ class City extends bookshelf.Model {
+ get tableName() { return 'cities'; }
+
+ country(): Country {
+ return this.belongsTo(Country, 'key1', 'key2');
+ }
+ }
+
+ class Language extends bookshelf.Model {
+ get tableName() { return 'languages'; }
+
+ countries(): Bookshelf.Collection {
+ return this.belongsToMany(Country, 'languages_countries', 'lang_id', 'country_id');
+ }
+ }
+
+ class Country extends bookshelf.Model {
+ get tableName() { return 'countries'; }
+ capital(): Capital {
+ return this.hasOne(Capital, 'id', 'capital_id');
+ }
+
+ cities(): Bookshelf.Collection