mirror of
https://github.com/storybookjs/storybook.git
synced 2026-09-28 09:53:01 +08:00
Angular: Stop reading alias collisions as two-way bindings
Compodoc reports a `model()` under the same bare name in both its input
and output lists, so the parser treated a name in both lists as two-way:
it dropped the output and synthesized `${name}Change`.
An `@Input('shared')` declared next to an `@Output('shared')` collides the
same way with no `model()` involved, so a real output was being deleted
and a phantom one invented. Requiring the declaration line to match too
separates the cases, since a `model()` is one property on one line.
The rule is lifted into a named function and the quirk is written up,
rather than resting on a comment that claimed the name alone was
sufficient. A collision now costs the aliased input its row instead of
its output, which the README records as a known limitation.
This commit is contained in:
@@ -7,7 +7,7 @@ import { Component, model } from '@angular/core';
|
||||
* A component exercising Angular's `model()` two-way binding signal.
|
||||
*
|
||||
* compodoc emits a `model()` member as an identical entry in BOTH `inputsClass` and
|
||||
* `outputsClass` (see `.omc/plans/probe-fixtures/compodoc-model-probe-documentation.json`).
|
||||
* `outputsClass`; the committed `compodoc-input.json` next to this file is that capture.
|
||||
*/
|
||||
@Component({ selector: 'cp', template: '' })
|
||||
export class ColorPickerComponent {
|
||||
|
||||
Reference in New Issue
Block a user