Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break typedoc with complex types #39

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 29 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
/**
* Some code reproducing a bug.
*/
export const bug = 123;
export interface Struct {
fields: { [key: string]: Value };
}

export interface Struct_FieldsEntry {
value: Value | undefined;
}

export interface Value {
structValue?: Struct | undefined;
listValue?: ListValue | undefined;
}

export interface ListValue {
values: Value[];
}

export function fromPartial<I extends Exact<DeepPartial<Struct_FieldsEntry>, I>>(object: I): Struct_FieldsEntry {
return undefined as any;
};

type Builtin = undefined;

export type DeepPartial<T> = T extends Builtin ? T : Partial<T>;

type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin
? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
Loading