mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Test
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { AnimationBuilder, Mode } from '../../interface';
|
||||
import type { AnimationBuilder, LiteralUnion, Mode } from '../../interface';
|
||||
|
||||
export interface ActionSheetOptions {
|
||||
header?: string;
|
||||
@@ -19,7 +19,7 @@ export interface ActionSheetOptions {
|
||||
|
||||
export interface ActionSheetButton<T = any> {
|
||||
text?: string;
|
||||
role?: 'cancel' | 'destructive' | 'selected' | string;
|
||||
role?: LiteralUnion<'cancel' | 'destructive' | 'selected', string>;
|
||||
icon?: string;
|
||||
cssClass?: string | string[];
|
||||
id?: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AnimationBuilder, Mode, TextFieldTypes } from '../../interface';
|
||||
import type { AnimationBuilder, LiteralUnion, Mode, TextFieldTypes } from '../../interface';
|
||||
import type { IonicSafeString } from '../../utils/sanitization';
|
||||
|
||||
export interface AlertOptions {
|
||||
@@ -45,7 +45,7 @@ type AlertButtonOverlayHandler = boolean | void | { [key: string]: any };
|
||||
|
||||
export interface AlertButton {
|
||||
text: string;
|
||||
role?: 'cancel' | 'destructive' | string;
|
||||
role?: LiteralUnion<'cancel' | 'destructive', string>;
|
||||
cssClass?: string | string[];
|
||||
id?: string;
|
||||
htmlAttributes?: { [key: string]: any };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AnimationBuilder, Color, Mode } from '../../interface';
|
||||
import type { AnimationBuilder, Color, LiteralUnion, Mode } from '../../interface';
|
||||
import type { IonicSafeString } from '../../utils/sanitization';
|
||||
|
||||
export interface ToastOptions {
|
||||
@@ -33,8 +33,7 @@ export interface ToastButton {
|
||||
text?: string;
|
||||
icon?: string;
|
||||
side?: 'start' | 'end';
|
||||
role?: 'cancel' | string;
|
||||
|
||||
role?: LiteralUnion<'cancel', string>;
|
||||
/**
|
||||
* @deprecated Use the toast button's CSS Shadow Parts instead.
|
||||
*/
|
||||
|
||||
2
core/src/interface.d.ts
vendored
2
core/src/interface.d.ts
vendored
@@ -131,7 +131,7 @@ export type PredefinedColors =
|
||||
| 'medium'
|
||||
| 'dark';
|
||||
|
||||
type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);
|
||||
export type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);
|
||||
|
||||
export type Color = LiteralUnion<PredefinedColors, string>;
|
||||
export type Mode = 'ios' | 'md';
|
||||
|
||||
Reference in New Issue
Block a user