Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
dce
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoc committed Jul 6, 2022
1 parent 585861a commit 5990f81
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 15 deletions.
3 changes: 0 additions & 3 deletions src/Config_.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ type bsVersion = int * int * int
type config = {
bsCurryPath : string option;
bsDependencies : string list;
mutable emitFlowAny : bool;
mutable emitImportCurry : bool;
mutable emitImportPropTypes : bool;
mutable emitImportReact : bool;
Expand All @@ -33,7 +32,6 @@ let default =
{
bsCurryPath = None;
bsDependencies = [];
emitFlowAny = false;
emitImportCurry = false;
emitImportPropTypes = false;
emitImportReact = false;
Expand Down Expand Up @@ -220,7 +218,6 @@ let readConfig ~bsVersion ~getBsConfigFile ~namespace =
bsCurryPath;
bsDependencies;
suffix;
emitFlowAny = false;
emitImportCurry = false;
emitImportPropTypes = false;
emitImportReact = false;
Expand Down
3 changes: 1 addition & 2 deletions src/EmitJs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ let rec emitCodeItem ~config ~emitters ~moduleItemsEmitter ~env ~fileName
type t = {
propsType : type_;
resolvedTypeName : ResolvedName.t;
retType : type_;
typeVars : string list;
}
end in
Expand Down Expand Up @@ -297,7 +296,7 @@ let rec emitCodeItem ~config ~emitters ~moduleItemsEmitter ~env ~fileName
else ResolvedName.fromString name |> ResolvedName.dot "Props"
in
( Function {function_ with componentName = Some hookName},
Some {HookType.propsType; resolvedTypeName; retType; typeVars} )
Some {HookType.propsType; resolvedTypeName; typeVars} )
| _ -> (type_, None)
in

Expand Down
2 changes: 0 additions & 2 deletions src/ImportPath.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ type t = string * string

let propTypes = ("", "prop-types")

let react = ("", "react")

let bsCurryPath ~config = ("", Config_.getBsCurryPath ~config)

let fromModule ~dir ~importExtension moduleName =
Expand Down
2 changes: 0 additions & 2 deletions src/ImportPath.mli
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ val fromStringUnsafe : string -> t

val propTypes : t

val react : t

val toCmt : config:config -> outputFileRelative:string -> t -> string
4 changes: 1 addition & 3 deletions src/ModuleName.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ let curry = "Curry"

let propTypes = "PropTypes"

let react = "React"

let rescriptPervasives = "RescriptPervasives"
let reasonPervasives = "ReasonPervasives"

let dotRegex = "." |> Str.quote |> Str.regexp

Expand Down
4 changes: 1 addition & 3 deletions src/ModuleName.mli
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ val fromStringUnsafe : string -> t

val propTypes : t

val react : t

val rescriptPervasives : t
val reasonPervasives : t

val toString : t -> string

Expand Down

0 comments on commit 5990f81

Please sign in to comment.