报错日志:
rror name:ReferenceError
06-04 16:39:36.058 24178-24178 C01305/Appkit pid-24178 E Error message:NotifyCallback is not initialized
06-04 16:39:36.058 24178-24178 C01305/Appkit pid-24178 E SourceCode:
06-04 16:39:36.058 24178-24178 C01305/Appkit pid-24178 E export class TopBarNotifyCallback<T> extends NotifyCallback<T> {
06-04 16:39:36.058 24178-24178 C01305/Appkit pid-24178 E ^
06-04 16:39:36.058 24178-24178 C01305/Appkit pid-24178 E Stacktrace:
06-04 16:39:36.058 24178-24178 C01305/Appkit pid-24178 E SourceMap is not initialized yet
06-04 16:39:36.058 24178-24178 C01305/Appkit pid-24178 E at func_main_0 (entry/build/default/cache/d
代码:
export class NotifyCallback<T> {
notifyUpdate?: (data: T) => void
}
export class MyNotifyCallback<T> extends NotifyCallback<T> {
bean?: Bean;
}
这种错误一般是循环依赖导致的,MyNotifyCallback和NotifyCallback定义在两个ets文件中,又互相import导致报错。