Releases: carbon-design-system/sveld
Releases · carbon-design-system/sveld
v0.11.0
Features
-
support writing
<!-- @component -->
comments in Svelte components to TypeScript definitionsInput:
<!-- @component @example <Button> Text </Button> --> <button> <slot /> </button>
Output:
/** * @example * <Button> * Text * </Button> */ export default class Button extends SvelteComponentTyped<ButtonProps, {}, { default: {} }> {}
v0.10.2
Fixes
- tolerate slot spread syntax (
<slot {...props} />
) when parsing Svelte components
Note: the parser will not attempt to infer the type of spread attributes. Add a JSDoc notation if spreading an object to a slot:
<script>
/** @slot {{ a: number; }} */
const props = {
a: 4,
};
</script>
<slot {...props} />