diff --git a/src/type-hash.js b/src/type-hash.js index c132d0a..a1ccbff 100644 --- a/src/type-hash.js +++ b/src/type-hash.js @@ -116,6 +116,12 @@ function hashType(type, level = 0, seenTypes = new Map()) { typeHash: hashType(actualTrait, level + 1, seenTypes) }; } + } else if (rule._isTypeAlias === true) { + /* Should we wrap this in an `alias` to represent alias-level additional constraints? Or should we just return the canonical rule for the _alias itself? */ + props = { + ruleType: "alias", + type: rule._alias + }; } else { throw new Error(`Unrecognized rule type: ${util.inspect(rule)}`); }