Expicit use of generics in test file

This commit is contained in:
Zev Spitz
2017-09-10 17:09:38 +02:00
parent b16e5f2685
commit 35f1f664af

View File

@@ -125,7 +125,7 @@
objCellText.insertString(objCellCursor, strText, false);
}
function createStruct<K extends keyof LibreOffice.StructNameMap>(strTypeName: K) {
function createStruct<K extends keyof LibreOffice.StructNameMap>(strTypeName: K): LibreOffice.StructNameMap[K] {
const classSize = coreReflection.forName(strTypeName);
const aStruct: [LibreOffice.StructNameMap[K]] = [] as any;
classSize.createObject(aStruct);