time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

ProjectItem.d.ts (1410B)


      1 import { AST } from "../../ast/parse.js";
      2 import { ReducerContext } from "../../reducer/context.js";
      3 import { Bindings } from "../../reducer/stack.js";
      4 import { ImmutableMap } from "../../utility/immutableMap.js";
      5 import { result } from "../../utility/result.js";
      6 import { Value } from "../../value/index.js";
      7 import { SqError } from "../SqError.js";
      8 import { SqLinker } from "../SqLinker.js";
      9 export type RunOutput = {
     10     result: Value;
     11     bindings: Bindings;
     12     exports: Bindings;
     13 };
     14 export type Import = {
     15     type: "flat";
     16     sourceId: string;
     17 } | {
     18     type: "named";
     19     sourceId: string;
     20     variable: string;
     21 };
     22 export declare class ProjectItem {
     23     private readonly sourceId;
     24     source: string;
     25     continues: string[];
     26     ast?: result<AST, SqError>;
     27     imports?: result<Import[], SqError>;
     28     output?: result<RunOutput, SqError>;
     29     constructor(props: {
     30         sourceId: string;
     31         source: string;
     32     });
     33     touchSource(): void;
     34     setSource(source: string): void;
     35     private setAst;
     36     private setImports;
     37     clean(): void;
     38     getDependencies(): string[];
     39     getImplicitImports(): Import[];
     40     setContinues(continues: string[]): void;
     41     parseImports(linker: SqLinker | undefined): void;
     42     private buildAst;
     43     failRun(e: SqError): void;
     44     run(context: ReducerContext, externals: ImmutableMap<string, Value>): Promise<void>;
     45 }
     46 //# sourceMappingURL=ProjectItem.d.ts.map