File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 11import * as ts from "typescript" ;
22import { TranspileError } from "./TranspileError" ;
3- import { TSHelper as tsHelper } from "./TSHelper" ;
3+ import { LuaTarget } from "./CompilerOptions" ;
4+
5+ const getLuaTargetName = ( version : LuaTarget ) =>
6+ version === LuaTarget . LuaJIT ? "LuaJIT" : `Lua ${ version } ` ;
47
58export class TSTLErrors {
69 public static CouldNotCast = ( castName : string ) =>
@@ -120,8 +123,8 @@ export class TSTLErrors {
120123 public static UnsupportedProperty = ( parentName : string , property : string , node : ts . Node ) =>
121124 new TranspileError ( `Unsupported property on ${ parentName } : ${ property } ` , node ) ;
122125
123- public static UnsupportedForTarget = ( functionality : string , version : string , node : ts . Node ) =>
124- new TranspileError ( `${ functionality } is/are not supported for target Lua ${ version } .` , node ) ;
126+ public static UnsupportedForTarget = ( functionality : string , version : LuaTarget , node : ts . Node ) =>
127+ new TranspileError ( `${ functionality } is/are not supported for target ${ getLuaTargetName ( version ) } .` , node ) ;
125128
126129 public static UnsupportedFunctionWithoutBody = ( node : ts . FunctionLikeDeclaration ) =>
127130 new TranspileError ( "Functions with undefined bodies are not supported." , node ) ;
You can’t perform that action at this time.
0 commit comments