Updated automatically the main typings file with the generated t… (#919)

* Updated automatically the main typings file with the generated types

* Removed useless log
This commit is contained in:
Tomas Della Vedova
2019-07-25 10:57:47 +02:00
committed by delvedor
parent f74123fb53
commit 29ad0735c2
4 changed files with 18 additions and 10 deletions

View File

@ -88,7 +88,13 @@ function genFactory (folder) {
// serialize the type object
const typesStr = Object.keys(types)
.map(key => `${key}: ${JSON.stringify(types[key], null, 2)}`)
.map(key => {
const line = ` ${key}: ${JSON.stringify(types[key], null, 4)}`
if (line.slice(-1) === '}') {
return line.slice(0, -1) + ' }'
}
return line
})
.join('\n')
// remove useless quotes and commas
.replace(/"/g, '')