@@ -51,7 +51,7 @@ function getLuaBindingsForVersion(target: tstl.LuaTarget): { lauxlib: LauxLib; l
5151}
5252
5353export function assert ( value : any , message ?: string | Error ) : asserts value {
54- nativeAssert ( value , message ) ;
54+ nativeAssert . ok ( value , message ) ;
5555}
5656
5757export const formatCode = ( ...values : unknown [ ] ) => values . map ( e => stringify ( e ) ) . join ( ", " ) ;
@@ -92,17 +92,15 @@ export function expectEachVersionExceptJit<T>(
9292 } ;
9393}
9494
95- const memoize : MethodDecorator = ( _target , _propertyKey , descriptor ) => {
96- const originalFunction = descriptor . value as any ;
95+ const memoize = ( originalFunction : any ) => {
9796 const memoized = new WeakMap ( ) ;
98- descriptor . value = function ( this : any , ...args : any [ ] ) : any {
97+ return function ( this : any , ...args : any [ ] ) : any {
9998 if ( ! memoized . has ( this ) ) {
10099 memoized . set ( this , originalFunction . apply ( this , args ) ) ;
101100 }
102101
103102 return memoized . get ( this ) ;
104- } as any ;
105- return descriptor ;
103+ } ;
106104} ;
107105
108106export class ExecutionError extends Error {
@@ -158,12 +156,13 @@ export abstract class TestBuilder {
158156 }
159157
160158 protected options : tstl . CompilerOptions = {
159+ strict : false ,
161160 luaTarget : tstl . LuaTarget . Lua55 ,
162161 noHeader : true ,
163162 skipLibCheck : true ,
164163 target : ts . ScriptTarget . ES2017 ,
165164 lib : [ "lib.esnext.d.ts" ] ,
166- moduleResolution : ts . ModuleResolutionKind . Node10 ,
165+ moduleResolution : ts . ModuleResolutionKind . Bundler ,
167166 resolveJsonModule : true ,
168167 sourceMap : true ,
169168 } ;
0 commit comments