Closed hermy991 closed 3 years ago
Hello, I got a error using the below code:
import { Reflect } from "https://deno.land/x/reflect_metadata@v0.1.12/mod.ts"; // deno-lint-ignore no-explicit-any type Constructor<T = unknown> = new (...args: any[]) => T; function decorator<T>(_: Constructor<T>): void {} @decorator class Example { constructor(a: string, b: number, c: Example) {} } console.log(Reflect.getMetadata("design:paramtypes", Example));
Error:
error: TS2339 [ERROR]: Property 'toPrimitive' does not exist on type 'never'. const toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive"; ~~~~~~~~~~~ at https://deno.land/x/reflect_metadata@v0.1.12-1/Reflect.ts:670:63 TS2339 [ERROR]: Property 'toPrimitive' does not exist on type 'never'. const toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive"; ~~~~~~~~~~~ at https://deno.land/x/reflect_metadata@v0.1.12-1/Reflect.ts:670:100 TS2339 [ERROR]: Property 'iterator' does not exist on type 'never'. const iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator"; ~~~~~~~~ at https://deno.land/x/reflect_metadata@v0.1.12-1/Reflect.ts:671:60 TS2339 [ERROR]: Property 'iterator' does not exist on type 'never'. const iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator"; ~~~~~~~~ at https://deno.land/x/reflect_metadata@v0.1.12-1/Reflect.ts:671:94 Found 4 errors.
Is it a Deno ?
Thanks for reporting this! I've merged #5, which should fix this in version v0.1.12-2. Could you give it a try and let me know if this issue is fixed for you?
Works ok, and thank you for this library.
Hello, I got a error using the below code:
Error:
Is it a Deno ?