Skip to content

Conversation

@frontend-jihyeok-um
Copy link

Overview

  • When T is defined as an interface, TypeScript sometimes fails to recognize it as a subtype of Record<string, unknown>.
  • As a result, Serializable becomes never, breaking type inference.
  • Adds ToClosedObject to normalize interface types into concrete object types.
  • Adds NotFunction to exclude function types from being treated as serializable.
  • Broadens the allowed types so that both type aliases and interfaces are correctly inferred as serializable objects.

Checklist

  • Did you write the test code?
  • Have you run yarn run fix to format and lint the code and docs?
  • Have you run yarn run test:coverage to make sure there is no uncovered line?
  • Did you write the JSDoc?

… type aliases but also types defined as interfaces within `Serializable<T>`.
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