@@ -1684,8 +1684,15 @@ export class PrincipalClass extends PrimitiveType<PrincipalId> {
16841684 }
16851685}
16861686
1687- type GenericFuncArgs = [ Type , ...Type [ ] ] | [ ] ;
1688- type GenericFuncRets = [ Type , ...Type [ ] ] | [ ] ;
1687+ /**
1688+ * The generic type of the arguments of an {@link Func|IDL Function}.
1689+ */
1690+ export type GenericIdlFuncArgs = [ Type , ...Type [ ] ] | [ ] ;
1691+
1692+ /**
1693+ * The generic type of the return values of an {@link Func|IDL Function}.
1694+ */
1695+ export type GenericIdlFuncRets = [ Type , ...Type [ ] ] | [ ] ;
16891696
16901697/**
16911698 * Represents an IDL function reference.
@@ -1694,8 +1701,8 @@ type GenericFuncRets = [Type, ...Type[]] | [];
16941701 * @param annotations Function annotations.
16951702 */
16961703export class FuncClass <
1697- Args extends GenericFuncArgs = GenericFuncArgs ,
1698- Rets extends GenericFuncRets = GenericFuncRets ,
1704+ Args extends GenericIdlFuncArgs = GenericIdlFuncArgs ,
1705+ Rets extends GenericIdlFuncRets = GenericIdlFuncRets ,
16991706> extends ConstructType < [ PrincipalId , string ] > {
17001707 get typeName ( ) {
17011708 return IdlTypeName . FuncClass ;
@@ -1806,11 +1813,14 @@ export class FuncClass<
18061813 }
18071814}
18081815
1809- type GenericServiceFields = Record < string , FuncClass > ;
1816+ /**
1817+ * The generic type of the fields of an {@link Service|IDL Service}.
1818+ */
1819+ export type GenericIdlServiceFields = Record < string , FuncClass > ;
18101820
18111821export class ServiceClass <
18121822 K extends string = string ,
1813- Fields extends GenericServiceFields = GenericServiceFields ,
1823+ Fields extends GenericIdlServiceFields = GenericIdlServiceFields ,
18141824> extends ConstructType < PrincipalId > {
18151825 get typeName ( ) {
18161826 return IdlTypeName . ServiceClass ;
@@ -2327,8 +2337,8 @@ export function Rec(): RecClass {
23272337 * @returns new FuncClass
23282338 */
23292339export function Func <
2330- Args extends GenericFuncArgs = GenericFuncArgs ,
2331- Ret extends GenericFuncRets = GenericFuncRets ,
2340+ Args extends GenericIdlFuncArgs = GenericIdlFuncArgs ,
2341+ Ret extends GenericIdlFuncRets = GenericIdlFuncRets ,
23322342> ( args : Args , ret : Ret , annotations : string [ ] = [ ] ) : FuncClass < Args , Ret > {
23332343 return new FuncClass ( args , ret , annotations ) ;
23342344}
@@ -2340,7 +2350,7 @@ export function Func<
23402350 */
23412351export function Service <
23422352 K extends string = string ,
2343- Fields extends GenericServiceFields = GenericServiceFields ,
2353+ Fields extends GenericIdlServiceFields = GenericIdlServiceFields ,
23442354> ( t : Fields ) : ServiceClass < K , Fields > {
23452355 return new ServiceClass ( t ) ;
23462356}
0 commit comments