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

Warning from phantom comments #1

Closed
crystalfp opened this issue Sep 29, 2024 · 6 comments
Closed

Warning from phantom comments #1

crystalfp opened this issue Sep 29, 2024 · 6 comments

Comments

@crystalfp
Copy link

I transfer here the issue opened at TypeStrong/typedoc #2715 because this plugin should "Improves display of Vue defineComponent variables and Pinia stores in TypeDoc documentation."

Adding this plugin to typedoc gives the following warnings:

[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

Without including this plugin, the warnings do not appear. Including it makes the warnings appear.
Thanks for looking!

@Gerrit0
Copy link
Owner

Gerrit0 commented Sep 29, 2024

I am going to need a more working reproduction. Copying the code in that issue into a test file in this repo and running gives a ton of syntax errors. Fixing those in the most lazy way possible does not reproduce the issue:

import { defineStore } from "pinia";

export const useConfigStore = defineStore("ConfigStore", {
    state: () => ({
        camera: {},
        scene: {},
        lights: {},
        helpers: {},
    }),

    // > 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: any) {
            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: any) {
            return state.camera.type === "perspective";
        },
    },
});

@crystalfp
Copy link
Author

crystalfp commented Sep 30, 2024

Here is a minimal example:
makedoc.zip
Unzip in a directory, then npm install, then run sh makedoc.sh (or edit to run it as bat file).
Thanks for looking!

@crystalfp
Copy link
Author

Here is the run script for Windows. Rename it to makedoc.bat and run under CMD start makedoc.bat
makedoc.txt

@Gerrit0
Copy link
Owner

Gerrit0 commented Oct 4, 2024

That doesn't seem to give me any warnings/errors. I unzipped it, then ran:

npm i
npm i -D pinia # noticed it was missing
chmod +x makedoc.sh
dos2unix makedoc.sh
./makedoc.sh

Which prints:

[info] Loaded plugin typedoc-plugin-vue
[info] Documentation generated at ./doc

>>> 

Versions:

$ npx typedoc --version
TypeDoc 0.26.7
Using TypeScript 5.6.2 from ./node_modules/typescript/lib

@crystalfp
Copy link
Author

Yes, my error was to create the bug reproduction in a subdirectory of my project.
Indeed, putting it outside (and adding pinia) shows no errors.
Now I install one by one my big project packages to see who trigger the error.
Thanks for the patience!

@crystalfp
Copy link
Author

Even installing all packages from the big project does not cause the error. And I'm out of ideas about what can be inherited from the parent project.
So for now I close this issue till I will found a way to replicate the problem.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants