TS1002

error TS1002: Unterminated string literal.

Broken Code ❌

1
const text = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr

Fixed Code ✔️

You have to close the string literal with an ending ':

1
const text = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr';

If you want to support multiline text, then you would have to use string concatenation:

1
2
const text = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, ' +
'sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.';

Another solution would be using a template literal:

1
2
const text = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, 
sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.`;