Skip to content

Commit 54b2e23

Browse files
author
Arthur Ozga
committed
converted some comments
1 parent f126767 commit 54b2e23

File tree

1 file changed

+29
-17
lines changed

1 file changed

+29
-17
lines changed

src/compiler/checker.ts

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2657,8 +2657,10 @@ namespace ts {
26572657
return result;
26582658
}
26592659

2660-
// The full set of type parameters for a generic class or interface type consists of its outer type parameters plus
2661-
// its locally declared type parameters.
2660+
/**
2661+
* The full set of type parameters for a generic class or interface type consists of its
2662+
* outer type parameters plus its locally declared type parameters.
2663+
*/
26622664
function getTypeParametersOfClassOrInterface(symbol: Symbol): TypeParameter[] {
26632665
return concatenate(getOuterTypeParametersOfClassOrInterface(symbol), getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol));
26642666
}
@@ -2686,11 +2688,13 @@ namespace ts {
26862688
return signatures;
26872689
}
26882690

2689-
// The base constructor of a class can resolve to
2690-
// undefinedType if the class has no extends clause,
2691-
// unknownType if an error occurred during resolution of the extends expression,
2692-
// nullType if the extends expression is the null value, or
2693-
// an object type with at least one construct signature.
2691+
/**
2692+
* The base constructor of a class can resolve to:
2693+
* * undefinedType if the class has no extends clause,
2694+
* * unknownType if an error occurred during resolution of the extends expression,
2695+
* * nullType if the extends expression is the null value, or
2696+
* * an object type with at least one construct signature.
2697+
*/
26942698
function getBaseConstructorTypeOfClass(type: InterfaceType): ObjectType {
26952699
if (!type.resolvedBaseConstructorType) {
26962700
let baseTypeNode = getBaseTypeNodeOfClass(type);
@@ -3052,9 +3056,11 @@ namespace ts {
30523056
return true;
30533057
}
30543058

3055-
// If the lists of call or construct signatures in the given types are all identical except for return types,
3056-
// and if none of the signatures are generic, return a list of signatures that has substitutes a union of the
3057-
// return types of the corresponding signatures in each resulting signature.
3059+
/**
3060+
* If the lists of call or construct signatures in the given types are all identical except for return types,
3061+
* and if none of the signatures are generic, return a list of signatures that has substitutes a union of the
3062+
* return types of the corresponding signatures in each resulting signature.
3063+
*/
30583064
function getUnionSignatures(types: Type[], kind: SignatureKind): Signature[] {
30593065
let signatureLists = map(types, t => getSignaturesOfType(t, kind));
30603066
let signatures = signatureLists[0];
@@ -3165,16 +3171,20 @@ namespace ts {
31653171
return <ResolvedType>type;
31663172
}
31673173

3168-
// Return properties of an object type or an empty array for other types
3169-
function getPropertiesOfObjectType(type: Type): Symbol[] {
3174+
/**
3175+
* Return properties of an object type or an empty array for other types
3176+
*/
3177+
function getPropertiesOfObjectType(type: Type): Symbol[] {
31703178
if (type.flags & TypeFlags.ObjectType) {
31713179
return resolveObjectOrUnionTypeMembers(<ObjectType>type).properties;
31723180
}
31733181
return emptyArray;
31743182
}
31753183

3176-
// If the given type is an object type and that type has a property by the given name, return
3177-
// the symbol for that property. Otherwise return undefined.
3184+
/**
3185+
* If the given type is an object type and that type has a property by the given name, return the symbol
3186+
* for that property. Otherwise return undefined.
3187+
*/
31783188
function getPropertyOfObjectType(type: Type, name: string): Symbol {
31793189
if (type.flags & TypeFlags.ObjectType) {
31803190
let resolved = resolveObjectOrUnionTypeMembers(<ObjectType>type);
@@ -3280,9 +3290,11 @@ namespace ts {
32803290
return property;
32813291
}
32823292

3283-
// Return the symbol for the property with the given name in the given type. Creates synthetic union properties when
3284-
// necessary, maps primitive types and type parameters are to their apparent types, and augments with properties from
3285-
// Object and Function as appropriate.
3293+
/**
3294+
* Return the symbol for the property with the given name in the given type. Creates synthetic union
3295+
* properties when necessary, maps primitive types and type parameters are to their apparent types, and
3296+
* augments with properties from Object and Function as appropriate.
3297+
*/
32863298
function getPropertyOfType(type: Type, name: string): Symbol {
32873299
type = getApparentType(type);
32883300
if (type.flags & TypeFlags.ObjectType) {

0 commit comments

Comments
 (0)