Skip to content

Commit f79b82e

Browse files
authored
fix: Fix function expression lifting in bindings (#2255)
1 parent 33055b2 commit f79b82e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/bindings/js.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ export class JSBuilder extends ExportsWalker {
950950
/** Lifts a WebAssembly value to a JavaScript value. */
951951
makeLiftFromValue(name: string, type: Type, sb: string[] = this.sb): void {
952952
if (type.isInternalReference) {
953-
const clazz = assert(type.getClass());
953+
const clazz = assert(type.getClassOrWrapper(this.program));
954954
if (clazz.extends(this.program.arrayBufferInstance.prototype)) {
955955
sb.push("__liftBuffer(");
956956
this.needsLiftBuffer = true;

src/bindings/tsd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export class TSDBuilder extends ExportsWalker {
236236
toTypeScriptType(type: Type, mode: Mode): string {
237237
if (type.isInternalReference) {
238238
const sb = new Array<string>();
239-
const clazz = assert(type.getClass());
239+
const clazz = assert(type.getClassOrWrapper(this.program));
240240
if (clazz.extends(this.program.arrayBufferInstance.prototype)) {
241241
sb.push("ArrayBuffer");
242242
} else if (clazz.extends(this.program.stringInstance.prototype)) {

0 commit comments

Comments
 (0)