Skip to content

Commit 575d05f

Browse files
committed
Refactor: class_field -> decl
1 parent 5c75bf2 commit 575d05f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/analysis/class_fields.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export type ClassFieldsAnalysis = {
2222
* A place where the instance field is declared or used.
2323
*/
2424
export type InstanceFieldSite = {
25-
type: "class_field";
25+
type: "decl";
2626
/**
2727
* Declaration. One of:
2828
*
@@ -90,7 +90,7 @@ export type FieldInit = {
9090
* A place where the static field is declared or used.
9191
*/
9292
export type StaticFieldSite = {
93-
type: "class_field";
93+
type: "decl";
9494
/**
9595
* Declaration. One of:
9696
*
@@ -146,7 +146,7 @@ export function analyzeClassFields(path: NodePath<ClassDeclaration>): ClassField
146146
const typeAnnotation = itemPath.get("typeAnnotation");
147147
const typeAnnotation_ = typeAnnotation.isTSTypeAnnotation() ? typeAnnotation : undefined;
148148
field.push({
149-
type: "class_field",
149+
type: "decl",
150150
path: itemPath,
151151
typing: typeAnnotation_
152152
? {
@@ -169,7 +169,7 @@ export function analyzeClassFields(path: NodePath<ClassDeclaration>): ClassField
169169
const kind = itemPath.node.kind ?? "method";
170170
if (kind === "method") {
171171
field.push({
172-
type: "class_field",
172+
type: "decl",
173173
path: itemPath,
174174
// We put `typing` here only when it is type-only
175175
typing: itemPath.isTSDeclareMethod()
@@ -275,7 +275,7 @@ export function analyzeClassFields(path: NodePath<ClassDeclaration>): ClassField
275275

276276
const field = getInstanceField(name)!;
277277
field.push({
278-
type: "class_field",
278+
type: "decl",
279279
path: exprPath,
280280
typing: undefined,
281281
init: {

0 commit comments

Comments
 (0)