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

The strip-type-only mode does not handle some export declare declarations #9373

Closed
magic-akari opened this issue Aug 3, 2024 · 1 comment · Fixed by #9374
Closed

The strip-type-only mode does not handle some export declare declarations #9373

magic-akari opened this issue Aug 3, 2024 · 1 comment · Fixed by #9374
Labels
Milestone

Comments

@magic-akari
Copy link
Member

Describe the bug

SWC Playground

Input code

export declare class Foo { }
export declare interface Bar { }
export declare type Baz = {}
export declare enum Qux { }
export declare const Quux = 0;
export declare function Corge(): void;

Config

{
  "jsc": {
    "parser": {
      "syntax": "typescript"
    }
  },
  "module": {
    "type": "es6"
  }
}

Playground link (or link to the minimal reproduction)

https://play.swc.rs/?version=1.7.4&code=H4sIAAAAAAAAA0utKMgvKlFISU3OSSxKVQCSxcUKbvn5CtUKtVypqJKZeSWpRWmJyakKTolF2BSUVBaA5KoUbBWqMSRT80pzFQJLK7BpTM7PKy4BSgJlbRUMrNGl00rzkksy8%2FMUnPOL0lM1NK0UyvIzU6wBPVGO%2BbwAAAA%3D&config=H4sIAAAAAAAAA6vmUlBQyipOVrJSqAYygZyCxKLi1CI4HyhSXJlXklgBFFEqqSxILU4uyiwoUQJL1gLJWh2QEbn5KaU5qQhTQCpBOlKLzUBKa7lqAef3oHhqAAAA&strip-types=

SWC Info output

No response

Expected behavior

All statements should be replaced with spaces.

Actual behavior

export                      
                                
                            
                           
export                        
export                                

Version

1.7.4

Additional context

No response

@swc-bot
Copy link
Collaborator

swc-bot commented Sep 3, 2024

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Sep 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

3 participants