Skip to content

Utility functions are included in output, instead of their resolved final types #1519

@anzorb

Description

@anzorb

Search terms

Maybe this is intended (or isn't implemented yet), but Utility type exports aren't being expanded in the output and instead show "Omit<>"...

export interface TSmarterLabelOptions {
   color: string;
   text: string; 
};

export type TOptions = Omit<TGlobalOptions, 'text'>;

Expected Behavior

I expect our clients to see the final result of the types involved in Utility functions:

Screen Shot 2021-02-25 at 11 36 14 AM

Actual Behavior

Screen Shot 2021-02-25 at 11 28 51 AM

This is especially problematic when re-exporting a type from another project and omitting a value (where we don't want them to know anything about the other project) and the end-users don't know what we're omitting from. This is actually how we use it:

import type { TGlobalOptions } from '../../another_project_by_tsconfig_reference';

export type TOptions = Omit<TGlobalOptions, 'text'>;

Environment

  • Typedoc version: 0.20.28
  • TypeScript version: 4.1.5
  • Node.js version: 12.18.4
  • OS: 10.15.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions