TSConfig

stripInternal

Do not emit declarations for code that has an @internal annotation in its JSDoc comment. This is an internal compiler option; use at your own risk, because the compiler does not check that the result is valid. If you are searching for a tool to handle additional levels of visibility within your d.ts files, look at api-extractor.

ts
/**
* Days available in a week
* @internal
*/
export const daysInAWeek = 7;
 
/** Calculate how much someone earns in a week */
export function weeklySalary(dayRate: number) {
return daysInAWeek * dayRate;
}
Try

With the flag set to false (default):

ts
/**
* Days available in a week
* @internal
*/
export declare const daysInAWeek = 7;
/** Calculate how much someone earns in a week */
export declare function weeklySalary(dayRate: number): number;
 
Try

With stripInternal set to true the d.ts emitted will be redacted.

ts
/** Calculate how much someone earns in a week */
export declare function weeklySalary(dayRate: number): number;
 
Try

The JavaScript output is still the same.