-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
The following code does not work:
/**
* @template S, T
* @typedef {{
* type: string,
* humanName: string,
* keyboard: TriResourceRef,
* serverElems: Array.<S>,
* getSrvId: function(S): string,
* getTitle: function(S): string,
* getDescriptions: function(S): Array.<string>,
* getUseForGrouping: function(S): boolean,
* getDeleted: function(S): boolean,
* getCliId: function(T): string,
* convertToSrv: function(T): S,
* convertToCli: function(S): T,
* makeNewCli: function(string, Date): T,
* mergeSrvCli: function(S, T): S,
* getUpdateId: function(T): string,
* isSent: function(T): boolean,
* insertDescriptionIfMissing: function(S): S
* }}
*/
var DrgInterf;
Using the recent compiler version, it results this:
/var/folders/m0/8vx31n6j775g80_0pqhh47k40000gn/T/tmpbDmD3e:77568: ERROR - Bad type annotation. Unknown type S
* serverElems: Array.<S>,
^
Splitting the template in two template annotations does not help either.
mbrukman and L3P3