diff --git a/src/dts-content.ts b/src/dts-content.ts index 980c58f..03a978d 100644 --- a/src/dts-content.ts +++ b/src/dts-content.ts @@ -63,7 +63,7 @@ export class DtsContent { } public get formatted(): string { - if (!this.resultList || !this.resultList.length) return ''; + if (!this.resultList || !this.resultList.length) return 'export {};'; if (this.namedExports) { return ( diff --git a/test/dts-creator.spec.ts b/test/dts-creator.spec.ts index 0ae636f..875e6ca 100644 --- a/test/dts-creator.spec.ts +++ b/test/dts-creator.spec.ts @@ -185,7 +185,7 @@ export const myClass: string; it('returns empty object exportion when the result list has no items', done => { new DtsCreator().create('test/empty.css').then(content => { - assert.equal(content.formatted, ''); + assert.equal(content.formatted, 'export {};'); done(); }); });