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

Fix typings #963

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix typings #963

wants to merge 1 commit into from

Conversation

Akiyamka
Copy link

@Akiyamka Akiyamka commented Feb 8, 2024

fix: not all events listed in FilePondsEvents
fix: .on method of filedpond instance not inherit callback arguments types
fix: manual prefixing replaced with generated

Before:

pond.on('processfileprogress', (file, progress) => {
   // file: any
   // progress: any
})

After:

pond.on('processfileprogress', (file, progress) => {
   // file: FilePond.FilePondFile
   // progress: number
})

Fixes #962

fix: not all events listed in FilePondsEvents
fix: .on method of filedpond instance not inherit callback arguments types
fix: manual prefixing replaced with generated
@rikschennink
Copy link
Collaborator

I'm comfortable with adding events and adding missing types, but the generated types I'd rather avoid for now.

@Akiyamka
Copy link
Author

Akiyamka commented Feb 15, 2024

I can remove the generation for FilePondEventPrefixed, but elsewhere I have been unable to get typescript to properly inherit the callback argument type without generics.

@rikschennink
Copy link
Collaborator

Im unfortunately not experienced enough to comment on this. I normally just describe each property/method/event separately and want to keep things in a state where I still know what’s going on.

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.

[Bug] typings missing processfiles event
2 participants