stc icon indicating copy to clipboard operation
stc copied to clipboard

Speedy TypeScript type checker

Results 150 stc issues
Sort by recently updated
recently updated
newest added

# Problem https://github.com/dudykr/stc/blob/d2628d0e537ca1df62829b1c2ef99d898aae1ffa/crates/stc_ts_type_checker/tests/conformance/types/literal/templateLiteralTypes2.ts#L4-L13 ``` 0 unmatched errors out of 3 errors. Got 13 extra errors. Wanted: [] Unwanted: [(9, "TS2322"), (10, "TS2322"), (11, "TS2322"), (12, "TS2322"), (24, "TS2322"), (32, "TS2322"),...

bug
good first issue

This probably isn't much of a priority for now, but the module resolver can easily cause a stack overflow by resolving recursively. When running stc on [this codebase](https://github.com/Redfire75369/stc-testing/tree/resolver-recursion), the stack...

# Problem https://github.com/dudykr/stc/blob/18e24339e63c0de0e093fa0cc6683ebe4d3c860b/crates/stc_ts_type_checker/tests/conformance/types/literal/templateLiteralTypes3.ts#L20-L31 `arg` should be `*${string}*` instead of `string. --- # Solution We have metadata named `prevent_generalization`. https://github.com/dudykr/stc/blob/18e24339e63c0de0e093fa0cc6683ebe4d3c860b/crates/stc_ts_types/src/metadata.rs#L104 It's respected by literal => keyword pass, so the fix for...

bug
good first issue

Picked up from branch `kdy1/dev`. Nothing to see yet :) ...

I'll do this, and I'll use this issue to track the list of extra errors. To make development faster, by encouraging contribution, I'll investigate and list all simple issues into...

**Description:** Fix #179 **BREAKING CHANGE:** **Related issue (if exists):** #179

# Problem https://github.com/dudykr/stc/blob/18e24339e63c0de0e093fa0cc6683ebe4d3c860b/crates/stc_ts_type_checker/tests/conformance/types/literal/templateLiteralTypes3.ts#L132-L138 x (`foo-${string}`) and y (`${string}-bar`) have overlap, but stc fails to verify it. # Solution We should handle template literals specially in https://github.com/dudykr/stc/blob/18e24339e63c0de0e093fa0cc6683ebe4d3c860b/crates/stc_ts_file_analyzer/src/analyzer/expr/type_cast.rs#L234-L243

bug
good first issue

# 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

bug
good first issue

https://github.com/dudykr/stc/blob/2ab93ad46cd2683539300bde8f30c7bf89ac1e15/crates/stc_ts_type_checker/tests/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts#L27-L29 The lines above should not report an error, but stc currently emits The cause is https://github.com/dudykr/stc/blob/2ab93ad46cd2683539300bde8f30c7bf89ac1e15/crates/stc_ts_file_analyzer/src/analyzer/assign/mod.rs#L936-L946 and it should be fixed to allow assignment to nested modules

bug
good first issue

https://github.com/dudykr/stc/blob/2c2c8224273ffbca0aba723b34fd560b6b4a3c45/crates/stc_ts_file_analyzer/tests/pass/types/intersection/intersectionReduction/.4.ts#L3-L10 https://github.com/dudykr/stc/blob/2c2c8224273ffbca0aba723b34fd560b6b4a3c45/crates/stc_ts_file_analyzer/tests/pass/types/intersection/intersectionReduction/.5.ts#L3-L10 In the files above, the assignment should succeed because `Tag1` and `Tag2` are `enum` without an initializer, and enums without initializers are numbers while reducing. This can be...

bug
good first issue