From 15dfc1db95d1c6b67ba772a9bc60ef2d3da23b03 Mon Sep 17 00:00:00 2001 From: DonIsaac <22823424+DonIsaac@users.noreply.github.com> Date: Wed, 9 Oct 2024 01:43:06 +0000 Subject: [PATCH] feat(isolated-declarations): impl `Default` for options (#6372) Makes using ID options more ergonomic. --- crates/oxc_isolated_declarations/src/lib.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/crates/oxc_isolated_declarations/src/lib.rs b/crates/oxc_isolated_declarations/src/lib.rs index 160153512..ee61178fb 100644 --- a/crates/oxc_isolated_declarations/src/lib.rs +++ b/crates/oxc_isolated_declarations/src/lib.rs @@ -31,11 +31,16 @@ use rustc_hash::{FxHashMap, FxHashSet}; use crate::scope::ScopeTree; -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Default, Clone, Copy)] pub struct IsolatedDeclarationsOptions { - /// Do not emit declarations for code that has an @internal annotation in its JSDoc comment. - /// This is an internal compiler option; use at your own risk, because the compiler does not check that the result is valid. - /// + /// Do not emit declarations for code that has an `@internal` annotation in its JSDoc comment. + /// This is an internal compiler option; use at your own risk, because the compiler does not + /// check that the result is valid. + /// + /// Default: `false` + /// + /// ## References + /// [TSConfig - `stripInternal`](https://www.typescriptlang.org/tsconfig/#stripInternal) pub strip_internal: bool, }