forked from ivov/eslint-plugin-n8n-nodes-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
49 lines (38 loc) · 1.16 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import type { AST_NODE_TYPES, TSESTree } from "@typescript-eslint/utils";
import type { RuleContext } from "@typescript-eslint/utils/dist/ts-eslint";
type BaseProperty = TSESTree.PropertyNonComputedName;
export type BooleanProperty = BaseProperty & {
value: {
type: AST_NODE_TYPES.ObjectExpression;
value: boolean;
};
};
export type NumberProperty = BaseProperty & {
value: {
type: AST_NODE_TYPES.ObjectExpression;
value: number;
};
};
export type StringProperty = BaseProperty & {
value: {
type: AST_NODE_TYPES.ObjectExpression;
value: string;
};
};
export type ObjectProperty = BaseProperty & {
value: TSESTree.ObjectExpression;
};
export type ArrayProperty = BaseProperty & {
value: TSESTree.ArrayExpression;
};
export type OptionsProperty = BaseProperty & {
value: { elements: TSESTree.ObjectExpression[] };
};
export type ValuesProperty = OptionsProperty;
export type TemplateStringProperty = BaseProperty & {
value: { quasis: TSESTree.TemplateElement[] };
};
export type StringClassField = TSESTree.PropertyDefinitionNonComputedName & {
value: { value: string };
};
export type GenericContext = Readonly<RuleContext<any, any>>; // TODO: Type properly