Missing TypeScript types?
See original GitHub issueIs your feature request related to a problem? Please describe.
// https://next.quasar.dev/vue-components/infinite-scroll#usage
onLoad (index, done) {
..
}
https://next.quasar.dev/vue-components/select#filtering-and-autocomplete
filterFn (val, update) {
..
}
Describe the solution you’d like
// https://next.quasar.dev/vue-components/infinite-scroll#usage
onLoad (index : number, done: SomeInterface) {
..
}
// https://next.quasar.dev/vue-components/select#filtering-and-autocomplete
filterFn (val: string, update: SomeInterface, abort: SomeInterface) {
..
}
Don’t think these are good examples either, I found out the QSelect
interface seems to offer some typing, but abort()
wasn’t included?
Describe alternatives you’ve considered
// eslint-disable-next-line @typescript-eslint/ban-types
filterFn (val: string, update: Function, abort: Function) {
..
}
Additional context I’m kinda new to Typescript, sorry if this should be fixed in a different way. 😃
Many thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to Declare Missing Types for External Libraries -- newline
If DefinitelyTyped doesn't have type declarations for a library you can declare types yourself.
Read more >How to include missing type definition files in typescript ...
I would suggest switching to types from typeRoots and using an include pattern rather than files . { "compilerOptions": { "lib": ["dom" ...
Read more >Missing typescript types in the generated type definition file (d ...
The missing types in the generated type declaration file (d.ts) are causing typing errors when I try to use them in other projects...
Read more >Install Missing TypeScript Typings With TypeSync
TypeSync is a tool that allows you to install missing TypeScript typings. When you execute the command, it will automatically add a typing ......
Read more >How to add missing types to a library. : r/typescript - Reddit
I'm having trouble adding types to a library. The specific library itself is Shippo's node client. It comes with type definitions however ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We plan to setup a system to make it easier for the community to contribute with types when missing, but it will probably be in June, after testing AE support for Qv2/Vue3
Closing has the seached types has been found
I couldn’t find the type for the ‘update’ function parameter on quasar’s filterFn anywhere else, but in case someone else is looking to type this, it can be done like this:
const filterFn = (val: string, update: (fn: () => void) => void) => { update((): void => { const needle = val.toLowerCase(); timezoneOptions.value = timezones.filter( (v) => v.toLowerCase().indexOf(needle) > -1 ); }); };