#"This regular expression flag is only available when targeting 'es2018' or later." and I am

16 messages · Page 1 of 1 (latest)

proud sandal
#

I'm getting this error message despite targeting es2018. I've also tried targeting esnext. I'm trying to use the "s" flag.

#

Using Typescript 5.8.2

#

The error is not produced after switching to v5.7

quaint pivot
#

Can't seem to reproduce on the playground:

molten citrusBOT
#
retsam19#0

Preview:ts const example = /foo/s

proud sandal
#

I haven’t created a min reproduction of the issue. I just installed 5.8 in a project, got this error despite the target being set correctly, then switched to 5.7 and the error went away. If no one can reproduce it it’s okay with me to close this.

vocal tree
#

where are you getting the error

#

ide, command line?

#

if the latter, what command are you running?

proud sandal
#

npx tsc from the command line

#

I’ll see if I can make a min reproduction today. Any tips on how best to do that? typescript playground?

vocal tree
#

perhaps try locally first, might be something specific to do with your environment

#

then try to replicate that on the playground?

vocal tree
proud sandal
#

I'm not able to reproduce it now