Skip to content

Add placeholder types for ES6 collections #5630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
194 changes: 101 additions & 93 deletions jscomp/main/builtin_cmi_datasets.ml

Large diffs are not rendered by default.

64 changes: 36 additions & 28 deletions jscomp/main/builtin_cmj_datasets.ml

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions jscomp/others/js.ml
Original file line number Diff line number Diff line change
Expand Up @@ -299,3 +299,15 @@ module Vector = Js_vector

module Console = Js_console
(** Provides bindings for console *)

module Set = Js_set
(** Provides bindings for ES6 Set *)

module WeakSet = Js_weakset
(** Provides bindings for ES6 WeakSet *)

module Map = Js_map
(** Provides bindings for ES6 Set *)

module WeakMap = Js_weakmap
(** Provides bindings for ES6 WeakSet *)
3 changes: 3 additions & 0 deletions jscomp/others/js_map.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(** ES6 Map API *)

type ('k, 'v) t
3 changes: 3 additions & 0 deletions jscomp/others/js_set.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(** ES6 Set API *)

type 'a t
3 changes: 3 additions & 0 deletions jscomp/others/js_weakmap.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(** ES6 WeakMap API *)

type ('k, 'v) t
3 changes: 3 additions & 0 deletions jscomp/others/js_weakset.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(** ES6 WeakSet API *)

