@neo-one/smart-contract-compiler
Version:
NEO•ONE TypeScript smart contract compiler.
22 lines (21 loc) • 1.16 kB
TypeScript
import ts from 'typescript';
import { Context } from './Context';
import { CompilerHost } from './types';
export declare function updateContext(context: Context, files: {
readonly [fileName: string]: string | undefined;
}): Context;
export interface CreateContextOptions {
readonly withTestHarness?: boolean;
}
export interface CreateContextSnippetOptions extends CreateContextOptions {
readonly fileName?: string;
}
export declare const COMPILER_OPTIONS: ts.CompilerOptions;
export declare const createContextForDir: (dir: string, host: CompilerHost, options?: CreateContextOptions) => Promise<Context>;
export declare const createContextForPath: (filePath: string, host: CompilerHost, options?: CreateContextOptions) => Context;
export interface SnippetResult {
readonly context: Context;
readonly sourceFile: ts.SourceFile;
}
export declare const createContextForSnippet: (code: string, host: CompilerHost, { fileName: fileNameIn, ...rest }?: CreateContextSnippetOptions) => SnippetResult;
export declare const createContextForLanguageService: (filePath: string, languageService: ts.LanguageService, host: CompilerHost) => Context;