Strip optional markers from TypeScript

Fixed the compiler to remove the `?` from optional TypeScript parameters (like `x?: string`) in `<script lang="ts">` blocks, while preserving optional chaining operators (like `x?.length`). This ensures generated JavaScript is valid after upgrading to esrap@2.2.12.