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

Improve codegen #3692

Open
6 of 9 tasks
Boshen opened this issue Jun 15, 2024 · 3 comments · Fixed by #3786
Open
6 of 9 tasks

Improve codegen #3692

Boshen opened this issue Jun 15, 2024 · 3 comments · Fixed by #3786
Assignees

Comments

@Boshen
Copy link
Member

Boshen commented Jun 15, 2024

@Boshen Boshen self-assigned this Jun 15, 2024
Boshen added a commit that referenced this issue Jun 17, 2024
@Boshen Boshen changed the title Improve TypeScript codegen Improve codegen Jun 18, 2024
@Dunqing

This comment was marked as outdated.

@Dunqing
Copy link
Member

Dunqing commented Jun 20, 2024

Need to figure out these cases

- export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
+ export type UnionToIntersection<U> = U extends (any) ? (k: U) => void : never extends ((k: infer I) => void) ? I : never;
- export type LooseRequired<T> = {
-     [P in keyof (T & Required<T>)]: T[P];
- };
+ export type LooseRequired<T> = { [P in keyof ((T) & (Required<T>))] : T[P]};

@Boshen
Copy link
Member Author

Boshen commented Jun 23, 2024

It seems like test setup is incorrect for noStrict, e.g.

  • language/expressions/object/proto-permitted-dup-shorthand.js
  • language/eval-code
  • annexB/language/eval-code

Need to format computed class / object exactly written

  • -computed-property-name-

The last case is how astral strings should be generated

  • language/statements/for-of/string-astral-truncated.js

And the famous one where (fn) = function() {}; is different from fn = function() {}; for fn.name.

  • language/expressions/assignment/fn-name-lhs-cover.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants