refactor(isolated_declarations): use NONE in AST builder calls (#7752)

Pure refactor. `NONE` is shorter than `None::<TSTypeAnnotation<'a>>`.
This commit is contained in:
overlookmotel 2024-12-09 16:36:27 +00:00
parent 75ba4a9e7a
commit 3c1b2bf439
2 changed files with 3 additions and 3 deletions

View file

@ -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);

View file

@ -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,
)) ))
} }