import ts from "typescript"; import type { ResolverContext } from "./types.ts"; /** * Resolves a module to a file using TypeScript's built-in module resolver and * the `moduleSuffixes` compiler option. * * @param context Resolver context. Describes the current React Native project. * @param moduleName Name of the module being resolved. * @param containingFile File containing the module reference. * @param redirectedReference Head node in the program's graph of type references * @param options Compiler options for the module. * @param ts Used for _mocking_ only. This parameter must _always_ be last. * @returns */ export declare function resolveModuleName(context: ResolverContext, moduleName: string, containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, { resolveModuleName }?: typeof ts): ts.ResolvedModuleWithFailedLookupLocations; /** * Resolve a set of modules for a TypeScript program, all referenced from a * single containing file. When possible, delegate module resolution to * TypeScript itself, rather than using our custom resolver, as the TypeScript * resolver supports more scenarios than ours. * * When doing the module resolution ourselves, we prefer type (.d.ts) files and * TypeScript source (.ts[x]) files, as they usually carry more type information * than JavaScript source (.js[x]) files. * * @param context Resolver context * @param moduleLiterals List of module names, as they appear in each require/import statement * @param containingFile File from which the modules were all required/imported * @param redirectedReference Head node in the program's graph of type references * @param options Compiler options to use when resolving this module * @param _containingSourceFile * @param _reusedNames * @param typescript Used for _mocking_ only. This parameter must _always_ be last. * @returns Array of results. Each entry will have resolved module information, or will be `undefined` if resolution failed. The array will have one element for each entry in the module name list. */ export declare function resolveModuleNameLiterals(context: ResolverContext, moduleLiterals: readonly ts.StringLiteralLike[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, _containingSourceFile: ts.SourceFile, _reusedNames: readonly ts.StringLiteralLike[] | undefined, typescript?: typeof ts): readonly ts.ResolvedModuleWithFailedLookupLocations[]; export declare function resolveModuleNames(context: ResolverContext, moduleNames: string[], containingFile: string, _reusedNames: string[] | undefined, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, _containingSourceFile: ts.SourceFile | undefined, typescript?: typeof ts): (ts.ResolvedModuleFull | undefined)[]; /** * Resolve a set of type references for a TypeScript program. * * A type reference typically originates from a triple-slash directive: * * `/// ` * `/// ` * `/// ` * * Type references also come from the `compilerOptions.types` property in * `tsconfig.json`: * * `types: ["node", "jest"]` * * @param context Resolver context * @param typeDirectiveReferences List of type names, as they appear in each type reference directive * @param containingFile File from which the type names were all referenced * @param redirectedReference Head node in the program's graph of type references * @param options Compiler options * @param containingSourceFile The containing source file * @param _reusedNames * @param ts Used for _mocking_ only. This parameter must _always_ be last. * @returns Array of results. Each entry will have resolved type information, or will be `undefined` if resolution failed. The array will have one element for each entry in the type name list. */ export declare function resolveTypeReferenceDirectiveReferences({ host, platformFileExtensions: moduleSuffixes }: ResolverContext, typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingSourceFile: ts.SourceFile | undefined, _reusedNames: readonly T[] | undefined, { resolveTypeReferenceDirective }?: typeof ts): readonly ts.ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]; export declare function resolveTypeReferenceDirectives(context: ResolverContext, typeDirectiveNames: string[] | readonly ts.FileReference[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingFileMode: ts.SourceFile["impliedNodeFormat"] | undefined, { resolveTypeReferenceDirective }?: typeof ts): (ts.ResolvedTypeReferenceDirective | undefined)[]; //# sourceMappingURL=resolver.d.ts.map