Skip to content

chore: have support ReadOnlyList in function return parameters#1713

Merged
mxschmitt merged 1 commit intomainfrom
readonlylist
Mar 13, 2025
Merged

chore: have support ReadOnlyList in function return parameters#1713
mxschmitt merged 1 commit intomainfrom
readonlylist

Conversation

@mxschmitt
Copy link
Contributor

case 'any': return `[object]${optionalSuffix}`;
case 'unknown': return `[object]${optionalSuffix}`;
case 'Array': return `[IEnumerable]${optionalSuffix}`;
case 'Array': return direction === 'out' ? `[IReadOnlyList]${optionalSuffix}` : `[IEnumerable]${optionalSuffix}`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Can we share this logic between the generator and docs?

switch (fullName(member)) {
case 'BrowserContext.addCookies.cookies': return '`Cookie`';
case 'BrowserContext.cookies': return '`Cookie`';
case 'BrowserContext.cookies': return '`BrowserContextCookiesResult`';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@github-actions
Copy link
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-forest-0a29f6210-1713.centralus.azurestaticapps.net

Copy link
Member

@yury-s yury-s left a comment

Choose a reason for hiding this comment

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

There is a bunch of unrelated changes, if they are due to a roll, let's land the roll separately and have generator change isolated.

case 'any': return `[object]${optionalSuffix}`;
case 'unknown': return `[object]${optionalSuffix}`;
case 'Array': return `[IEnumerable]${optionalSuffix}`;
case 'Array': return direction === 'out' ? `[IReadOnlyList]${optionalSuffix}` : `[IEnumerable]${optionalSuffix}`;
Copy link
Member

Choose a reason for hiding this comment

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

Can we share this logic between the generator and docs?

@github-actions
Copy link
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-forest-0a29f6210-1713.centralus.azurestaticapps.net

@mxschmitt mxschmitt merged commit 689b47f into main Mar 13, 2025
5 of 6 checks passed
@mxschmitt mxschmitt deleted the readonlylist branch March 13, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dotnet CookiesAsync return type incorrect

2 participants