Search in sources :

Example 1 with TSArrayType

use of io.crnk.gen.typescript.model.TSArrayType in project crnk-framework by crnk-project.

the class TSMetaResourceRepositoryTransformation method newDataField.

private TSMember newDataField(TSMetaTransformationContext context, TSType resourceType, boolean isArray) {
    TSField field = new TSField();
    field.setName("data");
    field.setNullable(true);
    if (isArray) {
        field.setType(new TSArrayType(resourceType));
    } else {
        field.setType(resourceType);
    }
    return field;
}
Also used : TSField(io.crnk.gen.typescript.model.TSField) TSArrayType(io.crnk.gen.typescript.model.TSArrayType)

Aggregations

TSArrayType (io.crnk.gen.typescript.model.TSArrayType)1 TSField (io.crnk.gen.typescript.model.TSField)1