mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 22:50:18 +00:00
parent
7fe0212761
commit
33a2ca87e0
18
api/api-npm/index.d.ts
vendored
18
api/api-npm/index.d.ts
vendored
@ -15,11 +15,11 @@ export declare class GeneratedSource {
|
|||||||
export declare class CompilationResult {
|
export declare class CompilationResult {
|
||||||
services: Record<string, ServiceDef>;
|
services: Record<string, ServiceDef>;
|
||||||
functions: Record<string, AquaFunction>;
|
functions: Record<string, AquaFunction>;
|
||||||
functionCall?: AquaFunction;
|
|
||||||
errors: string[];
|
errors: string[];
|
||||||
warnings: string[];
|
warnings: string[];
|
||||||
generatedSources: GeneratedSource[];
|
generatedSources: GeneratedSource[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Imports configuration for the compiler.
|
* Imports configuration for the compiler.
|
||||||
* Structure:
|
* Structure:
|
||||||
@ -83,12 +83,11 @@ type CodeString = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type CompileFromStringArgs = CommonArgs & CodeString;
|
export type CompileFromStringArgs = CommonArgs & CodeString;
|
||||||
export type CompileFromStringReturnType = Omit<CompilationResult, "funcCall">;
|
|
||||||
|
|
||||||
/** Compile aqua code from a string */
|
/** Compile aqua code from a string */
|
||||||
export declare function compileFromString(
|
export declare function compileFromString(
|
||||||
args: CompileFromStringArgs,
|
args: CompileFromStringArgs,
|
||||||
): Promise<CompileFromStringReturnType>;
|
): Promise<CompilationResult>;
|
||||||
|
|
||||||
type FilePath = {
|
type FilePath = {
|
||||||
/** Path to the aqua file to be compiled */
|
/** Path to the aqua file to be compiled */
|
||||||
@ -96,12 +95,11 @@ type FilePath = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type CompileFromPathArgs = CommonArgs & FilePath;
|
export type CompileFromPathArgs = CommonArgs & FilePath;
|
||||||
export type CompileFromPathReturnType = Omit<CompilationResult, "funcCall">;
|
|
||||||
|
|
||||||
/** Compile aqua code from a file */
|
/** Compile aqua code from a file */
|
||||||
export declare function compileFromPath(
|
export declare function compileFromPath(
|
||||||
args: CompileFromPathArgs,
|
args: CompileFromPathArgs,
|
||||||
): Promise<CompileFromPathReturnType>;
|
): Promise<CompilationResult>;
|
||||||
|
|
||||||
type FuncCall = {
|
type FuncCall = {
|
||||||
/** Function call you want to compile. Example: someFunc("someArg") */
|
/** Function call you want to compile. Example: someFunc("someArg") */
|
||||||
@ -110,20 +108,22 @@ type FuncCall = {
|
|||||||
data?: Record<string, unknown> | undefined;
|
data?: Record<string, unknown> | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type CallCompilationResult = CompilationResult & {
|
||||||
|
functionCall: AquaFunction;
|
||||||
|
};
|
||||||
|
|
||||||
export type CompileFuncCallFromStringArgs = CommonArgs & CodeString & FuncCall;
|
export type CompileFuncCallFromStringArgs = CommonArgs & CodeString & FuncCall;
|
||||||
export type CompileFuncCallFromStringReturnType = Required<CompilationResult>;
|
|
||||||
|
|
||||||
/** Compile aqua function call from a string */
|
/** Compile aqua function call from a string */
|
||||||
export declare function compileAquaCallFromString(
|
export declare function compileAquaCallFromString(
|
||||||
args: CompileFuncCallFromStringArgs,
|
args: CompileFuncCallFromStringArgs,
|
||||||
): Promise<CompileFuncCallFromStringReturnType>;
|
): Promise<CallCompilationResult>;
|
||||||
|
|
||||||
export type CompileFuncCallFromPathArgs = CommonArgs & FilePath & FuncCall;
|
export type CompileFuncCallFromPathArgs = CommonArgs & FilePath & FuncCall;
|
||||||
export type CompileFuncCallFromPathReturnType = Required<CompilationResult>;
|
|
||||||
|
|
||||||
/** Compile aqua function call from a file */
|
/** Compile aqua function call from a file */
|
||||||
export declare function compileAquaCallFromPath(
|
export declare function compileAquaCallFromPath(
|
||||||
args: CompileFuncCallFromPathArgs,
|
args: CompileFuncCallFromPathArgs,
|
||||||
): Promise<CompileFuncCallFromPathReturnType>;
|
): Promise<CallCompilationResult>;
|
||||||
|
|
||||||
export {};
|
export {};
|
||||||
|
Loading…
Reference in New Issue
Block a user