Skip to content

fix src/htmx.js(3842,25): error TS2769: No overload matches this call.#2038

Merged
1cg merged 1 commit intobigskysoftware:devfrom
JLarky:dev
Nov 30, 2023
Merged

fix src/htmx.js(3842,25): error TS2769: No overload matches this call.#2038
1cg merged 1 commit intobigskysoftware:devfrom
JLarky:dev

Conversation

@JLarky
Copy link
Copy Markdown
Contributor

@JLarky JLarky commented Nov 23, 2023

Description

This fixes one of the typescript issues that I see when I run test-types command

src/htmx.js(3842,25): error TS2769: No overload matches this call.
  Overload 1 of 2, '(this: WindowEventHandlers, ev: PopStateEvent): any', gave the following error.
    The 'this' context of type 'void' is not assignable to method's 'this' of type 'WindowEventHandlers'.
  Overload 2 of 2, '(this: Window, ev: PopStateEvent): any', gave the following error.
    The 'this' context of type 'void' is not assignable to method's 'this' of type 'Window'.

 
image

Corresponding issue:

  • I couldn't find it

Testing

I was running test-types before and after this change I saw that issue is not there anymore

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
    • this PR has very strong Refactors that do not make functional changes will be automatically closed, unless explicitly solicited. Imagine someone came into your house unannounced, rearranged a bunch of furniture, and left. vibe, I'm doing this just to gauge if I can help with type improvements in this repo :)
  • I ran the test suite locally (npm run test) and verified that it succeeded

@alexpetros
Copy link
Copy Markdown
Collaborator

Yes, our typescript support is... fuzzy for sure. I appreciate the disclaimer in this description but this is totally fair game :)

@alexpetros alexpetros added the ready for review Issues that are ready to be considered for merging label Nov 24, 2023
@JLarky
Copy link
Copy Markdown
Contributor Author

JLarky commented Nov 25, 2023

Great to hear. Let me know if there's something in particular that you want to be improved for TS story, otherwise I'm just going to look into more "npm run test-types" issues

@1cg 1cg merged commit 52826aa into bigskysoftware:dev Nov 30, 2023
@1cg
Copy link
Copy Markdown
Contributor

1cg commented Nov 30, 2023

very excited that someone who knows what they are doing is looking at this, @JLarky go as ham as you'd like on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Issues that are ready to be considered for merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants