mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Implemented suggested changes.
This commit is contained in:
@@ -89,7 +89,8 @@ const v1: Visitor = {
|
||||
|
||||
const id = path.scope.generateUidIdentifierBasedOnNode(path.node.id!);
|
||||
path.remove();
|
||||
path.scope.parent.push({ id, init: path.node });
|
||||
path.scope.parent.push({ id });
|
||||
path.scope.parent.push({ id, init: t.stringLiteral('foo'), kind: "const" });
|
||||
|
||||
path.scope.rename("n", "x");
|
||||
path.scope.rename("n");
|
||||
|
||||
Vendored
+3
-4
@@ -91,11 +91,10 @@ export class Scope {
|
||||
removeData(key: string): void;
|
||||
|
||||
push(opts: {
|
||||
id: object,
|
||||
init?: object,
|
||||
id: t.LVal,
|
||||
init?: t.Expression,
|
||||
unique?: boolean,
|
||||
_blockHoist?: number,
|
||||
kind?: "var" | "let",
|
||||
kind?: "var" | "let" | "const",
|
||||
}): void;
|
||||
|
||||
getProgramParent(): Scope;
|
||||
|
||||
Reference in New Issue
Block a user