├── .editorconfig ├── .gitattributes ├── .gitignore ├── .npmignore ├── .travis.yml ├── CONTRIBUTING.md ├── Gruntfile.js ├── LICENSE ├── README.md ├── custom ├── README.md ├── dev │ └── dev.d.ts ├── dgrid │ └── 1.1 │ │ └── dgrid.d.ts ├── digdug │ └── digdug.d.ts ├── dojo2-extras │ └── rxjs.d.ts ├── dojo2 │ └── dojo.d.ts ├── dstore │ └── 1.1 │ │ └── dstore.d.ts ├── http-proxy │ └── http-proxy.d.ts ├── intern │ └── intern.d.ts ├── leadfoot │ └── leadfoot.d.ts ├── nashorn │ └── nashorn.d.ts ├── node │ └── node.d.ts └── symbol-shim │ └── symbol-shim.d.ts ├── dijit └── 1.11 │ ├── _base.d.ts │ ├── dijit.d.ts │ ├── form.d.ts │ ├── index.d.ts │ ├── layout.d.ts │ ├── modules.d.ts │ └── typings.json ├── doh └── 1.11 │ ├── doh.d.ts │ ├── index.d.ts │ └── modules.d.ts ├── dojo └── 1.11 │ ├── NodeList-data.d.ts │ ├── NodeList-dom.d.ts │ ├── NodeList-fx.d.ts │ ├── NodeList-html.d.ts │ ├── NodeList-manipulate.d.ts │ ├── NodeList-traverse.d.ts │ ├── OpenAjax.d.ts │ ├── _base.d.ts │ ├── cldr.d.ts │ ├── data.d.ts │ ├── date.d.ts │ ├── dnd.d.ts │ ├── dojo.d.ts │ ├── errors.d.ts │ ├── fx.d.ts │ ├── index.d.ts │ ├── io.d.ts │ ├── loader.d.ts │ ├── modules.d.ts │ ├── on.d.ts │ ├── promise.d.ts │ ├── request.d.ts │ ├── router.d.ts │ ├── rpc.d.ts │ ├── selector.d.ts │ ├── store.d.ts │ └── typings.json ├── dojox └── 1.11 │ ├── color.d.ts │ ├── dojox.d.ts │ ├── gfx.d.ts │ ├── gfx │ ├── Moveable.d.ts │ ├── Mover.d.ts │ ├── VectorText.d.ts │ ├── arc.d.ts │ ├── bezierutils.d.ts │ ├── decompose.d.ts │ ├── filters.d.ts │ ├── fx.d.ts │ ├── gradient.d.ts │ ├── gradutils.d.ts │ ├── matrix.d.ts │ ├── path.d.ts │ ├── registry.d.ts │ ├── shape.d.ts │ └── utils.d.ts │ ├── html.d.ts │ ├── html │ ├── entities.d.ts │ └── metrics.d.ts │ ├── index.d.ts │ ├── layout.d.ts │ ├── modules.d.ts │ ├── rpc │ └── Service.d.ts │ ├── string.d.ts │ ├── typings.json │ ├── widget.d.ts │ ├── xml.d.ts │ └── xml │ └── DomParser.d.ts ├── examples ├── basicApp │ ├── package.json │ ├── src │ │ └── app │ │ │ ├── Dialog.ts │ │ │ ├── declareDecorator.ts │ │ │ ├── main.ts │ │ │ └── nls │ │ │ └── main.ts │ └── tsconfig.json ├── deferred │ ├── package.json │ ├── src │ │ └── main.ts │ └── tsconfig.json ├── lang │ ├── package.json │ ├── src │ │ └── main.ts │ └── tsconfig.json ├── query │ ├── index.html │ ├── package.json │ ├── src │ │ └── main.ts │ └── tsconfig.json ├── request │ ├── index.html │ ├── index.js │ ├── package.json │ ├── src │ │ ├── main.ts │ │ └── node.ts │ ├── test.json │ └── tsconfig.json └── store │ ├── index.html │ ├── package.json │ ├── src │ └── main.ts │ └── tsconfig.json ├── index.d.ts ├── package-lock.json ├── package.json ├── tests ├── dojo │ └── 1.11 │ │ ├── .gitignore │ │ ├── Gruntfile.js │ │ ├── package.json │ │ ├── request │ │ └── xhr.ts │ │ ├── src │ │ ├── dom-attr.ts │ │ ├── dom-class.ts │ │ ├── dom-construct.ts │ │ ├── dom-form.ts │ │ ├── dom-prop.ts │ │ ├── dom-style.ts │ │ ├── dom.ts │ │ └── when.ts │ │ ├── tasks │ │ └── amdtots.js │ │ ├── tsconfig.json │ │ └── typings │ │ ├── chai │ │ └── chai.d.ts │ │ ├── digdug │ │ └── digdug.d.ts │ │ ├── dojo2 │ │ └── dojo.d.ts │ │ ├── exceptions │ │ └── index.d.ts │ │ ├── intern │ │ └── intern.d.ts │ │ ├── leadfoot │ │ └── leadfoot.d.ts │ │ ├── node │ │ └── node.d.ts │ │ └── sinon │ │ └── sinon.d.ts └── dojox │ └── 1.11 │ └── gfx │ ├── Move.ts │ ├── VectorText.ts │ ├── _base.ts │ ├── arc.ts │ ├── bezierutils.ts │ ├── decompose.ts │ ├── demo │ ├── gfx.html │ └── gfx.ts │ ├── filters.ts │ ├── fx.ts │ ├── gfx.ts │ ├── gradient.ts │ ├── gradutils.ts │ ├── matrix.ts │ ├── path.ts │ ├── registry.ts │ ├── shape.ts │ └── utils.ts ├── tsconfig.json ├── tslint.json ├── typings.json └── typings └── index.d.ts /.editorconfig: -------------------------------------------------------------------------------- 1 | \# http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = tab 6 | indent_size = 4 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case users don't have core.autocrlf set 2 | * text=auto 3 | 4 | # Files that should always be normalized and converted to native line 5 | # endings on checkout. 6 | *.js text 7 | *.json text 8 | *.ts text 9 | *.md text 10 | *.yml text 11 | LICENSE text 12 | 13 | # Files that are truly binary and should not be modified 14 | *.png binary 15 | *.jpg binary 16 | *.jpeg binary 17 | *.gif binary 18 | *.jar binary 19 | *.zip binary 20 | *.psd binary 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _build 2 | node_modules 3 | **/node_modules 4 | tests/**/*.js 5 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /tests 2 | /examples 3 | /_build 4 | tslint.json 5 | tsconfig.json 6 | Gruntfile.js 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - "10" 5 | cache: 6 | directories: 7 | - node_modules 8 | install: 9 | - "travis_retry npm install grunt-cli" 10 | - "travis_retry npm install" 11 | script: 12 | - "grunt" 13 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guidelines 2 | 3 | Thank you for taking an interest in contributing to `dojo1-typings`. 4 | 5 | ## Reporting Bugs 6 | 7 | For things that you think might be bugs, please open a [GitHub issue](https://github.com/dojo/typings/issues/new?body=Description:%0A%0ASteps+to+reproduce:%0A%0A1.%20%E2%80%A6%0A2.%20%E2%80%A6%0A3.%20%E2%80%A6%0A%0AExpected%20result:%0AActual%20result:%0A%0AVersion:%0A%0AAny%20additional%20information:). 8 | 9 | ## Feature Requests 10 | 11 | For feature requests, just open an issue in GitHub. We will consider your suggestion and evaluate if we think it is feasible and within reason. It is even better if you feel like you can try to contribute by adding the feature; just submit a pull request by following the section below. WOO HOO! :smile: 12 | 13 | ## Submitting Pull Requests 14 | 15 | We care a lot about Open Source. One of the most important things is to make sure every contribution is given freely by its owner. Therefore we require every contribution to have a [CLA](http://dojofoundation.org/about/claForm) on file. This CLA covers contributions to [many open source projects](http://dojofoundation.org/projects/), so it won't be a wasted 30 seconds of your life and there are no blood samples taken!!! 16 | 17 | All contributions should adhere to our [linting rules](tslint.json) and should follow the structure of the whole repository. If you are unsure of how to contribute, just ask. Otherwise we will get grumpy :angry:, and you won't like us when we are grumpy. :sob: 18 | 19 | ## Again, Thank You! 20 | 21 | Not only do you want to contribute, you read the guidelines! We :heart: you! 22 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | require('grunt-dojo2').initConfig(grunt, {}); 3 | grunt.registerTask('dev', [ 'tslint', 'dojo-ts:dev' ]); 4 | grunt.registerTask('default', [ 'dev' ]); 5 | }; 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The "New" BSD License 2 | ********************* 3 | 4 | Copyright (c) 2015-2016, The Dojo Foundation 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, this 11 | list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | * Neither the name of the Dojo Foundation nor the names of its contributors 16 | may be used to endorse or promote products derived from this software 17 | without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dojo/typings 2 | 3 | [![Build Status](https://travis-ci.org/dojo/typings.svg?branch=master)](https://travis-ci.org/dojo/typings) 4 | [![npm version](https://badge.fury.io/js/dojo-typings.svg)](http://badge.fury.io/js/dojo-typings) 5 | 6 | This is a repository of Dojo 1 TypeScript Typings (including Dijit and DojoX). 7 | 8 | Currently, this repository does not include all the typings for Dijit and DojoX, although 9 | Dojo is currently fully covered. The aim is to cover all of Dijit and continue to accept 10 | any community contributions for DojoX. 11 | 12 | For other packages, because Dojo 2 is built on TypeScript its typings are 13 | inherent in its distrubution. The goal for affiliated Dojo 1 projects (like 14 | [dgrid](http://dgrid.io/) and [dstore](http://dstorejs.io/) is that they will include 15 | typings as part of their repository. 16 | 17 | ## Usage 18 | 19 | Because Dojo, Dijit and DojoX are such large and complex code bases, the repository 20 | tries to break it down into easier to maintain pieces that also allow easy additions, 21 | modifications, etc. 22 | 23 | Each major namespace is broken down into `dojo`, `dijit` and `dojox` directories, having 24 | the major version number in a sub directory within. Currently only Dojo 1.11 is included. 25 | These typings should work for most older versions of Dojo post 1.7, though it may 26 | include some functionality that is not present in those older releases. 27 | 28 | The ambient declarations that mirror the Dojo namespaces are indexed via the `index.d.ts` 29 | file located in each directory and the ambient module names are then declared in a single 30 | file for the namespace called `modules.d.ts`. To utilise in a project, where you are 31 | going to import several modules via an AMD loader, you would likely just need to reference 32 | the `modules.d.ts`. If you need to modify the names of the ambient modules to match your 33 | runtime environment, then you would copy the `modules.d.ts` and rename all the modules as 34 | required. 35 | 36 | Basic usage would be to include the `index.d.ts` and likely `modules.d.ts` in files used 37 | either by `tsc` or in your `tsconfig.json` or referenced within your TypeScript files. 38 | The [wiki](https://github.com/dojo/typings/wiki) contains some basic *how to* instructions. 39 | 40 | The easiest way to install the typings is via `npm`: 41 | 42 | ```sh 43 | > npm install dojo-typings --save-dev 44 | ``` 45 | 46 | ### Building 47 | 48 | The repository has a `Gruntfile.js` and a development dependency of [grunt](http://gruntjs.com/) 49 | that can help validate any changes to the typings. After cloning the repository and running 50 | `npm install`, you can then run `grunt` or `grunt dev` which will compile the files with 51 | `tsc` as well as run `tslint` against the core files. 52 | 53 | ## Examples 54 | 55 | There are examples of how to use the typings in a TypeScript project located in 56 | the `examples` directory of this repository. 57 | 58 | ## Limitations 59 | 60 | ### Typings are global 61 | 62 | At the time of this writing (TypeScript 1.7/1.8), typings are global and absolute. In order 63 | to change module resolution from `dojo/...` the `modules.d.ts` will need to be updated. 64 | 65 | ### String Literals 66 | 67 | The current typings are built around TypeScript 1.7. TypeScript 1.8 introduced string 68 | literal types and there are improvements that can be made to the typings, several of 69 | them noted as comments in the existing typings. 70 | 71 | *Note*: while the repository currently uses TypeScript 1.8 as its development dependency 72 | we haven't started using the string literals yet. 73 | 74 | ## Contributing 75 | 76 | Contributions to this repository are very much welcomed! If you wish to contribute to this repository, 77 | please see our [Contributing Guidelines](CONTRIBUTING.md). 78 | -------------------------------------------------------------------------------- /custom/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dojo/typings/99595b015a659667c08fd8e4eba0c497c3c9ba5d/custom/README.md -------------------------------------------------------------------------------- /custom/dev/dev.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module 'intern/dojo/Promise' { 4 | import Promise = require('dojo/Promise'); 5 | export = Promise; 6 | } 7 | 8 | declare module 'intern/lib/util' { 9 | export function getErrorMessage(error: any): string; 10 | } 11 | 12 | declare module 'intern/lib/reporters/Runner' { 13 | import charm = require('charm'); 14 | class Runner { 15 | protected charm: charm.Charm; 16 | protected hasErrors: boolean; 17 | protected sessions: any; 18 | 19 | constructor(config?: any); 20 | } 21 | export = Runner; 22 | } 23 | 24 | declare module 'intern/lib/reporters/Combined' { 25 | class Combined { 26 | protected hasErrors: boolean; 27 | protected sessions: any; 28 | protected _writeLine(): void; 29 | protected output: { write(args: any[]): void; }; 30 | 31 | constructor(config?: any); 32 | } 33 | export = Combined; 34 | } 35 | 36 | declare module 'intern/dojo/node!istanbul/lib/collector' { 37 | class Collector { 38 | add(coverage: any): void; 39 | files(): string[]; 40 | } 41 | 42 | export = Collector; 43 | } 44 | 45 | declare module 'intern/dojo/node!istanbul/lib/report/json' { 46 | import Collector = require('intern/dojo/node!istanbul/lib/collector'); 47 | class JsonReporter { 48 | constructor(options: any); 49 | 50 | writeReport(collector: Collector, sync: boolean): void; 51 | } 52 | export = JsonReporter; 53 | } 54 | 55 | declare module 'intern/dojo/node!istanbul/lib/instrumenter' { 56 | class Instrumenter { 57 | constructor(options?: any); 58 | 59 | instrumentSync(code: string, path: string): string; 60 | lastFileCoverage(): any; 61 | } 62 | export = Instrumenter; 63 | } 64 | 65 | declare module 'intern/dojo/node!istanbul/index' { 66 | let result: any; 67 | export = result; 68 | } 69 | 70 | declare module 'intern/dojo/node!glob' { 71 | const glob: { 72 | (pattern: string, callback: (err: Error, matches: string[]) => void): void; 73 | (pattern: string, options: any, callback: (err: Error, matches: string[]) => void): void; 74 | 75 | sync(pattern: string, options?: any): string[]; 76 | }; 77 | export = glob; 78 | } 79 | 80 | declare module 'charm' { 81 | import { Stream } from 'stream'; 82 | 83 | const charm: { 84 | (): charm.Charm; 85 | }; 86 | module charm { 87 | export interface Charm extends Stream { 88 | reset(): Charm; 89 | destroy(): void; 90 | end(): void; 91 | write(buf: string): Charm; 92 | display(attr: string): Charm; 93 | foreground(color: string|number): Charm; 94 | background(color: string|number): Charm; 95 | } 96 | } 97 | export = charm; 98 | } 99 | 100 | declare module 'intern/lib/util' { 101 | export function getErrorMessage(error: any): string; 102 | } 103 | 104 | declare module 'istanbul/lib/collector' { 105 | class Collector { 106 | add(coverage: any): void; 107 | files(): string[]; 108 | } 109 | 110 | export = Collector; 111 | } 112 | 113 | declare module 'istanbul/lib/report/json' { 114 | import Collector = require('istanbul/lib/collector'); 115 | class JsonReporter { 116 | constructor(options: any); 117 | 118 | writeReport(collector: Collector, sync: boolean): void; 119 | } 120 | export = JsonReporter; 121 | } 122 | 123 | declare module 'istanbul/lib/instrumenter' { 124 | class Instrumenter { 125 | constructor(options?: any); 126 | 127 | instrumentSync(code: string, path: string): string; 128 | lastFileCoverage(): any; 129 | } 130 | export = Instrumenter; 131 | } 132 | 133 | declare module 'istanbul/index' { 134 | let result: any; 135 | export = result; 136 | } 137 | 138 | declare module 'intern/dojo/node!fs' { 139 | import * as fs from 'fs'; 140 | export = fs; 141 | } 142 | 143 | declare module 'intern/dojo/node!util' { 144 | import * as util from 'util'; 145 | export = util; 146 | } 147 | 148 | declare module 'intern/dojo/node!path' { 149 | import * as path from 'path'; 150 | export = path; 151 | } 152 | -------------------------------------------------------------------------------- /custom/dojo2-extras/rxjs.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * These provide re-exports of various modules that align to the typical 3 | * configuration of a Dojo 2 application 4 | */ 5 | 6 | declare module 'rxjs/Rx' { 7 | import * as RxJS from '@reactivex/rxjs'; 8 | export = RxJS; 9 | } 10 | 11 | declare module 'rxjs/Observable' { 12 | import * as Observable from '@reactivex/rxjs/dist/cjs/Observable'; 13 | export = Observable; 14 | } 15 | 16 | declare module 'rxjs/Observer' { 17 | import * as Observer from '@reactivex/rxjs/dist/cjs/Observer'; 18 | export = Observer; 19 | } 20 | -------------------------------------------------------------------------------- /custom/dstore/1.1/dstore.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module dstore { 4 | export interface FetchArray extends Array { 5 | totalLength: number; 6 | } 7 | 8 | export interface FetchPromise extends dojo.promise.Promise { 9 | totalLength: dojo.promise.Promise; 10 | } 11 | 12 | export interface ChangeEvent { 13 | id: any; 14 | index?: number; 15 | previousIndex?: number; 16 | target: T; 17 | totalLength: number; 18 | type: string; 19 | } 20 | 21 | export interface Collection { 22 | idProperty: string; 23 | Model: { new (...args: any[]): T; }; 24 | tracking?: { remove(): void; }; 25 | 26 | add(object: T, options?: {}): dojo.promise.Promise; 27 | emit(eventName: string, event: ChangeEvent): boolean; 28 | fetch(): dstore.FetchPromise; 29 | fetchRange(kwArgs: { start?: number; end?: number; }): dstore.FetchPromise; 30 | filter(query: string | {} | { (item: T, index: number): boolean; }): this; 31 | forEach(callback: (item: T, index: number) => void, thisObject?: any): dojo.promise.Promise; 32 | get(id: any): dojo.promise.Promise; 33 | getIdentity(object: T): any; 34 | on(eventName: string, listener: (event: ChangeEvent) => void): dojo.Handle; 35 | put(object: T, options?: {}): dojo.promise.Promise; 36 | remove(id: any): dojo.promise.Promise; 37 | sort(property: string | { (a: T, b: T): number; }, descending?: boolean): this; 38 | track?(): this; 39 | } 40 | 41 | export interface SyncCollection extends Collection { 42 | addSync(object: T, options?: {}): T; 43 | fetchSync(): dstore.FetchArray; 44 | fetchRangeSync(kwArgs: { start?: number; end?: number; }): dstore.FetchArray; 45 | filter(query: string | {} | { (item: T, index: number): boolean; }): this; 46 | getSync(id: any): T; 47 | putSync(object: T, options?: {}): T; 48 | removeSync(id: any): boolean; 49 | sort(property: string | { (a: T, b: T): number; }, descending?: boolean): this; 50 | track?(): this; 51 | } 52 | } 53 | 54 | declare module 'dstore/Cache' { 55 | import Store = require('dstore/Store'); 56 | 57 | interface Cache extends Store { 58 | cachingStore: dstore.Collection; 59 | evict(id: any): void; 60 | } 61 | 62 | module Cache { 63 | export interface Constructor extends dojo._base.DeclareConstructor> { 64 | new (kwArgs?: Cache.KwArgs): Cache; 65 | } 66 | 67 | export interface KwArgs extends Store.KwArgs { 68 | cachingStore?: dstore.Collection; 69 | } 70 | } 71 | 72 | const Cache: Cache.Constructor; 73 | 74 | export = Cache; 75 | } 76 | 77 | declare module 'dstore/legacy/DstoreAdapter' { 78 | import Store = require('dstore/Store'); 79 | 80 | interface DstoreAdapter { 81 | constructor(collection: dstore.Collection): DstoreAdapter; 82 | get(id: any): any; 83 | put(object: T, options?: {}): any; 84 | remove(id: any): any; 85 | query(query: any, options?: {}): any; 86 | } 87 | 88 | module DstoreAdapter { 89 | export interface Constructor extends dojo._base.DeclareConstructor> { 90 | new (store: Store): DstoreAdapter>; 91 | } 92 | } 93 | 94 | const DstoreAdapter: DstoreAdapter.Constructor; 95 | export = DstoreAdapter; 96 | } 97 | 98 | declare module 'dstore/Memory' { 99 | import Store = require('dstore/Store'); 100 | 101 | interface Memory extends Store, dstore.SyncCollection { 102 | data: T[]; 103 | 104 | addSync(object: T, options?: {}): T; 105 | fetchSync(): dstore.FetchArray; 106 | fetchRangeSync(kwArgs: { start?: number; end?: number; }): dstore.FetchArray; 107 | filter(query: string | {} | { (item: T, index: number): boolean; }): this; 108 | getSync(id: any): T; 109 | putSync(object: T, options?: {}): T; 110 | removeSync(id: any): boolean; 111 | setData(data: T[]): void; 112 | sort(property: string | { (a: T, b: T): number; }, descending?: boolean): this; 113 | track(): this; 114 | remove(id: any): dojo.promise.Promise<{}>; 115 | } 116 | 117 | module Memory { 118 | export interface Constructor extends dojo._base.DeclareConstructor> { 119 | new (kwArgs?: Memory.KwArgs): Memory; 120 | } 121 | 122 | export interface KwArgs extends Store.KwArgs { 123 | data?: T[]; 124 | } 125 | } 126 | 127 | const Memory: Memory.Constructor; 128 | 129 | export = Memory; 130 | } 131 | 132 | declare module 'dstore/Trackable' { 133 | interface Trackable { 134 | currentRange: any[]; 135 | track(): this; 136 | } 137 | 138 | module Trackable { 139 | export interface Constructor extends dojo._base.DeclareConstructor> { 140 | new (...args: any[]): Trackable; 141 | } 142 | } 143 | 144 | const Trackable: Trackable.Constructor; 145 | 146 | export = Trackable; 147 | } 148 | 149 | declare module 'dstore/Tree' { 150 | interface Tree { 151 | mayHaveChildren(object: T): boolean; 152 | getRootCollection(): dstore.Collection; 153 | getChildren(object: T): dstore.Collection; 154 | } 155 | 156 | module Tree { 157 | export interface Constructor extends dojo._base.DeclareConstructor> { 158 | new (...args: any[]): Tree; 159 | } 160 | } 161 | 162 | const Tree: Tree.Constructor; 163 | 164 | export = Tree; 165 | } 166 | 167 | declare module 'dstore/Promised' { 168 | import * as Promise from 'dojo/promise/Promise'; 169 | 170 | interface Promised { 171 | get(id: any): Promise; 172 | put(object: T, options?: {}): Promise; 173 | add(object: T, options?: {}): Promise; 174 | remove(id: any): Promise; 175 | fetch(): dstore.FetchPromise; 176 | fetchRange(args: { start?: number; end?: number; }): dstore.FetchPromise; 177 | } 178 | 179 | module Promised { 180 | export interface Constructor extends dojo._base.DeclareConstructor> { 181 | new (...args: any[]): Promised; 182 | } 183 | } 184 | 185 | const Promised: Promised.Constructor; 186 | 187 | export = Promised; 188 | } 189 | 190 | declare module 'dstore/SimpleQuery' { 191 | interface SimpleQuery { 192 | } 193 | 194 | module SimpleQuery { 195 | export interface Constructor extends dojo._base.DeclareConstructor> { 196 | new (...args: any[]): SimpleQuery; 197 | } 198 | } 199 | 200 | const SimpleQuery: SimpleQuery.Constructor; 201 | 202 | export = SimpleQuery; 203 | } 204 | 205 | declare module 'dstore/Request' { 206 | import Store = require('dstore/Store'); 207 | 208 | interface Request extends Store { 209 | headers: {}; 210 | parse: (serializedObject: string) => {}; 211 | target: string; 212 | ascendingPrefix: string; 213 | descendingPrefix: string; 214 | accepts: string; 215 | 216 | track(): this; 217 | } 218 | 219 | module Request { 220 | export interface Constructor extends dojo._base.DeclareConstructor> { 221 | new (kwArgs?: Request.KwArgs): Request; 222 | } 223 | export interface KwArgs extends Store.KwArgs { 224 | headers?: typeof Request.prototype.headers; 225 | parse?: typeof Request.prototype.parse; 226 | target?: typeof Request.prototype.target; 227 | ascendingPrefix?: typeof Request.prototype.ascendingPrefix; 228 | descendingPrefix?: typeof Request.prototype.descendingPrefix; 229 | accepts?: typeof Request.prototype.accepts; 230 | } 231 | } 232 | 233 | const Request: Request.Constructor; 234 | 235 | export = Request; 236 | } 237 | 238 | declare module 'dstore/RequestMemory' { 239 | import Request = require('dstore/Request'); 240 | import Cache = require('dstore/Cache'); 241 | 242 | interface RequestMemory extends Request, Cache { 243 | cachingStore: dstore.Collection; 244 | evict(id: any): void; 245 | 246 | track(): this; 247 | } 248 | 249 | module RequestMemory { 250 | export interface Constructor extends dojo._base.DeclareConstructor> { 251 | new (kwArgs?: RequestMemory.KwArgs): RequestMemory; 252 | } 253 | 254 | export interface KwArgs extends Request.KwArgs, Cache.KwArgs {} 255 | } 256 | 257 | const RequestMemory: RequestMemory.Constructor; 258 | 259 | export = RequestMemory; 260 | } 261 | 262 | declare module 'dstore/Rest' { 263 | import Request = require('dstore/Request'); 264 | 265 | interface Rest extends Request {} 266 | 267 | module Rest { 268 | export interface Constructor extends dojo._base.DeclareConstructor> { 269 | new (kwArgs?: Request.KwArgs): Rest; 270 | } 271 | } 272 | 273 | const Rest: Rest.Constructor; 274 | 275 | export = Rest; 276 | } 277 | 278 | declare module 'dstore/Store' { 279 | interface Store extends dstore.Collection { 280 | idProperty: string; 281 | Model: { new (...args: any[]): T; }; 282 | total: dojo.promise.Promise; 283 | 284 | add(object: T, options?: {}): dojo.promise.Promise; 285 | emit(eventName: string, event: dstore.ChangeEvent): boolean; 286 | fetch(): dstore.FetchPromise; 287 | fetchRange(kwArgs: { start?: number; end?: number; }): dstore.FetchPromise; 288 | filter(query: string | {} | { (item: T, index: number): boolean; }): this; 289 | forEach(callback: (item: T, index: number) => void, thisObject?: any): dojo.promise.Promise; 290 | get(id: any): dojo.promise.Promise; 291 | getIdentity(object: T): any; 292 | on(eventName: string, listener: (event: dstore.ChangeEvent) => void): dojo.Handle; 293 | put(object: T, options?: {}): dojo.promise.Promise; 294 | remove(id: any): dojo.promise.Promise<{}>; 295 | sort(property: string | { (a: T, b: T): number; }, descending?: boolean): this; 296 | } 297 | 298 | module Store { 299 | export interface Constructor extends dojo._base.DeclareConstructor> { 300 | new (kwArgs?: Store.KwArgs): Store; 301 | } 302 | 303 | export interface KwArgs { 304 | idProperty?: typeof Store.prototype.idProperty; 305 | Model?: typeof Store.prototype.Model; 306 | } 307 | } 308 | 309 | const Store: Store.Constructor; 310 | 311 | export = Store; 312 | } 313 | -------------------------------------------------------------------------------- /custom/http-proxy/http-proxy.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'http-proxy' { 2 | export class RoutingProxy { 3 | constructor(options?: {}); 4 | proxyRequest(request:any, response:any, options: {}): void; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /custom/nashorn/nashorn.d.ts: -------------------------------------------------------------------------------- 1 | declare var arguments: any; 2 | declare var load: any; 3 | declare var Packages: any; 4 | -------------------------------------------------------------------------------- /custom/symbol-shim/symbol-shim.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Provide a global interface for Symbol 3 | */ 4 | 5 | interface Symbol { 6 | toString(): string; 7 | valueOf(): Object; 8 | [Symbol.toStringTag]: string; 9 | [Symbol.toPrimitive]: symbol; 10 | [s: string]: any; 11 | } 12 | 13 | interface SymbolConstructor { 14 | prototype: Symbol; 15 | (description?: string|number): symbol; 16 | for(key: string): symbol; 17 | keyFor(sym: symbol): string; 18 | hasInstance: symbol; 19 | isConcatSpreadable: symbol; 20 | iterator: symbol; 21 | match: symbol; 22 | observable: symbol; 23 | replace: symbol; 24 | search: symbol; 25 | species: symbol; 26 | split: symbol; 27 | toPrimitive: symbol; 28 | toStringTag: symbol; 29 | unscopables: symbol; 30 | } 31 | 32 | declare var Symbol: SymbolConstructor; 33 | -------------------------------------------------------------------------------- /dijit/1.11/_base.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace dijit { 2 | namespace _base { 3 | 4 | /* dijit/_base/focus */ 5 | 6 | type Bookmark = { isCollapsed: boolean, mark?: Range }; 7 | type FocusNode = Element | null; 8 | type RemoveHandle = { remove(): void }; 9 | 10 | /** 11 | * Deprecated module to monitor currently focused node and stack of currently focused widgets. 12 | * 13 | * New code should access dijit/focus directly. 14 | */ 15 | interface Focus { 16 | /** 17 | * Currently focused item on screen 18 | */ 19 | _curFocus: FocusNode; 20 | 21 | /** 22 | * Previously focused item on screen 23 | */ 24 | _prevFocus: FocusNode; 25 | 26 | /** 27 | * Returns true if there is no text selected 28 | */ 29 | isCollapsed(): boolean; 30 | 31 | /** 32 | * Retrieves a bookmark that can be used with moveToBookmark to return to the same range 33 | */ 34 | getBookmark(): Bookmark; 35 | 36 | /** 37 | * Moves current selection to a bookmark 38 | */ 39 | moveToBookmark(bookmark: Bookmark): void; 40 | 41 | /** 42 | * Called as getFocus(), this returns an Object showing the current focus and selected text. 43 | * 44 | * Called as getFocus(widget), where widget is a (widget representing) a button that was just pressed, it returns where focus was before that button was pressed. (Pressing the button may have either shifted focus to the button, or removed focus altogether.) In this case the selected text is not returned, since it can't be accurately determined. 45 | */ 46 | getFocus(menu: dijit._WidgetBase, openedForWindow?: Window): { 47 | node: FocusNode; 48 | bookmark: any; 49 | openedForWindow?: Window 50 | }; 51 | 52 | /** 53 | * List of currently active widgets (focused widget and it's ancestors) 54 | */ 55 | _activeStack: dijit._WidgetBase[]; 56 | 57 | /** 58 | * Registers listeners on the specified iframe so that any click or focus event on that iframe (or anything in it) is reported as a focus/click event on the `