@@ -15,7 +15,6 @@ import type {
1515import type { ESLintExtendedProgram } from "../parser" ;
1616import { getWithLoc } from "../parser/converts/common" ;
1717import {
18- getInnermostScopeFromNode ,
1918 getScopeFromNode ,
2019 removeAllScopeAndVariableAndReference ,
2120 removeReference ,
@@ -43,7 +42,6 @@ export type ScriptLetCallback<E extends ESTree.Node> = (
4342
4443export type ScriptLetCallbackOption = {
4544 getScope : ( node : ESTree . Node ) => Scope ;
46- getInnermostScope : ( node : ESTree . Node ) => Scope ;
4745 registerNodeToScope : ( node : any , scope : Scope ) => void ;
4846 scopeManager : ScopeManager ;
4947 visitorKeys ?: { [ type : string ] : string [ ] } ;
@@ -56,7 +54,6 @@ export type ScriptLetRestoreCallback = (
5654) => void ;
5755type ScriptLetRestoreCallbackOption = {
5856 getScope : ( node : ESTree . Node ) => Scope ;
59- getInnermostScope : ( node : ESTree . Node ) => Scope ;
6057 registerNodeToScope : ( node : any , scope : Scope ) => void ;
6158 scopeManager : ScopeManager ;
6259 visitorKeys ?: { [ type : string ] : string [ ] } ;
@@ -643,7 +640,6 @@ export class ScriptLetContext {
643640
644641 const callbackOption : ScriptLetRestoreCallbackOption = {
645642 getScope,
646- getInnermostScope,
647643 registerNodeToScope,
648644 scopeManager : result . scopeManager ! ,
649645 visitorKeys : result . visitorKeys ,
@@ -660,11 +656,6 @@ export class ScriptLetContext {
660656 return getScopeFromNode ( result . scopeManager ! , node ) ;
661657 }
662658
663- /** Get innermost scope */
664- function getInnermostScope ( node : ESTree . Node ) {
665- return getInnermostScopeFromNode ( result . scopeManager ! , node ) ;
666- }
667-
668659 /** Register node to scope */
669660 function registerNodeToScope ( node : any , scope : Scope ) : void {
670661 // If we replace the `scope.block` at this time,
0 commit comments