Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor getSlotted dom utility method #3881

Closed
driskull opened this issue Jan 7, 2022 · 1 comment
Closed

Refactor getSlotted dom utility method #3881

driskull opened this issue Jan 7, 2022 · 1 comment
Assignees
Labels
1 - assigned Issues that are assigned to a sprint and a team member. needs triage Planning workflow - pending design/dev review. refactor Issues tied to code that needs to be significantly reworked.

Comments

@driskull
Copy link
Member

driskull commented Jan 7, 2022

Description

Update the getSlotted method signature to match below.

export function getSlotted<T extends Element = Element>(element: Element, options: GetSlottedOptions & { all: true }): T[];
export function getSlotted<T extends Element = Element>(element: Element, options?: GetSlottedOptions): T[];
export function getSlotted<T extends Element = Element>(element: Element, slotName: string | string[], options: GetSlottedOptions & { all: true }): T[];
export function getSlotted<T extends Element = Element>(element: Element, slotName: string | string[], options?: GetSlottedOptions): T[];
export function getSlotted<T extends Element = Element>(
  element: Element,
  slotNameOrOptions: string | string[] | GetSlottedOptions,
  optionsOrUndefined?: GetSlottedOptions): (T | null) | T[] { /* ... */ }

Proposed Advantages

Allows the slotName parameter to be optional.

Relevant Info

#3788 (comment)

Which Component

N/A

@driskull driskull added refactor Issues tied to code that needs to be significantly reworked. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Jan 7, 2022
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Mar 30, 2023
@geospatialem
Copy link
Member

Closing, will instead work on removal with #6059.

@geospatialem geospatialem closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - assigned Issues that are assigned to a sprint and a team member. needs triage Planning workflow - pending design/dev review. refactor Issues tied to code that needs to be significantly reworked.
Projects
None yet
Development

No branches or pull requests

4 participants