Skip to content

Commit

Permalink
feat: export Stream Deck api types (#43)
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Herman <[email protected]>
  • Loading branch information
GeekyEggo and GeekyEggo authored Jun 10, 2024
1 parent ddb0bd2 commit b063722
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
15 changes: 14 additions & 1 deletion rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,17 @@ function getOptions(input: string, output: string): RollupOptions[] {
];
}

export default [...getOptions("src/plugin/index.ts", "index.js"), ...getOptions("src/ui/index.ts", "browser.js")];
/**
* Provides declarations for Stream Deck API related types.
*/
const api = {
input: "src/api/index.ts",
output: {
banner,
file: "dist/api.d.ts"
},
external: ["@elgato/schemas/streamdeck/plugins"],
plugins: [dts()]
};

export default [...getOptions("src/plugin/index.ts", "index.js"), ...getOptions("src/ui/index.ts", "browser.js"), api];
7 changes: 1 addition & 6 deletions src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import type * as schemas from "@elgato/schemas/streamdeck/plugins";

export * from "./command";
export * from "./device";
export * from "./events";
Expand All @@ -8,7 +6,4 @@ export * from "./layout";
export * from "./registration";
export * from "./target";

/**
* Defines the plugin and available actions, and all information associated with them, including the plugin's entry point, all iconography, action default behavior, etc.
*/
export type Manifest = Omit<schemas.Manifest, "$schema">;
export { type Manifest } from "@elgato/schemas/streamdeck/plugins";

0 comments on commit b063722

Please sign in to comment.