diff --git a/lib/6to5/transformation/templates/property-method-assignment-wrapper-generator.js b/lib/6to5/transformation/templates/property-method-assignment-wrapper-generator.js new file mode 100644 index 0000000000..fb59a89ae9 --- /dev/null +++ b/lib/6to5/transformation/templates/property-method-assignment-wrapper-generator.js @@ -0,0 +1,11 @@ +(function (FUNCTION_KEY) { + var WRAPPER_KEY = function* FUNCTION_ID() { + return yield* FUNCTION_KEY.apply(this, arguments); + }; + + WRAPPER_KEY.toString = function () { + return FUNCTION_KEY.toString(); + }; + + return WRAPPER_KEY; +})(FUNCTION)