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

Static properties throws syntax error #148

Closed
bayssmekanique opened this issue Feb 13, 2024 · 1 comment
Closed

Static properties throws syntax error #148

bayssmekanique opened this issue Feb 13, 2024 · 1 comment

Comments

@bayssmekanique
Copy link

There appears to be an issue parsing static properties on a Class.

Error:

{
  "errorType": "SyntaxError",
  "errorMessage": "invalid property name",
  "stackTrace": [
    "    at /var/task/dist/server/entry.mjs:1878:13",
    ""
  ]
}

Entry File (entry.mjs)

1868: var init_astro_msqbqiov = __esm({
1869:   "dist/server/chunks/astro_msqbqiov.mjs"() {
1870:     "use strict";
1871:     init_colors();
1872:     init_clsx();
1873:     import_cssesc = __toESM(require_cssesc(), 1);
1874:     init_esm();
1875:     __name(normalizeLF, "normalizeLF");
1876:     __name(codeFrame, "codeFrame");
1877:     AstroError = class extends Error {
1878:       static {
1879:         __name(this, "AstroError");
1880:       }
1881:       loc;
1882:       title;
1883:       hint;
1884:       frame;
1885:       type = "AstroError";
1886:       constructor(props, options) {
1887:         const { name, title, message, stack, location, hint, frame: frame2 } = props;
1888:         super(message, options);
1889:         this.title = title;
1890:         this.name = name;
1891:         if (message)
1892:           this.message = message;
1893:         this.stack = stack ? stack : this.stack;
1894:         this.loc = location;
1895:         this.hint = hint;
1896:         this.frame = frame2;
1897:       }
@richarddavison
Copy link
Contributor

Hi, thanks for reporting. Unfortunately static init blocks is an ES2022 feature and we only support ES2020.
QuickJS recently increased support to ES2023 so this will be added to LLRT in time.

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

No branches or pull requests

2 participants