Here is a code snippet I'm working with:
You can view and interact with the code on the Typescript Playground.
// this class is imported by the validator.ts module
class EWC extends Error {
constructor(public message: str...
When working with the assertValidString
function, there seems to be an issue where the type of the str
argument changes to unknown
after a certain point, causing errors later in the code. This is puzzling and I'm seeking clarity on this matter. Any insights based on your expertise with Typescript would be greatly appreciated. Thank you for your help!
Apologies for any language shortcomings. Many thanks in advance <3.