export class TypeError extends Error { name : 'TypeError' | 'SemanticError' ; row : number ; column : number ; constructor ( public actual , public expected ? , message = 'Type mismatch' , name = 'TypeError' ) { super ( `${ message }: ${ expected ? `expected ${ expected . name }, ` : '' }found ${ actual . name } at ${ actual . row }:${ actual . column }` ) ; this . name = name ; this . row = actual . row ; this . column = actual . column ; } }