This repository was archived by the owner on Aug 24, 2022. It is now read-only.
-
Couldn't load subscription status.
- Fork 238
This repository was archived by the owner on Aug 24, 2022. It is now read-only.
Proposal: QualifiedMethods #991
Copy link
Copy link
Open
Description
Based on my work on #988 and thoughts on #185, #623 I'd like to propose next:
Let's introduce QualifiedMethod. Qaulified method will
- store type reference and method name. It may also contain method signature
- extend function so on call will invoke target method either through signature or runtime dispatcher:
- for instance method will accept
thisreference and return function, that - for generic methods will accept generic arguments and return function, that
- will accept method arguments and call target method
- for instance method will accept
- have
Callmethod, that will accept this reference, generic argumetns and method arguments in single call for perfomance-optimised calls - have
Ofmethod, that will accept same arguments, as MethodSignature and return QualifiedMethod with stored MethodSignature. - be stored in type public interface for static methods (same as now stored static method invocators, but they will be fully compatible) and inside $InstanceMethod property of type public interface for instance method (here they will replace InterfaceMethods that currently stored in type public interface). EDITED: If there is no overrides for method in type, it will store method signature, otherwise not.
Such organisation will allow us later solve #185, #623, #990 and provide statically-typed way to call any method with specified signature from TypeScript code.
Metadata
Metadata
Assignees
Labels
No labels