Skip to content

Commit bcebb25

Browse files
devversionandrewseguin
authored andcommitted
refactor: use explicit specifier for form field control harness re-export
Instead of using a star export, we should use an explicit specifier for the `@angular/material/form-field/testing/control` re-export. This satisfies Microsoft's API extractor which will complain as it cannot resolve the entry-point. Within an API golden test, first-party packages/entry-points are always considered external and therefore not resolvable.
1 parent f8c8ec5 commit bcebb25

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

src/material-experimental/mdc-form-field/testing/public-api.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
// Re-export everything from the "form-field/testing/control" entry-point. To avoid
10-
// circular dependencies, harnesses for default form-field controls (i.e. input, select)
9+
// Re-export the base control harness from the "form-field/testing/control" entry-point. To
10+
// avoid circular dependencies, harnesses for form-field controls (i.e. input, select)
1111
// need to import the base form-field control harness through a separate entry-point.
12-
export * from '@angular/material/form-field/testing/control';
12+
export {MatFormFieldControlHarness} from '@angular/material/form-field/testing/control';
1313

1414
export {FormFieldHarnessFilters} from '@angular/material/form-field/testing';
1515
export * from './form-field-harness';

src/material/form-field/testing/public-api.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
// Re-export everything from the "form-field/testing/control" entry-point. To avoid
10-
// circular dependencies, harnesses for default form-field controls (i.e. input, select)
9+
// Re-export the base control harness from the "form-field/testing/control" entry-point. To
10+
// avoid circular dependencies, harnesses for form-field controls (i.e. input, select)
1111
// need to import the base form-field control harness through a separate entry-point.
12-
export * from '@angular/material/form-field/testing/control';
12+
export {MatFormFieldControlHarness} from '@angular/material/form-field/testing/control';
1313

1414
export * from './form-field-harness';
1515
export * from './form-field-harness-filters';

tools/public_api_guard/material/form-field-testing.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export interface FormFieldHarnessFilters extends BaseHarnessFilters {
2525
hasErrors?: boolean;
2626
}
2727

28+
export { MatFormFieldControlHarness }
29+
2830
// @public
2931
export class MatFormFieldHarness extends _MatFormFieldHarnessBase<FormFieldControlHarness> {
3032
// (undocumented)
@@ -94,9 +96,6 @@ export abstract class _MatFormFieldHarnessBase<ControlHarness extends MatFormFie
9496
protected abstract _suffixContainer: AsyncFactoryFn<TestElement | null>;
9597
}
9698

97-
98-
export * from "@angular/material/form-field/testing/control";
99-
10099
// (No @packageDocumentation comment for this package)
101100

102101
```

0 commit comments

Comments
 (0)