-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: Avoid usage of any
#17041
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
base: develop
Are you sure you want to change the base?
feat: Avoid usage of any
#17041
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,5 @@ | |
| * Just an Error object with arbitrary attributes attached to it. | ||
| */ | ||
| export interface ExtendedError extends Error { | ||
| // TODO: fix in v11, convert any to unknown | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| [key: string]: any; | ||
| [key: string]: unknown; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. l: technically this is breaking, too, since we also export the type from Core as well as from |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -83,7 +83,6 @@ export interface EventHint { | |
| syntheticException?: Error | null; | ||
| originalException?: unknown; | ||
| attachments?: Attachment[]; | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| data?: any; | ||
| data?: unknown; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. m: breaking :( |
||
| integrations?: string[]; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import type { Primitive } from '../misc'; | ||
| import type { User } from '../user'; | ||
| import type { FeedbackFormData } from './form'; | ||
| import type { FeedbackTheme } from './theme'; | ||
|
|
||
|
|
@@ -53,8 +54,8 @@ export interface FeedbackGeneralConfiguration { | |
| * The value of the email/name keys represent the properties of your user context. | ||
| */ | ||
| useSentryUser: { | ||
| email: string; | ||
| name: string; | ||
| email: keyof User; | ||
| name: keyof User; | ||
|
Comment on lines
+57
to
+58
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. m: Unfortunately, I'm afraid this is a breaking change, given that previously any string value could be added here. Fully agree that we should type it as |
||
| }; | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,8 +47,7 @@ interface SentryFetchData { | |
| } | ||
|
|
||
| export interface HandlerDataFetch { | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| args: any[]; | ||
| args: unknown[]; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. m: breaking :( |
||
| fetchData: SentryFetchData; // This data is among other things dumped directly onto the fetch breadcrumb data | ||
| startTimestamp: number; | ||
| endTimestamp?: number; | ||
|
|
@@ -75,8 +74,7 @@ export interface HandlerDataDom { | |
|
|
||
| export interface HandlerDataConsole { | ||
| level: ConsoleLevel; | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| args: any[]; | ||
| args: unknown[]; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. m: breaking :( |
||
| } | ||
|
|
||
| export interface HandlerDataHistory { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,9 +4,7 @@ import type { QueryParams } from './request'; | |
| * Data extracted from an incoming request to a node server | ||
| */ | ||
| export interface ExtractedNodeRequestData { | ||
| // TODO: fix in v11, convert any to unknown | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| [key: string]: any; | ||
| [key: string]: unknown; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. m: breaking :( |
||
|
|
||
| /** Specific headers from the request */ | ||
| headers?: { [key: string]: string }; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.