-
Notifications
You must be signed in to change notification settings - Fork 294
Expand file tree
/
Copy pathglobal.d.ts
More file actions
168 lines (164 loc) · 5.12 KB
/
Copy pathglobal.d.ts
File metadata and controls
168 lines (164 loc) · 5.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
interface Window {
_hsq?: any[];
dataLayer?: any[];
gtag?: (...args: any[]) => void;
getCkyConsent?: () => {
activeLaw: string;
categories: Record<string, boolean>;
isUserActionCompleted: boolean;
};
lintrk?: (...args: any[]) => void;
_linkedin_data_partner_ids?: any[];
rdt?: (...args: any[]) => void;
spdt?: (...args: any[]) => void;
twq?: (...args: any[]) => void;
signals?: any[] & {
page: (...args: any[]) => void;
identify: (...args: any[]) => void;
form: (...args: any[]) => void;
};
}
// ---------------------------------------------------------------------------
// fumadocs-mdx collection module declarations
// TypeScript cannot resolve the `?collection=<name>` query-parameter suffix as
// a file path, so dynamic imports like
// import("@/content/docs/foo.mdx?collection=docs")
// fail type-checking even though the Turbopack/webpack loader handles them at
// build time. Declaring a wildcard ambient module for each collection tells
// TypeScript the shape of the default export without suppressing all type-
// checking in the consuming files.
// ---------------------------------------------------------------------------
type _MDXCollectionModule = {
default: import("react").ComponentType<{
components?: Record<string, import("react").ComponentType>;
}>;
};
declare module "*.mdx?collection=docs" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.mdx?collection=blog" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.mdx?collection=changelog" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.mdx?collection=customers" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.mdx?collection=faq" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.mdx?collection=guides" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.mdx?collection=handbook" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.mdx?collection=integrations" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.mdx?collection=library" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.mdx?collection=marketing" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.mdx?collection=security" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.mdx?collection=selfHosting" {
const mod: _MDXCollectionModule;
export = mod;
}
// ---------------------------------------------------------------------------
// fumadocs-mdx .md collection modules (same pattern as .mdx above)
// Some guides/integrations use plain .md extension instead of .mdx
// ---------------------------------------------------------------------------
declare module "*.md?collection=docs" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.md?collection=blog" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.md?collection=changelog" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.md?collection=customers" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.md?collection=faq" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.md?collection=guides" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.md?collection=handbook" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.md?collection=integrations" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.md?collection=library" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.md?collection=marketing" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.md?collection=security" {
const mod: _MDXCollectionModule;
export = mod;
}
declare module "*.md?collection=selfHosting" {
const mod: _MDXCollectionModule;
export = mod;
}
// ---------------------------------------------------------------------------
// @modelcontextprotocol/sdk subpath that TypeScript can't resolve via wildcard
// exports (the package uses "./*" → "./dist/esm/*" but no "types" condition).
// We re-declare only the exports that the project actually uses.
// ---------------------------------------------------------------------------
declare module "@modelcontextprotocol/sdk/client/streamableHttp" {
export class StreamableHTTPError extends Error {
readonly code: number | undefined;
constructor(code: number | undefined, message: string | undefined);
}
export type StreamableHTTPClientTransportOptions = {
authProvider?: unknown;
requestInit?: RequestInit;
sessionId?: string;
};
export class StreamableHTTPClientTransport {
onclose?: () => void;
onerror?: (error: Error) => void;
onmessage?: (message: unknown) => void;
constructor(url: URL, opts?: StreamableHTTPClientTransportOptions);
start(): Promise<void>;
close(): Promise<void>;
send(message: unknown, options?: unknown): Promise<void>;
terminateSession(): Promise<void>;
setProtocolVersion(version: string): void;
get sessionId(): string | undefined;
get protocolVersion(): string | undefined;
}
}