mirror of
https://github.com/denoland/deno.git
synced 2024-12-29 02:29:06 -05:00
8e914be742
This commit migrates repository from using "eslint" to "dlint" for linting JavaScript code.
25 lines
547 B
TypeScript
25 lines
547 B
TypeScript
// deno-lint-ignore-file
|
|
|
|
import { B } from "./subdir/more_decorators.ts";
|
|
|
|
function Decorator() {
|
|
return function (
|
|
target: Record<string, any>,
|
|
propertyKey: string,
|
|
descriptor: TypedPropertyDescriptor<any>,
|
|
) {
|
|
const originalFn: Function = descriptor.value as Function;
|
|
descriptor.value = async function (...args: any[]) {
|
|
return await originalFn.apply(this, args);
|
|
};
|
|
return descriptor;
|
|
};
|
|
}
|
|
|
|
class SomeClass {
|
|
@Decorator()
|
|
async test(): Promise<void> {}
|
|
}
|
|
|
|
new SomeClass().test();
|
|
new B().method();
|