@@ -2232,39 +2232,24 @@ namespace ts {
2232
2232
2233
2233
function typeFormatFlagsToNodeBuilderFlags(flags: TypeFormatFlags): NodeBuilderFlags {
2234
2234
let result = NodeBuilderFlags.None;
2235
- if (flags & TypeFormatFlags.WriteArrayAsGenericType) {
2236
- result |= NodeBuilderFlags.WriteArrayAsGenericType;
2237
- }
2238
- if (flags & TypeFormatFlags.UseTypeOfFunction) {
2239
- result |= NodeBuilderFlags.UseTypeOfFunction;
2235
+ if (flags === TypeFormatFlags.None) {
2236
+ return result;
2240
2237
}
2241
2238
if (flags & TypeFormatFlags.NoTruncation) {
2242
2239
result |= NodeBuilderFlags.NoTruncation;
2243
2240
}
2244
- if (flags & TypeFormatFlags.WriteArrowStyleSignature ) {
2245
- result |= NodeBuilderFlags.WriteArrowStyleSignature ;
2241
+ if (flags & TypeFormatFlags.UseFullyQualifiedType ) {
2242
+ result |= NodeBuilderFlags.UseFullyQualifiedType ;
2246
2243
}
2247
- if (flags & TypeFormatFlags.WriteOwnNameForAnyLike ) {
2248
- result |= NodeBuilderFlags.WriteOwnNameForAnyLike ;
2244
+ if (flags & TypeFormatFlags.SuppressAnyReturnType ) {
2245
+ result |= NodeBuilderFlags.SuppressAnyReturnType ;
2249
2246
}
2250
2247
if (flags & TypeFormatFlags.WriteArrayAsGenericType) {
2251
2248
result |= NodeBuilderFlags.WriteArrayAsGenericType;
2252
2249
}
2253
2250
if (flags & TypeFormatFlags.WriteTypeArgumentsOfSignature) {
2254
2251
result |= NodeBuilderFlags.WriteTypeArgumentsOfSignature;
2255
2252
}
2256
- if (flags & TypeFormatFlags.UseFullyQualifiedType) {
2257
- result |= NodeBuilderFlags.UseFullyQualifiedType;
2258
- }
2259
- if (flags & TypeFormatFlags.UseTypeAliasValue) {
2260
- result |= NodeBuilderFlags.UseTypeAliasValue;
2261
- }
2262
- if (flags & TypeFormatFlags.SuppressAnyReturnType) {
2263
- result |= NodeBuilderFlags.SuppressAnyReturnType;
2264
- }
2265
- if (flags & TypeFormatFlags.AddUndefined) {
2266
- result |= NodeBuilderFlags.AddUndefined;
2267
- }
2268
2253
2269
2254
return result;
2270
2255
}
@@ -2893,7 +2878,6 @@ namespace ts {
2893
2878
2894
2879
function createEntityNameFromSymbolChain(chain: Symbol[], index: number): EntityName {
2895
2880
Debug.assert(chain && 0 <= index && index < chain.length);
2896
- // const parentIndex = index - 1;
2897
2881
const symbol = chain[index];
2898
2882
let typeParameterNodes: TypeNode[] | undefined;
2899
2883
if (index > 0) {
0 commit comments