I am new to TypeScript trying to play with it. But I face a wired problem. When I try to concatenate two String type using + operator it's give an error that is
Operator '+' cannot be applied to types 'String' and 'String'
My Code snap is
var firstName: String = 'Foo';
var lastName: String = 'Bar';
var name = firstName + lastName;
If I use string instead String or add extra ''it works fine. I checked, within JavaScript we can use + on two String object then why it's show error in TypeScript ? Is it bug or feature ? I definitely missing something. Detail explanation appreciated.