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

Minor update for better compatibility with typescript project #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

top-kat
Copy link

@top-kat top-kat commented Apr 3, 2022

Hi, thank for such a great lib.

While I imported it in my typescript project, the IDE was complaining about type issues. The code I have modified make the IDE understand more the lib. I just followed standard practices.

I have just followed some standard and good practice that make the code more understandable by vscode or typescript for example
src/femtoJS.js Outdated
(s) => function(e) {
iter((j, i) => i === 0
? e instanceof HTMLElement
? e.insertAdjacentElement(s, j)
: e.sel()[0].insertAdjacentElement(s, j)
: sel[0].insertAdjacentElement('afterend', j))

return this
return $
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ is the global constructor, not this specific instance

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed ;)

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.

None yet

2 participants