type 'a t
6 changes: 5 additions & 1 deletion jscomp/others/release.ninja
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ o others/js_json.cmj : cc_cmi others/js_json.ml | others/belt_internals.cmi othe
o others/js_json.cmi : cc others/js_json.mli | others/belt_internals.cmi others/js.cmi others/js_dict.cmi others/js_null.cmi others/js_string.cmj others/js_types.cmi $bsc
o others/js_list.cmj : cc_cmi others/js_list.ml | others/belt_internals.cmi others/js.cmi others/js_array2.cmj others/js_list.cmi others/js_vector.cmj $bsc
o others/js_list.cmi : cc others/js_list.mli | others/belt_internals.cmi others/js.cmi $bsc
o others/js_map.cmi others/js_map.cmj : cc others/js_map.ml | others/belt_internals.cmi others/js.cmi $bsc
o others/js_mapperRt.cmj : cc_cmi others/js_mapperRt.ml | others/belt_internals.cmi others/js.cmi others/js.cmj others/js_mapperRt.cmi $bsc
o others/js_mapperRt.cmi : cc others/js_mapperRt.mli | others/belt_internals.cmi others/js.cmi $bsc
o others/js_math.cmi others/js_math.cmj : cc others/js_math.ml | others/belt_internals.cmi others/js.cmi others/js_int.cmj $bsc
Expand All @@ -49,6 +50,7 @@ o others/js_promise.cmi others/js_promise.cmj : cc others/js_promise.ml | others
o others/js_re.cmi others/js_re.cmj : cc others/js_re.ml | others/belt_internals.cmi others/js.cmi others/js.cmj $bsc
o others/js_result.cmj : cc_cmi others/js_result.ml | others/belt_internals.cmi others/js.cmi others/js_result.cmi $bsc
o others/js_result.cmi : cc others/js_result.mli | others/belt_internals.cmi others/js.cmi $bsc
o others/js_set.cmi others/js_set.cmj : cc others/js_set.ml | others/belt_internals.cmi others/js.cmi $bsc
o others/js_string.cmi others/js_string.cmj : cc others/js_string.ml | others/belt_internals.cmi others/js.cmi others/js_array2.cmj others/js_re.cmj $bsc
o others/js_string2.cmi others/js_string2.cmj : cc others/js_string2.ml | others/belt_internals.cmi others/js.cmi others/js_array2.cmj others/js_re.cmj $bsc
o others/js_typed_array.cmi others/js_typed_array.cmj : cc others/js_typed_array.ml | others/belt_internals.cmi others/js.cmi others/js.cmj others/js_typed_array2.cmj $bsc
Expand All @@ -59,11 +61,13 @@ o others/js_undefined.cmj : cc_cmi others/js_undefined.ml | others/belt_internal
o others/js_undefined.cmi : cc others/js_undefined.mli | others/belt_internals.cmi others/js.cmi others/js.cmj $bsc
o others/js_vector.cmj : cc_cmi others/js_vector.ml | others/belt_internals.cmi others/js.cmi others/js_array2.cmj others/js_vector.cmi $bsc
o others/js_vector.cmi : cc others/js_vector.mli | others/belt_internals.cmi others/js.cmi $bsc
o others/js_weakmap.cmi others/js_weakmap.cmj : cc others/js_weakmap.ml | others/belt_internals.cmi others/js.cmi $bsc
o others/js_weakset.cmi others/js_weakset.cmj : cc others/js_weakset.ml | others/belt_internals.cmi others/js.cmi $bsc
o others/jsx.cmi others/jsx.cmj : cc others/jsx.ml | others/belt_internals.cmi others/js.cmi $bsc
o others/jsxDOM.cmi others/jsxDOM.cmj : cc others/jsxDOM.ml | others/belt_internals.cmi others/js.cmi others/jsx.cmj others/jsxDOMStyle.cmj others/jsxEvent.cmj $bsc
o others/jsxDOMStyle.cmi others/jsxDOMStyle.cmj : cc others/jsxDOMStyle.ml | others/belt_internals.cmi others/js.cmi $bsc
o others/jsxEvent.cmi others/jsxEvent.cmj : cc others/jsxEvent.ml | others/belt_internals.cmi others/js.cmi $bsc
o js_pkg : phony others/js_OO.cmi others/js_OO.cmj others/js_array.cmi others/js_array.cmj others/js_array2.cmi others/js_array2.cmj others/js_bigint.cmi others/js_bigint.cmj others/js_cast.cmi others/js_cast.cmj others/js_console.cmi others/js_console.cmj others/js_date.cmi others/js_date.cmj others/js_dict.cmi others/js_dict.cmj others/js_exn.cmi others/js_exn.cmj others/js_float.cmi others/js_float.cmj others/js_global.cmi others/js_global.cmj others/js_int.cmi others/js_int.cmj others/js_json.cmi others/js_json.cmj others/js_list.cmi others/js_list.cmj others/js_mapperRt.cmi others/js_mapperRt.cmj others/js_math.cmi others/js_math.cmj others/js_null.cmi others/js_null.cmj others/js_null_undefined.cmi others/js_null_undefined.cmj others/js_obj.cmi others/js_obj.cmj others/js_option.cmi others/js_option.cmj others/js_promise.cmi others/js_promise.cmj others/js_re.cmi others/js_re.cmj others/js_result.cmi others/js_result.cmj others/js_string.cmi others/js_string.cmj others/js_string2.cmi others/js_string2.cmj others/js_typed_array.cmi others/js_typed_array.cmj others/js_typed_array2.cmi others/js_typed_array2.cmj others/js_types.cmi others/js_types.cmj others/js_undefined.cmi others/js_undefined.cmj others/js_vector.cmi others/js_vector.cmj others/jsx.cmi others/jsx.cmj others/jsxDOM.cmi others/jsxDOM.cmj others/jsxDOMStyle.cmi others/jsxDOMStyle.cmj others/jsxEvent.cmi others/jsxEvent.cmj
o js_pkg : phony others/js_OO.cmi others/js_OO.cmj others/js_array.cmi others/js_array.cmj others/js_array2.cmi others/js_array2.cmj others/js_bigint.cmi others/js_bigint.cmj others/js_cast.cmi others/js_cast.cmj others/js_console.cmi others/js_console.cmj others/js_date.cmi others/js_date.cmj others/js_dict.cmi others/js_dict.cmj others/js_exn.cmi others/js_exn.cmj others/js_float.cmi others/js_float.cmj others/js_global.cmi others/js_global.cmj others/js_int.cmi others/js_int.cmj others/js_json.cmi others/js_json.cmj others/js_list.cmi others/js_list.cmj others/js_map.cmi others/js_map.cmj others/js_mapperRt.cmi others/js_mapperRt.cmj others/js_math.cmi others/js_math.cmj others/js_null.cmi others/js_null.cmj others/js_null_undefined.cmi others/js_null_undefined.cmj others/js_obj.cmi others/js_obj.cmj others/js_option.cmi others/js_option.cmj others/js_promise.cmi others/js_promise.cmj others/js_re.cmi others/js_re.cmj others/js_result.cmi others/js_result.cmj others/js_set.cmi others/js_set.cmj others/js_string.cmi others/js_string.cmj others/js_string2.cmi others/js_string2.cmj others/js_typed_array.cmi others/js_typed_array.cmj others/js_typed_array2.cmi others/js_typed_array2.cmj others/js_types.cmi others/js_types.cmj others/js_undefined.cmi others/js_undefined.cmj others/js_vector.cmi others/js_vector.cmj others/js_weakmap.cmi others/js_weakmap.cmj others/js_weakset.cmi others/js_weakset.cmj others/jsx.cmi others/jsx.cmj others/jsxDOM.cmi others/jsxDOM.cmj others/jsxDOMStyle.cmi others/jsxDOMStyle.cmj others/jsxEvent.cmi others/jsxEvent.cmj
o others/belt_Array.cmj : cc_cmi others/belt_Array.ml | others/belt.cmi others/belt_Array.cmi others/belt_internals.cmi others/js.cmi others/js.cmj others/js_math.cmj $bsc js_pkg
o others/belt_Array.cmi : cc others/belt_Array.mli | others/belt.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg
o others/belt_Float.cmj : cc_cmi others/belt_Float.ml | others/belt.cmi others/belt_Float.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg
Expand Down
12 changes: 12 additions & 0 deletions jscomp/runtime/js.ml
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,15 @@ module List = Js_list
module Vector = Js_vector

module Console = Js_console

module Set = Js_set
(** Provides bindings for ES6 Set *)

module WeakSet = Js_weakset
(** Provides bindings for ES6 WeakSet *)

module Map = Js_map
(** Provides bindings for ES6 Set *)

module WeakMap = Js_weakmap
(** Provides bindings for ES6 WeakSet *)
Loading