-
Couldn't load subscription status.
- Fork 128
Open
Description
I was using @deepkit/type and found a problem with function hoisting reflections.
import { ReflectionFunction } from "@deepkit/type";
ReflectionFunction.from(system).getParameters(); // returns: []
function system(foo: string) {
return foo
}So I made a fork and tried to fix the issue. It kinda worked:
import { ReflectionFunction } from "@deepkit/type";
ReflectionFunction.from(system).getParameters(); // returns: [ ReflectionParameter { parameter: { kind ...
function system(foo: string) {
return foo
}But now, this is a issue:
import { ReflectionFunction } from "@deepkit/type";
console.log(ReflectionFunction.from(system).getParameters()); // ReferenceError: Cannot access '__ΩFoo' before initialization
class Bar {}
type Foo = Bar
function system(foo: Foo) {
return foo
}So should we hoist everything to make it work? or leave it be?
Metadata
Metadata
Assignees
Labels
No labels