File tree Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change 1
1
import * as acorn from 'acorn' ;
2
- import { type BaseWalker , base as basicWalker } from 'acorn-walk' ;
2
+ import { base as basicWalker } from 'acorn-walk' ;
3
3
import {
4
4
BinaryExpression ,
5
5
CallExpression ,
@@ -29,7 +29,7 @@ interface NodeWithComments extends acorn.Node {
29
29
function handlePureAnnotationsOfNode (
30
30
node : acorn . Node ,
31
31
state : CommentState ,
32
- type : string = node . type
32
+ type = node . type
33
33
) : void {
34
34
const { annotations } = state ;
35
35
let comment = annotations [ state . annotationIndex ] ;
@@ -38,7 +38,7 @@ function handlePureAnnotationsOfNode(
38
38
comment = annotations [ ++ state . annotationIndex ] ;
39
39
}
40
40
if ( comment && comment . end <= node . end ) {
41
- ( basicWalker as BaseWalker < CommentState > ) [ type ] ( node , state , handlePureAnnotationsOfNode ) ;
41
+ basicWalker [ type ] ( node , state , handlePureAnnotationsOfNode ) ;
42
42
while ( ( comment = annotations [ state . annotationIndex ] ) && comment . end <= node . end ) {
43
43
++ state . annotationIndex ;
44
44
annotateNode ( node , comment , false ) ;
Original file line number Diff line number Diff line change @@ -9,17 +9,6 @@ declare module 'rollup-plugin-string' {
9
9
export const string : import ( 'rollup' ) . PluginImpl ;
10
10
}
11
11
12
- declare module 'acorn-walk' {
13
- type WalkerCallback < TState > = ( node : acorn . Node , state : TState ) => void ;
14
- type RecursiveWalkerFn < TState > = (
15
- node : acorn . Node ,
16
- state : TState ,
17
- callback : WalkerCallback < TState >
18
- ) => void ;
19
- export type BaseWalker < TState > = Record < string , RecursiveWalkerFn < TState > > ;
20
- export const base : BaseWalker < unknown > ;
21
- }
22
-
23
12
declare module 'is-reference' {
24
13
export default function is_reference (
25
14
node : NodeWithFieldDefinition ,
You can’t perform that action at this time.
0 commit comments