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

Angular output has TS code in a JS file #499

Closed
kylecordes opened this issue Jun 18, 2022 · 5 comments
Closed

Angular output has TS code in a JS file #499

kylecordes opened this issue Jun 18, 2022 · 5 comments

Comments

@kylecordes
Copy link
Contributor

To Reproduce

yarn
yarn build

look at packages/e2e-app/output/angular/src/components/my-component.js

import { Component } from "@angular/core";

export interface State {
  list: string[];
  newItemName: string;
}

@Component({
  selector: "my-component",
...

Expected behavior

Either emit JS Angular (which is rarely used), or name the file .ts.

kylecordes pushed a commit to kylecordes/mitosis that referenced this issue Jun 18, 2022
@PatrickJS
Copy link
Contributor

Should be ts

@kylecordes
Copy link
Contributor Author

@PatrickJS my PR in progress makes it so

@PatrickJS
Copy link
Contributor

Yeah we use core directly so I think there's a slight disconnect with some changes and the CLI

@kylecordes
Copy link
Contributor Author

When you use core directly, are you taking responsibility yourself for file naming etc.?

I have not dug into the code in core versus CLI, but hopefully there is not different, conflicting output file naming code between them :-) :-(

@PatrickJS
Copy link
Contributor

Yeah core just outputs a string so this is more of an issue with the CLI. Mitosis should definitely output ts as the default or at least for angular. We need a way to detect what output we want (ts or js)

kylecordes pushed a commit to kylecordes/mitosis that referenced this issue Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants