Skip to content

[BUG] Support for Indexed Access Types ([])  #1507

@imike57

Description

@imike57

Hello,

I am experiencing an issue with Compodoc (version 1.1.25) when using indexed access types (also known as lookup types) in TypeScript, specifically when referencing a property of another type or interface using the T[K] syntax.

Example Code

Here is a TypeScript code example that causes this problem:

interface Person {
  name: string;
  age: number;
  phone: number | string;
  email: string;
}

interface ContactInfo {
  phone: Person['phone'];  
  years: Person['age']; 
}

Observed Behavior

When running Compodoc, the types defined using the T[K] syntax are not correctly interpreted or documented. They are not displayed correctly in the generated documentation and empty in JSON export.

Expected Behavior

I would expect Compodoc to recognize and correctly document the types obtained via the [] operator, specifying the exact type (string, number, etc.) instead of an empty result.

Environment Details

  • Compodoc Version: 1.1.25

Thank you for looking into this issue!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy