Skip to content

Commit e4a26c8

Browse files
committed
Update CHANGELOG.md
1 parent 82534ac commit e4a26c8

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ subset of the arguments, and return a curried type with the remaining ones https
2626
- Add support for toplevel `await` https://github.com/rescript-lang/rescript-compiler/pull/5940
2727
- Support optional named arguments without a final unit in uncurried functions https://github.com/rescript-lang/rescript-compiler/pull/5907
2828
- Add experimental suppport for directives. An annotation such as `@@directive("use client;")` emits `use client;` verbatim before imports https://github.com/rescript-lang/rescript-compiler/pull/5998
29-
- Add `Core` standard library support for `genType` https://github.com/rescript-lang/rescript-compiler/pull/6019
29+
- `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<_>` https://github.com/rescript-lang/rescript-compiler/pull/6019
3030

3131
#### :boom: Breaking Change
3232

jscomp/gentype/Converter.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ let typeGetConverterNormalized ~config ~inline ~lookupId ~typeNameIsInterface
250250
| TypeVar _ -> (IdentC, normalized_)
251251
| Undefined t ->
252252
let tConverter, tNormalized = t |> visit ~visited in
253-
(OptionC tConverter, Undefined tNormalized)
253+
(NullableC tConverter, Undefined tNormalized)
254254
| Variant variant ->
255255
let allowUnboxed = not variant.polymorphic in
256256
let withPayloads, normalized, unboxed =

jscomp/gentype_tests/typescript-react-example/src/Core.gen.tsx

+3-9
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,9 @@ export const nullable0: (x:(null | undefined | number)) => (null | undefined | n
1414

1515
export const nullable1: (x:(null | undefined | number)) => (null | undefined | number) = CoreBS.nullable1;
1616

17-
export const undefined0: (x:(undefined | number)) => (undefined | number) = function (Arg1: any) {
18-
const result = CoreBS.undefined0((Arg1 == null ? undefined : Arg1));
19-
return result
20-
};
21-
22-
export const undefined1: (x:(undefined | number)) => (undefined | number) = function (Arg1: any) {
23-
const result = CoreBS.undefined1((Arg1 == null ? undefined : Arg1));
24-
return result
25-
};
17+
export const undefined0: (x:(undefined | number)) => (undefined | number) = CoreBS.undefined0;
18+
19+
export const undefined1: (x:(undefined | number)) => (undefined | number) = CoreBS.undefined1;
2620

2721
export const dict0: (x:{[id: string]: string}) => {[id: string]: string} = CoreBS.dict0;
2822

0 commit comments

Comments
 (0)