@tsrx/vue 0.1.28 → 0.1.29

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 (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.js +7 -3
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Vue compiler built on @tsrx/core",
4
4
  "license": "MIT",
5
5
  "author": "Dominic Gannaway",
6
- "version": "0.1.28",
6
+ "version": "0.1.29",
7
7
  "type": "module",
8
8
  "publishConfig": {
9
9
  "access": "public"
@@ -38,7 +38,7 @@
38
38
  "esrap": "^2.2.8",
39
39
  "is-reference": "^3.0.3",
40
40
  "zimmerframe": "^1.1.2",
41
- "@tsrx/core": "0.1.28"
41
+ "@tsrx/core": "0.1.29"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "vue": ">=3.5",
package/src/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  /** @import * as AST from 'estree' */
2
2
  /** @import { CompileError, ParseOptions } from '@tsrx/core/types' */
3
+ /** @import { NonEmptyString } from '@tsrx/core/types/helpers' */
3
4
 
4
5
  import { createVolarMappingsResult, dedupeMappings, parseModule } from '@tsrx/core';
5
6
  import { transform } from './transform.js';
@@ -8,8 +9,9 @@ export { isRefProp } from './ref.js';
8
9
 
9
10
  /**
10
11
  * Parse tsrx-vue source code to an ESTree AST.
12
+ * @template {string} T
11
13
  * @param {string} source
12
- * @param {string} [filename]
14
+ * @param {NonEmptyString<T>} filename
13
15
  * @param {ParseOptions} [options]
14
16
  * @returns {AST.Program}
15
17
  */
@@ -21,8 +23,9 @@ export function parse(source, filename, options) {
21
23
  * Compile tsrx-vue source code to a TSX module suitable for consumption by
22
24
  * vue-jsx-vapor or another Vue JSX transform.
23
25
  *
26
+ * @template {string} T
24
27
  * @param {string} source
25
- * @param {string} [filename]
28
+ * @param {NonEmptyString<T>} filename
26
29
  * @param {{ collect?: boolean, loose?: boolean }} [options]
27
30
  * @returns {{ code: string, map: any, css: string, cssHash: string | null, errors: CompileError[] }}
28
31
  */
@@ -47,8 +50,9 @@ export function compile(source, filename, options) {
47
50
  /**
48
51
  * Compile tsrx-vue source to virtual TSX plus Volar mappings for editor tooling.
49
52
  *
53
+ * @template {string} T
50
54
  * @param {string} source
51
- * @param {string} [filename]
55
+ * @param {NonEmptyString<T>} filename
52
56
  * @param {ParseOptions} [options]
53
57
  * @returns {import('@tsrx/core/types').VolarMappingsResult}
54
58
  */