Closed
Description
Search terms
Pinia, link
Expected Behavior
In the following code (from a Pinia store) I expect no warnings from TSDoc.
export const useConfigStore = defineStore("ConfigStore", {
state: () => ({
camera: {
. . .
},
scene: {
. . .
},
lights: {
. . .
},
helpers: {
. . .
}
} as Viewer3DConfiguration),
// > Getters
getters: {
/**
* Return the status to be saved in a project
*
* @param state - The store state
* @returns JSON formatted content of the store to be saved
*/
statusToSave(state: Viewer3DConfiguration) {
const statusToSave = {
camera: state.camera,
scene: state.scene,
lights: state.lights,
helpers: state.helpers,
};
return JSON.stringify(statusToSave);
},
/**
* Check if the camera is perspective
*
* @param state - The store state
* @returns True if the camera is set to perspective
*/
isPerspectiveCamera(state: Viewer3DConfiguration) {
return state.camera.type === "perspective";
}
},
Actual Behavior
Typedoc complains about failed links in non-existent comments for statusToSave
getter routine. Where it takes the "replace" thing?
[warning] Failed to resolve link to "searchValue" in comment for stores/configStore.useConfigStore.statusToSave.replace.replaceValue
[warning] Failed to resolve link to "replaceValue" in comment for stores/configStore.useConfigStore.statusToSave.replace
[warning] Failed to resolve link to "searchValue" in comment for stores/configStore.useConfigStore.statusToSave.replace
Strange enough, no complain from the second getter, even it has the same structure.
Steps to reproduce the bug
- Put the above code in a file called
configStore.ts
- Run the following code:
root=`pwd | sed "s@/d/@/d:/@"`
node_modules/.bin/typedoc \
--name "See the Molecule new generation" \
--out "doc/typedoc" \
--readme none \
--suppressCommentWarningsInDeclarationFiles \
--plugin typedoc-plugin-vue \
--plugin @zamiell/typedoc-plugin-not-exported \
--disableGit \
--excludeInternal \
--sourceLinkTemplate "vscode://file$root/{path}:{line}:1" \
--tsconfig ./tsconfig.json \
configStore.ts
Environment
- Typedoc version: 0.26.7
- TypeScript version: 5.6.2
- Node.js version: 22.5.1
- OS: Windows 11 64bits
Metadata
Metadata
Assignees
Labels
No labels