@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.
- package/README.md +11 -6
- package/index.d.ts +3 -1
- 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
|
|
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:
|
|
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
|
-
|
|
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
package/package.json
CHANGED