Skip to content

Commit

Permalink
fix force lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
patroza committed Feb 6, 2023
1 parent a34ab40 commit 2685a67
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/compiler/checker.ts
Expand Up @@ -2429,7 +2429,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
function unionIfLazy(_paramType: Type) {
const isLazy = isLazyParameterByType(_paramType);
const paramType = isLazy ? getUnionType([_paramType, (_paramType as TypeReference).resolvedTypeArguments![0]], UnionReduction.None) : _paramType;
const paramType = isLazy
? getUnionType([_paramType, (_paramType as TypeReference).resolvedTypeArguments![0]], UnionReduction.None)
: isForceLazyParameterByType(_paramType)
? (_paramType as TypeReference).resolvedTypeArguments![0]
: _paramType;
return paramType
}
function getFluentExtension(targetType: Type, name: string): Type | undefined {
Expand Down

0 comments on commit 2685a67

Please sign in to comment.