@corsa-bind/napi
86 documented exports.
ApiMode
No documentation comment yet.
export type ApiMode = "jsonrpc" | "msgpack";
ApiClientOptions
No documentation comment yet.
export interface ApiClientOptions
InitializeResponse
No documentation comment yet.
export interface InitializeResponse
ConfigResponse
No documentation comment yet.
export interface ConfigResponse
ContentMapperDefinition
A content mapper as declared in a tsconfig.json contentMappers entry.
export interface ContentMapperDefinition
SpanMapKind
0 verbatim, 1 atom, 2 alias.
export type SpanMapKind = 0 | 1 | 2;
SpanMapFidelity
0 exact, 1 atom, 2 approximate, 3 none.
export type SpanMapFidelity = 0 | 1 | 2 | 3;
DiagnosticDirectivePolicy
0 ignore, 1 expect.
export type DiagnosticDirectivePolicy = 0 | 1;
TextRange
Half-open range of UTF-16 code unit offsets.
export interface TextRange
SpanMapSegment
One half-open virtual range mapped onto one half-open original range.
export interface SpanMapSegment
MappedPosition
One projection of a position, with how faithful it is.
export interface MappedPosition
MappedRange
One projection of a range, with how faithful it is.
export interface MappedRange
MappedDiagnosticDirective
A directive controlling TypeScript diagnostics inside a mapped range.
export interface MappedDiagnosticDirective
ContentMapping
Content mapper state attached to one source file.
export interface ContentMapping
EncodedSourceFile
Source-file fields decoded from a getSourceFile payload.
export interface EncodedSourceFile
ProjectResponse
No documentation comment yet.
export interface ProjectResponse
DocumentIdentifier
No documentation comment yet.
export type DocumentIdentifier = string |
FileChangeSummary
No documentation comment yet.
export interface FileChangeSummary
FileChanges
No documentation comment yet.
export type FileChanges =
| FileChangeSummary
|
UpdateSnapshotParams
No documentation comment yet.
export interface UpdateSnapshotParams
UpdateSnapshotResponse
No documentation comment yet.
export interface UpdateSnapshotResponse
TypeResponse
No documentation comment yet.
export interface TypeResponse
SymbolResponse
No documentation comment yet.
export interface SymbolResponse
CheckerBatchRequest
No documentation comment yet.
export interface CheckerBatchRequest<Params = unknown>
CheckerBatchResponse
No documentation comment yet.
export interface CheckerBatchResponse<Result = unknown>
OverlayUpdate
No documentation comment yet.
export interface OverlayUpdate
OverlayChanges
No documentation comment yet.
export interface OverlayChanges
RuntimeCapabilities
No documentation comment yet.
export interface RuntimeCapabilities
OverlayCapabilities
No documentation comment yet.
export interface OverlayCapabilities
DiagnosticsCapabilities
No documentation comment yet.
export interface DiagnosticsCapabilities
EditorCapabilities
No documentation comment yet.
export interface EditorCapabilities
LspCapabilities
No documentation comment yet.
export interface LspCapabilities
CapabilitiesResponse
No documentation comment yet.
export interface CapabilitiesResponse
FileDiagnosticsResponse
No documentation comment yet.
export interface FileDiagnosticsResponse
ProjectDiagnosticsResponse
No documentation comment yet.
export interface ProjectDiagnosticsResponse
SnapshotDiagnosticsResponse
No documentation comment yet.
export interface SnapshotDiagnosticsResponse
UnsafeTypeFlowInput
No documentation comment yet.
export interface UnsafeTypeFlowInput
NativeLintRange
No documentation comment yet.
export interface NativeLintRange
NativeLintNode
No documentation comment yet.
export interface NativeLintNode
NativeLintFix
No documentation comment yet.
export interface NativeLintFix
NativeLintSuggestion
No documentation comment yet.
export interface NativeLintSuggestion
NativeLintDiagnostic
No documentation comment yet.
export interface NativeLintDiagnostic
NativeNodeMetadataDepth
No documentation comment yet.
export interface NativeNodeMetadataDepth
NativeRuleBridgeRequirements
No documentation comment yet.
export interface NativeRuleBridgeRequirements
NativeLintRuleMeta
No documentation comment yet.
export interface NativeLintRuleMeta
TypeTextKind
No documentation comment yet.
export type TypeTextKind =
| "any"
| "bigint"
| "boolean"
| "nullish"
| "number"
| "regexp"
| "string"
| "unknown"
| "other";
VirtualChange
No documentation comment yet.
export interface VirtualChange
VirtualDocumentState
No documentation comment yet.
export interface VirtualDocumentState
CorsaApiClient
No documentation comment yet.
const CorsaApiClient: CorsaApiClientConstructor
CorsaVirtualDocument
No documentation comment yet.
const CorsaVirtualDocument: CorsaVirtualDocumentConstructor
CorsaSpanMap
Bidirectional mapping between a mapper's virtual text and the original file.
Every query takes an optional feature bitmask (see SpanMap); when it
is omitted, all features are considered.
const CorsaSpanMap: CorsaSpanMapConstructor
decodeSourceFile
Decodes the source-file fields of a getSourceFile payload.
const decodeSourceFile: (payload: Uint8Array<ArrayBufferLike>) => EncodedSourceFile
isContentMappedSourceFile
Reports whether a getSourceFile payload came out of a content mapper.
const isContentMappedSourceFile: (payload: Uint8Array<ArrayBufferLike>) => boolean
spanMapForSourceFile
Builds the span map of a payload, or null when the file is not mapped.
const spanMapForSourceFile: (payload: Uint8Array<ArrayBufferLike>) => CorsaSpanMap | null
contentMappersFromConfig
Reads the content mappers a parsed tsconfig declares.
const contentMappersFromConfig: (config: unknown) => ContentMapperDefinition[]
SpanMap
Numeric enums mirrored from upstream spanMapKind, spanMapFidelity, and
spanMapFeature.
const SpanMap: Readonly<{ readonly Kind: Readonly<{ Verbatim: 0; Atom: 1; Alias: 2; }>; readonly Fidelity: Readonly<{ Exact: 0; Atom: 1; Approximate: 2; None: 3; }>; readonly Feature: Readonly<{ Hover: number; SignatureHelp: number; ... 19 more ...; All: number; }>; }>
version
No documentation comment yet.
const version: () => string
spawnCorsaApiClientAsync
No documentation comment yet.
const spawnCorsaApiClientAsync: (options: ApiClientOptions) => Promise<CorsaApiClient>
isUnsafeAssignment
No documentation comment yet.
const isUnsafeAssignment: (input: UnsafeTypeFlowInput) => boolean
isUnsafeReturn
No documentation comment yet.
const isUnsafeReturn: (input: UnsafeTypeFlowInput) => boolean
runNativeLintRule
No documentation comment yet.
const runNativeLintRule: (ruleName: string, node: NativeLintNode) => NativeLintDiagnostic[]
nativeLintRuleMetas
No documentation comment yet.
const nativeLintRuleMetas: () => NativeLintRuleMeta[]
classifyTypeText
No documentation comment yet.
const classifyTypeText: (text?: string | undefined) => TypeTextKind
splitTopLevelTypeText
No documentation comment yet.
const splitTopLevelTypeText: (text: string, delimiter: string) => string[]
splitTypeText
No documentation comment yet.
const splitTypeText: (text: string) => string[]
isStringLikeTypeTexts
No documentation comment yet.
const isStringLikeTypeTexts: (typeTexts: readonly string[]) => boolean
isNumberLikeTypeTexts
No documentation comment yet.
const isNumberLikeTypeTexts: (typeTexts: readonly string[]) => boolean
isBigIntLikeTypeTexts
No documentation comment yet.
const isBigIntLikeTypeTexts: (typeTexts: readonly string[]) => boolean
isAnyLikeTypeTexts
No documentation comment yet.
const isAnyLikeTypeTexts: (typeTexts: readonly string[]) => boolean
isUnknownLikeTypeTexts
No documentation comment yet.
const isUnknownLikeTypeTexts: (typeTexts: readonly string[]) => boolean
isArrayLikeTypeTexts
No documentation comment yet.
const isArrayLikeTypeTexts: (typeTexts: readonly string[]) => boolean
isStringArrayLikeTypeTexts
No documentation comment yet.
const isStringArrayLikeTypeTexts: (typeTexts: readonly string[]) => boolean
isPromiseLikeTypeTexts
No documentation comment yet.
const isPromiseLikeTypeTexts: (typeTexts: readonly string[], propertyNames?: readonly string[] | undefined) => boolean
isErrorLikeTypeTexts
No documentation comment yet.
const isErrorLikeTypeTexts: (typeTexts: readonly string[], propertyNames?: readonly string[] | undefined) => boolean
resolveCheckerBatch
No documentation comment yet.
resolveCheckerBatch(client: CheckerBatchCapableClient, scope: CheckerBatchScope, queries: readonly CheckerBatchQuery[]): ResolvedCheckerBatchItem[]
| Parameter | Type | Description |
|---|---|---|
client |
CheckerBatchCapableClient |
- |
scope |
CheckerBatchScope |
- |
queries |
readonly CheckerBatchQuery[] |
- |
Returns: ResolvedCheckerBatchItem[]
resolveCheckerBatchAsync
No documentation comment yet.
resolveCheckerBatchAsync(client: AsyncCheckerBatchCapableClient, scope: CheckerBatchScope, queries: readonly CheckerBatchQuery[]): Promise<ResolvedCheckerBatchItem[]>
| Parameter | Type | Description |
|---|---|---|
client |
AsyncCheckerBatchCapableClient |
- |
scope |
CheckerBatchScope |
- |
queries |
readonly CheckerBatchQuery[] |
- |
Returns: Promise<ResolvedCheckerBatchItem[]>
Utils
No documentation comment yet.
const Utils: Readonly<{ classifyTypeText: (text?: string | undefined) => TypeTextKind; splitTopLevelTypeText: (text: string, delimiter: string) => string[]; splitTypeText: (text: string) => string[]; ... 8 more ...; isErrorLikeTypeTexts: (typeTexts: readonly string[], propertyNames?: readonly string[] | undefined) => boolean; }>
default
No documentation comment yet.
const binding: typeof import("/home/runner/_work/corsa-bind/corsa-bind/src/bindings/nodejs/corsa_node/index")
batchCheckerRequests
Sends multiple raw checker endpoint calls through upstream batchRequests.
This keeps the original typed primitives available while giving hot paths a single transport round trip for relation-heavy workflows.
batchCheckerRequests(client: CheckerBatchCapableClient, requests: readonly CheckerBatchRequest[]): CheckerBatchResponse[]
| Parameter | Type | Description |
|---|---|---|
client |
CheckerBatchCapableClient |
- |
requests |
readonly CheckerBatchRequest<unknown>[] |
- |
Returns: CheckerBatchResponse<unknown>[]
batchCheckerRequestsAsync
Async counterpart of batchCheckerRequests.
batchCheckerRequestsAsync(client: AsyncCheckerBatchCapableClient, requests: readonly CheckerBatchRequest[]): Promise<CheckerBatchResponse[]>
| Parameter | Type | Description |
|---|---|---|
client |
AsyncCheckerBatchCapableClient |
- |
requests |
readonly CheckerBatchRequest<unknown>[] |
- |
Returns: Promise<CheckerBatchResponse<unknown>[]>
AsyncCheckerBatchCapableClient
No documentation comment yet.
export interface AsyncCheckerBatchCapableClient
CheckerBatchCapableClient
No documentation comment yet.
export interface CheckerBatchCapableClient
CheckerBatchQuery
No documentation comment yet.
export type CheckerBatchQuery =
|
CheckerBatchResult
No documentation comment yet.
export type CheckerBatchResult =
| TypeResponse
| Array<TypeResponse | null>
| SymbolResponse
| Array<SymbolResponse | null>
| boolean
| string
| null;
CheckerBatchScope
No documentation comment yet.
export interface CheckerBatchScope
ResolvedCheckerBatchItem
No documentation comment yet.
export type ResolvedCheckerBatchItem =
|