-
Notifications
You must be signed in to change notification settings - Fork 62
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
Private class fields don't work in a TypeScript file #23
Comments
Hi @fabis94. Jiti uses an isolate build of babel to transform syntax. And the reason is excluded is that class Test {
foo: string = 'bar'
}
console.log(new Test().foo) Would you please share syntax used in |
@pi0 Your example has public properties, class SmartRuntimeConfig {
#foo: string;
constructor(foo: string) {
this.#foo= foo;
}
} |
You are right @fabis94. Fixed in 1.6.4. You have to recreate lock file to get update. |
Thank you |
Am I correct in guessing that this lib doesn't load the private class properties proposal for TypeScript files? This file makes me think so: https://github.com/nuxt-contrib/jiti/blob/5d5ee2895d6670044bda368449557a6a131f7439/src/babel.ts#L19
Because of this (or another) issue I'm unable to use private class properties in my Nuxt.js app.
The text was updated successfully, but these errors were encountered: