feat(isolated-declarations): impl Default for options (#6372)

Makes using ID options more ergonomic.
This commit is contained in:
DonIsaac 2024-10-09 01:43:06 +00:00
parent 834ee2aa6c
commit 15dfc1db95

View file

@ -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.
/// <https://www.typescriptlang.org/tsconfig/#stripInternal>
/// 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,
}