-
Hello, I want to build a plugin that adds metadata on TS classes based on the constructor types. This is for dependency injection, my final goal is to replace the TS transformer https://github.com/wessberg/DI-compiler I am using the hooks for member in &class.body {
if let ClassMember::Constructor(constructor) = member {
println!("ClassMember::Constructor");
for param in &constructor.params {
// [...] Everything works perfectly when executed in a Rust environment: I correctly get params as a Here is my JSC JS parser configuration: parser: {
syntax: "typescript",
tsx: true,
decorators: true,
} Here are some debug information I get, from Rust execution:
From JS execution (on the same TS file where types seems to be erased):
I use in JS the I feel like I am missing a simple option that would enable me to correctly get the I can provide all my code if necessary. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
TypeScript/decorators are handled before running Wasm plugins. I'll document it. |
Beta Was this translation helpful? Give feedback.
TypeScript/decorators are handled before running Wasm plugins. I'll document it.