Skip to content

[azureBus] Typescript samples: fix type error & tsconfig.json#20227

Closed
fengdi721 wants to merge 1 commit intoAzure:mainfrom
fengdi721:hotfix/azurebus-typescript-sample-error
Closed

[azureBus] Typescript samples: fix type error & tsconfig.json#20227
fengdi721 wants to merge 1 commit intoAzure:mainfrom
fengdi721:hotfix/azurebus-typescript-sample-error

Conversation

@fengdi721
Copy link

@fengdi721 fengdi721 commented Feb 5, 2022

Packages impacted by this PR

servicebus/service-bus/samples/v7/typescript

Issues associated with this PR

N/C

Describe the problem that is addressed by this PR

  1. With the latest typescript (version 4.5.*) , the npm run buildfailed because of compile error :
src/advanced/sessionRoundRobin.ts:98:26 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Error'.
98       await processError(err, undefined);

I added "type assertion" to fix this compile error.

  1. The examples in advanced folder are not included in the compile process, so i updated the tsconfig.json to include them.

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

N/C

Are there test cases added in this PR? (If not, why?)

Provide a list of related PRs (if any)

N/C

Command used to generate this PR:**(Applicable only to SDK release request PRs)

Checklists

  • [*] Added impacted package name to the issue description
  • [*] Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
  • [*] Added a changelog (if necessary)

@ghost ghost added Service Bus customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Feb 5, 2022
@ghost
Copy link

ghost commented Feb 5, 2022

Thank you for your contribution feng-di! We will review the pull request and get back to you soon.

@ghost
Copy link

ghost commented Feb 5, 2022

CLA assistant check
All CLA requirements met.

Copy link
Member

@witemple-msft witemple-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The src/**.ts looks like a dev-tool bug. I'll update the tool to generate src/**/*.ts instead.

await sessionClosed("idle_timeout", sessionReceiver.sessionId);
} catch (err) {
await processError(err, sessionReceiver.sessionId);
await processError(<Error>err, sessionReceiver.sessionId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

err as Error is preferable to using the <Error>err syntax.

@jeremymeng jeremymeng added the Client This issue points to a problem in the data-plane of the library. label Feb 7, 2022
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label May 6, 2022
@ghost
Copy link

ghost commented May 6, 2022

Hi @feng-di. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@ghost ghost closed this May 13, 2022
@ghost
Copy link

ghost commented May 13, 2022

Hi @feng-di. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing "/reopen" if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the "no-recent-activity" label; otherwise, this is likely to be closed again with the next cleanup pass.

azure-sdk pushed a commit to azure-sdk/azure-sdk-for-js that referenced this pull request Sep 19, 2022
[Microsoft.StorageSync] New API version 2022-06-01 (Azure#20227)

* Adds base for updating Microsoft.StorageSync from version stable/2020-09-01 to version 2022-06-01

* Updates readme

* Updates API version in new specs and examples

* Swagger API Spec Update for adding Low Disk Mode to Storage Sync (Azure#19725)

* Added Low Disk Mode property

* Updated API Spec for introducing Low Disk Mode

* Updated Examples for API Spec for Low Disk Mode

* Updated Examples for Cloud Tiering Status (Azure#19885)

* [Microsoft.StorageSync] Add AFS file share metadata certificate public keys API to version 2022-06-01 (S360 compliance) (Azure#20517)

* Fix readme.md file so that tag information includes full API version 2022-06-01

* Add afs share metadata certificate public keys API

https://portal.azure-devex-tools.com/amekpis/completeness/detail?errorId=DBF8D800-EB0B-48E0-B665-BC91CB1A17B9

* Fix casing of afssharemetadatacertificatepublickeys

* Temporarily rename examples file to fix casing issue.

* Fix casing of new example file

Co-authored-by: ankushbindlish2 <34896519+ankushbindlish2@users.noreply.github.com>
Co-authored-by: Juan Carlos Juarez <106784687+jcjuarez-msft@users.noreply.github.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. no-recent-activity There has been no recent activity on this issue. Service Bus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants