class Request<T> { }
class AuthRequest<string>{}
class CommRequest<number>{}
private currentRequst:BleRequest<?>;
currentRequest = new AuthRequest();
currentRequest = new CommRequest();
ts里面正常问号可以填写成any,ArkTS这样逻辑如何写?
class Request<T> { }
class AuthRequest<string>{}
class CommRequest<number>{}
private currentRequst:BleRequest<?>;
currentRequest = new AuthRequest();
currentRequest = new CommRequest();
ts里面正常问号可以填写成any,ArkTS这样逻辑如何写?
参考示例如下: