-
-
Notifications
You must be signed in to change notification settings - Fork 39
Add TypeScript support #7
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
Comments
I would definitely love to see TypeScript support! I had it on the roadmap myself, but please feel free to try implementing it :)
Yeah import * as React from 'react';
const Count: React.FunctionComponent<{
count: number;
}> = (props) => {
return <h1>{props.count}</h1>;
};
export default Count;
❤️ |
Thanks for the response! I'll try to dig into it sometime soon 😀 |
Shouldn't be difficult. Babel supports TypeScript.
That's a must! |
Hello @vadimdemedes |
@vadimdemedes, sorry to bump this again. Would be great to get TS support published. |
Also looking for TS support |
For others looking for a workaround, I'm doing this in my
|
Well this repo has not received any udpate for 1 year. I think it's pretty much dead with PRs and issues stacking |
I just shipped Pastel 2.0 which supports both TypeScript and JavaScript-based projects 👍 Excuse me for the long wait, everyone. |
Awesome job! It looks really great @vadimdemedes! 👏 👏 👏 |
Thanks @adambrgmn 💛 |
Hi,
First, thanks for a great tool! This together with Ink has made writing cli-tools a joy!
But I was wondering if you would be interested in a PR to enable Typescript-files as entrypoints for commands.
I've noticed that parcel is used to bundle the scripts and parcel has built in support for TS. And today I can use TS-files if they're imported deeper in the tree.
I did some fiddling and found a way to at least get started.
I just changed a few lines in
lib/read-commands.js
:This change deals with the first problem. Now at least both .js- and .tsx-files gets parsed.
But this solutions gives another problem, of course 🤔. If the entrypoint includes interfaces or other typescript features
lib/parse-command.js
wont be able to parse the file. I would need to dive into the world of Babel in order to see if it's enough to add@babel/plugin-transform-typescript
to make it work, or if a separate typescript based parser is needed.What do you think? Tell me if you would like me to try it out and see if I could get something working. If you're not interested, thats fine since I can use Typescript deeper in the tree!
The text was updated successfully, but these errors were encountered: