-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Docstrings don't show correctly #385
Comments
Ciao @nkint - welcome back & nice to see you back here!!! 👋 You're not the only one struggling with this, and even though I think I know why/when this issue/behavior occurs, I still don't know a practical solution to counteract it! Filing an TS issue upstream might be required. As far as I can tell, the docs are not being displayed for any function which uses a type alias to simplify (or enforce) its signature. For example, the import type { MatOpMV } from "./api.js";
/**
* Multiplies 3x3 matrix `m` with 3D vector `v`. Supports in-place
* modification, i.e. if `out === v`.
*
* @param out -
* @param m -
* @param v -
*/
export declare const mulV33: MatOpMV; In contrast, the /**
* Computes a 2x3 matrix representing a scale operation with origin `p`
* and writes result to `out`.
*
* @param out -
* @param m -
*/
export declare const scaleWithCenter23: (m: Mat | null, p: ReadonlyVec, s: number | ReadonlyVec) => import("@thi.ng/vectors").Vec; I don't know/understand why the TS language server treats these cases differently and doesn't show the docstring for the first one, esp. since it obviously has all the proper typing info available... I tried to look into that a few years back already, but didn't find anything super relevant in the TypeScript issues. Maybe, if you have time for it, you could try submitting an issue/question there, since this isn't just an issue related to umbrella packages... |
hi karsten! |
Thanks, @nkint! Please let me know if you're going to submit an issue for TypeScript about this. Else I will add it to my to-do list... Pa. Not just in this case, but also with other related tooling (e.g. TSDoc), there seems to be a general attitude of treating arrow functions as obscure/special cases. Lucky for all the projects here which almost exclusively use arrow functions! 😩 |
Hi :)
not sure if opening an issue is the right thing, if a general discussion could fit better I'm happy to move there.
I'm noticing that docstrings not always show in the correct way, is it a problem in my vscode settings?
In this screenshot:
I'm expecting to see:
In the same way in this screenshot:
I see:
Does it make sense? Am I the only one having this problem?
p.s.
I know that in the first screenshot the order of arguments are wrong. The documentation of the code in this repository is super well done, it's a pity I'm not seeing it 😥
The text was updated successfully, but these errors were encountered: