The `mergeOverridenImplementation` processor tries to ensure that any
doc used with the `@overrideImplementation` annotation is not itself
public (and explicitly marks is as internal if it is).
Previously, it determined the public/private status of a doc by only
checking the value of the doc's `internal` property (which is mainly set
via the `@internal` annotation). This failed to account for docs marked
as "private exports" (such as those prefixed with `ɵ`), which are
essentially also treated as internal.
This would result in incorrect warnings. [Example warning][1]:
> Constructor doc forms/ɵFormControlCtor was not marked '@internal';
> adding this annotation.
This commit prevents the incorrect warning by also checking the value of
the doc's `privateExport` property to determine its public/private
status.
[1]: https://circleci.com/gh/angular/angular/1215057#step-104-164
PR Close#47201
Previously, error messages related to an overriden constructor doc would
stringify the doc as `[object Object]`, which is not helpful for
debugging the issue. For example:
> Constructor doc [object Object] was not marked '@internal'
This commit improves the error message by including the doc's ID
instead. For example, the above error message would become:
> Constructor doc forms/ɵFormControlCtor was not marked '@internal'
PR Close#47201
This implementation change was originally proposed as part of Typed Forms, and will have major consequences for that project as described in the design doc. Submitting it separately will greatly simplify the risk of landing Typed Forms. This change should have no visible impact on normal users of FormControl.
See the Typed Forms design doc here: https://docs.google.com/document/d/1cWuBE-oo5WLtwkLFxbNTiaVQGNk8ipgbekZcKBeyxxo.
PR Close#44316
PR Close#44806
This new processor, named `mergeOverriddenImplementation`, allows Dgeni to produce correct documentation for symbols with overridden exported constructors. For example, in the following example, the implementation documentation will be used, including the constructor signature:
```
export const Foo: FooCtor = FooImpl as FooCtor;
```
This is a major improvement over the current situation, in which no constructor signature is documented whatsoever.
PR Close#44689