Skip to content

'extends' is not compiling when used inside declaration file and importHelpers option is switched on #12724

@Nipheris

Description

@Nipheris

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.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issueHigh Priority

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions