Skip to content

isSnippet() function #14017

@webJose

Description

@webJose

Describe the problem

We use a class that accepts (or tries to, at least) 3 types of content in its content property:

  • A component
  • A snippet
  • A single-spa parcel

The class used to work fine with custom isSnippet and isParcel functions. The former one was working by checking the content was an object that had a render function. This seems to have changed now. It seems that snippets are now (also?) functions.

Describe the proposed solution

Instead of us, mere mortals, having to guess what constitutes a snippet, it would be nice if Svelte provided us with an isSnippet() function that would always be accurate. Taking out the guesswork is the main concern here.

Importance

would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions