8000 Allow component fields to be declared `const` (Think PropTypes in React) · Issue #880 · sveltejs/svelte · GitHub
[go: up one dir, main page]

Skip to content
Allow component fields to be declared const (Think PropTypes in React) #880
Closed
@maxamante

Description

@maxamante

Recently, I've implemented a component that has a field that needs to be declared const. Ideally, this field would be set on create and all changes to it would be thrown away. @TehShrike expressed in Gitter the desire for functionality like PropTypes/duck-type checking. At the suggestion, I thought of 'PropAttrs', that would allow a user to declare the field's desired properties and Svelte would perform checks on create/update. Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0