Typescript: [Suggestion] Allow @ts-ignore at the end of the same line

Created on 17 Nov 2017  路  4Comments  路  Source: microsoft/TypeScript

I added a comment in https://github.com/Microsoft/TypeScript/pull/18457#issuecomment-339097980 but I think that nobody saw it.

It would be nice if I could put the @ts-ignore at the same line, to leave the code more readable

let v1: string = 1; // @ts-ignore
let v2: string = 2; // @ts-ignore
let v3: string = 3; // @ts-ignore
let v4: string = 4; // @ts-ignore
let v5: string = 5; // @ts-ignore
let v6: string = 6; // @ts-ignore

instead of:

// @ts-ignore
let v1: string = 1;
// @ts-ignore
let v2: string = 2;
// @ts-ignore
let v3: string = 3;
// @ts-ignore
let v4: string = 4;
// @ts-ignore
let v5: string = 5;
// @ts-ignore
let v6: string = 6;
In Discussion Suggestion

Most helpful comment

@DanielRosenwasser is it possible to include the feature into the upcoming 3.8 iteration?

All 4 comments

Would be great, but I think having a separate syntax, eg. @ts-ignore-line would be safer as there would not be any doubt about swallowing errors for the next line.

// @ts-skip

@DanielRosenwasser is it possible to include the feature into the upcoming 3.8 iteration?

Still nothing on this...?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nitzantomer picture nitzantomer  路  135Comments

metaweta picture metaweta  路  140Comments

rbuckton picture rbuckton  路  139Comments

chanon picture chanon  路  138Comments

disshishkov picture disshishkov  路  224Comments