Remove printEnumMembers and printEnumBody (#18698)
This commit is contained in:
1 parent
7ed0adc201
commit
6eb35e3bd7
2 files changed
+6
-26
No files matched your search
@@ -1,17 +1,5 @@
|
||||
import { printDeclareToken } from "./miscellaneous.js";
|
||||
import { printObject as printEnumMembers } from "./object.js";
|
||||
|
||||
/*
|
||||
- `EnumBooleanBody`(flow)
|
||||
- `EnumNumberBody`(flow)
|
||||
- `EnumBigIntBody`(flow)
|
||||
- `EnumStringBody`(flow)
|
||||
- `EnumSymbolBody`(flow)
|
||||
- `TSEnumBody`(TypeScript)
|
||||
*/
|
||||
function printEnumBody(path, options, print) {
|
||||
return printEnumMembers(path, options, print);
|
||||
}
|
||||
import { printObject } from "./object.js";
|
||||
|
||||
function printFlowEnumBody(path, options, print) {
|
||||
const { node } = path;
|
||||
@@ -26,7 +14,7 @@ function printFlowEnumBody(path, options, print) {
|
||||
)
|
||||
.toLowerCase()} `
|
||||
: "",
|
||||
printEnumBody(path, options, print),
|
||||
printObject(path, options, print),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -83,9 +71,4 @@ function printEnumDeclaration(path, print) {
|
||||
];
|
||||
}
|
||||
|
||||
export {
|
||||
printEnumBody,
|
||||
printEnumDeclaration,
|
||||
printEnumMember,
|
||||
printFlowEnumBody,
|
||||
};
|
||||
export { printEnumDeclaration, printEnumMember, printFlowEnumBody };
|
||||
@@ -12,11 +12,7 @@ import {
|
||||
printClassMethod,
|
||||
printClassProperty,
|
||||
} from "./class.js";
|
||||
import {
|
||||
printEnumBody,
|
||||
printEnumDeclaration,
|
||||
printEnumMember,
|
||||
} from "./enum.js";
|
||||
import { printEnumDeclaration, printEnumMember } from "./enum.js";
|
||||
import { printFunction, printMethodValue } from "./function.js";
|
||||
import { printFunctionType } from "./function-type.js";
|
||||
import { printIndexSignature } from "./index-signature.js";
|
||||
@@ -32,6 +28,7 @@ import {
|
||||
} from "./miscellaneous.js";
|
||||
import { printImportKind } from "./module.js";
|
||||
import { printModuleDeclaration } from "./module-declaration.js";
|
||||
import { printObject } from "./object.js";
|
||||
import { printPropertyKey } from "./property.js";
|
||||
import { printRestType } from "./rest-type.js";
|
||||
import { printTemplateLiteral } from "./template-literal.js";
|
||||
@@ -163,7 +160,7 @@ function printTypescript(path, options, print) {
|
||||
case "TSEnumDeclaration":
|
||||
return printEnumDeclaration(path, print);
|
||||
case "TSEnumBody":
|
||||
return printEnumBody(path, options, print);
|
||||
return printObject(path, options, print);
|
||||
case "TSEnumMember":
|
||||
return printEnumMember(path, print);
|
||||
|
||||
|
||||
Reference in new issue
Block a user