intertype
Advanced tools
Comparing version 0.112.0 to 0.113.0
@@ -523,2 +523,7 @@ (function() { | ||
//--------------------------------------------------------------------------------------------------------- | ||
is_extension_of(Derived, Base) { | ||
return Derived === Base || Derived.prototype instanceof Base; | ||
} | ||
//--------------------------------------------------------------------------------------------------------- | ||
get_state_report(cfg) { | ||
@@ -525,0 +530,0 @@ return H.get_state_report(this, cfg); |
{ | ||
"name": "intertype", | ||
"version": "0.112.0", | ||
"version": "0.113.0", | ||
"description": "A JavaScript typechecker", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -25,2 +25,3 @@ | ||
- [Intertype `equals()`](#intertype-equals) | ||
- [Intertype `is_extension_of()`](#intertype-is_extension_of) | ||
- [To Do](#to-do) | ||
@@ -495,2 +496,8 @@ - [Is Done](#is-done) | ||
## Intertype `is_extension_of()` | ||
* `is_extension_of: ( Derived, Base ) -> Derived is Base or (Derived::) instanceof Base` | ||
* tests whether class `Derived` is derived from class `Base`; this includes the case where `Derived` is just | ||
an alias for `Base` (i.e. JS `Derived === Base`) | ||
## To Do | ||
@@ -677,2 +684,4 @@ | ||
* **[–]** catch errors thrown inside a type's `create()` function and convert them to validation errors | ||
* **[–]** implement `is_extension_of Derived, Base` using `Derived is Base or (Derived::) instanceof Base` | ||
(first seen in MoonRiver) | ||
@@ -679,0 +688,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
360925
45
1937
755