@@ -340,7 +340,7 @@ export function isRoStringType(value: any): value is InterfaceType {
340340 return isBuiltInType ( value , 'roString' ) ;
341341}
342342export function isStringTypeLike ( value : any ) : value is StringType | InterfaceType {
343- return isStringType ( value ) || isRoStringType ( value ) || isComplexTypeOf ( value , isStringTypeLike ) ;
343+ return isStringType ( value ) || isRoStringType ( value ) || isCompoundTypeOf ( value , isStringTypeLike ) ;
344344}
345345
346346export function isTypedFunctionType ( value : any ) : value is TypedFunctionType {
@@ -354,7 +354,7 @@ export function isRoFunctionType(value: any): value is InterfaceType {
354354 return value ?. kind === BscTypeKind . RoFunctionType || isBuiltInType ( value , 'roFunction' ) ;
355355}
356356export function isFunctionTypeLike ( value : any ) : value is FunctionType | InterfaceType {
357- return isFunctionType ( value ) || isRoFunctionType ( value ) || isComplexTypeOf ( value , isFunctionTypeLike ) ;
357+ return isFunctionType ( value ) || isRoFunctionType ( value ) || isCompoundTypeOf ( value , isFunctionTypeLike ) ;
358358}
359359
360360export function isBooleanType ( value : any ) : value is BooleanType {
@@ -364,7 +364,7 @@ export function isRoBooleanType(value: any): value is InterfaceType {
364364 return isBuiltInType ( value , 'roBoolean' ) ;
365365}
366366export function isBooleanTypeLike ( value : any ) : value is BooleanType | InterfaceType {
367- return isBooleanType ( value ) || isRoBooleanType ( value ) || isComplexTypeOf ( value , isBooleanTypeLike ) ;
367+ return isBooleanType ( value ) || isRoBooleanType ( value ) || isCompoundTypeOf ( value , isBooleanTypeLike ) ;
368368}
369369
370370export function isIntegerType ( value : any ) : value is IntegerType {
@@ -374,7 +374,7 @@ export function isRoIntType(value: any): value is LongIntegerType {
374374 return isBuiltInType ( value , 'roInt' ) ;
375375}
376376export function isIntegerTypeLike ( value : any ) : value is IntegerType | InterfaceType {
377- return isIntegerType ( value ) || isRoIntType ( value ) || isComplexTypeOf ( value , isIntegerTypeLike ) ;
377+ return isIntegerType ( value ) || isRoIntType ( value ) || isCompoundTypeOf ( value , isIntegerTypeLike ) ;
378378}
379379
380380export function isLongIntegerType ( value : any ) : value is LongIntegerType {
@@ -384,7 +384,7 @@ export function isRoLongIntegerType(value: any): value is InterfaceType {
384384 return isBuiltInType ( value , 'roLongInteger' ) ;
385385}
386386export function isLongIntegerTypeLike ( value : any ) : value is LongIntegerType | InterfaceType {
387- return isLongIntegerType ( value ) || isRoLongIntegerType ( value ) || isComplexTypeOf ( value , isLongIntegerTypeLike ) ;
387+ return isLongIntegerType ( value ) || isRoLongIntegerType ( value ) || isCompoundTypeOf ( value , isLongIntegerTypeLike ) ;
388388}
389389
390390export function isFloatType ( value : any ) : value is FloatType {
@@ -394,7 +394,7 @@ export function isRoFloatType(value: any): value is InterfaceType {
394394 return isBuiltInType ( value , 'roFloat' ) ;
395395}
396396export function isFloatTypeLike ( value : any ) : value is FloatType | InterfaceType {
397- return isFloatType ( value ) || isRoFloatType ( value ) || isComplexTypeOf ( value , isFloatTypeLike ) ;
397+ return isFloatType ( value ) || isRoFloatType ( value ) || isCompoundTypeOf ( value , isFloatTypeLike ) ;
398398}
399399
400400export function isDoubleType ( value : any ) : value is DoubleType {
@@ -404,7 +404,7 @@ export function isRoDoubleType(value: any): value is InterfaceType {
404404 return isBuiltInType ( value , 'roDouble' ) ;
405405}
406406export function isDoubleTypeLike ( value : any ) : value is DoubleType | InterfaceType {
407- return isDoubleType ( value ) || isRoDoubleType ( value ) || isComplexTypeOf ( value , isDoubleTypeLike ) ;
407+ return isDoubleType ( value ) || isRoDoubleType ( value ) || isCompoundTypeOf ( value , isDoubleTypeLike ) ;
408408}
409409
410410export function isInvalidType ( value : any ) : value is InvalidType {
@@ -414,7 +414,7 @@ export function isRoInvalidType(value: any): value is InterfaceType {
414414 return isBuiltInType ( value , 'roInvalid' ) ;
415415}
416416export function isInvalidTypeLike ( value : any ) : value is InvalidType | InterfaceType {
417- return isInvalidType ( value ) || isRoInvalidType ( value ) || isComplexTypeOf ( value , isInvalidTypeLike ) ;
417+ return isInvalidType ( value ) || isRoInvalidType ( value ) || isCompoundTypeOf ( value , isInvalidTypeLike ) ;
418418}
419419
420420export function isVoidType ( value : any ) : value is VoidType {
@@ -486,7 +486,7 @@ export function isInheritableType(target): target is InheritableType {
486486}
487487
488488export function isCallFuncableType ( target ) : target is CallFuncableType {
489- return isInterfaceType ( target ) || isComponentType ( target ) || isComplexTypeOf ( target , isCallFuncableType ) ;
489+ return isInterfaceType ( target ) || isComponentType ( target ) || isCompoundTypeOf ( target , isCallFuncableType ) ;
490490}
491491
492492export function isCallableType ( target ) : target is BaseFunctionType {
@@ -510,7 +510,7 @@ export function isNumberTypeLike(value: any): value is IntegerType | LongInteger
510510 isLongIntegerTypeLike ( value ) ||
511511 isFloatTypeLike ( value ) ||
512512 isDoubleTypeLike ( value ) ||
513- isComplexTypeOf ( value , isNumberTypeLike ) ;
513+ isCompoundTypeOf ( value , isNumberTypeLike ) ;
514514}
515515
516516export function isPrimitiveType ( value : any = false ) : value is IntegerType | LongIntegerType | FloatType | DoubleType | StringType | BooleanType | InterfaceType {
@@ -527,7 +527,7 @@ export function isPrimitiveTypeLike(value: any = false): value is IntegerType |
527527}
528528
529529export function isAssociativeArrayTypeLike ( value : any ) : value is AssociativeArrayType | InterfaceType {
530- return value ?. kind === BscTypeKind . AssociativeArrayType || isBuiltInType ( value , 'roAssociativeArray' ) || isComplexTypeOf ( value , isAssociativeArrayTypeLike ) ;
530+ return value ?. kind === BscTypeKind . AssociativeArrayType || isBuiltInType ( value , 'roAssociativeArray' ) || isCompoundTypeOf ( value , isAssociativeArrayTypeLike ) ;
531531}
532532
533533export function isBuiltInType ( value : any , name : string ) : value is InterfaceType {
@@ -553,14 +553,14 @@ export function isUnionTypeOf(value: any, typeGuard: (val: any) => boolean) {
553553 return isUnionType ( value ) && value . types . every ( typeGuard ) ;
554554}
555555
556- export function isComplexTypeOf ( value : any , typeGuard : ( val : any ) => boolean ) {
556+ export function isCompoundTypeOf ( value : any , typeGuard : ( val : any ) => boolean ) {
557557 // TODO: add more complex type checks as needed, like IntersectionType
558558 return isTypeStatementTypeOf ( value , typeGuard ) ||
559559 isUnionTypeOf ( value , typeGuard ) ;
560560}
561561
562562
563- export function isComplexType ( value : any ) : value is UnionType | IntersectionType {
563+ export function isCompoundType ( value : any ) : value is UnionType | IntersectionType {
564564 return isUnionType ( value ) || isIntersectionType ( value ) ;
565565}
566566
0 commit comments