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

Parcel 2: TypeScript Transformer #2627

Closed
wants to merge 1 commit into from
Closed

Conversation

DeMoorJasper
Copy link
Member

@DeMoorJasper DeMoorJasper commented Feb 10, 2019

↪️ Pull Request

TS Transformer ported from Parcel 1 to Parcel 2

Not sure if we actually wanna implement it this way though, as Babel now supports TS and it would probably be a bit faster to create and transform the ast using babel/ts

Perhaps we should have both?

💻 Examples

🚨 Test instructions

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@DeMoorJasper DeMoorJasper changed the base branch from master to v2-work-so-far February 10, 2019 15:12
@devongovett devongovett changed the title V2 ts transformer Parcel 2: TypeScript Transformer Feb 11, 2019
@devongovett devongovett added this to the Parcel 2 Alpha 2 milestone Feb 11, 2019
@mischnic
Copy link
Member

TS Transformer ported from Parcel 1 to Parcel 2

Not sure if we actually wanna implement it this way though, as Babel now supports TS and it would probably be a bit faster to create and transform the ast using babel/ts

One major misconception in the past was that Parcel doesn't do typechecking, I guess this won't be changed?

@DeMoorJasper
Copy link
Member Author

@mischnic Parcel doesn't do typechecking. However it would be cool to have this feature in Parcel 2, that's the only reason I can think of to use ts-compiler

@devongovett
Copy link
Member

@fathyb what do you think? I know people have been asking for better typescript support, and one of those asks is support for actual type checking. I kinda think that type checking and linting (e.g. eslint) could be handled in a similar way: we compile synchronously, but type check/lint in the background. That way you don't have to wait as long for builds when you're just hacking, but have the type checking/linting information available if you want it. Thoughts?

@mischnic
Copy link
Member

Coming from #2039, Parcel 1 basically ignored the target and module option in tsconfig.json.
I think it would be better for performance and DX to not run Babel after Typescript (by default), so that these option actually work (at least target, no sure about module).

@timfish
Copy link

timfish commented Mar 2, 2019

Just be aware that if you use Babel with separate type checking, there is currently no support for:

  • const enum
  • emitDecoratorMetadata not supported out of the box

@padmaia padmaia changed the base branch from v2-work-so-far to v2 April 4, 2019 17:03
@mischnic mischnic closed this Jun 8, 2019
@DeMoorJasper DeMoorJasper deleted the v2-ts-transformer branch June 8, 2019 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants