@trebco/treb 21.4.0 → 21.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/treb.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /*! API v21.4. Copyright 2018-2022 trebco, llc. All rights reserved. LGPL: https://treb.app/license */
1
+ /*! API v21.5. Copyright 2018-2022 trebco, llc. All rights reserved. LGPL: https://treb.app/license */
2
2
 
3
3
  /**
4
4
  * Global instance. In the base script, this object will be created as an
@@ -606,13 +606,22 @@ export declare class EmbeddedSpreadsheet {
606
606
  ClearName(name: string): void;
607
607
 
608
608
  /**
609
- * Create a named range.
609
+ * Create a named range or named expression. A named range refers to an
610
+ * address or range. A named expression can be a value or formula, basically
611
+ * anything you would type into a cell.
610
612
  *
611
- * @param range leave undefined to use current selection
613
+ * @param value range, value or expression
614
+ *
615
+ * @remarks
616
+ *
617
+ * This function used to support passing `undefined` as the value,
618
+ * which meant "create a named range using current selection". We don't
619
+ * support that any more but you can accompilsh that with
620
+ * `sheet.DefineName("Name", sheet.GetSelection())`.
612
621
  *
613
622
  * @public
614
623
  */
615
- DefineName(name: string, range?: RangeReference): void;
624
+ DefineName(name: string, value: RangeReference | CellValue): void;
616
625
 
617
626
  /**
618
627
  * Set or remove a link in a cell.