From fde1f3884fe1e500903fa61f5e62cdc4db24b9ac 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..39ae18da20aa 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: