Created
December 29, 2019 02:54
-
-
Save phoddie/05f89653b4017d63e91cb7ef4fffbf83 to your computer and use it in GitHub Desktop.
Generator and AsynGenerator prototypes - at preload and run time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { link, test } from "test" | |
trace(link) | |
trace(test()) | |
debugger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"include": "$(MODDABLE)/examples/manifest_base.json", | |
"modules": { | |
"*": [ | |
"./main", | |
"./test", | |
] | |
}, | |
"preload": [ | |
"test", | |
], | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function test() { | |
const _Function = function() {}.constructor; | |
const _AsyncFunction = async function() {}.constructor; | |
const _AsyncGeneratorFunction = async function*() {}.constructor; | |
const _GeneratorFunction = function*() {}.constructor; | |
return(` | |
_Function == Function ${_Function == Function} | |
_AsyncFunction.__proto__ == Function ${_AsyncFunction.__proto__ == Function} | |
_AsyncGeneratorFunction.__proto__ == Function ${_AsyncGeneratorFunction.__proto__ == Function} | |
_GeneratorFunction.__proto__ == Function ${_GeneratorFunction.__proto__ == Function} | |
`); | |
} | |
export const link = test(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related to tc39/ecma262#1707