Error "requires an imported helper but module 'tslib' cannot be found" when using ES2015 modules in TypeScript
Hello everyone! I'm new to TypeScript and trying to set up a project. I have a simple index.ts file with this code:
```typescript
class User {
constructor(public name: string, public age: number) {}
greet() {
return `Hello, my name is ${this.name}`;
}
}
const user = new User("Anna", 25);
console.log(user.greet());
```
In my tsconfig.json I specified:
```json
{
"compilerOptions": {
"target": "ES5",
"module": "ES2015",
"outDir": "./dist",
"strict": true
}
}
```
When I run compilation via `tsc`, I get this error:
```
error TS2802: This syntax requires an imported helper but module 'tslib' cannot be found.
```
I've googled this error but don't fully understand what "imported helper" means and wh