Raise a warning is a slot is typed

Created on 8 March 2025, about 1 month ago

Problem/Motivation

Some SDC authors are typing slots:

slots:
  content:
    type: string
    description: Message content.

Maybe because they are confusing them with props, maybe because they are nostalgic of UI Patterns 1.x ;)

Slots are, by design, never typed.

Proposed resolution

Raise a warning is type property is find in a slot definition:

  • alert: "Don't type slots."
  • tip: ""

(as usual, I fell I am bad at proposing alert & tip messages, so feel free to add your own if you find better)

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇫🇷France pdureau Paris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024