diff --git a/package-lock.json b/package-lock.json --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,8 @@ { + "name": "@implab/djx", + "version": "0.0.1-dev", + "lockfileVersion": 1, "requires": true, - "lockfileVersion": 1, "dependencies": { "@babel/code-frame": { "version": "7.8.3", @@ -45,18 +47,7 @@ }, "@types/dijit": { "version": "file:src/typings/dijit", - "dev": true, - "requires": { - "@types/dojo": "^1.0.0" - }, - "dependencies": { - "@types/dojo": { - "version": "1.9.42", - "resolved": "https://registry.npmjs.org/@types/dojo/-/dojo-1.9.42.tgz", - "integrity": "sha512-yFfw7uoOlCy6QgxTWIzii4/QOsIDXq9gX3/6iXQ2nz//Y23yWXFRaYpoQ7GW0fvPN3lKtYkXgv6GXtdtWlHFXg==", - "dev": true - } - } + "dev": true }, "@types/dojo": { "version": "file:src/typings/dojo", diff --git a/package.json b/package.json --- a/package.json +++ b/package.json @@ -1,4 +1,18 @@ { + "name": "@implab/djx", + "version": "0.0.1-dev", + "description": "Supports using dojo version 1 with typescript and .tsx files", + "keywords": [ + "dojo", + "tsx", + "typescript", + "widgets" + ], + "repository": "", + "peerDependencies": { + "dojo": "1.16.0", + "@implab/core-amd": "^1.3.2" + }, "devDependencies": { "@types/requirejs": "2.1.31", "dojo": "1.16.0", diff --git a/src/main/ts/djx/WidgetContext.ts b/src/main/ts/djx/WidgetContext.ts --- a/src/main/ts/djx/WidgetContext.ts +++ b/src/main/ts/djx/WidgetContext.ts @@ -2,7 +2,8 @@ import dom = require("dojo/dom-construct import { argumentNotNull } from "@implab/core-amd/safe"; import _WidgetBase = require("dijit/_WidgetBase"); import { BuildContextBase } from "./BuildContextBase"; -import { _WidgetBaseConstructor } from "dijit/_WidgetBase"; + +type _WidgetBaseConstructor = typeof _WidgetBase; export class WidgetContext extends BuildContextBase { widgetClass: _WidgetBaseConstructor; diff --git a/src/typings/dijit/_WidgetBase.d.ts b/src/typings/dijit/_WidgetBase.d.ts --- a/src/typings/dijit/_WidgetBase.d.ts +++ b/src/typings/dijit/_WidgetBase.d.ts @@ -5,7 +5,6 @@ import { NodeFragmentOrString, Handle, N import { DeclareConstructor } from "dojo/_base/declare"; declare namespace _WidgetBase { - interface _WidgetBase extends Stateful, Destroyable { /** @@ -234,6 +233,7 @@ declare namespace _WidgetBase { interface _WidgetBaseConstructor extends DeclareConstructor { new(params: Object, srcNodeRef: NodeOrString): W; } + } type _WidgetBase = _WidgetBase._WidgetBase; diff --git a/src/typings/dijit/package.json b/src/typings/dijit/package.json --- a/src/typings/dijit/package.json +++ b/src/typings/dijit/package.json @@ -1,7 +1,4 @@ { "name": "@types/dijit", - "version": "1.0.1-rc1", - "dependencies": { - "@types/dojo": "^1.0.0" - } + "version": "1.0.1-rc1" } \ No newline at end of file