Skip to content

Commit b7594dd

Browse files
authored
Export missing Types for public API (#595)
* Export types in public API Fixes #593 * Update api.test.ts
1 parent 3773d17 commit b7594dd

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

Diff for: src/api.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
export {NpmPackageJsonLint} from './npm-package-json-lint';
1+
export {NpmPackageJsonLint, NpmPackageJsonLintOptions} from './npm-package-json-lint';
2+
3+
export {LintIssue} from './lint-issue';
4+
5+
export {Severity} from './types/severity';
6+
7+
export {LinterResult} from './linter/linter';
8+
9+
export {PackageJsonFileLintingResult} from './types/package-json-linting-result';
10+
11+
export {PackageJsonFileAggregatedResultCounts, OverallAggregatedResultCounts} from './linter/results-helper';

Diff for: test/unit/api.test.ts

+28
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,32 @@ describe('api Unit Tests', () => {
66
test('NpmPackageJsonLint should be exported', () => {
77
expect(api).toHaveProperty('NpmPackageJsonLint');
88
});
9+
10+
test('NpmPackageJsonLintOptions should be exported', () => {
11+
expect(api).not.toHaveProperty('NpmPackageJsonLintOptions');
12+
});
13+
14+
test('LintIssue should be exported', () => {
15+
expect(api).toHaveProperty('LintIssue');
16+
});
17+
18+
test('Severity should be exported', () => {
19+
expect(api).toHaveProperty('Severity');
20+
});
21+
22+
test('LinterResult should be exported', () => {
23+
expect(api).not.toHaveProperty('LinterResult');
24+
});
25+
26+
test('PackageJsonFileLintingResult should be exported', () => {
27+
expect(api).not.toHaveProperty('PackageJsonFileLintingResult');
28+
});
29+
30+
test('PackageJsonFileAggregatedResultCounts should be exported', () => {
31+
expect(api).not.toHaveProperty('PackageJsonFileAggregatedResultCounts');
32+
});
33+
34+
test('OverallAggregatedResultCounts should be exported', () => {
35+
expect(api).not.toHaveProperty('OverallAggregatedResultCounts');
36+
});
937
});

0 commit comments

Comments
 (0)