esrap 2.2.0 → 2.2.1

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": "esrap",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Parse in reverse",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,10 +1,11 @@
1
1
  import { TSESTree } from '@typescript-eslint/types';
2
+ import { BaseNode } from '../types';
2
3
 
3
4
  export type TSOptions = {
4
5
  quotes?: 'double' | 'single';
5
6
  comments?: Comment[];
6
- getLeadingComments?: (node: TSESTree.Node) => BaseComment[] | undefined;
7
- getTrailingComments?: (node: TSESTree.Node) => BaseComment[] | undefined;
7
+ getLeadingComments?: (node: BaseNode) => BaseComment[] | undefined;
8
+ getTrailingComments?: (node: BaseNode) => BaseComment[] | undefined;
8
9
  };
9
10
 
10
11
  interface Position {
package/types/index.d.ts CHANGED
@@ -77,8 +77,8 @@ declare module 'esrap/languages/ts' {
77
77
  type TSOptions = {
78
78
  quotes?: 'double' | 'single';
79
79
  comments?: Comment[];
80
- getLeadingComments?: (node: TSESTree.Node) => BaseComment[] | undefined;
81
- getTrailingComments?: (node: TSESTree.Node) => BaseComment[] | undefined;
80
+ getLeadingComments?: (node: BaseNode) => BaseComment[] | undefined;
81
+ getTrailingComments?: (node: BaseNode) => BaseComment[] | undefined;
82
82
  };
83
83
 
84
84
  interface Position {
@@ -132,8 +132,8 @@ declare module 'esrap/languages/tsx' {
132
132
  type TSOptions = {
133
133
  quotes?: 'double' | 'single';
134
134
  comments?: Comment[];
135
- getLeadingComments?: (node: TSESTree.Node) => BaseComment[] | undefined;
136
- getTrailingComments?: (node: TSESTree.Node) => BaseComment[] | undefined;
135
+ getLeadingComments?: (node: BaseNode) => BaseComment[] | undefined;
136
+ getTrailingComments?: (node: BaseNode) => BaseComment[] | undefined;
137
137
  };
138
138
 
139
139
  interface Position {
@@ -35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