Closed s0 closed 2 years ago
Sorry for the late response, I'm busy these days... I made some changes and improvements to cover more of the LightDM API. However, though some methods/properties are available they do not work as expected, such as connectToDaemon
and connectToDaemonFinish
functions. Synchronous functions are yet recommended.
Also, yeah, I would be happy to start with node-gtk types~
This PR introduces some
d.ts
modules for type definitions ofnode-gtk
, and removes the related@ts-ignore
Given the nature of
node-gtk
, I am doubtful that any type-definitions for@types/node-gtk
will include the type definitions for theLightDM
library itself, but DefinitelyTyped allows the submission of type packages that aren't explicitly in NPM. So i could imagine that we could start seeing individual@types/node-gtk-X
packages for each of the gobject libraries that are commonly available (perhaps we could even start this ourselves, I would be happy to).Beyond this, I can't see there being many projects that actually want to use the type definitions for
LightDM
, other than perhaps the only NodeJS based lightdm greeter (i.e. this one), so there may not be that much community benefit in submitting these types to DefinitelyTyped, but yeah like I said I'm happy to start this. Given though that the DefinitelyTyped project can move very slowly, it's probably a good idea to include these changes in this repo to begin with, as a proof-of-concept that the types are correct, and to give us the extra type-safety.Beyond this, a few improvements were made, including:
null
instead of an empty object when given falsy objects from node-gtkreduceArray
to improve type inference and remove requirement for usingany
as parameter types for conversion functionsany
inbridge_objects
functionsac_status
which was incorrectI haven't been able to thoroughly test the non-type changes I've made, and will be unable to for a few weeks, so I think it would be good for you to test that everything still works before merging this! :)