Comments (14)
Indeed, our overrides here are missing the JSDoc to change the typings (opened #284).
from ts-for-gir.
Thanks you for your helpful feedback @romgrk 💚
I will look at it as soon as possible, hopefully in a few weeks.
from ts-for-gir.
@romgrk Unfortunately I have no time at the moment, maybe you can see if you can implement some of these things yourself?
from ts-for-gir.
Sorry, no bandwidth for that :/ I might get around to it but I have more urgent issues to fix in node-gtk first.
from ts-for-gir.
Any updates in node-gtk @romgrk ?
from ts-for-gir.
Still no time, the project has other bugs that are more important to fix and I've been having trouble getting around to them :/
from ts-for-gir.
@romgrk I hope I've fixed the points 2, 3, 4 and 6 now. Can you take a look at @types/node-gtk on my fork?
from ts-for-gir.
I've taken a quick look, seems good overall :)
Fixing 5 would be awesome though. E.g. for Gtk, the methods signature usually take a Gtk.Widget, but we want child clasees (Gtk.Button, Gtk.Icon, ...) to fit in there so they need to inherit from Gtk.Widget.
from ts-for-gir.
I think it hasn't been mentioned (& I still need to look at it) but APIs like setProperty
are incorrectly marked as taking a GValue
, the correct type would be any
I think?
edit: also, this tool also seems to mark arrays of primitives as any
from ts-for-gir.
Also to keep it in mind, the typings use Class.$gtype
when it should be Class.prototype.__gtype__
, but I'm not sure this was meant to be a public API, because it's missing on boxed objects (only available on actual instances).
from ts-for-gir.
Not public, those are used for edge cases where there is not enough info in either GIR or Glib's gtype system about a boxed instance. They might be removed when I find a better way to handle them.
from ts-for-gir.
In that case I suppose the best thing would be to add a public API at Class.$gtype
to match gjs. It makes more sense than adding it on instances and the user can do instance.constructor.$gtype
from ts-for-gir.
Yes, adding it on the constructor seems like the best place to add a public API for that. I don't really like the $
notation though. But let's open an issue on node-gtk for further discussion on this, it will save @sammydre from hearing our node-gtk internal discussions.
from ts-for-gir.
Theoretically all points should be solved now, if there are still issues please open a new issue, I am happy about feedback. :)
from ts-for-gir.
Related Issues (20)
- Incorrect types for `Gio.BindingTransformFunc`
- Publish the types on JSR HOT 1
- Some nullable object properties are not marked as nullable by TS for GIR
- tsc report Duplicate identifier HOT 2
- Finalise the ts-for-gir and gi.ts fusion HOT 1
- `console.setLogDomain` doesn't exist in GJS
- `GObject.ParamSpec.override` shouldn't return `void`
- `Requires` property is missing on `MetaInfo` HOT 1
- Add `/usr/lib/mutter-13` to default search paths HOT 1
- The `buildType` option doesn't work yet. HOT 18
- Can't construct Graphene.Point HOT 3
- Missing promisified overloads HOT 5
- Add `gi.d.ts` index file HOT 4
- Create an import for the latest version in `*-ambient.d.ts` HOT 3
- Wrong constructor properties for `GLib.Error`
- Some fields are missing HOT 1
- flags should be GObject.ParamFlags in GObject.ParamSpec.object() HOT 9
- Cannot find module 'gi://*' or its corresponding type declarations HOT 1
- Add example without a bundler
- Versioning scheme HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ts-for-gir.