{ for(var i=0; i< deprecations.length; i++){ if(deprecations[i].value.indexOf(item)>-1){ return false; } } return true; }); } //Method to add the class we need to stamp on the type. //The modified return array is passed to type.tmpl which will render the class. var modifyArrayWithDeprecationInfo = function (types, deprecations, type){ var className = 'deprecated-hidden-only' //ts deprecated default class; if(type =="js"){ className = "jsdeprecated-hidden-only"; } let result = []; let isDep = false; types.forEach(type => { isDep = false; for(var i=0; i< deprecations.length; i++){ if(deprecations[i].value.indexOf(type)>-1){ isDep = true; } } if(isDep){ result.push({type: type, className: className}); }else{ result.push(type); } }); return result; } // figure out if we have any type deprecations. if(tsdeprecations){ tsdeprecations.forEach(function(deprecation){ if (deprecation.target === 'parameterType' || deprecation.target ==='propertyType'){ since = deprecation.since; removeBasedonSince = !since || self.convertSemverToInt32(since) <= self.convertSemverToInt32('6.0.0'); if(removeBasedonSince){ //is it deprecated prior to typescript? if so, it goes only in jsdoc. jsDeprecations.push(deprecation); allDeprecations.push(deprecation); } else{ //else it goes in deprecation doc. tsOnlyDeprecations.push(deprecation); allDeprecations.push(deprecation); } } }); } var cleanSig = null; var tsdeprecatedSig = null; var jsdeprecatedSig = null; if(tssignatures && tssignatures.length){ tssignatures.forEach(function(signature){ if(signature.target.toLowerCase() === 'type'){ if(signature.consumedBy === 'ts' || !signature.consumedBy){ cleanSig = signature.value; } else if(signature.consumedBy === 'tsdep'){ tsdeprecatedSig = signature.value; } else if(signature.consumedBy === 'js'){ jsdeprecatedSig = signature.value; } } }); } var isSomethingDeprecated = allDeprecations.length > 0 ? true: false; var isJSOnlyDeprecated = jsDeprecations.length > 0 ? true: false; var isTSeprecated = tsOnlyDeprecations.length > 0 ? true: false; var isSomeSignature = cleanSig || tsdeprecatedSig || jsdeprecatedSig; if(isSomeSignature){ //in this case we depend on the new ojsignature format to support all the different variations //of signatures for ts/deprecated/and jsdoc if(cleanSig && !tsdeprecatedSig && !jsdeprecatedSig){ //there is no deprecation. We are just using our default signature everywhere.?>
Deprecated:
Deprecated:
Deprecated:
Deprecated: