Skip to content

Fixes to all inferred types to be more permissive.#6

Open
ralusek wants to merge 1 commit intomasterfrom
type-refinements
Open

Fixes to all inferred types to be more permissive.#6
ralusek wants to merge 1 commit intomasterfrom
type-refinements

Conversation

@ralusek
Copy link
Copy Markdown
Owner

@ralusek ralusek commented Feb 25, 2025

fix(types): improve type inference for arrays with flatten config

  • Modified UnflattenedIfConfigured type to handle arrays returned from handlers properly - Added HandlerReturnType to handle different return types based on config
  • Fixed typings to not force flattened output just because an array is returned
  • Added tests to verify array return types with both flatten:true and flatten:false
  • Made handler typings more permissive when flatten is true

│   config                                                                        │
│                                                                                 │
│   - Modified UnflattenedIfConfigured type to handle arrays returned from        │
│   handlers properly                                                             │
│   - Added HandlerReturnType to handle different return types based on config    │
│   - Fixed typings to not force flattened output just because an array is        │
│   returned                                                                      │
│   - Added tests to verify array return types with both flatten:true and         │
│   flatten:false                                                                 │
│   - Made handler typings more permissive when flatten is true
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.

1 participant