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.

[Parcel 2] Typescript Definitions

See original GitHub issue

🙋 feature request

Type definitions for this package, whether they’d be included in the package or in @types/parcel.

🤔 Expected Behavior

Import types from @types/parcel :

import Parcel from 'parcel'

😯 Current Behavior

Import has squiggly lines of death explaining that there are no types.

@types/parcel exists:

import Parcel from 'parcel'

@types/parcel-bundler exists:

import Parcel from 'parcel-bundler'

💁 Possible Solution

Generate types using flow-to-typescript package. Unsure on any restrictions in the project.

🔦 Context

I want to test out this package, but will be using typescript strictly. I’m using the bundler API to prerender static HTML pages for a react application.

💻 Examples

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

6reactions
waynevansoncommented, Dec 16, 2019

@devongovett I wouldn’t consider the issue closed, as the definitions are in flow and not typescript.

Personally, I’d like these auto translated into TS types. What is the current game plan for converting these to typescript definitions? I would like to help.

2reactions
devongovettcommented, Aug 24, 2020

We should officially maintain these in the Parcel repo IMO.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript - Parcel
TypeScript is a typed superset of JavaScript that compiles to JavaScript. Parcel supports TypeScript out of the box without any additional configuration.
Read more >
Migration - Parcel
In Parcel 1, importing any non-JavaScript file such as an image or video resulted in a URL. In Parcel 2, this still works...
Read more >
Announcing Parcel v2!
Parcel can build multiple targets at once, for example a library with an ES module, CommonJS, and TypeScript definitions, a modern and legacy ......
Read more >
Parcel 2 RC
The Parcel team is very excited to announce the first Parcel 2 ... Finally, we now publish TypeScript definitions along with all of...
Read more >
Parcel
Parcel automatically transforms your code for your target environments. From modern and legacy browser support, to zero config JSX and TypeScript compilation, ...
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