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

ts-morph needs updating #50

Open
adameier opened this issue May 2, 2022 · 0 comments
Open

ts-morph needs updating #50

adameier opened this issue May 2, 2022 · 0 comments

Comments

@adameier
Copy link

adameier commented May 2, 2022

I've been trying to see how to update fp-ts-rxjs with the latest version of rxjs, however as has been noted before, the docs that are generated afterwards have the type any in place of the expected Observable. I have found that using a version of docs-ts with the latest ts-morph to generate the docs solves the issue.

When Observable is imported from rxjs@^7.0, a function such as the following

export const ap: <A>(fa: Observable<A>) => <B>(fab: Observable<(a: A) => B>) => Observable<B> = fa => fab =>
  combineLatest([fab, fa]).pipe(rxMap(([f, a]) => f(a)))

has its generated documented type set as

export declare const ap: <A>(fa: any) => <B>(fab: any) => any

When docs-ts uses the latest morph-ts, we get the correct result:

export declare const ap: <A>(fa: Observable<A>) => <B>(fab: Observable<(a: A) => B>) => Observable<B>

Note that the documentation is generated correctly with the latest release of docs-ts and rxjs@^6.0. I'm not too sure exactly what changes to ts-morph fix the issue or exactly how the bug is caused with the current version of docs-ts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant