diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-05-19 18:55:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-19 18:55:06 -0400 |
commit | 0fb5f23466a84835cb1b4202d06ec53dc1592961 (patch) | |
tree | 947b69424d02b53888eb2f8b665e692107a6ef68 /cli/doc/printer.rs | |
parent | 949061c4b68e41aa93da97125cd15ad8c9e7f44f (diff) |
fix(doc): crash on formatting type predicate (#5651)
Diffstat (limited to 'cli/doc/printer.rs')
-rw-r--r-- | cli/doc/printer.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/doc/printer.rs b/cli/doc/printer.rs index 7a6b9e731..f7f41079d 100644 --- a/cli/doc/printer.rs +++ b/cli/doc/printer.rs @@ -127,6 +127,9 @@ fn render_params(params: Vec<doc::ParamDef>) -> String { } fn render_ts_type(ts_type: doc::ts_type::TsTypeDef) -> String { + if ts_type.kind.is_none() { + return "<UNIMPLEMENTED>".to_string(); + } let kind = ts_type.kind.unwrap(); match kind { TsTypeDefKind::Array => { |