Skip to content

Commit

Permalink
Fix depracated class paths (abedev#32)
Browse files Browse the repository at this point in the history
js.Error -> js.lib.Error
js.RegExp -> js.lib.RegExp
  • Loading branch information
tobil4sk committed Mar 14, 2021
1 parent cb48a70 commit c2de64c
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/express/Error.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package express;

@:native("Error")
extern class Error extends js.Error {
extern class Error extends js.lib.Error {
public var status : Int;
}
2 changes: 1 addition & 1 deletion src/express/Next.hx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ abstract Next(Dynamic)
public inline function call()
untyped this();

public inline function error(err : js.Error)
public inline function error(err : js.lib.Error)
untyped this(err);

public inline function route()
Expand Down
2 changes: 1 addition & 1 deletion src/mw/BasicAuth.hx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import haxe.crypto.Base64;
import express.Request;
import express.Response;
import express.Next;
import js.Error;
import js.lib.Error;
import js.node.Buffer;
using StringTools;

Expand Down
2 changes: 1 addition & 1 deletion src/mw/BearerTokenAuth.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mw;
import express.Request;
import express.Response;
import express.Next;
import js.Error;
import js.lib.Error;
using StringTools;

class BearerTokenAuth {
Expand Down
2 changes: 1 addition & 1 deletion src/mw/OnFinished.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package mw;

import express.Request;
import express.Response;
import js.Error;
import js.lib.Error;

@:jsRequire("on-finished")
extern class OnFinished {
Expand Down
2 changes: 1 addition & 1 deletion src/mw/Unless.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mw;
import express.Request;
import express.Middleware;
import haxe.extern.EitherType;
import js.RegExp;
import js.lib.RegExp;
import mw.jwt.*;

@:jsRequire("express-unless")
Expand Down
2 changes: 1 addition & 1 deletion src/mw/cors/Options.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package mw.cors;

import express.Request;
import haxe.extern.EitherType;
import js.Error;
import js.lib.Error;

typedef Options = {
?origin : EitherType<Bool, EitherType<String, OriginFunction>>,
Expand Down
4 changes: 2 additions & 2 deletions src/mw/expressbrute/Options.hx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Defines whether the remaining lifetime of a counter should be based on the time
Gets called whenever an error occurs with the persistent store from which ExpressBrute cannot recover. It is passed an object containing the properties message (a description of the message), parent (the error raised by the session store), and [key, ip] or [req, res, next] depending on whether or the error occurs during reset or in the middleware itself.
*/
?handleStoreError : EitherType<
{ message : String, parent : js.Error} -> String -> String -> Void,
{ message : String, parent : js.Error} -> Request -> Response -> Next -> Void
{ message : String, parent : js.lib.Error} -> String -> String -> Void,
{ message : String, parent : js.lib.Error} -> Request -> Response -> Next -> Void
>
}

0 comments on commit c2de64c

Please sign in to comment.