|
6 | 6 | namespace ts {
|
7 | 7 | export interface Node {
|
8 | 8 | /**
|
9 |
| - * @deprecated `decorators` has been merged with `modifiers` on the declarations that support decorators. |
10 |
| - * To test whether a `Node` can legally have decorators, use the `ts.canHaveDecorators()` function. To read the |
11 |
| - * decorators of a `Node` that can legally have decorators, use the `ts.getDecorators()` function. |
| 9 | + * @deprecated `decorators` has been removed from `Node` and merged with `modifiers` on the `Node` subtypes that support them. |
| 10 | + * Use `ts.canHaveDecorators()` to test whether a `Node` subtype can have decorators. |
| 11 | + * Use `ts.getDecorators()` to get the decorators of a `Node` subtype. |
12 | 12 | *
|
13 | 13 | * For example:
|
14 | 14 | * ```ts
|
15 | 15 | * const decorators = ts.canHaveDecorators(node) ? ts.getDecorators(node) : undefined;
|
16 | 16 | * ```
|
17 | 17 | */
|
18 |
| - readonly decorators: never; |
| 18 | + readonly decorators?: undefined; |
19 | 19 |
|
20 | 20 | /**
|
21 |
| - * @deprecated `modifiers` has been removed from `Node` and moved to the specific `Node` subtypes that support them. |
22 |
| - * To test whether a `Node` can legally have modifiers, use the `ts.canHaveModifiers()` function. To read the modifiers |
23 |
| - * of a `Node` that can legally have modifiers, use the `ts.getModifiers()` function. |
| 21 | + * @deprecated `modifiers` has been removed from `Node` and moved to the `Node` subtypes that support them. |
| 22 | + * Use `ts.canHaveModifiers()` to test whether a `Node` subtype can have modifiers. |
| 23 | + * Use `ts.getModifiers()` to get the modifiers of a `Node` subtype. |
24 | 24 | *
|
25 | 25 | * For example:
|
26 | 26 | * ```ts
|
@@ -212,7 +212,6 @@ namespace ts {
|
212 | 212 | * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
|
213 | 213 | */
|
214 | 214 | updateExportDeclaration(node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration;
|
215 |
| - |
216 | 215 | }
|
217 | 216 |
|
218 | 217 | 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." };
|
|
0 commit comments