diff --git a/README.md b/README.md index 1d9e2233..65d85564 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface ButtonProps extends RestProps { +type $Props = { /** * @default "button" */ @@ -53,7 +53,11 @@ export interface ButtonProps extends RestProps { * @default false */ primary?: boolean; -} + + [key: `data-${string}`]: any; +}; + +export type ButtonProps = Omit & $Props; export default class Button extends SvelteComponentTyped< ButtonProps, @@ -83,7 +87,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface ButtonProps extends RestProps { +type $Props = { /** * @default "button" */ @@ -94,7 +98,9 @@ export interface ButtonProps extends RestProps { * @default false */ primary?: boolean; -} +}; + +export type ButtonProps = Omit & $Props; export default class Button extends SvelteComponentTyped< ButtonProps, diff --git a/src/writer/writer-ts-definitions.ts b/src/writer/writer-ts-definitions.ts index 33d37508..2f657e34 100644 --- a/src/writer/writer-ts-definitions.ts +++ b/src/writer/writer-ts-definitions.ts @@ -90,19 +90,17 @@ function genPropDef(def: Pick & $Props${genericsName}; `; } else { prop_def = ` - export interface ${props_name}${genericsName} ${ - def.extends !== undefined ? `extends ${def.extends.interface}` : "" - } { + export type ${props_name}${genericsName} = ${def.extends !== undefined ? `${def.extends.interface} & ` : ""} { ${props} } `; diff --git a/tests/__snapshots__/fixtures.test.ts.snap b/tests/__snapshots__/fixtures.test.ts.snap index ccc951a5..326b50cb 100644 --- a/tests/__snapshots__/fixtures.test.ts.snap +++ b/tests/__snapshots__/fixtures.test.ts.snap @@ -483,6 +483,69 @@ exports[`fixtures (JSON) "typedefs/input.svelte" 1`] = ` }" `; +exports[`fixtures (JSON) "generics-with-rest-props/input.svelte" 1`] = ` +"{ + "props": [ + { + "name": "headers", + "kind": "let", + "type": "ReadonlyArray>", + "value": "[]", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "rows", + "kind": "let", + "type": "ReadonlyArray", + "value": "[]", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + } + ], + "moduleExports": [], + "slots": [ + { + "name": "__default__", + "default": true, + "slot_props": "{ headers: ReadonlyArray>, rows: ReadonlyArray }" + } + ], + "events": [], + "typedefs": [ + { + "type": "{ id: string | number; [key: string]: any; }", + "name": "DataTableRow", + "ts": "interface DataTableRow { id: string | number; [key: string]: any; }" + }, + { + "type": "Exclude", + "name": "DataTableKey", + "ts": "type DataTableKey = Exclude" + }, + { + "type": "{ key: DataTableKey; value: string; }", + "name": "DataTableHeader", + "ts": "interface DataTableHeader { key: DataTableKey; value: string; }" + } + ], + "generics": [ + "Row", + "Row extends DataTableRow = DataTableRow" + ], + "rest_props": { + "type": "Element", + "name": "div" + } +}" +`; + exports[`fixtures (JSON) "bind-this/input.svelte" 1`] = ` "{ "props": [ @@ -897,21 +960,10 @@ exports[`fixtures (JSON) "rest-props-multiple/input.svelte" 1`] = ` "{ "props": [ { - "name": "edit", + "name": "type", "kind": "let", - "type": "boolean", - "value": "false", - "isFunction": false, - "isFunctionDeclaration": false, - "isRequired": false, - "constant": false, - "reactive": false - }, - { - "name": "heading", - "kind": "let", - "type": "boolean", - "value": "false", + "type": " \"ordered\" | \"unordered\" ", + "value": "\"ordered\"", "isFunction": false, "isFunctionDeclaration": false, "isRequired": false, @@ -926,11 +978,22 @@ exports[`fixtures (JSON) "rest-props-multiple/input.svelte" 1`] = ` "generics": null, "rest_props": { "type": "Element", - "name": "h1 | span" + "name": "ul | ol" } }" `; +exports[`fixtures (JSON) "no-props/input.svelte" 1`] = ` +"{ + "props": [], + "moduleExports": [], + "slots": [], + "events": [], + "typedefs": [], + "generics": null +}" +`; + exports[`fixtures (JSON) "component-comment-single/input.svelte" 1`] = ` "{ "props": [], @@ -1265,9 +1328,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["svg"]; -export interface SvgPropsProps extends RestProps { +type $Props = { [key: \`data-${string}\`]: any; -} +}; + +export type SvgPropsProps = Omit & $Props; export default class SvgProps extends SvelteComponentTyped, {}> {} " @@ -1276,12 +1341,12 @@ export default class SvgProps extends SvelteComponentTyped { value: Header; } -export interface GenericsMultipleProps { +export type GenericsMultipleProps = { /** * @default [] */ @@ -1316,7 +1381,7 @@ export interface GenericsMultipleProps { * @default [] */ rows?: ReadonlyArray; -} +}; export default class GenericsMultiple< Row extends DataTableRow = DataTableRow, @@ -1332,7 +1397,7 @@ export default class GenericsMultiple< exports[`fixtures (TypeScript) "dispatched-events-dynamic/input.svelte" 1`] = ` "import type { SvelteComponentTyped } from "svelte"; -export interface DispatchedEventsDynamicProps {} +export type DispatchedEventsDynamicProps = {}; export default class DispatchedEventsDynamic extends SvelteComponentTyped< DispatchedEventsDynamicProps, @@ -1345,12 +1410,12 @@ export default class DispatchedEventsDynamic extends SvelteComponentTyped< exports[`fixtures (TypeScript) "function-declaration/input.svelte" 1`] = ` "import type { SvelteComponentTyped } from "svelte"; -export interface FunctionDeclarationProps { +export type FunctionDeclarationProps = { /** * @default () => {} */ fnA?: () => {}; -} +}; export default class FunctionDeclaration extends SvelteComponentTyped< FunctionDeclarationProps, @@ -1372,7 +1437,7 @@ export default class FunctionDeclaration extends SvelteComponentTyped< exports[`fixtures (TypeScript) "forwarded-events/input.svelte" 1`] = ` "import type { SvelteComponentTyped } from "svelte"; -export interface ForwardedEventsProps {} +export type ForwardedEventsProps = {}; export default class ForwardedEvents extends SvelteComponentTyped< ForwardedEventsProps, @@ -1390,7 +1455,7 @@ export default class ForwardedEvents extends SvelteComponentTyped< exports[`fixtures (TypeScript) "mixed-events/input.svelte" 1`] = ` "import type { SvelteComponentTyped } from "svelte"; -export interface MixedEventsProps {} +export type MixedEventsProps = {}; export default class MixedEvents extends SvelteComponentTyped< MixedEventsProps, @@ -1403,7 +1468,7 @@ export default class MixedEvents extends SvelteComponentTyped< exports[`fixtures (TypeScript) "infer-basic/input.svelte" 1`] = ` "import type { SvelteComponentTyped } from "svelte"; -export interface InferBasicProps { +export type InferBasicProps = { /** * @default null */ @@ -1428,7 +1493,7 @@ export interface InferBasicProps { * @default "" + Math.random().toString(36) */ id?: string; -} +}; export default class InferBasic extends SvelteComponentTyped, { default: {} }> { propConst: { ["1"]: true }; @@ -1441,7 +1506,7 @@ export default class InferBasic extends SvelteComponentTyped, {}> {} " @@ -1450,12 +1515,12 @@ export default class EmptyExport extends SvelteComponentTyped = Exclude; + +export interface DataTableHeader { + key: DataTableKey; + value: string; +} + +type RestProps = SvelteHTMLElements["div"]; + +type $Props = { + /** + * @default [] + */ + headers?: ReadonlyArray>; + + /** + * @default [] + */ + rows?: ReadonlyArray; + + [key: \`data-${string}\`]: any; +}; + +export type GenericsWithRestPropsProps = Omit> & $Props; + +export default class GenericsWithRestProps extends SvelteComponentTyped< + GenericsWithRestPropsProps, + Record, + { default: { headers: ReadonlyArray>; rows: ReadonlyArray } } +> {} +" +`; + exports[`fixtures (TypeScript) "bind-this/input.svelte" 1`] = ` "import type { SvelteComponentTyped } from "svelte"; -export interface BindThisProps { +export type BindThisProps = { /** * @default undefined */ ref: null | HTMLButtonElement; -} +}; export default class BindThis extends SvelteComponentTyped, { default: {} }> {} " @@ -1533,7 +1640,7 @@ export default class BindThis extends SvelteComponentTyped, {}> {} " @@ -1646,7 +1753,7 @@ export default class RenamedProps extends SvelteComponentTyped {}; export declare function b3(): () => false; -export interface ContextModuleProps {} +export type ContextModuleProps = {}; export default class ContextModule extends SvelteComponentTyped, {}> { a: string; @@ -1715,30 +1822,36 @@ exports[`fixtures (TypeScript) "rest-props-multiple/input.svelte" 1`] = ` "import type { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; -type RestProps = SvelteHTMLElements["h1"] & SvelteHTMLElements["span"]; - -export interface RestPropsMultipleProps extends RestProps { - /** - * @default false - */ - edit?: boolean; +type RestProps = SvelteHTMLElements["ul"] & SvelteHTMLElements["ol"]; +type $Props = { /** - * @default false + * @default "ordered" */ - heading?: boolean; + type?: "ordered" | "unordered"; [key: \`data-${string}\`]: any; -} +}; + +export type RestPropsMultipleProps = Omit & $Props; export default class RestPropsMultiple extends SvelteComponentTyped, {}> {} " `; +exports[`fixtures (TypeScript) "no-props/input.svelte" 1`] = ` +"import type { SvelteComponentTyped } from "svelte"; + +export type NoPropsProps = {}; + +export default class NoProps extends SvelteComponentTyped, {}> {} +" +`; + exports[`fixtures (TypeScript) "component-comment-single/input.svelte" 1`] = ` "import type { SvelteComponentTyped } from "svelte"; -export interface ComponentCommentSingleProps {} +export type ComponentCommentSingleProps = {}; /** Component comment */ export default class ComponentCommentSingle extends SvelteComponentTyped< @@ -1752,7 +1865,7 @@ export default class ComponentCommentSingle extends SvelteComponentTyped< exports[`fixtures (TypeScript) "bind-this-multiple/input.svelte" 1`] = ` "import type { SvelteComponentTyped } from "svelte"; -export interface BindThisMultipleProps { +export type BindThisMultipleProps = { /** * @default undefined */ @@ -1767,7 +1880,7 @@ export interface BindThisMultipleProps { * @default false */ propBool?: boolean; -} +}; export default class BindThisMultiple extends SvelteComponentTyped< BindThisMultipleProps, @@ -1784,7 +1897,7 @@ export interface MyTypedef { [key: string]: boolean; } -export interface TypedefProps { +export type TypedefProps = { /** * @default "id-" + Math.random().toString(36) */ @@ -1794,7 +1907,7 @@ export interface TypedefProps { * @default { ["1"]: true } */ prop1?: MyTypedef; -} +}; export default class Typedef extends SvelteComponentTyped< TypedefProps, @@ -1810,9 +1923,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["h1"]; -export interface RestPropsSimpleProps extends RestProps { +type $Props = { [key: \`data-${string}\`]: any; -} +}; + +export type RestPropsSimpleProps = Omit & $Props; export default class RestPropsSimple extends SvelteComponentTyped, {}> {} " @@ -1824,9 +1939,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface AnchorPropsProps extends RestProps { +type $Props = { [key: \`data-${string}\`]: any; -} +}; + +export type AnchorPropsProps = Omit & $Props; export default class AnchorProps extends SvelteComponentTyped, { default: {} }> {} " @@ -1835,7 +1952,7 @@ export default class AnchorProps extends SvelteComponentTyped, {}> {} " @@ -1925,7 +2042,7 @@ export interface DataTableHeader { value: string; } -export interface GenericsProps { +export type GenericsProps = { /** * @default [] */ @@ -1935,7 +2052,7 @@ export interface GenericsProps { * @default [] */ rows?: ReadonlyArray; -} +}; export default class Generics extends SvelteComponentTyped< GenericsProps, diff --git a/tests/__snapshots__/writer-ts-definitions.test.ts.snap b/tests/__snapshots__/writer-ts-definitions.test.ts.snap index 478fb9bd..73b02288 100644 --- a/tests/__snapshots__/writer-ts-definitions.test.ts.snap +++ b/tests/__snapshots__/writer-ts-definitions.test.ts.snap @@ -7,7 +7,7 @@ exports[`writerTsDefinition writeTsDefinition 1`] = ` - export interface ModuleNameProps { + export type ModuleNameProps = { /** * @default true @@ -55,7 +55,7 @@ exports[`writerTsDefinition "default" module name 1`] = ` - export interface defaultProps { + export type defaultProps = { } diff --git a/tests/e2e/carbon/types/Accordion/Accordion.svelte.d.ts b/tests/e2e/carbon/types/Accordion/Accordion.svelte.d.ts index fc6c3d6a..e53bae1c 100644 --- a/tests/e2e/carbon/types/Accordion/Accordion.svelte.d.ts +++ b/tests/e2e/carbon/types/Accordion/Accordion.svelte.d.ts @@ -1,7 +1,7 @@ import type { SvelteComponentTyped } from "svelte"; import type { AccordionSkeletonProps } from "./AccordionSkeleton.svelte"; -export interface AccordionProps extends AccordionSkeletonProps { +export type AccordionProps = AccordionSkeletonProps & { /** * Specify alignment of accordion item chevron icon * @default "end" @@ -25,7 +25,7 @@ export interface AccordionProps extends AccordionSkeletonProps { * @default false */ skeleton?: boolean; -} +}; /** * @example diff --git a/tests/e2e/carbon/types/Accordion/AccordionItem.svelte.d.ts b/tests/e2e/carbon/types/Accordion/AccordionItem.svelte.d.ts index d310cb7d..ac31c0ad 100644 --- a/tests/e2e/carbon/types/Accordion/AccordionItem.svelte.d.ts +++ b/tests/e2e/carbon/types/Accordion/AccordionItem.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["li"]; -export interface AccordionItemProps extends RestProps { +type $Props = { /** * Specify the title of the accordion item heading * Alternatively, use the "title" slot (e.g.,
...
) @@ -30,7 +30,9 @@ export interface AccordionItemProps extends RestProps { iconDescription?: string; [key: `data-${string}`]: any; -} +}; + +export type AccordionItemProps = Omit & $Props; /** `AccordionItem` is slottable */ export default class AccordionItem extends SvelteComponentTyped< diff --git a/tests/e2e/carbon/types/Accordion/AccordionSkeleton.svelte.d.ts b/tests/e2e/carbon/types/Accordion/AccordionSkeleton.svelte.d.ts index d28fe6f0..b1cccbf2 100644 --- a/tests/e2e/carbon/types/Accordion/AccordionSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/Accordion/AccordionSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["ul"]; -export interface AccordionSkeletonProps extends RestProps { +type $Props = { /** * Specify the number of accordion items to render * @default 4 @@ -29,7 +29,9 @@ export interface AccordionSkeletonProps extends RestProps { open?: boolean; [key: `data-${string}`]: any; -} +}; + +export type AccordionSkeletonProps = Omit & $Props; export default class AccordionSkeleton extends SvelteComponentTyped< AccordionSkeletonProps, diff --git a/tests/e2e/carbon/types/AspectRatio/AspectRatio.svelte.d.ts b/tests/e2e/carbon/types/AspectRatio/AspectRatio.svelte.d.ts index b99dc925..f498778c 100644 --- a/tests/e2e/carbon/types/AspectRatio/AspectRatio.svelte.d.ts +++ b/tests/e2e/carbon/types/AspectRatio/AspectRatio.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface AspectRatioProps extends RestProps { +type $Props = { /** * Specify the aspect ratio * @default "2x1" @@ -11,7 +11,9 @@ export interface AspectRatioProps extends RestProps { ratio?: "2x1" | "16x9" | "4x3" | "1x1" | "3x4" | "9x16" | "1x2"; [key: `data-${string}`]: any; -} +}; + +export type AspectRatioProps = Omit & $Props; export default class AspectRatio extends SvelteComponentTyped< AspectRatioProps, diff --git a/tests/e2e/carbon/types/Breadcrumb/Breadcrumb.svelte.d.ts b/tests/e2e/carbon/types/Breadcrumb/Breadcrumb.svelte.d.ts index 6b005545..55d24edb 100644 --- a/tests/e2e/carbon/types/Breadcrumb/Breadcrumb.svelte.d.ts +++ b/tests/e2e/carbon/types/Breadcrumb/Breadcrumb.svelte.d.ts @@ -1,7 +1,7 @@ import type { SvelteComponentTyped } from "svelte"; import type { BreadcrumbSkeletonProps } from "./BreadcrumbSkeleton.svelte"; -export interface BreadcrumbProps extends BreadcrumbSkeletonProps { +export type BreadcrumbProps = BreadcrumbSkeletonProps & { /** * Set to `true` to hide the breadcrumb trailing slash * @default false @@ -13,7 +13,7 @@ export interface BreadcrumbProps extends BreadcrumbSkeletonProps { * @default false */ skeleton?: boolean; -} +}; export default class Breadcrumb extends SvelteComponentTyped< BreadcrumbProps, diff --git a/tests/e2e/carbon/types/Breadcrumb/BreadcrumbItem.svelte.d.ts b/tests/e2e/carbon/types/Breadcrumb/BreadcrumbItem.svelte.d.ts index bdf2aee8..1d71cf73 100644 --- a/tests/e2e/carbon/types/Breadcrumb/BreadcrumbItem.svelte.d.ts +++ b/tests/e2e/carbon/types/Breadcrumb/BreadcrumbItem.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["li"]; -export interface BreadcrumbItemProps extends RestProps { +type $Props = { /** * Set the `href` to use an anchor link * @default undefined @@ -17,7 +17,9 @@ export interface BreadcrumbItemProps extends RestProps { isCurrentPage?: boolean; [key: `data-${string}`]: any; -} +}; + +export type BreadcrumbItemProps = Omit & $Props; export default class BreadcrumbItem extends SvelteComponentTyped< BreadcrumbItemProps, diff --git a/tests/e2e/carbon/types/Breadcrumb/BreadcrumbSkeleton.svelte.d.ts b/tests/e2e/carbon/types/Breadcrumb/BreadcrumbSkeleton.svelte.d.ts index 85bddbe5..10c8056e 100644 --- a/tests/e2e/carbon/types/Breadcrumb/BreadcrumbSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/Breadcrumb/BreadcrumbSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface BreadcrumbSkeletonProps extends RestProps { +type $Props = { /** * Set to `true` to hide the breadcrumb trailing slash * @default false @@ -17,7 +17,9 @@ export interface BreadcrumbSkeletonProps extends RestProps { count?: number; [key: `data-${string}`]: any; -} +}; + +export type BreadcrumbSkeletonProps = Omit & $Props; export default class BreadcrumbSkeleton extends SvelteComponentTyped< BreadcrumbSkeletonProps, diff --git a/tests/e2e/carbon/types/Button/Button.svelte.d.ts b/tests/e2e/carbon/types/Button/Button.svelte.d.ts index fffcb978..022dc92b 100644 --- a/tests/e2e/carbon/types/Button/Button.svelte.d.ts +++ b/tests/e2e/carbon/types/Button/Button.svelte.d.ts @@ -7,7 +7,7 @@ type RestProps = SvelteHTMLElements["button"] & SvelteHTMLElements["a"] & SvelteHTMLElements["div"]; -export interface ButtonProps extends ButtonSkeletonProps, RestProps { +type $Props = { /** * Specify the kind of button * @default "primary" @@ -103,7 +103,9 @@ export interface ButtonProps extends ButtonSkeletonProps, RestProps { ref?: null | HTMLAnchorElement | HTMLButtonElement; [key: `data-${string}`]: any; -} +}; + +export type ButtonProps = Omit & $Props; export default class Button extends SvelteComponentTyped< ButtonProps, diff --git a/tests/e2e/carbon/types/Button/ButtonSet.svelte.d.ts b/tests/e2e/carbon/types/Button/ButtonSet.svelte.d.ts index 8acba64e..d3398e3e 100644 --- a/tests/e2e/carbon/types/Button/ButtonSet.svelte.d.ts +++ b/tests/e2e/carbon/types/Button/ButtonSet.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ButtonSetProps extends RestProps { +type $Props = { /** * Set to `true` to stack the buttons vertically * @default false @@ -11,7 +11,9 @@ export interface ButtonSetProps extends RestProps { stacked?: boolean; [key: `data-${string}`]: any; -} +}; + +export type ButtonSetProps = Omit & $Props; export default class ButtonSet extends SvelteComponentTyped< ButtonSetProps, diff --git a/tests/e2e/carbon/types/Button/ButtonSkeleton.svelte.d.ts b/tests/e2e/carbon/types/Button/ButtonSkeleton.svelte.d.ts index 239b46eb..6673c4f4 100644 --- a/tests/e2e/carbon/types/Button/ButtonSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/Button/ButtonSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface ButtonSkeletonProps extends RestProps { +type $Props = { /** * Set the `href` to use an anchor link * @default undefined @@ -24,7 +24,9 @@ export interface ButtonSkeletonProps extends RestProps { small?: boolean; [key: `data-${string}`]: any; -} +}; + +export type ButtonSkeletonProps = Omit & $Props; export default class ButtonSkeleton extends SvelteComponentTyped< ButtonSkeletonProps, diff --git a/tests/e2e/carbon/types/Checkbox/Checkbox.svelte.d.ts b/tests/e2e/carbon/types/Checkbox/Checkbox.svelte.d.ts index b8e73d62..d1aac010 100644 --- a/tests/e2e/carbon/types/Checkbox/Checkbox.svelte.d.ts +++ b/tests/e2e/carbon/types/Checkbox/Checkbox.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface CheckboxProps { +export type CheckboxProps = { /** * Specify whether the checkbox is checked * @default false @@ -66,7 +66,7 @@ export interface CheckboxProps { * @default null */ ref?: null | HTMLInputElement; -} +}; export default class Checkbox extends SvelteComponentTyped< CheckboxProps, diff --git a/tests/e2e/carbon/types/Checkbox/CheckboxSkeleton.svelte.d.ts b/tests/e2e/carbon/types/Checkbox/CheckboxSkeleton.svelte.d.ts index bb6f526c..9d3934c5 100644 --- a/tests/e2e/carbon/types/Checkbox/CheckboxSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/Checkbox/CheckboxSkeleton.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface CheckboxSkeletonProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type CheckboxSkeletonProps = Omit & $Props; export default class CheckboxSkeleton extends SvelteComponentTyped< CheckboxSkeletonProps, diff --git a/tests/e2e/carbon/types/CodeSnippet/CodeSnippet.svelte.d.ts b/tests/e2e/carbon/types/CodeSnippet/CodeSnippet.svelte.d.ts index 1f711909..a8c8e6e1 100644 --- a/tests/e2e/carbon/types/CodeSnippet/CodeSnippet.svelte.d.ts +++ b/tests/e2e/carbon/types/CodeSnippet/CodeSnippet.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface CodeSnippetProps { +export type CodeSnippetProps = { /** * Set the type of code snippet * @default "single" @@ -107,7 +107,7 @@ export interface CodeSnippetProps { * @default null */ ref?: null | HTMLPreElement; -} +}; export default class CodeSnippet extends SvelteComponentTyped< CodeSnippetProps, diff --git a/tests/e2e/carbon/types/CodeSnippet/CodeSnippetSkeleton.svelte.d.ts b/tests/e2e/carbon/types/CodeSnippet/CodeSnippetSkeleton.svelte.d.ts index ce474105..87b797ca 100644 --- a/tests/e2e/carbon/types/CodeSnippet/CodeSnippetSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/CodeSnippet/CodeSnippetSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface CodeSnippetSkeletonProps extends RestProps { +type $Props = { /** * Set the type of code snippet * @default "single" @@ -11,7 +11,9 @@ export interface CodeSnippetSkeletonProps extends RestProps { type?: "single" | "multi"; [key: `data-${string}`]: any; -} +}; + +export type CodeSnippetSkeletonProps = Omit & $Props; export default class CodeSnippetSkeleton extends SvelteComponentTyped< CodeSnippetSkeletonProps, diff --git a/tests/e2e/carbon/types/ComboBox/ComboBox.svelte.d.ts b/tests/e2e/carbon/types/ComboBox/ComboBox.svelte.d.ts index 271009b4..8e44342a 100644 --- a/tests/e2e/carbon/types/ComboBox/ComboBox.svelte.d.ts +++ b/tests/e2e/carbon/types/ComboBox/ComboBox.svelte.d.ts @@ -8,7 +8,7 @@ export interface ComboBoxItem { type RestProps = SvelteHTMLElements["div"]; -export interface ComboBoxProps extends RestProps { +type $Props = { /** * Set the combobox items * @default [] @@ -124,7 +124,9 @@ export interface ComboBoxProps extends RestProps { listRef?: null | HTMLDivElement; [key: `data-${string}`]: any; -} +}; + +export type ComboBoxProps = Omit & $Props; export default class ComboBox extends SvelteComponentTyped< ComboBoxProps, diff --git a/tests/e2e/carbon/types/ComposedModal/ComposedModal.svelte.d.ts b/tests/e2e/carbon/types/ComposedModal/ComposedModal.svelte.d.ts index 24a9f3ce..96c3e6bd 100644 --- a/tests/e2e/carbon/types/ComposedModal/ComposedModal.svelte.d.ts +++ b/tests/e2e/carbon/types/ComposedModal/ComposedModal.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ComposedModalProps extends RestProps { +type $Props = { /** * Set the size of the composed modal * @default undefined @@ -47,7 +47,9 @@ export interface ComposedModalProps extends RestProps { ref?: null | HTMLDivElement; [key: `data-${string}`]: any; -} +}; + +export type ComposedModalProps = Omit & $Props; export default class ComposedModal extends SvelteComponentTyped< ComposedModalProps, diff --git a/tests/e2e/carbon/types/ComposedModal/ModalBody.svelte.d.ts b/tests/e2e/carbon/types/ComposedModal/ModalBody.svelte.d.ts index d541b65f..43df8645 100644 --- a/tests/e2e/carbon/types/ComposedModal/ModalBody.svelte.d.ts +++ b/tests/e2e/carbon/types/ComposedModal/ModalBody.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ModalBodyProps extends RestProps { +type $Props = { /** * Set to `true` if the modal contains form elements * @default false @@ -17,7 +17,9 @@ export interface ModalBodyProps extends RestProps { hasScrollingContent?: boolean; [key: `data-${string}`]: any; -} +}; + +export type ModalBodyProps = Omit & $Props; export default class ModalBody extends SvelteComponentTyped< ModalBodyProps, diff --git a/tests/e2e/carbon/types/ComposedModal/ModalFooter.svelte.d.ts b/tests/e2e/carbon/types/ComposedModal/ModalFooter.svelte.d.ts index 0d1b2819..9c303cd7 100644 --- a/tests/e2e/carbon/types/ComposedModal/ModalFooter.svelte.d.ts +++ b/tests/e2e/carbon/types/ComposedModal/ModalFooter.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ModalFooterProps extends RestProps { +type $Props = { /** * Specify the primary button text * @default "" @@ -41,7 +41,9 @@ export interface ModalFooterProps extends RestProps { danger?: boolean; [key: `data-${string}`]: any; -} +}; + +export type ModalFooterProps = Omit & $Props; export default class ModalFooter extends SvelteComponentTyped< ModalFooterProps, diff --git a/tests/e2e/carbon/types/ComposedModal/ModalHeader.svelte.d.ts b/tests/e2e/carbon/types/ComposedModal/ModalHeader.svelte.d.ts index 2769e76b..8c560b35 100644 --- a/tests/e2e/carbon/types/ComposedModal/ModalHeader.svelte.d.ts +++ b/tests/e2e/carbon/types/ComposedModal/ModalHeader.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ModalHeaderProps extends RestProps { +type $Props = { /** * Specify the modal title * @default "" @@ -47,7 +47,9 @@ export interface ModalHeaderProps extends RestProps { iconDescription?: string; [key: `data-${string}`]: any; -} +}; + +export type ModalHeaderProps = Omit & $Props; export default class ModalHeader extends SvelteComponentTyped< ModalHeaderProps, diff --git a/tests/e2e/carbon/types/ContentSwitcher/ContentSwitcher.svelte.d.ts b/tests/e2e/carbon/types/ContentSwitcher/ContentSwitcher.svelte.d.ts index 77c939c4..4a9da2cd 100644 --- a/tests/e2e/carbon/types/ContentSwitcher/ContentSwitcher.svelte.d.ts +++ b/tests/e2e/carbon/types/ContentSwitcher/ContentSwitcher.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ContentSwitcherProps extends RestProps { +type $Props = { /** * Set the selected index of the switch item * @default 0 @@ -23,7 +23,9 @@ export interface ContentSwitcherProps extends RestProps { size?: "sm" | "xl"; [key: `data-${string}`]: any; -} +}; + +export type ContentSwitcherProps = Omit & $Props; export default class ContentSwitcher extends SvelteComponentTyped< ContentSwitcherProps, diff --git a/tests/e2e/carbon/types/ContentSwitcher/Switch.svelte.d.ts b/tests/e2e/carbon/types/ContentSwitcher/Switch.svelte.d.ts index 734efa93..b056bf7b 100644 --- a/tests/e2e/carbon/types/ContentSwitcher/Switch.svelte.d.ts +++ b/tests/e2e/carbon/types/ContentSwitcher/Switch.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface SwitchProps extends RestProps { +type $Props = { /** * Specify the switch text * Alternatively, use the "text" slot (e.g., ...) @@ -36,7 +36,9 @@ export interface SwitchProps extends RestProps { ref?: null | HTMLButtonElement; [key: `data-${string}`]: any; -} +}; + +export type SwitchProps = Omit & $Props; export default class Switch extends SvelteComponentTyped< SwitchProps, diff --git a/tests/e2e/carbon/types/Copy/Copy.svelte.d.ts b/tests/e2e/carbon/types/Copy/Copy.svelte.d.ts index 820166da..4b0e6516 100644 --- a/tests/e2e/carbon/types/Copy/Copy.svelte.d.ts +++ b/tests/e2e/carbon/types/Copy/Copy.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface CopyProps extends RestProps { +type $Props = { /** * Set the feedback text shown after clicking the button * @default "Copied!" @@ -23,7 +23,9 @@ export interface CopyProps extends RestProps { ref?: null | HTMLButtonElement; [key: `data-${string}`]: any; -} +}; + +export type CopyProps = Omit & $Props; export default class Copy extends SvelteComponentTyped< CopyProps, diff --git a/tests/e2e/carbon/types/CopyButton/CopyButton.svelte.d.ts b/tests/e2e/carbon/types/CopyButton/CopyButton.svelte.d.ts index a634c6ba..e12f0e1e 100644 --- a/tests/e2e/carbon/types/CopyButton/CopyButton.svelte.d.ts +++ b/tests/e2e/carbon/types/CopyButton/CopyButton.svelte.d.ts @@ -1,13 +1,13 @@ import type { SvelteComponentTyped } from "svelte"; import type { CopyProps } from "../Copy/Copy.svelte"; -export interface CopyButtonProps extends CopyProps { +export type CopyButtonProps = CopyProps & { /** * Set the title and ARIA label for the copy button * @default "Copy to clipboard" */ iconDescription?: string; -} +}; export default class CopyButton extends SvelteComponentTyped< CopyButtonProps, diff --git a/tests/e2e/carbon/types/DataTable/DataTable.svelte.d.ts b/tests/e2e/carbon/types/DataTable/DataTable.svelte.d.ts index fd874bc6..0caae644 100644 --- a/tests/e2e/carbon/types/DataTable/DataTable.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/DataTable.svelte.d.ts @@ -44,7 +44,7 @@ export interface DataTableCell { type RestProps = SvelteHTMLElements["div"]; -export interface DataTableProps extends RestProps { +type $Props = { /** * Specify the data table headers * @default [] @@ -181,7 +181,10 @@ export interface DataTableProps extends RestProps { page?: number; [key: `data-${string}`]: any; -} +}; + +export type DataTableProps = Omit> & + $Props; export default class DataTable< Row extends DataTableRow = DataTableRow diff --git a/tests/e2e/carbon/types/DataTable/DataTableSkeleton.svelte.d.ts b/tests/e2e/carbon/types/DataTable/DataTableSkeleton.svelte.d.ts index 9d58c8dc..ea06d4de 100644 --- a/tests/e2e/carbon/types/DataTable/DataTableSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/DataTableSkeleton.svelte.d.ts @@ -5,7 +5,7 @@ import type { DataTableHeader } from "../DataTable/DataTable.svelte"; type RestProps = SvelteHTMLElements["div"]; -export interface DataTableSkeletonProps extends DataTableHeader, RestProps { +type $Props = { /** * Specify the number of columns * Superseded by `headers` if `headers` is a non-empty array @@ -51,7 +51,9 @@ export interface DataTableSkeletonProps extends DataTableHeader, RestProps { showToolbar?: boolean; [key: `data-${string}`]: any; -} +}; + +export type DataTableSkeletonProps = Omit & $Props; export default class DataTableSkeleton extends SvelteComponentTyped< DataTableSkeletonProps, diff --git a/tests/e2e/carbon/types/DataTable/Table.svelte.d.ts b/tests/e2e/carbon/types/DataTable/Table.svelte.d.ts index 6c5298ae..d88ed6d3 100644 --- a/tests/e2e/carbon/types/DataTable/Table.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/Table.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["section"]; -export interface TableProps extends RestProps { +type $Props = { /** * Set the size of the table * @default undefined @@ -41,7 +41,9 @@ export interface TableProps extends RestProps { stickyHeader?: boolean; [key: `data-${string}`]: any; -} +}; + +export type TableProps = Omit & $Props; export default class Table extends SvelteComponentTyped< TableProps, diff --git a/tests/e2e/carbon/types/DataTable/TableBody.svelte.d.ts b/tests/e2e/carbon/types/DataTable/TableBody.svelte.d.ts index 9e2b749e..32e68045 100644 --- a/tests/e2e/carbon/types/DataTable/TableBody.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/TableBody.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["tbody"]; -export interface TableBodyProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type TableBodyProps = Omit & $Props; export default class TableBody extends SvelteComponentTyped< TableBodyProps, diff --git a/tests/e2e/carbon/types/DataTable/TableCell.svelte.d.ts b/tests/e2e/carbon/types/DataTable/TableCell.svelte.d.ts index b08e57fd..c39d4b77 100644 --- a/tests/e2e/carbon/types/DataTable/TableCell.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/TableCell.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["td"]; -export interface TableCellProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type TableCellProps = Omit & $Props; export default class TableCell extends SvelteComponentTyped< TableCellProps, diff --git a/tests/e2e/carbon/types/DataTable/TableContainer.svelte.d.ts b/tests/e2e/carbon/types/DataTable/TableContainer.svelte.d.ts index f6a158a0..9979515f 100644 --- a/tests/e2e/carbon/types/DataTable/TableContainer.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/TableContainer.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface TableContainerProps extends RestProps { +type $Props = { /** * Specify the title of the data table * @default "" @@ -23,7 +23,9 @@ export interface TableContainerProps extends RestProps { stickyHeader?: boolean; [key: `data-${string}`]: any; -} +}; + +export type TableContainerProps = Omit & $Props; export default class TableContainer extends SvelteComponentTyped< TableContainerProps, diff --git a/tests/e2e/carbon/types/DataTable/TableHead.svelte.d.ts b/tests/e2e/carbon/types/DataTable/TableHead.svelte.d.ts index 0ef1f57e..f91620b3 100644 --- a/tests/e2e/carbon/types/DataTable/TableHead.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/TableHead.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["thead"]; -export interface TableHeadProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type TableHeadProps = Omit & $Props; export default class TableHead extends SvelteComponentTyped< TableHeadProps, diff --git a/tests/e2e/carbon/types/DataTable/TableHeader.svelte.d.ts b/tests/e2e/carbon/types/DataTable/TableHeader.svelte.d.ts index 5482319a..490d8283 100644 --- a/tests/e2e/carbon/types/DataTable/TableHeader.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/TableHeader.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["th"]; -export interface TableHeaderProps extends RestProps { +type $Props = { /** * Specify the `scope` attribute * @default "col" @@ -23,7 +23,9 @@ export interface TableHeaderProps extends RestProps { id?: string; [key: `data-${string}`]: any; -} +}; + +export type TableHeaderProps = Omit & $Props; export default class TableHeader extends SvelteComponentTyped< TableHeaderProps, diff --git a/tests/e2e/carbon/types/DataTable/TableRow.svelte.d.ts b/tests/e2e/carbon/types/DataTable/TableRow.svelte.d.ts index 6a651be3..548853e0 100644 --- a/tests/e2e/carbon/types/DataTable/TableRow.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/TableRow.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["tr"]; -export interface TableRowProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type TableRowProps = Omit & $Props; export default class TableRow extends SvelteComponentTyped< TableRowProps, diff --git a/tests/e2e/carbon/types/DataTable/Toolbar.svelte.d.ts b/tests/e2e/carbon/types/DataTable/Toolbar.svelte.d.ts index c7facb75..691c9fcc 100644 --- a/tests/e2e/carbon/types/DataTable/Toolbar.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/Toolbar.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["section"]; -export interface ToolbarProps extends RestProps { +type $Props = { /** * Specify the toolbar size * @default "default" @@ -11,7 +11,9 @@ export interface ToolbarProps extends RestProps { size?: "sm" | "default"; [key: `data-${string}`]: any; -} +}; + +export type ToolbarProps = Omit & $Props; export default class Toolbar extends SvelteComponentTyped< ToolbarProps, diff --git a/tests/e2e/carbon/types/DataTable/ToolbarBatchActions.svelte.d.ts b/tests/e2e/carbon/types/DataTable/ToolbarBatchActions.svelte.d.ts index 115c14a1..1252274e 100644 --- a/tests/e2e/carbon/types/DataTable/ToolbarBatchActions.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/ToolbarBatchActions.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ToolbarBatchActionsProps extends RestProps { +type $Props = { /** * Override the total items selected text * @default (totalSelected) => `${totalSelected} item${totalSelected === 1 ? "" : "s"} selected` @@ -11,7 +11,9 @@ export interface ToolbarBatchActionsProps extends RestProps { formatTotalSelected?: (totalSelected: number) => string; [key: `data-${string}`]: any; -} +}; + +export type ToolbarBatchActionsProps = Omit & $Props; export default class ToolbarBatchActions extends SvelteComponentTyped< ToolbarBatchActionsProps, diff --git a/tests/e2e/carbon/types/DataTable/ToolbarContent.svelte.d.ts b/tests/e2e/carbon/types/DataTable/ToolbarContent.svelte.d.ts index 8596c593..de27dc36 100644 --- a/tests/e2e/carbon/types/DataTable/ToolbarContent.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/ToolbarContent.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface ToolbarContentProps {} +export type ToolbarContentProps = {}; export default class ToolbarContent extends SvelteComponentTyped< ToolbarContentProps, diff --git a/tests/e2e/carbon/types/DataTable/ToolbarMenu.svelte.d.ts b/tests/e2e/carbon/types/DataTable/ToolbarMenu.svelte.d.ts index e21d0710..564df6fb 100644 --- a/tests/e2e/carbon/types/DataTable/ToolbarMenu.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/ToolbarMenu.svelte.d.ts @@ -1,7 +1,7 @@ import type { SvelteComponentTyped } from "svelte"; import type { OverflowMenuProps } from "../OverflowMenu/OverflowMenu.svelte"; -export interface ToolbarMenuProps extends OverflowMenuProps {} +export type ToolbarMenuProps = OverflowMenuProps & {}; export default class ToolbarMenu extends SvelteComponentTyped< ToolbarMenuProps, diff --git a/tests/e2e/carbon/types/DataTable/ToolbarMenuItem.svelte.d.ts b/tests/e2e/carbon/types/DataTable/ToolbarMenuItem.svelte.d.ts index 02ed51b3..cf55221d 100644 --- a/tests/e2e/carbon/types/DataTable/ToolbarMenuItem.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/ToolbarMenuItem.svelte.d.ts @@ -1,7 +1,7 @@ import type { SvelteComponentTyped } from "svelte"; import type { OverflowMenuItemProps } from "../OverflowMenu/OverflowMenuItem.svelte"; -export interface ToolbarMenuItemProps extends OverflowMenuItemProps {} +export type ToolbarMenuItemProps = OverflowMenuItemProps & {}; export default class ToolbarMenuItem extends SvelteComponentTyped< ToolbarMenuItemProps, diff --git a/tests/e2e/carbon/types/DataTable/ToolbarSearch.svelte.d.ts b/tests/e2e/carbon/types/DataTable/ToolbarSearch.svelte.d.ts index b842d5a4..94e99327 100644 --- a/tests/e2e/carbon/types/DataTable/ToolbarSearch.svelte.d.ts +++ b/tests/e2e/carbon/types/DataTable/ToolbarSearch.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface ToolbarSearchProps { +export type ToolbarSearchProps = { /** * Specify the value of the search input * @default "" @@ -30,7 +30,7 @@ export interface ToolbarSearchProps { * @default null */ ref?: null | HTMLInputElement; -} +}; export default class ToolbarSearch extends SvelteComponentTyped< ToolbarSearchProps, diff --git a/tests/e2e/carbon/types/DatePicker/DatePicker.svelte.d.ts b/tests/e2e/carbon/types/DatePicker/DatePicker.svelte.d.ts index f4b5932a..36cbe02e 100644 --- a/tests/e2e/carbon/types/DatePicker/DatePicker.svelte.d.ts +++ b/tests/e2e/carbon/types/DatePicker/DatePicker.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface DatePickerProps extends RestProps { +type $Props = { /** * Specify the date picker type * @default "simple" @@ -65,7 +65,9 @@ export interface DatePickerProps extends RestProps { id?: string; [key: `data-${string}`]: any; -} +}; + +export type DatePickerProps = Omit & $Props; export default class DatePicker extends SvelteComponentTyped< DatePickerProps, diff --git a/tests/e2e/carbon/types/DatePicker/DatePickerInput.svelte.d.ts b/tests/e2e/carbon/types/DatePicker/DatePickerInput.svelte.d.ts index 64b9869d..0fc14960 100644 --- a/tests/e2e/carbon/types/DatePicker/DatePickerInput.svelte.d.ts +++ b/tests/e2e/carbon/types/DatePicker/DatePickerInput.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface DatePickerInputProps extends RestProps { +type $Props = { /** * Set the size of the input * @default undefined @@ -83,7 +83,9 @@ export interface DatePickerInputProps extends RestProps { ref?: null | HTMLInputElement; [key: `data-${string}`]: any; -} +}; + +export type DatePickerInputProps = Omit & $Props; export default class DatePickerInput extends SvelteComponentTyped< DatePickerInputProps, diff --git a/tests/e2e/carbon/types/DatePicker/DatePickerSkeleton.svelte.d.ts b/tests/e2e/carbon/types/DatePicker/DatePickerSkeleton.svelte.d.ts index 8f65c5c2..214ad712 100644 --- a/tests/e2e/carbon/types/DatePicker/DatePickerSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/DatePicker/DatePickerSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface DatePickerSkeletonProps extends RestProps { +type $Props = { /** * Set to `true` to use the range variant * @default false @@ -17,7 +17,9 @@ export interface DatePickerSkeletonProps extends RestProps { id?: string; [key: `data-${string}`]: any; -} +}; + +export type DatePickerSkeletonProps = Omit & $Props; export default class DatePickerSkeleton extends SvelteComponentTyped< DatePickerSkeletonProps, diff --git a/tests/e2e/carbon/types/Dropdown/Dropdown.svelte.d.ts b/tests/e2e/carbon/types/Dropdown/Dropdown.svelte.d.ts index f1ee9af2..f697a35d 100644 --- a/tests/e2e/carbon/types/Dropdown/Dropdown.svelte.d.ts +++ b/tests/e2e/carbon/types/Dropdown/Dropdown.svelte.d.ts @@ -12,7 +12,7 @@ export interface DropdownItem { type RestProps = SvelteHTMLElements["div"]; -export interface DropdownProps extends RestProps { +type $Props = { /** * Set the dropdown items * @default [] @@ -135,7 +135,9 @@ export interface DropdownProps extends RestProps { ref?: null | HTMLButtonElement; [key: `data-${string}`]: any; -} +}; + +export type DropdownProps = Omit & $Props; export default class Dropdown extends SvelteComponentTyped< DropdownProps, diff --git a/tests/e2e/carbon/types/Dropdown/DropdownSkeleton.svelte.d.ts b/tests/e2e/carbon/types/Dropdown/DropdownSkeleton.svelte.d.ts index 4699af9e..00f2dfe1 100644 --- a/tests/e2e/carbon/types/Dropdown/DropdownSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/Dropdown/DropdownSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface DropdownSkeletonProps extends RestProps { +type $Props = { /** * Set to `true` to use the inline variant * @default false @@ -11,7 +11,9 @@ export interface DropdownSkeletonProps extends RestProps { inline?: boolean; [key: `data-${string}`]: any; -} +}; + +export type DropdownSkeletonProps = Omit & $Props; export default class DropdownSkeleton extends SvelteComponentTyped< DropdownSkeletonProps, diff --git a/tests/e2e/carbon/types/FileUploader/FileUploader.svelte.d.ts b/tests/e2e/carbon/types/FileUploader/FileUploader.svelte.d.ts index f4843180..019baf94 100644 --- a/tests/e2e/carbon/types/FileUploader/FileUploader.svelte.d.ts +++ b/tests/e2e/carbon/types/FileUploader/FileUploader.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface FileUploaderProps extends RestProps { +type $Props = { /** * Specify the file uploader status * @default "uploading" @@ -65,7 +65,9 @@ export interface FileUploaderProps extends RestProps { name?: string; [key: `data-${string}`]: any; -} +}; + +export type FileUploaderProps = Omit & $Props; export default class FileUploader extends SvelteComponentTyped< FileUploaderProps, diff --git a/tests/e2e/carbon/types/FileUploader/FileUploaderButton.svelte.d.ts b/tests/e2e/carbon/types/FileUploader/FileUploaderButton.svelte.d.ts index 1e301683..0a3dfde2 100644 --- a/tests/e2e/carbon/types/FileUploader/FileUploaderButton.svelte.d.ts +++ b/tests/e2e/carbon/types/FileUploader/FileUploaderButton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["input"]; -export interface FileUploaderButtonProps extends RestProps { +type $Props = { /** * Specify the accepted file types * @default [] @@ -71,7 +71,9 @@ export interface FileUploaderButtonProps extends RestProps { ref?: null | HTMLInputElement; [key: `data-${string}`]: any; -} +}; + +export type FileUploaderButtonProps = Omit & $Props; export default class FileUploaderButton extends SvelteComponentTyped< FileUploaderButtonProps, diff --git a/tests/e2e/carbon/types/FileUploader/FileUploaderDropContainer.svelte.d.ts b/tests/e2e/carbon/types/FileUploader/FileUploaderDropContainer.svelte.d.ts index b8fda5f7..ae31345d 100644 --- a/tests/e2e/carbon/types/FileUploader/FileUploaderDropContainer.svelte.d.ts +++ b/tests/e2e/carbon/types/FileUploader/FileUploaderDropContainer.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface FileUploaderDropContainerProps extends RestProps { +type $Props = { /** * Specify the accepted file types * @default [] @@ -66,7 +66,10 @@ export interface FileUploaderDropContainerProps extends RestProps { ref?: null | HTMLInputElement; [key: `data-${string}`]: any; -} +}; + +export type FileUploaderDropContainerProps = Omit & + $Props; export default class FileUploaderDropContainer extends SvelteComponentTyped< FileUploaderDropContainerProps, diff --git a/tests/e2e/carbon/types/FileUploader/FileUploaderItem.svelte.d.ts b/tests/e2e/carbon/types/FileUploader/FileUploaderItem.svelte.d.ts index d7e2d640..c127f648 100644 --- a/tests/e2e/carbon/types/FileUploader/FileUploaderItem.svelte.d.ts +++ b/tests/e2e/carbon/types/FileUploader/FileUploaderItem.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["span"]; -export interface FileUploaderItemProps extends RestProps { +type $Props = { /** * Specify the file uploader status * @default "uploading" @@ -47,7 +47,9 @@ export interface FileUploaderItemProps extends RestProps { name?: string; [key: `data-${string}`]: any; -} +}; + +export type FileUploaderItemProps = Omit & $Props; export default class FileUploaderItem extends SvelteComponentTyped< FileUploaderItemProps, diff --git a/tests/e2e/carbon/types/FileUploader/FileUploaderSkeleton.svelte.d.ts b/tests/e2e/carbon/types/FileUploader/FileUploaderSkeleton.svelte.d.ts index 0cb303be..91f76f4b 100644 --- a/tests/e2e/carbon/types/FileUploader/FileUploaderSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/FileUploader/FileUploaderSkeleton.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface FileUploaderSkeletonProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type FileUploaderSkeletonProps = Omit & $Props; export default class FileUploaderSkeleton extends SvelteComponentTyped< FileUploaderSkeletonProps, diff --git a/tests/e2e/carbon/types/FileUploader/Filename.svelte.d.ts b/tests/e2e/carbon/types/FileUploader/Filename.svelte.d.ts index 6bcd26dc..0eea6e72 100644 --- a/tests/e2e/carbon/types/FileUploader/Filename.svelte.d.ts +++ b/tests/e2e/carbon/types/FileUploader/Filename.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface FilenameProps { +export type FilenameProps = { /** * Specify the file name status * @default "uploading" @@ -18,7 +18,7 @@ export interface FilenameProps { * @default false */ invalid?: boolean; -} +}; export default class Filename extends SvelteComponentTyped< FilenameProps, diff --git a/tests/e2e/carbon/types/FluidForm/FluidForm.svelte.d.ts b/tests/e2e/carbon/types/FluidForm/FluidForm.svelte.d.ts index 303a377b..2bd9f4c4 100644 --- a/tests/e2e/carbon/types/FluidForm/FluidForm.svelte.d.ts +++ b/tests/e2e/carbon/types/FluidForm/FluidForm.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface FluidFormProps {} +export type FluidFormProps = {}; export default class FluidForm extends SvelteComponentTyped< FluidFormProps, diff --git a/tests/e2e/carbon/types/Form/Form.svelte.d.ts b/tests/e2e/carbon/types/Form/Form.svelte.d.ts index 34360461..fcff1578 100644 --- a/tests/e2e/carbon/types/Form/Form.svelte.d.ts +++ b/tests/e2e/carbon/types/Form/Form.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["form"]; -export interface FormProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type FormProps = Omit & $Props; export default class Form extends SvelteComponentTyped< FormProps, diff --git a/tests/e2e/carbon/types/FormGroup/FormGroup.svelte.d.ts b/tests/e2e/carbon/types/FormGroup/FormGroup.svelte.d.ts index be26da99..17808d0b 100644 --- a/tests/e2e/carbon/types/FormGroup/FormGroup.svelte.d.ts +++ b/tests/e2e/carbon/types/FormGroup/FormGroup.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["fieldset"]; -export interface FormGroupProps extends RestProps { +type $Props = { /** * Set to `true` to indicate an invalid state * @default false @@ -29,7 +29,9 @@ export interface FormGroupProps extends RestProps { legendText?: string; [key: `data-${string}`]: any; -} +}; + +export type FormGroupProps = Omit & $Props; export default class FormGroup extends SvelteComponentTyped< FormGroupProps, diff --git a/tests/e2e/carbon/types/FormItem/FormItem.svelte.d.ts b/tests/e2e/carbon/types/FormItem/FormItem.svelte.d.ts index 8132f264..5acd9ecb 100644 --- a/tests/e2e/carbon/types/FormItem/FormItem.svelte.d.ts +++ b/tests/e2e/carbon/types/FormItem/FormItem.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface FormItemProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type FormItemProps = Omit & $Props; export default class FormItem extends SvelteComponentTyped< FormItemProps, diff --git a/tests/e2e/carbon/types/FormLabel/FormLabel.svelte.d.ts b/tests/e2e/carbon/types/FormLabel/FormLabel.svelte.d.ts index 4b88fa54..af4faf1a 100644 --- a/tests/e2e/carbon/types/FormLabel/FormLabel.svelte.d.ts +++ b/tests/e2e/carbon/types/FormLabel/FormLabel.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["label"]; -export interface FormLabelProps extends RestProps { +type $Props = { /** * Set an id to be used by the label element * @default "ccs-" + Math.random().toString(36) @@ -11,7 +11,9 @@ export interface FormLabelProps extends RestProps { id?: string; [key: `data-${string}`]: any; -} +}; + +export type FormLabelProps = Omit & $Props; export default class FormLabel extends SvelteComponentTyped< FormLabelProps, diff --git a/tests/e2e/carbon/types/Grid/Column.svelte.d.ts b/tests/e2e/carbon/types/Grid/Column.svelte.d.ts index faee5ec9..78f25f3f 100644 --- a/tests/e2e/carbon/types/Grid/Column.svelte.d.ts +++ b/tests/e2e/carbon/types/Grid/Column.svelte.d.ts @@ -12,7 +12,7 @@ export type ColumnBreakpoint = ColumnSize | ColumnSizeDescriptor; type RestProps = SvelteHTMLElements["div"]; -export interface ColumnProps extends RestProps { +type $Props = { /** * Set to `true` to render a custom HTML element * Props are destructured as `props` in the default slot (e.g.,
...
) @@ -81,7 +81,9 @@ export interface ColumnProps extends RestProps { max?: ColumnBreakpoint; [key: `data-${string}`]: any; -} +}; + +export type ColumnProps = Omit & $Props; export default class Column extends SvelteComponentTyped< ColumnProps, diff --git a/tests/e2e/carbon/types/Grid/Grid.svelte.d.ts b/tests/e2e/carbon/types/Grid/Grid.svelte.d.ts index 26faf7b4..a2a1c8fb 100644 --- a/tests/e2e/carbon/types/Grid/Grid.svelte.d.ts +++ b/tests/e2e/carbon/types/Grid/Grid.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface GridProps extends RestProps { +type $Props = { /** * Set to `true` to render a custom HTML element * Props are destructured as `props` in the default slot (e.g.,
...
) @@ -54,7 +54,9 @@ export interface GridProps extends RestProps { padding?: boolean; [key: `data-${string}`]: any; -} +}; + +export type GridProps = Omit & $Props; export default class Grid extends SvelteComponentTyped< GridProps, diff --git a/tests/e2e/carbon/types/Grid/Row.svelte.d.ts b/tests/e2e/carbon/types/Grid/Row.svelte.d.ts index dba292e7..7c480ca1 100644 --- a/tests/e2e/carbon/types/Grid/Row.svelte.d.ts +++ b/tests/e2e/carbon/types/Grid/Row.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface RowProps extends RestProps { +type $Props = { /** * Set to `true` to render a custom HTML element * Props are destructured as `props` in the default slot (e.g.,
...
) @@ -48,7 +48,9 @@ export interface RowProps extends RestProps { padding?: boolean; [key: `data-${string}`]: any; -} +}; + +export type RowProps = Omit & $Props; export default class Row extends SvelteComponentTyped< RowProps, diff --git a/tests/e2e/carbon/types/Icon/Icon.svelte.d.ts b/tests/e2e/carbon/types/Icon/Icon.svelte.d.ts index e0be10e9..8df09e5b 100644 --- a/tests/e2e/carbon/types/Icon/Icon.svelte.d.ts +++ b/tests/e2e/carbon/types/Icon/Icon.svelte.d.ts @@ -5,7 +5,7 @@ import type { IconSkeletonProps } from "./IconSkeleton.svelte"; type RestProps = SvelteHTMLElements["svg"]; -export interface IconProps extends IconSkeletonProps, RestProps { +type $Props = { /** * Specify the icon from `carbon-icons-svelte` to render * @default undefined @@ -19,7 +19,9 @@ export interface IconProps extends IconSkeletonProps, RestProps { skeleton?: boolean; [key: `data-${string}`]: any; -} +}; + +export type IconProps = Omit & $Props; export default class Icon extends SvelteComponentTyped< IconProps, diff --git a/tests/e2e/carbon/types/Icon/IconSkeleton.svelte.d.ts b/tests/e2e/carbon/types/Icon/IconSkeleton.svelte.d.ts index 7bb432ad..fc0ccc43 100644 --- a/tests/e2e/carbon/types/Icon/IconSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/Icon/IconSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface IconSkeletonProps extends RestProps { +type $Props = { /** * Set the size of the icon * @default 16 @@ -11,7 +11,9 @@ export interface IconSkeletonProps extends RestProps { size?: number; [key: `data-${string}`]: any; -} +}; + +export type IconSkeletonProps = Omit & $Props; export default class IconSkeleton extends SvelteComponentTyped< IconSkeletonProps, diff --git a/tests/e2e/carbon/types/InlineLoading/InlineLoading.svelte.d.ts b/tests/e2e/carbon/types/InlineLoading/InlineLoading.svelte.d.ts index d137980b..c53d2f0a 100644 --- a/tests/e2e/carbon/types/InlineLoading/InlineLoading.svelte.d.ts +++ b/tests/e2e/carbon/types/InlineLoading/InlineLoading.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface InlineLoadingProps extends RestProps { +type $Props = { /** * Set the loading status * @default "active" @@ -29,7 +29,9 @@ export interface InlineLoadingProps extends RestProps { successDelay?: number; [key: `data-${string}`]: any; -} +}; + +export type InlineLoadingProps = Omit & $Props; export default class InlineLoading extends SvelteComponentTyped< InlineLoadingProps, diff --git a/tests/e2e/carbon/types/Link/Link.svelte.d.ts b/tests/e2e/carbon/types/Link/Link.svelte.d.ts index a874a343..b4fa30b1 100644 --- a/tests/e2e/carbon/types/Link/Link.svelte.d.ts +++ b/tests/e2e/carbon/types/Link/Link.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"] & SvelteHTMLElements["p"]; -export interface LinkProps extends RestProps { +type $Props = { /** * Specify the size of the link * @default undefined @@ -41,7 +41,9 @@ export interface LinkProps extends RestProps { ref?: null | HTMLAnchorElement | HTMLParagraphElement; [key: `data-${string}`]: any; -} +}; + +export type LinkProps = Omit & $Props; export default class Link extends SvelteComponentTyped< LinkProps, diff --git a/tests/e2e/carbon/types/Link/OutboundLink.svelte.d.ts b/tests/e2e/carbon/types/Link/OutboundLink.svelte.d.ts index 2791b76c..3ad31e2e 100644 --- a/tests/e2e/carbon/types/Link/OutboundLink.svelte.d.ts +++ b/tests/e2e/carbon/types/Link/OutboundLink.svelte.d.ts @@ -1,7 +1,7 @@ import type { SvelteComponentTyped } from "svelte"; import type { LinkProps } from "./Link.svelte"; -export interface OutboundLinkProps extends LinkProps {} +export type OutboundLinkProps = LinkProps & {}; export default class OutboundLink extends SvelteComponentTyped< OutboundLinkProps, diff --git a/tests/e2e/carbon/types/ListBox/ListBox.svelte.d.ts b/tests/e2e/carbon/types/ListBox/ListBox.svelte.d.ts index 247ef238..e5248889 100644 --- a/tests/e2e/carbon/types/ListBox/ListBox.svelte.d.ts +++ b/tests/e2e/carbon/types/ListBox/ListBox.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ListBoxProps extends RestProps { +type $Props = { /** * Set the size of the list box * @default undefined @@ -59,7 +59,9 @@ export interface ListBoxProps extends RestProps { warnText?: string; [key: `data-${string}`]: any; -} +}; + +export type ListBoxProps = Omit & $Props; export default class ListBox extends SvelteComponentTyped< ListBoxProps, diff --git a/tests/e2e/carbon/types/ListBox/ListBoxField.svelte.d.ts b/tests/e2e/carbon/types/ListBox/ListBoxField.svelte.d.ts index d3f2c189..a76e69a3 100644 --- a/tests/e2e/carbon/types/ListBox/ListBoxField.svelte.d.ts +++ b/tests/e2e/carbon/types/ListBox/ListBoxField.svelte.d.ts @@ -5,7 +5,7 @@ export type ListBoxFieldTranslationId = "close" | "open"; type RestProps = SvelteHTMLElements["div"]; -export interface ListBoxFieldProps extends RestProps { +type $Props = { /** * Set to `true` to disable the list box field * @default false @@ -43,7 +43,9 @@ export interface ListBoxFieldProps extends RestProps { ref?: null | HTMLDivElement; [key: `data-${string}`]: any; -} +}; + +export type ListBoxFieldProps = Omit & $Props; export default class ListBoxField extends SvelteComponentTyped< ListBoxFieldProps, diff --git a/tests/e2e/carbon/types/ListBox/ListBoxMenu.svelte.d.ts b/tests/e2e/carbon/types/ListBox/ListBoxMenu.svelte.d.ts index 4dc9f784..70ea6fd2 100644 --- a/tests/e2e/carbon/types/ListBox/ListBoxMenu.svelte.d.ts +++ b/tests/e2e/carbon/types/ListBox/ListBoxMenu.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ListBoxMenuProps extends RestProps { +type $Props = { /** * Set an id for the top-level element * @default "ccs-" + Math.random().toString(36) @@ -17,7 +17,9 @@ export interface ListBoxMenuProps extends RestProps { ref?: null | HTMLDivElement; [key: `data-${string}`]: any; -} +}; + +export type ListBoxMenuProps = Omit & $Props; export default class ListBoxMenu extends SvelteComponentTyped< ListBoxMenuProps, diff --git a/tests/e2e/carbon/types/ListBox/ListBoxMenuIcon.svelte.d.ts b/tests/e2e/carbon/types/ListBox/ListBoxMenuIcon.svelte.d.ts index 93662b95..cd807575 100644 --- a/tests/e2e/carbon/types/ListBox/ListBoxMenuIcon.svelte.d.ts +++ b/tests/e2e/carbon/types/ListBox/ListBoxMenuIcon.svelte.d.ts @@ -5,7 +5,7 @@ export type ListBoxMenuIconTranslationId = "close" | "open"; type RestProps = SvelteHTMLElements["div"]; -export interface ListBoxMenuIconProps extends RestProps { +type $Props = { /** * Set to `true` to open the list box menu icon * @default false @@ -19,7 +19,9 @@ export interface ListBoxMenuIconProps extends RestProps { translateWithId?: (id: ListBoxMenuIconTranslationId) => string; [key: `data-${string}`]: any; -} +}; + +export type ListBoxMenuIconProps = Omit & $Props; export default class ListBoxMenuIcon extends SvelteComponentTyped< ListBoxMenuIconProps, diff --git a/tests/e2e/carbon/types/ListBox/ListBoxMenuItem.svelte.d.ts b/tests/e2e/carbon/types/ListBox/ListBoxMenuItem.svelte.d.ts index b5851711..c4a76574 100644 --- a/tests/e2e/carbon/types/ListBox/ListBoxMenuItem.svelte.d.ts +++ b/tests/e2e/carbon/types/ListBox/ListBoxMenuItem.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ListBoxMenuItemProps extends RestProps { +type $Props = { /** * Set to `true` to enable the active state * @default false @@ -17,7 +17,9 @@ export interface ListBoxMenuItemProps extends RestProps { highlighted?: boolean; [key: `data-${string}`]: any; -} +}; + +export type ListBoxMenuItemProps = Omit & $Props; export default class ListBoxMenuItem extends SvelteComponentTyped< ListBoxMenuItemProps, diff --git a/tests/e2e/carbon/types/ListBox/ListBoxSelection.svelte.d.ts b/tests/e2e/carbon/types/ListBox/ListBoxSelection.svelte.d.ts index 655600d8..acd3939e 100644 --- a/tests/e2e/carbon/types/ListBox/ListBoxSelection.svelte.d.ts +++ b/tests/e2e/carbon/types/ListBox/ListBoxSelection.svelte.d.ts @@ -5,7 +5,7 @@ export type ListBoxSelectionTranslationId = "clearAll" | "clearSelection"; type RestProps = SvelteHTMLElements["div"]; -export interface ListBoxSelectionProps extends RestProps { +type $Props = { /** * Specify the number of selected items * @default undefined @@ -31,7 +31,9 @@ export interface ListBoxSelectionProps extends RestProps { ref?: null | HTMLDivElement; [key: `data-${string}`]: any; -} +}; + +export type ListBoxSelectionProps = Omit & $Props; export default class ListBoxSelection extends SvelteComponentTyped< ListBoxSelectionProps, diff --git a/tests/e2e/carbon/types/ListItem/ListItem.svelte.d.ts b/tests/e2e/carbon/types/ListItem/ListItem.svelte.d.ts index 75bbeeec..385f544a 100644 --- a/tests/e2e/carbon/types/ListItem/ListItem.svelte.d.ts +++ b/tests/e2e/carbon/types/ListItem/ListItem.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["li"]; -export interface ListItemProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type ListItemProps = Omit & $Props; export default class ListItem extends SvelteComponentTyped< ListItemProps, diff --git a/tests/e2e/carbon/types/Loading/Loading.svelte.d.ts b/tests/e2e/carbon/types/Loading/Loading.svelte.d.ts index e4e39d85..01a904b9 100644 --- a/tests/e2e/carbon/types/Loading/Loading.svelte.d.ts +++ b/tests/e2e/carbon/types/Loading/Loading.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface LoadingProps extends RestProps { +type $Props = { /** * Set to `true` to use the small variant * @default false @@ -35,7 +35,9 @@ export interface LoadingProps extends RestProps { id?: string; [key: `data-${string}`]: any; -} +}; + +export type LoadingProps = Omit & $Props; export default class Loading extends SvelteComponentTyped< LoadingProps, diff --git a/tests/e2e/carbon/types/Modal/Modal.svelte.d.ts b/tests/e2e/carbon/types/Modal/Modal.svelte.d.ts index 3516d2fc..41f37fab 100644 --- a/tests/e2e/carbon/types/Modal/Modal.svelte.d.ts +++ b/tests/e2e/carbon/types/Modal/Modal.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ModalProps extends RestProps { +type $Props = { /** * Set the size of the modal * @default undefined @@ -119,7 +119,9 @@ export interface ModalProps extends RestProps { ref?: null | HTMLDivElement; [key: `data-${string}`]: any; -} +}; + +export type ModalProps = Omit & $Props; export default class Modal extends SvelteComponentTyped< ModalProps, diff --git a/tests/e2e/carbon/types/MultiSelect/MultiSelect.svelte.d.ts b/tests/e2e/carbon/types/MultiSelect/MultiSelect.svelte.d.ts index 53a77e2e..6803ac58 100644 --- a/tests/e2e/carbon/types/MultiSelect/MultiSelect.svelte.d.ts +++ b/tests/e2e/carbon/types/MultiSelect/MultiSelect.svelte.d.ts @@ -12,7 +12,7 @@ export interface MultiSelectItem { type RestProps = SvelteHTMLElements["div"]; -export interface MultiSelectProps extends RestProps { +type $Props = { /** * Set the multiselect items * @default [] @@ -174,7 +174,9 @@ export interface MultiSelectProps extends RestProps { name?: string; [key: `data-${string}`]: any; -} +}; + +export type MultiSelectProps = Omit & $Props; export default class MultiSelect extends SvelteComponentTyped< MultiSelectProps, diff --git a/tests/e2e/carbon/types/Notification/InlineNotification.svelte.d.ts b/tests/e2e/carbon/types/Notification/InlineNotification.svelte.d.ts index 01829eac..2b70f8ec 100644 --- a/tests/e2e/carbon/types/Notification/InlineNotification.svelte.d.ts +++ b/tests/e2e/carbon/types/Notification/InlineNotification.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface InlineNotificationProps extends RestProps { +type $Props = { /** * Specify the kind of notification * @default "error" @@ -59,7 +59,9 @@ export interface InlineNotificationProps extends RestProps { iconDescription?: string; [key: `data-${string}`]: any; -} +}; + +export type InlineNotificationProps = Omit & $Props; export default class InlineNotification extends SvelteComponentTyped< InlineNotificationProps, diff --git a/tests/e2e/carbon/types/Notification/NotificationActionButton.svelte.d.ts b/tests/e2e/carbon/types/Notification/NotificationActionButton.svelte.d.ts index 61b29826..70e334cf 100644 --- a/tests/e2e/carbon/types/Notification/NotificationActionButton.svelte.d.ts +++ b/tests/e2e/carbon/types/Notification/NotificationActionButton.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface NotificationActionButtonProps {} +export type NotificationActionButtonProps = {}; export default class NotificationActionButton extends SvelteComponentTyped< NotificationActionButtonProps, diff --git a/tests/e2e/carbon/types/Notification/NotificationButton.svelte.d.ts b/tests/e2e/carbon/types/Notification/NotificationButton.svelte.d.ts index 3fb950e4..a0ce0dab 100644 --- a/tests/e2e/carbon/types/Notification/NotificationButton.svelte.d.ts +++ b/tests/e2e/carbon/types/Notification/NotificationButton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface NotificationButtonProps extends RestProps { +type $Props = { /** * Set the type of notification * @default "toast" @@ -29,7 +29,9 @@ export interface NotificationButtonProps extends RestProps { iconDescription?: string; [key: `data-${string}`]: any; -} +}; + +export type NotificationButtonProps = Omit & $Props; export default class NotificationButton extends SvelteComponentTyped< NotificationButtonProps, diff --git a/tests/e2e/carbon/types/Notification/NotificationIcon.svelte.d.ts b/tests/e2e/carbon/types/Notification/NotificationIcon.svelte.d.ts index 6e972e01..2aea3f7c 100644 --- a/tests/e2e/carbon/types/Notification/NotificationIcon.svelte.d.ts +++ b/tests/e2e/carbon/types/Notification/NotificationIcon.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface NotificationIconProps { +export type NotificationIconProps = { /** * Specify the kind of notification icon * @default "error" @@ -24,7 +24,7 @@ export interface NotificationIconProps { * @default "Closes notification" */ iconDescription?: string; -} +}; export default class NotificationIcon extends SvelteComponentTyped< NotificationIconProps, diff --git a/tests/e2e/carbon/types/Notification/NotificationTextDetails.svelte.d.ts b/tests/e2e/carbon/types/Notification/NotificationTextDetails.svelte.d.ts index 2383901a..25b6272a 100644 --- a/tests/e2e/carbon/types/Notification/NotificationTextDetails.svelte.d.ts +++ b/tests/e2e/carbon/types/Notification/NotificationTextDetails.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface NotificationTextDetailsProps { +export type NotificationTextDetailsProps = { /** * Set the type of notification * @default "toast" @@ -24,7 +24,7 @@ export interface NotificationTextDetailsProps { * @default "Caption" */ caption?: string; -} +}; export default class NotificationTextDetails extends SvelteComponentTyped< NotificationTextDetailsProps, diff --git a/tests/e2e/carbon/types/Notification/ToastNotification.svelte.d.ts b/tests/e2e/carbon/types/Notification/ToastNotification.svelte.d.ts index 2f30e195..e7ab9a2c 100644 --- a/tests/e2e/carbon/types/Notification/ToastNotification.svelte.d.ts +++ b/tests/e2e/carbon/types/Notification/ToastNotification.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ToastNotificationProps extends RestProps { +type $Props = { /** * Specify the kind of notification * @default "error" @@ -65,7 +65,9 @@ export interface ToastNotificationProps extends RestProps { hideCloseButton?: boolean; [key: `data-${string}`]: any; -} +}; + +export type ToastNotificationProps = Omit & $Props; export default class ToastNotification extends SvelteComponentTyped< ToastNotificationProps, diff --git a/tests/e2e/carbon/types/NumberInput/NumberInput.svelte.d.ts b/tests/e2e/carbon/types/NumberInput/NumberInput.svelte.d.ts index 35ce45d2..eb7c588a 100644 --- a/tests/e2e/carbon/types/NumberInput/NumberInput.svelte.d.ts +++ b/tests/e2e/carbon/types/NumberInput/NumberInput.svelte.d.ts @@ -5,7 +5,7 @@ export type NumberInputTranslationId = "increment" | "decrement"; type RestProps = SvelteHTMLElements["div"]; -export interface NumberInputProps extends RestProps { +type $Props = { /** * Set the size of the input * @default undefined @@ -139,7 +139,9 @@ export interface NumberInputProps extends RestProps { ref?: null | HTMLInputElement; [key: `data-${string}`]: any; -} +}; + +export type NumberInputProps = Omit & $Props; export default class NumberInput extends SvelteComponentTyped< NumberInputProps, diff --git a/tests/e2e/carbon/types/NumberInput/NumberInputSkeleton.svelte.d.ts b/tests/e2e/carbon/types/NumberInput/NumberInputSkeleton.svelte.d.ts index 6b1e0f6d..d0ece422 100644 --- a/tests/e2e/carbon/types/NumberInput/NumberInputSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/NumberInput/NumberInputSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface NumberInputSkeletonProps extends RestProps { +type $Props = { /** * Set to `true` to hide the label text * @default false @@ -11,7 +11,9 @@ export interface NumberInputSkeletonProps extends RestProps { hideLabel?: boolean; [key: `data-${string}`]: any; -} +}; + +export type NumberInputSkeletonProps = Omit & $Props; export default class NumberInputSkeleton extends SvelteComponentTyped< NumberInputSkeletonProps, diff --git a/tests/e2e/carbon/types/OrderedList/OrderedList.svelte.d.ts b/tests/e2e/carbon/types/OrderedList/OrderedList.svelte.d.ts index 4745c62b..7cfc230c 100644 --- a/tests/e2e/carbon/types/OrderedList/OrderedList.svelte.d.ts +++ b/tests/e2e/carbon/types/OrderedList/OrderedList.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["ol"]; -export interface OrderedListProps extends RestProps { +type $Props = { /** * Set to `true` to use the nested variant * @default false @@ -17,7 +17,9 @@ export interface OrderedListProps extends RestProps { native?: boolean; [key: `data-${string}`]: any; -} +}; + +export type OrderedListProps = Omit & $Props; export default class OrderedList extends SvelteComponentTyped< OrderedListProps, diff --git a/tests/e2e/carbon/types/OverflowMenu/OverflowMenu.svelte.d.ts b/tests/e2e/carbon/types/OverflowMenu/OverflowMenu.svelte.d.ts index 743a0fef..a30cba93 100644 --- a/tests/e2e/carbon/types/OverflowMenu/OverflowMenu.svelte.d.ts +++ b/tests/e2e/carbon/types/OverflowMenu/OverflowMenu.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface OverflowMenuProps extends RestProps { +type $Props = { /** * Specify the size of the overflow menu * @default undefined @@ -77,7 +77,9 @@ export interface OverflowMenuProps extends RestProps { menuRef?: null | HTMLUListElement; [key: `data-${string}`]: any; -} +}; + +export type OverflowMenuProps = Omit & $Props; export default class OverflowMenu extends SvelteComponentTyped< OverflowMenuProps, diff --git a/tests/e2e/carbon/types/OverflowMenu/OverflowMenuItem.svelte.d.ts b/tests/e2e/carbon/types/OverflowMenu/OverflowMenuItem.svelte.d.ts index c7fb2cbe..c642b62a 100644 --- a/tests/e2e/carbon/types/OverflowMenu/OverflowMenuItem.svelte.d.ts +++ b/tests/e2e/carbon/types/OverflowMenu/OverflowMenuItem.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["li"]; -export interface OverflowMenuItemProps extends RestProps { +type $Props = { /** * Specify the item text * Alternatively, use the default slot for a custom element @@ -60,7 +60,9 @@ export interface OverflowMenuItemProps extends RestProps { ref?: null | HTMLAnchorElement | HTMLButtonElement; [key: `data-${string}`]: any; -} +}; + +export type OverflowMenuItemProps = Omit & $Props; export default class OverflowMenuItem extends SvelteComponentTyped< OverflowMenuItemProps, diff --git a/tests/e2e/carbon/types/Pagination/Pagination.svelte.d.ts b/tests/e2e/carbon/types/Pagination/Pagination.svelte.d.ts index e1518124..b39c4ca4 100644 --- a/tests/e2e/carbon/types/Pagination/Pagination.svelte.d.ts +++ b/tests/e2e/carbon/types/Pagination/Pagination.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface PaginationProps extends RestProps { +type $Props = { /** * Specify the current page index * @default 1 @@ -101,7 +101,9 @@ export interface PaginationProps extends RestProps { id?: string; [key: `data-${string}`]: any; -} +}; + +export type PaginationProps = Omit & $Props; export default class Pagination extends SvelteComponentTyped< PaginationProps, diff --git a/tests/e2e/carbon/types/Pagination/PaginationSkeleton.svelte.d.ts b/tests/e2e/carbon/types/Pagination/PaginationSkeleton.svelte.d.ts index 5b18cdf0..6ecc82d5 100644 --- a/tests/e2e/carbon/types/Pagination/PaginationSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/Pagination/PaginationSkeleton.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface PaginationSkeletonProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type PaginationSkeletonProps = Omit & $Props; export default class PaginationSkeleton extends SvelteComponentTyped< PaginationSkeletonProps, diff --git a/tests/e2e/carbon/types/PaginationNav/PaginationNav.svelte.d.ts b/tests/e2e/carbon/types/PaginationNav/PaginationNav.svelte.d.ts index 393b6182..8449a31b 100644 --- a/tests/e2e/carbon/types/PaginationNav/PaginationNav.svelte.d.ts +++ b/tests/e2e/carbon/types/PaginationNav/PaginationNav.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["nav"]; -export interface PaginationNavProps extends RestProps { +type $Props = { /** * Specify the current page index * @default 0 @@ -41,7 +41,9 @@ export interface PaginationNavProps extends RestProps { backwardText?: string; [key: `data-${string}`]: any; -} +}; + +export type PaginationNavProps = Omit & $Props; export default class PaginationNav extends SvelteComponentTyped< PaginationNavProps, diff --git a/tests/e2e/carbon/types/ProgressIndicator/ProgressIndicator.svelte.d.ts b/tests/e2e/carbon/types/ProgressIndicator/ProgressIndicator.svelte.d.ts index 7352531f..da96465e 100644 --- a/tests/e2e/carbon/types/ProgressIndicator/ProgressIndicator.svelte.d.ts +++ b/tests/e2e/carbon/types/ProgressIndicator/ProgressIndicator.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; 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 & $Props; export default class ProgressIndicator extends SvelteComponentTyped< ProgressIndicatorProps, diff --git a/tests/e2e/carbon/types/ProgressIndicator/ProgressIndicatorSkeleton.svelte.d.ts b/tests/e2e/carbon/types/ProgressIndicator/ProgressIndicatorSkeleton.svelte.d.ts index 883abf4e..b2b2d561 100644 --- a/tests/e2e/carbon/types/ProgressIndicator/ProgressIndicatorSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/ProgressIndicator/ProgressIndicatorSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; 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 & + $Props; export default class ProgressIndicatorSkeleton extends SvelteComponentTyped< ProgressIndicatorSkeletonProps, diff --git a/tests/e2e/carbon/types/ProgressIndicator/ProgressStep.svelte.d.ts b/tests/e2e/carbon/types/ProgressIndicator/ProgressStep.svelte.d.ts index 059d99eb..9ba28137 100644 --- a/tests/e2e/carbon/types/ProgressIndicator/ProgressStep.svelte.d.ts +++ b/tests/e2e/carbon/types/ProgressIndicator/ProgressStep.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; 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 & $Props; export default class ProgressStep extends SvelteComponentTyped< ProgressStepProps, diff --git a/tests/e2e/carbon/types/RadioButton/RadioButton.svelte.d.ts b/tests/e2e/carbon/types/RadioButton/RadioButton.svelte.d.ts index a341a8b5..8aa023cf 100644 --- a/tests/e2e/carbon/types/RadioButton/RadioButton.svelte.d.ts +++ b/tests/e2e/carbon/types/RadioButton/RadioButton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface RadioButtonProps extends RestProps { +type $Props = { /** * Specify the value of the radio button * @default "" @@ -59,7 +59,9 @@ export interface RadioButtonProps extends RestProps { ref?: null | HTMLInputElement; [key: `data-${string}`]: any; -} +}; + +export type RadioButtonProps = Omit & $Props; export default class RadioButton extends SvelteComponentTyped< RadioButtonProps, diff --git a/tests/e2e/carbon/types/RadioButton/RadioButtonSkeleton.svelte.d.ts b/tests/e2e/carbon/types/RadioButton/RadioButtonSkeleton.svelte.d.ts index 30745ca8..b9d90d5a 100644 --- a/tests/e2e/carbon/types/RadioButton/RadioButtonSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/RadioButton/RadioButtonSkeleton.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface RadioButtonSkeletonProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type RadioButtonSkeletonProps = Omit & $Props; export default class RadioButtonSkeleton extends SvelteComponentTyped< RadioButtonSkeletonProps, diff --git a/tests/e2e/carbon/types/RadioButtonGroup/RadioButtonGroup.svelte.d.ts b/tests/e2e/carbon/types/RadioButtonGroup/RadioButtonGroup.svelte.d.ts index 8f8945ee..7001e6e8 100644 --- a/tests/e2e/carbon/types/RadioButtonGroup/RadioButtonGroup.svelte.d.ts +++ b/tests/e2e/carbon/types/RadioButtonGroup/RadioButtonGroup.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface RadioButtonGroupProps extends RestProps { +type $Props = { /** * Set the selected radio button value * @default undefined @@ -35,7 +35,9 @@ export interface RadioButtonGroupProps extends RestProps { id?: string; [key: `data-${string}`]: any; -} +}; + +export type RadioButtonGroupProps = Omit & $Props; export default class RadioButtonGroup extends SvelteComponentTyped< RadioButtonGroupProps, diff --git a/tests/e2e/carbon/types/Search/Search.svelte.d.ts b/tests/e2e/carbon/types/Search/Search.svelte.d.ts index 631f7ac8..0470ddcd 100644 --- a/tests/e2e/carbon/types/Search/Search.svelte.d.ts +++ b/tests/e2e/carbon/types/Search/Search.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface SearchProps { +export type SearchProps = { /** * @deprecated this prop will be removed in the next major release * Use size="sm" instead @@ -85,7 +85,7 @@ export interface SearchProps { * @default null */ ref?: null | HTMLInputElement; -} +}; export default class Search extends SvelteComponentTyped< SearchProps, diff --git a/tests/e2e/carbon/types/Search/SearchSkeleton.svelte.d.ts b/tests/e2e/carbon/types/Search/SearchSkeleton.svelte.d.ts index f237c3f1..b7284979 100644 --- a/tests/e2e/carbon/types/Search/SearchSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/Search/SearchSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface SearchSkeletonProps extends RestProps { +type $Props = { /** * @deprecated this prop will be removed in the next major release * Set to `true` to use the small variant @@ -18,7 +18,9 @@ export interface SearchSkeletonProps extends RestProps { size?: "sm" | "lg" | "xl"; [key: `data-${string}`]: any; -} +}; + +export type SearchSkeletonProps = Omit & $Props; export default class SearchSkeleton extends SvelteComponentTyped< SearchSkeletonProps, diff --git a/tests/e2e/carbon/types/Select/Select.svelte.d.ts b/tests/e2e/carbon/types/Select/Select.svelte.d.ts index 60f2316c..7f032b33 100644 --- a/tests/e2e/carbon/types/Select/Select.svelte.d.ts +++ b/tests/e2e/carbon/types/Select/Select.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface SelectProps extends RestProps { +type $Props = { /** * Specify the selected item value * @default undefined @@ -89,7 +89,9 @@ export interface SelectProps extends RestProps { ref?: null | HTMLSelectElement; [key: `data-${string}`]: any; -} +}; + +export type SelectProps = Omit & $Props; export default class Select extends SvelteComponentTyped< SelectProps, diff --git a/tests/e2e/carbon/types/Select/SelectItem.svelte.d.ts b/tests/e2e/carbon/types/Select/SelectItem.svelte.d.ts index daab03d2..5d79d0f8 100644 --- a/tests/e2e/carbon/types/Select/SelectItem.svelte.d.ts +++ b/tests/e2e/carbon/types/Select/SelectItem.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface SelectItemProps { +export type SelectItemProps = { /** * Specify the option value * @default "" @@ -24,7 +24,7 @@ export interface SelectItemProps { * @default false */ disabled?: boolean; -} +}; export default class SelectItem extends SvelteComponentTyped< SelectItemProps, diff --git a/tests/e2e/carbon/types/Select/SelectItemGroup.svelte.d.ts b/tests/e2e/carbon/types/Select/SelectItemGroup.svelte.d.ts index 6d61e444..8b2322c5 100644 --- a/tests/e2e/carbon/types/Select/SelectItemGroup.svelte.d.ts +++ b/tests/e2e/carbon/types/Select/SelectItemGroup.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["optgroup"]; -export interface SelectItemGroupProps extends RestProps { +type $Props = { /** * Set to `true` to disable the optgroup element * @default false @@ -17,7 +17,9 @@ export interface SelectItemGroupProps extends RestProps { label?: string; [key: `data-${string}`]: any; -} +}; + +export type SelectItemGroupProps = Omit & $Props; export default class SelectItemGroup extends SvelteComponentTyped< SelectItemGroupProps, diff --git a/tests/e2e/carbon/types/Select/SelectSkeleton.svelte.d.ts b/tests/e2e/carbon/types/Select/SelectSkeleton.svelte.d.ts index 431bdbdd..11bcf637 100644 --- a/tests/e2e/carbon/types/Select/SelectSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/Select/SelectSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface SelectSkeletonProps extends RestProps { +type $Props = { /** * Set to `true` to hide the label text * @default false @@ -11,7 +11,9 @@ export interface SelectSkeletonProps extends RestProps { hideLabel?: boolean; [key: `data-${string}`]: any; -} +}; + +export type SelectSkeletonProps = Omit & $Props; export default class SelectSkeleton extends SvelteComponentTyped< SelectSkeletonProps, diff --git a/tests/e2e/carbon/types/SkeletonPlaceholder/SkeletonPlaceholder.svelte.d.ts b/tests/e2e/carbon/types/SkeletonPlaceholder/SkeletonPlaceholder.svelte.d.ts index a73c7d45..0add01d9 100644 --- a/tests/e2e/carbon/types/SkeletonPlaceholder/SkeletonPlaceholder.svelte.d.ts +++ b/tests/e2e/carbon/types/SkeletonPlaceholder/SkeletonPlaceholder.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface SkeletonPlaceholderProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type SkeletonPlaceholderProps = Omit & $Props; export default class SkeletonPlaceholder extends SvelteComponentTyped< SkeletonPlaceholderProps, diff --git a/tests/e2e/carbon/types/SkeletonText/SkeletonText.svelte.d.ts b/tests/e2e/carbon/types/SkeletonText/SkeletonText.svelte.d.ts index 0cae6e6e..f71f5c2c 100644 --- a/tests/e2e/carbon/types/SkeletonText/SkeletonText.svelte.d.ts +++ b/tests/e2e/carbon/types/SkeletonText/SkeletonText.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface SkeletonTextProps extends RestProps { +type $Props = { /** * Specify the number of lines to render * @default 3 @@ -29,7 +29,9 @@ export interface SkeletonTextProps extends RestProps { width?: string; [key: `data-${string}`]: any; -} +}; + +export type SkeletonTextProps = Omit & $Props; export default class SkeletonText extends SvelteComponentTyped< SkeletonTextProps, diff --git a/tests/e2e/carbon/types/Slider/Slider.svelte.d.ts b/tests/e2e/carbon/types/Slider/Slider.svelte.d.ts index 625d6e08..3f55afc5 100644 --- a/tests/e2e/carbon/types/Slider/Slider.svelte.d.ts +++ b/tests/e2e/carbon/types/Slider/Slider.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface SliderProps extends RestProps { +type $Props = { /** * Specify the value of the slider * @default 0 @@ -107,7 +107,9 @@ export interface SliderProps extends RestProps { ref?: null | HTMLDivElement; [key: `data-${string}`]: any; -} +}; + +export type SliderProps = Omit & $Props; export default class Slider extends SvelteComponentTyped< SliderProps, diff --git a/tests/e2e/carbon/types/Slider/SliderSkeleton.svelte.d.ts b/tests/e2e/carbon/types/Slider/SliderSkeleton.svelte.d.ts index d7115940..497ffb63 100644 --- a/tests/e2e/carbon/types/Slider/SliderSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/Slider/SliderSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface SliderSkeletonProps extends RestProps { +type $Props = { /** * Set to `true` to hide the label text * @default false @@ -11,7 +11,9 @@ export interface SliderSkeletonProps extends RestProps { hideLabel?: boolean; [key: `data-${string}`]: any; -} +}; + +export type SliderSkeletonProps = Omit & $Props; export default class SliderSkeleton extends SvelteComponentTyped< SliderSkeletonProps, diff --git a/tests/e2e/carbon/types/StructuredList/StructuredList.svelte.d.ts b/tests/e2e/carbon/types/StructuredList/StructuredList.svelte.d.ts index 4ee567cb..526279d6 100644 --- a/tests/e2e/carbon/types/StructuredList/StructuredList.svelte.d.ts +++ b/tests/e2e/carbon/types/StructuredList/StructuredList.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface StructuredListProps extends RestProps { +type $Props = { /** * Specify the selected structured list row value * @default undefined @@ -23,7 +23,9 @@ export interface StructuredListProps extends RestProps { selection?: boolean; [key: `data-${string}`]: any; -} +}; + +export type StructuredListProps = Omit & $Props; export default class StructuredList extends SvelteComponentTyped< StructuredListProps, diff --git a/tests/e2e/carbon/types/StructuredList/StructuredListBody.svelte.d.ts b/tests/e2e/carbon/types/StructuredList/StructuredListBody.svelte.d.ts index b865022a..05ad0812 100644 --- a/tests/e2e/carbon/types/StructuredList/StructuredListBody.svelte.d.ts +++ b/tests/e2e/carbon/types/StructuredList/StructuredListBody.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface StructuredListBodyProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type StructuredListBodyProps = Omit & $Props; export default class StructuredListBody extends SvelteComponentTyped< StructuredListBodyProps, diff --git a/tests/e2e/carbon/types/StructuredList/StructuredListCell.svelte.d.ts b/tests/e2e/carbon/types/StructuredList/StructuredListCell.svelte.d.ts index 101ee103..ceb45af5 100644 --- a/tests/e2e/carbon/types/StructuredList/StructuredListCell.svelte.d.ts +++ b/tests/e2e/carbon/types/StructuredList/StructuredListCell.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface StructuredListCellProps extends RestProps { +type $Props = { /** * Set to `true` to use as a header * @default false @@ -17,7 +17,9 @@ export interface StructuredListCellProps extends RestProps { noWrap?: boolean; [key: `data-${string}`]: any; -} +}; + +export type StructuredListCellProps = Omit & $Props; export default class StructuredListCell extends SvelteComponentTyped< StructuredListCellProps, diff --git a/tests/e2e/carbon/types/StructuredList/StructuredListHead.svelte.d.ts b/tests/e2e/carbon/types/StructuredList/StructuredListHead.svelte.d.ts index 3b0a2890..d6166960 100644 --- a/tests/e2e/carbon/types/StructuredList/StructuredListHead.svelte.d.ts +++ b/tests/e2e/carbon/types/StructuredList/StructuredListHead.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface StructuredListHeadProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type StructuredListHeadProps = Omit & $Props; export default class StructuredListHead extends SvelteComponentTyped< StructuredListHeadProps, diff --git a/tests/e2e/carbon/types/StructuredList/StructuredListInput.svelte.d.ts b/tests/e2e/carbon/types/StructuredList/StructuredListInput.svelte.d.ts index 95282fbb..b7e6fcaf 100644 --- a/tests/e2e/carbon/types/StructuredList/StructuredListInput.svelte.d.ts +++ b/tests/e2e/carbon/types/StructuredList/StructuredListInput.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["input"]; -export interface StructuredListInputProps extends RestProps { +type $Props = { /** * Set to `true` to check the input * @default false @@ -41,7 +41,9 @@ export interface StructuredListInputProps extends RestProps { ref?: null | HTMLInputElement; [key: `data-${string}`]: any; -} +}; + +export type StructuredListInputProps = Omit & $Props; export default class StructuredListInput extends SvelteComponentTyped< StructuredListInputProps, diff --git a/tests/e2e/carbon/types/StructuredList/StructuredListRow.svelte.d.ts b/tests/e2e/carbon/types/StructuredList/StructuredListRow.svelte.d.ts index a7a7c8f8..eefab56b 100644 --- a/tests/e2e/carbon/types/StructuredList/StructuredListRow.svelte.d.ts +++ b/tests/e2e/carbon/types/StructuredList/StructuredListRow.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["label"]; -export interface StructuredListRowProps extends RestProps { +type $Props = { /** * Set to `true` to use as a header * @default false @@ -23,7 +23,9 @@ export interface StructuredListRowProps extends RestProps { tabindex?: string; [key: `data-${string}`]: any; -} +}; + +export type StructuredListRowProps = Omit & $Props; export default class StructuredListRow extends SvelteComponentTyped< StructuredListRowProps, diff --git a/tests/e2e/carbon/types/StructuredList/StructuredListSkeleton.svelte.d.ts b/tests/e2e/carbon/types/StructuredList/StructuredListSkeleton.svelte.d.ts index 1a06244d..25cb5c60 100644 --- a/tests/e2e/carbon/types/StructuredList/StructuredListSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/StructuredList/StructuredListSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface StructuredListSkeletonProps extends RestProps { +type $Props = { /** * Specify the number of rows * @default 5 @@ -17,7 +17,10 @@ export interface StructuredListSkeletonProps extends RestProps { border?: boolean; [key: `data-${string}`]: any; -} +}; + +export type StructuredListSkeletonProps = Omit & + $Props; export default class StructuredListSkeleton extends SvelteComponentTyped< StructuredListSkeletonProps, diff --git a/tests/e2e/carbon/types/Tabs/Tab.svelte.d.ts b/tests/e2e/carbon/types/Tabs/Tab.svelte.d.ts index d0722d1a..3503eb15 100644 --- a/tests/e2e/carbon/types/Tabs/Tab.svelte.d.ts +++ b/tests/e2e/carbon/types/Tabs/Tab.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["li"]; -export interface TabProps extends RestProps { +type $Props = { /** * Specify the tab label * Alternatively, use the default slot (e.g., Label) @@ -42,7 +42,9 @@ export interface TabProps extends RestProps { ref?: null | HTMLAnchorElement; [key: `data-${string}`]: any; -} +}; + +export type TabProps = Omit & $Props; export default class Tab extends SvelteComponentTyped< TabProps, diff --git a/tests/e2e/carbon/types/Tabs/TabContent.svelte.d.ts b/tests/e2e/carbon/types/Tabs/TabContent.svelte.d.ts index 073b52bf..3113788d 100644 --- a/tests/e2e/carbon/types/Tabs/TabContent.svelte.d.ts +++ b/tests/e2e/carbon/types/Tabs/TabContent.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface TabContentProps extends RestProps { +type $Props = { /** * Set an id for the top-level element * @default "ccs-" + Math.random().toString(36) @@ -11,7 +11,9 @@ export interface TabContentProps extends RestProps { id?: string; [key: `data-${string}`]: any; -} +}; + +export type TabContentProps = Omit & $Props; export default class TabContent extends SvelteComponentTyped< TabContentProps, diff --git a/tests/e2e/carbon/types/Tabs/Tabs.svelte.d.ts b/tests/e2e/carbon/types/Tabs/Tabs.svelte.d.ts index 518822b9..d839f28d 100644 --- a/tests/e2e/carbon/types/Tabs/Tabs.svelte.d.ts +++ b/tests/e2e/carbon/types/Tabs/Tabs.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface TabsProps extends RestProps { +type $Props = { /** * Specify the selected tab index * @default 0 @@ -29,7 +29,9 @@ export interface TabsProps extends RestProps { triggerHref?: string; [key: `data-${string}`]: any; -} +}; + +export type TabsProps = Omit & $Props; export default class Tabs extends SvelteComponentTyped< TabsProps, diff --git a/tests/e2e/carbon/types/Tabs/TabsSkeleton.svelte.d.ts b/tests/e2e/carbon/types/Tabs/TabsSkeleton.svelte.d.ts index cf404d01..1406f5ae 100644 --- a/tests/e2e/carbon/types/Tabs/TabsSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/Tabs/TabsSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface TabsSkeletonProps extends RestProps { +type $Props = { /** * Specify the number of tabs to render * @default 4 @@ -11,7 +11,9 @@ export interface TabsSkeletonProps extends RestProps { count?: number; [key: `data-${string}`]: any; -} +}; + +export type TabsSkeletonProps = Omit & $Props; export default class TabsSkeleton extends SvelteComponentTyped< TabsSkeletonProps, diff --git a/tests/e2e/carbon/types/Tag/Tag.svelte.d.ts b/tests/e2e/carbon/types/Tag/Tag.svelte.d.ts index 9bf8a399..9d6ebc5a 100644 --- a/tests/e2e/carbon/types/Tag/Tag.svelte.d.ts +++ b/tests/e2e/carbon/types/Tag/Tag.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"] & SvelteHTMLElements["span"]; -export interface TagProps extends RestProps { +type $Props = { /** * Specify the type of tag * @default undefined @@ -58,7 +58,9 @@ export interface TagProps extends RestProps { id?: string; [key: `data-${string}`]: any; -} +}; + +export type TagProps = Omit & $Props; export default class Tag extends SvelteComponentTyped< TagProps, diff --git a/tests/e2e/carbon/types/Tag/TagSkeleton.svelte.d.ts b/tests/e2e/carbon/types/Tag/TagSkeleton.svelte.d.ts index d9461256..1c4dbb14 100644 --- a/tests/e2e/carbon/types/Tag/TagSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/Tag/TagSkeleton.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["span"]; -export interface TagSkeletonProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type TagSkeletonProps = Omit & $Props; export default class TagSkeleton extends SvelteComponentTyped< TagSkeletonProps, diff --git a/tests/e2e/carbon/types/TextArea/TextArea.svelte.d.ts b/tests/e2e/carbon/types/TextArea/TextArea.svelte.d.ts index 7151695f..90dae460 100644 --- a/tests/e2e/carbon/types/TextArea/TextArea.svelte.d.ts +++ b/tests/e2e/carbon/types/TextArea/TextArea.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["textarea"]; -export interface TextAreaProps extends RestProps { +type $Props = { /** * Specify the textarea value * @default "" @@ -89,7 +89,9 @@ export interface TextAreaProps extends RestProps { ref?: null | HTMLTextAreaElement; [key: `data-${string}`]: any; -} +}; + +export type TextAreaProps = Omit & $Props; export default class TextArea extends SvelteComponentTyped< TextAreaProps, diff --git a/tests/e2e/carbon/types/TextArea/TextAreaSkeleton.svelte.d.ts b/tests/e2e/carbon/types/TextArea/TextAreaSkeleton.svelte.d.ts index 6b32cdaf..dbfe4652 100644 --- a/tests/e2e/carbon/types/TextArea/TextAreaSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/TextArea/TextAreaSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface TextAreaSkeletonProps extends RestProps { +type $Props = { /** * Set to `true` to visually hide the label text * @default false @@ -11,7 +11,9 @@ export interface TextAreaSkeletonProps extends RestProps { hideLabel?: boolean; [key: `data-${string}`]: any; -} +}; + +export type TextAreaSkeletonProps = Omit & $Props; export default class TextAreaSkeleton extends SvelteComponentTyped< TextAreaSkeletonProps, diff --git a/tests/e2e/carbon/types/TextInput/PasswordInput.svelte.d.ts b/tests/e2e/carbon/types/TextInput/PasswordInput.svelte.d.ts index 56a17a1d..567ceeef 100644 --- a/tests/e2e/carbon/types/TextInput/PasswordInput.svelte.d.ts +++ b/tests/e2e/carbon/types/TextInput/PasswordInput.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["input"]; -export interface PasswordInputProps extends RestProps { +type $Props = { /** * Set the size of the input * @default undefined @@ -113,7 +113,9 @@ export interface PasswordInputProps extends RestProps { ref?: null | HTMLInputElement; [key: `data-${string}`]: any; -} +}; + +export type PasswordInputProps = Omit & $Props; export default class PasswordInput extends SvelteComponentTyped< PasswordInputProps, diff --git a/tests/e2e/carbon/types/TextInput/TextInput.svelte.d.ts b/tests/e2e/carbon/types/TextInput/TextInput.svelte.d.ts index c6d3ae91..09eaa4bf 100644 --- a/tests/e2e/carbon/types/TextInput/TextInput.svelte.d.ts +++ b/tests/e2e/carbon/types/TextInput/TextInput.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["input"]; -export interface TextInputProps extends RestProps { +type $Props = { /** * Set the size of the input * @default undefined @@ -113,7 +113,9 @@ export interface TextInputProps extends RestProps { inline?: boolean; [key: `data-${string}`]: any; -} +}; + +export type TextInputProps = Omit & $Props; export default class TextInput extends SvelteComponentTyped< TextInputProps, diff --git a/tests/e2e/carbon/types/TextInput/TextInputSkeleton.svelte.d.ts b/tests/e2e/carbon/types/TextInput/TextInputSkeleton.svelte.d.ts index c7291482..ccaa3fa8 100644 --- a/tests/e2e/carbon/types/TextInput/TextInputSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/TextInput/TextInputSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface TextInputSkeletonProps extends RestProps { +type $Props = { /** * Set to `true` to hide the label text * @default false @@ -11,7 +11,9 @@ export interface TextInputSkeletonProps extends RestProps { hideLabel?: boolean; [key: `data-${string}`]: any; -} +}; + +export type TextInputSkeletonProps = Omit & $Props; export default class TextInputSkeleton extends SvelteComponentTyped< TextInputSkeletonProps, diff --git a/tests/e2e/carbon/types/Tile/ClickableTile.svelte.d.ts b/tests/e2e/carbon/types/Tile/ClickableTile.svelte.d.ts index 9b80f27e..ed91ed32 100644 --- a/tests/e2e/carbon/types/Tile/ClickableTile.svelte.d.ts +++ b/tests/e2e/carbon/types/Tile/ClickableTile.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface ClickableTileProps extends RestProps { +type $Props = { /** * Set to `true` to click the tile * @default false @@ -23,7 +23,9 @@ export interface ClickableTileProps extends RestProps { href?: string; [key: `data-${string}`]: any; -} +}; + +export type ClickableTileProps = Omit & $Props; export default class ClickableTile extends SvelteComponentTyped< ClickableTileProps, diff --git a/tests/e2e/carbon/types/Tile/ExpandableTile.svelte.d.ts b/tests/e2e/carbon/types/Tile/ExpandableTile.svelte.d.ts index 01c6dd58..f62cb5bc 100644 --- a/tests/e2e/carbon/types/Tile/ExpandableTile.svelte.d.ts +++ b/tests/e2e/carbon/types/Tile/ExpandableTile.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface ExpandableTileProps extends RestProps { +type $Props = { /** * Set to `true` to expand the tile * @default false @@ -71,7 +71,9 @@ export interface ExpandableTileProps extends RestProps { ref?: null | HTMLButtonElement; [key: `data-${string}`]: any; -} +}; + +export type ExpandableTileProps = Omit & $Props; export default class ExpandableTile extends SvelteComponentTyped< ExpandableTileProps, diff --git a/tests/e2e/carbon/types/Tile/RadioTile.svelte.d.ts b/tests/e2e/carbon/types/Tile/RadioTile.svelte.d.ts index f8558dd7..44887945 100644 --- a/tests/e2e/carbon/types/Tile/RadioTile.svelte.d.ts +++ b/tests/e2e/carbon/types/Tile/RadioTile.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["label"]; -export interface RadioTileProps extends RestProps { +type $Props = { /** * Set to `true` to check the tile * @default false @@ -47,7 +47,9 @@ export interface RadioTileProps extends RestProps { name?: string; [key: `data-${string}`]: any; -} +}; + +export type RadioTileProps = Omit & $Props; export default class RadioTile extends SvelteComponentTyped< RadioTileProps, diff --git a/tests/e2e/carbon/types/Tile/SelectableTile.svelte.d.ts b/tests/e2e/carbon/types/Tile/SelectableTile.svelte.d.ts index 688b89f9..c44ea824 100644 --- a/tests/e2e/carbon/types/Tile/SelectableTile.svelte.d.ts +++ b/tests/e2e/carbon/types/Tile/SelectableTile.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["label"]; -export interface SelectableTileProps extends RestProps { +type $Props = { /** * Set to `true` to select the tile * @default false @@ -59,7 +59,9 @@ export interface SelectableTileProps extends RestProps { ref?: null | HTMLInputElement; [key: `data-${string}`]: any; -} +}; + +export type SelectableTileProps = Omit & $Props; export default class SelectableTile extends SvelteComponentTyped< SelectableTileProps, diff --git a/tests/e2e/carbon/types/Tile/Tile.svelte.d.ts b/tests/e2e/carbon/types/Tile/Tile.svelte.d.ts index 79244986..7a026843 100644 --- a/tests/e2e/carbon/types/Tile/Tile.svelte.d.ts +++ b/tests/e2e/carbon/types/Tile/Tile.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface TileProps extends RestProps { +type $Props = { /** * Set to `true` to enable the light variant * @default false @@ -11,7 +11,9 @@ export interface TileProps extends RestProps { light?: boolean; [key: `data-${string}`]: any; -} +}; + +export type TileProps = Omit & $Props; export default class Tile extends SvelteComponentTyped< TileProps, diff --git a/tests/e2e/carbon/types/Tile/TileGroup.svelte.d.ts b/tests/e2e/carbon/types/Tile/TileGroup.svelte.d.ts index 66c1da47..b84838e9 100644 --- a/tests/e2e/carbon/types/Tile/TileGroup.svelte.d.ts +++ b/tests/e2e/carbon/types/Tile/TileGroup.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["fieldset"]; -export interface TileGroupProps extends RestProps { +type $Props = { /** * Specify the selected tile value * @default undefined @@ -23,7 +23,9 @@ export interface TileGroupProps extends RestProps { legend?: string; [key: `data-${string}`]: any; -} +}; + +export type TileGroupProps = Omit & $Props; export default class TileGroup extends SvelteComponentTyped< TileGroupProps, diff --git a/tests/e2e/carbon/types/TimePicker/TimePicker.svelte.d.ts b/tests/e2e/carbon/types/TimePicker/TimePicker.svelte.d.ts index bebc5703..39f8c79f 100644 --- a/tests/e2e/carbon/types/TimePicker/TimePicker.svelte.d.ts +++ b/tests/e2e/carbon/types/TimePicker/TimePicker.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface TimePickerProps extends RestProps { +type $Props = { /** * Specify the size of the input * @default undefined @@ -95,7 +95,9 @@ export interface TimePickerProps extends RestProps { ref?: null | HTMLInputElement; [key: `data-${string}`]: any; -} +}; + +export type TimePickerProps = Omit & $Props; export default class TimePicker extends SvelteComponentTyped< TimePickerProps, diff --git a/tests/e2e/carbon/types/TimePicker/TimePickerSelect.svelte.d.ts b/tests/e2e/carbon/types/TimePicker/TimePickerSelect.svelte.d.ts index 89baf7a9..daa9f378 100644 --- a/tests/e2e/carbon/types/TimePicker/TimePickerSelect.svelte.d.ts +++ b/tests/e2e/carbon/types/TimePicker/TimePickerSelect.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface TimePickerSelectProps extends RestProps { +type $Props = { /** * Specify the select value * @default "" @@ -54,7 +54,9 @@ export interface TimePickerSelectProps extends RestProps { ref?: null | HTMLSelectElement; [key: `data-${string}`]: any; -} +}; + +export type TimePickerSelectProps = Omit & $Props; export default class TimePickerSelect extends SvelteComponentTyped< TimePickerSelectProps, diff --git a/tests/e2e/carbon/types/Toggle/Toggle.svelte.d.ts b/tests/e2e/carbon/types/Toggle/Toggle.svelte.d.ts index 82625fcd..ee06f1bd 100644 --- a/tests/e2e/carbon/types/Toggle/Toggle.svelte.d.ts +++ b/tests/e2e/carbon/types/Toggle/Toggle.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ToggleProps extends RestProps { +type $Props = { /** * Specify the toggle size * @default "default" @@ -53,7 +53,9 @@ export interface ToggleProps extends RestProps { name?: string; [key: `data-${string}`]: any; -} +}; + +export type ToggleProps = Omit & $Props; export default class Toggle extends SvelteComponentTyped< ToggleProps, diff --git a/tests/e2e/carbon/types/Toggle/ToggleSkeleton.svelte.d.ts b/tests/e2e/carbon/types/Toggle/ToggleSkeleton.svelte.d.ts index 49d2cfe3..82e02cf8 100644 --- a/tests/e2e/carbon/types/Toggle/ToggleSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/Toggle/ToggleSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ToggleSkeletonProps extends RestProps { +type $Props = { /** * Specify the toggle size * @default "default" @@ -23,7 +23,9 @@ export interface ToggleSkeletonProps extends RestProps { id?: string; [key: `data-${string}`]: any; -} +}; + +export type ToggleSkeletonProps = Omit & $Props; export default class ToggleSkeleton extends SvelteComponentTyped< ToggleSkeletonProps, diff --git a/tests/e2e/carbon/types/ToggleSmall/ToggleSmall.svelte.d.ts b/tests/e2e/carbon/types/ToggleSmall/ToggleSmall.svelte.d.ts index eab1f449..d269eb1e 100644 --- a/tests/e2e/carbon/types/ToggleSmall/ToggleSmall.svelte.d.ts +++ b/tests/e2e/carbon/types/ToggleSmall/ToggleSmall.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ToggleSmallProps extends RestProps { +type $Props = { /** * Set to `true` to toggle the checkbox input * @default false @@ -47,7 +47,9 @@ export interface ToggleSmallProps extends RestProps { name?: string; [key: `data-${string}`]: any; -} +}; + +export type ToggleSmallProps = Omit & $Props; export default class ToggleSmall extends SvelteComponentTyped< ToggleSmallProps, diff --git a/tests/e2e/carbon/types/ToggleSmall/ToggleSmallSkeleton.svelte.d.ts b/tests/e2e/carbon/types/ToggleSmall/ToggleSmallSkeleton.svelte.d.ts index 7a570c92..9504f55b 100644 --- a/tests/e2e/carbon/types/ToggleSmall/ToggleSmallSkeleton.svelte.d.ts +++ b/tests/e2e/carbon/types/ToggleSmall/ToggleSmallSkeleton.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface ToggleSmallSkeletonProps extends RestProps { +type $Props = { /** * Specify the label text * @default "" @@ -17,7 +17,9 @@ export interface ToggleSmallSkeletonProps extends RestProps { id?: string; [key: `data-${string}`]: any; -} +}; + +export type ToggleSmallSkeletonProps = Omit & $Props; export default class ToggleSmallSkeleton extends SvelteComponentTyped< ToggleSmallSkeletonProps, diff --git a/tests/e2e/carbon/types/Tooltip/Tooltip.svelte.d.ts b/tests/e2e/carbon/types/Tooltip/Tooltip.svelte.d.ts index 40e5eafe..75cf1bc8 100644 --- a/tests/e2e/carbon/types/Tooltip/Tooltip.svelte.d.ts +++ b/tests/e2e/carbon/types/Tooltip/Tooltip.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface TooltipProps extends RestProps { +type $Props = { /** * Set the alignment of the tooltip relative to the icon * @default "center" @@ -90,7 +90,9 @@ export interface TooltipProps extends RestProps { refIcon?: null | HTMLDivElement; [key: `data-${string}`]: any; -} +}; + +export type TooltipProps = Omit & $Props; export default class Tooltip extends SvelteComponentTyped< TooltipProps, diff --git a/tests/e2e/carbon/types/TooltipDefinition/TooltipDefinition.svelte.d.ts b/tests/e2e/carbon/types/TooltipDefinition/TooltipDefinition.svelte.d.ts index f4b4861e..6ed32a0a 100644 --- a/tests/e2e/carbon/types/TooltipDefinition/TooltipDefinition.svelte.d.ts +++ b/tests/e2e/carbon/types/TooltipDefinition/TooltipDefinition.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["div"]; -export interface TooltipDefinitionProps extends RestProps { +type $Props = { /** * Specify the tooltip text * @default "" @@ -35,7 +35,9 @@ export interface TooltipDefinitionProps extends RestProps { ref?: null | HTMLButtonElement; [key: `data-${string}`]: any; -} +}; + +export type TooltipDefinitionProps = Omit & $Props; export default class TooltipDefinition extends SvelteComponentTyped< TooltipDefinitionProps, diff --git a/tests/e2e/carbon/types/TooltipIcon/TooltipIcon.svelte.d.ts b/tests/e2e/carbon/types/TooltipIcon/TooltipIcon.svelte.d.ts index 383ecd49..69b5d0e5 100644 --- a/tests/e2e/carbon/types/TooltipIcon/TooltipIcon.svelte.d.ts +++ b/tests/e2e/carbon/types/TooltipIcon/TooltipIcon.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface TooltipIconProps extends RestProps { +type $Props = { /** * Specify the tooltip text. * Alternatively, use the "text" slot @@ -36,7 +36,9 @@ export interface TooltipIconProps extends RestProps { ref?: null | HTMLButtonElement; [key: `data-${string}`]: any; -} +}; + +export type TooltipIconProps = Omit & $Props; export default class TooltipIcon extends SvelteComponentTyped< TooltipIconProps, diff --git a/tests/e2e/carbon/types/UIShell/Content.svelte.d.ts b/tests/e2e/carbon/types/UIShell/Content.svelte.d.ts index 6ba58060..2b42c566 100644 --- a/tests/e2e/carbon/types/UIShell/Content.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/Content.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["main"]; -export interface ContentProps extends RestProps { +type $Props = { /** * Specify the id for the main element * @default "main-content" @@ -11,7 +11,9 @@ export interface ContentProps extends RestProps { id?: string; [key: `data-${string}`]: any; -} +}; + +export type ContentProps = Omit & $Props; export default class Content extends SvelteComponentTyped< ContentProps, diff --git a/tests/e2e/carbon/types/UIShell/GlobalHeader/Header.svelte.d.ts b/tests/e2e/carbon/types/UIShell/GlobalHeader/Header.svelte.d.ts index 05b40e1b..8872442c 100644 --- a/tests/e2e/carbon/types/UIShell/GlobalHeader/Header.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/GlobalHeader/Header.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface HeaderProps extends RestProps { +type $Props = { /** * Set to `false` to hide the side nav by default * @default true @@ -54,7 +54,9 @@ export interface HeaderProps extends RestProps { ref?: null | HTMLAnchorElement; [key: `data-${string}`]: any; -} +}; + +export type HeaderProps = Omit & $Props; export default class Header extends SvelteComponentTyped< HeaderProps, diff --git a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderAction.svelte.d.ts b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderAction.svelte.d.ts index d053f6d8..e5dd0120 100644 --- a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderAction.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderAction.svelte.d.ts @@ -9,7 +9,7 @@ export interface HeaderActionSlideTransition { type RestProps = SvelteHTMLElements["button"]; -export interface HeaderActionProps extends RestProps { +type $Props = { /** * Set to `true` to open the panel * @default false @@ -43,7 +43,9 @@ export interface HeaderActionProps extends RestProps { transition?: false | HeaderActionSlideTransition; [key: `data-${string}`]: any; -} +}; + +export type HeaderActionProps = Omit & $Props; export default class HeaderAction extends SvelteComponentTyped< HeaderActionProps, diff --git a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderActionLink.svelte.d.ts b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderActionLink.svelte.d.ts index 224d5af8..28dd783a 100644 --- a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderActionLink.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderActionLink.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface HeaderActionLinkProps extends RestProps { +type $Props = { /** * Set to `true` to use the active state * @default false @@ -29,7 +29,9 @@ export interface HeaderActionLinkProps extends RestProps { ref?: null | HTMLAnchorElement; [key: `data-${string}`]: any; -} +}; + +export type HeaderActionLinkProps = Omit & $Props; export default class HeaderActionLink extends SvelteComponentTyped< HeaderActionLinkProps, diff --git a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderActionSearch.svelte.d.ts b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderActionSearch.svelte.d.ts index cf1d3767..491fc988 100644 --- a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderActionSearch.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderActionSearch.svelte.d.ts @@ -1,12 +1,12 @@ import type { SvelteComponentTyped } from "svelte"; -export interface HeaderActionSearchProps { +export type HeaderActionSearchProps = { /** * Set to `true` to focus the search * @default false */ searchIsActive?: boolean; -} +}; export default class HeaderActionSearch extends SvelteComponentTyped< HeaderActionSearchProps, diff --git a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderNav.svelte.d.ts b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderNav.svelte.d.ts index 279088fc..cd29e102 100644 --- a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderNav.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderNav.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["nav"]; -export interface HeaderNavProps extends RestProps { +type $Props = { /** * Specify the ARIA label for the nav * @deprecated use "aria-label" instead @@ -12,7 +12,9 @@ export interface HeaderNavProps extends RestProps { ariaLabel?: string; [key: `data-${string}`]: any; -} +}; + +export type HeaderNavProps = Omit & $Props; export default class HeaderNav extends SvelteComponentTyped< HeaderNavProps, diff --git a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderNavItem.svelte.d.ts b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderNavItem.svelte.d.ts index 497c7002..4c5b6a14 100644 --- a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderNavItem.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderNavItem.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface HeaderNavItemProps extends RestProps { +type $Props = { /** * Specify the `href` attribute * @default undefined @@ -23,7 +23,9 @@ export interface HeaderNavItemProps extends RestProps { ref?: null | HTMLAnchorElement; [key: `data-${string}`]: any; -} +}; + +export type HeaderNavItemProps = Omit & $Props; export default class HeaderNavItem extends SvelteComponentTyped< HeaderNavItemProps, diff --git a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderNavMenu.svelte.d.ts b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderNavMenu.svelte.d.ts index cb792120..2bb5cf21 100644 --- a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderNavMenu.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderNavMenu.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface HeaderNavMenuProps extends RestProps { +type $Props = { /** * Set to `true` to toggle the expanded state * @default false @@ -35,7 +35,9 @@ export interface HeaderNavMenuProps extends RestProps { iconDescription?: string; [key: `data-${string}`]: any; -} +}; + +export type HeaderNavMenuProps = Omit & $Props; export default class HeaderNavMenu extends SvelteComponentTyped< HeaderNavMenuProps, diff --git a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelDivider.svelte.d.ts b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelDivider.svelte.d.ts index a2ff4fb7..60b74d6c 100644 --- a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelDivider.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelDivider.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface HeaderPanelDividerProps {} +export type HeaderPanelDividerProps = {}; export default class HeaderPanelDivider extends SvelteComponentTyped< HeaderPanelDividerProps, diff --git a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelLink.svelte.d.ts b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelLink.svelte.d.ts index 18a1f13e..618d53ac 100644 --- a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelLink.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelLink.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface HeaderPanelLinkProps extends RestProps { +type $Props = { /** * Specify the `href` attribute * @default undefined @@ -17,7 +17,9 @@ export interface HeaderPanelLinkProps extends RestProps { ref?: null | HTMLAnchorElement; [key: `data-${string}`]: any; -} +}; + +export type HeaderPanelLinkProps = Omit & $Props; export default class HeaderPanelLink extends SvelteComponentTyped< HeaderPanelLinkProps, diff --git a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelLinks.svelte.d.ts b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelLinks.svelte.d.ts index 3c3ece33..c898380f 100644 --- a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelLinks.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelLinks.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface HeaderPanelLinksProps {} +export type HeaderPanelLinksProps = {}; export default class HeaderPanelLinks extends SvelteComponentTyped< HeaderPanelLinksProps, diff --git a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderUtilities.svelte.d.ts b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderUtilities.svelte.d.ts index 8f26c9cd..277fa7f3 100644 --- a/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderUtilities.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderUtilities.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface HeaderUtilitiesProps {} +export type HeaderUtilitiesProps = {}; export default class HeaderUtilities extends SvelteComponentTyped< HeaderUtilitiesProps, diff --git a/tests/e2e/carbon/types/UIShell/HeaderGlobalAction.svelte.d.ts b/tests/e2e/carbon/types/UIShell/HeaderGlobalAction.svelte.d.ts index cb5c0286..d05ada32 100644 --- a/tests/e2e/carbon/types/UIShell/HeaderGlobalAction.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/HeaderGlobalAction.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface HeaderGlobalActionProps extends RestProps { +type $Props = { /** * Set to `true` to use the active variant * @default false @@ -23,7 +23,9 @@ export interface HeaderGlobalActionProps extends RestProps { ref?: null | HTMLButtonElement; [key: `data-${string}`]: any; -} +}; + +export type HeaderGlobalActionProps = Omit & $Props; export default class HeaderGlobalAction extends SvelteComponentTyped< HeaderGlobalActionProps, diff --git a/tests/e2e/carbon/types/UIShell/HeaderSearch.svelte.d.ts b/tests/e2e/carbon/types/UIShell/HeaderSearch.svelte.d.ts index 42eac9b7..6c405503 100644 --- a/tests/e2e/carbon/types/UIShell/HeaderSearch.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/HeaderSearch.svelte.d.ts @@ -9,7 +9,7 @@ export interface HeaderSearchResult { type RestProps = SvelteHTMLElements["input"]; -export interface HeaderSearchProps extends RestProps { +type $Props = { /** * Specify the search input value * @default "" @@ -41,7 +41,9 @@ export interface HeaderSearchProps extends RestProps { selectedResultIndex?: number; [key: `data-${string}`]: any; -} +}; + +export type HeaderSearchProps = Omit & $Props; export default class HeaderSearch extends SvelteComponentTyped< HeaderSearchProps, diff --git a/tests/e2e/carbon/types/UIShell/SideNav/SideNav.svelte.d.ts b/tests/e2e/carbon/types/UIShell/SideNav/SideNav.svelte.d.ts index 0ebf05ed..28d939cb 100644 --- a/tests/e2e/carbon/types/UIShell/SideNav/SideNav.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/SideNav/SideNav.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["nav"]; -export interface SideNavProps extends RestProps { +type $Props = { /** * Set to `true` to use the fixed variant * @default false @@ -23,7 +23,9 @@ export interface SideNavProps extends RestProps { isOpen?: boolean; [key: `data-${string}`]: any; -} +}; + +export type SideNavProps = Omit & $Props; export default class SideNav extends SvelteComponentTyped< SideNavProps, diff --git a/tests/e2e/carbon/types/UIShell/SideNav/SideNavItems.svelte.d.ts b/tests/e2e/carbon/types/UIShell/SideNav/SideNavItems.svelte.d.ts index 21b24162..c0816bd0 100644 --- a/tests/e2e/carbon/types/UIShell/SideNav/SideNavItems.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/SideNav/SideNavItems.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface SideNavItemsProps {} +export type SideNavItemsProps = {}; export default class SideNavItems extends SvelteComponentTyped< SideNavItemsProps, diff --git a/tests/e2e/carbon/types/UIShell/SideNav/SideNavLink.svelte.d.ts b/tests/e2e/carbon/types/UIShell/SideNav/SideNavLink.svelte.d.ts index 11c01ea9..ba9fdbf6 100644 --- a/tests/e2e/carbon/types/UIShell/SideNav/SideNavLink.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/SideNav/SideNavLink.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface SideNavLinkProps extends RestProps { +type $Props = { /** * Set to `true` to select the current link * @default false @@ -35,7 +35,9 @@ export interface SideNavLinkProps extends RestProps { ref?: null | HTMLAnchorElement; [key: `data-${string}`]: any; -} +}; + +export type SideNavLinkProps = Omit & $Props; export default class SideNavLink extends SvelteComponentTyped< SideNavLinkProps, diff --git a/tests/e2e/carbon/types/UIShell/SideNav/SideNavMenu.svelte.d.ts b/tests/e2e/carbon/types/UIShell/SideNav/SideNavMenu.svelte.d.ts index 2f1e57c7..9550bf9b 100644 --- a/tests/e2e/carbon/types/UIShell/SideNav/SideNavMenu.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/SideNav/SideNavMenu.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface SideNavMenuProps extends RestProps { +type $Props = { /** * Set to `true` to toggle the expanded state * @default false @@ -29,7 +29,9 @@ export interface SideNavMenuProps extends RestProps { ref?: null | HTMLButtonElement; [key: `data-${string}`]: any; -} +}; + +export type SideNavMenuProps = Omit & $Props; export default class SideNavMenu extends SvelteComponentTyped< SideNavMenuProps, diff --git a/tests/e2e/carbon/types/UIShell/SideNav/SideNavMenuItem.svelte.d.ts b/tests/e2e/carbon/types/UIShell/SideNav/SideNavMenuItem.svelte.d.ts index 8070aee1..8bed9ae2 100644 --- a/tests/e2e/carbon/types/UIShell/SideNav/SideNavMenuItem.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/SideNav/SideNavMenuItem.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface SideNavMenuItemProps extends RestProps { +type $Props = { /** * Set to `true` to select the item * @default undefined @@ -29,7 +29,9 @@ export interface SideNavMenuItemProps extends RestProps { ref?: null | HTMLAnchorElement; [key: `data-${string}`]: any; -} +}; + +export type SideNavMenuItemProps = Omit & $Props; export default class SideNavMenuItem extends SvelteComponentTyped< SideNavMenuItemProps, diff --git a/tests/e2e/carbon/types/UIShell/SkipToContent.svelte.d.ts b/tests/e2e/carbon/types/UIShell/SkipToContent.svelte.d.ts index 406c1bf9..386ee558 100644 --- a/tests/e2e/carbon/types/UIShell/SkipToContent.svelte.d.ts +++ b/tests/e2e/carbon/types/UIShell/SkipToContent.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface SkipToContentProps extends RestProps { +type $Props = { /** * Specify the `href` attribute * @default "#main-content" @@ -17,7 +17,9 @@ export interface SkipToContentProps extends RestProps { tabindex?: string; [key: `data-${string}`]: any; -} +}; + +export type SkipToContentProps = Omit & $Props; export default class SkipToContent extends SvelteComponentTyped< SkipToContentProps, diff --git a/tests/e2e/carbon/types/UnorderedList/UnorderedList.svelte.d.ts b/tests/e2e/carbon/types/UnorderedList/UnorderedList.svelte.d.ts index 2f873b65..824b3e39 100644 --- a/tests/e2e/carbon/types/UnorderedList/UnorderedList.svelte.d.ts +++ b/tests/e2e/carbon/types/UnorderedList/UnorderedList.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["ul"]; -export interface UnorderedListProps extends RestProps { +type $Props = { /** * Set to `true` to use the nested variant * @default false @@ -11,7 +11,9 @@ export interface UnorderedListProps extends RestProps { nested?: boolean; [key: `data-${string}`]: any; -} +}; + +export type UnorderedListProps = Omit & $Props; export default class UnorderedList extends SvelteComponentTyped< UnorderedListProps, diff --git a/tests/e2e/glob/types/button/Button.svelte.d.ts b/tests/e2e/glob/types/button/Button.svelte.d.ts index 109db87b..fc900647 100644 --- a/tests/e2e/glob/types/button/Button.svelte.d.ts +++ b/tests/e2e/glob/types/button/Button.svelte.d.ts @@ -14,7 +14,7 @@ export declare function findParentTreeNode( type RestProps = SvelteHTMLElements["button"]; -export interface ButtonProps extends RestProps { +type $Props = { /** * @default "button" */ @@ -26,7 +26,9 @@ export interface ButtonProps extends RestProps { primary?: boolean; [key: `data-${string}`]: any; -} +}; + +export type ButtonProps = Omit & $Props; export default class Button extends SvelteComponentTyped< ButtonProps, diff --git a/tests/e2e/multi-export-typed-ts-only/types/button/button.svelte.d.ts b/tests/e2e/multi-export-typed-ts-only/types/button/button.svelte.d.ts index 676d6a9a..e1f94e24 100644 --- a/tests/e2e/multi-export-typed-ts-only/types/button/button.svelte.d.ts +++ b/tests/e2e/multi-export-typed-ts-only/types/button/button.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface ButtonProps extends RestProps { +type $Props = { /** * @default "button" */ @@ -16,7 +16,9 @@ export interface ButtonProps extends RestProps { primary?: boolean; [key: `data-${string}`]: any; -} +}; + +export type ButtonProps = Omit & $Props; export default class Button extends SvelteComponentTyped< ButtonProps, diff --git a/tests/e2e/multi-export-typed-ts-only/types/link/link.svelte.d.ts b/tests/e2e/multi-export-typed-ts-only/types/link/link.svelte.d.ts index 2789b2bc..dd338dc9 100644 --- a/tests/e2e/multi-export-typed-ts-only/types/link/link.svelte.d.ts +++ b/tests/e2e/multi-export-typed-ts-only/types/link/link.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface LinkProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type LinkProps = Omit & $Props; export default class Link extends SvelteComponentTyped< LinkProps, diff --git a/tests/e2e/multi-export-typed-ts-only/types/quote/quote.svelte.d.ts b/tests/e2e/multi-export-typed-ts-only/types/quote/quote.svelte.d.ts index dd35ad44..632f16d0 100644 --- a/tests/e2e/multi-export-typed-ts-only/types/quote/quote.svelte.d.ts +++ b/tests/e2e/multi-export-typed-ts-only/types/quote/quote.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["blockquote"]; -export interface QuoteProps extends RestProps { +type $Props = { /** * @default "" */ @@ -15,7 +15,9 @@ export interface QuoteProps extends RestProps { author?: string; [key: `data-${string}`]: any; -} +}; + +export type QuoteProps = Omit & $Props; export default class Quote extends SvelteComponentTyped< QuoteProps, diff --git a/tests/e2e/multi-export-typed-ts-only/types/secondary-button/secondary-button.svelte.d.ts b/tests/e2e/multi-export-typed-ts-only/types/secondary-button/secondary-button.svelte.d.ts index 0cd8a612..d929a7c4 100644 --- a/tests/e2e/multi-export-typed-ts-only/types/secondary-button/secondary-button.svelte.d.ts +++ b/tests/e2e/multi-export-typed-ts-only/types/secondary-button/secondary-button.svelte.d.ts @@ -1,7 +1,7 @@ import type { SvelteComponentTyped } from "svelte"; import type { ButtonProps } from "../button/button.svelte"; -export interface SecondaryButtonProps extends ButtonProps {} +export type SecondaryButtonProps = ButtonProps & {}; export default class SecondaryButton extends SvelteComponentTyped< SecondaryButtonProps, diff --git a/tests/e2e/multi-export-typed/types/Button.svelte.d.ts b/tests/e2e/multi-export-typed/types/Button.svelte.d.ts index 676d6a9a..e1f94e24 100644 --- a/tests/e2e/multi-export-typed/types/Button.svelte.d.ts +++ b/tests/e2e/multi-export-typed/types/Button.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface ButtonProps extends RestProps { +type $Props = { /** * @default "button" */ @@ -16,7 +16,9 @@ export interface ButtonProps extends RestProps { primary?: boolean; [key: `data-${string}`]: any; -} +}; + +export type ButtonProps = Omit & $Props; export default class Button extends SvelteComponentTyped< ButtonProps, diff --git a/tests/e2e/multi-export-typed/types/Link.svelte.d.ts b/tests/e2e/multi-export-typed/types/Link.svelte.d.ts index 2789b2bc..dd338dc9 100644 --- a/tests/e2e/multi-export-typed/types/Link.svelte.d.ts +++ b/tests/e2e/multi-export-typed/types/Link.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface LinkProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type LinkProps = Omit & $Props; export default class Link extends SvelteComponentTyped< LinkProps, diff --git a/tests/e2e/multi-export-typed/types/Quote.svelte.d.ts b/tests/e2e/multi-export-typed/types/Quote.svelte.d.ts index dd35ad44..632f16d0 100644 --- a/tests/e2e/multi-export-typed/types/Quote.svelte.d.ts +++ b/tests/e2e/multi-export-typed/types/Quote.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["blockquote"]; -export interface QuoteProps extends RestProps { +type $Props = { /** * @default "" */ @@ -15,7 +15,9 @@ export interface QuoteProps extends RestProps { author?: string; [key: `data-${string}`]: any; -} +}; + +export type QuoteProps = Omit & $Props; export default class Quote extends SvelteComponentTyped< QuoteProps, diff --git a/tests/e2e/multi-export-typed/types/SecondaryButton.svelte.d.ts b/tests/e2e/multi-export-typed/types/SecondaryButton.svelte.d.ts index 042b9853..b188d1be 100644 --- a/tests/e2e/multi-export-typed/types/SecondaryButton.svelte.d.ts +++ b/tests/e2e/multi-export-typed/types/SecondaryButton.svelte.d.ts @@ -1,7 +1,7 @@ import type { SvelteComponentTyped } from "svelte"; import type { ButtonProps } from "./Button.svelte"; -export interface SecondaryButtonProps extends ButtonProps {} +export type SecondaryButtonProps = ButtonProps & {}; export default class SecondaryButton extends SvelteComponentTyped< SecondaryButtonProps, diff --git a/tests/e2e/multi-export/types/Button.svelte.d.ts b/tests/e2e/multi-export/types/Button.svelte.d.ts index e07f6fed..1c64c7c8 100644 --- a/tests/e2e/multi-export/types/Button.svelte.d.ts +++ b/tests/e2e/multi-export/types/Button.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface ButtonProps extends RestProps { +type $Props = { /** * @default "button" */ @@ -15,7 +15,9 @@ export interface ButtonProps extends RestProps { primary?: boolean; [key: `data-${string}`]: any; -} +}; + +export type ButtonProps = Omit & $Props; export default class Button extends SvelteComponentTyped< ButtonProps, diff --git a/tests/e2e/multi-export/types/Link.svelte.d.ts b/tests/e2e/multi-export/types/Link.svelte.d.ts index 2789b2bc..dd338dc9 100644 --- a/tests/e2e/multi-export/types/Link.svelte.d.ts +++ b/tests/e2e/multi-export/types/Link.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface LinkProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type LinkProps = Omit & $Props; export default class Link extends SvelteComponentTyped< LinkProps, diff --git a/tests/e2e/multi-export/types/Quote.svelte.d.ts b/tests/e2e/multi-export/types/Quote.svelte.d.ts index 10a7c60a..aec1a72e 100644 --- a/tests/e2e/multi-export/types/Quote.svelte.d.ts +++ b/tests/e2e/multi-export/types/Quote.svelte.d.ts @@ -5,7 +5,7 @@ export type Author = string; type RestProps = SvelteHTMLElements["blockquote"]; -export interface QuoteProps extends RestProps { +type $Props = { /** * @default "" */ @@ -17,7 +17,9 @@ export interface QuoteProps extends RestProps { author?: Author; [key: `data-${string}`]: any; -} +}; + +export type QuoteProps = Omit & $Props; export default class Quote extends SvelteComponentTyped< QuoteProps, diff --git a/tests/e2e/multi-export/types/nested/Header.svelte.d.ts b/tests/e2e/multi-export/types/nested/Header.svelte.d.ts index 8809450a..5e100108 100644 --- a/tests/e2e/multi-export/types/nested/Header.svelte.d.ts +++ b/tests/e2e/multi-export/types/nested/Header.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface HeaderProps {} +export type HeaderProps = {}; export default class Header extends SvelteComponentTyped< HeaderProps, diff --git a/tests/e2e/multi-folders/types/Link.svelte.d.ts b/tests/e2e/multi-folders/types/Link.svelte.d.ts index 2789b2bc..dd338dc9 100644 --- a/tests/e2e/multi-folders/types/Link.svelte.d.ts +++ b/tests/e2e/multi-folders/types/Link.svelte.d.ts @@ -3,9 +3,11 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface LinkProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type LinkProps = Omit & $Props; export default class Link extends SvelteComponentTyped< LinkProps, diff --git a/tests/e2e/multi-folders/types/Quote.svelte.d.ts b/tests/e2e/multi-folders/types/Quote.svelte.d.ts index 10a7c60a..aec1a72e 100644 --- a/tests/e2e/multi-folders/types/Quote.svelte.d.ts +++ b/tests/e2e/multi-folders/types/Quote.svelte.d.ts @@ -5,7 +5,7 @@ export type Author = string; type RestProps = SvelteHTMLElements["blockquote"]; -export interface QuoteProps extends RestProps { +type $Props = { /** * @default "" */ @@ -17,7 +17,9 @@ export interface QuoteProps extends RestProps { author?: Author; [key: `data-${string}`]: any; -} +}; + +export type QuoteProps = Omit & $Props; export default class Quote extends SvelteComponentTyped< QuoteProps, diff --git a/tests/e2e/multi-folders/types/components/Button.svelte.d.ts b/tests/e2e/multi-folders/types/components/Button.svelte.d.ts index 676d6a9a..e1f94e24 100644 --- a/tests/e2e/multi-folders/types/components/Button.svelte.d.ts +++ b/tests/e2e/multi-folders/types/components/Button.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface ButtonProps extends RestProps { +type $Props = { /** * @default "button" */ @@ -16,7 +16,9 @@ export interface ButtonProps extends RestProps { primary?: boolean; [key: `data-${string}`]: any; -} +}; + +export type ButtonProps = Omit & $Props; export default class Button extends SvelteComponentTyped< ButtonProps, diff --git a/tests/e2e/multi-folders/types/components/Card.svelte.d.ts b/tests/e2e/multi-folders/types/components/Card.svelte.d.ts index 072ff8ac..3f69c803 100644 --- a/tests/e2e/multi-folders/types/components/Card.svelte.d.ts +++ b/tests/e2e/multi-folders/types/components/Card.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface CardProps {} +export type CardProps = {}; export default class Card extends SvelteComponentTyped< CardProps, diff --git a/tests/e2e/multi-folders/types/nested/Header.svelte.d.ts b/tests/e2e/multi-folders/types/nested/Header.svelte.d.ts index 8809450a..5e100108 100644 --- a/tests/e2e/multi-folders/types/nested/Header.svelte.d.ts +++ b/tests/e2e/multi-folders/types/nested/Header.svelte.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface HeaderProps {} +export type HeaderProps = {}; export default class Header extends SvelteComponentTyped< HeaderProps, diff --git a/tests/e2e/single-export-default-only/types/Button.svelte.d.ts b/tests/e2e/single-export-default-only/types/Button.svelte.d.ts index 7c7691f4..42f91d00 100644 --- a/tests/e2e/single-export-default-only/types/Button.svelte.d.ts +++ b/tests/e2e/single-export-default-only/types/Button.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface ButtonProps extends RestProps { +type $Props = { /** * @default "button" */ @@ -15,7 +15,9 @@ export interface ButtonProps extends RestProps { primary?: boolean; [key: `data-${string}`]: any; -} +}; + +export type ButtonProps = Omit & $Props; export default class Button extends SvelteComponentTyped< ButtonProps, diff --git a/tests/e2e/single-export/types/Button.svelte.d.ts b/tests/e2e/single-export/types/Button.svelte.d.ts index 7c7691f4..42f91d00 100644 --- a/tests/e2e/single-export/types/Button.svelte.d.ts +++ b/tests/e2e/single-export/types/Button.svelte.d.ts @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["button"]; -export interface ButtonProps extends RestProps { +type $Props = { /** * @default "button" */ @@ -15,7 +15,9 @@ export interface ButtonProps extends RestProps { primary?: boolean; [key: `data-${string}`]: any; -} +}; + +export type ButtonProps = Omit & $Props; export default class Button extends SvelteComponentTyped< ButtonProps, diff --git a/tests/fixtures/anchor-props/output.d.ts b/tests/fixtures/anchor-props/output.d.ts index 76967468..21413ae2 100644 --- a/tests/fixtures/anchor-props/output.d.ts +++ b/tests/fixtures/anchor-props/output.d.ts @@ -3,8 +3,10 @@ import type { SvelteHTMLElements } from "svelte/elements"; type RestProps = SvelteHTMLElements["a"]; -export interface AnchorPropsProps extends RestProps { +type $Props = { [key: `data-${string}`]: any; -} +}; + +export type AnchorPropsProps = Omit & $Props; export default class AnchorProps extends SvelteComponentTyped, { default: {} }> {} diff --git a/tests/fixtures/bind-this-multiple/output.d.ts b/tests/fixtures/bind-this-multiple/output.d.ts index 64de191d..cfc0a4de 100644 --- a/tests/fixtures/bind-this-multiple/output.d.ts +++ b/tests/fixtures/bind-this-multiple/output.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface BindThisMultipleProps { +export type BindThisMultipleProps = { /** * @default undefined */ @@ -15,7 +15,7 @@ export interface BindThisMultipleProps { * @default false */ propBool?: boolean; -} +}; export default class BindThisMultiple extends SvelteComponentTyped< BindThisMultipleProps, diff --git a/tests/fixtures/bind-this/output.d.ts b/tests/fixtures/bind-this/output.d.ts index 316c81ea..d3dd10b7 100644 --- a/tests/fixtures/bind-this/output.d.ts +++ b/tests/fixtures/bind-this/output.d.ts @@ -1,10 +1,10 @@ import type { SvelteComponentTyped } from "svelte"; -export interface BindThisProps { +export type BindThisProps = { /** * @default undefined */ ref: null | HTMLButtonElement; -} +}; export default class BindThis extends SvelteComponentTyped, { default: {} }> {} diff --git a/tests/fixtures/component-comment-multi/output.d.ts b/tests/fixtures/component-comment-multi/output.d.ts index d6dd971c..70c80bbb 100644 --- a/tests/fixtures/component-comment-multi/output.d.ts +++ b/tests/fixtures/component-comment-multi/output.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface ComponentCommentMultiProps {} +export type ComponentCommentMultiProps = {}; /** * @example diff --git a/tests/fixtures/component-comment-single/output.d.ts b/tests/fixtures/component-comment-single/output.d.ts index c9c78fcd..7e985582 100644 --- a/tests/fixtures/component-comment-single/output.d.ts +++ b/tests/fixtures/component-comment-single/output.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface ComponentCommentSingleProps {} +export type ComponentCommentSingleProps = {}; /** Component comment */ export default class ComponentCommentSingle extends SvelteComponentTyped< diff --git a/tests/fixtures/context-module/output.d.ts b/tests/fixtures/context-module/output.d.ts index 148a709a..bb8438d4 100644 --- a/tests/fixtures/context-module/output.d.ts +++ b/tests/fixtures/context-module/output.d.ts @@ -20,7 +20,7 @@ export declare function b2(): () => {}; export declare function b3(): () => false; -export interface ContextModuleProps {} +export type ContextModuleProps = {}; export default class ContextModule extends SvelteComponentTyped, {}> { a: string; diff --git a/tests/fixtures/dispatched-events-dynamic/output.d.ts b/tests/fixtures/dispatched-events-dynamic/output.d.ts index 2524bf62..c8e6c02b 100644 --- a/tests/fixtures/dispatched-events-dynamic/output.d.ts +++ b/tests/fixtures/dispatched-events-dynamic/output.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface DispatchedEventsDynamicProps {} +export type DispatchedEventsDynamicProps = {}; export default class DispatchedEventsDynamic extends SvelteComponentTyped< DispatchedEventsDynamicProps, diff --git a/tests/fixtures/dispatched-events-typed/output.d.ts b/tests/fixtures/dispatched-events-typed/output.d.ts index 96312cdf..035dbf67 100644 --- a/tests/fixtures/dispatched-events-typed/output.d.ts +++ b/tests/fixtures/dispatched-events-typed/output.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface DispatchedEventsTypedProps {} +export type DispatchedEventsTypedProps = {}; export default class DispatchedEventsTyped extends SvelteComponentTyped< DispatchedEventsTypedProps, diff --git a/tests/fixtures/dispatched-events/output.d.ts b/tests/fixtures/dispatched-events/output.d.ts index 0e9cb018..fd8001c3 100644 --- a/tests/fixtures/dispatched-events/output.d.ts +++ b/tests/fixtures/dispatched-events/output.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface DispatchedEventsProps {} +export type DispatchedEventsProps = {}; export default class DispatchedEvents extends SvelteComponentTyped< DispatchedEventsProps, diff --git a/tests/fixtures/empty-export/output.d.ts b/tests/fixtures/empty-export/output.d.ts index f0e32c3a..31b46fc5 100644 --- a/tests/fixtures/empty-export/output.d.ts +++ b/tests/fixtures/empty-export/output.d.ts @@ -1,5 +1,5 @@ import type { SvelteComponentTyped } from "svelte"; -export interface EmptyExportProps {} +export type EmptyExportProps = {}; export default class EmptyExport extends SvelteComponentTyped, {}> {} diff --git a/tests/fixtures/forwarded-events/output.d.ts b/tests/fixtures/forwarded-events/output.d.ts index d0a6302f..0676b004 100644 --- a/tests/fixtures/forwarded-events/output.d.ts +++ b/tests/fixtures/forwarded-events/output.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface ForwardedEventsProps {} +export type ForwardedEventsProps = {}; export default class ForwardedEvents extends SvelteComponentTyped< ForwardedEventsProps, diff --git a/tests/fixtures/function-declaration/output.d.ts b/tests/fixtures/function-declaration/output.d.ts index 27df055b..02e8f516 100644 --- a/tests/fixtures/function-declaration/output.d.ts +++ b/tests/fixtures/function-declaration/output.d.ts @@ -1,11 +1,11 @@ import type { SvelteComponentTyped } from "svelte"; -export interface FunctionDeclarationProps { +export type FunctionDeclarationProps = { /** * @default () => {} */ fnA?: () => {}; -} +}; export default class FunctionDeclaration extends SvelteComponentTyped< FunctionDeclarationProps, diff --git a/tests/fixtures/generics-multiple/output.d.ts b/tests/fixtures/generics-multiple/output.d.ts index 2cb64761..9f2e49b8 100644 --- a/tests/fixtures/generics-multiple/output.d.ts +++ b/tests/fixtures/generics-multiple/output.d.ts @@ -12,7 +12,7 @@ export interface DataTableHeader { value: Header; } -export interface GenericsMultipleProps { +export type GenericsMultipleProps = { /** * @default [] */ @@ -22,7 +22,7 @@ export interface GenericsMultipleProps { * @default [] */ rows?: ReadonlyArray; -} +}; export default class GenericsMultiple< Row extends DataTableRow = DataTableRow, diff --git a/tests/fixtures/generics-with-rest-props/Test.svelte b/tests/fixtures/generics-with-rest-props/Test.svelte new file mode 100644 index 00000000..9145677b --- /dev/null +++ b/tests/fixtures/generics-with-rest-props/Test.svelte @@ -0,0 +1,50 @@ + + + + {#each rows as row} + {row.name} + {row.port} + {/each} + + + + {#each rows as row} + {row.name} + {/each} + diff --git a/tests/fixtures/generics-with-rest-props/input.svelte b/tests/fixtures/generics-with-rest-props/input.svelte new file mode 100644 index 00000000..85ab904d --- /dev/null +++ b/tests/fixtures/generics-with-rest-props/input.svelte @@ -0,0 +1,19 @@ + + +
+ +
diff --git a/tests/fixtures/generics-with-rest-props/output.d.ts b/tests/fixtures/generics-with-rest-props/output.d.ts new file mode 100644 index 00000000..835db652 --- /dev/null +++ b/tests/fixtures/generics-with-rest-props/output.d.ts @@ -0,0 +1,38 @@ +import type { SvelteComponentTyped } from "svelte"; +import type { SvelteHTMLElements } from "svelte/elements"; + +export interface DataTableRow { + id: string | number; + [key: string]: any; +} + +export type DataTableKey = Exclude; + +export interface DataTableHeader { + key: DataTableKey; + value: string; +} + +type RestProps = SvelteHTMLElements["div"]; + +type $Props = { + /** + * @default [] + */ + headers?: ReadonlyArray>; + + /** + * @default [] + */ + rows?: ReadonlyArray; + + [key: `data-${string}`]: any; +}; + +export type GenericsWithRestPropsProps = Omit> & $Props; + +export default class GenericsWithRestProps extends SvelteComponentTyped< + GenericsWithRestPropsProps, + Record, + { default: { headers: ReadonlyArray>; rows: ReadonlyArray } } +> {} diff --git a/tests/fixtures/generics-with-rest-props/output.json b/tests/fixtures/generics-with-rest-props/output.json new file mode 100644 index 00000000..71f7f0ca --- /dev/null +++ b/tests/fixtures/generics-with-rest-props/output.json @@ -0,0 +1,60 @@ +{ + "props": [ + { + "name": "headers", + "kind": "let", + "type": "ReadonlyArray>", + "value": "[]", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "rows", + "kind": "let", + "type": "ReadonlyArray", + "value": "[]", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + } + ], + "moduleExports": [], + "slots": [ + { + "name": "__default__", + "default": true, + "slot_props": "{ headers: ReadonlyArray>, rows: ReadonlyArray }" + } + ], + "events": [], + "typedefs": [ + { + "type": "{ id: string | number; [key: string]: any; }", + "name": "DataTableRow", + "ts": "interface DataTableRow { id: string | number; [key: string]: any; }" + }, + { + "type": "Exclude", + "name": "DataTableKey", + "ts": "type DataTableKey = Exclude" + }, + { + "type": "{ key: DataTableKey; value: string; }", + "name": "DataTableHeader", + "ts": "interface DataTableHeader { key: DataTableKey; value: string; }" + } + ], + "generics": [ + "Row", + "Row extends DataTableRow = DataTableRow" + ], + "rest_props": { + "type": "Element", + "name": "div" + } +} \ No newline at end of file diff --git a/tests/fixtures/generics/output.d.ts b/tests/fixtures/generics/output.d.ts index 71f39570..de8f131a 100644 --- a/tests/fixtures/generics/output.d.ts +++ b/tests/fixtures/generics/output.d.ts @@ -12,7 +12,7 @@ export interface DataTableHeader { value: string; } -export interface GenericsProps { +export type GenericsProps = { /** * @default [] */ @@ -22,7 +22,7 @@ export interface GenericsProps { * @default [] */ rows?: ReadonlyArray; -} +}; export default class Generics extends SvelteComponentTyped< GenericsProps, diff --git a/tests/fixtures/infer-basic/output.d.ts b/tests/fixtures/infer-basic/output.d.ts index 762c4438..e059f95a 100644 --- a/tests/fixtures/infer-basic/output.d.ts +++ b/tests/fixtures/infer-basic/output.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface InferBasicProps { +export type InferBasicProps = { /** * @default null */ @@ -25,7 +25,7 @@ export interface InferBasicProps { * @default "" + Math.random().toString(36) */ id?: string; -} +}; export default class InferBasic extends SvelteComponentTyped, { default: {} }> { propConst: { ["1"]: true }; diff --git a/tests/fixtures/infer-with-types/output.d.ts b/tests/fixtures/infer-with-types/output.d.ts index 597f40b6..7a21d858 100644 --- a/tests/fixtures/infer-with-types/output.d.ts +++ b/tests/fixtures/infer-with-types/output.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface InferWithTypesProps { +export type InferWithTypesProps = { /** * @default true */ @@ -20,7 +20,7 @@ export interface InferWithTypesProps { * @default "" + Math.random().toString(36) */ id?: string; -} +}; export default class InferWithTypes extends SvelteComponentTyped< InferWithTypesProps, diff --git a/tests/fixtures/input-events/output.d.ts b/tests/fixtures/input-events/output.d.ts index 76d075ec..26cf5d1c 100644 --- a/tests/fixtures/input-events/output.d.ts +++ b/tests/fixtures/input-events/output.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface InputEventsProps {} +export type InputEventsProps = {}; export default class InputEvents extends SvelteComponentTyped< InputEventsProps, diff --git a/tests/fixtures/mixed-events/output.d.ts b/tests/fixtures/mixed-events/output.d.ts index b5f6ea50..25d769f7 100644 --- a/tests/fixtures/mixed-events/output.d.ts +++ b/tests/fixtures/mixed-events/output.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface MixedEventsProps {} +export type MixedEventsProps = {}; export default class MixedEvents extends SvelteComponentTyped< MixedEventsProps, diff --git a/tests/fixtures/no-props/input.svelte b/tests/fixtures/no-props/input.svelte new file mode 100644 index 00000000..a8beed51 --- /dev/null +++ b/tests/fixtures/no-props/input.svelte @@ -0,0 +1 @@ +
diff --git a/tests/fixtures/no-props/output.d.ts b/tests/fixtures/no-props/output.d.ts new file mode 100644 index 00000000..c1b1cb11 --- /dev/null +++ b/tests/fixtures/no-props/output.d.ts @@ -0,0 +1,5 @@ +import type { SvelteComponentTyped } from "svelte"; + +export type NoPropsProps = {}; + +export default class NoProps extends SvelteComponentTyped, {}> {} diff --git a/tests/fixtures/no-props/output.json b/tests/fixtures/no-props/output.json new file mode 100644 index 00000000..78a46af2 --- /dev/null +++ b/tests/fixtures/no-props/output.json @@ -0,0 +1,8 @@ +{ + "props": [], + "moduleExports": [], + "slots": [], + "events": [], + "typedefs": [], + "generics": null +} \ No newline at end of file diff --git a/tests/fixtures/prop-comments/output.d.ts b/tests/fixtures/prop-comments/output.d.ts index 4631f313..d2acff8e 100644 --- a/tests/fixtures/prop-comments/output.d.ts +++ b/tests/fixtures/prop-comments/output.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface PropCommentsProps { +export type PropCommentsProps = { /** * This is a comment. * @see https://github.com/ @@ -20,7 +20,7 @@ export interface PropCommentsProps { * @default true */ prop2?: boolean | string; -} +}; export default class PropComments extends SvelteComponentTyped< PropCommentsProps, diff --git a/tests/fixtures/renamed-props/output.d.ts b/tests/fixtures/renamed-props/output.d.ts index 481d023e..a22b6bf9 100644 --- a/tests/fixtures/renamed-props/output.d.ts +++ b/tests/fixtures/renamed-props/output.d.ts @@ -1,11 +1,11 @@ import type { SvelteComponentTyped } from "svelte"; -export interface RenamedPropsProps { +export type RenamedPropsProps = { /** * Just your average CSS class string. * @default "test" */ class?: string | null; -} +}; export default class RenamedProps extends SvelteComponentTyped, {}> {} diff --git a/tests/fixtures/required/output.d.ts b/tests/fixtures/required/output.d.ts index 6c256809..56d5ce2f 100644 --- a/tests/fixtures/required/output.d.ts +++ b/tests/fixtures/required/output.d.ts @@ -1,6 +1,6 @@ import type { SvelteComponentTyped } from "svelte"; -export interface RequiredProps { +export type RequiredProps = { /** * @required * @default true @@ -23,7 +23,7 @@ export interface RequiredProps { * @default undefined */ prop3: boolean; -} +}; export default class Required extends SvelteComponentTyped< RequiredProps, diff --git a/tests/fixtures/rest-props-multiple/input.svelte b/tests/fixtures/rest-props-multiple/input.svelte index 1e73800b..9ea10c6f 100644 --- a/tests/fixtures/rest-props-multiple/input.svelte +++ b/tests/fixtures/rest-props-multiple/input.svelte @@ -1,14 +1,11 @@ -{#if edit} -