mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51: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
8
types/FileUploader/FileUploader.svelte.d.ts
vendored
8
types/FileUploader/FileUploader.svelte.d.ts
vendored
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["div"];
|
||||
type $RestProps = SvelteHTMLElements["div"];
|
||||
|
||||
export interface FileUploaderProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Specify the file uploader status
|
||||
* @default "uploading"
|
||||
|
@ -79,7 +79,9 @@ export interface FileUploaderProps extends RestProps {
|
|||
name?: string;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type FileUploaderProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class FileUploader extends SvelteComponentTyped<
|
||||
FileUploaderProps,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["input"];
|
||||
type $RestProps = SvelteHTMLElements["input"];
|
||||
|
||||
export interface FileUploaderButtonProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Specify the accepted file types
|
||||
* @default []
|
||||
|
@ -83,7 +83,9 @@ export interface FileUploaderButtonProps extends RestProps {
|
|||
ref?: null | HTMLInputElement;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type FileUploaderButtonProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class FileUploaderButton extends SvelteComponentTyped<
|
||||
FileUploaderButtonProps,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["div"];
|
||||
type $RestProps = SvelteHTMLElements["div"];
|
||||
|
||||
export interface FileUploaderDropContainerProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Specify the accepted file types
|
||||
* @default []
|
||||
|
@ -72,7 +72,10 @@ export interface FileUploaderDropContainerProps extends RestProps {
|
|||
ref?: null | HTMLInputElement;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type FileUploaderDropContainerProps = Omit<$RestProps, keyof $Props> &
|
||||
$Props;
|
||||
|
||||
export default class FileUploaderDropContainer extends SvelteComponentTyped<
|
||||
FileUploaderDropContainerProps,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["span"];
|
||||
type $RestProps = SvelteHTMLElements["span"];
|
||||
|
||||
export interface FileUploaderItemProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Specify the file uploader status
|
||||
* @default "uploading"
|
||||
|
@ -53,7 +53,9 @@ export interface FileUploaderItemProps extends RestProps {
|
|||
name?: string;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type FileUploaderItemProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class FileUploaderItem extends SvelteComponentTyped<
|
||||
FileUploaderItemProps,
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["div"];
|
||||
type $RestProps = SvelteHTMLElements["div"];
|
||||
|
||||
export interface FileUploaderSkeletonProps extends RestProps {
|
||||
type $Props = {
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type FileUploaderSkeletonProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class FileUploaderSkeleton extends SvelteComponentTyped<
|
||||
FileUploaderSkeletonProps,
|
||||
|
|
8
types/FileUploader/Filename.svelte.d.ts
vendored
8
types/FileUploader/Filename.svelte.d.ts
vendored
|
@ -1,11 +1,11 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["div"] &
|
||||
type $RestProps = SvelteHTMLElements["div"] &
|
||||
SvelteHTMLElements["button"] &
|
||||
SvelteHTMLElements["svg"];
|
||||
|
||||
export interface FilenameProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Specify the file name status
|
||||
* @default "uploading"
|
||||
|
@ -25,7 +25,9 @@ export interface FilenameProps extends RestProps {
|
|||
invalid?: boolean;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type FilenameProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class Filename extends SvelteComponentTyped<
|
||||
FilenameProps,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue