fix linting errors
This commit is contained in:
parent
b7680059c8
commit
8e708906a8
@ -183,9 +183,9 @@ Scope.prototype.getInfo = function () {
|
||||
var references = info.references = object();
|
||||
var types = info.types = object();
|
||||
var declarationKinds = info.declarationKinds = {
|
||||
"const": object(),
|
||||
"var": object(),
|
||||
"let": object(),
|
||||
"const": object()
|
||||
"let": object()
|
||||
};
|
||||
|
||||
var add = function (node, reference) {
|
||||
@ -195,8 +195,14 @@ Scope.prototype.getInfo = function () {
|
||||
|
||||
if (!reference) {
|
||||
for (var key in ids) {
|
||||
var id = ids[key];
|
||||
|
||||
if (id.typeAnnotation) {
|
||||
types[id] = id.typeAnnotation;
|
||||
}
|
||||
|
||||
if (declarationKinds["let"][key] || declarationKinds["const"][key]) {
|
||||
throw self.file.errorWithNode(ids[key], "Duplicate declaration " + key, TypeError);
|
||||
throw self.file.errorWithNode(id, "Duplicate declaration " + key, TypeError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user