1
+ [%% raw "import Express from 'express'" ];
2
+
1
3
type complete ;
2
4
3
5
module Error = {
@@ -454,8 +456,8 @@ module Middleware = {
454
456
"type": string ,
455
457
"limit": Js . Nullable . t (int ),
456
458
};
457
- [@ bs . module "express " ] [@ bs . val ] external json_ : jsonOptions => t = "json" ;
458
- [@ bs . module "express " ] [@ bs . val ]
459
+ [@ bs . scope "Express " ] [@ bs . val ] external json_ : jsonOptions => t = "json" ;
460
+ [@ bs . scope "Express " ] [@ bs . val ]
459
461
external urlencoded_ : urlEncodedOptions => t = "urlencoded" ;
460
462
let json = (~inflate= true , ~strict= true , ~limit=?, () ) =>
461
463
json_({
@@ -659,7 +661,7 @@ module Router = {
659
661
"mergeParams": Js . boolean ,
660
662
"strict": Js . boolean ,
661
663
};
662
- [@ bs . module "express " ] [@ bs . val ] external make_ : routerArgs => t = "Router" ;
664
+ [@ bs . scope "Express " ] [@ bs . val ] external make_ : routerArgs => t = "Router" ;
663
665
let make = (~caseSensitive= false , ~mergeParams= false , ~strict= false , () ) =>
664
666
make_({
665
667
"caseSensitive" : caseSensitive |> Js . Boolean . to_js_boolean,
@@ -681,7 +683,8 @@ module App = {
681
683
let useRouter = (app, router) => Router . asMiddleware(router) |> use(app);
682
684
let useRouterOnPath = (app, ~path, router) =>
683
685
Router . asMiddleware(router) |> useOnPath(app, ~path);
684
- [@ bs . module ] external make : unit => t = "express" ;
686
+ [@ bs . val ] external make : unit => t = "Express" ;
687
+ let make = make;
685
688
686
689
/** * [make ()] creates an instance of the App class. */
687
690
external asMiddleware : t => Middleware . t = "% identity " ;
@@ -708,9 +711,9 @@ module Static = {
708
711
[@ bs . set ] external etag : (options , Js . boolean ) => unit = "" ;
709
712
/* ... add all the other options */
710
713
type t ;
711
- [@ bs . module "express" ] external make : (string , options ) => t = "static" ;
714
+ [@ bs . scope "Express" ] [ @ bs . val ] external make : (string , options ) => t = "static" ;
712
715
713
716
/** * [make directory] creates a static middleware for [directory] */
714
717
external asMiddleware : t => Middleware . t = "% identity " ;
715
718
/** * [asMiddleware static] casts [static] to a Middleware type */
716
- };
719
+ };
0 commit comments