-
Notifications
You must be signed in to change notification settings - Fork 37
Mutating Modules
Kitson Kelly edited this page Jan 12, 2016
·
1 revision
In Dojo some modules will mutate the interfaces of already loaded modules. This makes it difficult to type, because namespaces are global in TypeScript.
The approach we are taking to dealing with this, is that if a module/modules make material agumentations to existing prototypes, we will type them as a stand alone .d.ts
. These .d.ts
files then can be individually referenced by those who want the affects on the interface that the modules will cause.
Some examples of this are dojo/fx
and dojo/NodeList-*
modules.
These files should be written in a way where they contain both the interfaces as well as the module declarations and not be referenced in the the index.d.ts
.
Copyright © 2015-2016, The Dojo Foundation
All rights reserved.