mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
14 lines
252 B
TypeScript
14 lines
252 B
TypeScript
// deno-lint-ignore-file
|
|
|
|
function Decorate() {
|
|
return function (constructor: any): any {
|
|
return class extends constructor {
|
|
protected someField: string = "asdf";
|
|
};
|
|
};
|
|
}
|
|
|
|
@Decorate()
|
|
class SomeClass {}
|
|
|
|
console.log(new SomeClass());
|