Skip to content

Allow attaching a comment before all non-user injected code. #13455

Closed

Description

Some emitted code results in reduced coverage reports (see #13029, or example below).

To combat this, it would be nice to have a feature similar to the auxiliaryCommentBefore in Babel, which adds a comment of choice before all non-user injected code.

When set, say with Istanbul, to 'istanbul ignore next', such auxiliary transpiled code will not be part of the coverage report.

Example

This:

constructor( x: number, y: number, w: number, h: number ) {
    super(); // <- 'Branch not covered'.
    this.rect = new Rect( x, y, w, h);
}

transpiles to this:

var _this = _super.call(this) || this; // <- || this is not covered. Why would it?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions