use serde::Deserialize;
#[derive(Debug, Clone, Copy, Deserialize)]
#[serde(default, rename_all = "camelCase", deny_unknown_fields)]
pub struct DecoratorOptions {
#[serde(skip)]
pub legacy: bool,
pub emit_decorator_metadata: bool,
#[serde(default = "default_as_true")]
pub strict_null_checks: bool,
}
impl Default for DecoratorOptions {
fn default() -> Self {
Self {
legacy: false,
emit_decorator_metadata: false,
strict_null_checks: default_as_true(),
}
}
}
fn default_as_true() -> bool {
true
}