提交 dfa931d7 编写于 作者: J Johannes Rieken

more Dto<T> tweaks

上级 470966b0
......@@ -258,14 +258,12 @@ export type UriDto<T> = { [K in keyof T]: T[K] extends URI
/**
* Mapped-type that replaces all occurrences of URI with UriComponents and
* drops all functions.
* todo@joh use toJSON-results
*/
export type Dto<T> = { [K in keyof T]: T[K] extends { toJSON(): infer U }
export type Dto<T> = T extends { toJSON(): infer U }
? U
: T[K] extends Function
? never
: Dto<T[K]> };
: T extends object
? { [k in keyof T]: Dto<T[k]>; }
: T;
export function NotImplementedProxy<T>(name: string): { new(): T } {
return <any>class {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册