TypeScript: 'extends' is not compiling when used inside declaration file and importHelpers option is switched on
TypeScript Version: 2.1.4 / 2.2.0-dev.20161207
Code
interface Animal {
type: string;
}
export declare class Pet implements Animal {
public type: string;
public name: string;
constructor();
}
export declare class Dog extends Pet {
public breed: string;
constructor();
}
Expected behavior: Compiles successfully.
Actual behavior: Compilation fails with the following error:
error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found.
The same source code compiles fine on TypeScript 2.1.1. Installed tslib package has version 1.2.0.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 9
- Comments: 19 (11 by maintainers)
thanks @schmuli for the repro, fix up in https://github.com/Microsoft/TypeScript/pull/13189/files