Commit graph

4 commits

Author SHA1 Message Date
George Kalpakas
14f505abd4 fix(docs-infra): prevent unnecessary warning in mergeOverridenImplementation Dgeni processor (#47201)
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
2022-08-22 10:51:02 -07:00
George Kalpakas
35171a8681 build(docs-infra): improve error message in mergeOverridenImplementation Dgeni processor (#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
2022-08-22 10:51:02 -07:00
Dylan Hunn
f0cfa00a34 refactor(forms): Move FormControl to an overridden exported constructor. (#44316) (#44806)
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
2022-01-31 22:48:23 +00:00
Dylan Hunn
c2da290659 feat(docs-infra): Add a new processor for @overriddenImplementation. (#44689)
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
2022-01-13 12:02:22 -08:00