File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,6 @@ const printDocASTReducer: ASTReducer<string> = {
143143 FloatValue : { leave : ( { value } ) => value } ,
144144 StringValue : {
145145 leave : ( { value, block : isBlockString } ) =>
146- // @ts -expect-error FIXME: it's a problem with ASTReducer, will be fixed in separate PR
147146 isBlockString === true ? printBlockString ( value ) : printString ( value ) ,
148147 } ,
149148 BooleanValue : { leave : ( { value } ) => ( value ? 'true' : 'false' ) } ,
Original file line number Diff line number Diff line change @@ -71,11 +71,11 @@ type ASTReducerFn<TReducedNode extends ASTNode, R> = (
7171 ancestors : ReadonlyArray < ASTNode | ReadonlyArray < ASTNode > > ,
7272) => R ;
7373
74- type ReducedField < T , R > = T extends null | undefined
75- ? T
76- : T extends ReadonlyArray < any >
74+ type ReducedField < T , R > = T extends ASTNode
75+ ? R
76+ : T extends ReadonlyArray < ASTNode >
7777 ? ReadonlyArray < R >
78- : R ;
78+ : T ;
7979
8080/**
8181 * A KeyMap describes each the traversable properties of each kind of node.
You can’t perform that action at this time.
0 commit comments