question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular output has TS code in a JS file

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kylecordescommented, Jun 18, 2022

@PatrickJS my PR in progress makes it so

0reactions
PatrickJScommented, Jun 18, 2022

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)

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript configuration - Angular
A given Angular workspace contains several TypeScript configuration files. At the root tsconfig.json file specifies the base TypeScript and Angular compiler ...
Read more >
How can I get the Typescript compiler to output the compiled js ...
This was how I got this to work using the built in Typescript Compiler. Check compile main file only and point it to...
Read more >
How to use external JS files and JavaScript code in Angular 6/7
In this tutorial you can learn how to use external js files and how to use JavaScript code in Angular 6/7.
Read more >
Documentation - Creating .d.ts Files from .js files - TypeScript
Run the TypeScript compiler to generate the corresponding d.ts files for JS files; (optional) Edit your package.json to reference the types. Adding TypeScript....
Read more >
TypeScript Compiling with Visual Studio Code
Install the TypeScript compiler · tsconfig.json · Transpile TypeScript into JavaScript · JavaScript source map support · Output location for generated files ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found