mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
feat(typescript)!: support svelte 4 (#1773)
Closes #1753 The minimum Svelte version required for TypeScript users is now 3.55.
This commit is contained in:
parent
778b2c357f
commit
2f026f792a
192 changed files with 941 additions and 712 deletions
9
types/Grid/Column.svelte.d.ts
vendored
9
types/Grid/Column.svelte.d.ts
vendored
|
@ -1,5 +1,5 @@
|
|||
/// <reference types="svelte" />
|
||||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
export type ColumnSize = boolean | number;
|
||||
|
||||
|
@ -10,8 +10,9 @@ export interface ColumnSizeDescriptor {
|
|||
|
||||
export type ColumnBreakpoint = ColumnSize | ColumnSizeDescriptor;
|
||||
|
||||
export interface ColumnProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
||||
type RestProps = SvelteHTMLElements["div"];
|
||||
|
||||
export interface ColumnProps extends RestProps {
|
||||
/**
|
||||
* Set to `true` to render a custom HTML element
|
||||
* Props are destructured as `props` in the default slot (e.g., <Column let:props><article {...props}>...</article></Column>)
|
||||
|
@ -84,6 +85,6 @@ export interface ColumnProps
|
|||
|
||||
export default class Column extends SvelteComponentTyped<
|
||||
ColumnProps,
|
||||
{},
|
||||
Record<string, any>,
|
||||
{ default: { props: { class: string; [key: string]: any } } }
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue