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

Typescript specific docs #117

Open
kedashoe opened this issue May 31, 2022 · 3 comments
Open

Typescript specific docs #117

kedashoe opened this issue May 31, 2022 · 3 comments

Comments

@kedashoe
Copy link

Quoting @valerii15298

Docs for usage with typescript: It would be great to have the opportunity to write docs for typescript-specific stuff for particular functions. Some functions when using with typescript really need to be explained.

@kedashoe
Copy link
Author

I'm thinking we can add comments between any imports and the exports of the type files. eg

import { Ord } from './util/tools';

/*
 * Comments go here
 */
export function max<T extends Ord>(a: T, b: T): T;
export function max<T extends Ord>(a: T): (b: T) => T;

We can then grab them in the build script and include them in the packaged index.d.ts. At some point we can get them into the ramda website as well.

Does anyone have any thoughts on more general ramda related typescript docs/thoughts/guidelines? Should we add a TYPESCRIPT.md?

@valerii15298
Copy link

Also as an idea, maybe we can use tests for it somehow? In tests(in DefinitelyTyped) there are examples how to use it with typescript with comments.

@kedashoe kedashoe transferred this issue from ramda/ramda Apr 7, 2024
@kedashoe
Copy link
Author

kedashoe commented Apr 7, 2024

transferred from the main repo, feel free to close if we want to track this another way

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

2 participants