-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add import.meta.main #1835
Add import.meta.main #1835
Conversation
As this stands at the moment, it won't flow through to the runtime type library. (If you do The interface is already a global interface ( That is a bit complicated, so if you wanted to, just move it back to the web assembly library, and then I can do a follow up PR making the change to |
@kitsonk actually I get:
// @url js/lib.import_meta.d.ts
interface ImportMeta {
url: string;
main: boolean;
} EDIT: Okay I reread your comment and understand the problem. Let's tackle it in another PR. |
Maybe we can add an argument to |
@ry I can then place it in |
@bartlomieju yes that makes sense to me |
@ry not super happy because there's a lot of bool flags passing but it got job done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Just a few comments.
@ry changes applied |
deno_mod_evaluate(d, d, throw_main); | ||
EXPECT_EQ(nullptr, deno_last_exception(d)); | ||
|
||
deno_delete(d); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice test!
Thanks @ry, somehow missed that file... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM : )
Closes #1834
I tried to moveImportMeta
declaration to separate, however TS was crushing then, I'll investigate that tomorrow.I had also test in C++, but it felt duplicated with TS test.