Skip to content

Commit e8c990f

Browse files
committed
fix force lazy
1 parent a6fb1a3 commit e8c990f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/compiler/checker.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -2450,7 +2450,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
24502450
}
24512451
function unionIfLazy(_paramType: Type) {
24522452
const isLazy = isLazyParameterByType(_paramType);
2453-
const paramType = isLazy ? getUnionType([_paramType, (_paramType as TypeReference).resolvedTypeArguments![0]], UnionReduction.None) : _paramType;
2453+
const paramType = isLazy
2454+
? getUnionType([_paramType, (_paramType as TypeReference).resolvedTypeArguments![0]], UnionReduction.None)
2455+
: isForceLazyParameterByType(_paramType)
2456+
? (_paramType as TypeReference).resolvedTypeArguments![0]
2457+
: _paramType;
24542458
return paramType
24552459
}
24562460
function getFluentExtension(targetType: Type, name: string): Type | undefined {

0 commit comments

Comments
 (0)