All files / types TTranspileInput.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36                                                                       
/**
 * Input to the unified transpile() method.
 *
 * Discriminated union:
 * - { kind: 'files' } — CLI mode, discovers from config.inputs, writes to disk
 * - { kind: 'source', ... } — API mode, in-memory source, returns results as strings
 */
type TTranspileInput =
  | { readonly kind: "files" }
  | {
      readonly kind: "source";
      readonly source: string;
      /**
       * Where text with no `sourcePath` is resolved from (default: the
       * process's working directory). Unused when there is a `sourcePath`:
       * the text lives there (#1435).
       */
      readonly workingDir?: string;
      /**
       * The run's include directories, as `config.includeDirs` are: every
       * file the text reaches searches them, ahead of the directories
       * discovered from its own.
       */
      readonly includeDirs?: string[];
      /**
       * Where the text lives, resolved like any path, against the process's
       * working directory. Its directory is where quoted includes resolve
       * (ADR-010) and where the project's include tiers are discovered from
       * (#1435). An empty string is no path: `workingDir` decides, as when it
       * is omitted.
       */
      readonly sourcePath?: string;
    };
 
export default TTranspileInput;