stc icon indicating copy to clipboard operation
stc copied to clipboard

Assignment of `1.${number}.1` to `${number}.${number}.${number}` should success

Open kdy1 opened this issue 3 years ago • 0 comments

Problem

https://github.com/dudykr/stc/blob/18e24339e63c0de0e093fa0cc6683ebe4d3c860b/crates/stc_ts_type_checker/tests/conformance/types/literal/templateLiteralTypes3.ts#L46-L56

This should success, but currently stc fails to validate it correctly.

Solution

We should adjust logic in https://github.com/dudykr/stc/blob/18e24339e63c0de0e093fa0cc6683ebe4d3c860b/crates/stc_ts_file_analyzer/src/analyzer/assign/tpl.rs#L22-L47 to allow more wildcards

kdy1 avatar Nov 05 '22 03:11 kdy1