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

Design Meeting Notes, 4/2/2024 #58043

Open
DanielRosenwasser opened this issue Apr 2, 2024 · 0 comments
Open

Design Meeting Notes, 4/2/2024 #58043

DanielRosenwasser opened this issue Apr 2, 2024 · 0 comments
Labels
Design Notes Notes from our design meetings

Comments

@DanielRosenwasser
Copy link
Member

Set configurable: true in Downlevel Targets

#57784

  • Jest, the testing framework, wants to be able to mock out modules in a way that works for basic CJS modules, but not for ESM-style CJS modules.
  • Why wouldn't we do this?
    • esbuild, the bundler, does not do this.
    • ESM itself doesn't allow this, so it's strange to change our emit to do this.
  • Jest and the like mock ESM in a different mechanism though.
  • What does Babel do?
    • Babel makes them non-configurable.
  • Same with Rollup.
  • So we'd be the only one doing this?
    • Yes.
  • Why does Jest need them to be configurable? Can't they just return a new object?
    • Possibly? Some stuff around objects. Maybe Jest should use a Proxy?
  • Switching your TS emitter from TS itself to esbuild or Babel or whatever would break your tests. Kind of a footgun!
  • If every other compiler works this way, it seems like testing libraries should find an alternative solution.
  • Conclusion: we will not make this change.

Remove FlowNode and FlowFlags from Public API

#58036

  • We want to change the control flow graph (Monomorphic flow nodes #57977) but it would kind of be a breaking change.
  • We expose these types publicly, but nobody has a public way to access them without unsafely access the internals.
  • Only known use is utilities for visualizing the control flow graph.
  • Do it.

Types as Configuration

#58025

  • This is only viable because we now have enough literal-i-ness in the type system.
  • One of the concerns we have is that the semantics of TypeScript change from version-to-version.
  • This is in an uncanny valley of "a superset of JSON but also a subset of valid TypeScript".
  • But broadly, there's a good way to reframe what we want: imports and spreads.
  • Let's find a way to bring that into tsconfig.json.
@DanielRosenwasser DanielRosenwasser added the Design Notes Notes from our design meetings label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Notes Notes from our design meetings
Projects
None yet
Development

No branches or pull requests

1 participant