Library + UI for generating Typescript definitions / DefinitelyTyped packages from COM type libraries / LibreOffice Doxygen XML
12
stars
4
forks
source link
Define collection types as extending a Collection interface #84
Open
zspitz opened 6 years ago
e.g.
could be defined as:
[Playground](http://www.typescriptlang.org/play/index.html#src=declare%20class%20CollectionBase%3CTItem%2C%20TKey%20%3D%20number%3E%20%7B%0D%0A%20%20%20%20readonly%20Count%3A%20number%3B%0D%0A%20%20%20%20Item(Index%3A%20TKey)%3A%20TItem%3B%0D%0A%7D%0D%0A%0D%0Adeclare%20namespace%20Word%20%7B%0D%0A%20%20%20%20class%20Shape%20%7B%0D%0A%20%20%20%20%20%20%20%20private%20'Word.Shape_typekey'%3A%20Shape%3B%0D%0A%20%20%20%20%20%20%20%20private%20constructor()%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20class%20GroupShapes%20extends%20CollectionBase%3CShape%2C%20any%3E%20%7B%0D%0A%20%20%20%20%20%20%20%20private%20'Word.GroupShapes_typekey'%3A%20GroupShapes%3B%0D%0A%20%20%20%20%20%20%20%20private%20constructor()%3B%0D%0A%20%20%20%20%20%20%20%20readonly%20Creator%3A%20number%3B%0D%0A%20%20%20%20%20%20%20%20readonly%20Parent%3A%20any%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A)
Check first that the class has all the members of the Collection class.