diff options
author | F. Eugene Aumson <gene@aumson.org> | 2018-08-24 21:18:33 +0800 |
---|---|---|
committer | F. Eugene Aumson <gene@aumson.org> | 2018-08-29 20:51:01 +0800 |
commit | a1959df911741d0424a952fa4a63c5dcc1135524 (patch) | |
tree | 61a9682aa21143a98f00a67c98558a6a3f962f74 /packages/typescript-typings/types | |
parent | 775d1efd4607a4097704fe3c4f7ae1156b2c1a6f (diff) | |
download | dexon-sol-tools-a1959df911741d0424a952fa4a63c5dcc1135524.tar dexon-sol-tools-a1959df911741d0424a952fa4a63c5dcc1135524.tar.gz dexon-sol-tools-a1959df911741d0424a952fa4a63c5dcc1135524.tar.bz2 dexon-sol-tools-a1959df911741d0424a952fa4a63c5dcc1135524.tar.lz dexon-sol-tools-a1959df911741d0424a952fa4a63c5dcc1135524.tar.xz dexon-sol-tools-a1959df911741d0424a952fa4a63c5dcc1135524.tar.zst dexon-sol-tools-a1959df911741d0424a952fa4a63c5dcc1135524.zip |
add devdoc support to solc typings, and use it
Diffstat (limited to 'packages/typescript-typings/types')
-rw-r--r-- | packages/typescript-typings/types/solc/index.d.ts | 63 |
1 files changed, 6 insertions, 57 deletions
diff --git a/packages/typescript-typings/types/solc/index.d.ts b/packages/typescript-typings/types/solc/index.d.ts index 571bae101..2cfd4a030 100644 --- a/packages/typescript-typings/types/solc/index.d.ts +++ b/packages/typescript-typings/types/solc/index.d.ts @@ -1,4 +1,5 @@ declare module 'solc' { + import { SolcError } from 'ethereum-types'; export interface ContractCompilationResult { srcmap: string; srcmapRuntime: string; @@ -87,62 +88,7 @@ declare module 'solc' { }; settings: CompilerSettings; } - export type ErrorType = - | 'JSONError' - | 'IOError' - | 'ParserError' - | 'DocstringParsingError' - | 'SyntaxError' - | 'DeclarationError' - | 'TypeError' - | 'UnimplementedFeatureError' - | 'InternalCompilerError' - | 'Exception' - | 'CompilerError' - | 'FatalError' - | 'Warning'; - export type ErrorSeverity = 'error' | 'warning'; - export interface Error { - sourceLocation?: { - file: string; - start: number; - end: number; - }; - type: ErrorType; - component: 'general' | 'ewasm'; - severity: ErrorSeverity; - message: string; - formattedMessage?: string; - } - import { ContractAbi } from 'ethereum-types'; - export interface StandardContractOutput { - abi: ContractAbi; - evm: { - bytecode: { - object: string; - sourceMap: string; - }; - deployedBytecode: { - object: string; - sourceMap: string; - }; - }; - } - export interface StandardOutput { - errors: Error[]; - sources: { - [fileName: string]: { - id: number; - ast?: object; - legacyAST?: object; - }; - }; - contracts: { - [fileName: string]: { - [contractName: string]: StandardContractOutput; - }; - }; - } + export { ErrorType, ErrorSeverity, SolcError, StandardContractOutput, StandardOutput } from 'ethereum-types'; export interface SolcInstance { compile( sources: InputSources, @@ -151,6 +97,9 @@ declare module 'solc' { ): CompilationResult; compileStandardWrapper(input: string, findImports: (importPath: string) => ImportContents): string; } - export function loadRemoteVersion(versionName: string, cb: (err: Error | null, res?: SolcInstance) => void): void; + export function loadRemoteVersion( + versionName: string, + cb: (err: SolcError | null, res?: SolcInstance) => void, + ): void; export function setupMethods(solcBin: any): SolcInstance; } |