elm.record.mustache Maven / Gradle / Ivy
{{#discriminator}}
type {{classname}}
= {{classname}} Base{{classname}}
{{#mappedModels}} | {{classname}}{{modelName}} {{modelName}}
{{/mappedModels}}
{{/discriminator}}
type alias {{#discriminator}}Base{{/discriminator}}{{classname}} =
{{#lambda.indented}}
{ {{#parent}}{{#allOf}}{{^-first}}, {{/-first}}{{#lambda.camelcase}}{{.}}{{/lambda.camelcase}}: {{.}}
{{/allOf}}, {{/parent}}{{#vars}}{{^-first}}, {{/-first}}{{name}} : {{#isCircularReference}}{{classname}}{{nameInPascalCase}}{{/isCircularReference}}{{^isCircularReference}}{{>recordField}}{{/isCircularReference}}
{{/vars}}
}{{/lambda.indented}}{{#vars}}{{#isCircularReference}}
type {{classname}}{{nameInPascalCase}} = {{classname}}{{nameInPascalCase}} ({{>recordField}})
unwrap{{classname}}{{nameInPascalCase}} : {{classname}}{{nameInPascalCase}} -> {{>recordField}}
unwrap{{classname}}{{nameInPascalCase}} ({{classname}}{{nameInPascalCase}} {{name}}) = {{name}}{{/isCircularReference}}{{/vars}}{{#vars}}{{#isEnum}}
{{>customType}}{{/isEnum}}{{/vars}}