@sanity/cli-build 0.0.0-20260610102421 → 0.0.0-20260610123958
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_exports/_internal/build.d.ts +2 -2223
- package/dist/actions/build/buildVendorDependencies.js +42 -12
- package/dist/actions/build/buildVendorDependencies.js.map +1 -1
- package/dist/actions/build/createExternalFromImportMap.js +2 -2
- package/dist/actions/build/createExternalFromImportMap.js.map +1 -1
- package/dist/actions/build/getCjsNamedExports.js +39 -0
- package/dist/actions/build/getCjsNamedExports.js.map +1 -0
- package/dist/actions/build/getEntryModule.js +1 -1
- package/dist/actions/build/getEntryModule.js.map +1 -1
- package/dist/actions/build/getViteConfig.js +31 -23
- package/dist/actions/build/getViteConfig.js.map +1 -1
- package/dist/actions/build/vite/injectNamedExports.js +96 -0
- package/dist/actions/build/vite/injectNamedExports.js.map +1 -0
- package/dist/actions/build/vite/plugin-sanity-vendor-named-exports.js +53 -0
- package/dist/actions/build/vite/plugin-sanity-vendor-named-exports.js.map +1 -0
- package/dist/actions/build/writeSanityRuntime.js.map +1 -1
- package/dist/telemetry/extractSchema.telemetry.js +1 -1
- package/dist/telemetry/extractSchema.telemetry.js.map +1 -1
- package/package.json +34 -22
|
@@ -5,119 +5,11 @@ import { DefinedTelemetryTrace } from "@sanity/telemetry";
|
|
|
5
5
|
import { FSWatcher } from "chokidar";
|
|
6
6
|
import { InlineConfig } from "vite";
|
|
7
7
|
import { InterfaceArtifact } from "@sanity/federation/vite";
|
|
8
|
-
import { NodePath } from "@babel/core";
|
|
9
|
-
import { NodePath as NodePath_2 } from "@babel/traverse";
|
|
10
8
|
import { Output } from "@sanity/cli-core";
|
|
11
9
|
import { Plugin as Plugin_2 } from "vite";
|
|
12
|
-
import {
|
|
10
|
+
import { PluginOptions } from "babel-plugin-react-compiler";
|
|
13
11
|
import { ServiceArtifact } from "@sanity/federation/vite";
|
|
14
|
-
import * as t from "@babel/types";
|
|
15
12
|
import { UserViteConfig } from "@sanity/cli-core";
|
|
16
|
-
import { z } from "zod";
|
|
17
|
-
|
|
18
|
-
declare type AliasingEffect =
|
|
19
|
-
| {
|
|
20
|
-
kind: "Freeze";
|
|
21
|
-
value: Place;
|
|
22
|
-
reason: ValueReason;
|
|
23
|
-
}
|
|
24
|
-
| {
|
|
25
|
-
kind: "Mutate";
|
|
26
|
-
value: Place;
|
|
27
|
-
reason?: MutationReason | null;
|
|
28
|
-
}
|
|
29
|
-
| {
|
|
30
|
-
kind: "MutateConditionally";
|
|
31
|
-
value: Place;
|
|
32
|
-
}
|
|
33
|
-
| {
|
|
34
|
-
kind: "MutateTransitive";
|
|
35
|
-
value: Place;
|
|
36
|
-
}
|
|
37
|
-
| {
|
|
38
|
-
kind: "MutateTransitiveConditionally";
|
|
39
|
-
value: Place;
|
|
40
|
-
}
|
|
41
|
-
| {
|
|
42
|
-
kind: "Capture";
|
|
43
|
-
from: Place;
|
|
44
|
-
into: Place;
|
|
45
|
-
}
|
|
46
|
-
| {
|
|
47
|
-
kind: "Alias";
|
|
48
|
-
from: Place;
|
|
49
|
-
into: Place;
|
|
50
|
-
}
|
|
51
|
-
| {
|
|
52
|
-
kind: "MaybeAlias";
|
|
53
|
-
from: Place;
|
|
54
|
-
into: Place;
|
|
55
|
-
}
|
|
56
|
-
| {
|
|
57
|
-
kind: "Assign";
|
|
58
|
-
from: Place;
|
|
59
|
-
into: Place;
|
|
60
|
-
}
|
|
61
|
-
| {
|
|
62
|
-
kind: "Create";
|
|
63
|
-
into: Place;
|
|
64
|
-
value: ValueKind;
|
|
65
|
-
reason: ValueReason;
|
|
66
|
-
}
|
|
67
|
-
| {
|
|
68
|
-
kind: "CreateFrom";
|
|
69
|
-
from: Place;
|
|
70
|
-
into: Place;
|
|
71
|
-
}
|
|
72
|
-
| {
|
|
73
|
-
kind: "ImmutableCapture";
|
|
74
|
-
from: Place;
|
|
75
|
-
into: Place;
|
|
76
|
-
}
|
|
77
|
-
| {
|
|
78
|
-
kind: "Apply";
|
|
79
|
-
receiver: Place;
|
|
80
|
-
function: Place;
|
|
81
|
-
mutatesFunction: boolean;
|
|
82
|
-
args: Array<Place | SpreadPattern | Hole>;
|
|
83
|
-
into: Place;
|
|
84
|
-
signature: FunctionSignature | null;
|
|
85
|
-
loc: SourceLocation;
|
|
86
|
-
}
|
|
87
|
-
| {
|
|
88
|
-
kind: "CreateFunction";
|
|
89
|
-
captures: Array<Place>;
|
|
90
|
-
function: FunctionExpression | ObjectMethod;
|
|
91
|
-
into: Place;
|
|
92
|
-
}
|
|
93
|
-
| {
|
|
94
|
-
kind: "MutateFrozen";
|
|
95
|
-
place: Place;
|
|
96
|
-
error: CompilerDiagnostic;
|
|
97
|
-
}
|
|
98
|
-
| {
|
|
99
|
-
kind: "MutateGlobal";
|
|
100
|
-
place: Place;
|
|
101
|
-
error: CompilerDiagnostic;
|
|
102
|
-
}
|
|
103
|
-
| {
|
|
104
|
-
kind: "Impure";
|
|
105
|
-
place: Place;
|
|
106
|
-
error: CompilerDiagnostic;
|
|
107
|
-
}
|
|
108
|
-
| {
|
|
109
|
-
kind: "Render";
|
|
110
|
-
place: Place;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
declare type AliasingSignature = {
|
|
114
|
-
receiver: IdentifierId;
|
|
115
|
-
params: Array<IdentifierId>;
|
|
116
|
-
rest: IdentifierId | null;
|
|
117
|
-
returns: IdentifierId;
|
|
118
|
-
effects: Array<AliasingEffect>;
|
|
119
|
-
temporaries: Array<Place>;
|
|
120
|
-
};
|
|
121
13
|
|
|
122
14
|
export declare const AppBuildTrace: DefinedTelemetryTrace<
|
|
123
15
|
{
|
|
@@ -126,59 +18,6 @@ export declare const AppBuildTrace: DefinedTelemetryTrace<
|
|
|
126
18
|
void
|
|
127
19
|
>;
|
|
128
20
|
|
|
129
|
-
declare type ArrayExpression = {
|
|
130
|
-
kind: "ArrayExpression";
|
|
131
|
-
elements: Array<Place | SpreadPattern | Hole>;
|
|
132
|
-
loc: SourceLocation;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
declare type ArrayPattern = {
|
|
136
|
-
kind: "ArrayPattern";
|
|
137
|
-
items: Array<Place | SpreadPattern | Hole>;
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
declare type AutoDepsDecorationsEvent = {
|
|
141
|
-
kind: "AutoDepsDecorations";
|
|
142
|
-
fnLoc: t.SourceLocation;
|
|
143
|
-
decorations: Array<t.SourceLocation>;
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
declare type AutoDepsEligibleEvent = {
|
|
147
|
-
kind: "AutoDepsEligible";
|
|
148
|
-
fnLoc: t.SourceLocation;
|
|
149
|
-
depArrayLoc: t.SourceLocation;
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
declare type BabelFn =
|
|
153
|
-
| NodePath<t.FunctionDeclaration>
|
|
154
|
-
| NodePath<t.FunctionExpression>
|
|
155
|
-
| NodePath<t.ArrowFunctionExpression>;
|
|
156
|
-
|
|
157
|
-
declare type BasicBlock = {
|
|
158
|
-
kind: BlockKind;
|
|
159
|
-
id: BlockId;
|
|
160
|
-
instructions: Array<Instruction>;
|
|
161
|
-
terminal: Terminal;
|
|
162
|
-
preds: Set<BlockId>;
|
|
163
|
-
phis: Set<Phi>;
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
declare type BlockId = number & {
|
|
167
|
-
[opaqueBlockId]: "BlockId";
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
declare type BlockKind = "block" | "value" | "loop" | "sequence" | "catch";
|
|
171
|
-
|
|
172
|
-
declare type BranchTerminal = {
|
|
173
|
-
kind: "branch";
|
|
174
|
-
test: Place;
|
|
175
|
-
consequent: BlockId;
|
|
176
|
-
alternate: BlockId;
|
|
177
|
-
id: InstructionId;
|
|
178
|
-
loc: SourceLocation;
|
|
179
|
-
fallthrough: BlockId;
|
|
180
|
-
};
|
|
181
|
-
|
|
182
21
|
export declare const buildDebug: Debugger;
|
|
183
22
|
|
|
184
23
|
/**
|
|
@@ -192,27 +31,6 @@ export declare function buildVendorDependencies({
|
|
|
192
31
|
outputDir,
|
|
193
32
|
}: VendorBuildOptions): Promise<Record<string, string>>;
|
|
194
33
|
|
|
195
|
-
declare type BuiltinTag = {
|
|
196
|
-
kind: "BuiltinTag";
|
|
197
|
-
name: string;
|
|
198
|
-
loc: SourceLocation;
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
declare type BuiltInType = PrimitiveType | FunctionType | ObjectType;
|
|
202
|
-
|
|
203
|
-
declare type CallExpression = {
|
|
204
|
-
kind: "CallExpression";
|
|
205
|
-
callee: Place;
|
|
206
|
-
args: Array<Place | SpreadPattern>;
|
|
207
|
-
loc: SourceLocation;
|
|
208
|
-
typeArguments?: Array<t.FlowType>;
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
declare type Case = {
|
|
212
|
-
test: Place | null;
|
|
213
|
-
block: BlockId;
|
|
214
|
-
};
|
|
215
|
-
|
|
216
34
|
export declare function checkStudioDependencyVersions(
|
|
217
35
|
workDir: string,
|
|
218
36
|
output: Output,
|
|
@@ -223,308 +41,6 @@ export declare function checkStudioDependencyVersions(
|
|
|
223
41
|
},
|
|
224
42
|
): Promise<void>;
|
|
225
43
|
|
|
226
|
-
declare type CodegenFunction = {
|
|
227
|
-
type: "CodegenFunction";
|
|
228
|
-
id: t.Identifier | null;
|
|
229
|
-
nameHint: string | null;
|
|
230
|
-
params: t.FunctionDeclaration["params"];
|
|
231
|
-
body: t.BlockStatement;
|
|
232
|
-
generator: boolean;
|
|
233
|
-
async: boolean;
|
|
234
|
-
loc: SourceLocation;
|
|
235
|
-
memoSlotsUsed: number;
|
|
236
|
-
memoBlocks: number;
|
|
237
|
-
memoValues: number;
|
|
238
|
-
prunedMemoBlocks: number;
|
|
239
|
-
prunedMemoValues: number;
|
|
240
|
-
outlined: Array<{
|
|
241
|
-
fn: CodegenFunction;
|
|
242
|
-
type: ReactFunctionType | null;
|
|
243
|
-
}>;
|
|
244
|
-
hasInferredEffect: boolean;
|
|
245
|
-
inferredEffectLocations: Set<SourceLocation>;
|
|
246
|
-
hasFireRewrite: boolean;
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
declare type CompilationMode = z.infer<typeof CompilationModeSchema>;
|
|
250
|
-
|
|
251
|
-
declare const CompilationModeSchema: z.ZodEnum<{
|
|
252
|
-
syntax: "syntax";
|
|
253
|
-
infer: "infer";
|
|
254
|
-
annotation: "annotation";
|
|
255
|
-
all: "all";
|
|
256
|
-
}>;
|
|
257
|
-
|
|
258
|
-
declare type CompileDiagnosticEvent = {
|
|
259
|
-
kind: "CompileDiagnostic";
|
|
260
|
-
fnLoc: t.SourceLocation | null;
|
|
261
|
-
detail: Omit<Omit<CompilerErrorDetailOptions, "severity">, "suggestions">;
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
declare type CompileErrorEvent = {
|
|
265
|
-
kind: "CompileError";
|
|
266
|
-
fnLoc: t.SourceLocation | null;
|
|
267
|
-
detail: CompilerErrorDetail | CompilerDiagnostic;
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
declare class CompilerDiagnostic {
|
|
271
|
-
options: CompilerDiagnosticOptions;
|
|
272
|
-
constructor(options: CompilerDiagnosticOptions);
|
|
273
|
-
static create(
|
|
274
|
-
options: Omit<CompilerDiagnosticOptions, "details">,
|
|
275
|
-
): CompilerDiagnostic;
|
|
276
|
-
get reason(): CompilerDiagnosticOptions["reason"];
|
|
277
|
-
get description(): CompilerDiagnosticOptions["description"];
|
|
278
|
-
get severity(): ErrorSeverity;
|
|
279
|
-
get suggestions(): CompilerDiagnosticOptions["suggestions"];
|
|
280
|
-
get category(): ErrorCategory;
|
|
281
|
-
withDetails(...details: Array<CompilerDiagnosticDetail>): CompilerDiagnostic;
|
|
282
|
-
primaryLocation(): SourceLocation | null;
|
|
283
|
-
printErrorMessage(source: string, options: PrintErrorMessageOptions): string;
|
|
284
|
-
toString(): string;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
declare type CompilerDiagnosticDetail =
|
|
288
|
-
| {
|
|
289
|
-
kind: "error";
|
|
290
|
-
loc: SourceLocation | null;
|
|
291
|
-
message: string | null;
|
|
292
|
-
}
|
|
293
|
-
| {
|
|
294
|
-
kind: "hint";
|
|
295
|
-
message: string;
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
declare type CompilerDiagnosticOptions = {
|
|
299
|
-
category: ErrorCategory;
|
|
300
|
-
reason: string;
|
|
301
|
-
description: string | null;
|
|
302
|
-
details: Array<CompilerDiagnosticDetail>;
|
|
303
|
-
suggestions?: Array<CompilerSuggestion> | null | undefined;
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
declare class CompilerError extends Error {
|
|
307
|
-
details: Array<CompilerErrorDetail | CompilerDiagnostic>;
|
|
308
|
-
disabledDetails: Array<CompilerErrorDetail | CompilerDiagnostic>;
|
|
309
|
-
printedMessage: string | null;
|
|
310
|
-
static invariant(
|
|
311
|
-
condition: unknown,
|
|
312
|
-
options: Omit<CompilerDiagnosticOptions, "category">,
|
|
313
|
-
): asserts condition;
|
|
314
|
-
static throwDiagnostic(options: CompilerDiagnosticOptions): never;
|
|
315
|
-
static throwTodo(
|
|
316
|
-
options: Omit<CompilerErrorDetailOptions, "category">,
|
|
317
|
-
): never;
|
|
318
|
-
static throwInvalidJS(
|
|
319
|
-
options: Omit<CompilerErrorDetailOptions, "category">,
|
|
320
|
-
): never;
|
|
321
|
-
static throwInvalidReact(options: CompilerErrorDetailOptions): never;
|
|
322
|
-
static throwInvalidConfig(
|
|
323
|
-
options: Omit<CompilerErrorDetailOptions, "category">,
|
|
324
|
-
): never;
|
|
325
|
-
static throw(options: CompilerErrorDetailOptions): never;
|
|
326
|
-
constructor(...args: Array<any>);
|
|
327
|
-
get message(): string;
|
|
328
|
-
set message(_message: string);
|
|
329
|
-
toString(): string;
|
|
330
|
-
withPrintedMessage(
|
|
331
|
-
source: string,
|
|
332
|
-
options: PrintErrorMessageOptions,
|
|
333
|
-
): CompilerError;
|
|
334
|
-
printErrorMessage(source: string, options: PrintErrorMessageOptions): string;
|
|
335
|
-
merge(other: CompilerError): void;
|
|
336
|
-
pushDiagnostic(diagnostic: CompilerDiagnostic): void;
|
|
337
|
-
push(options: CompilerErrorDetailOptions): CompilerErrorDetail;
|
|
338
|
-
pushErrorDetail(detail: CompilerErrorDetail): CompilerErrorDetail;
|
|
339
|
-
hasAnyErrors(): boolean;
|
|
340
|
-
asResult(): Result<void, CompilerError>;
|
|
341
|
-
hasErrors(): boolean;
|
|
342
|
-
hasWarning(): boolean;
|
|
343
|
-
hasHints(): boolean;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
declare class CompilerErrorDetail {
|
|
347
|
-
options: CompilerErrorDetailOptions;
|
|
348
|
-
constructor(options: CompilerErrorDetailOptions);
|
|
349
|
-
get reason(): CompilerErrorDetailOptions["reason"];
|
|
350
|
-
get description(): CompilerErrorDetailOptions["description"];
|
|
351
|
-
get severity(): ErrorSeverity;
|
|
352
|
-
get loc(): CompilerErrorDetailOptions["loc"];
|
|
353
|
-
get suggestions(): CompilerErrorDetailOptions["suggestions"];
|
|
354
|
-
get category(): ErrorCategory;
|
|
355
|
-
primaryLocation(): SourceLocation | null;
|
|
356
|
-
printErrorMessage(source: string, options: PrintErrorMessageOptions): string;
|
|
357
|
-
toString(): string;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
declare type CompilerErrorDetailOptions = {
|
|
361
|
-
category: ErrorCategory;
|
|
362
|
-
reason: string;
|
|
363
|
-
description?: string | null | undefined;
|
|
364
|
-
loc: SourceLocation | null;
|
|
365
|
-
suggestions?: Array<CompilerSuggestion> | null | undefined;
|
|
366
|
-
};
|
|
367
|
-
|
|
368
|
-
declare type CompilerMode = "all_features" | "no_inferred_memo";
|
|
369
|
-
|
|
370
|
-
declare type CompilerPipelineValue =
|
|
371
|
-
| {
|
|
372
|
-
kind: "ast";
|
|
373
|
-
name: string;
|
|
374
|
-
value: CodegenFunction;
|
|
375
|
-
}
|
|
376
|
-
| {
|
|
377
|
-
kind: "hir";
|
|
378
|
-
name: string;
|
|
379
|
-
value: HIRFunction;
|
|
380
|
-
}
|
|
381
|
-
| {
|
|
382
|
-
kind: "reactive";
|
|
383
|
-
name: string;
|
|
384
|
-
value: ReactiveFunction;
|
|
385
|
-
}
|
|
386
|
-
| {
|
|
387
|
-
kind: "debug";
|
|
388
|
-
name: string;
|
|
389
|
-
value: string;
|
|
390
|
-
};
|
|
391
|
-
|
|
392
|
-
declare type CompilerReactTarget = z.infer<typeof CompilerReactTargetSchema>;
|
|
393
|
-
|
|
394
|
-
declare const CompilerReactTargetSchema: z.ZodUnion<
|
|
395
|
-
readonly [
|
|
396
|
-
z.ZodLiteral<"17">,
|
|
397
|
-
z.ZodLiteral<"18">,
|
|
398
|
-
z.ZodLiteral<"19">,
|
|
399
|
-
z.ZodObject<
|
|
400
|
-
{
|
|
401
|
-
kind: z.ZodLiteral<"donotuse_meta_internal">;
|
|
402
|
-
runtimeModule: z.ZodDefault<z.ZodString>;
|
|
403
|
-
},
|
|
404
|
-
z.core.$strip
|
|
405
|
-
>,
|
|
406
|
-
]
|
|
407
|
-
>;
|
|
408
|
-
|
|
409
|
-
declare type CompilerSuggestion =
|
|
410
|
-
| {
|
|
411
|
-
op:
|
|
412
|
-
| CompilerSuggestionOperation.InsertAfter
|
|
413
|
-
| CompilerSuggestionOperation.InsertBefore
|
|
414
|
-
| CompilerSuggestionOperation.Replace;
|
|
415
|
-
range: [number, number];
|
|
416
|
-
description: string;
|
|
417
|
-
text: string;
|
|
418
|
-
}
|
|
419
|
-
| {
|
|
420
|
-
op: CompilerSuggestionOperation.Remove;
|
|
421
|
-
range: [number, number];
|
|
422
|
-
description: string;
|
|
423
|
-
};
|
|
424
|
-
|
|
425
|
-
declare enum CompilerSuggestionOperation {
|
|
426
|
-
InsertBefore = 0,
|
|
427
|
-
InsertAfter = 1,
|
|
428
|
-
Remove = 2,
|
|
429
|
-
Replace = 3,
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
declare type CompileSkipEvent = {
|
|
433
|
-
kind: "CompileSkip";
|
|
434
|
-
fnLoc: t.SourceLocation | null;
|
|
435
|
-
reason: string;
|
|
436
|
-
loc: t.SourceLocation | null;
|
|
437
|
-
};
|
|
438
|
-
|
|
439
|
-
declare type CompileSuccessEvent = {
|
|
440
|
-
kind: "CompileSuccess";
|
|
441
|
-
fnLoc: t.SourceLocation | null;
|
|
442
|
-
fnName: string | null;
|
|
443
|
-
memoSlots: number;
|
|
444
|
-
memoBlocks: number;
|
|
445
|
-
memoValues: number;
|
|
446
|
-
prunedMemoBlocks: number;
|
|
447
|
-
prunedMemoValues: number;
|
|
448
|
-
};
|
|
449
|
-
|
|
450
|
-
declare type ComponentType<T> = {
|
|
451
|
-
kind: "Component";
|
|
452
|
-
props: Map<string, T>;
|
|
453
|
-
children: null | T;
|
|
454
|
-
};
|
|
455
|
-
|
|
456
|
-
declare type ConcreteType<T> =
|
|
457
|
-
| {
|
|
458
|
-
kind: "Enum";
|
|
459
|
-
}
|
|
460
|
-
| {
|
|
461
|
-
kind: "Mixed";
|
|
462
|
-
}
|
|
463
|
-
| {
|
|
464
|
-
kind: "Number";
|
|
465
|
-
}
|
|
466
|
-
| {
|
|
467
|
-
kind: "String";
|
|
468
|
-
}
|
|
469
|
-
| {
|
|
470
|
-
kind: "Boolean";
|
|
471
|
-
}
|
|
472
|
-
| {
|
|
473
|
-
kind: "Void";
|
|
474
|
-
}
|
|
475
|
-
| {
|
|
476
|
-
kind: "Nullable";
|
|
477
|
-
type: T;
|
|
478
|
-
}
|
|
479
|
-
| {
|
|
480
|
-
kind: "Array";
|
|
481
|
-
element: T;
|
|
482
|
-
}
|
|
483
|
-
| {
|
|
484
|
-
kind: "Set";
|
|
485
|
-
element: T;
|
|
486
|
-
}
|
|
487
|
-
| {
|
|
488
|
-
kind: "Map";
|
|
489
|
-
key: T;
|
|
490
|
-
value: T;
|
|
491
|
-
}
|
|
492
|
-
| {
|
|
493
|
-
kind: "Function";
|
|
494
|
-
typeParameters: null | Array<TypeParameter<T>>;
|
|
495
|
-
params: Array<T>;
|
|
496
|
-
returnType: T;
|
|
497
|
-
}
|
|
498
|
-
| ComponentType<T>
|
|
499
|
-
| {
|
|
500
|
-
kind: "Generic";
|
|
501
|
-
id: TypeParameterId;
|
|
502
|
-
bound: T;
|
|
503
|
-
}
|
|
504
|
-
| {
|
|
505
|
-
kind: "Object";
|
|
506
|
-
id: NominalId;
|
|
507
|
-
members: Map<string, ResolvedType>;
|
|
508
|
-
}
|
|
509
|
-
| {
|
|
510
|
-
kind: "Tuple";
|
|
511
|
-
id: NominalId;
|
|
512
|
-
members: Array<T>;
|
|
513
|
-
}
|
|
514
|
-
| {
|
|
515
|
-
kind: "Structural";
|
|
516
|
-
id: LinearId;
|
|
517
|
-
}
|
|
518
|
-
| {
|
|
519
|
-
kind: "Union";
|
|
520
|
-
members: Array<T>;
|
|
521
|
-
}
|
|
522
|
-
| {
|
|
523
|
-
kind: "Instance";
|
|
524
|
-
name: string;
|
|
525
|
-
members: Map<string, ResolvedType>;
|
|
526
|
-
};
|
|
527
|
-
|
|
528
44
|
/**
|
|
529
45
|
* Copies a directory from one location to another
|
|
530
46
|
*
|
|
@@ -540,387 +56,6 @@ export declare function copyDir(
|
|
|
540
56
|
skipExisting?: boolean,
|
|
541
57
|
): Promise<void>;
|
|
542
58
|
|
|
543
|
-
declare type CustomOptOutDirective = z.infer<
|
|
544
|
-
typeof CustomOptOutDirectiveSchema
|
|
545
|
-
>;
|
|
546
|
-
|
|
547
|
-
declare const CustomOptOutDirectiveSchema: z.ZodDefault<
|
|
548
|
-
z.ZodNullable<z.ZodArray<z.ZodString>>
|
|
549
|
-
>;
|
|
550
|
-
|
|
551
|
-
declare type DeclarationId = number & {
|
|
552
|
-
[opageDeclarationId]: "DeclarationId";
|
|
553
|
-
};
|
|
554
|
-
|
|
555
|
-
declare type DependencyPath = Array<DependencyPathEntry>;
|
|
556
|
-
|
|
557
|
-
declare type DependencyPathEntry = {
|
|
558
|
-
property: PropertyLiteral;
|
|
559
|
-
optional: boolean;
|
|
560
|
-
};
|
|
561
|
-
|
|
562
|
-
declare type Destructure = {
|
|
563
|
-
kind: "Destructure";
|
|
564
|
-
lvalue: LValuePattern;
|
|
565
|
-
value: Place;
|
|
566
|
-
loc: SourceLocation;
|
|
567
|
-
};
|
|
568
|
-
|
|
569
|
-
declare type DoWhileTerminal = {
|
|
570
|
-
kind: "do-while";
|
|
571
|
-
loop: BlockId;
|
|
572
|
-
test: BlockId;
|
|
573
|
-
fallthrough: BlockId;
|
|
574
|
-
id: InstructionId;
|
|
575
|
-
loc: SourceLocation;
|
|
576
|
-
};
|
|
577
|
-
|
|
578
|
-
declare type DynamicGatingOptions = z.infer<typeof DynamicGatingOptionsSchema>;
|
|
579
|
-
|
|
580
|
-
declare const DynamicGatingOptionsSchema: z.ZodObject<
|
|
581
|
-
{
|
|
582
|
-
source: z.ZodString;
|
|
583
|
-
},
|
|
584
|
-
z.core.$strip
|
|
585
|
-
>;
|
|
586
|
-
|
|
587
|
-
declare enum Effect {
|
|
588
|
-
Unknown = "<unknown>",
|
|
589
|
-
Freeze = "freeze",
|
|
590
|
-
Read = "read",
|
|
591
|
-
Capture = "capture",
|
|
592
|
-
ConditionallyMutateIterator = "mutate-iterator?",
|
|
593
|
-
ConditionallyMutate = "mutate?",
|
|
594
|
-
Mutate = "mutate",
|
|
595
|
-
Store = "store",
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
declare class Environment {
|
|
599
|
-
#private;
|
|
600
|
-
logger: Logger | null;
|
|
601
|
-
filename: string | null;
|
|
602
|
-
code: string | null;
|
|
603
|
-
config: EnvironmentConfig;
|
|
604
|
-
fnType: ReactFunctionType;
|
|
605
|
-
compilerMode: CompilerMode;
|
|
606
|
-
programContext: ProgramContext;
|
|
607
|
-
hasFireRewrite: boolean;
|
|
608
|
-
hasInferredEffect: boolean;
|
|
609
|
-
inferredEffectLocations: Set<SourceLocation>;
|
|
610
|
-
parentFunction: NodePath_2<t.Function>;
|
|
611
|
-
constructor(
|
|
612
|
-
scope: Scope,
|
|
613
|
-
fnType: ReactFunctionType,
|
|
614
|
-
compilerMode: CompilerMode,
|
|
615
|
-
config: EnvironmentConfig,
|
|
616
|
-
contextIdentifiers: Set<t.Identifier>,
|
|
617
|
-
parentFunction: NodePath_2<t.Function>,
|
|
618
|
-
logger: Logger | null,
|
|
619
|
-
filename: string | null,
|
|
620
|
-
code: string | null,
|
|
621
|
-
programContext: ProgramContext,
|
|
622
|
-
);
|
|
623
|
-
get typeContext(): FlowTypeEnv;
|
|
624
|
-
get isInferredMemoEnabled(): boolean;
|
|
625
|
-
get nextIdentifierId(): IdentifierId;
|
|
626
|
-
get nextBlockId(): BlockId;
|
|
627
|
-
get nextScopeId(): ScopeId;
|
|
628
|
-
get scope(): Scope;
|
|
629
|
-
logErrors(errors: Result<void, CompilerError>): void;
|
|
630
|
-
isContextIdentifier(node: t.Identifier): boolean;
|
|
631
|
-
isHoistedIdentifier(node: t.Identifier): boolean;
|
|
632
|
-
generateGloballyUniqueIdentifierName(
|
|
633
|
-
name: string | null,
|
|
634
|
-
): ValidatedIdentifier;
|
|
635
|
-
outlineFunction(fn: HIRFunction, type: ReactFunctionType | null): void;
|
|
636
|
-
getOutlinedFunctions(): Array<{
|
|
637
|
-
fn: HIRFunction;
|
|
638
|
-
type: ReactFunctionType | null;
|
|
639
|
-
}>;
|
|
640
|
-
getGlobalDeclaration(
|
|
641
|
-
binding: NonLocalBinding,
|
|
642
|
-
loc: SourceLocation,
|
|
643
|
-
): Global_2 | null;
|
|
644
|
-
static knownReactModules: ReadonlyArray<string>;
|
|
645
|
-
getFallthroughPropertyType(
|
|
646
|
-
receiver: Type,
|
|
647
|
-
_property: Type,
|
|
648
|
-
): BuiltInType | PolyType | null;
|
|
649
|
-
getPropertyType(
|
|
650
|
-
receiver: Type,
|
|
651
|
-
property: string | number,
|
|
652
|
-
): BuiltInType | PolyType | null;
|
|
653
|
-
getFunctionSignature(type: FunctionType): FunctionSignature | null;
|
|
654
|
-
addHoistedIdentifier(node: t.Identifier): void;
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
declare type EnvironmentConfig = z.infer<typeof EnvironmentConfigSchema>;
|
|
658
|
-
|
|
659
|
-
declare const EnvironmentConfigSchema: z.ZodObject<
|
|
660
|
-
{
|
|
661
|
-
customHooks: z.ZodDefault<
|
|
662
|
-
z.ZodMap<
|
|
663
|
-
z.ZodString,
|
|
664
|
-
z.ZodObject<
|
|
665
|
-
{
|
|
666
|
-
effectKind: z.ZodEnum<typeof Effect>;
|
|
667
|
-
valueKind: z.ZodEnum<typeof ValueKind>;
|
|
668
|
-
noAlias: z.ZodDefault<z.ZodBoolean>;
|
|
669
|
-
transitiveMixedData: z.ZodDefault<z.ZodBoolean>;
|
|
670
|
-
},
|
|
671
|
-
z.core.$strip
|
|
672
|
-
>
|
|
673
|
-
>
|
|
674
|
-
>;
|
|
675
|
-
moduleTypeProvider: z.ZodDefault<z.ZodNullable<z.ZodAny>>;
|
|
676
|
-
customMacros: z.ZodDefault<
|
|
677
|
-
z.ZodNullable<
|
|
678
|
-
z.ZodArray<
|
|
679
|
-
z.ZodUnion<
|
|
680
|
-
readonly [
|
|
681
|
-
z.ZodString,
|
|
682
|
-
z.ZodTuple<
|
|
683
|
-
[
|
|
684
|
-
z.ZodString,
|
|
685
|
-
z.ZodArray<
|
|
686
|
-
z.ZodUnion<
|
|
687
|
-
readonly [
|
|
688
|
-
z.ZodObject<
|
|
689
|
-
{
|
|
690
|
-
type: z.ZodLiteral<"wildcard">;
|
|
691
|
-
},
|
|
692
|
-
z.core.$strip
|
|
693
|
-
>,
|
|
694
|
-
z.ZodObject<
|
|
695
|
-
{
|
|
696
|
-
type: z.ZodLiteral<"name">;
|
|
697
|
-
name: z.ZodString;
|
|
698
|
-
},
|
|
699
|
-
z.core.$strip
|
|
700
|
-
>,
|
|
701
|
-
]
|
|
702
|
-
>
|
|
703
|
-
>,
|
|
704
|
-
],
|
|
705
|
-
null
|
|
706
|
-
>,
|
|
707
|
-
]
|
|
708
|
-
>
|
|
709
|
-
>
|
|
710
|
-
>
|
|
711
|
-
>;
|
|
712
|
-
enableResetCacheOnSourceFileChanges: z.ZodDefault<
|
|
713
|
-
z.ZodNullable<z.ZodBoolean>
|
|
714
|
-
>;
|
|
715
|
-
enablePreserveExistingMemoizationGuarantees: z.ZodDefault<z.ZodBoolean>;
|
|
716
|
-
validatePreserveExistingMemoizationGuarantees: z.ZodDefault<z.ZodBoolean>;
|
|
717
|
-
enablePreserveExistingManualUseMemo: z.ZodDefault<z.ZodBoolean>;
|
|
718
|
-
enableForest: z.ZodDefault<z.ZodBoolean>;
|
|
719
|
-
enableUseTypeAnnotations: z.ZodDefault<z.ZodBoolean>;
|
|
720
|
-
flowTypeProvider: z.ZodDefault<z.ZodNullable<z.ZodAny>>;
|
|
721
|
-
enableOptionalDependencies: z.ZodDefault<z.ZodBoolean>;
|
|
722
|
-
enableFire: z.ZodDefault<z.ZodBoolean>;
|
|
723
|
-
enableNameAnonymousFunctions: z.ZodDefault<z.ZodBoolean>;
|
|
724
|
-
inferEffectDependencies: z.ZodDefault<
|
|
725
|
-
z.ZodNullable<
|
|
726
|
-
z.ZodArray<
|
|
727
|
-
z.ZodObject<
|
|
728
|
-
{
|
|
729
|
-
function: z.ZodObject<
|
|
730
|
-
{
|
|
731
|
-
source: z.ZodString;
|
|
732
|
-
importSpecifierName: z.ZodString;
|
|
733
|
-
},
|
|
734
|
-
z.core.$strip
|
|
735
|
-
>;
|
|
736
|
-
autodepsIndex: z.ZodNumber;
|
|
737
|
-
},
|
|
738
|
-
z.core.$strip
|
|
739
|
-
>
|
|
740
|
-
>
|
|
741
|
-
>
|
|
742
|
-
>;
|
|
743
|
-
inlineJsxTransform: z.ZodDefault<
|
|
744
|
-
z.ZodNullable<
|
|
745
|
-
z.ZodObject<
|
|
746
|
-
{
|
|
747
|
-
elementSymbol: z.ZodUnion<
|
|
748
|
-
readonly [
|
|
749
|
-
z.ZodLiteral<"react.element">,
|
|
750
|
-
z.ZodLiteral<"react.transitional.element">,
|
|
751
|
-
]
|
|
752
|
-
>;
|
|
753
|
-
globalDevVar: z.ZodString;
|
|
754
|
-
},
|
|
755
|
-
z.core.$strip
|
|
756
|
-
>
|
|
757
|
-
>
|
|
758
|
-
>;
|
|
759
|
-
validateHooksUsage: z.ZodDefault<z.ZodBoolean>;
|
|
760
|
-
validateRefAccessDuringRender: z.ZodDefault<z.ZodBoolean>;
|
|
761
|
-
validateNoSetStateInRender: z.ZodDefault<z.ZodBoolean>;
|
|
762
|
-
validateNoSetStateInEffects: z.ZodDefault<z.ZodBoolean>;
|
|
763
|
-
validateNoDerivedComputationsInEffects: z.ZodDefault<z.ZodBoolean>;
|
|
764
|
-
validateNoJSXInTryStatements: z.ZodDefault<z.ZodBoolean>;
|
|
765
|
-
validateStaticComponents: z.ZodDefault<z.ZodBoolean>;
|
|
766
|
-
validateMemoizedEffectDependencies: z.ZodDefault<z.ZodBoolean>;
|
|
767
|
-
validateNoCapitalizedCalls: z.ZodDefault<
|
|
768
|
-
z.ZodNullable<z.ZodArray<z.ZodString>>
|
|
769
|
-
>;
|
|
770
|
-
validateBlocklistedImports: z.ZodDefault<
|
|
771
|
-
z.ZodNullable<z.ZodArray<z.ZodString>>
|
|
772
|
-
>;
|
|
773
|
-
validateNoImpureFunctionsInRender: z.ZodDefault<z.ZodBoolean>;
|
|
774
|
-
validateNoFreezingKnownMutableFunctions: z.ZodDefault<z.ZodBoolean>;
|
|
775
|
-
enableAssumeHooksFollowRulesOfReact: z.ZodDefault<z.ZodBoolean>;
|
|
776
|
-
enableTransitivelyFreezeFunctionExpressions: z.ZodDefault<z.ZodBoolean>;
|
|
777
|
-
enableEmitFreeze: z.ZodDefault<
|
|
778
|
-
z.ZodNullable<
|
|
779
|
-
z.ZodObject<
|
|
780
|
-
{
|
|
781
|
-
source: z.ZodString;
|
|
782
|
-
importSpecifierName: z.ZodString;
|
|
783
|
-
},
|
|
784
|
-
z.core.$strip
|
|
785
|
-
>
|
|
786
|
-
>
|
|
787
|
-
>;
|
|
788
|
-
enableEmitHookGuards: z.ZodDefault<
|
|
789
|
-
z.ZodNullable<
|
|
790
|
-
z.ZodObject<
|
|
791
|
-
{
|
|
792
|
-
source: z.ZodString;
|
|
793
|
-
importSpecifierName: z.ZodString;
|
|
794
|
-
},
|
|
795
|
-
z.core.$strip
|
|
796
|
-
>
|
|
797
|
-
>
|
|
798
|
-
>;
|
|
799
|
-
enableInstructionReordering: z.ZodDefault<z.ZodBoolean>;
|
|
800
|
-
enableFunctionOutlining: z.ZodDefault<z.ZodBoolean>;
|
|
801
|
-
enableJsxOutlining: z.ZodDefault<z.ZodBoolean>;
|
|
802
|
-
enableEmitInstrumentForget: z.ZodDefault<
|
|
803
|
-
z.ZodNullable<
|
|
804
|
-
z.ZodObject<
|
|
805
|
-
{
|
|
806
|
-
fn: z.ZodObject<
|
|
807
|
-
{
|
|
808
|
-
source: z.ZodString;
|
|
809
|
-
importSpecifierName: z.ZodString;
|
|
810
|
-
},
|
|
811
|
-
z.core.$strip
|
|
812
|
-
>;
|
|
813
|
-
gating: z.ZodNullable<
|
|
814
|
-
z.ZodObject<
|
|
815
|
-
{
|
|
816
|
-
source: z.ZodString;
|
|
817
|
-
importSpecifierName: z.ZodString;
|
|
818
|
-
},
|
|
819
|
-
z.core.$strip
|
|
820
|
-
>
|
|
821
|
-
>;
|
|
822
|
-
globalGating: z.ZodNullable<z.ZodString>;
|
|
823
|
-
},
|
|
824
|
-
z.core.$strip
|
|
825
|
-
>
|
|
826
|
-
>
|
|
827
|
-
>;
|
|
828
|
-
assertValidMutableRanges: z.ZodDefault<z.ZodBoolean>;
|
|
829
|
-
enableChangeVariableCodegen: z.ZodDefault<z.ZodBoolean>;
|
|
830
|
-
enableMemoizationComments: z.ZodDefault<z.ZodBoolean>;
|
|
831
|
-
throwUnknownException__testonly: z.ZodDefault<z.ZodBoolean>;
|
|
832
|
-
enableTreatFunctionDepsAsConditional: z.ZodDefault<z.ZodBoolean>;
|
|
833
|
-
disableMemoizationForDebugging: z.ZodDefault<z.ZodBoolean>;
|
|
834
|
-
enableChangeDetectionForDebugging: z.ZodDefault<
|
|
835
|
-
z.ZodNullable<
|
|
836
|
-
z.ZodObject<
|
|
837
|
-
{
|
|
838
|
-
source: z.ZodString;
|
|
839
|
-
importSpecifierName: z.ZodString;
|
|
840
|
-
},
|
|
841
|
-
z.core.$strip
|
|
842
|
-
>
|
|
843
|
-
>
|
|
844
|
-
>;
|
|
845
|
-
enableCustomTypeDefinitionForReanimated: z.ZodDefault<z.ZodBoolean>;
|
|
846
|
-
hookPattern: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
847
|
-
enableTreatRefLikeIdentifiersAsRefs: z.ZodDefault<z.ZodBoolean>;
|
|
848
|
-
enableTreatSetIdentifiersAsStateSetters: z.ZodDefault<z.ZodBoolean>;
|
|
849
|
-
lowerContextAccess: z.ZodDefault<
|
|
850
|
-
z.ZodNullable<
|
|
851
|
-
z.ZodObject<
|
|
852
|
-
{
|
|
853
|
-
source: z.ZodString;
|
|
854
|
-
importSpecifierName: z.ZodString;
|
|
855
|
-
},
|
|
856
|
-
z.core.$strip
|
|
857
|
-
>
|
|
858
|
-
>
|
|
859
|
-
>;
|
|
860
|
-
validateNoVoidUseMemo: z.ZodDefault<z.ZodBoolean>;
|
|
861
|
-
validateNoDynamicallyCreatedComponentsOrHooks: z.ZodDefault<z.ZodBoolean>;
|
|
862
|
-
enableAllowSetStateFromRefsInEffects: z.ZodDefault<z.ZodBoolean>;
|
|
863
|
-
},
|
|
864
|
-
z.core.$strip
|
|
865
|
-
>;
|
|
866
|
-
|
|
867
|
-
declare class ErrImpl<E> implements Result<never, E> {
|
|
868
|
-
#private;
|
|
869
|
-
constructor(val: E);
|
|
870
|
-
map<U>(_fn: (val: never) => U): Result<U, E>;
|
|
871
|
-
mapErr<F>(fn: (val: E) => F): Result<never, F>;
|
|
872
|
-
mapOr<U>(fallback: U, _fn: (val: never) => U): U;
|
|
873
|
-
mapOrElse<U>(fallback: () => U, _fn: (val: never) => U): U;
|
|
874
|
-
andThen<U>(_fn: (val: never) => Result<U, E>): Result<U, E>;
|
|
875
|
-
and<U>(_res: Result<U, E>): Result<U, E>;
|
|
876
|
-
or(res: Result<never, E>): Result<never, E>;
|
|
877
|
-
orElse<F>(fn: (val: E) => ErrImpl<F>): Result<never, F>;
|
|
878
|
-
isOk(): this is OkImpl<never>;
|
|
879
|
-
isErr(): this is ErrImpl<E>;
|
|
880
|
-
expect(msg: string): never;
|
|
881
|
-
expectErr(_msg: string): E;
|
|
882
|
-
unwrap(): never;
|
|
883
|
-
unwrapOr<T>(fallback: T): T;
|
|
884
|
-
unwrapOrElse<T>(fallback: (val: E) => T): T;
|
|
885
|
-
unwrapErr(): E;
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
declare enum ErrorCategory {
|
|
889
|
-
Hooks = "Hooks",
|
|
890
|
-
CapitalizedCalls = "CapitalizedCalls",
|
|
891
|
-
StaticComponents = "StaticComponents",
|
|
892
|
-
UseMemo = "UseMemo",
|
|
893
|
-
Factories = "Factories",
|
|
894
|
-
PreserveManualMemo = "PreserveManualMemo",
|
|
895
|
-
IncompatibleLibrary = "IncompatibleLibrary",
|
|
896
|
-
Immutability = "Immutability",
|
|
897
|
-
Globals = "Globals",
|
|
898
|
-
Refs = "Refs",
|
|
899
|
-
EffectDependencies = "EffectDependencies",
|
|
900
|
-
EffectSetState = "EffectSetState",
|
|
901
|
-
EffectDerivationsOfState = "EffectDerivationsOfState",
|
|
902
|
-
ErrorBoundaries = "ErrorBoundaries",
|
|
903
|
-
Purity = "Purity",
|
|
904
|
-
RenderSetState = "RenderSetState",
|
|
905
|
-
Invariant = "Invariant",
|
|
906
|
-
Todo = "Todo",
|
|
907
|
-
Syntax = "Syntax",
|
|
908
|
-
UnsupportedSyntax = "UnsupportedSyntax",
|
|
909
|
-
Config = "Config",
|
|
910
|
-
Gating = "Gating",
|
|
911
|
-
Suppression = "Suppression",
|
|
912
|
-
AutomaticEffectDependencies = "AutomaticEffectDependencies",
|
|
913
|
-
Fire = "Fire",
|
|
914
|
-
FBT = "FBT",
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
declare enum ErrorSeverity {
|
|
918
|
-
Error = "Error",
|
|
919
|
-
Warning = "Warning",
|
|
920
|
-
Hint = "Hint",
|
|
921
|
-
Off = "Off",
|
|
922
|
-
}
|
|
923
|
-
|
|
924
59
|
/**
|
|
925
60
|
* Merge user-provided Vite configuration object or function
|
|
926
61
|
*
|
|
@@ -935,16 +70,6 @@ export declare function extendViteConfigWithUserConfig(
|
|
|
935
70
|
userConfig: UserViteConfig,
|
|
936
71
|
): Promise<InlineConfig>;
|
|
937
72
|
|
|
938
|
-
declare type ExternalFunction = z.infer<typeof ExternalFunctionSchema>;
|
|
939
|
-
|
|
940
|
-
declare const ExternalFunctionSchema: z.ZodObject<
|
|
941
|
-
{
|
|
942
|
-
source: z.ZodString;
|
|
943
|
-
importSpecifierName: z.ZodString;
|
|
944
|
-
},
|
|
945
|
-
z.core.$strip
|
|
946
|
-
>;
|
|
947
|
-
|
|
948
73
|
/**
|
|
949
74
|
* Ensure Sanity entry chunk is always loaded
|
|
950
75
|
*
|
|
@@ -956,98 +81,6 @@ export declare function finalizeViteConfig(
|
|
|
956
81
|
config: InlineConfig,
|
|
957
82
|
): Promise<InlineConfig>;
|
|
958
83
|
|
|
959
|
-
declare type FinishMemoize = {
|
|
960
|
-
kind: "FinishMemoize";
|
|
961
|
-
manualMemoId: number;
|
|
962
|
-
decl: Place;
|
|
963
|
-
pruned?: true;
|
|
964
|
-
loc: SourceLocation;
|
|
965
|
-
};
|
|
966
|
-
|
|
967
|
-
declare class FlowTypeEnv implements ITypeEnv {
|
|
968
|
-
#private;
|
|
969
|
-
moduleEnv: Map<string, ResolvedType>;
|
|
970
|
-
init(env: Environment, source: string): void;
|
|
971
|
-
setType(identifier: Identifier, type: ResolvedType): void;
|
|
972
|
-
getType(identifier: Identifier): ResolvedType;
|
|
973
|
-
getTypeOrNull(identifier: Identifier): ResolvedType | null;
|
|
974
|
-
getTypeByLoc(loc: SourceLocation): ResolvedType | null;
|
|
975
|
-
nextNominalId(): NominalId;
|
|
976
|
-
nextTypeParameterId(): TypeParameterId;
|
|
977
|
-
addBinding(bindingIdentifier: t.Identifier, type: ResolvedType): void;
|
|
978
|
-
resolveBinding(bindingIdentifier: t.Identifier): ResolvedType | null;
|
|
979
|
-
pushGeneric(name: string, generic: TypeParameter<ResolvedType>): void;
|
|
980
|
-
popGeneric(name: string): void;
|
|
981
|
-
getGeneric(name: string): null | TypeParameter<ResolvedType>;
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
declare type ForInTerminal = {
|
|
985
|
-
kind: "for-in";
|
|
986
|
-
loc: SourceLocation;
|
|
987
|
-
init: BlockId;
|
|
988
|
-
loop: BlockId;
|
|
989
|
-
fallthrough: BlockId;
|
|
990
|
-
id: InstructionId;
|
|
991
|
-
};
|
|
992
|
-
|
|
993
|
-
declare type ForOfTerminal = {
|
|
994
|
-
kind: "for-of";
|
|
995
|
-
loc: SourceLocation;
|
|
996
|
-
init: BlockId;
|
|
997
|
-
test: BlockId;
|
|
998
|
-
loop: BlockId;
|
|
999
|
-
fallthrough: BlockId;
|
|
1000
|
-
id: InstructionId;
|
|
1001
|
-
};
|
|
1002
|
-
|
|
1003
|
-
declare type ForTerminal = {
|
|
1004
|
-
kind: "for";
|
|
1005
|
-
loc: SourceLocation;
|
|
1006
|
-
init: BlockId;
|
|
1007
|
-
test: BlockId;
|
|
1008
|
-
update: BlockId | null;
|
|
1009
|
-
loop: BlockId;
|
|
1010
|
-
fallthrough: BlockId;
|
|
1011
|
-
id: InstructionId;
|
|
1012
|
-
};
|
|
1013
|
-
|
|
1014
|
-
declare type FunctionExpression = {
|
|
1015
|
-
kind: "FunctionExpression";
|
|
1016
|
-
name: ValidIdentifierName | null;
|
|
1017
|
-
nameHint: string | null;
|
|
1018
|
-
loweredFunc: LoweredFunction;
|
|
1019
|
-
type:
|
|
1020
|
-
| "ArrowFunctionExpression"
|
|
1021
|
-
| "FunctionExpression"
|
|
1022
|
-
| "FunctionDeclaration";
|
|
1023
|
-
loc: SourceLocation;
|
|
1024
|
-
};
|
|
1025
|
-
|
|
1026
|
-
declare type FunctionSignature = {
|
|
1027
|
-
positionalParams: Array<Effect>;
|
|
1028
|
-
restParam: Effect | null;
|
|
1029
|
-
returnType: BuiltInType | PolyType;
|
|
1030
|
-
returnValueKind: ValueKind;
|
|
1031
|
-
returnValueReason?: ValueReason;
|
|
1032
|
-
calleeEffect: Effect;
|
|
1033
|
-
hookKind: HookKind | null;
|
|
1034
|
-
noAlias?: boolean;
|
|
1035
|
-
mutableOnlyIfOperandsAreMutable?: boolean;
|
|
1036
|
-
impure?: boolean;
|
|
1037
|
-
knownIncompatible?: string | null | undefined;
|
|
1038
|
-
canonicalName?: string;
|
|
1039
|
-
aliasing?: AliasingSignature | null | undefined;
|
|
1040
|
-
};
|
|
1041
|
-
|
|
1042
|
-
declare type FunctionType = {
|
|
1043
|
-
kind: "Function";
|
|
1044
|
-
shapeId: string | null;
|
|
1045
|
-
return: Type;
|
|
1046
|
-
isConstructor: boolean;
|
|
1047
|
-
};
|
|
1048
|
-
|
|
1049
|
-
declare const GeneratedSource: unique symbol;
|
|
1050
|
-
|
|
1051
84
|
/**
|
|
1052
85
|
* Get a configuration object for Vite based on the passed options
|
|
1053
86
|
*
|
|
@@ -1057,1034 +90,6 @@ export declare function getViteConfig(
|
|
|
1057
90
|
options: ViteOptions,
|
|
1058
91
|
): Promise<InlineConfig>;
|
|
1059
92
|
|
|
1060
|
-
declare type Global_2 = BuiltInType | PolyType;
|
|
1061
|
-
|
|
1062
|
-
declare type GotoTerminal = {
|
|
1063
|
-
kind: "goto";
|
|
1064
|
-
block: BlockId;
|
|
1065
|
-
variant: GotoVariant;
|
|
1066
|
-
id: InstructionId;
|
|
1067
|
-
loc: SourceLocation;
|
|
1068
|
-
fallthrough?: never;
|
|
1069
|
-
};
|
|
1070
|
-
|
|
1071
|
-
declare enum GotoVariant {
|
|
1072
|
-
Break = "Break",
|
|
1073
|
-
Continue = "Continue",
|
|
1074
|
-
Try = "Try",
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
declare type HIR = {
|
|
1078
|
-
entry: BlockId;
|
|
1079
|
-
blocks: Map<BlockId, BasicBlock>;
|
|
1080
|
-
};
|
|
1081
|
-
|
|
1082
|
-
declare type HIRFunction = {
|
|
1083
|
-
loc: SourceLocation;
|
|
1084
|
-
id: ValidIdentifierName | null;
|
|
1085
|
-
nameHint: string | null;
|
|
1086
|
-
fnType: ReactFunctionType;
|
|
1087
|
-
env: Environment;
|
|
1088
|
-
params: Array<Place | SpreadPattern>;
|
|
1089
|
-
returnTypeAnnotation: t.FlowType | t.TSType | null;
|
|
1090
|
-
returns: Place;
|
|
1091
|
-
context: Array<Place>;
|
|
1092
|
-
body: HIR;
|
|
1093
|
-
generator: boolean;
|
|
1094
|
-
async: boolean;
|
|
1095
|
-
directives: Array<string>;
|
|
1096
|
-
aliasingEffects: Array<AliasingEffect> | null;
|
|
1097
|
-
};
|
|
1098
|
-
|
|
1099
|
-
declare type Hole = {
|
|
1100
|
-
kind: "Hole";
|
|
1101
|
-
};
|
|
1102
|
-
|
|
1103
|
-
declare type HookKind =
|
|
1104
|
-
| "useContext"
|
|
1105
|
-
| "useState"
|
|
1106
|
-
| "useActionState"
|
|
1107
|
-
| "useReducer"
|
|
1108
|
-
| "useRef"
|
|
1109
|
-
| "useEffect"
|
|
1110
|
-
| "useLayoutEffect"
|
|
1111
|
-
| "useInsertionEffect"
|
|
1112
|
-
| "useMemo"
|
|
1113
|
-
| "useCallback"
|
|
1114
|
-
| "useTransition"
|
|
1115
|
-
| "useImperativeHandle"
|
|
1116
|
-
| "useEffectEvent"
|
|
1117
|
-
| "Custom";
|
|
1118
|
-
|
|
1119
|
-
declare type Identifier = {
|
|
1120
|
-
id: IdentifierId;
|
|
1121
|
-
declarationId: DeclarationId;
|
|
1122
|
-
name: IdentifierName | null;
|
|
1123
|
-
mutableRange: MutableRange;
|
|
1124
|
-
scope: ReactiveScope | null;
|
|
1125
|
-
type: Type;
|
|
1126
|
-
loc: SourceLocation;
|
|
1127
|
-
};
|
|
1128
|
-
|
|
1129
|
-
declare type IdentifierId = number & {
|
|
1130
|
-
[opaqueIdentifierId]: "IdentifierId";
|
|
1131
|
-
};
|
|
1132
|
-
|
|
1133
|
-
declare type IdentifierName = ValidatedIdentifier | PromotedIdentifier;
|
|
1134
|
-
|
|
1135
|
-
declare type IfTerminal = {
|
|
1136
|
-
kind: "if";
|
|
1137
|
-
test: Place;
|
|
1138
|
-
consequent: BlockId;
|
|
1139
|
-
alternate: BlockId;
|
|
1140
|
-
fallthrough: BlockId;
|
|
1141
|
-
id: InstructionId;
|
|
1142
|
-
loc: SourceLocation;
|
|
1143
|
-
};
|
|
1144
|
-
|
|
1145
|
-
declare type Instruction = {
|
|
1146
|
-
id: InstructionId;
|
|
1147
|
-
lvalue: Place;
|
|
1148
|
-
value: InstructionValue;
|
|
1149
|
-
loc: SourceLocation;
|
|
1150
|
-
effects: Array<AliasingEffect> | null;
|
|
1151
|
-
};
|
|
1152
|
-
|
|
1153
|
-
declare type InstructionId = number & {
|
|
1154
|
-
[opaqueInstructionId]: "IdentifierId";
|
|
1155
|
-
};
|
|
1156
|
-
|
|
1157
|
-
declare enum InstructionKind {
|
|
1158
|
-
Const = "Const",
|
|
1159
|
-
Let = "Let",
|
|
1160
|
-
Reassign = "Reassign",
|
|
1161
|
-
Catch = "Catch",
|
|
1162
|
-
HoistedConst = "HoistedConst",
|
|
1163
|
-
HoistedLet = "HoistedLet",
|
|
1164
|
-
HoistedFunction = "HoistedFunction",
|
|
1165
|
-
Function = "Function",
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
declare type InstructionValue =
|
|
1169
|
-
| LoadLocal
|
|
1170
|
-
| LoadContext
|
|
1171
|
-
| {
|
|
1172
|
-
kind: "DeclareLocal";
|
|
1173
|
-
lvalue: LValue;
|
|
1174
|
-
type: t.FlowType | t.TSType | null;
|
|
1175
|
-
loc: SourceLocation;
|
|
1176
|
-
}
|
|
1177
|
-
| {
|
|
1178
|
-
kind: "DeclareContext";
|
|
1179
|
-
lvalue: {
|
|
1180
|
-
kind:
|
|
1181
|
-
| InstructionKind.Let
|
|
1182
|
-
| InstructionKind.HoistedConst
|
|
1183
|
-
| InstructionKind.HoistedLet
|
|
1184
|
-
| InstructionKind.HoistedFunction;
|
|
1185
|
-
place: Place;
|
|
1186
|
-
};
|
|
1187
|
-
loc: SourceLocation;
|
|
1188
|
-
}
|
|
1189
|
-
| StoreLocal
|
|
1190
|
-
| {
|
|
1191
|
-
kind: "StoreContext";
|
|
1192
|
-
lvalue: {
|
|
1193
|
-
kind:
|
|
1194
|
-
| InstructionKind.Reassign
|
|
1195
|
-
| InstructionKind.Const
|
|
1196
|
-
| InstructionKind.Let
|
|
1197
|
-
| InstructionKind.Function;
|
|
1198
|
-
place: Place;
|
|
1199
|
-
};
|
|
1200
|
-
value: Place;
|
|
1201
|
-
loc: SourceLocation;
|
|
1202
|
-
}
|
|
1203
|
-
| Destructure
|
|
1204
|
-
| {
|
|
1205
|
-
kind: "Primitive";
|
|
1206
|
-
value: number | boolean | string | null | undefined;
|
|
1207
|
-
loc: SourceLocation;
|
|
1208
|
-
}
|
|
1209
|
-
| JSXText
|
|
1210
|
-
| {
|
|
1211
|
-
kind: "BinaryExpression";
|
|
1212
|
-
operator: Exclude<t.BinaryExpression["operator"], "|>">;
|
|
1213
|
-
left: Place;
|
|
1214
|
-
right: Place;
|
|
1215
|
-
loc: SourceLocation;
|
|
1216
|
-
}
|
|
1217
|
-
| NewExpression
|
|
1218
|
-
| CallExpression
|
|
1219
|
-
| MethodCall
|
|
1220
|
-
| {
|
|
1221
|
-
kind: "UnaryExpression";
|
|
1222
|
-
operator: Exclude<t.UnaryExpression["operator"], "throw" | "delete">;
|
|
1223
|
-
value: Place;
|
|
1224
|
-
loc: SourceLocation;
|
|
1225
|
-
}
|
|
1226
|
-
| ({
|
|
1227
|
-
kind: "TypeCastExpression";
|
|
1228
|
-
value: Place;
|
|
1229
|
-
type: Type;
|
|
1230
|
-
loc: SourceLocation;
|
|
1231
|
-
} & (
|
|
1232
|
-
| {
|
|
1233
|
-
typeAnnotation: t.FlowType;
|
|
1234
|
-
typeAnnotationKind: "cast";
|
|
1235
|
-
}
|
|
1236
|
-
| {
|
|
1237
|
-
typeAnnotation: t.TSType;
|
|
1238
|
-
typeAnnotationKind: "as" | "satisfies";
|
|
1239
|
-
}
|
|
1240
|
-
))
|
|
1241
|
-
| JsxExpression
|
|
1242
|
-
| {
|
|
1243
|
-
kind: "ObjectExpression";
|
|
1244
|
-
properties: Array<ObjectProperty | SpreadPattern>;
|
|
1245
|
-
loc: SourceLocation;
|
|
1246
|
-
}
|
|
1247
|
-
| ObjectMethod
|
|
1248
|
-
| ArrayExpression
|
|
1249
|
-
| {
|
|
1250
|
-
kind: "JsxFragment";
|
|
1251
|
-
children: Array<Place>;
|
|
1252
|
-
loc: SourceLocation;
|
|
1253
|
-
}
|
|
1254
|
-
| {
|
|
1255
|
-
kind: "RegExpLiteral";
|
|
1256
|
-
pattern: string;
|
|
1257
|
-
flags: string;
|
|
1258
|
-
loc: SourceLocation;
|
|
1259
|
-
}
|
|
1260
|
-
| {
|
|
1261
|
-
kind: "MetaProperty";
|
|
1262
|
-
meta: string;
|
|
1263
|
-
property: string;
|
|
1264
|
-
loc: SourceLocation;
|
|
1265
|
-
}
|
|
1266
|
-
| {
|
|
1267
|
-
kind: "PropertyStore";
|
|
1268
|
-
object: Place;
|
|
1269
|
-
property: PropertyLiteral;
|
|
1270
|
-
value: Place;
|
|
1271
|
-
loc: SourceLocation;
|
|
1272
|
-
}
|
|
1273
|
-
| PropertyLoad
|
|
1274
|
-
| {
|
|
1275
|
-
kind: "PropertyDelete";
|
|
1276
|
-
object: Place;
|
|
1277
|
-
property: PropertyLiteral;
|
|
1278
|
-
loc: SourceLocation;
|
|
1279
|
-
}
|
|
1280
|
-
| {
|
|
1281
|
-
kind: "ComputedStore";
|
|
1282
|
-
object: Place;
|
|
1283
|
-
property: Place;
|
|
1284
|
-
value: Place;
|
|
1285
|
-
loc: SourceLocation;
|
|
1286
|
-
}
|
|
1287
|
-
| {
|
|
1288
|
-
kind: "ComputedLoad";
|
|
1289
|
-
object: Place;
|
|
1290
|
-
property: Place;
|
|
1291
|
-
loc: SourceLocation;
|
|
1292
|
-
}
|
|
1293
|
-
| {
|
|
1294
|
-
kind: "ComputedDelete";
|
|
1295
|
-
object: Place;
|
|
1296
|
-
property: Place;
|
|
1297
|
-
loc: SourceLocation;
|
|
1298
|
-
}
|
|
1299
|
-
| LoadGlobal
|
|
1300
|
-
| StoreGlobal
|
|
1301
|
-
| FunctionExpression
|
|
1302
|
-
| {
|
|
1303
|
-
kind: "TaggedTemplateExpression";
|
|
1304
|
-
tag: Place;
|
|
1305
|
-
value: {
|
|
1306
|
-
raw: string;
|
|
1307
|
-
cooked?: string;
|
|
1308
|
-
};
|
|
1309
|
-
loc: SourceLocation;
|
|
1310
|
-
}
|
|
1311
|
-
| {
|
|
1312
|
-
kind: "TemplateLiteral";
|
|
1313
|
-
subexprs: Array<Place>;
|
|
1314
|
-
quasis: Array<{
|
|
1315
|
-
raw: string;
|
|
1316
|
-
cooked?: string;
|
|
1317
|
-
}>;
|
|
1318
|
-
loc: SourceLocation;
|
|
1319
|
-
}
|
|
1320
|
-
| {
|
|
1321
|
-
kind: "Await";
|
|
1322
|
-
value: Place;
|
|
1323
|
-
loc: SourceLocation;
|
|
1324
|
-
}
|
|
1325
|
-
| {
|
|
1326
|
-
kind: "GetIterator";
|
|
1327
|
-
collection: Place;
|
|
1328
|
-
loc: SourceLocation;
|
|
1329
|
-
}
|
|
1330
|
-
| {
|
|
1331
|
-
kind: "IteratorNext";
|
|
1332
|
-
iterator: Place;
|
|
1333
|
-
collection: Place;
|
|
1334
|
-
loc: SourceLocation;
|
|
1335
|
-
}
|
|
1336
|
-
| {
|
|
1337
|
-
kind: "NextPropertyOf";
|
|
1338
|
-
value: Place;
|
|
1339
|
-
loc: SourceLocation;
|
|
1340
|
-
}
|
|
1341
|
-
| {
|
|
1342
|
-
kind: "PrefixUpdate";
|
|
1343
|
-
lvalue: Place;
|
|
1344
|
-
operation: t.UpdateExpression["operator"];
|
|
1345
|
-
value: Place;
|
|
1346
|
-
loc: SourceLocation;
|
|
1347
|
-
}
|
|
1348
|
-
| {
|
|
1349
|
-
kind: "PostfixUpdate";
|
|
1350
|
-
lvalue: Place;
|
|
1351
|
-
operation: t.UpdateExpression["operator"];
|
|
1352
|
-
value: Place;
|
|
1353
|
-
loc: SourceLocation;
|
|
1354
|
-
}
|
|
1355
|
-
| {
|
|
1356
|
-
kind: "Debugger";
|
|
1357
|
-
loc: SourceLocation;
|
|
1358
|
-
}
|
|
1359
|
-
| StartMemoize
|
|
1360
|
-
| FinishMemoize
|
|
1361
|
-
| {
|
|
1362
|
-
kind: "UnsupportedNode";
|
|
1363
|
-
node: t.Node;
|
|
1364
|
-
loc: SourceLocation;
|
|
1365
|
-
};
|
|
1366
|
-
|
|
1367
|
-
declare interface ITypeEnv {
|
|
1368
|
-
popGeneric(name: string): void;
|
|
1369
|
-
getGeneric(name: string): null | TypeParameter<ResolvedType>;
|
|
1370
|
-
pushGeneric(
|
|
1371
|
-
name: string,
|
|
1372
|
-
binding: {
|
|
1373
|
-
name: string;
|
|
1374
|
-
id: TypeParameterId;
|
|
1375
|
-
bound: ResolvedType;
|
|
1376
|
-
},
|
|
1377
|
-
): void;
|
|
1378
|
-
getType(id: Identifier): ResolvedType;
|
|
1379
|
-
getTypeOrNull(id: Identifier): ResolvedType | null;
|
|
1380
|
-
setType(id: Identifier, type: ResolvedType): void;
|
|
1381
|
-
nextNominalId(): NominalId;
|
|
1382
|
-
nextTypeParameterId(): TypeParameterId;
|
|
1383
|
-
moduleEnv: Map<string, ResolvedType>;
|
|
1384
|
-
addBinding(bindingIdentifier: t.Identifier, type: ResolvedType): void;
|
|
1385
|
-
resolveBinding(bindingIdentifier: t.Identifier): ResolvedType | null;
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
declare type JsxAttribute =
|
|
1389
|
-
| {
|
|
1390
|
-
kind: "JsxSpreadAttribute";
|
|
1391
|
-
argument: Place;
|
|
1392
|
-
}
|
|
1393
|
-
| {
|
|
1394
|
-
kind: "JsxAttribute";
|
|
1395
|
-
name: string;
|
|
1396
|
-
place: Place;
|
|
1397
|
-
};
|
|
1398
|
-
|
|
1399
|
-
declare type JsxExpression = {
|
|
1400
|
-
kind: "JsxExpression";
|
|
1401
|
-
tag: Place | BuiltinTag;
|
|
1402
|
-
props: Array<JsxAttribute>;
|
|
1403
|
-
children: Array<Place> | null;
|
|
1404
|
-
loc: SourceLocation;
|
|
1405
|
-
openingLoc: SourceLocation;
|
|
1406
|
-
closingLoc: SourceLocation;
|
|
1407
|
-
};
|
|
1408
|
-
|
|
1409
|
-
declare type JSXText = {
|
|
1410
|
-
kind: "JSXText";
|
|
1411
|
-
value: string;
|
|
1412
|
-
loc: SourceLocation;
|
|
1413
|
-
};
|
|
1414
|
-
|
|
1415
|
-
declare type LabelTerminal = {
|
|
1416
|
-
kind: "label";
|
|
1417
|
-
block: BlockId;
|
|
1418
|
-
fallthrough: BlockId;
|
|
1419
|
-
id: InstructionId;
|
|
1420
|
-
loc: SourceLocation;
|
|
1421
|
-
};
|
|
1422
|
-
|
|
1423
|
-
declare type LinearId = number & {
|
|
1424
|
-
[opaqueLinearId]: "LinearId";
|
|
1425
|
-
};
|
|
1426
|
-
|
|
1427
|
-
declare type LoadContext = {
|
|
1428
|
-
kind: "LoadContext";
|
|
1429
|
-
place: Place;
|
|
1430
|
-
loc: SourceLocation;
|
|
1431
|
-
};
|
|
1432
|
-
|
|
1433
|
-
declare type LoadGlobal = {
|
|
1434
|
-
kind: "LoadGlobal";
|
|
1435
|
-
binding: NonLocalBinding;
|
|
1436
|
-
loc: SourceLocation;
|
|
1437
|
-
};
|
|
1438
|
-
|
|
1439
|
-
declare type LoadLocal = {
|
|
1440
|
-
kind: "LoadLocal";
|
|
1441
|
-
place: Place;
|
|
1442
|
-
loc: SourceLocation;
|
|
1443
|
-
};
|
|
1444
|
-
|
|
1445
|
-
declare type Logger = {
|
|
1446
|
-
logEvent: (filename: string | null, event: LoggerEvent) => void;
|
|
1447
|
-
debugLogIRs?: (value: CompilerPipelineValue) => void;
|
|
1448
|
-
};
|
|
1449
|
-
|
|
1450
|
-
declare type LoggerEvent =
|
|
1451
|
-
| CompileSuccessEvent
|
|
1452
|
-
| CompileErrorEvent
|
|
1453
|
-
| CompileDiagnosticEvent
|
|
1454
|
-
| CompileSkipEvent
|
|
1455
|
-
| PipelineErrorEvent
|
|
1456
|
-
| TimingEvent
|
|
1457
|
-
| AutoDepsDecorationsEvent
|
|
1458
|
-
| AutoDepsEligibleEvent;
|
|
1459
|
-
|
|
1460
|
-
declare type LogicalTerminal = {
|
|
1461
|
-
kind: "logical";
|
|
1462
|
-
operator: t.LogicalExpression["operator"];
|
|
1463
|
-
test: BlockId;
|
|
1464
|
-
fallthrough: BlockId;
|
|
1465
|
-
id: InstructionId;
|
|
1466
|
-
loc: SourceLocation;
|
|
1467
|
-
};
|
|
1468
|
-
|
|
1469
|
-
declare type LoweredFunction = {
|
|
1470
|
-
func: HIRFunction;
|
|
1471
|
-
};
|
|
1472
|
-
|
|
1473
|
-
declare type LValue = {
|
|
1474
|
-
place: Place;
|
|
1475
|
-
kind: InstructionKind;
|
|
1476
|
-
};
|
|
1477
|
-
|
|
1478
|
-
declare type LValuePattern = {
|
|
1479
|
-
pattern: Pattern;
|
|
1480
|
-
kind: InstructionKind;
|
|
1481
|
-
};
|
|
1482
|
-
|
|
1483
|
-
declare type ManualMemoDependency = {
|
|
1484
|
-
root:
|
|
1485
|
-
| {
|
|
1486
|
-
kind: "NamedLocal";
|
|
1487
|
-
value: Place;
|
|
1488
|
-
}
|
|
1489
|
-
| {
|
|
1490
|
-
kind: "Global";
|
|
1491
|
-
identifierName: string;
|
|
1492
|
-
};
|
|
1493
|
-
path: DependencyPath;
|
|
1494
|
-
};
|
|
1495
|
-
|
|
1496
|
-
declare type MaybeThrowTerminal = {
|
|
1497
|
-
kind: "maybe-throw";
|
|
1498
|
-
continuation: BlockId;
|
|
1499
|
-
handler: BlockId;
|
|
1500
|
-
id: InstructionId;
|
|
1501
|
-
loc: SourceLocation;
|
|
1502
|
-
fallthrough?: never;
|
|
1503
|
-
effects: Array<AliasingEffect> | null;
|
|
1504
|
-
};
|
|
1505
|
-
|
|
1506
|
-
declare type MethodCall = {
|
|
1507
|
-
kind: "MethodCall";
|
|
1508
|
-
receiver: Place;
|
|
1509
|
-
property: Place;
|
|
1510
|
-
args: Array<Place | SpreadPattern>;
|
|
1511
|
-
loc: SourceLocation;
|
|
1512
|
-
};
|
|
1513
|
-
|
|
1514
|
-
declare type MutableRange = {
|
|
1515
|
-
start: InstructionId;
|
|
1516
|
-
end: InstructionId;
|
|
1517
|
-
};
|
|
1518
|
-
|
|
1519
|
-
declare type MutationReason = {
|
|
1520
|
-
kind: "AssignCurrentProperty";
|
|
1521
|
-
};
|
|
1522
|
-
|
|
1523
|
-
declare type NewExpression = {
|
|
1524
|
-
kind: "NewExpression";
|
|
1525
|
-
callee: Place;
|
|
1526
|
-
args: Array<Place | SpreadPattern>;
|
|
1527
|
-
loc: SourceLocation;
|
|
1528
|
-
};
|
|
1529
|
-
|
|
1530
|
-
declare type NominalId = number & {
|
|
1531
|
-
[opaqueNominalId]: "NominalId";
|
|
1532
|
-
};
|
|
1533
|
-
|
|
1534
|
-
declare type NonLocalBinding =
|
|
1535
|
-
| {
|
|
1536
|
-
kind: "ImportDefault";
|
|
1537
|
-
name: string;
|
|
1538
|
-
module: string;
|
|
1539
|
-
}
|
|
1540
|
-
| {
|
|
1541
|
-
kind: "ImportNamespace";
|
|
1542
|
-
name: string;
|
|
1543
|
-
module: string;
|
|
1544
|
-
}
|
|
1545
|
-
| NonLocalImportSpecifier
|
|
1546
|
-
| {
|
|
1547
|
-
kind: "ModuleLocal";
|
|
1548
|
-
name: string;
|
|
1549
|
-
}
|
|
1550
|
-
| {
|
|
1551
|
-
kind: "Global";
|
|
1552
|
-
name: string;
|
|
1553
|
-
};
|
|
1554
|
-
|
|
1555
|
-
declare type NonLocalImportSpecifier = {
|
|
1556
|
-
kind: "ImportSpecifier";
|
|
1557
|
-
name: string;
|
|
1558
|
-
module: string;
|
|
1559
|
-
imported: string;
|
|
1560
|
-
};
|
|
1561
|
-
|
|
1562
|
-
declare type ObjectMethod$1 = {
|
|
1563
|
-
kind: "ObjectMethod";
|
|
1564
|
-
};
|
|
1565
|
-
|
|
1566
|
-
declare type ObjectMethod = {
|
|
1567
|
-
kind: "ObjectMethod";
|
|
1568
|
-
loc: SourceLocation;
|
|
1569
|
-
loweredFunc: LoweredFunction;
|
|
1570
|
-
};
|
|
1571
|
-
|
|
1572
|
-
declare type ObjectPattern = {
|
|
1573
|
-
kind: "ObjectPattern";
|
|
1574
|
-
properties: Array<ObjectProperty | SpreadPattern>;
|
|
1575
|
-
};
|
|
1576
|
-
|
|
1577
|
-
declare type ObjectProperty = {
|
|
1578
|
-
kind: "ObjectProperty";
|
|
1579
|
-
key: ObjectPropertyKey;
|
|
1580
|
-
type: "property" | "method";
|
|
1581
|
-
place: Place;
|
|
1582
|
-
};
|
|
1583
|
-
|
|
1584
|
-
declare type ObjectPropertyKey =
|
|
1585
|
-
| {
|
|
1586
|
-
kind: "string";
|
|
1587
|
-
name: string;
|
|
1588
|
-
}
|
|
1589
|
-
| {
|
|
1590
|
-
kind: "identifier";
|
|
1591
|
-
name: string;
|
|
1592
|
-
}
|
|
1593
|
-
| {
|
|
1594
|
-
kind: "computed";
|
|
1595
|
-
name: Place;
|
|
1596
|
-
}
|
|
1597
|
-
| {
|
|
1598
|
-
kind: "number";
|
|
1599
|
-
name: number;
|
|
1600
|
-
};
|
|
1601
|
-
|
|
1602
|
-
declare type ObjectType = {
|
|
1603
|
-
kind: "Object";
|
|
1604
|
-
shapeId: string | null;
|
|
1605
|
-
};
|
|
1606
|
-
|
|
1607
|
-
declare class OkImpl<T> implements Result<T, never> {
|
|
1608
|
-
#private;
|
|
1609
|
-
constructor(val: T);
|
|
1610
|
-
map<U>(fn: (val: T) => U): Result<U, never>;
|
|
1611
|
-
mapErr<F>(_fn: (val: never) => F): Result<T, F>;
|
|
1612
|
-
mapOr<U>(_fallback: U, fn: (val: T) => U): U;
|
|
1613
|
-
mapOrElse<U>(_fallback: () => U, fn: (val: T) => U): U;
|
|
1614
|
-
andThen<U>(fn: (val: T) => Result<U, never>): Result<U, never>;
|
|
1615
|
-
and<U>(res: Result<U, never>): Result<U, never>;
|
|
1616
|
-
or(_res: Result<T, never>): Result<T, never>;
|
|
1617
|
-
orElse<F>(_fn: (val: never) => Result<T, F>): Result<T, F>;
|
|
1618
|
-
isOk(): this is OkImpl<T>;
|
|
1619
|
-
isErr(): this is ErrImpl<never>;
|
|
1620
|
-
expect(_msg: string): T;
|
|
1621
|
-
expectErr(msg: string): never;
|
|
1622
|
-
unwrap(): T;
|
|
1623
|
-
unwrapOr(_fallback: T): T;
|
|
1624
|
-
unwrapOrElse(_fallback: (val: never) => T): T;
|
|
1625
|
-
unwrapErr(): never;
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
declare const opageDeclarationId: unique symbol;
|
|
1629
|
-
|
|
1630
|
-
declare const opaqueBlockId: unique symbol;
|
|
1631
|
-
|
|
1632
|
-
declare const opaqueIdentifierId: unique symbol;
|
|
1633
|
-
|
|
1634
|
-
declare const opaqueInstructionId: unique symbol;
|
|
1635
|
-
|
|
1636
|
-
declare const opaqueLinearId: unique symbol;
|
|
1637
|
-
|
|
1638
|
-
declare const opaqueNominalId: unique symbol;
|
|
1639
|
-
|
|
1640
|
-
declare const opaquePropertyLiteral: unique symbol;
|
|
1641
|
-
|
|
1642
|
-
declare const opaqueScopeId: unique symbol;
|
|
1643
|
-
|
|
1644
|
-
declare const opaqueTypeId: unique symbol;
|
|
1645
|
-
|
|
1646
|
-
declare const opaqueTypeParameterId: unique symbol;
|
|
1647
|
-
|
|
1648
|
-
declare const opaqueValidIdentifierName: unique symbol;
|
|
1649
|
-
|
|
1650
|
-
declare type OptionalTerminal = {
|
|
1651
|
-
kind: "optional";
|
|
1652
|
-
optional: boolean;
|
|
1653
|
-
test: BlockId;
|
|
1654
|
-
fallthrough: BlockId;
|
|
1655
|
-
id: InstructionId;
|
|
1656
|
-
loc: SourceLocation;
|
|
1657
|
-
};
|
|
1658
|
-
|
|
1659
|
-
declare type PanicThresholdOptions = z.infer<
|
|
1660
|
-
typeof PanicThresholdOptionsSchema
|
|
1661
|
-
>;
|
|
1662
|
-
|
|
1663
|
-
declare const PanicThresholdOptionsSchema: z.ZodEnum<{
|
|
1664
|
-
none: "none";
|
|
1665
|
-
all_errors: "all_errors";
|
|
1666
|
-
critical_errors: "critical_errors";
|
|
1667
|
-
}>;
|
|
1668
|
-
|
|
1669
|
-
declare type ParsedPluginOptions = Required<
|
|
1670
|
-
Omit<PluginOptions, "environment">
|
|
1671
|
-
> & {
|
|
1672
|
-
environment: EnvironmentConfig;
|
|
1673
|
-
};
|
|
1674
|
-
|
|
1675
|
-
declare type Pattern = ArrayPattern | ObjectPattern;
|
|
1676
|
-
|
|
1677
|
-
declare type Phi = {
|
|
1678
|
-
kind: "Phi";
|
|
1679
|
-
place: Place;
|
|
1680
|
-
operands: Map<BlockId, Place>;
|
|
1681
|
-
};
|
|
1682
|
-
|
|
1683
|
-
declare type PhiType = {
|
|
1684
|
-
kind: "Phi";
|
|
1685
|
-
operands: Array<Type>;
|
|
1686
|
-
};
|
|
1687
|
-
|
|
1688
|
-
declare type PipelineErrorEvent = {
|
|
1689
|
-
kind: "PipelineError";
|
|
1690
|
-
fnLoc: t.SourceLocation | null;
|
|
1691
|
-
data: string;
|
|
1692
|
-
};
|
|
1693
|
-
|
|
1694
|
-
declare type Place = {
|
|
1695
|
-
kind: "Identifier";
|
|
1696
|
-
identifier: Identifier;
|
|
1697
|
-
effect: Effect;
|
|
1698
|
-
reactive: boolean;
|
|
1699
|
-
loc: SourceLocation;
|
|
1700
|
-
};
|
|
1701
|
-
|
|
1702
|
-
declare type Platform = "client" | "server" | "shared";
|
|
1703
|
-
|
|
1704
|
-
declare type PluginOptions = Partial<{
|
|
1705
|
-
environment: Partial<EnvironmentConfig>;
|
|
1706
|
-
logger: Logger | null;
|
|
1707
|
-
gating: ExternalFunction | null;
|
|
1708
|
-
dynamicGating: DynamicGatingOptions | null;
|
|
1709
|
-
panicThreshold: PanicThresholdOptions;
|
|
1710
|
-
noEmit: boolean;
|
|
1711
|
-
compilationMode: CompilationMode;
|
|
1712
|
-
eslintSuppressionRules: Array<string> | null | undefined;
|
|
1713
|
-
flowSuppressions: boolean;
|
|
1714
|
-
ignoreUseNoForget: boolean;
|
|
1715
|
-
customOptOutDirectives: CustomOptOutDirective;
|
|
1716
|
-
sources: Array<string> | ((filename: string) => boolean) | null;
|
|
1717
|
-
enableReanimatedCheck: boolean;
|
|
1718
|
-
target: CompilerReactTarget;
|
|
1719
|
-
}>;
|
|
1720
|
-
|
|
1721
|
-
declare type PolyType = {
|
|
1722
|
-
kind: "Poly";
|
|
1723
|
-
};
|
|
1724
|
-
|
|
1725
|
-
declare type PrimitiveType = {
|
|
1726
|
-
kind: "Primitive";
|
|
1727
|
-
};
|
|
1728
|
-
|
|
1729
|
-
declare type PrintErrorMessageOptions = {
|
|
1730
|
-
eslint: boolean;
|
|
1731
|
-
};
|
|
1732
|
-
|
|
1733
|
-
declare class ProgramContext {
|
|
1734
|
-
scope: Scope;
|
|
1735
|
-
opts: ParsedPluginOptions;
|
|
1736
|
-
filename: string | null;
|
|
1737
|
-
code: string | null;
|
|
1738
|
-
reactRuntimeModule: string;
|
|
1739
|
-
suppressions: Array<SuppressionRange>;
|
|
1740
|
-
hasModuleScopeOptOut: boolean;
|
|
1741
|
-
alreadyCompiled: WeakSet<object> | Set<object>;
|
|
1742
|
-
knownReferencedNames: Set<string>;
|
|
1743
|
-
imports: Map<string, Map<string, NonLocalImportSpecifier>>;
|
|
1744
|
-
retryErrors: Array<{
|
|
1745
|
-
fn: BabelFn;
|
|
1746
|
-
error: CompilerError;
|
|
1747
|
-
}>;
|
|
1748
|
-
inferredEffectLocations: Set<t.SourceLocation>;
|
|
1749
|
-
constructor({
|
|
1750
|
-
program,
|
|
1751
|
-
suppressions,
|
|
1752
|
-
opts,
|
|
1753
|
-
filename,
|
|
1754
|
-
code,
|
|
1755
|
-
hasModuleScopeOptOut,
|
|
1756
|
-
}: ProgramContextOptions);
|
|
1757
|
-
isHookName(name: string): boolean;
|
|
1758
|
-
hasReference(name: string): boolean;
|
|
1759
|
-
newUid(name: string): string;
|
|
1760
|
-
addMemoCacheImport(): NonLocalImportSpecifier;
|
|
1761
|
-
addImportSpecifier(
|
|
1762
|
-
{ source: module, importSpecifierName: specifier }: ExternalFunction,
|
|
1763
|
-
nameHint?: string,
|
|
1764
|
-
): NonLocalImportSpecifier;
|
|
1765
|
-
addNewReference(name: string): void;
|
|
1766
|
-
assertGlobalBinding(
|
|
1767
|
-
name: string,
|
|
1768
|
-
localScope?: Scope,
|
|
1769
|
-
): Result<void, CompilerError>;
|
|
1770
|
-
logEvent(event: LoggerEvent): void;
|
|
1771
|
-
}
|
|
1772
|
-
|
|
1773
|
-
declare type ProgramContextOptions = {
|
|
1774
|
-
program: NodePath<t.Program>;
|
|
1775
|
-
suppressions: Array<SuppressionRange>;
|
|
1776
|
-
opts: ParsedPluginOptions;
|
|
1777
|
-
filename: string | null;
|
|
1778
|
-
code: string | null;
|
|
1779
|
-
hasModuleScopeOptOut: boolean;
|
|
1780
|
-
};
|
|
1781
|
-
|
|
1782
|
-
declare type PromotedIdentifier = {
|
|
1783
|
-
kind: "promoted";
|
|
1784
|
-
value: string;
|
|
1785
|
-
};
|
|
1786
|
-
|
|
1787
|
-
declare type PropertyLiteral = (string | number) & {
|
|
1788
|
-
[opaquePropertyLiteral]: "PropertyLiteral";
|
|
1789
|
-
};
|
|
1790
|
-
|
|
1791
|
-
declare type PropertyLoad = {
|
|
1792
|
-
kind: "PropertyLoad";
|
|
1793
|
-
object: Place;
|
|
1794
|
-
property: PropertyLiteral;
|
|
1795
|
-
loc: SourceLocation;
|
|
1796
|
-
};
|
|
1797
|
-
|
|
1798
|
-
declare type PropType = {
|
|
1799
|
-
kind: "Property";
|
|
1800
|
-
objectType: Type;
|
|
1801
|
-
objectName: string;
|
|
1802
|
-
propertyName:
|
|
1803
|
-
| {
|
|
1804
|
-
kind: "literal";
|
|
1805
|
-
value: PropertyLiteral;
|
|
1806
|
-
}
|
|
1807
|
-
| {
|
|
1808
|
-
kind: "computed";
|
|
1809
|
-
value: Type;
|
|
1810
|
-
};
|
|
1811
|
-
};
|
|
1812
|
-
|
|
1813
|
-
declare type PrunedReactiveScopeBlock = {
|
|
1814
|
-
kind: "pruned-scope";
|
|
1815
|
-
scope: ReactiveScope;
|
|
1816
|
-
instructions: ReactiveBlock;
|
|
1817
|
-
};
|
|
1818
|
-
|
|
1819
|
-
declare type PrunedScopeTerminal = {
|
|
1820
|
-
kind: "pruned-scope";
|
|
1821
|
-
fallthrough: BlockId;
|
|
1822
|
-
block: BlockId;
|
|
1823
|
-
scope: ReactiveScope;
|
|
1824
|
-
id: InstructionId;
|
|
1825
|
-
loc: SourceLocation;
|
|
1826
|
-
};
|
|
1827
|
-
|
|
1828
|
-
declare type ReactFunctionType = "Component" | "Hook" | "Other";
|
|
1829
|
-
|
|
1830
|
-
declare type ReactiveBlock = Array<ReactiveStatement>;
|
|
1831
|
-
|
|
1832
|
-
declare type ReactiveBreakTerminal = {
|
|
1833
|
-
kind: "break";
|
|
1834
|
-
target: BlockId;
|
|
1835
|
-
id: InstructionId;
|
|
1836
|
-
targetKind: ReactiveTerminalTargetKind;
|
|
1837
|
-
loc: SourceLocation;
|
|
1838
|
-
};
|
|
1839
|
-
|
|
1840
|
-
declare type ReactiveContinueTerminal = {
|
|
1841
|
-
kind: "continue";
|
|
1842
|
-
target: BlockId;
|
|
1843
|
-
id: InstructionId;
|
|
1844
|
-
targetKind: ReactiveTerminalTargetKind;
|
|
1845
|
-
loc: SourceLocation;
|
|
1846
|
-
};
|
|
1847
|
-
|
|
1848
|
-
declare type ReactiveDoWhileTerminal = {
|
|
1849
|
-
kind: "do-while";
|
|
1850
|
-
loop: ReactiveBlock;
|
|
1851
|
-
test: ReactiveValue;
|
|
1852
|
-
id: InstructionId;
|
|
1853
|
-
loc: SourceLocation;
|
|
1854
|
-
};
|
|
1855
|
-
|
|
1856
|
-
declare type ReactiveForInTerminal = {
|
|
1857
|
-
kind: "for-in";
|
|
1858
|
-
init: ReactiveValue;
|
|
1859
|
-
loop: ReactiveBlock;
|
|
1860
|
-
id: InstructionId;
|
|
1861
|
-
loc: SourceLocation;
|
|
1862
|
-
};
|
|
1863
|
-
|
|
1864
|
-
declare type ReactiveForOfTerminal = {
|
|
1865
|
-
kind: "for-of";
|
|
1866
|
-
init: ReactiveValue;
|
|
1867
|
-
test: ReactiveValue;
|
|
1868
|
-
loop: ReactiveBlock;
|
|
1869
|
-
id: InstructionId;
|
|
1870
|
-
loc: SourceLocation;
|
|
1871
|
-
};
|
|
1872
|
-
|
|
1873
|
-
declare type ReactiveForTerminal = {
|
|
1874
|
-
kind: "for";
|
|
1875
|
-
init: ReactiveValue;
|
|
1876
|
-
test: ReactiveValue;
|
|
1877
|
-
update: ReactiveValue | null;
|
|
1878
|
-
loop: ReactiveBlock;
|
|
1879
|
-
id: InstructionId;
|
|
1880
|
-
loc: SourceLocation;
|
|
1881
|
-
};
|
|
1882
|
-
|
|
1883
|
-
declare type ReactiveFunction = {
|
|
1884
|
-
loc: SourceLocation;
|
|
1885
|
-
id: ValidIdentifierName | null;
|
|
1886
|
-
nameHint: string | null;
|
|
1887
|
-
params: Array<Place | SpreadPattern>;
|
|
1888
|
-
generator: boolean;
|
|
1889
|
-
async: boolean;
|
|
1890
|
-
body: ReactiveBlock;
|
|
1891
|
-
env: Environment;
|
|
1892
|
-
directives: Array<string>;
|
|
1893
|
-
};
|
|
1894
|
-
|
|
1895
|
-
declare type ReactiveIfTerminal = {
|
|
1896
|
-
kind: "if";
|
|
1897
|
-
test: Place;
|
|
1898
|
-
consequent: ReactiveBlock;
|
|
1899
|
-
alternate: ReactiveBlock | null;
|
|
1900
|
-
id: InstructionId;
|
|
1901
|
-
loc: SourceLocation;
|
|
1902
|
-
};
|
|
1903
|
-
|
|
1904
|
-
declare type ReactiveInstruction = {
|
|
1905
|
-
id: InstructionId;
|
|
1906
|
-
lvalue: Place | null;
|
|
1907
|
-
value: ReactiveValue;
|
|
1908
|
-
effects?: Array<AliasingEffect> | null;
|
|
1909
|
-
loc: SourceLocation;
|
|
1910
|
-
};
|
|
1911
|
-
|
|
1912
|
-
declare type ReactiveInstructionStatement = {
|
|
1913
|
-
kind: "instruction";
|
|
1914
|
-
instruction: ReactiveInstruction;
|
|
1915
|
-
};
|
|
1916
|
-
|
|
1917
|
-
declare type ReactiveLabelTerminal = {
|
|
1918
|
-
kind: "label";
|
|
1919
|
-
block: ReactiveBlock;
|
|
1920
|
-
id: InstructionId;
|
|
1921
|
-
loc: SourceLocation;
|
|
1922
|
-
};
|
|
1923
|
-
|
|
1924
|
-
declare type ReactiveLogicalValue = {
|
|
1925
|
-
kind: "LogicalExpression";
|
|
1926
|
-
operator: t.LogicalExpression["operator"];
|
|
1927
|
-
left: ReactiveValue;
|
|
1928
|
-
right: ReactiveValue;
|
|
1929
|
-
loc: SourceLocation;
|
|
1930
|
-
};
|
|
1931
|
-
|
|
1932
|
-
declare type ReactiveOptionalCallValue = {
|
|
1933
|
-
kind: "OptionalExpression";
|
|
1934
|
-
id: InstructionId;
|
|
1935
|
-
value: ReactiveValue;
|
|
1936
|
-
optional: boolean;
|
|
1937
|
-
loc: SourceLocation;
|
|
1938
|
-
};
|
|
1939
|
-
|
|
1940
|
-
declare type ReactiveReturnTerminal = {
|
|
1941
|
-
kind: "return";
|
|
1942
|
-
value: Place;
|
|
1943
|
-
id: InstructionId;
|
|
1944
|
-
loc: SourceLocation;
|
|
1945
|
-
};
|
|
1946
|
-
|
|
1947
|
-
declare type ReactiveScope = {
|
|
1948
|
-
id: ScopeId;
|
|
1949
|
-
range: MutableRange;
|
|
1950
|
-
dependencies: ReactiveScopeDependencies;
|
|
1951
|
-
declarations: Map<IdentifierId, ReactiveScopeDeclaration>;
|
|
1952
|
-
reassignments: Set<Identifier>;
|
|
1953
|
-
earlyReturnValue: {
|
|
1954
|
-
value: Identifier;
|
|
1955
|
-
loc: SourceLocation;
|
|
1956
|
-
label: BlockId;
|
|
1957
|
-
} | null;
|
|
1958
|
-
merged: Set<ScopeId>;
|
|
1959
|
-
loc: SourceLocation;
|
|
1960
|
-
};
|
|
1961
|
-
|
|
1962
|
-
declare type ReactiveScopeBlock = {
|
|
1963
|
-
kind: "scope";
|
|
1964
|
-
scope: ReactiveScope;
|
|
1965
|
-
instructions: ReactiveBlock;
|
|
1966
|
-
};
|
|
1967
|
-
|
|
1968
|
-
declare type ReactiveScopeDeclaration = {
|
|
1969
|
-
identifier: Identifier;
|
|
1970
|
-
scope: ReactiveScope;
|
|
1971
|
-
};
|
|
1972
|
-
|
|
1973
|
-
declare type ReactiveScopeDependencies = Set<ReactiveScopeDependency>;
|
|
1974
|
-
|
|
1975
|
-
declare type ReactiveScopeDependency = {
|
|
1976
|
-
identifier: Identifier;
|
|
1977
|
-
reactive: boolean;
|
|
1978
|
-
path: DependencyPath;
|
|
1979
|
-
};
|
|
1980
|
-
|
|
1981
|
-
declare type ReactiveScopeTerminal = {
|
|
1982
|
-
kind: "scope";
|
|
1983
|
-
fallthrough: BlockId;
|
|
1984
|
-
block: BlockId;
|
|
1985
|
-
scope: ReactiveScope;
|
|
1986
|
-
id: InstructionId;
|
|
1987
|
-
loc: SourceLocation;
|
|
1988
|
-
};
|
|
1989
|
-
|
|
1990
|
-
declare type ReactiveSequenceValue = {
|
|
1991
|
-
kind: "SequenceExpression";
|
|
1992
|
-
instructions: Array<ReactiveInstruction>;
|
|
1993
|
-
id: InstructionId;
|
|
1994
|
-
value: ReactiveValue;
|
|
1995
|
-
loc: SourceLocation;
|
|
1996
|
-
};
|
|
1997
|
-
|
|
1998
|
-
declare type ReactiveStatement =
|
|
1999
|
-
| ReactiveInstructionStatement
|
|
2000
|
-
| ReactiveTerminalStatement
|
|
2001
|
-
| ReactiveScopeBlock
|
|
2002
|
-
| PrunedReactiveScopeBlock;
|
|
2003
|
-
|
|
2004
|
-
declare type ReactiveSwitchTerminal = {
|
|
2005
|
-
kind: "switch";
|
|
2006
|
-
test: Place;
|
|
2007
|
-
cases: Array<{
|
|
2008
|
-
test: Place | null;
|
|
2009
|
-
block: ReactiveBlock | void;
|
|
2010
|
-
}>;
|
|
2011
|
-
id: InstructionId;
|
|
2012
|
-
loc: SourceLocation;
|
|
2013
|
-
};
|
|
2014
|
-
|
|
2015
|
-
declare type ReactiveTerminal =
|
|
2016
|
-
| ReactiveBreakTerminal
|
|
2017
|
-
| ReactiveContinueTerminal
|
|
2018
|
-
| ReactiveReturnTerminal
|
|
2019
|
-
| ReactiveThrowTerminal
|
|
2020
|
-
| ReactiveSwitchTerminal
|
|
2021
|
-
| ReactiveDoWhileTerminal
|
|
2022
|
-
| ReactiveWhileTerminal
|
|
2023
|
-
| ReactiveForTerminal
|
|
2024
|
-
| ReactiveForOfTerminal
|
|
2025
|
-
| ReactiveForInTerminal
|
|
2026
|
-
| ReactiveIfTerminal
|
|
2027
|
-
| ReactiveLabelTerminal
|
|
2028
|
-
| ReactiveTryTerminal;
|
|
2029
|
-
|
|
2030
|
-
declare type ReactiveTerminalStatement<
|
|
2031
|
-
Tterminal extends ReactiveTerminal = ReactiveTerminal,
|
|
2032
|
-
> = {
|
|
2033
|
-
kind: "terminal";
|
|
2034
|
-
terminal: Tterminal;
|
|
2035
|
-
label: {
|
|
2036
|
-
id: BlockId;
|
|
2037
|
-
implicit: boolean;
|
|
2038
|
-
} | null;
|
|
2039
|
-
};
|
|
2040
|
-
|
|
2041
|
-
declare type ReactiveTerminalTargetKind = "implicit" | "labeled" | "unlabeled";
|
|
2042
|
-
|
|
2043
|
-
declare type ReactiveTernaryValue = {
|
|
2044
|
-
kind: "ConditionalExpression";
|
|
2045
|
-
test: ReactiveValue;
|
|
2046
|
-
consequent: ReactiveValue;
|
|
2047
|
-
alternate: ReactiveValue;
|
|
2048
|
-
loc: SourceLocation;
|
|
2049
|
-
};
|
|
2050
|
-
|
|
2051
|
-
declare type ReactiveThrowTerminal = {
|
|
2052
|
-
kind: "throw";
|
|
2053
|
-
value: Place;
|
|
2054
|
-
id: InstructionId;
|
|
2055
|
-
loc: SourceLocation;
|
|
2056
|
-
};
|
|
2057
|
-
|
|
2058
|
-
declare type ReactiveTryTerminal = {
|
|
2059
|
-
kind: "try";
|
|
2060
|
-
block: ReactiveBlock;
|
|
2061
|
-
handlerBinding: Place | null;
|
|
2062
|
-
handler: ReactiveBlock;
|
|
2063
|
-
id: InstructionId;
|
|
2064
|
-
loc: SourceLocation;
|
|
2065
|
-
};
|
|
2066
|
-
|
|
2067
|
-
declare type ReactiveValue =
|
|
2068
|
-
| InstructionValue
|
|
2069
|
-
| ReactiveLogicalValue
|
|
2070
|
-
| ReactiveSequenceValue
|
|
2071
|
-
| ReactiveTernaryValue
|
|
2072
|
-
| ReactiveOptionalCallValue;
|
|
2073
|
-
|
|
2074
|
-
declare type ReactiveWhileTerminal = {
|
|
2075
|
-
kind: "while";
|
|
2076
|
-
test: ReactiveValue;
|
|
2077
|
-
loop: ReactiveBlock;
|
|
2078
|
-
id: InstructionId;
|
|
2079
|
-
loc: SourceLocation;
|
|
2080
|
-
};
|
|
2081
|
-
|
|
2082
|
-
declare type ResolvedType = {
|
|
2083
|
-
kind: "Concrete";
|
|
2084
|
-
type: ConcreteType<ResolvedType>;
|
|
2085
|
-
platform: Platform;
|
|
2086
|
-
};
|
|
2087
|
-
|
|
2088
93
|
/**
|
|
2089
94
|
* Resolves the relative entry paths for a Sanity project without writing any
|
|
2090
95
|
* runtime files to disk. Used by federation builds that skip the full runtime
|
|
@@ -2100,40 +105,9 @@ export declare function resolveEntries(options: {
|
|
|
2100
105
|
relativeEntry: string | null;
|
|
2101
106
|
}>;
|
|
2102
107
|
|
|
2103
|
-
declare interface Result<T, E> {
|
|
2104
|
-
map<U>(fn: (val: T) => U): Result<U, E>;
|
|
2105
|
-
mapErr<F>(fn: (val: E) => F): Result<T, F>;
|
|
2106
|
-
mapOr<U>(fallback: U, fn: (val: T) => U): U;
|
|
2107
|
-
mapOrElse<U>(fallback: () => U, fn: (val: T) => U): U;
|
|
2108
|
-
andThen<U>(fn: (val: T) => Result<U, E>): Result<U, E>;
|
|
2109
|
-
and<U>(res: Result<U, E>): Result<U, E>;
|
|
2110
|
-
or(res: Result<T, E>): Result<T, E>;
|
|
2111
|
-
orElse<F>(fn: (val: E) => Result<T, F>): Result<T, F>;
|
|
2112
|
-
isOk(): this is OkImpl<T>;
|
|
2113
|
-
isErr(): this is ErrImpl<E>;
|
|
2114
|
-
expect(msg: string): T;
|
|
2115
|
-
expectErr(msg: string): E;
|
|
2116
|
-
unwrap(): T;
|
|
2117
|
-
unwrapOr(fallback: T): T;
|
|
2118
|
-
unwrapOrElse(fallback: (val: E) => T): T;
|
|
2119
|
-
unwrapErr(): E;
|
|
2120
|
-
}
|
|
2121
|
-
|
|
2122
|
-
declare type ReturnTerminal = {
|
|
2123
|
-
kind: "return";
|
|
2124
|
-
returnVariant: ReturnVariant;
|
|
2125
|
-
loc: SourceLocation;
|
|
2126
|
-
value: Place;
|
|
2127
|
-
id: InstructionId;
|
|
2128
|
-
fallthrough?: never;
|
|
2129
|
-
effects: Array<AliasingEffect> | null;
|
|
2130
|
-
};
|
|
2131
|
-
|
|
2132
|
-
declare type ReturnVariant = "Void" | "Implicit" | "Explicit";
|
|
2133
|
-
|
|
2134
108
|
declare interface RuntimeOptions {
|
|
2135
109
|
cwd: string;
|
|
2136
|
-
reactStrictMode: boolean;
|
|
110
|
+
reactStrictMode: boolean | undefined;
|
|
2137
111
|
watch: boolean;
|
|
2138
112
|
appTitle?: string;
|
|
2139
113
|
basePath?: string;
|
|
@@ -2149,47 +123,6 @@ declare interface RuntimeOptions {
|
|
|
2149
123
|
*/
|
|
2150
124
|
export declare const SANITY_CACHE_DIR = "node_modules/.sanity";
|
|
2151
125
|
|
|
2152
|
-
declare type ScopeId = number & {
|
|
2153
|
-
[opaqueScopeId]: "ScopeId";
|
|
2154
|
-
};
|
|
2155
|
-
|
|
2156
|
-
declare type SequenceTerminal = {
|
|
2157
|
-
kind: "sequence";
|
|
2158
|
-
block: BlockId;
|
|
2159
|
-
fallthrough: BlockId;
|
|
2160
|
-
id: InstructionId;
|
|
2161
|
-
loc: SourceLocation;
|
|
2162
|
-
};
|
|
2163
|
-
|
|
2164
|
-
declare type SourceLocation = t.SourceLocation | typeof GeneratedSource;
|
|
2165
|
-
|
|
2166
|
-
declare type SpreadPattern = {
|
|
2167
|
-
kind: "Spread";
|
|
2168
|
-
place: Place;
|
|
2169
|
-
};
|
|
2170
|
-
|
|
2171
|
-
declare type StartMemoize = {
|
|
2172
|
-
kind: "StartMemoize";
|
|
2173
|
-
manualMemoId: number;
|
|
2174
|
-
deps: Array<ManualMemoDependency> | null;
|
|
2175
|
-
loc: SourceLocation;
|
|
2176
|
-
};
|
|
2177
|
-
|
|
2178
|
-
declare type StoreGlobal = {
|
|
2179
|
-
kind: "StoreGlobal";
|
|
2180
|
-
name: string;
|
|
2181
|
-
value: Place;
|
|
2182
|
-
loc: SourceLocation;
|
|
2183
|
-
};
|
|
2184
|
-
|
|
2185
|
-
declare type StoreLocal = {
|
|
2186
|
-
kind: "StoreLocal";
|
|
2187
|
-
lvalue: LValue;
|
|
2188
|
-
value: Place;
|
|
2189
|
-
type: t.FlowType | t.TSType | null;
|
|
2190
|
-
loc: SourceLocation;
|
|
2191
|
-
};
|
|
2192
|
-
|
|
2193
126
|
export declare const StudioBuildTrace: DefinedTelemetryTrace<
|
|
2194
127
|
{
|
|
2195
128
|
outputSize: number;
|
|
@@ -2197,157 +130,12 @@ export declare const StudioBuildTrace: DefinedTelemetryTrace<
|
|
|
2197
130
|
void
|
|
2198
131
|
>;
|
|
2199
132
|
|
|
2200
|
-
declare type SuppressionRange = {
|
|
2201
|
-
disableComment: t.Comment;
|
|
2202
|
-
enableComment: t.Comment | null;
|
|
2203
|
-
source: SuppressionSource;
|
|
2204
|
-
};
|
|
2205
|
-
|
|
2206
|
-
declare type SuppressionSource = "Eslint" | "Flow";
|
|
2207
|
-
|
|
2208
|
-
declare type SwitchTerminal = {
|
|
2209
|
-
kind: "switch";
|
|
2210
|
-
test: Place;
|
|
2211
|
-
cases: Array<Case>;
|
|
2212
|
-
fallthrough: BlockId;
|
|
2213
|
-
id: InstructionId;
|
|
2214
|
-
loc: SourceLocation;
|
|
2215
|
-
};
|
|
2216
|
-
|
|
2217
|
-
declare type Terminal =
|
|
2218
|
-
| UnsupportedTerminal
|
|
2219
|
-
| UnreachableTerminal
|
|
2220
|
-
| ThrowTerminal
|
|
2221
|
-
| ReturnTerminal
|
|
2222
|
-
| GotoTerminal
|
|
2223
|
-
| IfTerminal
|
|
2224
|
-
| BranchTerminal
|
|
2225
|
-
| SwitchTerminal
|
|
2226
|
-
| ForTerminal
|
|
2227
|
-
| ForOfTerminal
|
|
2228
|
-
| ForInTerminal
|
|
2229
|
-
| DoWhileTerminal
|
|
2230
|
-
| WhileTerminal
|
|
2231
|
-
| LogicalTerminal
|
|
2232
|
-
| TernaryTerminal
|
|
2233
|
-
| OptionalTerminal
|
|
2234
|
-
| LabelTerminal
|
|
2235
|
-
| SequenceTerminal
|
|
2236
|
-
| MaybeThrowTerminal
|
|
2237
|
-
| TryTerminal
|
|
2238
|
-
| ReactiveScopeTerminal
|
|
2239
|
-
| PrunedScopeTerminal;
|
|
2240
|
-
|
|
2241
|
-
declare type TernaryTerminal = {
|
|
2242
|
-
kind: "ternary";
|
|
2243
|
-
test: BlockId;
|
|
2244
|
-
fallthrough: BlockId;
|
|
2245
|
-
id: InstructionId;
|
|
2246
|
-
loc: SourceLocation;
|
|
2247
|
-
};
|
|
2248
|
-
|
|
2249
|
-
declare type ThrowTerminal = {
|
|
2250
|
-
kind: "throw";
|
|
2251
|
-
value: Place;
|
|
2252
|
-
id: InstructionId;
|
|
2253
|
-
loc: SourceLocation;
|
|
2254
|
-
fallthrough?: never;
|
|
2255
|
-
};
|
|
2256
|
-
|
|
2257
|
-
declare type TimingEvent = {
|
|
2258
|
-
kind: "Timing";
|
|
2259
|
-
measurement: PerformanceMeasure;
|
|
2260
|
-
};
|
|
2261
|
-
|
|
2262
133
|
declare interface TrackedPackage {
|
|
2263
134
|
deprecatedBelow: string | null;
|
|
2264
135
|
name: string;
|
|
2265
136
|
supported: string[];
|
|
2266
137
|
}
|
|
2267
138
|
|
|
2268
|
-
declare type TryTerminal = {
|
|
2269
|
-
kind: "try";
|
|
2270
|
-
block: BlockId;
|
|
2271
|
-
handlerBinding: Place | null;
|
|
2272
|
-
handler: BlockId;
|
|
2273
|
-
fallthrough: BlockId;
|
|
2274
|
-
id: InstructionId;
|
|
2275
|
-
loc: SourceLocation;
|
|
2276
|
-
};
|
|
2277
|
-
|
|
2278
|
-
declare type Type =
|
|
2279
|
-
| BuiltInType
|
|
2280
|
-
| PhiType
|
|
2281
|
-
| TypeVar
|
|
2282
|
-
| PolyType
|
|
2283
|
-
| PropType
|
|
2284
|
-
| ObjectMethod$1;
|
|
2285
|
-
|
|
2286
|
-
declare type TypeId = number & {
|
|
2287
|
-
[opaqueTypeId]: "IdentifierId";
|
|
2288
|
-
};
|
|
2289
|
-
|
|
2290
|
-
declare type TypeParameter<T> = {
|
|
2291
|
-
name: string;
|
|
2292
|
-
id: TypeParameterId;
|
|
2293
|
-
bound: T;
|
|
2294
|
-
};
|
|
2295
|
-
|
|
2296
|
-
declare type TypeParameterId = number & {
|
|
2297
|
-
[opaqueTypeParameterId]: "TypeParameterId";
|
|
2298
|
-
};
|
|
2299
|
-
|
|
2300
|
-
declare type TypeVar = {
|
|
2301
|
-
kind: "Type";
|
|
2302
|
-
id: TypeId;
|
|
2303
|
-
};
|
|
2304
|
-
|
|
2305
|
-
declare type UnreachableTerminal = {
|
|
2306
|
-
kind: "unreachable";
|
|
2307
|
-
id: InstructionId;
|
|
2308
|
-
loc: SourceLocation;
|
|
2309
|
-
fallthrough?: never;
|
|
2310
|
-
};
|
|
2311
|
-
|
|
2312
|
-
declare type UnsupportedTerminal = {
|
|
2313
|
-
kind: "unsupported";
|
|
2314
|
-
id: InstructionId;
|
|
2315
|
-
loc: SourceLocation;
|
|
2316
|
-
fallthrough?: never;
|
|
2317
|
-
};
|
|
2318
|
-
|
|
2319
|
-
declare type ValidatedIdentifier = {
|
|
2320
|
-
kind: "named";
|
|
2321
|
-
value: ValidIdentifierName;
|
|
2322
|
-
};
|
|
2323
|
-
|
|
2324
|
-
declare type ValidIdentifierName = string & {
|
|
2325
|
-
[opaqueValidIdentifierName]: "ValidIdentifierName";
|
|
2326
|
-
};
|
|
2327
|
-
|
|
2328
|
-
declare enum ValueKind {
|
|
2329
|
-
MaybeFrozen = "maybefrozen",
|
|
2330
|
-
Frozen = "frozen",
|
|
2331
|
-
Primitive = "primitive",
|
|
2332
|
-
Global = "global",
|
|
2333
|
-
Mutable = "mutable",
|
|
2334
|
-
Context = "context",
|
|
2335
|
-
}
|
|
2336
|
-
|
|
2337
|
-
declare enum ValueReason {
|
|
2338
|
-
Global = "global",
|
|
2339
|
-
JsxCaptured = "jsx-captured",
|
|
2340
|
-
HookCaptured = "hook-captured",
|
|
2341
|
-
HookReturn = "hook-return",
|
|
2342
|
-
Effect = "effect",
|
|
2343
|
-
KnownReturnSignature = "known-return-signature",
|
|
2344
|
-
Context = "context",
|
|
2345
|
-
State = "state",
|
|
2346
|
-
ReducerState = "reducer-state",
|
|
2347
|
-
ReactiveFunctionArgument = "reactive-function-argument",
|
|
2348
|
-
Other = "other",
|
|
2349
|
-
}
|
|
2350
|
-
|
|
2351
139
|
declare interface VendorBuildOptions {
|
|
2352
140
|
basePath: string;
|
|
2353
141
|
cwd: string;
|
|
@@ -2426,15 +214,6 @@ declare interface ViteOptions extends Pick<CliConfig, "schemaExtraction"> {
|
|
|
2426
214
|
views?: readonly InterfaceArtifact[];
|
|
2427
215
|
}
|
|
2428
216
|
|
|
2429
|
-
declare type WhileTerminal = {
|
|
2430
|
-
kind: "while";
|
|
2431
|
-
loc: SourceLocation;
|
|
2432
|
-
test: BlockId;
|
|
2433
|
-
loop: BlockId;
|
|
2434
|
-
fallthrough: BlockId;
|
|
2435
|
-
id: InstructionId;
|
|
2436
|
-
};
|
|
2437
|
-
|
|
2438
217
|
/**
|
|
2439
218
|
* @internal
|
|
2440
219
|
*/
|