Gr3q / types-cjs

Typescript declarations for CJS - Cinnamon JavaScript
MIT License
5 stars 2 forks source link

extend global with cinnamon global #13

Closed jonath92 closed 2 years ago

jonath92 commented 2 years ago

Sorry for not including it yesterday already but I found the IGlobal just now. That way we (finally) should have pretty much all types of the global object (maybe some js overrides are missing). The stage must be overridden in the Global type because it is not specific enough in the Cinnamon.d.ts (there it is specified as Actor but it is of type Stage). The other two are just kept as the jsdoc is better than in the cinnamon.d.ts

Gr3q commented 2 years ago

That's mainly due to they've not generated the gir file properly or it's an old version.

I can correct them during generation, can you tell me the other props that have wrong types?

jonath92 commented 2 years ago

Stage is the only one which is wrong on global AFAICS

Gr3q commented 2 years ago

https://github.com/Gr3q/types-cjs/pull/14 please review this then, it seems it is not correct

jonath92 commented 2 years ago

yes thanks looks good. So I removed now stage as it is now fixed in your pr.

Gr3q commented 2 years ago

I also realized I don't generate typings for static functions in Records (called records in .gir files) (Like GLib List, HashTable etc, I will fix that during the weekend)