mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 20:32:10 +00:00
refactor(isolated_declarations): use NONE in AST builder calls (#7752)
Pure refactor. `NONE` is shorter than `None::<TSTypeAnnotation<'a>>`.
This commit is contained in:
parent
75ba4a9e7a
commit
3c1b2bf439
2 changed files with 3 additions and 3 deletions
|
|
@ -547,7 +547,7 @@ impl<'a> IsolatedDeclarations<'a> {
|
||||||
&self,
|
&self,
|
||||||
kind: BindingPatternKind<'a>,
|
kind: BindingPatternKind<'a>,
|
||||||
) -> Box<'a, FormalParameters<'a>> {
|
) -> Box<'a, FormalParameters<'a>> {
|
||||||
let pattern = self.ast.binding_pattern(kind, None::<TSTypeAnnotation<'a>>, false);
|
let pattern = self.ast.binding_pattern(kind, NONE, false);
|
||||||
let parameter =
|
let parameter =
|
||||||
self.ast.formal_parameter(SPAN, self.ast.vec(), pattern, None, false, false);
|
self.ast.formal_parameter(SPAN, self.ast.vec(), pattern, None, false, false);
|
||||||
let items = self.ast.vec1(parameter);
|
let items = self.ast.vec1(parameter);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use oxc_allocator::Box;
|
use oxc_allocator::Box;
|
||||||
use oxc_allocator::CloneIn;
|
use oxc_allocator::CloneIn;
|
||||||
use oxc_allocator::Vec;
|
use oxc_allocator::Vec;
|
||||||
use oxc_ast::ast::*;
|
use oxc_ast::{ast::*, NONE};
|
||||||
use oxc_span::{Atom, GetSpan, SPAN};
|
use oxc_span::{Atom, GetSpan, SPAN};
|
||||||
|
|
||||||
use crate::{diagnostics::default_export_inferred, IsolatedDeclarations};
|
use crate::{diagnostics::default_export_inferred, IsolatedDeclarations};
|
||||||
|
|
@ -19,7 +19,7 @@ impl<'a> IsolatedDeclarations<'a> {
|
||||||
self.ast.vec(),
|
self.ast.vec(),
|
||||||
None,
|
None,
|
||||||
ImportOrExportKind::Value,
|
ImportOrExportKind::Value,
|
||||||
None::<WithClause>,
|
NONE,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue