dtslint/docs/no-declare-current-package.md

407 B

no-declare-current-package

Avoid using declare module, and prefer to declare module contents in a file.

Bad:

// foo/index.d.ts
declare module "foo" {
    export const x = 0;
}

Good:

// foo/index.d.ts
export const x = 0;

Bad:

// foo/index.d.ts
declare module "foo/bar" {
    export const x = 0;
}

Good:

// foo/bar.d.ts
export const x = 0;