nl_tokens: For a type parameter return the base constraint of the type parameter . For the string number boolean and symbol primitive types return the corresponding object types . Otherwise return the type itself . Note that the apparent type of a union type is the union type itself .
pl_tokens: function getApparentType ( type ) { if ( type . flags & 512 /* TypeParameter */ ) { do { type = getConstraintOfTypeParameter ( type ) ; } while ( type && type . flags & 512 /* TypeParameter */ ) ; if ( ! type ) { type = emptyObjectType ; } } if ( type . flags & 258 /* StringLike */ ) { type = globalStringType ; } else if ( type . flags & 132 /* NumberLike */ ) { type = globalNumberType ; } else if ( type . <mask> & 8 /* Boolean */ ) { type = globalBooleanType ; } else if ( type . flags & 16777216 /* ESSymbol */ ) { type = globalESSymbolType ; } return type ; }