Skip to content

docs: support unknown type#1686

Merged
Skn0tt merged 1 commit intomicrosoft:mainfrom
Skn0tt:support-unknown
Feb 27, 2025
Merged

docs: support unknown type#1686
Skn0tt merged 1 commit intomicrosoft:mainfrom
Skn0tt:support-unknown

Conversation

@Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Feb 27, 2025

No description provided.

@Skn0tt Skn0tt requested a review from Copilot February 27, 2025 15:00
@Skn0tt Skn0tt self-assigned this Feb 27, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This PR adds support for the "unknown" type in the Java, Python, and C# formatters by introducing new case mappings in each file.

  • In src/format_java.js, "unknown" is mapped to "[Object]".
  • In src/format_python.js, "unknown" is mapped to "[Any]".
  • In src/format_csharp.js, "unknown" is mapped to "[object]"+optionalSuffix.

Reviewed Changes

File Description
src/format_java.js Added "unknown" type mapping returning [Object].
src/format_python.js Added "unknown" type mapping returning [Any].
src/format_csharp.js Added "unknown" type mapping returning [object] with optionalSuffix.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (3)

src/format_java.js:166

  • Ensure test coverage is added for the new 'unknown' type mapping in the Java formatter.
      case 'unknown': return '[Object]';

src/format_python.js:117

  • Ensure test coverage is added for the new 'unknown' type mapping in the Python formatter.
      case 'unknown': return '[Any]';

src/format_csharp.js:130

  • Ensure test coverage is added for the new 'unknown' type mapping in the C# formatter.
      case 'unknown': return `[object]${optionalSuffix}`;

@Skn0tt Skn0tt merged commit 2abb3f2 into microsoft:main Feb 27, 2025
5 checks passed
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.

3 participants