Skip to content

[api-extractor] just "don't export" @internal types instead of stripping them #1664

Open
@phryneas

Description

@phryneas

Is this a feature or a bug?

  • Feature
  • Bug

Please describe the actual behavior.

Currently, api-extractor strips all @internal types from a @public export.

What is the expected behavior?

I would like @internal types to still be present in the dts-rollup, but not exported - so other @public exported types can use them internally.

Reason: we have helper types that are exported because they are used throughout the project, but we don't want those to be exposed to our end users so we can change these in the future without being afraid of breaking things for library consumers. Having a ae-forgotten-export warning for those is fine, but currently the resulting types just reference types that aren't there - which makes them completely useless.

(And yes, those are in our entry point, because our entry point just does export * - after all, we monitor if we accidentally exported something we did not want to - thanks to api-extractor 😄. So we are just using @public and @internal to mark "what should be accessible for a library consumer". )

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as intendedhelp wantedIf you're looking to contribute, this issue is a good place to start!

    Type

    No type

    Projects

    Status

    AE/AD

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions