-
Notifications
You must be signed in to change notification settings - Fork 708
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
warning Failed to resolve ... with declaration references. This link will break in v0.24. #1980
Comments
Web links are not a valid declaration reference, this is a valid warning. You should use a markdown link instead. This might be something that I could be convinced to add support for given that JSDoc for some reason decided to allow it, but I'm not aware of any reasons to use it over a regular markdown link. |
@Gerrit0 Could you elaborate on what a |
Markdown links: https://www.markdownguide.org/basic-syntax/#links Your html should work too with the default settings, maybe you're rendering to markdown and giving it to some other pipeline which doesn't support in-line html? |
I have with the markdown syntax as well, but it does not seem to work as expected. typedoc.json: {
"entryPoints": [
"./src"
],
"entryPointStrategy": "expand",
"out": "doc",
"exclude": [
"node_modules"
]
} source: /**
* Return the total of two numbers.
*
* <a href="https://duckduckgo.com">Duck Duck Go</a>
* [Duck Duck Go](https://duckduckgo.com)
*
* @params p1 - The first number
* @params p2 - The second number
* @returns The total
*/
export function add(p1: number, p2: number): number {
return p1 + p2;
} |
You indented it by 4 spaces. That's (one of several) markdown syntaxes for a code block. TypeDoc does very little processing, and passes your comment on to Marked, which is responsible for this behavior. |
It was actually a tab but thank you very much for finding the problem. |
At this point, I'm leaning towards not allowing this. Using a tag implies that the link is intended to be resolved by TypeDoc. There's no point in giving this link to TypeDoc unless you're expecting it to do something with the link... and it doesn't. There are several markdown alternatives to this: http://example.com (if you have marked's gfm option on to make it behave more like GitHub's markdown)
<http://example.com>
<a href="http://example.com">link text</a>
[link text](http://example.com) Notes:
|
@Gerrit0 According to TSDoc docs, URLs are allowed in
I'm fine with using markdown links, however they don't work very nicely in a An example of using https://tsdoc.org/pages/tags/see/ /**
* 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; |
@frank-weindel Thank you for the update. I still believe that support for |
... no idea how I missed that when adding support for declaration references. I guess I started with https://tsdoc.org/pages/spec/overview/ and never actually looked at |
Thank you! |
Search terms
warning Failed to resolve
Expected Behavior
No warning
Actual Behavior
warning Failed to resolve {@link https://stackoverflow.com/questions/92720/jquery-javascript-to-replace-broken-images} in data/employee.getFallbackImage with declaration references. This link will break in v0.24.
Steps to reproduce the bug
Environment
The text was updated successfully, but these errors were encountered: