mardi 21 mars 2023

Visitor design pattern: can my visitor returns a Promise or should I create a new interface

I am now using a Visitor pattern where I have 2 visitors using the same interface returning T. It basically looks like the schema below, but my visitor returns something.

I would like to change the return type of one of my visitor to return a Promise.

Should I create a new interface for this issue?

enter image description here

Aucun commentaire:

Enregistrer un commentaire