Skip to content

TypeScript Guidelines: Poller-returning methods should not require 'begin' prefix #9649

@azure-sdk-automation

Description

@azure-sdk-automation

Bad guideline reference:
https://azure.github.io/azure-sdk/typescript_design.html#ts-lro-prefix-methods currently states that poller-returning methods should use the 'begin' prefix.

Architect feedback:
With new client libraries, poller-returning methods can be invoked synchronously or awaited asynchronously for the final result. We no longer prefix these methods with begin, so the guideline is out-of-date.

Bad code snippet (following outdated guideline):

export function beginAnalyzeBinary(context: Client, analyzerId: string, input: Uint8Array, contentType: string, options?: AnalyzeBinaryOptionalParams): PollerLike<OperationState<AnalyzeResult>, AnalyzeResult>;

Good code snippet (current practice):

export function analyzeBinary(context: Client, analyzerId: string, input: Uint8Array, contentType: string, options?: AnalyzeBinaryOptionalParams): PollerLike<OperationState<AnalyzeResult>, AnalyzeResult>;

Request:
Please update the TypeScript guidelines to reflect that poller-returning methods no longer require the 'begin' prefix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions