ProbeJS icon indicating copy to clipboard operation
ProbeJS copied to clipboard

context-aware JSLambdaType formatting

Open ZZZank opened this issue 1 year ago • 0 comments

This PR:

  • makes formatting of parameters accept FormatType to determine its type formatting, with FormatType-less overloads for backward compat
  • makes JSLambdaType context aware, which means its type foramtting will behave differently when provided FormatType is different.
    • e.g. For a lambda defined by (a: A) => A, when it's a param type, it will be formatted as (a: A) => A$$Type, and when it is a return type, it will be formatted as (a: A$$Type) => A

related: #92 cherry-packed from: https://github.com/ZZZank/ProbeJS-Legacy/commit/2c3bd1db8da83bf5006a575fbfdd6bf06caf50e5 , https://github.com/ZZZank/ProbeJS-Legacy/commit/e49fd56e458eb8adb142c7f82938372e145ed130 , and https://github.com/ZZZank/ProbeJS-Legacy/commit/f1ff8703d86d31b77bf5048a8df3aac874bd9bbc

ZZZank avatar Aug 03 '24 05:08 ZZZank