Skip to content

Commit

Permalink
Remove external's = "" shorthand
Browse files Browse the repository at this point in the history
It's deprecated and discouraged
  • Loading branch information
chenglou committed Jun 12, 2019
1 parent 2cccb02 commit 5ce8498
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions src/React.re
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ type componentLike('props, 'return) = 'props => 'return;
type component('props) = componentLike('props, element);

[@bs.module "react"]
external createElement: (component('props), 'props) => element = "";
external createElement: (component('props), 'props) => element = "createElement";

[@bs.module "react"]
external cloneElement: (component('props), 'props) => element = "";
external cloneElement: (component('props), 'props) => element = "cloneElement";

[@bs.splice] [@bs.module "react"]
external createElementVariadic:
Expand All @@ -28,7 +28,7 @@ module Ref = {
[@bs.set] external setCurrent: (t('value), 'value) => unit = "current";
};

[@bs.module "react"] external createRef: unit => Ref.t(Js.nullable('a)) = "";
[@bs.module "react"] external createRef: unit => Ref.t(Js.nullable('a)) = "createRef";

module Children = {
[@bs.module "react"] [@bs.scope "Children"] [@bs.val]
Expand Down Expand Up @@ -57,16 +57,16 @@ module Context = {
"Provider";
};

[@bs.module "react"] external createContext: 'a => Context.t('a) = "";
[@bs.module "react"] external createContext: 'a => Context.t('a) = "createContext";

[@bs.module "react"]
external forwardRef:
([@bs.uncurry] (('props, Js.Nullable.t(Ref.t('a))) => element)) =>
component('props) =
"";
"forwardRef";

[@bs.module "react"]
external memo: component('props) => component('props) = "";
external memo: component('props) => component('props) = "memo";

[@bs.module "react"]
external memoCustomCompareProps:
Expand Down Expand Up @@ -122,13 +122,13 @@ module Suspense = {
[@bs.module "react"]
external useState:
([@bs.uncurry] (unit => 'state)) => ('state, ('state => 'state) => unit) =
"";
"useState";

[@bs.module "react"]
external useReducer:
([@bs.uncurry] (('state, 'action) => 'state), 'state) =>
('state, 'action => unit) =
"";
"useReducer";

[@bs.module "react"]
external useReducerWithMapState:
Expand Down Expand Up @@ -304,9 +304,9 @@ external useCallback7:
callback('input, 'output) =
"useCallback";

[@bs.module "react"] external useContext: Context.t('any) => 'any = "";
[@bs.module "react"] external useContext: Context.t('any) => 'any = "useContext";

[@bs.module "react"] external useRef: 'value => Ref.t('value) = "";
[@bs.module "react"] external useRef: 'value => Ref.t('value) = "useRef";

[@bs.module "react"]
external useImperativeHandle0:
Expand Down
2 changes: 1 addition & 1 deletion src/ReactDOMRe.re
Original file line number Diff line number Diff line change
Expand Up @@ -2118,7 +2118,7 @@ include (
external apply:
('theFunction, 'theContext, 'arguments) =>
'returnTypeOfTheFunction =
"";
"apply";

let createElementVariadic = (domClassName, ~props=?, children) => {
let variadicArguments =
Expand Down
6 changes: 3 additions & 3 deletions src/ReasonReactRouter.re
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ external addEventListener: (Dom.window, string, unit => unit) => unit =

[@bs.send]
external removeEventListener: (Dom.window, string, unit => unit) => unit =
"";
"removeEventListener";

[@bs.send]
external dispatchEvent: (Dom.window, Dom.event) => unit = "dispatchEvent";
Expand All @@ -22,13 +22,13 @@ external dispatchEvent: (Dom.window, Dom.event) => unit = "dispatchEvent";
external pushState:
(Dom.history, [@bs.as {json|null|json}] _, [@bs.as ""] _, ~href: string) =>
unit =
"";
"pushState";

[@bs.send]
external replaceState:
(Dom.history, [@bs.as {json|null|json}] _, [@bs.as ""] _, ~href: string) =>
unit =
"";
"replaceState";

[@bs.val] external event: 'a = "Event";

Expand Down

0 comments on commit 5ce8498

Please # to comment.