TypeScript support for TableCell.setBold() TableCell.setFontSize()
jmatthewpryor opened this issue · comments
J. Matthew Pryor commented
When I use TypeScript support, I get errors about missing functions on the Document API
It seems like gas-types-detailed
does not define TableCell.setBold()
and TableCell.setFontSize()
Are there workarounds? It is very helpful to have the type checking of TypeScript
If I stay in JavaScript and compile and deploy, those functions both work in the deployed code
J. Matthew Pryor commented
Answering my own question, turns out that I need to use setAttributes()
e.g.
var styleFont10 = {};
styleFont10[DocumentApp.Attribute.FONT_SIZE] = 10;
cell1.setBackgroundColor('#dddddd').setAttributes(styleFont10); // Set font size and other properties