escalier-lang / escalier

A compile-to-JavaScript language with tight TypeScript integration.
https://escalier-lang.github.io/escalier/
MIT License
21 stars 1 forks source link

Fix Pick<T, K> #688

Closed kevinbarabash closed 1 year ago

kevinbarabash commented 1 year ago

Constraints on type params can reference other type params. This PR creates a new sig_ctx Context when inferring and expanding type aliases. We add entries to sig_ctx.schemes for each type param where the value is the corresponding type argument.

codecov[bot] commented 1 year ago

Codecov Report

Merging #688 (ed58cd6) into main (774cba4) will increase coverage by 0.16%. Report is 1 commits behind head on main. The diff coverage is 90.64%.

@@            Coverage Diff             @@
##             main     #688      +/-   ##
==========================================
+ Coverage   88.86%   89.02%   +0.16%     
==========================================
  Files         109      112       +3     
  Lines       24188    25152     +964     
==========================================
+ Hits        21494    22392     +898     
- Misses       2694     2760      +66     
Files Changed Coverage Δ
crates/escalier_ast/src/type_ann.rs 100.00% <ø> (ø)
crates/escalier_codegen/src/js.rs 66.48% <0.00%> (ø)
crates/escalier_parser/src/lib.rs 100.00% <ø> (ø)
crates/escalier_codegen/src/d_ts.rs 62.51% <50.00%> (-0.10%) :arrow_down:
crates/escalier_parser/src/type_ann_parser.rs 95.41% <70.00%> (-0.39%) :arrow_down:
crates/escalier_hm/src/types.rs 81.25% <86.20%> (+0.57%) :arrow_up:
crates/escalier_hm/src/infer.rs 91.94% <87.50%> (+0.02%) :arrow_up:
crates/escalier_hm/src/unify.rs 82.96% <87.50%> (+0.20%) :arrow_up:
crates/escalier_interop/src/util.rs 90.85% <90.85%> (ø)
crates/escalier_interop/src/parse.rs 91.47% <91.47%> (ø)
... and 4 more

... and 4 files with indirect coverage changes