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

support external types #20

Merged
merged 2 commits into from
Jan 16, 2025
Merged

support external types #20

merged 2 commits into from
Jan 16, 2025

Conversation

mafintosh
Copy link
Contributor

ie

ns.register({
  name: 'my-custom-type',
  external: './file/that/has/getStruct/export.js'
})

When the code is required, it would call getStruct(fqn) on the above file expecting to get the requested struct back. Doing it this also allows you to chain generated schemas in addition to allowing "hand rolled" encoders

@mafintosh mafintosh merged commit a00b91e into main Jan 16, 2025
3 checks passed
@mafintosh mafintosh deleted the external-types branch January 16, 2025 09:46
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