Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: Remove all usages of ts-ignore #8974

Merged
merged 7 commits into from
Sep 8, 2023
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
2 changes: 1 addition & 1 deletion packages/angular/test/errorhandler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ describe('SentryErrorHandler', () => {
}),
};

// @ts-ignore this is a minmal hub, we're missing a few props but that's ok
// @ts-expect-error this is a minmal hub, we're missing a few props but that's ok
jest.spyOn(SentryBrowser, 'getCurrentHub').mockImplementationOnce(() => {
return { getClient: () => client };
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ sentryTest(
expect(
await page.evaluate(() => {
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof Replay> }).Replay;
// @ts-ignore private
// @ts-expect-error private
const replay = replayIntegration._replay;
replayIntegration.startBuffering();
return replay.isEnabled();
Expand Down Expand Up @@ -210,7 +210,7 @@ sentryTest(
expect(
await page.evaluate(() => {
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof Replay> }).Replay;
// @ts-ignore private
// @ts-expect-error private
const replay = replayIntegration._replay;
replayIntegration.startBuffering();
return replay.isEnabled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sentryTest('captures text request body', async ({ getLocalTestPath, page, browse
method: 'POST',
body: 'input body',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -120,7 +120,7 @@ sentryTest('captures JSON request body', async ({ getLocalTestPath, page, browse
method: 'POST',
body: '{"foo":"bar"}',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -203,7 +203,7 @@ sentryTest('captures non-text request body', async ({ getLocalTestPath, page, br
method: 'POST',
body: body,
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -282,7 +282,7 @@ sentryTest('captures text request body when matching relative URL', async ({ get
method: 'POST',
body: 'input body',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -359,7 +359,7 @@ sentryTest('does not capture request body when URL does not match', async ({ get
method: 'POST',
body: 'input body',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ sentryTest('handles empty/missing request headers', async ({ getLocalTestPath, p
fetch('http://localhost:7654/foo', {
method: 'POST',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -117,7 +117,7 @@ sentryTest('captures request headers as POJO', async ({ getLocalTestPath, page,
'X-Test-Header': 'test-value',
},
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -201,7 +201,7 @@ sentryTest('captures request headers on Request', async ({ getLocalTestPath, pag
});
/* eslint-disable */
fetch(request).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -284,7 +284,7 @@ sentryTest('captures request headers as Headers instance', async ({ getLocalTest
method: 'POST',
headers,
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -367,7 +367,7 @@ sentryTest('does not captures request headers if URL does not match', async ({ g
'X-Test-Header': 'test-value',
},
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sentryTest('captures request body size when body is sent', async ({ getLocalTest
method: 'POST',
body: '{"foo":"bar"}',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -125,7 +125,7 @@ sentryTest('captures request size from non-text request body', async ({ getLocal
method: 'POST',
body: blob,
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sentryTest('captures text response body', async ({ getLocalTestPath, page, brows
fetch('http://localhost:7654/foo', {
method: 'POST',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -122,7 +122,7 @@ sentryTest('captures JSON response body', async ({ getLocalTestPath, page, brows
fetch('http://localhost:7654/foo', {
method: 'POST',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -203,7 +203,7 @@ sentryTest('captures non-text response body', async ({ getLocalTestPath, page, b
fetch('http://localhost:7654/foo', {
method: 'POST',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -282,7 +282,7 @@ sentryTest('does not capture response body when URL does not match', async ({ ge
fetch('http://localhost:7654/bar', {
method: 'POST',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ sentryTest('handles empty headers', async ({ getLocalTestPath, page, browserName
await page.evaluate(() => {
/* eslint-disable */
fetch('http://localhost:7654/foo').then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -113,7 +113,7 @@ sentryTest('captures response headers', async ({ getLocalTestPath, page }) => {
await page.evaluate(() => {
/* eslint-disable */
fetch('http://localhost:7654/foo').then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -194,7 +194,7 @@ sentryTest('does not capture response headers if URL does not match', async ({ g
await page.evaluate(() => {
/* eslint-disable */
fetch('http://localhost:7654/bar').then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ sentryTest('captures response size from Content-Length header if available', asy
await page.evaluate(() => {
/* eslint-disable */
fetch('http://localhost:7654/foo').then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -131,7 +131,7 @@ sentryTest('captures response size without Content-Length header', async ({ getL
await page.evaluate(() => {
/* eslint-disable */
fetch('http://localhost:7654/foo').then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -218,7 +218,7 @@ sentryTest('captures response size from non-text response body', async ({ getLoc
fetch('http://localhost:7654/foo', {
method: 'POST',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ sentryTest('captures text request body', async ({ getLocalTestPath, page, browse

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down Expand Up @@ -124,7 +124,7 @@ sentryTest('captures JSON request body', async ({ getLocalTestPath, page, browse

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down Expand Up @@ -209,7 +209,7 @@ sentryTest('captures non-text request body', async ({ getLocalTestPath, page, br

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down Expand Up @@ -290,7 +290,7 @@ sentryTest('captures text request body when matching relative URL', async ({ get

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down Expand Up @@ -371,7 +371,7 @@ sentryTest('does not capture request body when URL does not match', async ({ get

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sentryTest('captures request headers', async ({ getLocalTestPath, page, browserN

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down Expand Up @@ -135,7 +135,7 @@ sentryTest(

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ sentryTest('captures request body size when body is sent', async ({ getLocalTest

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down Expand Up @@ -134,7 +134,7 @@ sentryTest('captures request size from non-text request body', async ({ getLocal

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sentryTest('captures text response body', async ({ getLocalTestPath, page, brows

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down Expand Up @@ -132,7 +132,7 @@ sentryTest('captures JSON response body', async ({ getLocalTestPath, page, brows

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down Expand Up @@ -217,7 +217,7 @@ sentryTest('captures non-text response body', async ({ getLocalTestPath, page, b

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down Expand Up @@ -304,7 +304,7 @@ sentryTest(

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ sentryTest('captures response headers', async ({ getLocalTestPath, page, browser

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down Expand Up @@ -141,7 +141,7 @@ sentryTest(

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ sentryTest(

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down Expand Up @@ -144,7 +144,7 @@ sentryTest('captures response size without Content-Length header', async ({ getL

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down Expand Up @@ -237,7 +237,7 @@ sentryTest('captures response size for non-string bodies', async ({ getLocalTest

xhr.addEventListener('readystatechange', function () {
if (xhr.readyState === 4) {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
setTimeout(() => Sentry.captureException('test error', 0));
}
});
Expand Down
Loading