Skip to content

Commit

Permalink
Merge branch 'main' into fix/5
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 authored Aug 20, 2023
2 parents 3697d8d + 96ad01d commit 0999c3a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions crates/stc_ts_file_analyzer/src/analyzer/expr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2513,6 +2513,9 @@ impl Analyzer<'_, '_> {
}

if type_mode == TypeOfMode::LValue {
if prop.ty().is_type_param() && members.is_empty() {
return Ok(Type::never(span, Default::default()));
}
return Ok(Type::any(span, Default::default()));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"required_errors": {
"TS2322": 2
"TS2322": 1
},
"required_error_lines": {
"TS2322": [
25,
28
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Stats {
required_error: 2,
matched_error: 8,
required_error: 1,
matched_error: 9,
extra_error: 0,
panic: 0,
}
4 changes: 2 additions & 2 deletions crates/stc_ts_type_checker/tests/tsc-stats.rust-debug
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Stats {
required_error: 3502,
matched_error: 6533,
required_error: 3501,
matched_error: 6534,
extra_error: 764,
panic: 73,
}

0 comments on commit 0999c3a

Please sign in to comment.