Skip to content

Commit

Permalink
Add intersection type example
Browse files Browse the repository at this point in the history
  • Loading branch information
ulrichb committed Apr 14, 2020
1 parent 8d74671 commit fde1f38
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -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:
Expand Down

0 comments on commit fde1f38

Please sign in to comment.