Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update TypeScript language file for setDataCallback/setShouldSendCall…
…back
  • Loading branch information
benvinegar committed Jul 5, 2016
commit 65dd8e750bbd46549343a5e5ae21f4e1e229db1b
5 changes: 5 additions & 0 deletions typescript/raven-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,8 @@ Raven.setUserContext({

Raven.captureMessage('Broken!');
Raven.captureMessage('Broken!', {tags: { key: "value" }});

Raven.setDataCallback(function (data) {});
Raven.setDataCallback(function (data, original) {});
Raven.setShouldSendCallback(function (data) {});
Raven.setShouldSendCallback(function (data, original) {});
6 changes: 6 additions & 0 deletions typescript/raven.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ export interface RavenStatic {

/** If you need to conditionally check if raven needs to be initialized or not, you can use the isSetup function. It will return true if Raven is already initialized. */
isSetup(): boolean;

/** Specify a function that allows mutation of the data payload right before being sent to Sentry. */
setDataCallback(data: any, orig?: any): RavenStatic;

/** Specify a callback function that allows you to apply your own filters to determine if the message should be sent to Sentry. */
setShouldSendCallback(data: any, orig?: any): RavenStatic;
}

interface RavenTransportOptions {
Expand Down