Skip to content

10.1.3

Compare
Choose a tag to compare
@cknitt cknitt released this 07 Mar 07:23
· 1022 commits to master since this release

πŸš€ New Feature

  • Add experimental suppport for directives. An annotation such as @@directive("use client;") emits use client; verbatim before imports #5999
  • genType: add Core standard library support for the following builtin types: Null.t, Nullable.t, Undefined.t, Dict.t<_>, Promise.t<_>, Date.t, BigInt.t, RegExp.t, Map.t<_, _>, WeakMap.t<_, _>, Set<_>, WeakSet<_> #6024

πŸ’₯ Breaking Change

  • genType: streamline the treatment of optionals as undefined #6024
    • Represent option<t> as undefined | t instead of null | undefined | t. This is more permissive when importing functions taking optional values (allows to use option types), but stricter when e.g. exporting ReScript functions taking arguments of option type. Fallback: use Js.undefined<_> instead.
    • Represent {x:option<string>} as {x:(undefined | string)} instead of {x?: string}. This is more in line with TS's behaviour. Fallback: use {x?:string}.

πŸ’… Polish

  • Add the gap property to jsxDOMStyle #5956

πŸ› Bug Fix

  • Fix issue where error messages related to non-existent props were displayed without location information rescript-lang/syntax#730
  • Fix issue where uncurried functions were incorrectly converting the type of a prop given as a default value to curried rescript-lang/syntax#731
  • Fix issue with nested async functions, where the inner function would be emitted without async #5984
  • Fix issue with printing async functions with locally abstract types rescript-lang/syntax#732
  • Fix issue with async context and locally abstract types #5985
  • Fix support for recursive components in JSX V4 rescript-lang/syntax#733
  • GenType: fix issue with V3 compatibility mode (see #5990) #5992
  • Fix issue with overlapping labelled argument with default value rescript-lang/syntax#734
  • Fix issue with using alias and default value together rescript-lang/syntax#734
  • Fix issue in Js.Promise2 where then and catch were returning undefined #5996
  • Fix issue in the compiler back-end where async functions passed to an @uncurry external would be inlined and transformed in a way that loses async #6011
  • Fix location issue for the treatment of async functions where hovering on the body with a type error would show 'a => promise<'a> everywhere #6014
  • Fix formatting of switch expressions that contain braced cases inside rescript-lang/syntax#735
  • Fix formatting of props spread for multiline JSX expression rescript-lang/syntax#736
  • Support @gentype.import as an alias to @genType.import in the compiler #6021
  • In GenType, check annotations also in module types to decide whether to produce the .gen.tsx file #5903
  • Fix issue with JSX V4 and newtype rescript-lang/syntax#737
  • Fix issue with JSX V4 when components are nested rescript-lang/syntax#738
  • Fix issue where generic compare on float values would be different from the compare for type float #6043
  • Improve code generated for default arguments in JSX V4 rescript-lang/syntax#739
  • Fix issue with JSX V4 props of the form ~p as module(...) rescript-lang/syntax#739