Skip to content

[api-documenter] Overloaded namespace-level functions named with '_' in YAML #1052

@AlexJerabek

Description

@AlexJerabek

In testing out v7 of API Extractor/Documenter, I found that overloaded namespace-level functions include an underscore in both their uid and name (as shown in the yaml sample below. Other overloaded functions do not have the underscore in their name.

  - uid: onenote.OneNote.run
    summary: >-
      Executes a batch script that performs actions on the OneNote object model, using a new request context. When the
      promise is resolved, any tracked objects that were automatically allocated during execution will be released.
    name: OneNote.run
    fullName: OneNote.run
[…]
  - uid: onenote.OneNote.run_1
    summary: >-
      Executes a batch script that performs actions on the OneNote object model, using the request context of a
      previously-created API object.
    name: OneNote.run_1
    fullName: OneNote.run_1

overloads

Sample d.ts:

export declare namespace OneNote {
    /**
     * Executes a batch script that performs actions on the OneNote object model, using a new request context. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released.
     * @param batch - A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the OneNote application. Since the Office add-in and the OneNote application run in two different processes, the request context is required to get access to the OneNote object model from the add-in.
     */
    export function run<T>(batch: (context: OneNote.RequestContext) => Promise<T>): Promise<T>;
    /**
     * Executes a batch script that performs actions on the OneNote object model, using the request context of a previously-created API object.
     * @param object - A previously-created API object. The batch will use the same request context as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()".
     * @param batch - A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released.
     */
    export function run<T>(object: OfficeExtension.ClientObject, batch: (context: OneNote.RequestContext) => Promise<T>): Promise<T>;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    ae-ambiguous-idsThis issue belongs to a set of bugs tracked by PetebugSomething isn't working as intendedeffort: easyProbably a quick fix. Want to contribute? :-)needs designThe next step is for someone to propose the details of an approach for solving the problem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions