Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[console] Use constructor.name to print out function type #664

Merged
merged 3 commits into from
Sep 24, 2018

Conversation

kevinkassimo
Copy link
Contributor

Switch to .__proto__.constructor.name to print out more accurate function type (Function/AsyncFunction/GeneratorFunction)

@benjamingr
Copy link
Contributor

Note that some members of the TC explicitly don't want you to know if a function is an async function or just returns a promise - similarly for GeneratorFunction or just returns an iterator.

In practice I think everyone should be using async/await rather than "raw" promises whenever possible so I'm +1 on this choice.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks - and sorry for the delayed review.

@ry ry merged commit c124db4 into denoland:master Sep 24, 2018
ry added a commit to ry/deno that referenced this pull request Sep 29, 2018
- Adds deno.stdin, deno.stdout, deno.stderr, deno.open(), deno.write(),
  deno.read(), deno.Reader, deno.Writer, deno.copy() denoland#846
- Print 'Compiling' when compiling TS.
- Support zero-copy for writeFile() writeFileSync() denoland#838
- Fixes eval error bug denoland#837
- Make Deno multithreaded denoland#782
- console.warn() goes to stderr denoland#810
- Add deno.readlink()/readlinkSync() denoland#797
- Add --recompile flag denoland#801
- Use constructor.name to print out function type denoland#664
- Rename deno.argv to deno.args
- Add deno.trace() denoland#795
- Continuous benchmarks https://denoland.github.io/deno/
@ry ry mentioned this pull request Sep 29, 2018
ry added a commit that referenced this pull request Sep 29, 2018
- Adds deno.stdin, deno.stdout, deno.stderr, deno.open(), deno.write(),
  deno.read(), deno.Reader, deno.Writer, deno.copy() #846
- Print 'Compiling' when compiling TS.
- Support zero-copy for writeFile() writeFileSync() #838
- Fixes eval error bug #837
- Make Deno multithreaded #782
- console.warn() goes to stderr #810
- Add deno.readlink()/readlinkSync() #797
- Add --recompile flag #801
- Use constructor.name to print out function type #664
- Rename deno.argv to deno.args
- Add deno.trace() #795
- Continuous benchmarks https://denoland.github.io/deno/
@kevinkassimo kevinkassimo deleted the console/func-type branch December 27, 2019 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants