Giter Club home page Giter Club logo

Comments (7)

ebekebe avatar ebekebe commented on June 15, 2024 1

I get the same error message, with this little code snippet:

const f = () => 1;

/** doc
 */
export type ReturnOfF = ReturnType<typeof f>;

and when I run typedoc --excludeNotDocumented --out docs ./src/test.ts. When I omit --excludeNotDocumented the error goes away.

from typedoc.

Gerrit0 avatar Gerrit0 commented on June 15, 2024 1

Thanks! That does it, very confused as to why I used to symbol in removeReflection now...

from typedoc.

Gerrit0 avatar Gerrit0 commented on June 15, 2024

This is probably caused by 6370490, specifically 6370490#diff-28b49c0a2528c726938d5b8ad6f68b2b12e25994b5cfb3d55b449447e2fcc09dR255

Going to be difficult to fix the underlying issue with this without a reproduction, as that assert ought to be safe in this context. Just fixing the symptom is easy, but not the right thing to do from my current understanding of that, which is admittedly a month and a bit old now... have been lots of other problems to take up brain space.

from typedoc.

Gerrit0 avatar Gerrit0 commented on June 15, 2024

Are you running with any plugins? I looked at the reflection removal code again, and am not seeing anything obvious which would cause this issue..

from typedoc.

andyferris avatar andyferris commented on June 15, 2024

Are you running with any plugins?

We are using typedoc-plugin-markdown and typedoc-plugin-merge-modules. (But the symptom likely is related to what @ebekebe wrote above - we definitely use ReturnType and have undocumented items).

from typedoc.

Gerrit0 avatar Gerrit0 commented on June 15, 2024

I put that snippet into a project and can't seem to reproduce still:

All of these generate docs successfully:

npx typedoc@0.25.5 src/gh2496.ts
npx typedoc@0.25.5 src/gh2496.ts --excludeNotDocumented
npx typedoc@latest src/gh2496.ts --excludeNotDocumented

I also tried exporting/not exporting f and including a link to f in ReturnOfF's documentation comment... none of these resulted in a crash.

from typedoc.

ebekebe avatar ebekebe commented on June 15, 2024

Apologies, I couldn't reproduce it with my above snippet either. I don't know where the mistake happened, but here is the slightly modified version that does fail:

export function f() {
    return 1
}

/** doc
 */
export type ReturnOfF = ReturnType<typeof f>;

and the command:

❯ npx [email protected] --excludeNotDocumented --out docs src/test.ts
TypeDoc exiting with unexpected error:
TypeError: Cannot read properties of undefined (reading 'kindOf')
...

from typedoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.