From b82ca118444cf81124238cf0dd954b43a087273f Mon Sep 17 00:00:00 2001 From: Ulrich Buchgraber Date: Tue, 14 Apr 2020 16:53:57 +0200 Subject: [PATCH] Add intersection type example --- .../eslint-plugin/docs/rules/restrict-template-expressions.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/eslint-plugin/docs/rules/restrict-template-expressions.md b/packages/eslint-plugin/docs/rules/restrict-template-expressions.md index 95064b2a147e..658870080b43 100644 --- a/packages/eslint-plugin/docs/rules/restrict-template-expressions.md +++ b/packages/eslint-plugin/docs/rules/restrict-template-expressions.md @@ -6,6 +6,9 @@ Examples of **correct** code: const arg = 'foo'; const msg1 = `arg = ${arg}`; const msg2 = `arg = ${arg || 'default'}`; + +const stringWithKind: string & { kind?: "MyString" } = 'foo'; +const msg1 = `arg = ${stringWithKind}`; ``` Examples of **incorrect** code: