Skip to content
Dojo 1 - TypeScript Typings (including Dijit and DojoX)
TypeScript JavaScript HTML
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
custom Add typings for dstore/Promised and dstore/SimpleQuery. (#139) Nov 2, 2017
dijit/1.11 Add dijit/Fieldset (#132) Sep 22, 2017
doh/1.11 use full file names to doh definition files (#101) Jan 10, 2017
dojo/1.11 Enhance dojo/errors/create signature with optional arguments. (#149) Oct 24, 2018
dojox/1.11 Add some dijit/Menu* modules and some other fixups (#131) Sep 13, 2017
examples Update typings to TS 2.4.1 (#127) Jul 7, 2017
tests Update typings to TS 2.4.1 (#127) Jul 7, 2017
typings Update to TypeScript 2.0 and migrate to @types Sep 3, 2016
.editorconfig cleanup dojo/dom* typings after merge Dec 21, 2015
.gitattributes Add tslint and gitignore Dec 15, 2015
.gitignore Added tests/dojox to tsconfig so it would include it in the travis bu… Oct 15, 2016
.npmignore Add .npmignore Jan 12, 2016
.travis.yml Update Travis CI to Node.js 6 Aug 1, 2016 Update CONTRIBUTING Jan 13, 2016
Gruntfile.js Updated build to work with grunt-dojo2-beta.29 Feb 8, 2017
LICENSE Update LICENSE Jan 12, 2016 Adding support for AMD Plugin Globbing (#114) Feb 12, 2017
index.d.ts Initial support for typings/typings May 18, 2016
package.json Update package meta data Sep 22, 2017
tsconfig.json Add some dijit/Menu* modules and some other fixups (#131) Sep 13, 2017
tslint.json Add some dijit/Menu* modules and some other fixups (#131) Sep 13, 2017
typings.json Update to TypeScript 2.0 and migrate to @types Sep 3, 2016


Build Status npm version

This is a repository of Dojo 1 TypeScript Typings (including Dijit and DojoX).

Currently, this repository does not include all the typings for Dijit and DojoX, although Dojo is currently fully covered. The aim is to cover all of Dijit and continue to accept any community contributions for DojoX.

For other packages, because Dojo 2 is built on TypeScript its typings are inherent in its distrubution. The goal for affiliated Dojo 1 projects (like dgrid and dstore is that they will include typings as part of their repository.


Because Dojo, Dijit and DojoX are such large and complex code bases, the repository tries to break it down into easier to maintain pieces that also allow easy additions, modifications, etc.

Each major namespace is broken down into dojo, dijit and dojox directories, having the major version number in a sub directory within. Currently only Dojo 1.11 is included. These typings should work for most older versions of Dojo post 1.7, though it may include some functionality that is not present in those older releases.

The ambient declarations that mirror the Dojo namespaces are indexed via the index.d.ts file located in each directory and the ambient module names are then declared in a single file for the namespace called modules.d.ts. To utilise in a project, where you are going to import several modules via an AMD loader, you would likely just need to reference the modules.d.ts. If you need to modify the names of the ambient modules to match your runtime environment, then you would copy the modules.d.ts and rename all the modules as required.

Basic usage would be to include the index.d.ts and likely modules.d.ts in files used either by tsc or in your tsconfig.json or referenced within your TypeScript files. The wiki contains some basic how to instructions.

The easiest way to install the typings is via npm:

> npm install dojo-typings --save-dev


The repository has a Gruntfile.js and a development dependency of grunt that can help validate any changes to the typings. After cloning the repository and running npm install, you can then run grunt or grunt dev which will compile the files with tsc as well as run tslint against the core files.


There are examples of how to use the typings in a TypeScript project located in the examples directory of this repository.


Typings are global

At the time of this writing (TypeScript 1.7/1.8), typings are global and absolute. In order to change module resolution from dojo/... the modules.d.ts will need to be updated.

String Literals

The current typings are built around TypeScript 1.7. TypeScript 1.8 introduced string literal types and there are improvements that can be made to the typings, several of them noted as comments in the existing typings.

Note: while the repository currently uses TypeScript 1.8 as its development dependency we haven't started using the string literals yet.


Contributions to this repository are very much welcomed! If you wish to contribute to this repository, please see our Contributing Guidelines.

You can’t perform that action at this time.