-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
fix(compiler-cli): avoid broken references in .d.ts files due to @internal markers #43527
Conversation
c816d10
to
c1f301f
Compare
any progress on this ? |
c1f301f
to
e41c9a8
Compare
@huineng This introduces a conflict when syncing into Google and we're currently pushing towards getting v13 finalized, so this got stalled. |
e41c9a8
to
882cb19
Compare
882cb19
to
9dfac0d
Compare
…ernal markers The `ErrorCode` enum in the `error_code.ts` file is governed by public api guards but the other top-level exports from that file are exempt from public api documentation and are therefore marked as `@internal`. However, TypeScript is configured with the `stripInternal` compiler option such that declarations with `@internal` markers are not emitted into the `.d.ts` files, but this means that the reexports in the barrel file end up referring to missing declarations. The `stripInternal` option is considered internal and its documentation states to use at your own risk (as per microsoft/TypeScript#45307). Having the option enabled is desirable for us as it works well for hiding class fields that are marked `@internal`, which is an effective way to hide members from the .d.ts file. As a workaround for the issue with top-level symbols, the declarations with `@internal` markers are moved to dedicated files for which no public api guard is setup, therefore allowing their `@internal` markers to be dropped. Fixes angular#43097
…arate file Prior refactorings caused unexpected g3 sync issues due to a patch that changes the error documentation URL. This commit moves the base url into a separate file to make this more apparent.
…nto separate file
9dfac0d
to
3d82d56
Compare
Note to the Caretaker: syncing this PR would require extra steps. Please reach out to @AndrewKushnir to get more info. |
This PR was merged into the repository by commit 28a40f3. |
…ernal markers (#43527) The `ErrorCode` enum in the `error_code.ts` file is governed by public api guards but the other top-level exports from that file are exempt from public api documentation and are therefore marked as `@internal`. However, TypeScript is configured with the `stripInternal` compiler option such that declarations with `@internal` markers are not emitted into the `.d.ts` files, but this means that the reexports in the barrel file end up referring to missing declarations. The `stripInternal` option is considered internal and its documentation states to use at your own risk (as per microsoft/TypeScript#45307). Having the option enabled is desirable for us as it works well for hiding class fields that are marked `@internal`, which is an effective way to hide members from the .d.ts file. As a workaround for the issue with top-level symbols, the declarations with `@internal` markers are moved to dedicated files for which no public api guard is setup, therefore allowing their `@internal` markers to be dropped. Fixes #43097 PR Close #43527
…ernal markers (#43527) The `ErrorCode` enum in the `error_code.ts` file is governed by public api guards but the other top-level exports from that file are exempt from public api documentation and are therefore marked as `@internal`. However, TypeScript is configured with the `stripInternal` compiler option such that declarations with `@internal` markers are not emitted into the `.d.ts` files, but this means that the reexports in the barrel file end up referring to missing declarations. The `stripInternal` option is considered internal and its documentation states to use at your own risk (as per microsoft/TypeScript#45307). Having the option enabled is desirable for us as it works well for hiding class fields that are marked `@internal`, which is an effective way to hide members from the .d.ts file. As a workaround for the issue with top-level symbols, the declarations with `@internal` markers are moved to dedicated files for which no public api guard is setup, therefore allowing their `@internal` markers to be dropped. Fixes #43097 PR Close #43527
…into separate file (angular#43527)" This reverts commit 28a40f3.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…ernal markers (angular#43527) The `ErrorCode` enum in the `error_code.ts` file is governed by public api guards but the other top-level exports from that file are exempt from public api documentation and are therefore marked as `@internal`. However, TypeScript is configured with the `stripInternal` compiler option such that declarations with `@internal` markers are not emitted into the `.d.ts` files, but this means that the reexports in the barrel file end up referring to missing declarations. The `stripInternal` option is considered internal and its documentation states to use at your own risk (as per microsoft/TypeScript#45307). Having the option enabled is desirable for us as it works well for hiding class fields that are marked `@internal`, which is an effective way to hide members from the .d.ts file. As a workaround for the issue with top-level symbols, the declarations with `@internal` markers are moved to dedicated files for which no public api guard is setup, therefore allowing their `@internal` markers to be dropped. Fixes angular#43097 PR Close angular#43527
…arate file (angular#43527) Prior refactorings caused unexpected g3 sync issues due to a patch that changes the error documentation URL. This commit moves the base url into a separate file to make this more apparent. PR Close angular#43527
The
ErrorCode
enum in theerror_code.ts
file is governed by publicapi guards but the other top-level exports from that file are exempt
from public api documentation and are therefore marked as
@internal
.However, TypeScript is configured with the
stripInternal
compileroption such that declarations with
@internal
markers are not emittedinto the
.d.ts
files, but this means that the reexports in the barrelfile end up referring to missing declarations.
The
stripInternal
option is considered internal and its documentationstates to use at your own risk (as per microsoft/TypeScript#45307).
Having the option enabled is desirable for us as it works well for
hiding class fields that are marked
@internal
, which is an effectiveway to hide members from the .d.ts file. As a workaround for the issue
with top-level symbols, the declarations with
@internal
markers aremoved to dedicated files for which no public api guard is setup,
therefore allowing their
@internal
markers to be dropped.Fixes #43097