@@ -32,7 +32,12 typescript { | |||
|
32 | 32 | |
|
33 | 33 | configureTsMain { |
|
34 | 34 | compilerOptions { |
|
35 | types = ["requirejs", "dojo-typings"] | |
|
35 | baseUrl = "$projectDir/src" | |
|
36 | paths = [ | |
|
37 | "dojo/*" : [ "typings/dojo/*" ], | |
|
38 | "dijit/*" : [ "typings/dijit/*" ] | |
|
39 | ] | |
|
40 | types = ["requirejs", "$projectDir/src/typings/dojo/index" /*, "dojo-typings"*/] | |
|
36 | 41 | } |
|
37 | 42 | } |
|
38 | 43 |
@@ -1145,9 +1145,9 | |||
|
1145 | 1145 | "dev": true |
|
1146 | 1146 | }, |
|
1147 | 1147 | "typescript": { |
|
1148 |
"version": "3. |
|
|
1149 |
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3. |
|
|
1150 | "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", | |
|
1148 | "version": "3.8.3", | |
|
1149 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", | |
|
1150 | "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", | |
|
1151 | 1151 | "dev": true |
|
1152 | 1152 | }, |
|
1153 | 1153 | "uri-js": { |
@@ -21,7 +21,7 | |||
|
21 | 21 | "devDependencies": { |
|
22 | 22 | "@types/requirejs": "2.1.31", |
|
23 | 23 | "dojo": "1.16.0", |
|
24 |
"typescript": "~3. |
|
|
24 | "typescript": "~3.8.3", | |
|
25 | 25 | "eslint": "6.8.0", |
|
26 | 26 | "tslint": "6.0.0", |
|
27 | 27 | "@implab/core-amd": "^1.3.2", |
@@ -1,9 +1,10 | |||
|
1 | 1 | import declare = require("dojo/_base/declare"); |
|
2 | 2 | import { each } from "@implab/core-amd/safe"; |
|
3 | 3 | import { Constructor } from "@implab/core-amd/interfaces"; |
|
4 | // import { DeclareConstructor } from "dojo/_base/declare"; | |
|
5 | 4 |
|
|
6 | type DeclareConstructor<T> = dojo._base.DeclareConstructor<T>; | |
|
5 | // declare const declare: any; | |
|
6 | ||
|
7 | type DeclareConstructor<T> = declare.DeclareConstructor<T>; | |
|
7 | 8 | |
|
8 | 9 | export interface AbstractConstructor<T = {}> { |
|
9 | 10 | prototype: T; |
@@ -3,8 +3,9 import _WidgetBase = require("dijit/_Wid | |||
|
3 | 3 | import _AttachMixin = require("dijit/_AttachMixin"); |
|
4 | 4 | import { BuildContext, isNode } from "./traits"; |
|
5 | 5 | import registry = require("dijit/registry"); |
|
6 |
|
|
|
7 | type Handle = dojo.Handle; | |
|
6 | import { Handle } from "dojo/interfaces"; | |
|
7 | ||
|
8 | // type Handle = dojo.Handle; | |
|
8 | 9 | |
|
9 | 10 | @djclass |
|
10 | 11 | export abstract class DjxWidgetBase extends djbase(_WidgetBase, _AttachMixin) { |
@@ -1,13 +1,18 | |||
|
1 | 1 | { |
|
2 | 2 | "extends": "../tsconfig", |
|
3 | 3 | "compilerOptions": { |
|
4 | "baseUrl": "../", | |
|
4 | 5 | "rootDir": "ts", |
|
5 | 6 | "rootDirs": [ |
|
6 | 7 | "ts", |
|
7 | 8 | "typings" |
|
8 | 9 | ], |
|
10 | "paths" : { | |
|
11 | "dojo/*" : [ "typings/dojo/*" ], | |
|
12 | "dijit/*" : [ "typings/dijit/*" ] | |
|
13 | }, | |
|
9 | 14 | "types": [ |
|
10 |
"requirejs", " |
|
|
15 | "requirejs", "./typings/index", "../typings/dojo/index" | |
|
11 | 16 | ] |
|
12 | 17 | } |
|
13 | 18 | } No newline at end of file |
@@ -11,7 +11,7 test("simple", (ok, fail, log) => { | |||
|
11 | 11 | }, 100); |
|
12 | 12 | }); |
|
13 | 13 | |
|
14 | test("simple", async log => { | |
|
14 | test("simple", async (log, fail) => { | |
|
15 | 15 | await delay(0); |
|
16 | 16 | |
|
17 | 17 | assert.ok(true); // everything is fine |
@@ -1,6 +1,6 | |||
|
1 | import { DeclareConstructor } from "dojo/_base/declare"; | |
|
2 | 1 |
|
|
3 | 2 | import _WidgetBase = require("./_WidgetBase"); |
|
3 | import declare = require("dojo/_base/declare"); | |
|
4 | 4 | |
|
5 | 5 | declare module "./_WidgetBase" { |
|
6 | 6 | interface _WidgetBase { |
@@ -81,7 +81,7 interface _AttachMixin { | |||
|
81 | 81 | destroyRendering(preserveDom?: boolean): void; |
|
82 | 82 | } |
|
83 | 83 | |
|
84 | interface _AttachMixinConstructor extends DeclareConstructor<_AttachMixin> { } | |
|
84 | interface _AttachMixinConstructor extends declare.DeclareConstructor<_AttachMixin> { } | |
|
85 | 85 | |
|
86 | 86 | declare const _AttachMixin: _AttachMixinConstructor; |
|
87 | 87 | export = _AttachMixin; |
@@ -2,7 +2,6 import Stateful = require("dojo/Stateful | |||
|
2 | 2 | import Destroyable = require("./Destroyable"); |
|
3 | 3 | import { ExtensionEvent } from "dojo/on"; |
|
4 | 4 | import { NodeFragmentOrString, Handle, NodeOrString, WatchHandle } from "dojo/interfaces"; |
|
5 | import { DeclareConstructor } from "dojo/_base/declare"; | |
|
6 | 5 | |
|
7 | 6 | declare namespace _WidgetBase { |
|
8 | 7 | interface _WidgetBase extends Stateful, Destroyable { |
@@ -231,7 +230,7 declare namespace _WidgetBase { | |||
|
231 | 230 | } |
|
232 | 231 | |
|
233 | 232 | interface _WidgetBaseConstructor<W = _WidgetBase> extends DeclareConstructor<W> { |
|
234 | new(params: Object, srcNodeRef: NodeOrString): W; | |
|
233 | new(params: Object, srcNodeRef?: NodeOrString): W; | |
|
235 | 234 | } |
|
236 | 235 | |
|
237 | 236 | } |
@@ -1,6 +1,6 | |||
|
1 | 1 | /* dojo/_base/Color */ |
|
2 | 2 | |
|
3 |
declare namespace |
|
|
3 | declare namespace Color { | |
|
4 | 4 | type ColorValue = [number, number, number]; |
|
5 | 5 | type ColorValueAlpha = [number, number, number, number]; |
|
6 | 6 | |
@@ -264,6 +264,6 declare namespace dojoColor { | |||
|
264 | 264 | |
|
265 | 265 | } |
|
266 | 266 | |
|
267 |
type |
|
|
268 |
declare const |
|
|
269 |
export = |
|
|
267 | type Color = Color.Color; | |
|
268 | declare const Color: Color.ColorConstructor; | |
|
269 | export = Color; |
@@ -1,5 +1,6 | |||
|
1 | 1 | import DojoPromise = require("../promise/Promise"); |
|
2 | 2 | import { PromiseCallback, PromiseErrback, PromiseProgback } from "../promise/Promise"; |
|
3 | import declare = require("./declare"); | |
|
3 | 4 | |
|
4 | 5 | /* dojo/_base/Deferred */ |
|
5 | 6 |
@@ -1,7 +1,7 | |||
|
1 | 1 | import { GenericConstructor } from "../interfaces"; |
|
2 | 2 | |
|
3 | 3 | /* dojo/_base/array */ |
|
4 | interface DojoArray { | |
|
4 | ||
|
5 | 5 |
|
|
6 | 6 |
|
|
7 | 7 |
|
@@ -9,12 +9,12 interface DojoArray { | |||
|
9 | 9 |
|
|
10 | 10 |
|
|
11 | 11 |
|
|
12 |
|
|
|
12 | export function every<T>(arr: T[] | string, callback: string | ((item: T, idx: number, arr: T[]) => boolean), thisObj?: Object): boolean; | |
|
13 | 13 | |
|
14 | 14 |
|
|
15 | 15 |
|
|
16 | 16 |
|
|
17 |
|
|
|
17 | export function some<T>(arr: T[] | string, callback: string | ((item: T, idx: number, arr: T[]) => boolean), thisObj?: Object): boolean; | |
|
18 | 18 | |
|
19 | 19 |
|
|
20 | 20 |
|
@@ -22,34 +22,30 interface DojoArray { | |||
|
22 | 22 |
|
|
23 | 23 |
|
|
24 | 24 |
|
|
25 |
|
|
|
25 | export function indexOf<T>(arr: T[], value: T, fromIndex?: number, findLast?: boolean): number; | |
|
26 | 26 | |
|
27 | 27 |
|
|
28 | 28 |
|
|
29 | 29 |
|
|
30 | 30 |
|
|
31 |
|
|
|
31 | export function lastIndexOf<T>(arr: T[], value: T, fromIndex?: number): number; | |
|
32 | 32 | |
|
33 | 33 |
|
|
34 | 34 |
|
|
35 | 35 |
|
|
36 | 36 |
|
|
37 |
|
|
|
37 | export function forEach<T>(arr: T[], callback: string | ((item: T, idx: number, arr: T[]) => void), thisObj?: Object): void; | |
|
38 | 38 | |
|
39 | 39 |
|
|
40 | 40 |
|
|
41 | 41 |
|
|
42 | 42 |
|
|
43 |
|
|
|
43 | export function map<T, U>(arr: T[] | string, callback: string | ((item: T, idx: number, arr: T[]) => U), thisObj?: Object, Ctr?: GenericConstructor<U[]>): U[]; | |
|
44 | 44 | |
|
45 | 45 |
|
|
46 | 46 |
|
|
47 | 47 |
|
|
48 | 48 |
|
|
49 |
|
|
|
49 | export function filter<T>(arr: T[], callback: string | ((item: T, idx: number, arr: T[]) => boolean), thisObj?: Object): T[]; | |
|
50 | 50 | |
|
51 |
|
|
|
52 | } | |
|
53 | ||
|
54 | declare const dojoArray: DojoArray; | |
|
55 | export = dojoArray; | |
|
51 | export function clearCache(): void; |
@@ -10,4 +10,4 import"../query"; | |||
|
10 | 10 | import "./xhr"; |
|
11 | 11 | import "./fx"; |
|
12 | 12 | |
|
13 | export = dojo; No newline at end of file | |
|
13 | export = dojo; |
@@ -1,5 +1,7 | |||
|
1 | 1 | import { ColorValue, ColorValueAlpha } from "./Color"; |
|
2 | 2 | import { HasCache } from "../has"; |
|
3 | ||
|
4 | declare namespace config { | |
|
3 | 5 | interface Config { |
|
4 | 6 | /** Defaults to `false`. If set to `true`, ensures that Dojo provides |
|
5 | 7 | * extended debugging feedback via Firebug. If Firebug is not available |
@@ -146,6 +148,7 interface Config { | |||
|
146 | 148 | useDeferredInstrumentation: string | boolean | number; |
|
147 | 149 | } |
|
148 | 150 | |
|
149 | type dojoConfig = Config; | |
|
150 | declare const dojoConfig: Config; | |
|
151 | export = dojoConfig; No newline at end of file | |
|
151 | } | |
|
152 | ||
|
153 | declare const config: config.Config; | |
|
154 | export = config; |
@@ -1,10 +1,9 | |||
|
1 | 1 | import { Handle } from "../interfaces"; |
|
2 | 2 | |
|
3 | interface Connect { | |
|
4 | 3 |
|
|
5 | 4 |
|
|
6 | 5 |
|
|
7 |
|
|
|
6 | export function _keypress(object: any, listener: EventListener): Handle; | |
|
8 | 7 | |
|
9 | 8 |
|
|
10 | 9 |
|
@@ -13,25 +12,25 interface Connect { | |||
|
13 | 12 |
|
|
14 | 13 |
|
|
15 | 14 |
|
|
16 |
|
|
|
17 |
|
|
|
15 | export function connect(obj: any, event: string, context: any, method: EventListener | string, dontFix?: boolean): Handle; | |
|
16 | export function connect(event: string, context: any, method: EventListener | string, dontFix?: boolean): Handle; | |
|
18 | 17 | |
|
19 | 18 |
|
|
20 | 19 |
|
|
21 | 20 |
|
|
22 |
|
|
|
21 | export function disconnect(handle: Handle): void; | |
|
23 | 22 | |
|
24 | 23 |
|
|
25 | 24 |
|
|
26 | 25 |
|
|
27 | 26 |
|
|
28 | 27 |
|
|
29 |
|
|
|
28 | export function subscribe(topic: string, context: any, method: EventListener): Handle; | |
|
30 | 29 | |
|
31 | 30 |
|
|
32 | 31 |
|
|
33 | 32 |
|
|
34 |
|
|
|
33 | export function publish(topic: string, args: any[]): boolean; | |
|
35 | 34 | |
|
36 | 35 |
|
|
37 | 36 |
|
@@ -39,11 +38,10 interface Connect { | |||
|
39 | 38 |
|
|
40 | 39 |
|
|
41 | 40 |
|
|
42 |
|
|
|
43 |
|
|
|
41 | export function connectPublisher(topic: string, obj: any, method: string): Handle; | |
|
42 | export function connectPublisher(topic: string, method: EventListener): Handle; | |
|
44 | 43 | |
|
45 | 44 |
|
|
46 | 45 |
|
|
47 | 46 |
|
|
48 |
|
|
|
49 | } No newline at end of file | |
|
47 | export function isCopyKey(e: Event): boolean; |
@@ -1,10 +1,11 | |||
|
1 | declare namespace declare { | |
|
2 | /* dojo/_base/declare */ | |
|
1 | declare module "./kernel" { | |
|
2 | interface Dojo { | |
|
3 | declare: declare.Declare; | |
|
4 | safeMixin: typeof declare.safeMixin; | |
|
5 | } | |
|
6 | } | |
|
3 | 7 | |
|
4 | /** | |
|
5 | * dojo/_base/declare() returns a constructor `C`. `new C()` returns an Object with the following | |
|
6 | * methods, in addition to the methods and properties specified via the arguments passed to declare(). | |
|
7 | */ | |
|
8 | declare namespace declare { | |
|
8 | 9 | interface DeclareCreatedObject { |
|
9 | 10 | declaredClass: string; |
|
10 | 11 | |
@@ -99,9 +100,6 declare namespace declare { | |||
|
99 | 100 | createSubclass<U>(mixins: any, props: U): DeclareConstructor<T & U>; |
|
100 | 101 | } |
|
101 | 102 | |
|
102 | /** | |
|
103 | * Create a feature-rich constructor from compact notation. | |
|
104 | */ | |
|
105 | 103 | interface Declare { |
|
106 | 104 | <A, B, C, D>(superClass: [DeclareConstructor<A>, DeclareConstructor<B>, DeclareConstructor<C>, DeclareConstructor<D>]): DeclareConstructor<A & B & C & D>; |
|
107 | 105 | <A, B, C>(superClass: [DeclareConstructor<A>, DeclareConstructor<B>, DeclareConstructor<C>]): DeclareConstructor<A & B & C>; |
@@ -1,22 +1,21 | |||
|
1 | 1 | /* dojo/_base/event */ |
|
2 | 2 | |
|
3 | 3 | /** |
|
4 | * @module | |
|
4 | 5 | * This module defines dojo DOM event API. Usually you should use dojo/on, and evt.stopPropagation() + |
|
5 | 6 | * evt.preventDefault(), rather than this module. |
|
6 | 7 | */ |
|
7 | interface EventModule { | |
|
8 | ||
|
9 | ||
|
8 | 10 |
|
|
9 | 11 |
|
|
10 | 12 |
|
|
11 | 13 |
|
|
12 |
|
|
|
14 | export declare function fix(evt: Event, sender: Element): Event; | |
|
13 | 15 | |
|
14 | 16 |
|
|
15 | 17 |
|
|
16 | 18 |
|
|
17 | 19 |
|
|
18 |
|
|
|
19 | } | |
|
20 | export declare function stop(evt: Event): void; | |
|
20 | 21 | |
|
21 | declare const dojoEvent: EventModule; | |
|
22 | export = dojoEvent; |
@@ -1,9 +1,8 | |||
|
1 | 1 | import Evented = require("../Evented"); |
|
2 | 2 | |
|
3 | declare namespace fx { | |
|
4 | 3 |
|
|
5 | 4 | |
|
6 |
|
|
|
5 | export interface _Line { | |
|
7 | 6 |
|
|
8 | 7 |
|
|
9 | 8 |
|
@@ -14,15 +13,17 declare namespace fx { | |||
|
14 | 13 |
|
|
15 | 14 |
|
|
16 | 15 |
|
|
17 |
|
|
|
18 |
|
|
|
16 | export interface LineConstructor { | |
|
17 | new(start: number, end: number): _Line; | |
|
18 | ||
|
19 | prototype: _Line; | |
|
19 | 20 | } |
|
20 | 21 | |
|
21 |
|
|
|
22 | export interface EasingFunction { | |
|
22 | 23 |
|
|
23 | 24 | } |
|
24 | 25 | |
|
25 |
|
|
|
26 | export interface Animation extends Evented { | |
|
26 | 27 |
|
|
27 | 28 |
|
|
28 | 29 |
|
@@ -32,7 +33,7 declare namespace fx { | |||
|
32 | 33 |
|
|
33 | 34 |
|
|
34 | 35 |
|
|
35 |
|
|
|
36 | curve: _Line | [number, number]; | |
|
36 | 37 | |
|
37 | 38 |
|
|
38 | 39 |
|
@@ -92,7 +93,7 declare namespace fx { | |||
|
92 | 93 |
|
|
93 | 94 |
|
|
94 | 95 | |
|
95 |
|
|
|
96 | _percent: number; | |
|
96 | 97 |
|
|
97 | 98 |
|
|
98 | 99 | |
@@ -145,16 +146,16 declare namespace fx { | |||
|
145 | 146 |
|
|
146 | 147 |
|
|
147 | 148 |
|
|
148 |
|
|
|
149 | export interface AnimationConstructor { | |
|
149 | 150 |
|
|
150 | 151 |
|
|
151 | 152 | } |
|
152 | 153 | |
|
153 |
|
|
|
154 | export interface AnimationCallback { | |
|
154 | 155 |
|
|
155 | 156 | } |
|
156 | 157 | |
|
157 |
|
|
|
158 | export interface FadeArguments { | |
|
158 | 159 |
|
|
159 | 160 |
|
|
160 | 161 |
|
@@ -163,56 +164,52 declare namespace fx { | |||
|
163 | 164 |
|
|
164 | 165 | } |
|
165 | 166 | |
|
166 |
|
|
|
167 | export interface AnimationArgumentsProperties { | |
|
167 | 168 |
|
|
168 | 169 | } |
|
169 | 170 | |
|
170 |
|
|
|
171 | export interface AnimationArguments extends FadeArguments { | |
|
171 | 172 |
|
|
172 | 173 |
|
|
173 | 174 | } |
|
174 | 175 | |
|
175 | interface Fx { | |
|
176 |
|
|
|
176 | ||
|
177 | export const _Line: LineConstructor; | |
|
177 | 178 | |
|
178 |
|
|
|
179 | export const Animation: AnimationConstructor; | |
|
179 | 180 | |
|
180 |
|
|
|
181 | export function _fade(args: any): Animation; | |
|
181 | 182 | |
|
182 | 183 | /** |
|
183 | 184 |
|
|
184 | 185 |
|
|
185 | 186 | */ |
|
186 |
|
|
|
187 | export function fadeIn(args: FadeArguments): Animation; | |
|
187 | 188 | |
|
188 | 189 | /** |
|
189 | 190 |
|
|
190 | 191 |
|
|
191 | 192 | */ |
|
192 |
|
|
|
193 | export function fadeOut(args: FadeArguments): Animation; | |
|
193 | 194 | |
|
194 |
|
|
|
195 | export function _defaultEasing(n?: number): number; | |
|
195 | 196 | |
|
196 | 197 | /** |
|
197 | 198 |
|
|
198 | 199 |
|
|
199 | 200 |
|
|
200 | 201 | */ |
|
201 |
|
|
|
202 | export function animateProperty(args: AnimationArguments): Animation; | |
|
202 | 203 | |
|
203 | 204 | /** |
|
204 | 205 |
|
|
205 | 206 |
|
|
206 | 207 |
|
|
207 | 208 | */ |
|
208 | anim( | |
|
209 | export function anim( | |
|
209 | 210 |
|
|
210 | 211 |
|
|
211 | 212 |
|
|
212 | 213 |
|
|
213 | 214 |
|
|
214 | 215 |
|
|
215 | } | |
|
216 | } | |
|
217 | declare const fx: fx.Fx; | |
|
218 | export = fx; |
@@ -1,5 +1,5 | |||
|
1 | 1 | /* dojo/_base/kernel */ |
|
2 |
import Config |
|
|
2 | import { Config } from './config'; | |
|
3 | 3 | |
|
4 | 4 | declare namespace dojo { |
|
5 | 5 | interface Dijit { |
@@ -13,7 +13,6 declare namespace dojo { | |||
|
13 | 13 | config: Config; |
|
14 | 14 | global: any; |
|
15 | 15 | |
|
16 | // TODO: dojot, dojox | |
|
17 | 16 |
|
|
18 | 17 | dojox: Dojox; |
|
19 | 18 |
General Comments 0
You need to be logged in to leave comments.
Login now