-
Notifications
You must be signed in to change notification settings - Fork 5
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
Generate enums closed-polymorphic classes, and use literal enum members as the discriminator #10
Comments
aSemy
added a commit
that referenced
this issue
Apr 3, 2022
* - #1 basic lists implementation - #2 Basic maps implementation - #7 quick implementation of brand typing for value classes * map tests #2 #3 * generate implementations and test improvements - add TOC to all docs - Map generation for complex and enum keys #2 #3 - update test template, for easier comparison after failures - tests for #10 * suppress warning in tests * `export enum` -> valid for .d.ts files * test for ignoring fields with @transient, and if an interface has no properties, don't have a blank line between {} * test for objects, and fix test expectations in polymophic classes, so they extend parent interfaces * try fixing knit gradle task warning * - replace jacoco with kotlinx.kover - clean up root build.gradle.kts - change package name of example code (so the coverage report can be package filtered, if needed) - create a kotlin.multiplatform convention plugin * bump gradle version * set max line length to 100 * mucking about with plugins and compilation processors * tidy up gradle config * refactor kxs generator * update tests, and add some more * major refactor to get things more like a library, and steps towards handing open/closed polymorphism * sealed classes working! - 'export' all TS Declarations - ignore blank lines in knit tests - * some Sealed interfaces and type ref improvements * temp fix for open poly classes * normalize knit code comparisons * update tests after temp fix for open poly classes * update sealed poly tests * rm migrated code * rm unneeded TsTypeRef.Unknown * rename TsType to TsTypeAlias, and update docs in tsElements.kt * code cleanup, documentation * docs, more Maps tests/examples/workarounds * update gitattributes * rename 'knit' subproject to 'code' * prep for jitpack * docs update * improve recursive descriptor extraction * version bum git-versioning plugin * better helper function for mutable maps with default puts * simplify the API * code tidup * formatting, code tidying * kmm gradle config tidy up * bump gradle version * add jitpack button * fix maven publishing * update project name & group * disable reflekt dependency
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to be able to use literal enum members to discriminate classes
https://www.typescriptlang.org/docs/handbook/enums.html#union-enums-and-enum-member-types
should generate something like
The text was updated successfully, but these errors were encountered: