@prometx/trpc-navigation-plugin
Version:
TypeScript Language Service Plugin that fixes broken 'go to definition' for tRPC when using declaration emit
26 lines • 1.02 kB
TypeScript
import * as ts from 'typescript/lib/tsserverlibrary';
import type { PluginConfigWithDefaults } from './config';
import type { Logger } from './types';
export declare class Navigator {
private logger;
private serverHost;
private config;
constructor(logger: Logger, serverHost: ts.server.ServerHost, config: PluginConfigWithDefaults);
/**
* Navigates through a router structure to find the target definition
*/
navigateRouterPath(routerSymbol: ts.Symbol, pathSegments: string[], typeChecker: ts.TypeChecker): ts.DefinitionInfo | null;
private processRouterSegment;
private handleIdentifierProperty;
private handleInlineProcedure;
private findDeclaration;
private findImportedDeclaration;
private findExportedDeclaration;
private findRouterCall;
private isProcedureDeclaration;
private isRouterDeclaration;
private isObjectRouter;
private isProcedureCall;
private createDefinitionFromDeclaration;
}
//# sourceMappingURL=navigator.d.ts.map