import type * as TS from "typescript"; /** The TypeScript API, from whichever `typescript.js` was loaded. */ export type TypeScript = typeof TS; /** adept's `/compiler/`: `lib/typescript.js` and every `lib/lib.*.d.ts`. */ export type CompilerBundle = { version: string; files: Record; }; /** * The TypeScript a project gets when its own cannot run here. * * TypeScript 7 and later are a native compiler with no JavaScript one * (`lib/typescript.js`), so they cannot run in a browser; a project with no * `typescript` at all has none to choose. Both are checked with this 6.x, * the one the Studio itself is built and tested with * (`typescriptCompiler.test.ts` keeps the two the same). It is fetched from * adept like any other, rather than shipped in the Studio's bundle, which is * embedded in every Val server. */ export declare const BUNDLED_TYPESCRIPT = "6.0.3"; /** Which TypeScript checks a project, and why that one. */ export type CompilerChoice = { version: string; /** What the root importer's lockfile entry gives, if anything. */ wanted: string | null; reason: "project" | "no-typescript" | "no-js-compiler"; }; export declare function chooseCompiler(wanted: string | null): CompilerChoice; /** A TypeScript that does not have what a typecheck needs. */ export declare class CompilerError extends Error { } /** * Evaluates `lib/typescript.js` and returns its API. * * It is a CommonJS module that also runs as a plain script, so it is given a * `module` to assign to. `require` and `process` are given as `undefined`, * as they are in a worker, so that it does not build a Node `ts.sys` when it * runs under Node: everything it reads goes through the host this * typechecker gives it. */ export declare function evaluateTypeScript(source: string): TypeScript; /** * `ts.matchFiles`, which is how `tsc` expands a tsconfig's `include` and * `exclude`. It is internal, but every `typescript.js` since 2.x has it on * its API object, and using it is the only way to agree with `tsc` on hidden * files, `node_modules` and implicit directory globs. */ export type MatchFiles = (path: string, extensions: readonly string[] | undefined, excludes: readonly string[] | undefined, includes: readonly string[] | undefined, useCaseSensitiveFileNames: boolean, currentDirectory: string, depth: number | undefined, getFileSystemEntries: (path: string) => { files: readonly string[]; directories: readonly string[]; }, realpath: (path: string) => string) => string[]; export declare function matchFilesOf(ts: TypeScript): MatchFiles;