Skip to content

Implement "satisfies" operator in Static TypeScript #10600

Open
@SoCuul

Description

@SoCuul

Feature request template

Is your feature request related to a problem? Please describe.
It would be very nice to be able to use the satisfies operator within PXT projects, as it would finally provide an alternative to as without casting to the specific type.

Describe the solution you'd like
The satisfies operator being implemented into the Static TypeScript compiler, and working similar to the as operator that currently is available for use in PXT.

Describe alternatives you've considered
The only alternative is to use the as keyword, which will cast the value to a different type, potentially causing issues.

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