From c31c7b4aeec08a6467198cd002406ca5615803e2 Mon Sep 17 00:00:00 2001 From: Scott Cooper Date: Mon, 27 Mar 2017 21:34:11 -0700 Subject: [PATCH 1/7] add raven-node definitions --- types/raven/index.d.ts | 100 +++++++++++++++++++++++++++++++++++++ types/raven/raven-tests.ts | 28 +++++++++++ types/raven/tsconfig.json | 22 ++++++++ types/raven/tslint.json | 1 + 4 files changed, 151 insertions(+) create mode 100644 types/raven/index.d.ts create mode 100644 types/raven/raven-tests.ts create mode 100644 types/raven/tsconfig.json create mode 100644 types/raven/tslint.json diff --git a/types/raven/index.d.ts b/types/raven/index.d.ts new file mode 100644 index 0000000000..c01c1e72e8 --- /dev/null +++ b/types/raven/index.d.ts @@ -0,0 +1,100 @@ +// Type definitions for raven 1.2.0 +// Project: https://github.com/getsentry/raven-node +// Definitions by: Scott Cooper +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { IncomingMessage, ServerResponse } from 'http'; +import { EventEmitter } from 'events'; + +declare namespace Raven { + const version: string; + function config(dsn: string | false, options?: ConstructorOptions): Client; + function wrap(func: () => void, onErr?: () => void): () => void; + function wrap(options: any, func: () => void, onErr?: () => void): () => void; + function interceptErr(ctx: any): Client; + function setContext(ctx: any): Client; + function captureException(e: Error, cb?: CaptureCallback): Client; + function captureException(e: Error, options?: CaptureOptions, cb?: CaptureCallback): Client; + function mergeContext(ctx: any): Client; + function getContext(): any; + function errorHandler(): (e: Error, req: IncomingMessage, res: ServerResponse, next: () => void) => void; + function context(ctx: any, func: () => void, onErr?: () => void): Client; + function context(func: () => void, onErr?: () => void): Client; + function captureBreadcrumb(breadcrumb: any): void; + function disableConsoleAlerts(): void; + function consoleAlert(msg: string): void; + function parseDSN(dsn: string | false): parsedDSN; + + 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; + requestHandler(): (req: IncomingMessage, res: ServerResponse, next: () => void) => void; + errorHandler(): (e: Error, req: IncomingMessage, res: ServerResponse, next: () => void) => void; + captureException(error: Error, cb?: CaptureCallback): void; + captureException(error: Error, options?: CaptureOptions, cb?: CaptureCallback): void; + captureMessage(message: string, cb?: CaptureCallback): void; + captureMessage(message: string, options?: CaptureOptions, cb?: CaptureCallback): void; + captureBreadcrumb(breadcrumb: any): void; + setUserContext(data: UserData): void; + setDataCallback(fn: DataCallback): void; + context(ctx: any, func: () => void, onErr?: () => void): Client; + context(func: () => void, onErr?: () => void): Client; + process(kwargs: any, cb?: () => void): void; + process(eventId: string, kwargs: any, cb?: () => void): void; + } + + interface ConstructorOptions { + name?: string; + logger?: string; + release?: string; + environment?: string; + tags?: { string: string }; + extra?: { string: any }; + dataCallback?: DataCallback; + transport?: () => void; + captureUnhandledRejections?: boolean; + autoBreadcrumbs?: boolean | object; + } + + interface UserData { + id: string; + handle?: string; + } + + interface parsedDSN { + protocol: string; + public_key: string; + private_key: string; + host: string; + path: string; + project_id: string; + port: number; + } + + interface CaptureCallback { + (err: { string: any }, eventId: any): void; + } + + interface DataCallback { + (data: { string: any }): void; + } + + interface TransportCallback { + (options: { string: any }): void; + } + + interface CaptureOptions { + tags?: { string: string }; + extra?: { string: any }; + fingerprint?: string; + level?: string; + } +} + +export = Raven; +export as namespace Raven; diff --git a/types/raven/raven-tests.ts b/types/raven/raven-tests.ts new file mode 100644 index 0000000000..6fa3d6e981 --- /dev/null +++ b/types/raven/raven-tests.ts @@ -0,0 +1,28 @@ +import * as Raven from 'raven'; + +const dsn = '___DSN___'; + +const client = Raven.config(dsn, { autoBreadcrumbs: true }).install(); +Raven.config(dsn).install({ captureUnhandledRejections: true }); +client.setContext({}); +client.on('logged', () => {}); +client.process({}); +client.captureMessage('Broken!', (err, eventId) => {}); +new Raven.Client({ name: 'YAY!' }); +new Raven.Client(dsn, { name: 'YAY!' }); +new Raven.Client(dsn); + +try { + throw new Error(); +} catch (e) { + var eventId = Raven.captureException(e, (sendErr, eventId) => {}); +} + +Raven.setContext({}); +Raven.mergeContext({}); +Raven.context(() => { + Raven.captureBreadcrumb({}); +}); +var doIt = () => {} +setTimeout(Raven.wrap(doIt), 1000) +Raven.parseDSN('https://8769c40cf49c4cc58b51fa45d8e2d166:296768aa91084e17b5ac02d3ad5bc7e7@app.getsentry.com/269') diff --git a/types/raven/tsconfig.json b/types/raven/tsconfig.json new file mode 100644 index 0000000000..b631d91430 --- /dev/null +++ b/types/raven/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "raven-tests.ts" + ] +} diff --git a/types/raven/tslint.json b/types/raven/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/types/raven/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } From 8ab6c1ce5539b1840a475391932827a12f134d99 Mon Sep 17 00:00:00 2001 From: Scott Cooper Date: Mon, 27 Mar 2017 22:00:25 -0700 Subject: [PATCH 2/7] remove minor --- types/raven/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/raven/index.d.ts b/types/raven/index.d.ts index c01c1e72e8..d8dd7f9732 100644 --- a/types/raven/index.d.ts +++ b/types/raven/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for raven 1.2.0 +// Type definitions for raven 1.2 // Project: https://github.com/getsentry/raven-node // Definitions by: Scott Cooper // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 05bb80c0df0704e515eea69dde5d14ed70cb0e3d Mon Sep 17 00:00:00 2001 From: Scott Cooper Date: Mon, 27 Mar 2017 22:01:53 -0700 Subject: [PATCH 3/7] use 4 spaces --- types/raven/index.d.ts | 154 ++++++++++++++++++------------------- types/raven/raven-tests.ts | 12 +-- 2 files changed, 83 insertions(+), 83 deletions(-) diff --git a/types/raven/index.d.ts b/types/raven/index.d.ts index d8dd7f9732..15a50ab884 100644 --- a/types/raven/index.d.ts +++ b/types/raven/index.d.ts @@ -9,91 +9,91 @@ import { IncomingMessage, ServerResponse } from 'http'; import { EventEmitter } from 'events'; declare namespace Raven { - const version: string; - function config(dsn: string | false, options?: ConstructorOptions): Client; - function wrap(func: () => void, onErr?: () => void): () => void; - function wrap(options: any, func: () => void, onErr?: () => void): () => void; - function interceptErr(ctx: any): Client; - function setContext(ctx: any): Client; - function captureException(e: Error, cb?: CaptureCallback): Client; - function captureException(e: Error, options?: CaptureOptions, cb?: CaptureCallback): Client; - function mergeContext(ctx: any): Client; - function getContext(): any; - function errorHandler(): (e: Error, req: IncomingMessage, res: ServerResponse, next: () => void) => void; - function context(ctx: any, func: () => void, onErr?: () => void): Client; - function context(func: () => void, onErr?: () => void): Client; - function captureBreadcrumb(breadcrumb: any): void; - function disableConsoleAlerts(): void; - function consoleAlert(msg: string): void; - function parseDSN(dsn: string | false): parsedDSN; + const version: string; + function config(dsn: string | false, options?: ConstructorOptions): Client; + function wrap(func: () => void, onErr?: () => void): () => void; + function wrap(options: any, func: () => void, onErr?: () => void): () => void; + function interceptErr(ctx: any): Client; + function setContext(ctx: any): Client; + function captureException(e: Error, cb?: CaptureCallback): Client; + function captureException(e: Error, options?: CaptureOptions, cb?: CaptureCallback): Client; + function mergeContext(ctx: any): Client; + function getContext(): any; + function errorHandler(): (e: Error, req: IncomingMessage, res: ServerResponse, next: () => void) => void; + function context(ctx: any, func: () => void, onErr?: () => void): Client; + function context(func: () => void, onErr?: () => void): Client; + function captureBreadcrumb(breadcrumb: any): void; + function disableConsoleAlerts(): void; + function consoleAlert(msg: string): void; + function parseDSN(dsn: string | false): parsedDSN; - 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; - requestHandler(): (req: IncomingMessage, res: ServerResponse, next: () => void) => void; - errorHandler(): (e: Error, req: IncomingMessage, res: ServerResponse, next: () => void) => void; - captureException(error: Error, cb?: CaptureCallback): void; - captureException(error: Error, options?: CaptureOptions, cb?: CaptureCallback): void; - captureMessage(message: string, cb?: CaptureCallback): void; - captureMessage(message: string, options?: CaptureOptions, cb?: CaptureCallback): void; - captureBreadcrumb(breadcrumb: any): void; - setUserContext(data: UserData): void; - setDataCallback(fn: DataCallback): void; - context(ctx: any, func: () => void, onErr?: () => void): Client; - context(func: () => void, onErr?: () => void): Client; - process(kwargs: any, cb?: () => void): void; - process(eventId: string, kwargs: any, cb?: () => void): void; - } + 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; + requestHandler(): (req: IncomingMessage, res: ServerResponse, next: () => void) => void; + errorHandler(): (e: Error, req: IncomingMessage, res: ServerResponse, next: () => void) => void; + captureException(error: Error, cb?: CaptureCallback): void; + captureException(error: Error, options?: CaptureOptions, cb?: CaptureCallback): void; + captureMessage(message: string, cb?: CaptureCallback): void; + captureMessage(message: string, options?: CaptureOptions, cb?: CaptureCallback): void; + captureBreadcrumb(breadcrumb: any): void; + setUserContext(data: UserData): void; + setDataCallback(fn: DataCallback): void; + context(ctx: any, func: () => void, onErr?: () => void): Client; + context(func: () => void, onErr?: () => void): Client; + process(kwargs: any, cb?: () => void): void; + process(eventId: string, kwargs: any, cb?: () => void): void; + } - interface ConstructorOptions { - name?: string; - logger?: string; - release?: string; - environment?: string; - tags?: { string: string }; - extra?: { string: any }; - dataCallback?: DataCallback; - transport?: () => void; - captureUnhandledRejections?: boolean; - autoBreadcrumbs?: boolean | object; - } + interface ConstructorOptions { + name?: string; + logger?: string; + release?: string; + environment?: string; + tags?: { string: string }; + extra?: { string: any }; + dataCallback?: DataCallback; + transport?: () => void; + captureUnhandledRejections?: boolean; + autoBreadcrumbs?: boolean | object; + } - interface UserData { - id: string; - handle?: string; - } + interface UserData { + id: string; + handle?: string; + } - interface parsedDSN { - protocol: string; - public_key: string; - private_key: string; - host: string; - path: string; - project_id: string; - port: number; - } + interface parsedDSN { + protocol: string; + public_key: string; + private_key: string; + host: string; + path: string; + project_id: string; + port: number; + } - interface CaptureCallback { - (err: { string: any }, eventId: any): void; - } + interface CaptureCallback { + (err: { string: any }, eventId: any): void; + } - interface DataCallback { - (data: { string: any }): void; - } + interface DataCallback { + (data: { string: any }): void; + } - interface TransportCallback { - (options: { string: any }): void; - } + interface TransportCallback { + (options: { string: any }): void; + } - interface CaptureOptions { - tags?: { string: string }; - extra?: { string: any }; - fingerprint?: string; - level?: string; - } + interface CaptureOptions { + tags?: { string: string }; + extra?: { string: any }; + fingerprint?: string; + level?: string; + } } export = Raven; diff --git a/types/raven/raven-tests.ts b/types/raven/raven-tests.ts index 6fa3d6e981..d4d5339e07 100644 --- a/types/raven/raven-tests.ts +++ b/types/raven/raven-tests.ts @@ -5,24 +5,24 @@ const dsn = '___DSN___'; const client = Raven.config(dsn, { autoBreadcrumbs: true }).install(); Raven.config(dsn).install({ captureUnhandledRejections: true }); client.setContext({}); -client.on('logged', () => {}); +client.on('logged', () => { }); client.process({}); -client.captureMessage('Broken!', (err, eventId) => {}); +client.captureMessage('Broken!', (err, eventId) => { }); new Raven.Client({ name: 'YAY!' }); new Raven.Client(dsn, { name: 'YAY!' }); new Raven.Client(dsn); try { - throw new Error(); + throw new Error(); } catch (e) { - var eventId = Raven.captureException(e, (sendErr, eventId) => {}); + var eventId = Raven.captureException(e, (sendErr, eventId) => { }); } Raven.setContext({}); Raven.mergeContext({}); Raven.context(() => { - Raven.captureBreadcrumb({}); + Raven.captureBreadcrumb({}); }); -var doIt = () => {} +var doIt = () => { } setTimeout(Raven.wrap(doIt), 1000) Raven.parseDSN('https://8769c40cf49c4cc58b51fa45d8e2d166:296768aa91084e17b5ac02d3ad5bc7e7@app.getsentry.com/269') From 1bbbc99a321751f403879aa4f889f0f6936f3846 Mon Sep 17 00:00:00 2001 From: Scott Cooper Date: Mon, 27 Mar 2017 22:35:17 -0700 Subject: [PATCH 4/7] remove object reference --- types/raven/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/raven/index.d.ts b/types/raven/index.d.ts index 15a50ab884..6b6e1c2035 100644 --- a/types/raven/index.d.ts +++ b/types/raven/index.d.ts @@ -58,7 +58,7 @@ declare namespace Raven { dataCallback?: DataCallback; transport?: () => void; captureUnhandledRejections?: boolean; - autoBreadcrumbs?: boolean | object; + autoBreadcrumbs?: boolean | any; } interface UserData { From 0edfa82daeafa5f7fe5859fb44e73ccac518d792 Mon Sep 17 00:00:00 2001 From: Scott Cooper Date: Mon, 27 Mar 2017 23:24:24 -0700 Subject: [PATCH 5/7] remove lint error --- types/raven/tslint.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/types/raven/tslint.json b/types/raven/tslint.json index 377cc837d4..a205530b58 100644 --- a/types/raven/tslint.json +++ b/types/raven/tslint.json @@ -1 +1,6 @@ -{ "extends": "../tslint.json" } +{ + "extends": "../tslint.json", + "rules": { + "export-just-namespace": false + } +} From 1e249a5e4f5dbc83e8e21305c3241be9ab4dabdf Mon Sep 17 00:00:00 2001 From: Scott Cooper Date: Tue, 28 Mar 2017 12:49:34 -0700 Subject: [PATCH 6/7] strict null checks and remove namespace export --- types/raven/index.d.ts | 1 - types/raven/tsconfig.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/types/raven/index.d.ts b/types/raven/index.d.ts index 6b6e1c2035..70b8424171 100644 --- a/types/raven/index.d.ts +++ b/types/raven/index.d.ts @@ -97,4 +97,3 @@ declare namespace Raven { } export = Raven; -export as namespace Raven; diff --git a/types/raven/tsconfig.json b/types/raven/tsconfig.json index b631d91430..dd41de9142 100644 --- a/types/raven/tsconfig.json +++ b/types/raven/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" From 9fd84499592b08d19de2f42c0061b2235e6ac441 Mon Sep 17 00:00:00 2001 From: Scott Cooper Date: Tue, 28 Mar 2017 13:16:19 -0700 Subject: [PATCH 7/7] flatten exports --- types/raven/index.d.ts | 167 ++++++++++++++++++------------------- types/raven/raven-tests.ts | 1 + 2 files changed, 83 insertions(+), 85 deletions(-) diff --git a/types/raven/index.d.ts b/types/raven/index.d.ts index 70b8424171..2d9da8ccaf 100644 --- a/types/raven/index.d.ts +++ b/types/raven/index.d.ts @@ -8,92 +8,89 @@ import { IncomingMessage, ServerResponse } from 'http'; import { EventEmitter } from 'events'; -declare namespace Raven { - const version: string; - function config(dsn: string | false, options?: ConstructorOptions): Client; - function wrap(func: () => void, onErr?: () => void): () => void; - function wrap(options: any, func: () => void, onErr?: () => void): () => void; - function interceptErr(ctx: any): Client; - function setContext(ctx: any): Client; - function captureException(e: Error, cb?: CaptureCallback): Client; - function captureException(e: Error, options?: CaptureOptions, cb?: CaptureCallback): Client; - function mergeContext(ctx: any): Client; - function getContext(): any; - function errorHandler(): (e: Error, req: IncomingMessage, res: ServerResponse, next: () => void) => void; - function context(ctx: any, func: () => void, onErr?: () => void): Client; - function context(func: () => void, onErr?: () => void): Client; - function captureBreadcrumb(breadcrumb: any): void; - function disableConsoleAlerts(): void; - function consoleAlert(msg: string): void; - function parseDSN(dsn: string | false): parsedDSN; - 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; - requestHandler(): (req: IncomingMessage, res: ServerResponse, next: () => void) => void; - errorHandler(): (e: Error, req: IncomingMessage, res: ServerResponse, next: () => void) => void; - captureException(error: Error, cb?: CaptureCallback): void; - captureException(error: Error, options?: CaptureOptions, cb?: CaptureCallback): void; - captureMessage(message: string, cb?: CaptureCallback): void; - captureMessage(message: string, options?: CaptureOptions, cb?: CaptureCallback): void; - captureBreadcrumb(breadcrumb: any): void; - setUserContext(data: UserData): void; - setDataCallback(fn: DataCallback): void; - context(ctx: any, func: () => void, onErr?: () => void): Client; - context(func: () => void, onErr?: () => void): Client; - process(kwargs: any, cb?: () => void): void; - process(eventId: string, kwargs: any, cb?: () => void): void; - } +declare const version: string; +declare function config(dsn: string | false, options?: ConstructorOptions): Client; +declare function wrap(func: () => void, onErr?: () => void): () => void; +declare function wrap(options: any, func: () => void, onErr?: () => void): () => void; +declare function interceptErr(ctx: any): Client; +declare function setContext(ctx: any): Client; +declare function captureException(e: Error, cb?: CaptureCallback): Client; +declare function captureException(e: Error, options?: CaptureOptions, cb?: CaptureCallback): Client; +declare function mergeContext(ctx: any): Client; +declare function getContext(): any; +declare function errorHandler(): (e: Error, req: IncomingMessage, res: ServerResponse, next: () => void) => void; +declare function context(ctx: any, func: () => void, onErr?: () => void): Client; +declare function context(func: () => void, onErr?: () => void): Client; +declare function captureBreadcrumb(breadcrumb: any): void; +declare function disableConsoleAlerts(): void; +declare function consoleAlert(msg: string): void; +declare function parseDSN(dsn: string | false): parsedDSN; - interface ConstructorOptions { - name?: string; - logger?: string; - release?: string; - environment?: string; - tags?: { string: string }; - extra?: { string: any }; - dataCallback?: DataCallback; - transport?: () => void; - captureUnhandledRejections?: boolean; - autoBreadcrumbs?: boolean | any; - } - - interface UserData { - id: string; - handle?: string; - } - - interface parsedDSN { - protocol: string; - public_key: string; - private_key: string; - host: string; - path: string; - project_id: string; - port: number; - } - - interface CaptureCallback { - (err: { string: any }, eventId: any): void; - } - - interface DataCallback { - (data: { string: any }): void; - } - - interface TransportCallback { - (options: { string: any }): void; - } - - interface CaptureOptions { - tags?: { string: string }; - extra?: { string: any }; - fingerprint?: string; - level?: string; - } +declare 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; + requestHandler(): (req: IncomingMessage, res: ServerResponse, next: () => void) => void; + errorHandler(): (e: Error, req: IncomingMessage, res: ServerResponse, next: () => void) => void; + captureException(error: Error, cb?: CaptureCallback): void; + captureException(error: Error, options?: CaptureOptions, cb?: CaptureCallback): void; + captureMessage(message: string, cb?: CaptureCallback): void; + captureMessage(message: string, options?: CaptureOptions, cb?: CaptureCallback): void; + captureBreadcrumb(breadcrumb: any): void; + setUserContext(data: UserData): void; + setDataCallback(fn: DataCallback): void; + context(ctx: any, func: () => void, onErr?: () => void): Client; + context(func: () => void, onErr?: () => void): Client; + process(kwargs: any, cb?: () => void): void; + process(eventId: string, kwargs: any, cb?: () => void): void; } -export = Raven; +declare interface ConstructorOptions { + name?: string; + logger?: string; + release?: string; + environment?: string; + tags?: { string: string }; + extra?: { string: any }; + dataCallback?: DataCallback; + transport?: () => void; + captureUnhandledRejections?: boolean; + autoBreadcrumbs?: boolean | any; +} + +declare interface UserData { + id: string; + handle?: string; +} + +declare interface parsedDSN { + protocol: string; + public_key: string; + private_key: string; + host: string; + path: string; + project_id: string; + port: number; +} + +declare interface CaptureCallback { + (err: { string: any }, eventId: any): void; +} + +declare interface DataCallback { + (data: { string: any }): void; +} + +declare interface TransportCallback { + (options: { string: any }): void; +} + +declare interface CaptureOptions { + tags?: { string: string }; + extra?: { string: any }; + fingerprint?: string; + level?: string; +} diff --git a/types/raven/raven-tests.ts b/types/raven/raven-tests.ts index d4d5339e07..ae493c0dd8 100644 --- a/types/raven/raven-tests.ts +++ b/types/raven/raven-tests.ts @@ -3,6 +3,7 @@ import * as Raven from 'raven'; const dsn = '___DSN___'; const client = Raven.config(dsn, { autoBreadcrumbs: true }).install(); +console.log(Raven.version); Raven.config(dsn).install({ captureUnhandledRejections: true }); client.setContext({}); client.on('logged', () => { });