Skip to content

Commit

Permalink
Add await for sync function (#3014)
Browse files Browse the repository at this point in the history
* add await for sync function

* regen code

* regen code

* update

* revert

* add await for hlc samples

* regen code
  • Loading branch information
v-jiaodi authored Jan 22, 2025
1 parent f0c9ed7 commit aceef4a
Show file tree
Hide file tree
Showing 1,734 changed files with 2,086 additions and 3,632 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async function {{this.sampleFunctionName}}() {

async function main() {
{{#each samples}}
{{this.sampleFunctionName}}();
await {{this.sampleFunctionName}}();
{{/each}}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async function {{name}}() {

async function main() {
{{#each samples}}
{{this.name}}();
await {{this.name}}();
{{/each}}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function enumGetNotExpandable() {
}

async function main() {
enumGetNotExpandable();
await enumGetNotExpandable();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function enumGetReferencedConstant() {
}

async function main() {
enumGetReferencedConstant();
await enumGetReferencedConstant();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function enumGetReferenced() {
}

async function main() {
enumGetReferenced();
await enumGetReferenced();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function enumPutNotExpandable() {
}

async function main() {
enumPutNotExpandable();
await enumPutNotExpandable();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function enumPutReferencedConstant() {
}

async function main() {
enumPutReferencedConstant();
await enumPutReferencedConstant();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function enumPutReferenced() {
}

async function main() {
enumPutReferenced();
await enumPutReferenced();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function stringGetBase64Encoded() {
}

async function main() {
stringGetBase64Encoded();
await stringGetBase64Encoded();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function stringGetBase64UrlEncoded() {
}

async function main() {
stringGetBase64UrlEncoded();
await stringGetBase64UrlEncoded();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function stringGetEmpty() {
}

async function main() {
stringGetEmpty();
await stringGetEmpty();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function stringGetMbcs() {
}

async function main() {
stringGetMbcs();
await stringGetMbcs();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function stringGetNotProvided() {
}

async function main() {
stringGetNotProvided();
await stringGetNotProvided();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function stringGetNullBase64UrlEncoded() {
}

async function main() {
stringGetNullBase64UrlEncoded();
await stringGetNullBase64UrlEncoded();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function stringGetNull() {
}

async function main() {
stringGetNull();
await stringGetNull();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function stringGetWhitespace() {
}

async function main() {
stringGetWhitespace();
await stringGetWhitespace();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function stringPutBase64UrlEncoded() {
}

async function main() {
stringPutBase64UrlEncoded();
await stringPutBase64UrlEncoded();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function stringPutEmpty() {
}

async function main() {
stringPutEmpty();
await stringPutEmpty();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function stringPutMbcs() {
}

async function main() {
stringPutMbcs();
await stringPutMbcs();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function stringPutNull() {
}

async function main() {
stringPutNull();
await stringPutNull();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function stringPutWhitespace() {
}

async function main() {
stringPutWhitespace();
await stringPutWhitespace();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function dpgGetModel() {
}

async function main() {
dpgGetModel();
await dpgGetModel();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function dpgNextLink() {
}

async function main() {
dpgNextLink();
await dpgNextLink();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async function dpgLro() {
}

async function main() {
dpgLro();
await dpgLro();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async function dpgPostModel() {
}

async function main() {
dpgPostModel();
await dpgPostModel();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function headerParamExistingKey() {
}

async function main() {
headerParamExistingKey();
await headerParamExistingKey();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function headerParamInteger() {
}

async function main() {
headerParamInteger();
await headerParamInteger();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function headerParamProtectedKey() {
}

async function main() {
headerParamProtectedKey();
await headerParamProtectedKey();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function analyzeBodyNoAcceptHeaderSample() {
}

async function main() {
analyzeBodyNoAcceptHeaderSample();
await analyzeBodyNoAcceptHeaderSample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function analyzeBodySample() {
}

async function main() {
analyzeBodySample();
await analyzeBodySample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function binaryBodyWithThreeContentTypesSample() {
}

async function main() {
binaryBodyWithThreeContentTypesSample();
await binaryBodyWithThreeContentTypesSample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function binaryBodyWithTwoContentTypesSample() {
}

async function main() {
binaryBodyWithTwoContentTypesSample();
await binaryBodyWithTwoContentTypesSample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function bodyThreeTypesSample() {
}

async function main() {
bodyThreeTypesSample();
await bodyThreeTypesSample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function contentTypeWithEncodingSample() {
}

async function main() {
contentTypeWithEncodingSample();
await contentTypeWithEncodingSample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function putTextAndJsonBodySample() {
}

async function main() {
putTextAndJsonBodySample();
await putTextAndJsonBodySample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function getCatSample() {
}

async function main() {
getCatSample();
await getCatSample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function getFelineSample() {
}

async function main() {
getFelineSample();
await getFelineSample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function getHorseSample() {
}

async function main() {
getHorseSample();
await getHorseSample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function getKittenSample() {
}

async function main() {
getKittenSample();
await getKittenSample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function getPetSample() {
}

async function main() {
getPetSample();
await getPetSample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function putCatSample() {
}

async function main() {
putCatSample();
await putCatSample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function putFelineSample() {
}

async function main() {
putFelineSample();
await putFelineSample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function putHorseSample() {
}

async function main() {
putHorseSample();
await putHorseSample();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function putKittenSample() {
}

async function main() {
putKittenSample();
await putKittenSample();
}

main().catch(console.error);
Loading

0 comments on commit aceef4a

Please sign in to comment.