馃檵 feature request
Not sure which level of Typescript support we want to have on Parcel, but since we have the TypeScriptAsset I thought it will be cool to automatically add external types.
This is something that the end user will have to do by hand otherwise and its how the Typescript ecosystem works.
No custom configuration needed
When requiring external modules from .ts and .tsx files, I'd expect Parcel to try to install the appropriate typing from DefinitelyTyped
No typing are installed and Typescript can't find types for external dependency
Having the following app
import * as React from 'react';
import * as ReactDOM from 'react-dom';
I'd expect the following types to be installed:
@types/react@types/react-dom| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | ^1.7.0
| Node | 8.4.0
| npm/Yarn | 1.3.2
| Operating System | Mac
I'd actually vote against this feature, because there are quite alot of cases where the typedef files on DefinitelyTyped that are out of date. So, if you have [email protected] and parcel will auto-install @types/package to your node_modules, you will get typing errors.
IMHO typings should be added manually and gradually, otherwise - chaos ensues :)
FYI: Some editors like vscode already fetch typings automatically. No need to duplicate that functionality in parcel.
Most helpful comment
I'd actually vote against this feature, because there are quite alot of cases where the typedef files on DefinitelyTyped that are out of date. So, if you have [email protected] and parcel will auto-install @types/package to your node_modules, you will get typing errors.
IMHO typings should be added manually and gradually, otherwise - chaos ensues :)