44 lines
1.3 KiB
TypeScript
44 lines
1.3 KiB
TypeScript
// Fallback ambient types for `@sentry/nextjs`.
|
|
//
|
|
// In case the editor/TS server fails to pick up the package's bundled types
|
|
// (common in some TS + moduleResolution combinations), this keeps the repo
|
|
// type-safe enough to build.
|
|
//
|
|
// If your tooling resolves the official types correctly, this file is still
|
|
// compatible (it just provides broad typings).
|
|
declare module '@sentry/nextjs' {
|
|
export type SeverityLevel =
|
|
| 'fatal'
|
|
| 'error'
|
|
| 'warning'
|
|
| 'info'
|
|
| 'debug'
|
|
| 'log';
|
|
|
|
export type User = {
|
|
id?: string;
|
|
email?: string;
|
|
username?: string;
|
|
};
|
|
|
|
export function init(options: any): void;
|
|
export function captureException(exception: any, captureContext?: any): any;
|
|
export function captureMessage(message: string, level?: SeverityLevel): any;
|
|
export function setUser(user: User | null): void;
|
|
export function setTag(key: string, value: string): void;
|
|
export function withScope<T>(callback: (scope: any) => T): T;
|
|
|
|
export const captureRequestError: (...args: any[]) => any;
|
|
export const captureRouterTransitionStart: (...args: any[]) => any;
|
|
|
|
export function replayIntegration(...args: any[]): any;
|
|
export function feedbackIntegration(...args: any[]): any;
|
|
|
|
export function withSentryConfig(
|
|
nextConfig: any,
|
|
sentryWebpackPluginOptions?: any,
|
|
sentryBuildOptions?: any
|
|
): any;
|
|
}
|
|
|