@@ -15,7 +15,6 @@ import type {
15
15
import type { ESLintExtendedProgram } from "../parser" ;
16
16
import { getWithLoc } from "../parser/converts/common" ;
17
17
import {
18
- getInnermostScopeFromNode ,
19
18
getScopeFromNode ,
20
19
removeAllScopeAndVariableAndReference ,
21
20
removeReference ,
@@ -43,7 +42,6 @@ export type ScriptLetCallback<E extends ESTree.Node> = (
43
42
44
43
export type ScriptLetCallbackOption = {
45
44
getScope : ( node : ESTree . Node ) => Scope ;
46
- getInnermostScope : ( node : ESTree . Node ) => Scope ;
47
45
registerNodeToScope : ( node : any , scope : Scope ) => void ;
48
46
scopeManager : ScopeManager ;
49
47
visitorKeys ?: { [ type : string ] : string [ ] } ;
@@ -56,7 +54,6 @@ export type ScriptLetRestoreCallback = (
56
54
) => void ;
57
55
type ScriptLetRestoreCallbackOption = {
58
56
getScope : ( node : ESTree . Node ) => Scope ;
59
- getInnermostScope : ( node : ESTree . Node ) => Scope ;
60
57
registerNodeToScope : ( node : any , scope : Scope ) => void ;
61
58
scopeManager : ScopeManager ;
62
59
visitorKeys ?: { [ type : string ] : string [ ] } ;
@@ -643,7 +640,6 @@ export class ScriptLetContext {
643
640
644
641
const callbackOption : ScriptLetRestoreCallbackOption = {
645
642
getScope,
646
- getInnermostScope,
647
643
registerNodeToScope,
648
644
scopeManager : result . scopeManager ! ,
649
645
visitorKeys : result . visitorKeys ,
@@ -660,11 +656,6 @@ export class ScriptLetContext {
660
656
return getScopeFromNode ( result . scopeManager ! , node ) ;
661
657
}
662
658
663
- /** Get innermost scope */
664
- function getInnermostScope ( node : ESTree . Node ) {
665
- return getInnermostScopeFromNode ( result . scopeManager ! , node ) ;
666
- }
667
-
668
659
/** Register node to scope */
669
660
function registerNodeToScope ( node : any , scope : Scope ) : void {
670
661
// If we replace the `scope.block` at this time,
0 commit comments