Microsoft/TypeScript

Comments on inner properties are stripped

Open

#10 383 ouverte le 17 août 2016

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)TypeScript (6 726 forks)batch import
Help WantedSuggestion

Métriques du dépôt

Stars
 (48 455 stars)
Métriques de merge PR
 (Merge moyen 6j 17h) (9 PRs mergées en 30 j)

Description

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?

Guide contributeur