rescript-lang/rescript-lang.org

Document co / contravariance (`<+a>`, `<-a>`)

オープン

#149 opened on 2021/01/01

 (3 件のコメント) (2 件のリアクション) (0 人の担当者)MDX (258 件のフォーク)github user discovery
help wantedmanual

Repository metrics

Stars
 (1,855 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

This one is definitely an advanced topic.

  • What does + and - mean?
  • What syntax constructs are possible? (type, function, etc.)
  • What practical use-cases does it have / Why do we need it?

Things to avoid:

  • Complex / too scientific wording
  • Too generic examples without practical context

Hints:

  • We use a covariant type in Js.Promise.t (see it here)

コントリビューターガイド