add missing typeof, makes unit tests pass
This commit is contained in:
parent
03782f8aea
commit
353eeca339
@ -101,7 +101,7 @@ const paths = {
|
|||||||
|
|
||||||
|
|
||||||
const tsBaseArgs = {
|
const tsBaseArgs = {
|
||||||
target: "es5",
|
target: "es6",
|
||||||
jsx: "react",
|
jsx: "react",
|
||||||
reactNamespace: "React",
|
reactNamespace: "React",
|
||||||
experimentalDecorators: true,
|
experimentalDecorators: true,
|
||||||
|
@ -216,7 +216,8 @@ export namespace Checkable {
|
|||||||
type: target,
|
type: target,
|
||||||
}, ["(root)"]);
|
}, ["(root)"]);
|
||||||
if (opts.validate) {
|
if (opts.validate) {
|
||||||
if (target.validate !== "function") {
|
if (typeof target.validate !== "function") {
|
||||||
|
console.error("target", target);
|
||||||
throw Error("invalid Checkable annotion: validate method required");
|
throw Error("invalid Checkable annotion: validate method required");
|
||||||
}
|
}
|
||||||
// May throw exception
|
// May throw exception
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es6",
|
||||||
"jsx": "react",
|
"jsx": "react",
|
||||||
"reactNamespace": "React",
|
"reactNamespace": "React",
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
|
Loading…
Reference in New Issue
Block a user