mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(types): use type alias instead of interface for $$restProps
This commit is contained in:
parent
57e99f3a4c
commit
6fbd8ae6a9
165 changed files with 752 additions and 463 deletions
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["ul"];
|
||||
type $RestProps = SvelteHTMLElements["ul"];
|
||||
|
||||
export interface ProgressIndicatorProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Specify the current step index
|
||||
* @default 0
|
||||
|
@ -29,7 +29,9 @@ export interface ProgressIndicatorProps extends RestProps {
|
|||
preventChangeOnClick?: boolean;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type ProgressIndicatorProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class ProgressIndicator extends SvelteComponentTyped<
|
||||
ProgressIndicatorProps,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["ul"];
|
||||
type $RestProps = SvelteHTMLElements["ul"];
|
||||
|
||||
export interface ProgressIndicatorSkeletonProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Set to `true` to use the vertical variant
|
||||
* @default false
|
||||
|
@ -17,7 +17,10 @@ export interface ProgressIndicatorSkeletonProps extends RestProps {
|
|||
count?: number;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type ProgressIndicatorSkeletonProps = Omit<$RestProps, keyof $Props> &
|
||||
$Props;
|
||||
|
||||
export default class ProgressIndicatorSkeleton extends SvelteComponentTyped<
|
||||
ProgressIndicatorSkeletonProps,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["li"];
|
||||
type $RestProps = SvelteHTMLElements["li"];
|
||||
|
||||
export interface ProgressStepProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Set to `true` for the complete variant
|
||||
* @default false
|
||||
|
@ -53,7 +53,9 @@ export interface ProgressStepProps extends RestProps {
|
|||
id?: string;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type ProgressStepProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class ProgressStep extends SvelteComponentTyped<
|
||||
ProgressStepProps,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue