vfsfitvnm / frida-il2cpp-bridge

A Frida module to dump, trace or hijack any Il2Cpp application at runtime, without needing the global-metadata.dat file.
https://github.com/vfsfitvnm/frida-il2cpp-bridge/wiki
MIT License
1.03k stars 202 forks source link

Error TS2380 on GC maxTimeSlice #154

Closed wwhurley closed 2 years ago

wwhurley commented 2 years ago

When compiling an application I'm getting the following error:

[TypeScript error: [path to frida-il2cpp-bridge]/dist/il2cpp/structs/gc.d.ts(12,6): Error TS2380: 'get' and 'set' accessor must have the same type.] {
  fileName: '[path to frida-il2cpp-bridge]/dist/il2cpp/structs/gc.d.ts',
  line: 12,
  column: 16
  inputs: Set() {
    [files]
  }
}

Reviewing gc.d.ts the issue appears to be on maxTimeSlice where the getter returns an Int64 where the setter takes number | Int64. There's some discussion of this issue for TypeScript at https://github.com/microsoft/TypeScript/issues/2521. Or is there some workaround to this?

vfsfitvnm commented 2 years ago

Which TS version (or frida-compile) are you using? I can't reproduce

wwhurley commented 2 years ago

frida-compile@10.2.5 typescript@4.2.4

Let me try updating to 4.6 and see if that fixes it. Or if you have a specific version of TypeScript that you use I'll switch to that.

wwhurley commented 2 years ago

Okay, that did it. Thanks for the nudge on versions!