Skip to content

TS error: not detecting that children are allowed #329

@mhkeller

Description

@mhkeller

You can see this in the layercake-template repo if you hover over the Svg layout component:

Image

It looks like it comes from the type definition where [x: string]: never; instead of () => any. These types are auto-generated so I'm not sure what the right fix is here. I tried making children required but that didn't change the auto-generated types file.

/** @typedef {typeof __propDef.props}  SvgProps */
/** @typedef {typeof __propDef.events}  SvgEvents */
/** @typedef {typeof __propDef.slots}  SvgSlots */
/** SVG layout component */
export default class Svg extends SvelteComponentTyped<{
    [x: string]: never;
}, {
    [evt: string]: CustomEvent<any>;
}, {}> {
}
export type SvgProps = typeof __propDef.props;
export type SvgEvents = typeof __propDef.events;
export type SvgSlots = typeof __propDef.slots;
import { SvelteComponentTyped } from "svelte";
declare const __propDef: {
    props: {
        [x: string]: never;
    };
    events: {
        [evt: string]: CustomEvent<any>;
    };
    slots: {};
};
export {};

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingunder-investigationNot yet classified. Needs some more info...

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions