TypeScript Guidelines: Poller-returning methods should not require 'begin' prefix
- Dominant language
- PowerShell
- Stars
- 597
- Forks
- 374
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 42
Description
**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):**
```typescript
export function beginAnalyzeBinary(context: Client, analyzerId: string, input: Uint8Array, contentType: string, options?: AnalyzeBinaryOptionalParams): PollerLike, AnalyzeResult>;
```
**Good code snippet (current practice):**
```typescript
export function analyzeBinary(context: Client, analyzerId: string, input: Uint8Array, contentType: string, options?: AnalyzeBinaryOptionalParams): PollerLike, AnalyzeResult>;
```
**Request:**
Please update the TypeScript guidelines to reflect that poller-returning methods no longer require the 'begin' prefix.
Contributor guide
Research direction
Open the TypeScript guidelines at the linked ts-lro-prefix-methods section and compare its poller-returning method naming guidance with the current examples in the issue. Update the guidance and example so the begin prefix is not required, then verify the page no longer contradicts current TypeScript client-library practice.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100