toSelf doesn't work in transpile-only compilations #25
Labels
effort: moderate
less than a week
package: transformer
relating to the transformer package
type: feature
Common issue with transpile-only modes, as seen in the Vue example as well as with rollup + ts-plugin. There isn't an easy solution to this unfortunately.
I considered making a "nested" compiler within the transpiler so that you could try to import the file(s) needed to resolve the constructor signature - but things like ts-loader hide access to the under-laying "file-resolver" (webpack) so you can't get the files - would probably have to make a ts-loader fork... which I don't want to do.
The only viable solution would appear to be adding a compile-type decorator (for the target class) that registers the class's constructor signature (and Services) into Reflect, then have
toSelf
run-time method fallback to trying to use Reflect to get the signatures.The text was updated successfully, but these errors were encountered: