Skip to content

Conversation

@benzaria
Copy link
Contributor

@benzaria benzaria commented Oct 18, 2025

  • Enhanced Simplify type to improve flattening and support of union/function/classes
  • Added ExtractCallSignature internal type to extract call signatures from function types.
  • Moved HasMultipleCallSignatures internal type to internal/function.d.ts.
  • Updated SetOptional, SetReadonly, and SetRequired types to utilize ExtractCallSignature and Simplify.
  • Updated tests to reflect changes in type behavior and ensure correctness.

@benzaria benzaria force-pushed the feat/fix-simplify_add-extract-call-signature branch from 449bcea to 2d4c1ba Compare October 18, 2025 01:16
@benzaria benzaria marked this pull request as draft October 18, 2025 01:17
…ion/classes

- Added `ExtractCallSignature` type to extract call signatures from function types.
- Moved `HasMultipleCallSignatures` type to `internal/function.d.ts`.
- Updated `SetOptional`, `SetReadonly`, and `SetRequired` types to utilize `ExtractCallSignature`.
- Updated tests to reflect changes in type behavior and ensure correctness.
@benzaria benzaria force-pushed the feat/fix-simplify_add-extract-call-signature branch from 2d4c1ba to aeb2ff8 Compare October 18, 2025 01:19
@benzaria benzaria marked this pull request as ready for review October 18, 2025 01:22
@benzaria
Copy link
Contributor Author

One thing to note is that when passing a function, the resulting type becomes function & {}. Any attempt to refine or eliminate the & {} intersection causes type errors in MergeDeep and ApplyDefaultOptions, as discussed here.

This seems to be the best solution so far, at least until we find a proper fix for MergeDeep.

Copy link
Collaborator

@som-sm som-sm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the PR has some unintended formatting changes, can you please go through the PR once and clean it up.

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 this pull request may close these issues.

2 participants