├── .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 | [](https://travis-ci.org/dojo/typings)
4 | [](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