npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dojo-typings-upgraded

v1.16.2

Published

A set of Dojo 1 Typings for TypeScript

Downloads

93

Readme

dojo/typings

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.

Usage

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

Building

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.

Examples

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

Limitations

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.

Contributing

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