Preserve Typescript types in output
See original GitHub issueHello not sure if I’m understanding well the purpose of this library but when I create a component like:
export type ButtonProps = {
name: string;
};
export default function Button(props: ButtonProps) {
return <button>{props.name}</button>;
}
The result is:
export default function Button(props) {
return <button>{props.name}</button>;
}
or:
import { Component, Input } from "@angular/core";
@Component({
selector: "button",
template: `
<button>{{name}}</button>
`,
})
export default class Button {
@Input() name: any;
}
If I want to use mitosis to create my own components library, how I can get the types of my components to be able to expose them?
Issue Analytics
- State:
- Created a year ago
- Comments:17 (8 by maintainers)
Top Results From Across the Web
TSConfig Option: preserveWatchOutput - TypeScript
TSConfig. preserveWatchOutput ... How to provide a type shape to JavaScript objects. Narrowing. How TypeScript infers types based on runtime behavior.
Read more >Preserve functions typing when augmenting an object in ...
I need to perform some transformations on a typescript object while being able to preserve it's full shape. So, I have an object:...
Read more >TypeScript library tips: Rollup your types! | by Martin Hochel
When authoring a TypeScript library make sure to follow best industry practices like shipping smallest possible files by rollup-ing your ...
Read more >Preserve original formatting when printing modified nodes
I'm building a source code migration tool that will do some heavy lifting within types & expressions in JS & TS code, and...
Read more >Methods for TypeScript runtime type checking - LogRocket Blog
Checking a specific value's type at runtime is the primary function of type guards. This helps the TypeScript compiler, which then uses the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
OK。At first,I plan to implement it on react framework. Make sure what I build out is as expected.
@samijaber can you publish for @originswift-sys