Skip to content

Commit

Permalink
Merge branch 'main' into date-format-functions-with-options
Browse files Browse the repository at this point in the history
  • Loading branch information
dkirchhof committed Feb 19, 2023
2 parents f594ec5 + 9517829 commit 20f5535
Show file tree
Hide file tree
Showing 4 changed files with 682 additions and 142 deletions.
4 changes: 2 additions & 2 deletions src/Core__Array.resi
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ let shuffle: array<'a> => array<'a>
let shuffleInPlace: array<'a> => unit
let flatMap: (array<'a>, 'a => array<'b>) => array<'b>


/**
`at(array, index)`

Expand All @@ -120,4 +119,5 @@ let flatMap: (array<'a>, 'a => array<'b>) => array<'b>
["a", "b", "c"]->Array.at(-4) // None
```
*/
@send external at: (array<'a>, int) => option<'a> = "at"
@send
external at: (array<'a>, int) => option<'a> = "at"
71 changes: 55 additions & 16 deletions src/Core__Console.res
Original file line number Diff line number Diff line change
@@ -1,28 +1,67 @@
@val external log: 'a => unit = "console.log"
@val external log2: ('a, 'b) => unit = "console.log"
@val external log3: ('a, 'b, 'c) => unit = "console.log"
@val external log4: ('a, 'b, 'c, 'd) => unit = "console.log"
@val external log5: ('a, 'b, 'c, 'd, 'e) => unit = "console.log"
@val external assert_: (bool, 'a) => unit = "console.assert"
@val external assert2: (bool, 'a, 'b) => unit = "console.assert"
@val external assert3: (bool, 'a, 'b, 'c) => unit = "console.assert"
@val external assert4: (bool, 'a, 'b, 'c, 'd) => unit = "console.assert"
@val external assert5: (bool, 'a, 'b, 'c, 'd, 'e) => unit = "console.assert"
@val external assert6: (bool, 'a, 'b, 'c, 'd, 'e, 'f) => unit = "console.assert"
@val @variadic external assertMany: (bool, array<_>) => unit = "console.assert"

@val external info: 'a => unit = "console.info"
@val external info2: ('a, 'b) => unit = "console.info"
@val external info3: ('a, 'b, 'c) => unit = "console.info"
@val external info4: ('a, 'b, 'c, 'd) => unit = "console.info"
@val external info5: ('a, 'b, 'c, 'd, 'e) => unit = "console.info"
@val external clear: unit => unit = "console.clear"

@val external warn: 'a => unit = "console.warn"
@val external warn2: ('a, 'b) => unit = "console.warn"
@val external warn3: ('a, 'b, 'c) => unit = "console.warn"
@val external warn4: ('a, 'b, 'c, 'd) => unit = "console.warn"
@val external warn5: ('a, 'b, 'c, 'd, 'e) => unit = "console.warn"
@val external count: string => unit = "console.count"
@val external countReset: string => unit = "console.countReset"

@val external debug: 'a => unit = "console.debug"
@val external debug2: ('a, 'b) => unit = "console.debug"
@val external debug3: ('a, 'b, 'c) => unit = "console.debug"
@val external debug4: ('a, 'b, 'c, 'd) => unit = "console.debug"
@val external debug5: ('a, 'b, 'c, 'd, 'e) => unit = "console.debug"
@val external debug6: ('a, 'b, 'c, 'd, 'e, 'f) => unit = "console.debug"
@val @variadic external debugMany: array<_> => unit = "console.debug"

@val external dir: 'a => unit = "console.dir"
@val external dirxml: 'a => unit = "console.dirxml"

@val external error: 'a => unit = "console.error"
@val external error2: ('a, 'b) => unit = "console.error"
@val external error3: ('a, 'b, 'c) => unit = "console.error"
@val external error4: ('a, 'b, 'c, 'd) => unit = "console.error"
@val external error5: ('a, 'b, 'c, 'd, 'e) => unit = "console.error"
@val external error6: ('a, 'b, 'c, 'd, 'e, 'f) => unit = "console.error"
@val @variadic external errorMany: array<_> => unit = "console.error"

@val external trace: unit => unit = "console.trace"
@val external group: string => unit = "console.group"
@val external groupCollapsed: string => unit = "console.groupCollapsed"
@val external groupEnd: unit => unit = "console.groupEnd"

@val external info: 'a => unit = "console.info"
@val external info2: ('a, 'b) => unit = "console.info"
@val external info3: ('a, 'b, 'c) => unit = "console.info"
@val external info4: ('a, 'b, 'c, 'd) => unit = "console.info"
@val external info5: ('a, 'b, 'c, 'd, 'e) => unit = "console.info"
@val external info6: ('a, 'b, 'c, 'd, 'e, 'f) => unit = "console.info"
@val @variadic external infoMany: array<_> => unit = "console.info"

@val external log: 'a => unit = "console.log"
@val external log2: ('a, 'b) => unit = "console.log"
@val external log3: ('a, 'b, 'c) => unit = "console.log"
@val external log4: ('a, 'b, 'c, 'd) => unit = "console.log"
@val external log5: ('a, 'b, 'c, 'd, 'e) => unit = "console.log"
@val external log6: ('a, 'b, 'c, 'd, 'e, 'f) => unit = "console.log"
@val @variadic external logMany: array<_> => unit = "console.log"

@val external table: 'a => unit = "console.table"

@val external time: string => unit = "console.time"
@val external timeEnd: string => unit = "console.timeEnd"
@val external timeLog: string => unit = "console.timeLog"

@val external trace: unit => unit = "console.trace"

@val external warn: 'a => unit = "console.warn"
@val external warn2: ('a, 'b) => unit = "console.warn"
@val external warn3: ('a, 'b, 'c) => unit = "console.warn"
@val external warn4: ('a, 'b, 'c, 'd) => unit = "console.warn"
@val external warn5: ('a, 'b, 'c, 'd, 'e) => unit = "console.warn"
@val external warn6: ('a, 'b, 'c, 'd, 'e, 'f) => unit = "console.warn"
@val @variadic external warnMany: array<_> => unit = "console.warn"
Loading

0 comments on commit 20f5535

Please sign in to comment.