Comparing version 0.0.9-26 to 0.0.9-27
@@ -203,4 +203,5 @@ "use strict"; | ||
const fields = (function (y) { | ||
return y.join(",\n "); | ||
return y.join(",\n"); | ||
})(literal.fields.map(generateField)); | ||
const maybePrefixed = Common_1.prefixLines(fields, 4); | ||
if (literal.base === null) { | ||
@@ -211,3 +212,3 @@ if (literal.fields.length === 1) { | ||
else { | ||
return `{\n ${fields}\n}`; | ||
return `{\n${maybePrefixed}\n}`; | ||
} | ||
@@ -221,3 +222,3 @@ ; | ||
else { | ||
return `{\n ${literal.base.body},\n ${fields}\n}`; | ||
return `{\n ${literal.base.body},\n${maybePrefixed}\n}`; | ||
} | ||
@@ -224,0 +225,0 @@ ; |
{ | ||
"name": "derw", | ||
"version": "0.0.9-26", | ||
"version": "0.0.9-27", | ||
"description": "An Elm-inspired language that transpiles to TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -208,4 +208,5 @@ import * as List from "../stdlib/List"; | ||
const fields: string = (function(y: any) { | ||
return y.join(",\n "); | ||
return y.join(",\n"); | ||
})(literal.fields.map(generateField)); | ||
const maybePrefixed: string = prefixLines(fields, 4); | ||
if (literal.base === null) { | ||
@@ -215,3 +216,3 @@ if (literal.fields.length === 1) { | ||
} else { | ||
return `{\n ${fields}\n}`; | ||
return `{\n${maybePrefixed}\n}`; | ||
}; | ||
@@ -222,3 +223,3 @@ } else { | ||
} else { | ||
return `{\n ${literal.base.body},\n ${fields}\n}`; | ||
return `{\n ${literal.base.body},\n${maybePrefixed}\n}`; | ||
}; | ||
@@ -225,0 +226,0 @@ } |
Sorry, the diff of this file is not supported yet
1428888
147
31886