-
-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make tuple and custom array declared as interface compatible #216
Comments
@kdy1 want to work on this. Just wanted to understand adding the check for array like extending to the match block should solve this right?! |
Thank you and yes I think you need to check the |
@b4s36t4 Are you working on it? If not, feel free to tell me. I'm asking because this is a good-first-issue |
Let me try this issue! |
I think instead you should add logic to The other way is to add logic to |
@devgony And thank you! |
@devgony Are you still willing to work on this? |
@kdy1 Yes! I'm still working on it at local! i will push to github first. |
Thank you! I just wanted to check 😄 |
Problem
stc/crates/stc_ts_type_checker/tests/conformance/types/tuple/arityAndOrderCompatibility01.ts
Lines 1 to 5 in 56ae129
This type is treated almost as a tuple by
tsc
, butstc
fails to verify it.It's because it extends
Array
.Solution
I think we should handle it from
Analyzer.normalize
.Implementing special rules to each function for handling such edge looks like overengineering.
We can add logic for checking if the
ty
is an interface which extends an array-like builtin interface atstc/crates/stc_ts_file_analyzer/src/analyzer/types/mod.rs
Lines 83 to 99 in 56ae129
The text was updated successfully, but these errors were encountered: