This commit is contained in:
22
types/redis.d.ts
vendored
Normal file
22
types/redis.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
// Fallback ambient types for `redis`.
|
||||
//
|
||||
// The official `redis` package ships its own types. In some editor setups
|
||||
// (especially with newer TS + `moduleResolution: bundler`) the TS server may
|
||||
// temporarily fail to resolve them. This keeps the project compiling.
|
||||
declare module 'redis' {
|
||||
export type RedisClientType = {
|
||||
connect(): Promise<void>;
|
||||
get(key: string): Promise<string | null>;
|
||||
set(
|
||||
key: string,
|
||||
value: string,
|
||||
options?: {
|
||||
EX?: number;
|
||||
}
|
||||
): Promise<unknown>;
|
||||
del(key: string): Promise<number>;
|
||||
};
|
||||
|
||||
export function createClient(options: { url: string }): RedisClientType;
|
||||
}
|
||||
|
||||
43
types/sentry-nextjs.d.ts
vendored
Normal file
43
types/sentry-nextjs.d.ts
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
// 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user