Skip to content

fix .constructor when disowning #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2025
Merged

Conversation

penalosa
Copy link
Contributor

@penalosa penalosa commented Apr 10, 2025

Apply the fix in #10 to disown functions.

Without this change, we were seeing generated TS files like:

  _disownConstructor(): $.Orphan<Constructor> {
    return $.utils.disown(this.constructor);
  }

which failed with:

Argument of type 'Function' is not assignable to parameter of type 'Pointer<_Pointer>'.
  Type 'Function' is missing the following properties from type 'Pointer<_Pointer>': _capnp, byteOffset, segment, [Symbol.toStringTag]
Error: CAPNP-ES009 Failed to transpile emitted schema source code; see above for error messages.

@penalosa penalosa requested a review from pi0 as a code owner April 10, 2025 18:34
@penalosa penalosa merged commit 8d45e0d into main Apr 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants