我有一个简单的Rest示例(取自泽西岛Maven原型),其中包含一个RestRessource类别@Produces(MediaType.APPLICATION_JSON但是现在我想将响应类型更改为响应类型,如下面所示,但是如果我访问它,则会出现以下错误:
09:30:04,688 SEVERE [org.glassfish.jersey.message.internal.WriterInterceptorExecutor具有返回类型响应的Ress
Athlete<List<String>>( // <--- past List<String> as generic belongings: ["Jerseybelonging = messi.belongings; // <-- the data type is dynamic, not List<String>
如您所见,我希望belongings属性是泛型</em
我有一个自定义泛型类型,它在内部使用React的ComponentProps。
您可以在上面的链接中看到,当我使用PropsWithAs泛型类型时,TS只有在我直接访问fallbackText时才会理解它是有问题的。但是,当我使用rest语法时,它无法获得rest变量中的fallbackText。identified by TS