Fix errors from Microsoft/TypeScript#30769 (#34784)

This commit is contained in:
Nathan Shively-Sanders 2019-04-16 15:29:21 -07:00 committed by GitHub
parent 6227f1fa8d
commit b8d656e3ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,7 @@
function createStruct<K extends keyof LibreOffice.StructNameMap>(strTypeName: K): LibreOffice.StructNameMap[K] {
const classSize = coreReflection.forName(strTypeName);
const aStruct: [LibreOffice.StructNameMap[K]] = [] as any;
const aStruct: [LibreOffice.InstantiableNameMap[K]] = [] as any;
classSize.createObject(aStruct);
return aStruct[0];
}

View File

@ -779,7 +779,7 @@ class MyCustomBody extends React.Component<MyCustomBodyProps> implements ModalBo
getFieldValue() {
const newRow: Partial<Product> = {};
this.props.columns.forEach((column, i) => {
newRow[column.field] = (this.refs[column.field] as HTMLInputElement).value;
newRow[column.field] = (this.refs[column.field] as HTMLInputElement).value as number & string;
}, this);
return newRow as Product;
}