Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 750 Bytes

types_transformations.md

File metadata and controls

26 lines (22 loc) · 750 Bytes

Datatype transformations

This file documents the transformations that are applied to the datatypes.

File level

  • Download TS types from lemmy-js-client
  • Filters out the types that are not used in the API
  • Convert TS to Kotlin using Dukat
  • It loops over the lines of converted datatypes

Line level

  • Drops the first 15 dukat imports
  • Convert the interfaces to data class
  • Adds default null to nullable types
  • Add missing commas
  • Replaces vars with vals
  • Replace Arrays with Lists
  • Converts numbers to Longs except if they are in a manual int list
  • Replaces my_vote default
  • Replaces types that should be prebuilt enums

Final steps

  • Adds imports
  • Adds above line level steps
  • Adds missing last newline
  • Remove remnants