Skip to content

Commit

Permalink
Rollback previous webapi
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Jun 29, 2023
1 parent 0a20d44 commit 26ca628
Show file tree
Hide file tree
Showing 96 changed files with 6,740 additions and 25 deletions.
2 changes: 2 additions & 0 deletions packages/melange-fetch/src/Fetch.ml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ module AbortController = struct

(* external signal : t -> signal = "signal" [@@bs.get] *)
let signal _ = assert false

(* external abort : unit = "abort" [@@bs.send.pipe: t] *)
let abort _ = ()

(* external make : unit -> t = "AbortController" [@@bs.new] *)
let make () = assert false
end
Expand Down
6 changes: 4 additions & 2 deletions packages/melange-runtime/dom_storage.ml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
type t = Dom_storage2.t

(* external getItem : string -> string option = "getItem"
[@@bs.send.pipe: t] [@@bs.return null_to_opt] *)
[@@bs.send.pipe: t] [@@bs.return null_to_opt] *)
let getItem _k = None

(* external setItem : string -> string -> unit = "setItem" [@@bs.send.pipe: t] *)
let setItem _k _v = ()

(* external removeItem : string -> unit = "removeItem" [@@bs.send.pipe: t] *)
let removeItem _k = ()

(* external clear : unit -> unit = "clear" [@@bs.send.pipe: t] *)
let clear _ = ()

(* external key : int -> string option = "key"
[@@bs.send.pipe: t] [@@bs.return null_to_opt] *)
[@@bs.send.pipe: t] [@@bs.return null_to_opt] *)
let key _ = None

(* external length : t -> int = "length" [@@bs.get] *)
Expand Down
6 changes: 4 additions & 2 deletions packages/melange-runtime/dom_storage2.ml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
type t

(* external getItem : string -> string option = "getItem"
[@@bs.send.pipe: t] [@@bs.return null_to_opt] *)
[@@bs.send.pipe: t] [@@bs.return null_to_opt] *)
let getItem _k = None

(* external setItem : string -> string -> unit = "setItem" [@@bs.send.pipe: t] *)
let setItem _k _v = ()

(* external removeItem : string -> unit = "removeItem" [@@bs.send.pipe: t] *)
let removeItem _k = ()

(* external clear : unit -> unit = "clear" [@@bs.send.pipe: t] *)
let clear _ = ()

(* external key : int -> string option = "key"
[@@bs.send.pipe: t] [@@bs.return null_to_opt] *)
[@@bs.send.pipe: t] [@@bs.return null_to_opt] *)
let key _ = None

(* external length : t -> int = "length" [@@bs.get] *)
Expand Down
File renamed without changes.
Loading

0 comments on commit 26ca628

Please sign in to comment.