ProbeJS
ProbeJS copied to clipboard
context-aware JSLambdaType formatting
This PR:
- makes formatting of parameters accept
FormatTypeto determine its type formatting, with FormatType-less overloads for backward compat - makes
JSLambdaTypecontext aware, which means its type foramtting will behave differently when providedFormatTypeis 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
- e.g. For a lambda defined by
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