File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
packages/api/src/lib/compiler Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 1- import { CompilationResult , CompilationFileSources } from './type'
1+ import { CompilationResult , CompilationFileSources , lastCompilationResult } from './type'
22import { StatusEvents , Api } from '@remixproject/plugin-utils'
33
44export interface ICompiler extends Api {
@@ -11,7 +11,7 @@ export interface ICompiler extends Api {
1111 ) => void
1212 } & StatusEvents
1313 methods : {
14- getCompilationResult ( ) : CompilationResult
14+ getCompilationResult ( ) : lastCompilationResult
1515 compile ( fileName : string ) : void
1616 }
1717}
Original file line number Diff line number Diff line change 22// SOURCES //
33/////////////
44export interface CompilationFileSources {
5- [ fileName : string ] : { content : string }
5+ [ fileName : string ] :
6+ {
7+ // Optional: keccak256 hash of the source file
8+ keccak256 ?: string ,
9+ // Required (unless "urls" is used): literal contents of the source file
10+ content : string ,
11+ urls ?: string [ ]
12+ }
613}
714
15+ export interface SourceWithTarget {
16+ sources ?: CompilationFileSources ,
17+ target ?: string | null | undefined
18+ }
819
920////////////
1021// RESULT //
@@ -26,6 +37,11 @@ export interface CompilationResult {
2637 }
2738}
2839
40+ export interface lastCompilationResult {
41+ data : CompilationResult | null
42+ source : SourceWithTarget | null | undefined
43+ }
44+
2945///////////
3046// ERROR //
3147///////////
You can’t perform that action at this time.
0 commit comments