While trying to implement a decorator, I didn't want to create an entire package for a few lines of code.
This seems convoluted.
Since the project this spec is located in is not a module, I have to use mjs files to be able to use imports.
This leads to the following, as soon as I import the mjs file:
Calling tsc -p helpers.tsconfig.json compiles without errors, the output mjs looks fine, but as soon as import "./partial.mjs"; is hit in the tsp file, TypeSpec crashes on me.
Is there a better way of extending TypeSpec to my needs? I feel like extending the framework (especially with something as light as this) wouldn't / shouldn't need the entire overhead of managing an entirely separate package.
Describe the bug
While trying to implement a decorator, I didn't want to create an entire package for a few lines of code. This seems convoluted.
Since the project this spec is located in is not a module, I have to use mjs files to be able to use imports. This leads to the following, as soon as I import the mjs file:
Since this is a very slim project, I'm hestitant to make it more extensive as it needs to be. So my battle plan is:
Reproduction
partial.mts
partial.tsp
helpers.tsconfig.json
Calling
tsc -p helpers.tsconfig.json
compiles without errors, the output mjs looks fine, but as soon asimport "./partial.mjs";
is hit in the tsp file, TypeSpec crashes on me.Is there a better way of extending TypeSpec to my needs? I feel like extending the framework (especially with something as light as this) wouldn't / shouldn't need the entire overhead of managing an entirely separate package.
Checklist