type-tls
Version:
type-tls 封装了与类型相关的工具,比如:获取数据的类型 或 类型名字、判断数据的类型 等
19 lines (10 loc) • 424 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [type-tls](./type-tls.md) > [ResolveData](./type-tls.resolvedata.md)
## ResolveData type
获取 Promise 解决的类型的值
**Signature:**
```typescript
export type ResolveData<P> = P extends Promise<infer D> ? D : P;
```
## Remarks
对于非 Promise 类型的值,返回原类型本身