修复dts生成bug

This commit is contained in:
kangkang520
2018-11-12 23:58:49 +08:00
parent 4ec3ecb69b
commit 2ce700667a
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "ini-decode", "name": "ini-decode",
"version": "1.0.4", "version": "1.0.5",
"description": "", "description": "",
"main": "dist/index.js", "main": "dist/index.js",
"types": "typing/index.d.ts", "types": "typing/index.d.ts",

View File

@ -75,7 +75,7 @@ function parseDetail(data: any, parent: any, key: any): string {
else { else {
return `{\n\t${Object.keys(data).map(key => { return `{\n\t${Object.keys(data).map(key => {
return `${key}: ${parseDetail(data[key], data, key).replace(/\n/g, '\n\t')}` return `${key}: ${parseDetail(data[key], data, key).replace(/\n/g, '\n\t')}`
}).join('\n\t')}\n` }).join('\n\t')}\n}`
} }
} }

View File

@ -3,4 +3,4 @@ import { decode } from '../src'
const content = fs.readFileSync(__dirname + '/test.ini') const content = fs.readFileSync(__dirname + '/test.ini')
const res = decode(content) const res = decode(content)
console.log(res.json) console.log(res.dts)