@gi-tcg/gts-transpiler 0.6.3 → 0.6.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gi-tcg/gts-transpiler",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/piovium/gts.git"
@@ -26,10 +26,10 @@
26
26
  "esrap": "2.2.1",
27
27
  "magic-string": "^0.30.21",
28
28
  "path-browserify-esm": "^1.0.6",
29
- "zimmerframe": "^1.1.4"
29
+ "zimmerframe": "^1.1.4",
30
+ "@types/estree": "^1.0.9"
30
31
  },
31
32
  "devDependencies": {
32
- "@types/estree": "^1.0.9",
33
33
  "@types/node": "^24.3.0",
34
34
  "@volar/language-core": "^2.4.27"
35
35
  },
package/src/index.ts CHANGED
@@ -12,6 +12,7 @@ import {
12
12
  import type { TranspileOption } from "./transform/gts.ts";
13
13
  import type { VolarMappingResult } from "./transform/volar/index.ts";
14
14
  export { GtsTranspilerError } from "./error.ts";
15
+ export type { AST } from "./types.ts";
15
16
 
16
17
  export function transpile(
17
18
  source: string,
package/src/types.ts CHANGED
@@ -30,12 +30,12 @@ declare module "estree" {
30
30
  lParenRange?: [number, number];
31
31
  }
32
32
 
33
- interface GTSDefineStatement extends BaseStatement {
33
+ export interface GTSDefineStatement extends BaseStatement {
34
34
  type: "GTSDefineStatement";
35
35
  body: GTSNamedAttributeDefinition;
36
36
  }
37
37
 
38
- interface GTSNamedAttributeDefinition extends BaseNode {
38
+ export interface GTSNamedAttributeDefinition extends BaseNode {
39
39
  type: "GTSNamedAttributeDefinition";
40
40
  name: Identifier | Literal;
41
41
  body: GTSAttributeBody;
@@ -43,34 +43,34 @@ declare module "estree" {
43
43
  bindingName?: Identifier;
44
44
  }
45
45
 
46
- interface GTSAttributeBody extends BaseNode {
46
+ export interface GTSAttributeBody extends BaseNode {
47
47
  type: "GTSAttributeBody";
48
48
  positionalAttributes: GTSPositionalAttributeList;
49
49
  namedAttributes?: GTSNamedAttributeBlock;
50
50
  }
51
51
 
52
- interface GTSPositionalAttributeList extends BaseNode {
52
+ export interface GTSPositionalAttributeList extends BaseNode {
53
53
  type: "GTSPositionalAttributeList";
54
54
  attributes: Expression[];
55
55
  }
56
56
 
57
- interface GTSNamedAttributeBlock extends BaseNode {
57
+ export interface GTSNamedAttributeBlock extends BaseNode {
58
58
  type: "GTSNamedAttributeBlock";
59
59
  attributes: GTSNamedAttributeDefinition[];
60
60
  directAction?: GTSDirectFunction;
61
61
  }
62
62
 
63
- interface GTSDirectFunction extends BaseNode {
63
+ export interface GTSDirectFunction extends BaseNode {
64
64
  type: "GTSDirectFunction";
65
65
  body: Statement[];
66
66
  }
67
67
 
68
- interface GTSShortcutArgumentExpression extends BaseExpression {
68
+ export interface GTSShortcutArgumentExpression extends BaseExpression {
69
69
  type: "GTSShortcutArgumentExpression";
70
70
  property: Identifier;
71
71
  }
72
72
 
73
- interface GTSShortcutFunctionExpression extends BaseExpression {
73
+ export interface GTSShortcutFunctionExpression extends BaseExpression {
74
74
  type: "GTSShortcutFunctionExpression";
75
75
  body: BlockStatement | Expression;
76
76
  expression: boolean;