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/23/2024 #58415

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

Design Meeting Notes, 4/23/2024 #58415

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

Comments

@DanielRosenwasser
Copy link
Member

Notes courtesy of @RyanCavanaugh

  • Error on references to literal enum members in conditions #58264
    • Disallow truthy checks on enum values since they're not variable
    • Yep, seems good
  • Add transpileDeclaration API method #58261 transpileDeclaration
    • Emits .d.ts instead of .js like transpileModule
    • Implies additional required flags, of course
    • We need a minimal lib file to make everything work out for Symbol. references
    • Quick discussion of symbol freshness under ID
    • This is the requested "reference implementation" of a syntactic declaration emitter
    • Yep, seems good
    • Merge whenever (pre- or post-beta)
    • Jake to review
  • New --enforceReadonly compiler option to enforce read-only semantics in type relations #58296 --enforceReadonly
    • Long has it been rumored
    • Changes the subtype relation to disallow mutable properties to alias readonly ones
    • Tweaks the definition of as const to also "fit" the contextual type by relaxing readonly inferences that would have caused a failure
    • Most other work is in making the lib compile again, particularly prototype
    • This is heckin' breaky but tends not to find many real issues since aliased mutation is rare
    • Need to update the DOM generator
    • What's the uptake plan?
      • Hope your dependencies did a good job
      • skipLibCheck might let you get away with it
    • What's the plan for DT?
      • Turn it on in new types
      • Roll out as people are able to
      • Patience!
      • Maybe try automating adding readonly "everywhere" and back it off from tests
        • Are we really doing 8,000 PRs??
    • What about methods overwritten by a readonly property?
      • Currenty allowed, but probably shouldn't be
      • Confusing because methods are only mostly not mutated
@DanielRosenwasser DanielRosenwasser added the Design Notes Notes from our design meetings label May 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