Microsoft/TypeScript

Comments on inner properties are stripped

Aperta

#10.383 aperta il 17 ago 2016

 (3 commenti) (0 reazioni) (0 assegnatari)TypeScript (13.395 fork)batch import
Help WantedSuggestion

Metriche repository

Star
 (108.860 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

TS: 2.0.0

// code.ts
/**
 * Some foo
 */
export const foo = {
  /**
   * Some boo
   */
  boo = 0
}

expect:

// code.d.ts
/**
 * Some foo
 */
export declare foo: {
  /**
   * Some boo
   */
  boo: number;
}

actual:

// code.d.ts
/**
 * Some foo
 */
export declare foo: {
  boo: number;
}

By the way, is there a way to separately control whether comment should be kept in *.d.ts and *.js?

Currently when tsconfig.json/compilerOptions/removeComments = true, comments are removed from both of them.

Would it be nice to keep the comments in *.d.ts but not *.js?

Guida contributor