Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Enhanece and test Typescript types#8

Open
devnev wants to merge 7 commits intosolana-labs:masterfrom
devnev:master
Open

Enhanece and test Typescript types#8
devnev wants to merge 7 commits intosolana-labs:masterfrom
devnev:master

Conversation

@devnev
Copy link
Copy Markdown

@devnev devnev commented Dec 31, 2024

This is building on top of #6 by @vekexasia

Most notaby, this encodes undefined property names in the P type, which is used in Structure to omit fields without a property name.

A note on the approach, the class constructors are more loosely typed, while the constructor functions have overloads with stricter types.

This PR includes a typed examples test file to give an idea that it works, but the tests are pretty minimal and there's no negative tests (i.e. tests that compilation fails) despite that kinda being the goal of the type enhancements.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants