-
Notifications
You must be signed in to change notification settings - Fork 469
Specialize uses of new dict literal to direct JS object creation #6538
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
Changes from 19 commits
ba7baeb
d1b8ba0
483e333
a8b882c
09474e8
0410d4e
989e1a3
daa1d26
ed5995e
a4f0b28
81edee8
1f15cfc
00d5a03
07b002a
945cc00
43ceb94
94ec2f9
4b3943f
db290da
45a9c71
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
external unsafe_create: array<(string, 'a)> => dict<'a> = "?create_dict" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
external unsafe_create: array<(string, 'a)> => dict<'a> = "?create_dict" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
let x = Js.Dict.fromArray [||] | ||
let x = Js.Dict.fromArray [|("foo", {js|bar|js})|] | ||
let x = Js.Dict.fromArray [|("foo", {js|bar|js});("bar", {js|baz|js})|] | ||
let x = Caml_dict.unsafe_create [||] | ||
let x = Caml_dict.unsafe_create [|("foo", {js|bar|js})|] | ||
let x = Caml_dict.unsafe_create [|("foo", {js|bar|js});("bar", {js|baz|js})|] | ||
let baz = {js|foo|js} | ||
let x = | ||
Js.Dict.fromArray | ||
Caml_dict.unsafe_create | ||
[|("foo", {js|bar|js});("bar", {js|baz|js});("baz", baz)|] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
let someString = "hello" | ||
|
||
let createdDict = dict{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe also add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, adding. |
||
"name": "hello", | ||
"age": "what", | ||
"more": "stuff", | ||
"otherStr": someString, | ||
} |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
*.log | ||
*.ninja | ||
.ninja_log | ||
bs/.project-files-cache |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ |
Uh oh!
There was an error while loading. Please reload this page.