-
Hi, I have this code:
Typescript will give this error:
how to avoid this error message? Thanks, |
Beta Was this translation helpful? Give feedback.
Answered by
arnoson
May 19, 2023
Replies: 1 comment
-
You won't get these issues with a normal object: createApp({ $delimiters: ['${', '}'] }).mount() If you have to use a class, you have to either use a field initializer class MyApp {
$delimiters = ['${', '}']
} or define the class MyApp {
$delimiters: string[]
constructor() {
this.$delimiters = ['${', '}']
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sqllyw
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You won't get these issues with a normal object:
If you have to use a class, you have to either use a field initializer
or define the
$delimiters
field