@@ -43,12 +43,11 @@ export class LuaTransformer {
4343 "not" , "or" , "repeat" , "return" , "self" , "then" , "until" , "while" ,
4444 ] ) ;
4545
46- private isStrict = true ;
46+ private isStrict : boolean ;
4747 private luaTarget : LuaTarget ;
4848
4949 private checker : ts . TypeChecker ;
5050 protected options : CompilerOptions ;
51- protected program : ts . Program ;
5251
5352 private isModule = false ;
5453
@@ -69,17 +68,16 @@ export class LuaTransformer {
6968
7069 private readonly typeValidationCache : Map < ts . Type , Set < ts . Type > > = new Map < ts . Type , Set < ts . Type > > ( ) ;
7170
72- public constructor ( program : ts . Program , options : CompilerOptions ) {
71+ public constructor ( protected program : ts . Program ) {
7372 this . checker = program . getTypeChecker ( ) ;
74- this . options = options ;
75- this . program = program ;
73+ this . options = program . getCompilerOptions ( ) ;
7674 this . isStrict = this . options . alwaysStrict !== undefined
7775 || ( this . options . strict !== undefined && this . options . alwaysStrict !== false )
7876 || ( this . isModule
7977 && this . options . target !== undefined
8078 && this . options . target >= ts . ScriptTarget . ES2015 ) ;
8179
82- this . luaTarget = options . luaTarget || LuaTarget . LuaJIT ;
80+ this . luaTarget = this . options . luaTarget || LuaTarget . LuaJIT ;
8381
8482 this . setupState ( ) ;
8583 }
0 commit comments