diff --git a/packages/nimble-components/src/list-option/index.ts b/packages/nimble-components/src/list-option/index.ts index 9911ea3950..551f250fe3 100644 --- a/packages/nimble-components/src/list-option/index.ts +++ b/packages/nimble-components/src/list-option/index.ts @@ -5,7 +5,7 @@ import { import { observable, attr } from '@microsoft/fast-element'; import { styles } from './styles'; import { template } from './template'; -import type { DropdownOwner } from '../patterns/dropdown/types'; +import type { ListOptionOwner } from '../patterns/dropdown/types'; declare global { interface HTMLElementTagNameMap { @@ -60,8 +60,8 @@ export class ListOption extends FoundationListboxOption { } } - private isDropdownOwner(parent: unknown): parent is DropdownOwner { - return typeof (parent as DropdownOwner).registerOption === 'function'; + private isDropdownOwner(parent: unknown): parent is ListOptionOwner { + return typeof (parent as ListOptionOwner).registerOption === 'function'; } } diff --git a/packages/nimble-components/src/patterns/dropdown/types.ts b/packages/nimble-components/src/patterns/dropdown/types.ts index 2523ae291e..6bdd8135ac 100644 --- a/packages/nimble-components/src/patterns/dropdown/types.ts +++ b/packages/nimble-components/src/patterns/dropdown/types.ts @@ -34,6 +34,6 @@ export type DropdownAppearance = * reactive form, where the form value is set to an option immediately after * dynamically adding it. */ -export interface DropdownOwner { +export interface ListOptionOwner { registerOption: (option: ListOption) => void; } diff --git a/packages/nimble-components/src/select/index.ts b/packages/nimble-components/src/select/index.ts index 060bde08d5..44830994e1 100644 --- a/packages/nimble-components/src/select/index.ts +++ b/packages/nimble-components/src/select/index.ts @@ -30,7 +30,7 @@ import { } from '@microsoft/fast-web-utilities'; import { arrowExpanderDown16X16 } from '@ni/nimble-tokens/dist/icons/js'; import { styles } from './styles'; -import { DropdownAppearance, DropdownOwner } from '../patterns/dropdown/types'; +import { DropdownAppearance, ListOptionOwner } from '../patterns/dropdown/types'; import { errorTextTemplate } from '../patterns/error/template'; import type { ErrorPattern } from '../patterns/error/types'; import { iconExclamationMarkTag } from '../icons/exclamation-mark'; @@ -59,7 +59,7 @@ const isNimbleListOption = (el: Element): el is ListOption => { */ export class Select extends FormAssociatedSelect - implements ErrorPattern, DropdownOwner { + implements ErrorPattern, ListOptionOwner { @attr public appearance: DropdownAppearance = DropdownAppearance.underline;