@@ -491,16 +491,15 @@ export function modelProperty (declaration: PropertySignature | PropertyDeclarat
491
491
}
492
492
493
493
/**
494
- * Pulls @obsolete and @obsolete_description from types and properties
494
+ * Pulls @deprecated from types and properties
495
495
*/
496
- function setObsolete ( type : model . BaseType | model . Property | model . EnumMember , tags : Record < string , string > ) : void {
497
- const obsolete = tags . obsolete
498
- const description = tags . obsolete_description
499
- if ( obsolete !== undefined ) {
500
- type . deprecation = { version : obsolete , description : description }
496
+ function setDeprecated ( type : model . BaseType | model . Property | model . EnumMember , tags : Record < string , string > , jsDocs : JSDoc [ ] ) : void {
497
+ if ( tags . deprecated !== undefined ) {
498
+ const [ version , ... description ] = tags . deprecated . split ( ' ' )
499
+ assert ( jsDocs , semver . valid ( version ) , 'Invalid semver value' )
500
+ type . deprecation = { version, description : description . join ( ' ' ) }
501
501
}
502
- delete tags . obsolete
503
- delete tags . obsolete_description
502
+ delete tags . deprecated
504
503
}
505
504
506
505
/**
@@ -515,7 +514,7 @@ function setTags<TType extends model.BaseType | model.Property | model.EnumMembe
515
514
) : void {
516
515
if ( Object . keys ( tags ) . length === 0 ) return
517
516
518
- setObsolete ( type , tags )
517
+ setDeprecated ( type , tags , jsDocs )
519
518
const badTags = Object . keys ( tags ) . filter ( tag => ! validTags . includes ( tag ) )
520
519
assert (
521
520
jsDocs ,
0 commit comments