File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
packages/cubejs-schema-compiler/src/compiler Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ import { codeFrameColumns, SourceLocation } from '@babel/code-frame';
33import { UserError } from './UserError' ;
44import { CompileError } from './CompileError' ;
55
6+ export type ErrorLikeObject = {
7+ message : string ;
8+ } ;
9+
10+ export type PossibleError = Error | UserError | string | ErrorLikeObject ;
11+
612export interface CompilerErrorInterface {
713 message : string ;
814 plainMessage ?: string
@@ -141,16 +147,16 @@ export class ErrorReporter {
141147 return this . rootReporter ( ) . errors ;
142148 }
143149
144- public addErrors ( errors : any [ ] ) {
150+ public addErrors ( errors : PossibleError [ ] ) {
145151 errors . forEach ( ( e : any ) => { this . error ( e ) ; } ) ;
146152 }
147153
148154 public getWarnings ( ) {
149155 return this . rootReporter ( ) . warnings ;
150156 }
151157
152- public addWarnings ( warnings : any [ ] ) {
153- warnings . forEach ( ( w : any ) => { this . warning ( w ) ; } ) ;
158+ public addWarnings ( warnings : SyntaxErrorInterface [ ] ) {
159+ warnings . forEach ( w => { this . warning ( w ) ; } ) ;
154160 }
155161
156162 protected rootReporter ( ) : ErrorReporter {
You can’t perform that action at this time.
0 commit comments