Skip to content
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

ts: Add strong type support for addEventListener #2627

Merged

Conversation

acheroncrypto
Copy link
Collaborator

Problem

Program.addEventListener method is not strongly typed.

public addEventListener(
eventName: string,
callback: (event: any, slot: number, signature: string) => void
): number {

eventName is a string, and event is any.

Summary of Changes

  • Add strong type support for addEventListener method. Both eventName and event is now strongly typed.
  • Convert and refactor the event tests from JavaScript to TypeScript to test types properly.

@vercel
Copy link

vercel bot commented Sep 12, 2023

@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto merged commit fdda604 into coral-xyz:master Sep 12, 2023
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant