Skip to content

[api-extractor] Imported function type annotation causes function to be in Variables section #5305

@YElyousfi

Description

@YElyousfi

Summary

Repro steps

Generate markdown documentation for the following

import MyFunctionType from "./somewhere.js
// MyFunctionType is alias for `() => boolean`

export const fn1: () => boolean = () => true // Function section
export const fn2: MyFunctionType = () => true // Variables section

Expected result:
I expect fn2 to be in the Function section of the generated docs

Actual result:
fn2 is in the Variables section

Details

Imported types seem to not be inferred as functions when annotating variables

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/api-extractor version? 7.52.10
Operating system? Windows
API Extractor scenario? kind classification
Would you consider contributing a PR? No
TypeScript compiler version? 5.8.3
Node.js version (node -v)? 24.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions