pxt icon indicating copy to clipboard operation
pxt copied to clipboard

Implement "satisfies" operator in Static TypeScript

Open SoCuul opened this issue 7 months ago • 0 comments

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.

SoCuul avatar May 24 '25 13:05 SoCuul