Skip to content

type of attrs is not expected #562

@popolan1986

Description

@popolan1986
interface Data {
  [key: string]: unknown
}

interface SetupContext {
  attrs: Data
  slots: Slots
  emit: (event: string, ...args: unknown[]) => void
}

However, the type of attrs is Record<string, string>

interface SetupContext {
    readonly attrs: Record<string, string>;
    readonly slots: {
        [key: string]: (...args: any[]) => VNode[];
    };
    readonly parent: ComponentInstance | null;
    readonly root: ComponentInstance;
    readonly listeners: {
        [key: string]: Function;
    };
    emit(event: string, ...args: any[]): void;
}

Metadata

Metadata

Assignees

Labels

contribution welcomeThe team would welcome a contribution from the community for this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions