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