mirror of
https://github.com/denoland/deno.git
synced 2024-11-27 16:10:57 -05:00
4f57ca0daf
This commit fixes panic in bundler which was caused by not setting thread-local slots.
22 lines
475 B
TypeScript
22 lines
475 B
TypeScript
/* eslint-disable */
|
|
|
|
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();
|