first of all, let"s talk about my problem. I"m currently building a project using webpack + typescript to define a class: NetData.
requirements are as follows:
- there is a frequently used function:
(netdata: NetData) = > void
. I wrote an alias using type:type NetDataFunc = (netdata: NetData) = > void;
so that when the function is passed as a parameter, the type directly usesNetDataFunc
.
then there are many aliases like NetDataFunc
. I hope to package them in a file and export them as modules to facilitate global use. Is there a good method