From dc3dbec9d557015a052802049f6ab34379b52e66 Mon Sep 17 00:00:00 2001 From: Daniel Nalborczyk Date: Wed, 29 Sep 2021 17:02:20 -0400 Subject: [PATCH 1/3] chore: remove unused rollup-plugin-typescript ambient module types --- typings/declarations.d.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/typings/declarations.d.ts b/typings/declarations.d.ts index 52eb1bbc86c..e90d661b797 100644 --- a/typings/declarations.d.ts +++ b/typings/declarations.d.ts @@ -9,11 +9,6 @@ declare module 'rollup-plugin-string' { export const string: import('rollup').PluginImpl; } -declare module 'rollup-plugin-typescript' { - const typescript: import('rollup').PluginImpl; - export default typescript; -} - declare module 'acorn-walk' { type WalkerCallback = (node: acorn.Node, state: TState) => void; type RecursiveWalkerFn = ( From d55b0cd6bba4ab4e8aa96d6879206ef6187664ca Mon Sep 17 00:00:00 2001 From: Daniel Nalborczyk Date: Wed, 29 Sep 2021 17:02:52 -0400 Subject: [PATCH 2/3] chore: fix return type of is_reference --- typings/declarations.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typings/declarations.d.ts b/typings/declarations.d.ts index e90d661b797..d4b36e82f62 100644 --- a/typings/declarations.d.ts +++ b/typings/declarations.d.ts @@ -24,7 +24,7 @@ declare module 'is-reference' { export default function is_reference( node: NodeWithFieldDefinition, parent: NodeWithFieldDefinition - ): unknown; + ): boolean; export type Node = | import('estree').Identifier | import('estree').SimpleLiteral From 6a9e41ed3205ebec1506da035993f39f300739e8 Mon Sep 17 00:00:00 2001 From: Daniel Nalborczyk Date: Wed, 29 Sep 2021 17:05:01 -0400 Subject: [PATCH 3/3] chore: remove type assertion --- src/ast/nodes/Identifier.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ast/nodes/Identifier.ts b/src/ast/nodes/Identifier.ts index b488f8448ab..69fb68cfd5d 100644 --- a/src/ast/nodes/Identifier.ts +++ b/src/ast/nodes/Identifier.ts @@ -45,7 +45,7 @@ export default class Identifier extends NodeBase implements PatternNode { } bind(): void { - if (this.variable === null && isReference(this, this.parent as any)) { + if (this.variable === null && isReference(this, this.parent)) { this.variable = this.scope.findVariable(this.name); this.variable.addReference(this); }