I’m working on/with ts-for-gjs and found some problems when trying to map GstIterator and GstTypefind. These are “records” in the gir file and they have some name clashes between methods and fields which are function pointers. For example:
export class Iterator {
// Fields of Gst.Iterator
copy: IteratorCopyFunction
next: IteratorNextFunction
resync: IteratorResyncFunction
free: IteratorFreeFunction
// Instance and signal methods
copy(): Iterator
free(): void
next(): [ /* returnType */ IteratorResult, /* elem */ any ]
resync(): void
}
What does gjs do in this situation? The fields are function pointers/callbacks with the same signatures as their respective methods, so whether gjs exposes the field or the method ultimately shouldn’t make much difference in this case. But I just wanted to check first, in case gjs does something I hadn’t predicted, or in case there are other clashes in libraries I haven’t tested yet, where the signatures don’t match; then it would be important to know what gjs does.