Skip to content

Commit ad311b5

Browse files
committed
just use cloneTypeParameter
1 parent 502e988 commit ad311b5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6842,7 +6842,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
68426842
// We do this to ensure we retain the toplevel keyof-ness of the type which may be lost due to keyof distribution during `getConstraintTypeFromMappedType`
68436843
if (isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type) && context.flags & NodeBuilderFlags.GenerateNamesForShadowedTypeParams) {
68446844
const newConstraintParam = createTypeParameter(createSymbol(SymbolFlags.TypeParameter, "T" as __String));
6845-
const newTypeParam = createTypeParameter(typeParameter.symbol);
6845+
const newTypeParam = cloneTypeParameter(typeParameter);
68466846
const name = typeParameterToName(newConstraintParam, context);
68476847
const target = type.target as MappedType;
68486848
typeParameter = newTypeParam;

0 commit comments

Comments
 (0)