Skip to content

Commit 4d3684f

Browse files
committed
adjust public api a bit
1 parent 4789fed commit 4d3684f

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

dangerfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import tslint from 'danger-plugin-tslint';
66
import { prettyResults } from 'danger-plugin-tslint/dist/prettyResults';
77
import { CLIEngine } from 'eslint';
88

9-
const PACKAGES = ['apm', 'core', 'hub', 'integrations', 'minimal', 'node', 'types', 'utils'];
9+
const PACKAGES = ['apm', 'integrations', 'node', 'utils'];
1010
const EXTENSIONS = ['.js', '.jsx', '.ts', '.tsx'];
1111

1212
/**

packages/core/src/api.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ export class API {
7575
/** Returns the url to the report dialog endpoint. */
7676
public getReportDialogEndpoint(
7777
dialogOptions: {
78-
[key: string]: unknown;
78+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
79+
[key: string]: any;
7980
user?: { name?: string; email?: string };
8081
} = {},
8182
): string {

packages/hub/src/hub.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ export class Hub implements HubInterface {
312312
/**
313313
* @inheritDoc
314314
*/
315-
public setContext(name: string, context: { [key: string]: unknown } | null): void {
315+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
316+
public setContext(name: string, context: { [key: string]: any } | null): void {
316317
const top = this.getStackTop();
317318
if (!top.scope) {
318319
return;

packages/hub/test/hub.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ describe('Hub', () => {
194194
const hub = new Hub();
195195
const spy = jest.spyOn(hub as any, '_invokeClient');
196196
hub.captureException('a');
197-
// @ts-ignore Says mock object is type unknown, so can't access event_id
197+
// @ts-ignore Says mock object is type unknown
198198
expect(spy.mock.calls[0][2].event_id).toBeTruthy();
199199
});
200200

@@ -203,11 +203,11 @@ describe('Hub', () => {
203203
const spy = jest.spyOn(hub as any, '_invokeClient');
204204
const ex = new Error('foo');
205205
hub.captureException(ex);
206-
// @ts-ignore Says mock object is type unknown, so can't access event_id
206+
// @ts-ignore Says mock object is type unknown
207207
expect(spy.mock.calls[0][2].originalException).toBe(ex);
208-
// @ts-ignore Says mock object is type unknown, so can't access event_id
208+
// @ts-ignore Says mock object is type unknown
209209
expect(spy.mock.calls[0][2].syntheticException).toBeInstanceOf(Error);
210-
// @ts-ignore Says mock object is type unknown, so can't access event_id
210+
// @ts-ignore Says mock object is type unknown
211211
expect(spy.mock.calls[0][2].syntheticException.message).toBe('Sentry syntheticException');
212212
});
213213
});

0 commit comments

Comments
 (0)