mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +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
8
types/OverflowMenu/OverflowMenu.svelte.d.ts
vendored
8
types/OverflowMenu/OverflowMenu.svelte.d.ts
vendored
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["button"];
|
||||
type $RestProps = SvelteHTMLElements["button"];
|
||||
|
||||
export interface OverflowMenuProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Specify the size of the overflow menu
|
||||
* @default undefined
|
||||
|
@ -78,7 +78,9 @@ export interface OverflowMenuProps extends RestProps {
|
|||
menuRef?: null | HTMLUListElement;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type OverflowMenuProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class OverflowMenu extends SvelteComponentTyped<
|
||||
OverflowMenuProps,
|
||||
|
|
|
@ -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 OverflowMenuItemProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Specify the item text.
|
||||
* Alternatively, use the default slot
|
||||
|
@ -60,7 +60,9 @@ export interface OverflowMenuItemProps extends RestProps {
|
|||
ref?: null | HTMLAnchorElement | HTMLButtonElement;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type OverflowMenuItemProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class OverflowMenuItem extends SvelteComponentTyped<
|
||||
OverflowMenuItemProps,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue