You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Handle & allow expression of the whole TS type system
Primitives (bool, num, string)
Top (any), Bottom (never), Unit (void) and null (null, undefined)
Arrays
Indexed Interfaces
Interfaces
Union
Intersections
Tuples
Enums
Object
Type aliases (currently modeled as a first-class type similar to interfaces, not 100% sure that is correct)
Literal types (string, number/integer, boolean?)
Serialize TS types
Discover all top-level types (interfaces, aliases) necessary to emit interfaces
E.g. if you want to publish IFoo { member: IBar }IBar will also need to be emitted
Small DSL to define interfaces and/or modify generated interfaces
Macro that generates case classes
Should have
For internal and public viability (i.e. if these are checked we could definitely do a public release)
Write to files/streams
Basic readme and documentation including example project
Scala 2.11, 2.12 and 2.13 cross-compilation
Publishing to a public maven repository
Emit in a namespaces/module/class, handle subpackaging. Including overwriting by user?
Solid test suite
SBT Plugin to generate the TS files
Lots of predefined mappings, e.g. java8 dates, uuid etc.
Generics for collections (List[T] etc)
Handle or give an error on recursive definitions
Mark all subtypes of a specific type as having the same mapping
Provide a default parameter for implicit TSTypes, a macro which understands built-in types and case classes so implicits aren't mandatory the be defined
Could have
Useful features which aren't the top priority
Generics? Not sure how they are useful in a serialization <> deserialization context like this is used for
Style options? i.e. 2-4 spaces indentation, whether to emit (T | undefined) as member: (T | undefined) or member?: T etc.
Create a distriminated union from a sealed trait
Won't have
Currently not in scope
Generating Scala case classes from typescript interfaces
So much potential here, basically the dual. Useful to make sure your back-end can parse the frontend JSON. Auto-generate JSON deserialises based on TS interfaces
The text was updated successfully, but these errors were encountered:
Must have
For internal viability:
any
), Bottom (never
), Unit (void
) and null (null
,undefined
)E.g. if you want to publish
IFoo { member: IBar }
IBar
will also need to be emittedShould have
For internal and public viability (i.e. if these are checked we could definitely do a public release)
2.11, 2.12 and 2.13 cross-compilationTSType
s, a macro which understands built-in types and case classes so implicits aren't mandatory the be definedCould have
Useful features which aren't the top priority
(T | undefined)
asmember: (T | undefined)
ormember?: T
etc.Won't have
Currently not in scope
So much potential here, basically the dual. Useful to make sure your back-end can parse the frontend JSON. Auto-generate JSON deserialises based on TS interfaces
The text was updated successfully, but these errors were encountered: