Interface TypeModel

All Known Implementing Classes:
TypeModel.ArrayOf, TypeModel.EntityRef, TypeModel.MapOf, TypeModel.Provided, TypeModel.Scalar, TypeModel.TypeVariable

A type as the TypeScript generator needs it: what to write, with the questions a Java type raises already answered.

Notably, whether a value can be absent is decided here, from the Java type, the nullability annotations and the Kotlin metadata, rather than being rediscovered by whatever writes the TypeScript.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
     
    static final class 
    What the walk says about a type while it is still walking it, which is the target of the node standing for the type.
    static final record 
    A reference to a type generated as a TypeScript declaration of its own.
    static final record 
     
    static final record 
    A type the generated TypeScript refers to by name rather than by declaring it: one the browser has, such as a file, or one a module of the framework exports, such as a signal.
    static final record 
     
    static enum 
    The types which TypeScript expresses without a declaration of their own.
    static final record 
    A reference to a type parameter of the declaration being written, which is written as it is.
  • Method Summary

    Modifier and Type
    Method
    Description
    The annotations of a value which a form model is told about: whether a value is the id of an entity is nothing TypeScript can see, and a form or a grid built from the model decides with it what to do with the value.
    What a value of the type has to satisfy, which a form model binds as the validators of the property holding it.
    boolean
    Whether the value may be absent, which TypeScript spells as a union with undefined.
    withOptional(boolean optional)
    The same type, said to be absent or not as given.
  • Method Details

    • optional

      boolean optional()
      Whether the value may be absent, which TypeScript spells as a union with undefined.
    • constraints

      List<ConstraintModel> constraints()
      What a value of the type has to satisfy, which a form model binds as the validators of the property holding it. The constraints belong to the type rather than to the property, since the values of a collection can be constrained as well as the collection itself.
    • annotations

      List<AnnotationModel> annotations()
      The annotations of a value which a form model is told about: whether a value is the id of an entity is nothing TypeScript can see, and a form or a grid built from the model decides with it what to do with the value.
    • withOptional

      TypeModel withOptional(boolean optional)
      The same type, said to be absent or not as given.