From 8df74f44bc99a7cdd8060957ccd96b53b321ce64 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 95064b2a147..c42bf971b6c 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: