feat(dx): Improve hinted string types (#5286)

This commit is contained in:
Fahad 2024-02-23 14:38:50 +06:00 committed by GitHub
parent 2011f702a3
commit 8f0d3188cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 60 additions and 58 deletions

View file

@ -10,7 +10,7 @@
import { HTMLAttributes, InputHTMLAttributes, TransitionProps, VNode } from 'vue';
import { ComponentHooks } from '../basecomponent';
import { PassThroughOptions } from '../passthrough';
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
import { ClassComponent, GlobalComponentConstructor, PassThrough, HintedString } from '../ts-helpers';
import { VirtualScrollerItemOptions, VirtualScrollerPassThroughOptionType, VirtualScrollerProps } from '../virtualscroller';
export declare type DropdownPassThroughOptionType<T = any> = DropdownPassThroughAttributes | ((options: DropdownPassThroughMethodOptions<T>) => DropdownPassThroughAttributes | string) | string | null | undefined;
@ -305,7 +305,7 @@ export interface DropdownProps {
* Defines the filtering algorithm to use when searching the options.
* @defaultValue contains
*/
filterMatchMode?: 'contains' | 'startsWith' | 'endsWith' | string | undefined;
filterMatchMode?: HintedString<'contains' | 'startsWith' | 'endsWith'> | undefined;
/**
* Fields used when filtering the options, defaults to optionLabel.
*/
@ -384,7 +384,7 @@ export interface DropdownProps {
* A valid query selector or an HTMLElement to specify where the overlay gets attached.
* @defaultValue body
*/
appendTo?: 'body' | 'self' | string | undefined | HTMLElement;
appendTo?: HintedString<'body' | 'self'> | undefined | HTMLElement;
/**
* Whether the dropdown is in loading state.
* @defaultValue false