Skip to content

Implement collections #1

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

Closed
aSemy opened this issue Mar 3, 2022 · 0 comments · Fixed by #14
Closed

Implement collections #1

aSemy opened this issue Mar 3, 2022 · 0 comments · Fixed by #14

Comments

@aSemy
Copy link
Contributor

aSemy commented Mar 3, 2022

Any sort of Kotlin collection, e.g. List<String> should be converted to a TypeScript array, string[]

Lists of any type should be supported.

  • Nested lists List<List<String>>
  • Lists of maps List<Map<String, String>>
  • Lists of objects List<SomeKtObject>
  • Lists of structures, like data classes, classes, or interfaces
  • Lists of enums
aSemy added a commit that referenced this issue Mar 4, 2022
- #2 Basic maps implementation
- #7 quick implementation of brand typing for value classes
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
aSemy added a commit that referenced this issue Apr 4, 2022
@aSemy aSemy closed this as completed in #14 Apr 4, 2022
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 a pull request may close this issue.

1 participant