feat: added jsx support and some tests

This commit is contained in:
Daniel Ledda
2022-05-26 22:00:23 +02:00
parent 182c38232e
commit e5e0c47f68
10 changed files with 173 additions and 75 deletions

View File

@@ -13,7 +13,7 @@ export interface ICapsule<T extends Captable = Captable> {
}
export function isCapsule(maybeCapsule: any): maybeCapsule is ICapsule {
return Object.prototype.hasOwnProperty.call(maybeCapsule, 'val')
return typeof maybeCapsule.val !== "undefined"
&& typeof maybeCapsule.watch === "function"
&& typeof maybeCapsule.toString === "function";
}