@marko/language-tools 2.5.4 → 2.5.6
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/dist/extractors/script/index.d.ts +2 -0
- package/dist/extractors/script/util/get-runtime-api.d.ts +9 -0
- package/dist/index.js +306 -96
- package/dist/index.mjs +302 -93
- package/dist/parser.d.ts +7 -1
- package/dist/util/project.d.ts +2 -0
- package/marko.internal.d.ts +109 -64
- package/package.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TaglibLookup } from "@marko/babel-utils";
|
|
2
2
|
import type TS from "typescript/lib/tsserverlibrary";
|
|
3
3
|
import { type Parsed } from "../../parser";
|
|
4
|
+
import type { Meta } from "../../util/project";
|
|
4
5
|
/**
|
|
5
6
|
* Iterate over the Marko CST and extract all the script content.
|
|
6
7
|
*/
|
|
@@ -14,5 +15,6 @@ export interface ExtractScriptOptions {
|
|
|
14
15
|
lookup: TaglibLookup;
|
|
15
16
|
scriptLang: ScriptLang;
|
|
16
17
|
runtimeTypesCode?: string;
|
|
18
|
+
translator: Meta["config"]["translator"];
|
|
17
19
|
}
|
|
18
20
|
export declare function extractScript(opts: ExtractScriptOptions): import("../../util/extractor").Extracted;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Parsed } from "../../../parser";
|
|
2
|
+
export type RuntimeAPI = (typeof RuntimeAPI)[keyof typeof RuntimeAPI] | void;
|
|
3
|
+
export declare const RuntimeAPI: {
|
|
4
|
+
readonly tags: "tags";
|
|
5
|
+
readonly class: "class";
|
|
6
|
+
};
|
|
7
|
+
export declare function getRuntimeAPI(translator: {
|
|
8
|
+
preferAPI?: string;
|
|
9
|
+
} | undefined, parsed: Parsed): RuntimeAPI;
|