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

Maintain property optionality across mapped types #689

Closed kevinbarabash closed 1 year ago

kevinbarabash commented 1 year ago

Pick<{a?: string, b: number, c: boolean}, "a" | "b"> now returns {a?: string | undefined, c: number}. This behaviour matches TS' behaviour.

codecov[bot] commented 1 year ago

Codecov Report

Merging #689 (05937ad) into main (a532959) will increase coverage by 0.08%. The diff coverage is 87.50%.

@@            Coverage Diff             @@
##             main     #689      +/-   ##
==========================================
+ Coverage   89.01%   89.10%   +0.08%     
==========================================
  Files         112      112              
  Lines       25152    25173      +21     
==========================================
+ Hits        22390    22431      +41     
+ Misses       2762     2742      -20     
Files Changed Coverage Δ
crates/escalier_hm/src/unify.rs 84.79% <0.00%> (+1.83%) :arrow_up:
crates/escalier_hm/src/util.rs 80.08% <89.18%> (+0.17%) :arrow_up:
crates/escalier_hm/src/infer.rs 92.03% <100.00%> (+0.09%) :arrow_up:

... and 4 files with indirect coverage changes