Correctly identify a few methods as polymorphic

Since these methods return `this`, we should modify the return value to
reflect that so that inherited classes have the return type appropriately
identified as the inherited class
This commit is contained in:
Daniel Herman
2017-08-07 14:09:42 -04:00
parent 9379410e90
commit 49013b7277
+3 -3
View File
@@ -33,9 +33,9 @@ export function parseDSN(dsn: string | false): parsedDSN;
export class Client extends EventEmitter {
constructor(options: ConstructorOptions);
constructor(dsn: string, options?: ConstructorOptions);
config(dsn: string, options?: ConstructorOptions): Client;
install(options?: ConstructorOptions, cb?: () => void): Client;
setContext(ctx: any): Client;
config(dsn: string, options?: ConstructorOptions): this;
install(options?: ConstructorOptions, cb?: () => void): this;
setContext(ctx: any): this;
requestHandler(): (req: IncomingMessage, res: ServerResponse, next: () => void) => void;
errorHandler(): (e: Error, req: IncomingMessage, res: ServerResponse, next: () => void) => void;
captureException(error: Error, cb?: CaptureCallback): string;