Comments (11)
Hi @kdy1, i'd like to fix it 😊 .
from stc.
Thank you!
from stc.
Hi @kdy1
I created a minimal test for debugging
the file link
I found that the error happens here
stc/crates/stc_ts_file_analyzer/src/analyzer/assign/mod.rs
Lines 375 to 413 in 2ab93ad
Do you have any advice? Seems the bug isn't here
stc/crates/stc_ts_file_analyzer/src/analyzer/scope/vars.rs
Lines 292 to 326 in 2ab93ad
BTW, opts.use_iterator_for_array
is true
stc/crates/stc_ts_file_analyzer/src/analyzer/scope/vars.rs
Lines 210 to 372 in 2ab93ad
from stc.
I guess that get_rest_elements
is returning the wrong value.
And there's a TODO for it
stc/crates/stc_ts_file_analyzer/src/analyzer/expr/array.rs
Lines 543 to 551 in 2ab93ad
from stc.
Thanks for your reply.
Yes, I knew this TODO exists, but I added a "println!" before calling get_rest_elements
and it wasn't called.
from stc.
If so, I think you can add some debug prints to scope/vars.rs
in the body of the issue
from stc.
yeah, i added a debug print to ouput the value of opts.use_iterator_for_array
, this value is true.
from stc.
I think you should print types instead. There's dump_type_as_string
which can be used to print readable form of types
from stc.
Ok, i get it.
from stc.
@TrickyPi Are you working on it? Feel free to tell me if you want me to take it (or unassign)
from stc.
I'v been busy with other work lately, and this issue seems hard to me(LOL),so I'm happy you can take it and really appericate your help during this time.
from stc.
Related Issues (20)
- Fix unit test: `tests/tsc/conformance/expressions/functionCalls/callWithSpread4/.1.ts`
- Improve Interface type params HOT 7
- Variable initialized with a call expression may not have correct type params inferred HOT 2
- Add a way to get the span for an interface's identifier
- stc fails to find type alias circular references HOT 1
- Different comment values in TSC CLI and test file, Which one should We trust? HOT 14
- Would you be willing to provide an STC playground? HOT 4
- Preliminary benchmarks HOT 1
- Split `Storage` into `TypeStore` and `ErrorStore`
- Source of data HOT 1
- [extra error] Type guard of form type of other should be filter string | number | boolean
- [todo]: closure or Indexing, etc. should follow the scope of where they are declared.
- [to do] implement type param indexing HOT 1
- [Meta] Unassigned gfi(good first issue)
- Timer logging should be switched to a flag. HOT 10
- Requires an actual type operation.(2322 extra error)
- Panic: `controlFlowIterationErrorsAsync.ts`(duplicate span)
- Project is officially abandoned HOT 9
- feat: implement ambient comment
- [todo]: refactoring - duplicate function call cause duplicate error at interface decl statement
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stc.