When utilizing TypeScript, you have the ability to create template literal types such as:
type Paragraph = `${string}\n`;
const paragraph: Paragraph = 'foo\n'; // valid
const word: Paragraph = 'foo'; // invalid
But can you define a type that is the opposite? Meaning, a string that does not end with a newline character:
type NotParagraph = `???`;
const paragraph: NotParagraph = 'foo\n'; // invalid
const word: NotParagraph = 'foo'; // valid