Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/oxlint/src-js/generated/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ export interface FormalParameterRest extends Span {
optional?: boolean;
typeAnnotation?: TSTypeAnnotation | null;
value?: null;
parent: Node;
}

export type FormalParameter = {
Expand All @@ -687,6 +688,7 @@ export interface TSParameterProperty extends Span {
parameter: FormalParameter;
readonly: boolean;
static: boolean;
parent: Node;
}

export interface FunctionBody extends Span {
Expand Down
2 changes: 0 additions & 2 deletions apps/oxlint/src-js/plugins/scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,6 @@ export function getScope(node: ESTree.Node): Scope {
return scope.type === 'function-expression-name' ? scope.childScopes[0] : scope;
}

// TODO: `TSParameterProperty` type should have a `parent` property.
// @ts-expect-error
node = node.parent;
} while (node !== null);

Expand Down
2 changes: 2 additions & 0 deletions crates/oxc_ast/src/ast/js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1851,6 +1851,7 @@ pub enum FunctionType {
optional?: boolean;
typeAnnotation?: TSTypeAnnotation | null;
value?: null;
parent/* IF !LINTER */?/* END IF */: Node;
}
"
)]
Expand Down Expand Up @@ -1886,6 +1887,7 @@ pub struct FormalParameters<'a> {
parameter: FormalParameter;
readonly: boolean;
static: boolean;
parent/* IF !LINTER */?/* END IF */: Node;
}
"
)]
Expand Down
2 changes: 2 additions & 0 deletions npm/oxc-types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ export interface FormalParameterRest extends Span {
optional?: boolean;
typeAnnotation?: TSTypeAnnotation | null;
value?: null;
parent?: Node;
}

export type FormalParameter = {
Expand All @@ -683,6 +684,7 @@ export interface TSParameterProperty extends Span {
parameter: FormalParameter;
readonly: boolean;
static: boolean;
parent?: Node;
}

export interface FunctionBody extends Span {
Expand Down
Loading