mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Fix babel-traverse buildCodeFrameError signature (#11654)
The Error argument is not an error instance, instead it is a constructor function that returns an error instance. Additionally, the constructor function is optional, by default SyntaxError is used
This commit is contained in:
committed by
Masahiro Wakame
parent
f3bafd505e
commit
e41b464073
Vendored
+1
-1
@@ -346,7 +346,7 @@ declare module "babel-traverse" {
|
||||
|
||||
getData(key: string, def?: any): any;
|
||||
|
||||
buildCodeFrameError(msg: string, Error: Error): Error;
|
||||
buildCodeFrameError<TError extends Error>(msg: string, Error?: new (msg: string) => TError): TError;
|
||||
|
||||
traverse(visitor: Visitor, state?: any): void;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user