Fix incorrect details in lib.decorators (#60252)

This commit is contained in:
Joe Pea 2024-11-01 12:02:04 -07:00 коммит произвёл GitHub
Родитель 3e6171833e
Коммит 248c8f5f99
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 13 добавлений и 15 удалений

28
src/lib/decorators.d.ts поставляемый
Просмотреть файл

@ -92,9 +92,9 @@ interface ClassMethodDecoratorContext<
};
/**
* Adds a callback to be invoked either before static initializers are run (when
* decorating a `static` element), or before instance initializers are run (when
* decorating a non-`static` element).
* Adds a callback to be invoked either after static methods are defined but before
* static initializers are run (when decorating a `static` element), or before instance
* initializers are run (when decorating a non-`static` element).
*
* @example
* ```ts
@ -158,9 +158,9 @@ interface ClassGetterDecoratorContext<
};
/**
* Adds a callback to be invoked either before static initializers are run (when
* decorating a `static` element), or before instance initializers are run (when
* decorating a non-`static` element).
* Adds a callback to be invoked either after static methods are defined but before
* static initializers are run (when decorating a `static` element), or before instance
* initializers are run (when decorating a non-`static` element).
*/
addInitializer(initializer: (this: This) => void): void;
@ -205,9 +205,9 @@ interface ClassSetterDecoratorContext<
};
/**
* Adds a callback to be invoked either before static initializers are run (when
* decorating a `static` element), or before instance initializers are run (when
* decorating a non-`static` element).
* Adds a callback to be invoked either after static methods are defined but before
* static initializers are run (when decorating a `static` element), or before instance
* initializers are run (when decorating a non-`static` element).
*/
addInitializer(initializer: (this: This) => void): void;
@ -261,9 +261,8 @@ interface ClassAccessorDecoratorContext<
};
/**
* Adds a callback to be invoked either before static initializers are run (when
* decorating a `static` element), or before instance initializers are run (when
* decorating a non-`static` element).
* Adds a callback to be invoked immediately after the auto `accessor` being
* decorated is initialized (regardless if the `accessor` is `static` or not).
*/
addInitializer(initializer: (this: This) => void): void;
@ -358,9 +357,8 @@ interface ClassFieldDecoratorContext<
};
/**
* Adds a callback to be invoked either before static initializers are run (when
* decorating a `static` element), or before instance initializers are run (when
* decorating a non-`static` element).
* Adds a callback to be invoked immediately after the field being decorated
* is initialized (regardless if the field is `static` or not).
*/
addInitializer(initializer: (this: This) => void): void;