Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isolated-declarations: Keep code comments #5928

Closed
long-woo opened this issue Sep 20, 2024 · 4 comments
Closed

isolated-declarations: Keep code comments #5928

long-woo opened this issue Sep 20, 2024 · 4 comments
Labels
C-bug Category - Bug

Comments

@long-woo
Copy link
Contributor

Declare the following code:

export interface Order {
  id?: number;
  petId?: number;
  quantity?: number;
  shipDate?: string;
  /**
   * Order Status
   */
  status?: OrderStatus;
  complete?: boolean; 
}

The result is:

export interface Order {
  id?: number;
  petId?: number;
  quantity?: number;
  shipDate?: string;
- /**
-  * Order Status
-  */
  status?: OrderStatus;
  complete?: boolean;
}

I want to keep the original comments in the declaration code obtained using oxc.isolatedDeclaration. Are there plans to add a removeComments option in IsolatedDeclarationsOptions similar to the tsconfig?

@long-woo long-woo added the C-bug Category - Bug label Sep 20, 2024
@Dunqing
Copy link
Member

Dunqing commented Sep 20, 2024

Thanks for you give it a try on oxc-isolated-declaration! We have supported print jsdoc comments lately in #5858 but haven't released a new version yet. We'll probably release it this week.

@Boshen
Copy link
Member

Boshen commented Sep 20, 2024

We finished the implementation, will release next week after we fix a few minor issues.

@long-woo
Copy link
Contributor Author

That's really cool 👍.

@Boshen
Copy link
Member

Boshen commented Sep 23, 2024

Released in https://www.npmjs.com/package/oxc-transform/v/0.30.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category - Bug
Projects
None yet
Development

No branches or pull requests

3 participants