Reflectable currently generates code that uses the parameter type dynamic in a number of generated function literals, even though they are stored in the reflectable "database" and will be used in a type specific manner: A function literal that enables reflective invocation of foo on an instance of Foo may have the form (o) => o.foo, but it could be (Foo o) => o.foo.
Using explicit types will be much more friendly to static analysis, and in particular to tree-shaking, because it is then known at compile-time that this function literal body won't access any other members named foo than the one in Foo, which may allow some other members named foo to be eliminated from the compiled program.
Reflectable currently generates code that uses the parameter type
dynamicin a number of generated function literals, even though they are stored in the reflectable "database" and will be used in a type specific manner: A function literal that enables reflective invocation offooon an instance ofFoomay have the form(o) => o.foo, but it could be(Foo o) => o.foo.Using explicit types will be much more friendly to static analysis, and in particular to tree-shaking, because it is then known at compile-time that this function literal body won't access any other members named
foothan the one inFoo, which may allow some other members namedfooto be eliminated from the compiled program.