taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 353eeca339e060eb4a03e0b67343086854a5e5d7
parent 03782f8aea043042aaa069de0b91cdb80fbb4679
Author: Florian Dold <florian.dold@gmail.com>
Date:   Sun, 15 Oct 2017 18:55:34 +0200

add missing typeof, makes unit tests pass

Diffstat:
Mgulpfile.js | 2+-
Msrc/checkable.ts | 3++-
Mtsconfig.json | 2+-
3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/gulpfile.js b/gulpfile.js @@ -101,7 +101,7 @@ const paths = { const tsBaseArgs = { - target: "es5", + target: "es6", jsx: "react", reactNamespace: "React", experimentalDecorators: true, diff --git a/src/checkable.ts b/src/checkable.ts @@ -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 diff --git a/tsconfig.json b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es5", + "target": "es6", "jsx": "react", "reactNamespace": "React", "experimentalDecorators": true,