Skip to content

Commit

Permalink
feat: export named instance of streamDeck to improve intellisense
Browse files Browse the repository at this point in the history
  • Loading branch information
GeekyEggo committed Jan 6, 2024
1 parent 666300a commit 1298391
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ describe("Index", () => {
// Arrange, act, assert.
const index = (await require("../index")) as typeof import("../index");
expect(index.default).toBeInstanceOf(StreamDeck);
expect(index.default).toStrictEqual(index.streamDeck);
expect(StreamDeck).toHaveBeenCalledTimes(1);
expect(StreamDeck).toHaveBeenCalledWith();
});
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export * from "./events";
export { LogLevel } from "./logging";
export { Manifest } from "./manifest";

export default new StreamDeck();
export const streamDeck = new StreamDeck();
export default streamDeck;

0 comments on commit 1298391

Please sign in to comment.