When writing or updating .d.ts files, follow idiomatic TypeScript conventions to keep type declarations concise and consistent:
export { ColorInfo, ColorSupport, ColorSupportLevel } from 'supports-color';) rather than inlining or copying type bodies. Group these re-exports together, typically at the bottom of the file.readonly when the underlying value is not meant to be mutated, e.g. export const modifiers: readonly Modifiers[];.interface Chalk {
rgb(r: number, g: number, b: number): Chalk;
}
over
interface Chalk {
rgb: (r: number, g: number, b: number) => Chalk;
}
Following these conventions reduces duplication, keeps declaration files easier to maintain, and aligns with common TypeScript style used across the ecosystem.</description>