This commit is contained in:
Ratson 2020-09-29 15:26:24 +08:00
Родитель c329ddca0d
Коммит 0cc2ac0f9f
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -3,6 +3,8 @@
*--------------------------------------------------------*/
'use strict';
type Dict = { [k: string]: any }
const enum ChCode {
BOM = 65279,
@ -143,7 +145,7 @@ function _parse(content: string, filename:string|null, locationKeyName:string|nu
if (curKey === null) {
return fail('missing <key>');
}
let newDict = {};
let newDict: Dict = {};
if (locationKeyName !== null) {
newDict[locationKeyName] = {
filename: filename,
@ -168,7 +170,7 @@ function _parse(content: string, filename:string|null, locationKeyName:string|nu
const arrState = {
enterDict: function() {
let newDict = {};
let newDict: Dict = {};
if (locationKeyName !== null) {
newDict[locationKeyName] = {
filename: filename,