Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
crowlKats committed Oct 25, 2023
1 parent 2043238 commit 9cd3e55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/html/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ pub fn render_type_def(def: &crate::ts_type::TsTypeDef) -> String {
TsTypeDefKind::Mapped => {
let mapped = def.mapped_type.as_ref().unwrap();

let optional = if let Some(optional) = mapped.readonly {
let char = match optional {
let readonly = if let Some(readonly) = mapped.readonly {
let char = match readonly {
TruePlusMinus::True => "",
TruePlusMinus::Plus => "+",
TruePlusMinus::Minus => "-",
Expand Down Expand Up @@ -151,7 +151,7 @@ pub fn render_type_def(def: &crate::ts_type::TsTypeDef) -> String {
.unwrap_or_default();

format!(
"{optional}[{}{name_type}]{optional}{ts_type}",
"{readonly}[{}{name_type}]{optional}{ts_type}",
type_param_summary(&mapped.type_param, "in")
)
}
Expand Down

0 comments on commit 9cd3e55

Please sign in to comment.