Actually the following code returns ****undefined-event**** for dispatched event.
import { EVENT } from 'shared/events';
dispatch(EVENT.MODAL.CLOSE);
This issue is not key goal of the library, but it will be good if we can solve that.
I propose to implement special API to resolve event name in this case. We can implement two-leveled API:
FileResolve API - resolve JS import file path to actual file path
IdentifierEvaluator API - resolve JS identifier to actual value
FileResolve API
/**
* @param importPath import path from js file that should be resolved
* @return content of the target file
*/
function resolve(importPath: string): string;
IdentifierEvaluator API
/**
* Resolve JS part related to identifier of event to constant string.
* TBD
*/
function resolve(identifier): string;
Actually the following code returns
****undefined-event****
for dispatched event.This issue is not key goal of the library, but it will be good if we can solve that.
I propose to implement special API to resolve event name in this case. We can implement two-leveled API:
FileResolve API
IdentifierEvaluator API
Let's discuss that