@suss/adapter-typescript 0.34.1 → 0.35.0
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/README.md +8 -0
- package/dist/index.cjs +2695 -2000
- package/dist/index.d.cts +88 -13
- package/dist/index.d.ts +88 -13
- package/dist/index.js +2335 -1628
- package/package.json +6 -6
package/dist/index.d.cts
CHANGED
|
@@ -104,6 +104,15 @@ interface PassedArgument {
|
|
|
104
104
|
call: Node;
|
|
105
105
|
argument: Node;
|
|
106
106
|
}
|
|
107
|
+
/** What a call that takes its function out of a table may run. */
|
|
108
|
+
interface DispatchedCall {
|
|
109
|
+
/** Every function it may run. */
|
|
110
|
+
functions: readonly Node[];
|
|
111
|
+
/** True when the source narrows the call to one entry that is one function. */
|
|
112
|
+
certain: boolean;
|
|
113
|
+
/** How many entries came to no function this run read. */
|
|
114
|
+
unresolved: number;
|
|
115
|
+
}
|
|
107
116
|
/** See `ResolutionStore.envNamers`. */
|
|
108
117
|
interface EnvironmentNamers {
|
|
109
118
|
/**
|
|
@@ -149,6 +158,8 @@ declare class ResolutionStore {
|
|
|
149
158
|
/** See `notePossibleCallers`. */
|
|
150
159
|
private readonly possibleCallers;
|
|
151
160
|
private readonly callerFilesRead;
|
|
161
|
+
/** Containers whose writes `dispatchedFunctions` has already stated. */
|
|
162
|
+
private readonly containersRead;
|
|
152
163
|
private stale;
|
|
153
164
|
constructor(wrappers?: TransparentWrapper[], environmentObjects?: readonly string[], runtime?: RuntimeSpellings, parameterSuppliers?: readonly ParameterSupplier[]);
|
|
154
165
|
/** A store with the wrappers and runtime objects these packs declare, as an extraction over them starts from. */
|
|
@@ -252,6 +263,21 @@ declare class ResolutionStore {
|
|
|
252
263
|
* arrives at them.
|
|
253
264
|
*/
|
|
254
265
|
argumentsPassedTo(parameter: Node): PassedArgument[];
|
|
266
|
+
/**
|
|
267
|
+
* What each call may run when it takes its function out of a table or
|
|
268
|
+
* a map. The writes into each table are read before the answer is,
|
|
269
|
+
* since a registry fills one from a body no question passes through.
|
|
270
|
+
* A call that takes no function from a table is left out.
|
|
271
|
+
*/
|
|
272
|
+
dispatchedFunctions(calls: readonly Node[]): Map<Node, DispatchedCall>;
|
|
273
|
+
private askDispatch;
|
|
274
|
+
private nodesFor;
|
|
275
|
+
/**
|
|
276
|
+
* States the writes into each container not read before, and reads the
|
|
277
|
+
* files that may call a function writing one, since a registry is
|
|
278
|
+
* usually filled by a function its callers pass handlers to.
|
|
279
|
+
*/
|
|
280
|
+
private readContainerWrites;
|
|
255
281
|
/**
|
|
256
282
|
* The other direction from `argumentsPassedTo`: every call in this
|
|
257
283
|
* parameter's own function, or a closure nested inside it, that hands
|
|
@@ -346,6 +372,20 @@ declare class ResolutionStore {
|
|
|
346
372
|
* what keeps a wrapper's own result apart from the library's.
|
|
347
373
|
*/
|
|
348
374
|
returnsCall(func: Node, call: Node): boolean;
|
|
375
|
+
/**
|
|
376
|
+
* Each expression a function's returns hand back, as written. Unlike
|
|
377
|
+
* `returnsCall`, a call into a library comes back too, since a caller
|
|
378
|
+
* asking this wants to see where the project's own code stops.
|
|
379
|
+
*/
|
|
380
|
+
returnedValuesOf(func: Node): Node[];
|
|
381
|
+
/**
|
|
382
|
+
* Every call made through this parameter, in its own function or in
|
|
383
|
+
* a closure written inside it, which is how a wrapper runs the
|
|
384
|
+
* handler it was given.
|
|
385
|
+
*/
|
|
386
|
+
callsThrough(parameter: Node): Node[];
|
|
387
|
+
/** Every name the facts record as referring to this declaration. */
|
|
388
|
+
referencesTo(declaration: Node): Node[];
|
|
349
389
|
/**
|
|
350
390
|
* What the reads of a local do with it, when `receiver` is a local a
|
|
351
391
|
* function declares once as `construction`. Null for anything else,
|
|
@@ -835,13 +875,21 @@ interface DiscoveredUnit {
|
|
|
835
875
|
*/
|
|
836
876
|
unfollowed?: UnfollowedCall;
|
|
837
877
|
/**
|
|
838
|
-
* The functions
|
|
839
|
-
* `router.post("/", validate, handler)
|
|
840
|
-
*
|
|
841
|
-
*
|
|
842
|
-
*
|
|
878
|
+
* The functions that run around this handler on its route alone, in
|
|
879
|
+
* the order they run: the ones `router.post("/", validate, handler)`
|
|
880
|
+
* lists before it, or the layers a route export written as
|
|
881
|
+
* `withAuth(handler)` puts around it. A reference points at the
|
|
882
|
+
* layer's own summary, and a layer the run could not read has none.
|
|
883
|
+
* They run inside whatever the app registers for every route, so they
|
|
884
|
+
* are applied after those.
|
|
843
885
|
*/
|
|
844
886
|
routeWrappers?: WrapperReference[];
|
|
887
|
+
/**
|
|
888
|
+
* Set on the closure a wrapper factory hands back: the position of the
|
|
889
|
+
* factory's parameter it calls to run the handler it was given. That
|
|
890
|
+
* call is the closure's continuation.
|
|
891
|
+
*/
|
|
892
|
+
factoryContinuation?: number;
|
|
845
893
|
/**
|
|
846
894
|
* The functions listed before this handler that a project factory
|
|
847
895
|
* returned and the store could not follow, one stop per call.
|
|
@@ -1188,7 +1236,8 @@ interface TypeScriptAdapterConfig {
|
|
|
1188
1236
|
onExtractionReport?: (report: ExtractionReport) => void;
|
|
1189
1237
|
/**
|
|
1190
1238
|
* Absolute. `.suss/cache/` in `walkedDirectory` when set, otherwise
|
|
1191
|
-
* beside the tsconfig
|
|
1239
|
+
* beside the tsconfig, or under `SUSS_CACHE_DIR` when that is set;
|
|
1240
|
+
* `null` turns it off.
|
|
1192
1241
|
*/
|
|
1193
1242
|
cacheDir?: string | null;
|
|
1194
1243
|
/** The modules the project lists in `suss.json`, with absolute paths. */
|
|
@@ -1546,6 +1595,12 @@ declare function specifierImportedAs(sourceFile: SourceFile, local: string): str
|
|
|
1546
1595
|
/** Every import declaration in the file that names one of `modules`. */
|
|
1547
1596
|
declare function importDeclarationsOf(sourceFile: SourceFile, modules: readonly string[], options?: ImportScanOptions): ImportDeclaration[];
|
|
1548
1597
|
|
|
1598
|
+
/**
|
|
1599
|
+
* The name a property of an object literal is written under, or null
|
|
1600
|
+
* for a spread, which has none, and for a computed key.
|
|
1601
|
+
*/
|
|
1602
|
+
declare function propertyNameOf(property: Node): string | null;
|
|
1603
|
+
|
|
1549
1604
|
/**
|
|
1550
1605
|
* What a value at a discovery site turns out to be, whether it was
|
|
1551
1606
|
* written out there or referred to by name.
|
|
@@ -1581,11 +1636,6 @@ declare function propertyValueOf(property: Node): Node | null;
|
|
|
1581
1636
|
* arrives as a parameter, which nothing here can follow.
|
|
1582
1637
|
*/
|
|
1583
1638
|
declare function functionValueOf(value: Node, resolution: ResolutionStore | undefined): FunctionRoot | null;
|
|
1584
|
-
/**
|
|
1585
|
-
* The name a property of an object literal is written under, or null
|
|
1586
|
-
* for a spread, which has none.
|
|
1587
|
-
*/
|
|
1588
|
-
declare function propertyNameOf(property: Node): string | null;
|
|
1589
1639
|
/**
|
|
1590
1640
|
* The function a property of an object literal is set to. A method
|
|
1591
1641
|
* written into the literal is that function; a property set to a name
|
|
@@ -1983,6 +2033,31 @@ declare function workspaceRootFor(anchor: string): string;
|
|
|
1983
2033
|
* the folder, which is at least what somebody typed.
|
|
1984
2034
|
*/
|
|
1985
2035
|
declare function workspaceNameFor(root: string | undefined): string | null;
|
|
2036
|
+
/** A file as a summary records it: the project it is in, and its path from that project's root. */
|
|
2037
|
+
interface FilePlace {
|
|
2038
|
+
/** Absolute. */
|
|
2039
|
+
root: string;
|
|
2040
|
+
workspace: string | null;
|
|
2041
|
+
file: string;
|
|
2042
|
+
}
|
|
2043
|
+
/**
|
|
2044
|
+
* Where a file belongs when it is read as part of its own project: the
|
|
2045
|
+
* root an extract of that project measures from, the project's name, and
|
|
2046
|
+
* the file's path from that root.
|
|
2047
|
+
*/
|
|
2048
|
+
declare function projectPlaceOf(file: string): FilePlace;
|
|
2049
|
+
/**
|
|
2050
|
+
* Where a file outside the run's root belongs, such as a sibling package
|
|
2051
|
+
* reached through a workspace link, or null for a file under the root.
|
|
2052
|
+
* The path the link leads to never appears, so every checkout agrees.
|
|
2053
|
+
*/
|
|
2054
|
+
declare function placeOutsideRun(file: string, runRoot: string): FilePlace | null;
|
|
2055
|
+
/**
|
|
2056
|
+
* How a summary writes a path on disk that it mentions, such as an
|
|
2057
|
+
* import: its path from the run's root, or the other project's name and
|
|
2058
|
+
* the path from that project's root for a file outside the run.
|
|
2059
|
+
*/
|
|
2060
|
+
declare function pathFromRun(file: string, runRoot: string): string;
|
|
1986
2061
|
|
|
1987
2062
|
/** What a call writes out, and whether it was serialized as JSON first. */
|
|
1988
2063
|
interface WrittenPayload {
|
|
@@ -2034,7 +2109,7 @@ declare function receiverTypesOf(node: Node): ReceiverType[];
|
|
|
2034
2109
|
* that affects extraction output: IR shape, discovery semantics,
|
|
2035
2110
|
* terminal classification, anything that would invalidate previously
|
|
2036
2111
|
* cached summaries. `createAdapterStamp` (from `@suss/extractor`) folds
|
|
2037
|
-
* it together with a hash of this adapter
|
|
2112
|
+
* it together with a hash of the code this adapter loads, so a
|
|
2038
2113
|
* rebuilt dev build invalidates the cache even when nobody remembered
|
|
2039
2114
|
* to bump the constant. See that package's README for the full design.
|
|
2040
2115
|
*/
|
|
@@ -2099,4 +2174,4 @@ declare function climbSyntax(node: Node): Node;
|
|
|
2099
2174
|
*/
|
|
2100
2175
|
declare function peelValue(node: Node): Node;
|
|
2101
2176
|
|
|
2102
|
-
export { ADAPTER_VERSION, type Accessed, type CallAccountingEntry, type CallAccountingOutcome, type ClientCallSite, type ConfiguredCallContext, type ConfiguredCallRead, type ConfiguredCallSpec, type ContractReadResult, type DescentBarriers, type DiscoveredUnit, type EnvironmentNamers, type ExplainCallableOptions, type ExplainedResolution, type FoundTerminal, type FunctionRoot, GENERIC_TERMINALS, type ImportScanOptions, NO_BARRIERS, type ObservedStubCall, type RawBranchResult, type ReadNameOptions, type ReceiverType, type RefreshReport, ResolutionStore, SOURCE_SUFFIXES, type StubCallEvidence, type StubEvidenceOptions, TSCONFIG_NAMES, type TsAccessRecognizerContext, type TsDiscoveryContext, type TsInvocationRecognizerContext, type TsJsxAttributeLocation, type TsSubUnitContext, type TypeScriptAdapter, type TypeScriptAdapterConfig, TypeScriptWhySession, type WhySessionOptions, type WrittenPayload, accessContextFor, arrayLiteralOf, buildProjectHelperIndex, callOpsFor, climbSyntax, collectAncestorBranches, collectClientFieldAccesses, computeAdapterPacksDigest, couldNameAValue, createProjectWithoutTsconfig, createTsDiscoveryContext, createTsSubUnitContext, createTypeScriptAdapter, declarationsBehind, discoverUnits, exportedDeclarationsOf, extractCodeStructure, extractRawBranches, findEnclosingFunction, findNearestTsconfig, findTerminals, functionTargetOf, functionValueOf, hasBody, importDeclarationsOf, importedNamesOf, importedRootsOf, invocationContextFor, isDefaultedAt, isImportedFrom, methodDeclaredIn, namedImportsOf, numberValueOf, objectLiteralOf, parseConditionExpression, peelSyntax, peelValue, propertiesOf, propertyFunctionOf, propertyNameOf, propertyOf, propertyValueOf, readConfiguredCall, readContract, readContractForClientCall, readName, readTsconfigFileList, receiverTypesOf, resolveAliasedSymbol, resolveSubject, rootIdentifier, specifierImportedAs, startsItsOwnScope, stringPropertyOf, stringValueOf, stubEvidence, stubEvidenceIn, symbolBehind, toFunctionRoot, workspaceNameFor, workspaceRootFor, writtenNodeOf, writtenPayloadOf };
|
|
2177
|
+
export { ADAPTER_VERSION, type Accessed, type CallAccountingEntry, type CallAccountingOutcome, type ClientCallSite, type ConfiguredCallContext, type ConfiguredCallRead, type ConfiguredCallSpec, type ContractReadResult, type DescentBarriers, type DiscoveredUnit, type EnvironmentNamers, type ExplainCallableOptions, type ExplainedResolution, type FilePlace, type FoundTerminal, type FunctionRoot, GENERIC_TERMINALS, type ImportScanOptions, NO_BARRIERS, type ObservedStubCall, type RawBranchResult, type ReadNameOptions, type ReceiverType, type RefreshReport, ResolutionStore, SOURCE_SUFFIXES, type StubCallEvidence, type StubEvidenceOptions, TSCONFIG_NAMES, type TsAccessRecognizerContext, type TsDiscoveryContext, type TsInvocationRecognizerContext, type TsJsxAttributeLocation, type TsSubUnitContext, type TypeScriptAdapter, type TypeScriptAdapterConfig, TypeScriptWhySession, type WhySessionOptions, type WrittenPayload, accessContextFor, arrayLiteralOf, buildProjectHelperIndex, callOpsFor, climbSyntax, collectAncestorBranches, collectClientFieldAccesses, computeAdapterPacksDigest, couldNameAValue, createProjectWithoutTsconfig, createTsDiscoveryContext, createTsSubUnitContext, createTypeScriptAdapter, declarationsBehind, discoverUnits, exportedDeclarationsOf, extractCodeStructure, extractRawBranches, findEnclosingFunction, findNearestTsconfig, findTerminals, functionTargetOf, functionValueOf, hasBody, importDeclarationsOf, importedNamesOf, importedRootsOf, invocationContextFor, isDefaultedAt, isImportedFrom, methodDeclaredIn, namedImportsOf, numberValueOf, objectLiteralOf, parseConditionExpression, pathFromRun, peelSyntax, peelValue, placeOutsideRun, projectPlaceOf, propertiesOf, propertyFunctionOf, propertyNameOf, propertyOf, propertyValueOf, readConfiguredCall, readContract, readContractForClientCall, readName, readTsconfigFileList, receiverTypesOf, resolveAliasedSymbol, resolveSubject, rootIdentifier, specifierImportedAs, startsItsOwnScope, stringPropertyOf, stringValueOf, stubEvidence, stubEvidenceIn, symbolBehind, toFunctionRoot, workspaceNameFor, workspaceRootFor, writtenNodeOf, writtenPayloadOf };
|
package/dist/index.d.ts
CHANGED
|
@@ -104,6 +104,15 @@ interface PassedArgument {
|
|
|
104
104
|
call: Node;
|
|
105
105
|
argument: Node;
|
|
106
106
|
}
|
|
107
|
+
/** What a call that takes its function out of a table may run. */
|
|
108
|
+
interface DispatchedCall {
|
|
109
|
+
/** Every function it may run. */
|
|
110
|
+
functions: readonly Node[];
|
|
111
|
+
/** True when the source narrows the call to one entry that is one function. */
|
|
112
|
+
certain: boolean;
|
|
113
|
+
/** How many entries came to no function this run read. */
|
|
114
|
+
unresolved: number;
|
|
115
|
+
}
|
|
107
116
|
/** See `ResolutionStore.envNamers`. */
|
|
108
117
|
interface EnvironmentNamers {
|
|
109
118
|
/**
|
|
@@ -149,6 +158,8 @@ declare class ResolutionStore {
|
|
|
149
158
|
/** See `notePossibleCallers`. */
|
|
150
159
|
private readonly possibleCallers;
|
|
151
160
|
private readonly callerFilesRead;
|
|
161
|
+
/** Containers whose writes `dispatchedFunctions` has already stated. */
|
|
162
|
+
private readonly containersRead;
|
|
152
163
|
private stale;
|
|
153
164
|
constructor(wrappers?: TransparentWrapper[], environmentObjects?: readonly string[], runtime?: RuntimeSpellings, parameterSuppliers?: readonly ParameterSupplier[]);
|
|
154
165
|
/** A store with the wrappers and runtime objects these packs declare, as an extraction over them starts from. */
|
|
@@ -252,6 +263,21 @@ declare class ResolutionStore {
|
|
|
252
263
|
* arrives at them.
|
|
253
264
|
*/
|
|
254
265
|
argumentsPassedTo(parameter: Node): PassedArgument[];
|
|
266
|
+
/**
|
|
267
|
+
* What each call may run when it takes its function out of a table or
|
|
268
|
+
* a map. The writes into each table are read before the answer is,
|
|
269
|
+
* since a registry fills one from a body no question passes through.
|
|
270
|
+
* A call that takes no function from a table is left out.
|
|
271
|
+
*/
|
|
272
|
+
dispatchedFunctions(calls: readonly Node[]): Map<Node, DispatchedCall>;
|
|
273
|
+
private askDispatch;
|
|
274
|
+
private nodesFor;
|
|
275
|
+
/**
|
|
276
|
+
* States the writes into each container not read before, and reads the
|
|
277
|
+
* files that may call a function writing one, since a registry is
|
|
278
|
+
* usually filled by a function its callers pass handlers to.
|
|
279
|
+
*/
|
|
280
|
+
private readContainerWrites;
|
|
255
281
|
/**
|
|
256
282
|
* The other direction from `argumentsPassedTo`: every call in this
|
|
257
283
|
* parameter's own function, or a closure nested inside it, that hands
|
|
@@ -346,6 +372,20 @@ declare class ResolutionStore {
|
|
|
346
372
|
* what keeps a wrapper's own result apart from the library's.
|
|
347
373
|
*/
|
|
348
374
|
returnsCall(func: Node, call: Node): boolean;
|
|
375
|
+
/**
|
|
376
|
+
* Each expression a function's returns hand back, as written. Unlike
|
|
377
|
+
* `returnsCall`, a call into a library comes back too, since a caller
|
|
378
|
+
* asking this wants to see where the project's own code stops.
|
|
379
|
+
*/
|
|
380
|
+
returnedValuesOf(func: Node): Node[];
|
|
381
|
+
/**
|
|
382
|
+
* Every call made through this parameter, in its own function or in
|
|
383
|
+
* a closure written inside it, which is how a wrapper runs the
|
|
384
|
+
* handler it was given.
|
|
385
|
+
*/
|
|
386
|
+
callsThrough(parameter: Node): Node[];
|
|
387
|
+
/** Every name the facts record as referring to this declaration. */
|
|
388
|
+
referencesTo(declaration: Node): Node[];
|
|
349
389
|
/**
|
|
350
390
|
* What the reads of a local do with it, when `receiver` is a local a
|
|
351
391
|
* function declares once as `construction`. Null for anything else,
|
|
@@ -835,13 +875,21 @@ interface DiscoveredUnit {
|
|
|
835
875
|
*/
|
|
836
876
|
unfollowed?: UnfollowedCall;
|
|
837
877
|
/**
|
|
838
|
-
* The functions
|
|
839
|
-
* `router.post("/", validate, handler)
|
|
840
|
-
*
|
|
841
|
-
*
|
|
842
|
-
*
|
|
878
|
+
* The functions that run around this handler on its route alone, in
|
|
879
|
+
* the order they run: the ones `router.post("/", validate, handler)`
|
|
880
|
+
* lists before it, or the layers a route export written as
|
|
881
|
+
* `withAuth(handler)` puts around it. A reference points at the
|
|
882
|
+
* layer's own summary, and a layer the run could not read has none.
|
|
883
|
+
* They run inside whatever the app registers for every route, so they
|
|
884
|
+
* are applied after those.
|
|
843
885
|
*/
|
|
844
886
|
routeWrappers?: WrapperReference[];
|
|
887
|
+
/**
|
|
888
|
+
* Set on the closure a wrapper factory hands back: the position of the
|
|
889
|
+
* factory's parameter it calls to run the handler it was given. That
|
|
890
|
+
* call is the closure's continuation.
|
|
891
|
+
*/
|
|
892
|
+
factoryContinuation?: number;
|
|
845
893
|
/**
|
|
846
894
|
* The functions listed before this handler that a project factory
|
|
847
895
|
* returned and the store could not follow, one stop per call.
|
|
@@ -1188,7 +1236,8 @@ interface TypeScriptAdapterConfig {
|
|
|
1188
1236
|
onExtractionReport?: (report: ExtractionReport) => void;
|
|
1189
1237
|
/**
|
|
1190
1238
|
* Absolute. `.suss/cache/` in `walkedDirectory` when set, otherwise
|
|
1191
|
-
* beside the tsconfig
|
|
1239
|
+
* beside the tsconfig, or under `SUSS_CACHE_DIR` when that is set;
|
|
1240
|
+
* `null` turns it off.
|
|
1192
1241
|
*/
|
|
1193
1242
|
cacheDir?: string | null;
|
|
1194
1243
|
/** The modules the project lists in `suss.json`, with absolute paths. */
|
|
@@ -1546,6 +1595,12 @@ declare function specifierImportedAs(sourceFile: SourceFile, local: string): str
|
|
|
1546
1595
|
/** Every import declaration in the file that names one of `modules`. */
|
|
1547
1596
|
declare function importDeclarationsOf(sourceFile: SourceFile, modules: readonly string[], options?: ImportScanOptions): ImportDeclaration[];
|
|
1548
1597
|
|
|
1598
|
+
/**
|
|
1599
|
+
* The name a property of an object literal is written under, or null
|
|
1600
|
+
* for a spread, which has none, and for a computed key.
|
|
1601
|
+
*/
|
|
1602
|
+
declare function propertyNameOf(property: Node): string | null;
|
|
1603
|
+
|
|
1549
1604
|
/**
|
|
1550
1605
|
* What a value at a discovery site turns out to be, whether it was
|
|
1551
1606
|
* written out there or referred to by name.
|
|
@@ -1581,11 +1636,6 @@ declare function propertyValueOf(property: Node): Node | null;
|
|
|
1581
1636
|
* arrives as a parameter, which nothing here can follow.
|
|
1582
1637
|
*/
|
|
1583
1638
|
declare function functionValueOf(value: Node, resolution: ResolutionStore | undefined): FunctionRoot | null;
|
|
1584
|
-
/**
|
|
1585
|
-
* The name a property of an object literal is written under, or null
|
|
1586
|
-
* for a spread, which has none.
|
|
1587
|
-
*/
|
|
1588
|
-
declare function propertyNameOf(property: Node): string | null;
|
|
1589
1639
|
/**
|
|
1590
1640
|
* The function a property of an object literal is set to. A method
|
|
1591
1641
|
* written into the literal is that function; a property set to a name
|
|
@@ -1983,6 +2033,31 @@ declare function workspaceRootFor(anchor: string): string;
|
|
|
1983
2033
|
* the folder, which is at least what somebody typed.
|
|
1984
2034
|
*/
|
|
1985
2035
|
declare function workspaceNameFor(root: string | undefined): string | null;
|
|
2036
|
+
/** A file as a summary records it: the project it is in, and its path from that project's root. */
|
|
2037
|
+
interface FilePlace {
|
|
2038
|
+
/** Absolute. */
|
|
2039
|
+
root: string;
|
|
2040
|
+
workspace: string | null;
|
|
2041
|
+
file: string;
|
|
2042
|
+
}
|
|
2043
|
+
/**
|
|
2044
|
+
* Where a file belongs when it is read as part of its own project: the
|
|
2045
|
+
* root an extract of that project measures from, the project's name, and
|
|
2046
|
+
* the file's path from that root.
|
|
2047
|
+
*/
|
|
2048
|
+
declare function projectPlaceOf(file: string): FilePlace;
|
|
2049
|
+
/**
|
|
2050
|
+
* Where a file outside the run's root belongs, such as a sibling package
|
|
2051
|
+
* reached through a workspace link, or null for a file under the root.
|
|
2052
|
+
* The path the link leads to never appears, so every checkout agrees.
|
|
2053
|
+
*/
|
|
2054
|
+
declare function placeOutsideRun(file: string, runRoot: string): FilePlace | null;
|
|
2055
|
+
/**
|
|
2056
|
+
* How a summary writes a path on disk that it mentions, such as an
|
|
2057
|
+
* import: its path from the run's root, or the other project's name and
|
|
2058
|
+
* the path from that project's root for a file outside the run.
|
|
2059
|
+
*/
|
|
2060
|
+
declare function pathFromRun(file: string, runRoot: string): string;
|
|
1986
2061
|
|
|
1987
2062
|
/** What a call writes out, and whether it was serialized as JSON first. */
|
|
1988
2063
|
interface WrittenPayload {
|
|
@@ -2034,7 +2109,7 @@ declare function receiverTypesOf(node: Node): ReceiverType[];
|
|
|
2034
2109
|
* that affects extraction output: IR shape, discovery semantics,
|
|
2035
2110
|
* terminal classification, anything that would invalidate previously
|
|
2036
2111
|
* cached summaries. `createAdapterStamp` (from `@suss/extractor`) folds
|
|
2037
|
-
* it together with a hash of this adapter
|
|
2112
|
+
* it together with a hash of the code this adapter loads, so a
|
|
2038
2113
|
* rebuilt dev build invalidates the cache even when nobody remembered
|
|
2039
2114
|
* to bump the constant. See that package's README for the full design.
|
|
2040
2115
|
*/
|
|
@@ -2099,4 +2174,4 @@ declare function climbSyntax(node: Node): Node;
|
|
|
2099
2174
|
*/
|
|
2100
2175
|
declare function peelValue(node: Node): Node;
|
|
2101
2176
|
|
|
2102
|
-
export { ADAPTER_VERSION, type Accessed, type CallAccountingEntry, type CallAccountingOutcome, type ClientCallSite, type ConfiguredCallContext, type ConfiguredCallRead, type ConfiguredCallSpec, type ContractReadResult, type DescentBarriers, type DiscoveredUnit, type EnvironmentNamers, type ExplainCallableOptions, type ExplainedResolution, type FoundTerminal, type FunctionRoot, GENERIC_TERMINALS, type ImportScanOptions, NO_BARRIERS, type ObservedStubCall, type RawBranchResult, type ReadNameOptions, type ReceiverType, type RefreshReport, ResolutionStore, SOURCE_SUFFIXES, type StubCallEvidence, type StubEvidenceOptions, TSCONFIG_NAMES, type TsAccessRecognizerContext, type TsDiscoveryContext, type TsInvocationRecognizerContext, type TsJsxAttributeLocation, type TsSubUnitContext, type TypeScriptAdapter, type TypeScriptAdapterConfig, TypeScriptWhySession, type WhySessionOptions, type WrittenPayload, accessContextFor, arrayLiteralOf, buildProjectHelperIndex, callOpsFor, climbSyntax, collectAncestorBranches, collectClientFieldAccesses, computeAdapterPacksDigest, couldNameAValue, createProjectWithoutTsconfig, createTsDiscoveryContext, createTsSubUnitContext, createTypeScriptAdapter, declarationsBehind, discoverUnits, exportedDeclarationsOf, extractCodeStructure, extractRawBranches, findEnclosingFunction, findNearestTsconfig, findTerminals, functionTargetOf, functionValueOf, hasBody, importDeclarationsOf, importedNamesOf, importedRootsOf, invocationContextFor, isDefaultedAt, isImportedFrom, methodDeclaredIn, namedImportsOf, numberValueOf, objectLiteralOf, parseConditionExpression, peelSyntax, peelValue, propertiesOf, propertyFunctionOf, propertyNameOf, propertyOf, propertyValueOf, readConfiguredCall, readContract, readContractForClientCall, readName, readTsconfigFileList, receiverTypesOf, resolveAliasedSymbol, resolveSubject, rootIdentifier, specifierImportedAs, startsItsOwnScope, stringPropertyOf, stringValueOf, stubEvidence, stubEvidenceIn, symbolBehind, toFunctionRoot, workspaceNameFor, workspaceRootFor, writtenNodeOf, writtenPayloadOf };
|
|
2177
|
+
export { ADAPTER_VERSION, type Accessed, type CallAccountingEntry, type CallAccountingOutcome, type ClientCallSite, type ConfiguredCallContext, type ConfiguredCallRead, type ConfiguredCallSpec, type ContractReadResult, type DescentBarriers, type DiscoveredUnit, type EnvironmentNamers, type ExplainCallableOptions, type ExplainedResolution, type FilePlace, type FoundTerminal, type FunctionRoot, GENERIC_TERMINALS, type ImportScanOptions, NO_BARRIERS, type ObservedStubCall, type RawBranchResult, type ReadNameOptions, type ReceiverType, type RefreshReport, ResolutionStore, SOURCE_SUFFIXES, type StubCallEvidence, type StubEvidenceOptions, TSCONFIG_NAMES, type TsAccessRecognizerContext, type TsDiscoveryContext, type TsInvocationRecognizerContext, type TsJsxAttributeLocation, type TsSubUnitContext, type TypeScriptAdapter, type TypeScriptAdapterConfig, TypeScriptWhySession, type WhySessionOptions, type WrittenPayload, accessContextFor, arrayLiteralOf, buildProjectHelperIndex, callOpsFor, climbSyntax, collectAncestorBranches, collectClientFieldAccesses, computeAdapterPacksDigest, couldNameAValue, createProjectWithoutTsconfig, createTsDiscoveryContext, createTsSubUnitContext, createTypeScriptAdapter, declarationsBehind, discoverUnits, exportedDeclarationsOf, extractCodeStructure, extractRawBranches, findEnclosingFunction, findNearestTsconfig, findTerminals, functionTargetOf, functionValueOf, hasBody, importDeclarationsOf, importedNamesOf, importedRootsOf, invocationContextFor, isDefaultedAt, isImportedFrom, methodDeclaredIn, namedImportsOf, numberValueOf, objectLiteralOf, parseConditionExpression, pathFromRun, peelSyntax, peelValue, placeOutsideRun, projectPlaceOf, propertiesOf, propertyFunctionOf, propertyNameOf, propertyOf, propertyValueOf, readConfiguredCall, readContract, readContractForClientCall, readName, readTsconfigFileList, receiverTypesOf, resolveAliasedSymbol, resolveSubject, rootIdentifier, specifierImportedAs, startsItsOwnScope, stringPropertyOf, stringValueOf, stubEvidence, stubEvidenceIn, symbolBehind, toFunctionRoot, workspaceNameFor, workspaceRootFor, writtenNodeOf, writtenPayloadOf };
|