diff --git a/packages/core/src/assertions.js b/packages/core/src/assertions.js index 93fbfd2..3a1b5b0 100644 --- a/packages/core/src/assertions.js +++ b/packages/core/src/assertions.js @@ -33,6 +33,8 @@ Seal.prototype.toJSON = function () { }; module.exports.Discard = Record.makeConstructor('discard', []); +module.exports.Discard._instance = module.exports.Discard(); + module.exports.Capture = Record.makeConstructor('capture', ['specification']); module.exports.Observe = Record.makeConstructor('observe', ['specification']); diff --git a/packages/syntax/src/plugin.js b/packages/syntax/src/plugin.js index ceb7085..a484f57 100644 --- a/packages/syntax/src/plugin.js +++ b/packages/syntax/src/plugin.js @@ -61,7 +61,7 @@ function hasCapturesOrDiscards(nodePath) { return result; } -const _discardAst = template.expression(`SYNDICATE.Discard()`); +const _discardAst = template.expression(`SYNDICATE.Discard._instance`); function discardAst(state) { return _discardAst({ SYNDICATE: state.SyndicateID }); }