File tree Expand file tree Collapse file tree 4 files changed +6
-2
lines changed Expand file tree Collapse file tree 4 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -673,6 +673,7 @@ export interface FormalParameterRest extends Span {
673673 optional ?: boolean ;
674674 typeAnnotation ?: TSTypeAnnotation | null ;
675675 value ?: null ;
676+ parent : Node ;
676677}
677678
678679export type FormalParameter = {
@@ -687,6 +688,7 @@ export interface TSParameterProperty extends Span {
687688 parameter : FormalParameter ;
688689 readonly : boolean ;
689690 static : boolean ;
691+ parent : Node ;
690692}
691693
692694export interface FunctionBody extends Span {
Original file line number Diff line number Diff line change @@ -261,8 +261,6 @@ export function getScope(node: ESTree.Node): Scope {
261261 return scope . type === 'function-expression-name' ? scope . childScopes [ 0 ] : scope ;
262262 }
263263
264- // TODO: `TSParameterProperty` type should have a `parent` property.
265- // @ts -expect-error
266264 node = node . parent ;
267265 } while ( node !== null ) ;
268266
Original file line number Diff line number Diff line change @@ -1851,6 +1851,7 @@ pub enum FunctionType {
18511851 optional?: boolean;
18521852 typeAnnotation?: TSTypeAnnotation | null;
18531853 value?: null;
1854+ parent/* IF !LINTER */?/* END IF */: Node;
18541855 }
18551856 "
18561857) ]
@@ -1886,6 +1887,7 @@ pub struct FormalParameters<'a> {
18861887 parameter: FormalParameter;
18871888 readonly: boolean;
18881889 static: boolean;
1890+ parent/* IF !LINTER */?/* END IF */: Node;
18891891 }
18901892 "
18911893) ]
Original file line number Diff line number Diff line change @@ -669,6 +669,7 @@ export interface FormalParameterRest extends Span {
669669 optional ?: boolean ;
670670 typeAnnotation ?: TSTypeAnnotation | null ;
671671 value ?: null ;
672+ parent ?: Node ;
672673}
673674
674675export type FormalParameter = {
@@ -683,6 +684,7 @@ export interface TSParameterProperty extends Span {
683684 parameter : FormalParameter ;
684685 readonly : boolean ;
685686 static : boolean ;
687+ parent ?: Node ;
686688}
687689
688690export interface FunctionBody extends Span {
You can’t perform that action at this time.
0 commit comments