GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — Add see tag support by Kingwl · Pull Request #39760 · microsoft/TypeScript Conversation
|
|
Friendly ping Nathan Shively-Sanders (@sandersn) . I'm not sure what is the expected of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Couple of quick comments -- I've only glanced at the code, haven't really read it yet.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hoops. Seems not my fault. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
UP ↑ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Nathan Shively-Sanders (@sandersn) Is that a valid syntax?... I'm not sure what are you expected... TypeScript Bot (@typescript-bot) pack this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Wenlu Wang (@Kingwl), I've started to run the tarball bundle task on this PR at 51b67d7. You can monitor the build here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Hey Wenlu Wang (@Kingwl), I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
3b502f4 to
838a5e6
Compare
|
Based on my comment on the original bug, here are some more test cases that need to be added. They don't have to pass, but I want to make sure they don't crash:
I'm going to do a bit more looking to see how well we'll be able to resolve module references in things like lodash. I think a lot of uses just make up a name for the module they are inside, even though it's never declared inside the module itself. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The only question I have left before merging this is how to resolve /** @param x @see x */ function f(x) { } Right now, But I don't actually think people write this. I'm going to figure out if that's the case. Either way, I think the best thing is to resolve starting from the parameter list of a function declaration. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Maybe we could peek the parameters first if jsdoc attached on a function like declaration. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
If we resolveName starting from the parameter list, I think you can get it to resolve to just the parameter. So |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
My suggestion fixes the parameter name resolution, still need a test like
const x = 1 /** @see x */ function f(x) { }
To make sure that x resolves to the parameter.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Could someone from the TS team please clarify if this current |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Work on Can you add a deeper link to the tsdoc syntax you're talking about? I talked with Pete Gonzalez (@octogonz) and concluded that TS should attempt to support a basic subset of entity names. Ron Buckton (@rbuckton) pointed me to a grammar he made, but I'd have to look through my notes to find the link. Edit: Here is what we're targetting in the near term: #35524 (comment) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The TSDoc spec for /** * Parses a string containing a Uniform Resource Locator (URL). * @see {@link ParsedUrl} for the returned data structure * @see {@link https://tools.ietf.org/html/rfc1738|RFC 1738} * for syntax * @see your developer SDK for code samples * @param url - the string to be parsed * @returns the parsed result */ function parseURL(url: string): ParsedUrl; |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
TSDoc and the compiler seem to take somewhat different approaches today:
As such TSDoc would be a somewhat heavyweight piece to incorporate into the compiler. (Not in terms of kilobytes, but in terms of complexity and upkeep.) And doing so might drag the compiler into the rabbit hole of enterprise documentation systems, which is a delightful but surprisingly complex space. This would benefit developers who write rich documentation and adopt TSDoc, but they are a minority. So the current situation is understandable, if not ideal. An easy way out would be for the compiler to expose a plugin API enabling its comment parser to be replaced. This way, developers could opt-in to TSDoc, and there wouldn't need to be any close coordination between the two projects. This idea was brought up in my last chat with the TypeScript folks, and it seemed to align pretty well with their roadmap for extensibility. It seems like a feasible and pretty good solution. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
There's a weird thing going on right now where |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.