Skip to content

Commit

Permalink
fix: oneof typings
Browse files Browse the repository at this point in the history
  • Loading branch information
askuzminov committed Dec 27, 2020
1 parent d0b8f35 commit c147012
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/http/oneof.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ interface Oneof<T = unknown> {
}

export function oneof<T extends Oneof<unknown>, TValue extends string, Result>(
base?: T | undefined,
key?: (TValue extends T['oneof'] ? TValue : T['oneof']) | undefined,
fn?: ((v: OneofWrapper<Extract<T, Oneof<TValue>>>['item']['value']) => Result) | undefined
base: T | undefined,
key: (TValue extends T['oneof'] ? TValue : T['oneof']) | undefined,
fn: ((v: OneofWrapper<Extract<T, Oneof<TValue>>>['item']['value']) => Result) | undefined
): Result | undefined;
export function oneof<T extends Oneof<unknown>, TValue extends string, Result>(
base?: T | undefined,
Expand Down

0 comments on commit c147012

Please sign in to comment.