/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/testdata/run/runtime_decorators.ts
42 строки
758 B
Matt Mastracci
chore: move cli/tests/ -> tests/ (#22369)
10 фев 2024, 23:22
Не верифицирован
10 фев 2024, 23:22
f5e46c9
Код
Авторство
О чём код?
// deno-lint-ignore-file function a() { console.log("@A evaluated"); return function ( target: any, propertyKey: string, descriptor: PropertyDescriptor, ) { console.log("@A called"); const fn = descriptor.value; descriptor.value = function () { console.log("fn() called from @A"); fn(); }; }; } function b() { console.log("@B evaluated"); return function ( target: any, propertyKey: string, descriptor: PropertyDescriptor, ) { console.log("@B called"); const fn = descriptor.value; descriptor.value = function () { console.log("fn() called from @B"); fn(); }; }; } class C { @a() @b() static test() { console.log("C.test() called"); } } C.test();