-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
Design Meeting Notes, 5/19/2021 #44256
Labels
Design Notes
Notes from our design meetings
Comments
-- |
Exactly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ES Modules in Node
https://gist.github.com/weswigham/22a064ffa961d5921077132ae2f8da78
Resolution Settings
exports
,types
,typesVersions
types@VERSION_SPECIFIER
moduleResolution
flagnode12
module
target flag?node
that could changealready does exist and changed.node12
as well?node-esm
flag that accumulates more?node-next
?node14
could come out, etc. sonode-next
could be that rolling target.module
andmoduleResolution
be one flag?module
toggles a specificmoduleResolution
moduleResolution
flag?node
backwards-compatible?main
field inpackage.json
), you'll get the wrong behavior.package.json
s have more and more of our configuration.node12
for bothnode-next
ornode-esm
or something along those lines."module": "node12"
implies"moduleResolution": "node12"
.Emit
.cjs
.mjs
"type": "module"
..ts
->.js
which is still good..mjs
output. So.mts
?.mtsx
?.mts
?.mts
just supports JSX, doesn't support<AngleBracketCastSyntaxOn>values
Also type parameter lists with no constraint or trailing comma.
What about
.tsx
for modules?.mjs
.API isn't set up to disambiguate.
.mtx
? 🤯include
andexclude
globs being specialized for TypeScript. Already got burned by this withJSON
files..mts
and.cts
"?"type": "module"
, you'll end up with times that you want to break out.require
.cts
is more important than.mts
.package.json
?"package.json
that says"type": "whatever-is-not-module"
..cts
,.cd.ts
, etc.readDirectory
, luckily it's not too bad anymore.Performance
ComponentProps
- maybe takes 500ms to check?--incremental
/--watch
needs to compute shape. Declaration emit happens twice. Initial build mode build emits twice #43995.typeToTypeNode
? #44043, Fix logic for determining whether to simplify keyof on mapped types #44042imports
that weren't there.import type
, bam, make everyone feel better.The text was updated successfully, but these errors were encountered: