hackmud-script-manager 0.19.0 → 0.19.1-01c1752

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.
@@ -1,24 +1,19 @@
1
1
  import type { File } from "@babel/types";
2
- export type TransformOptions = {
3
- /** 11 a-z 0-9 characters */
4
- uniqueID: string;
5
- /** the user going to be hosting this script (or set to `true` if not yet known) */
6
- scriptUser: string | true;
7
- /** the name of this script (or set to `true` if not yet known) */
8
- scriptName: string | true;
2
+ import type { LaxPartial } from "@samual/lib";
3
+ export type TransformOptions = LaxPartial<{
4
+ /** 11 a-z 0-9 characters */ uniqueId: string;
5
+ /** the user going to be hosting this script (or set to `true` if not yet known) */ scriptUser: string | true;
9
6
  seclevel: number;
7
+ }> & {
8
+ scriptName: string | true;
10
9
  };
11
- /**
12
- * transform a given babel `File` to be hackmud compatible
13
- *
14
- * (returned File will need `postprocess()`ing)
15
- *
16
- * @param file babel ast node representing a file containing preprocessed code
17
- * @param sourceCode the original untouched source code
18
- * @param options {@link TransformOptions details}
19
- */
20
- export declare const transform: (file: File, sourceCode: string, { uniqueID, scriptUser, scriptName, seclevel }?: Partial<TransformOptions>) => {
10
+ /** transform a given babel `File` to be hackmud compatible
11
+ *
12
+ * (returned File will need `postprocess()`ing)
13
+ * @param file babel ast node representing a file containing preprocessed code
14
+ * @param sourceCode the original untouched source code
15
+ * @param options {@link TransformOptions details} */
16
+ export declare function transform(file: File, sourceCode: string, { uniqueId, scriptUser, scriptName, seclevel }: TransformOptions): {
21
17
  file: File;
22
18
  seclevel: number;
23
19
  };
24
- export default transform;