@crowbartools/firebot-types 5.67.0-alpha1 → 5.67.0-alpha1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +11 -6
  2. package/index.d.ts +3 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -14,13 +14,12 @@ A `@types/node` peer dependency is required (the script API uses `Buffer` / `Buf
14
14
 
15
15
  ## Usage
16
16
 
17
- The default export is the runtime API object provided by Firebot. Named types live under the `@crowbartools/firebot-types/types` subpath.
17
+ The default export is the runtime API object provided by Firebot. Named types are re-exported from the package root and can be imported alongside the default in a single statement.
18
18
 
19
19
  ```ts
20
- import firebot from "@crowbartools/firebot-types";
21
- import type { Plugin, EffectScript } from "@crowbartools/firebot-types/types";
20
+ import firebot, { Plugin, EffectScript, Manifest } from "@crowbartools/firebot-types";
22
21
 
23
- export const manifest: Plugin["manifest"] = {
22
+ export const manifest: Manifest = {
24
23
  name: "My Plugin",
25
24
  version: "1.0.0",
26
25
  author: "you",
@@ -33,10 +32,16 @@ export function onLoad() {
33
32
  }
34
33
  ```
35
34
 
36
- CommonJS style works too:
35
+ Deep imports for less common types are also supported:
36
+
37
+ ```ts
38
+ import type { EffectHelperService } from "@crowbartools/firebot-types/types/ui/effect-helper-service";
39
+ ```
40
+
41
+ CommonJS style works too (requires `esModuleInterop` in your tsconfig):
37
42
 
38
43
  ```js
39
- const firebot = require("@crowbartools/firebot-types");
44
+ const firebot = require("@crowbartools/firebot-types").default;
40
45
  firebot.logger.info(firebot.version);
41
46
  ```
42
47
 
package/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  // Auto-generated by grunt publish-types. Do not edit by hand.
2
2
  import { FirebotScriptApi } from "./types/script-api";
3
3
 
4
+ export * from "./types";
5
+
4
6
  declare const firebot: FirebotScriptApi;
5
- export = firebot;
7
+ export default firebot;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowbartools/firebot-types",
3
- "version": "5.67.0-alpha1",
3
+ "version": "5.67.0-alpha1.1",
4
4
  "description": "Type definitions and script API for Firebot custom scripts and plugins.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",