Skip to content

Commit

Permalink
Update deprecation comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuckton committed Aug 19, 2022
1 parent a63f47c commit 146f69f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/deprecatedCompat/4.8/mergeDecoratorsAndModifiers.ts
Expand Up @@ -6,21 +6,21 @@
namespace ts {
export interface Node {
/**
* @deprecated `decorators` has been merged with `modifiers` on the declarations that support decorators.
* To test whether a `Node` can legally have decorators, use the `ts.canHaveDecorators()` function. To read the
* decorators of a `Node` that can legally have decorators, use the `ts.getDecorators()` function.
* @deprecated `decorators` has been removed from `Node` and merged with `modifiers` on the `Node` subtypes that support them.
* Use `ts.canHaveDecorators()` to test whether a `Node` subtype can have decorators.
* Use `ts.getDecorators()` to get the decorators of a `Node` subtype.
*
* For example:
* ```ts
* const decorators = ts.canHaveDecorators(node) ? ts.getDecorators(node) : undefined;
* ```
*/
readonly decorators: never;
readonly decorators?: undefined;

/**
* @deprecated `modifiers` has been removed from `Node` and moved to the specific `Node` subtypes that support them.
* To test whether a `Node` can legally have modifiers, use the `ts.canHaveModifiers()` function. To read the modifiers
* of a `Node` that can legally have modifiers, use the `ts.getModifiers()` function.
* @deprecated `modifiers` has been removed from `Node` and moved to the `Node` subtypes that support them.
* Use `ts.canHaveModifiers()` to test whether a `Node` subtype can have modifiers.
* Use `ts.getModifiers()` to get the modifiers of a `Node` subtype.
*
* For example:
* ```ts
Expand Down Expand Up @@ -212,7 +212,6 @@ namespace ts {
* @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
*/
updateExportDeclaration(node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration;

}

const MUST_MERGE: DeprecationOptions = { since: "4.8", warnAfter: "4.9.0-0", message: "Decorators have been combined with modifiers. Callers should switch to an overload that does not accept a 'decorators' parameter." };
Expand Down

0 comments on commit 146f69f

Please sign in to comment.