Azure / Azure/azure-sdk

[TypeScript Guidelines] Subclients can be exposed as readonly properties typed as FooOperations

Open Beginner friendly
#9,988 0 comments 0 reactions 0 assignees View on GitHub
customer-reported needs-triage question
Dominant language
PowerShell
Stars
597
Forks
374
Avg merge
5d 21h
Merged PRs (30d)
42

Description

Bad code snippet:
```ts
readonly sharedAccessSignature: SharedAccessSignatureOperations;
```

What it should do:
The current guideline suggesting that subclients must be exposed only through `get`-prefixed methods with a `Client` suffix is out of date for this generated code. Our codegen intentionally emits readonly properties typed as `FooOperations`, so the guidance should be updated to reflect the current pattern rather than flagging it as incorrect.

Good code snippet:
```ts
readonly sharedAccessSignature: SharedAccessSignatureOperations;
```

Contributor guide

Open the contributing guide

Research direction

Start from the TypeScript guideline that requires subclients to use get-prefixed methods with a Client suffix. Update the guidance to accept readonly properties typed as FooOperations, and verify that the sharedAccessSignature example is no longer flagged as incorrect.

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
Quiet
Clarity
Clearly specified
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.