You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#Proposal
Current emitted decorator metadata, only contains minimal typing information. My suggestion is to provide detailed information. Such as, nested type (generic type).
Example
1. resolve nested typing.
class A {
@Foo
propA: Map<string, Promise<number>>;
@Bar
propA: Map<string, Map<List<number>, boolean>>;
@Baz
methodA(): Map<Promise<number>, string>;
}
both @Foo's deisng:type and @Foo's design:returntype and each design:paramtypes should be the same.
logic:
for any generic type. Type<...Arguments> -> [Type, [...Arguments]], recursively.
2. Retrieve parameter names
new metadata design:paramnames, in the same order of design:paramtypes.
3. ParamTypes and ParamNames for class decorators
@Foo
class A {
propA: string;
methodA(): number;
}
similar to deisng:paramtypes and design:paramnames of a method decorator. It retrieves paramter types and paramnames of each property and function even props were not assigned with a initial value. param type for a method should be Function in this case.
The text was updated successfully, but these errors were encountered:
#Proposal
Current emitted decorator metadata, only contains minimal typing information. My suggestion is to provide detailed information. Such as, nested type (generic type).
Example
1. resolve nested typing.
both
@Foo
'sdeisng:type
and@Foo
'sdesign:returntype
and eachdesign:paramtypes
should be the same.resulting metadata:
logic:
for any generic type.
Type<...Arguments>
->[Type, [...Arguments]]
, recursively.2. Retrieve parameter names
new metadata
design:paramnames
, in the same order ofdesign:paramtypes
.3. ParamTypes and ParamNames for class decorators
similar to
deisng:paramtypes
anddesign:paramnames
of a method decorator. It retrieves paramter types and paramnames of each property and function even props were not assigned with a initial value. param type for a method should beFunction
in this case.The text was updated successfully, but these errors were encountered: