File tree Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 17
17
"default" : " ./src/index.js"
18
18
},
19
19
"./languages/ts" : {
20
+ "types" : " ./types/index.d.ts" ,
20
21
"default" : " ./src/languages/ts.js"
21
22
},
22
23
"./languages/tsx" : {
24
+ "types" : " ./types/index.d.ts" ,
23
25
"default" : " ./src/languages/tsx.js"
24
26
}
25
27
},
40
42
"changeset:version" : " changeset version" ,
41
43
"changeset:publish" : " changeset publish" ,
42
44
"check" : " tsc" ,
43
- "prepublishOnly" : " pnpm test && dts-buddy -m esrap:./src/public.d.ts" ,
45
+ "prepublishOnly" : " pnpm test && dts-buddy -m esrap:./src/public.d.ts -m esrap/languages/ts:./src/languages/ts.js -m esrap/languages/tsx:./src/languages/tsx.js " ,
44
46
"sandbox" : " node test/sandbox/index.js" ,
45
47
"test" : " vitest --run" ,
46
48
"test:ui" : " vitest --ui"
Original file line number Diff line number Diff line change 1
1
/** @import { TSESTree } from '@typescript-eslint/types' */
2
2
/** @import { Visitors } from '../types.js' */
3
+ /** @import { TSOptions } from './types.js' */
3
4
import { Context } from '../context.js' ;
4
5
5
6
/** @type {Record<TSESTree.Expression['type'] | 'Super' | 'RestElement', number> } */
@@ -91,10 +92,7 @@ function write_comment(comment, context) {
91
92
}
92
93
93
94
/**
94
- * @param {{
95
- * quotes?: 'double' | 'single';
96
- * comments?: TSESTree.Comment[];
97
- * }} [options]
95
+ * @param {TSOptions } [options]
98
96
* @returns {Visitors<TSESTree.Node> }
99
97
*/
100
98
export default ( options = { } ) => {
Original file line number Diff line number Diff line change 1
1
/** @import { Visitors } from '../types' */
2
+ /** @import { TSOptions } from './types.js' */
2
3
import { TSESTree } from '@typescript-eslint/types' ;
3
4
import ts from './ts.js' ;
4
5
5
6
/**
6
- * @param {Parameters<typeof ts>[0] } [options]
7
+ * @param {TSOptions } [options]
7
8
* @returns {Visitors<TSESTree.Node> }
8
9
*/
9
10
export default ( options ) => ( {
Original file line number Diff line number Diff line change
1
+ import type { TSESTree } from '@typescript-eslint/types' ;
2
+
3
+ export type TSOptions = {
4
+ quotes ?: 'double' | 'single' ;
5
+ comments ?: TSESTree . Comment [ ] ;
6
+ } ;
You can’t perform that action at this time.
0 commit comments