Open DanielRosenwasser opened 1 week ago
Not allowed to import an export internal.
We are talking here about whole codebase or just entry file?
I think good idea would be have option or just apply this to entry file.
Or is it mentioned at
At the tsconfig.json level, internal access might be granted and asserted in a few ways:
I am not sure i full understand this.
The
internal
Modifierhttps://github.com/microsoft/TypeScript/issues/5228
internal
modifier on-and-off since 2015./** @internal */
JSDoc comments to mark things as internal, and--stripInternal
.--stripInternal
was not even publicly documented..d.ts
bundling work with this.internal
allows you to know whether something is getting overridden in a subtype.Idea:
internal
stays in.d.ts
output.import
anexport internal
.At the
tsconfig.json
level, internal access might be granted and asserted in a few ways:Maybe an option for specific packages
Possibly just something on each reference
public
andinternal
in the same declaration).internal
?internal
member that'sexport *
'd?keyof
on a type withinternal
?private
does.keyof
means something different depending on where it's written..d.ts
bundlers that can do this post-processing?public
andprivate
overloads can't be mixed today.--stripInternal
is to not make things publicly known and avoid documenting functions to prevent usage.internal
is inaccessible depending on where it's used.private
andprotected
has this, but it's not witnessable in the majority of code (which is outside of the class).keyof
- is this now a location-sensitive operation?internal
?readonly
.package
-like modifier, but doesn't entirely solve the problem for our own usage for hiding entities in the resulting declaration file.