Skip to content

[bug] compilerOptions stripInternal is not effective #347

@StrivingRabbit

Description

@StrivingRabbit

stripInternal is not effective

Modify a test case at will, such as `tests/testcases/call-signature/index.d.ts'.

export interface I {
  (arg: string): string;
  staticProp: string;
}
/**
 * @internal
 */
export declare const fn: {
  (arg: string): string;
  /**
   * @internal
   */
  staticProp: string;
};

add meta.js

// @ts-check
/** @type {import('../../testcases').Meta} */
export default {
  options: {
    stripInternal: true,
  },
  rollupOptions: {},
};

npm run test

testcases/call-signature...  failed

AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected

  'interface I {\n' +
    '  (arg: string): string;\n' +
    '  staticProp: string;\n' +
    '}\n' +
+   '/**\n' +
+   ' * @internal\n' +
+   ' */\n' +
+   'declare const fn: {\n' +
+   '  (arg: string): string;\n' +
+   '  /**\n' +
+   '   * @internal\n' +
+   '   */\n' +
-   'declare const fn: {\n' +
-   '  (arg: string): string;\n' +
    '  staticProp: string;\n' +
    '};\n' +
    'export { fn };\n' +
    'export type { I };\n'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions