You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But because tsc uses TS2322 for many kinds of missing properties, we have extra logic for converting it to TS2322.
We should change it not to use such logic for assignments to index signatures
Solution
We should preserve MissingFields in more cases and call nested assign with the span of properties in the RHS of assignments.
Note
This issue is hard to fix I guess
The text was updated successfully, but these errors were encountered:
Problem
stc/crates/stc_ts_type_checker/tests/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts
Lines 35 to 39 in 56ae129
We report an error on line 36. To be exact, we are reporting an assignment failure (
TS2322
) onVarDeclarator
.But we should report multiple
TS2741
(missing properties) instead and on line 37 and 38.Actually, we have logic for creating
TS2741
.stc/crates/stc_ts_file_analyzer/src/analyzer/assign/type_el.rs
Lines 778 to 783 in 56ae129
But because
tsc
usesTS2322
for many kinds of missing properties, we have extra logic for converting it toTS2322
.We should change it not to use such logic for assignments to index signatures
Solution
We should preserve
MissingFields
in more cases and call nested assign with the span of properties in the RHS of assignments.Note
This issue is hard to fix I guess
The text was updated successfully, but these errors were encountered: