File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -10997,15 +10997,15 @@ namespace ts {
10997
10997
// these partial properties when identifying discriminant properties, but otherwise they are filtered out
10998
10998
// and do not appear to be present in the union type.
10999
10999
function getUnionOrIntersectionProperty(type: UnionOrIntersectionType, name: __String, skipObjectFunctionPropertyAugment?: boolean): Symbol | undefined {
11000
- const properties = skipObjectFunctionPropertyAugment ?
11001
- type.propertyCacheWithoutObjectFunctionPropertyAugment ||= createSymbolTable( ) :
11002
- type.propertyCache ||= createSymbolTable() ;
11003
- let property = properties.get( name);
11004
- if (! property) {
11005
- property = createUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment);
11006
- if (property) {
11007
- properties.set(name, property );
11008
- }
11000
+ let property = type.propertyCacheWithoutObjectFunctionPropertyAugment?.get(name) ||
11001
+ !skipObjectFunctionPropertyAugment ? type.propertyCache?.get(name ) : undefined;
11002
+ if (property) return property ;
11003
+ property = createUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment );
11004
+ if (property) {
11005
+ const properties = skipObjectFunctionPropertyAugment ?
11006
+ type.propertyCacheWithoutObjectFunctionPropertyAugment ||= createSymbolTable() :
11007
+ type.propertyCache ||= createSymbolTable( );
11008
+ properties.set(name, property);
11009
11009
}
11010
11010
return property;
11011
11011
}
You can’t perform that action at this time.
0 commit comments