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

toSelf doesn't work in transpile-only compilations #25

Open
MeirionHughes opened this issue Nov 25, 2019 · 0 comments
Open

toSelf doesn't work in transpile-only compilations #25

MeirionHughes opened this issue Nov 25, 2019 · 0 comments
Assignees
Labels
effort: moderate less than a week package: transformer relating to the transformer package type: feature

Comments

@MeirionHughes
Copy link
Member

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.

@MeirionHughes MeirionHughes added type: feature package: transformer relating to the transformer package effort: moderate less than a week labels Nov 25, 2019
@MeirionHughes MeirionHughes self-assigned this Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: moderate less than a week package: transformer relating to the transformer package type: feature
Projects
None yet
Development

No branches or pull requests

1 participant