haxiomic / dts2hx

Converts TypeScript definition files (d.ts) to haxe externs (.hx) via the TypeScript compiler API
MIT License
134 stars 9 forks source link

Recursive typedef created in firebase-admin #81

Open clarkjones opened 3 years ago

clarkjones commented 3 years ago

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 commented 3 years ago

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

typedef Message = ts.AnyOf3<TokenMessage, TopicMessage, ConditionMessage>;
haxiomic commented 3 years ago

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