GoJS typings for version 1.7.23

I try to redefine default TextEditor and noticed that there is incorrect typings for TextEditingTool. You can compare documentation and release typings file. There are several properties(for example state) and methods(for example measureTemporaryTextBlock) that are not presented in typings.

Is it known issue?

Well, it’s now a known issue. Thanks for reporting the problem. For version 1.* the go.d.ts file is manually generated, and apparently we did not update the definition file to match the documentation. Sorry about that – we’ll fix it.

     * Gets or sets the predicate that determines whether or not a string of text is valid.
     * If this is non-null, this predicate is called in addition to any TextBlock#textValidation predicate.
     * See #isValidText for more details.
     * The default predicate is null, which is equivalent to simply returning true.
     * The function, if supplied, must not have any side-effects.
    textValidation: ((a: TextBlock, b: string, c: string) => boolean) | null;
     * Gets or sets whether to select (highlight) the editable text when the TextEditingTool is activated.
     * The default is true.
     * @since 1.5
    selectsTextOnActivate: boolean;

     * Gets or sets the state of the TextEditingTool.
     * The only accepted values are listed as constant properties of TextEditingTool, including:
     * <ul>
     *   <li>TextEditingTool#StateNone
     *   <li>TextEditingTool#StateActive
     *   <li>TextEditingTool#StateEditing
     *   <li>TextEditingTool#StateValidating
     *   <li>TextEditingTool#StateValidated
     * </ul>
     * The starting value value is TextEditingTool#StateNone,
     * TextEditingTool#doActivate sets the value to TextEditingTool#StateActive.
     * The default text editor receiving focus sets the value to TextEditingTool#StateEditing.
     * TextEditingTool#acceptText sets the value to TextEditingTool#StateValidating.
     * Once accepted and the tool begins the "TextEditing" transaction, the value is set to TextEditingTool#StateValidated.
     * @since 1.7
    state: EnumValue;

     * This method returns a temporary TextBlock used for measuring text during editing.
     * The TextBlock.text is set to the parameter's value,
     * and the TextBlock is measured with the last available width of the #textBlock.
     * Text editors can use the GraphObject#measuredBounds and TextBlock#lineCount
     * to determine a reasonable size for their text areas.
     * @param {string} text the text to measure
     * @return {TextBlock}
     * @since 1.7
    measureTemporaryTextBlock(text: string): TextBlock;

The fixed d.ts will be out in the next release. In the meantime you can use: go.d.ts · GitHub