Skip to content

Conversation

justjake
Copy link
Owner

@justjake justjake commented Jul 9, 2022

This PR adds a new SimpleType, SimpleTypeCustom. The custom type can contain arbitrary data, typed as unknown for now. The ts-simple-type will never produce this type by default.

Then, we allow the caller to extend the to-simple-type parser with a new optional callback argument: toCustomType.
toCustomType can either implement its own ts.Type -> SimpleType conversion, or it can return a "wrapper" function that will be called with ts-simple-type's default conversion of that ts.Type.

TODOs

  • changes in this branch break some existing to-simple-type tests, possibly because of changes to liftGeneric call pattern or implementation. This needs to be investigated.

@justjake justjake force-pushed the jake--known-types-2-less-generics branch from 49b3a7c to 5a84291 Compare July 21, 2022 15:00
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