Skip to content

Commit

Permalink
export Config type from tuf-js pkg (#433)
Browse files Browse the repository at this point in the history
Signed-off-by: Brian DeHamer <bdehamer@github.com>
  • Loading branch information
bdehamer authored Aug 18, 2023
1 parent 95fca28 commit 00bdeea
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/clever-dolls-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'tuf-js': minor
---

Export `UpdaterOptions` and `Config` types
18 changes: 18 additions & 0 deletions packages/client/src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as tuf from '..';

it('exports classes', () => {
expect(tuf.BaseFetcher).toBeInstanceOf(Function);
expect(tuf.TargetFile).toBeInstanceOf(Function);
expect(tuf.Updater).toBeInstanceOf(Function);
});

it('exports types', () => {
const config: Partial<tuf.Config> = {};
expect(config).toBeDefined();

const fetcher: Partial<tuf.Fetcher> = {};
expect(fetcher).toBeDefined();

const updaterOpts: Partial<tuf.UpdaterOptions> = {};
expect(updaterOpts).toBeDefined();
});
4 changes: 3 additions & 1 deletion packages/client/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export { TargetFile } from '@tufjs/models';
export { BaseFetcher, Fetcher } from './fetcher';
export { Updater } from './updater';
export { Updater, UpdaterOptions } from './updater';

export type { Config } from './config';

0 comments on commit 00bdeea

Please sign in to comment.