File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import * as acorn from 'acorn' ;
2- import { type BaseWalker , base as basicWalker } from 'acorn-walk' ;
2+ import { base as basicWalker } from 'acorn-walk' ;
33import {
44 BinaryExpression ,
55 CallExpression ,
@@ -29,7 +29,7 @@ interface NodeWithComments extends acorn.Node {
2929function handlePureAnnotationsOfNode (
3030 node : acorn . Node ,
3131 state : CommentState ,
32- type : string = node . type
32+ type = node . type
3333) : void {
3434 const { annotations } = state ;
3535 let comment = annotations [ state . annotationIndex ] ;
@@ -38,7 +38,7 @@ function handlePureAnnotationsOfNode(
3838 comment = annotations [ ++ state . annotationIndex ] ;
3939 }
4040 if ( comment && comment . end <= node . end ) {
41- ( basicWalker as BaseWalker < CommentState > ) [ type ] ( node , state , handlePureAnnotationsOfNode ) ;
41+ basicWalker [ type ] ( node , state , handlePureAnnotationsOfNode ) ;
4242 while ( ( comment = annotations [ state . annotationIndex ] ) && comment . end <= node . end ) {
4343 ++ state . annotationIndex ;
4444 annotateNode ( node , comment , false ) ;
Original file line number Diff line number Diff line change @@ -9,17 +9,6 @@ declare module 'rollup-plugin-string' {
99 export const string : import ( 'rollup' ) . PluginImpl ;
1010}
1111
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-
2312declare module 'is-reference' {
2413 export default function is_reference (
2514 node : NodeWithFieldDefinition ,
You can’t perform that action at this time.
0 commit comments