diff --git a/build.gradle b/build.gradle --- a/build.gradle +++ b/build.gradle @@ -43,12 +43,8 @@ configureTsMain { configureTsTest { compilerOptions { - baseUrl = "." - paths = [ - "@implab/djx" : [ sources.main.output.typingsDir.get().toString() ], - "@implab/djx/*" : [ "${sources.main.output.typingsDir.get().toString()}/*" ] - ] - types = ["requirejs", sources.main.output.typingsDir.get().toString()] + typeRoots = [] + types = ["requirejs", sources.main.output.typingsDir.get().toString() ] } } diff --git a/src/main/ts/declare.ts b/src/main/ts/declare.ts --- a/src/main/ts/declare.ts +++ b/src/main/ts/declare.ts @@ -80,11 +80,11 @@ export function djbase { target[makeSetterName(name)] = params; }; - else if (isMemberBindSpec(params)) { + } else { return (target: any, name: string) => { target[name] = null; target[makeSetterName(name)] = function (v: any) { diff --git a/src/main/tsconfig.json b/src/main/tsconfig.json --- a/src/main/tsconfig.json +++ b/src/main/tsconfig.json @@ -7,7 +7,7 @@ "typings" ], "types": [ - "requirejs", "./typings/index", "dojo-typings" + "requirejs", "./typings", "dojo-typings" ] } -} \ No newline at end of file +} diff --git a/src/main/typings/index.d.ts b/src/main/typings/index.d.ts --- a/src/main/typings/index.d.ts +++ b/src/main/typings/index.d.ts @@ -2,3 +2,9 @@ declare module "@implab/djx/css!*" { const result: { url: string }; export = result; } + +declare namespace JSX { + interface IntrinsicElements { + [name: string]: any; + } +} diff --git a/src/test/ts/dummy.ts b/src/test/ts/dummy.ts --- a/src/test/ts/dummy.ts +++ b/src/test/ts/dummy.ts @@ -1,8 +1,7 @@ import { test } from "./TestTraits"; import { delay } from "@implab/core-amd/safe"; import { assert } from "chai"; -import css = require("@implab/djx/css!my,css"); -import {} from "@implab/djx/i18n"; +import css = require("@implab/djx/css!my.css"); test("simple", (ok, fail, log) => { setTimeout(() => { diff --git a/src/test/ts/view/MyWidget.tsx b/src/test/ts/view/MyWidget.tsx new file mode 100644 --- /dev/null +++ b/src/test/ts/view/MyWidget.tsx @@ -0,0 +1,22 @@ +import { djbase, djclass, bind, prototype } from "../declare"; + +import { DjxWidgetBase } from "../tsx/DjxWidgetBase"; +import { createElement } from "../tsx"; + + +@djclass +export class MyWidget extends djbase(DjxWidgetBase) { + + @bind({node: "titleNode", type:"innerHTML"}) + title = ""; + + @prototype() + counter = 0; + + render() { + return
+

+
; + } + +} diff --git a/src/test/tsconfig.json b/src/test/tsconfig.json --- a/src/test/tsconfig.json +++ b/src/test/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../tsconfig", "compilerOptions": { - "baseUrl": ".", //"rootDir": "ts", "rootDirs": [ "ts", @@ -9,10 +8,6 @@ "../main/ts", "../main/typings" ], - "paths": { - "@implab/djx" : ["../main/ts", "../main/typings"], - "@implab/djx/*" : ["../main/ts/*", "../main/typings/*" ] - }, - "types": ["requirejs", "../main/typings"] + "types": ["requirejs", "../main/typings", "dojo-typings"] } } \ No newline at end of file diff --git a/src/tsconfig.json b/src/tsconfig.json --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -6,7 +6,7 @@ "types": [], "experimentalDecorators": true, "jsxFactory": "createElement", - //"skipLibCheck": true, + "skipLibCheck": true, "jsx": "react", "lib": ["es5", "es2015.promise", "es2015.symbol", "es2015.iterable", "dom", "scripthost"] }