Skip to content

Instantly share code, notes, and snippets.

@splincode
Created November 12, 2019 09:39
Show Gist options
  • Save splincode/a32d4aba7c83d393da2bf2d4900793c0 to your computer and use it in GitHub Desktop.
Save splincode/a32d4aba7c83d393da2bf2d4900793c0 to your computer and use it in GitHub Desktop.
export type PropertyType<T> = T extends StateToken<any>
  ? Observable<ExtractTokenType<T>>
  : T extends (...args: any[]) => any
  ? Observable<ReturnType<T>>
  : any;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment