dts2hx icon indicating copy to clipboard operation
dts2hx copied to clipboard

Recursive typedef created in firebase-admin

Open clarkjones opened this issue 4 years ago • 2 comments

Running dts2hx on firebase-admin v9.4.2 generates the code below which results in a recursive typedef error

package firebase_admin.messaging;

/**
	Payload for the admin.messaging.send() operation. The payload contains all the fields
	in the BaseMessage type, and exactly one of token, topic or condition.
**/
typedef Message = Message;

clarkjones avatar Jan 10 '21 02:01 clarkjones

I don' t get this error after updating firebase-admin to 9.5. It now creates:

typedef Message = ts.AnyOf3<TokenMessage, TopicMessage, ConditionMessage>;

clarkjones avatar Feb 17 '21 14:02 clarkjones

Interesting! Thanks for the heads up, when I’m back on dts2hx work I’ll still take a look at what caused the original issue

haxiomic avatar Feb 17 '21 15:02 haxiomic