Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix typo
  • Loading branch information
giuliojiang authored Oct 18, 2018
commit 8c7cb40ca3dede6d457cd304fe432782fe8be327
2 changes: 1 addition & 1 deletion docs/template-strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function htmlEscape(literals: TemplateStringsArray, ...placeholders: string[]) {
return result;
}
```
> Note: You can annotate `placeholders` to be any `[]`. Whetever you annotate it as, TypeScript will type check to make sure the placeholders used to call the tag match the annotation. For example if you expect to deal with `string` or `number`s you can annotate `...placeholders:(string | number)[]`
> Note: You can annotate `placeholders` to be any `[]`. Whatever you annotate it as, TypeScript will type check to make sure the placeholders used to call the tag match the annotation. For example if you expect to deal with `string` or `number`s you can annotate `...placeholders:(string | number)[]`

#### Generated JS
For pre ES6 compile targets the code is fairly simple. Multiline strings become escaped strings. String interpolation becomes *string concatenation*. Tagged Templates become function calls.
Expand Down