<commit_before>/**
 * @fileoverview
 * Contains types and objects necessary for Soy-Idom runtime.
 */

import {assert} from 'goog:goog.asserts';  // from //javascript/closure/asserts
import {IjData} from 'goog:goog.soy';      // from //javascript/closure/soy
import SanitizedContentKind from 'goog:goog.soy.data.SanitizedContentKind'; // from //javascript/closure/soy:data
import {IdomFunctionMembers} from 'goog:soydata';  // from //javascript/template/soy:soy_usegoog_js
import * as incrementaldom from 'incrementaldom';  // from //third_party/javascript/incremental_dom:incrementaldom

import {IncrementalDomRenderer, patchOuter} from './api_idom';
import {isTaggedForSkip} from './global';

/** Function that executes Idom instructions */
export type PatchFunction = (a?: {}) => void;

/** Function that executes before a patch and determines whether to proceed. */
export type SkipHandler = <T>(prev: T, next: T) => boolean;

/** Base class for a Soy element. */
export abstract class SoyElement<TData extends {}|null, TInterface extends {}> {
  // Node in which this object is stashed.
  private node: HTMLElement|null = null;
  private skipHandler:<commit_msg>broaden the type of PatchFunction<commit_after>/**
 * @fileoverview
 * Contains types and objects necessary for Soy-Idom runtime.
 */

import {assert} from 'goog:goog.asserts';  // from //javascript/closure/asserts
import {IjData} from 'goog:goog.soy';      // from //javascript/closure/soy
import SanitizedContentKind from 'goog:goog.soy.data.SanitizedContentKind'; // from //javascript/closure/soy:data
import {IdomFunctionMembers} from 'goog:soydata';  // from //javascript/template/soy:soy_usegoog_js
import * as incrementaldom from 'incrementaldom';  // from //third_party/javascript/incremental_dom:incrementaldom

import {IncrementalDomRenderer, patchOuter} from './api_idom';
import {isTaggedForSkip} from './global';

/** Function that executes Idom instructions */
export type PatchFunction = (a?: unknown) => void;

/** Function that executes before a patch and determines whether to proceed. */
export type SkipHandler = <T>(prev: T, next: T) => boolean;

/** Base class for a Soy element. */
export abstract class SoyElement<TData extends {}|null, TInterface extends {}> {
  // Node in which this object is stashed.
  private node: HTMLElement|null = null;
  private skipHandler:
{'fraction_non_alphanumeric': 0.12378126324713862, 'fraction_numerical': 0.0, 'mean_word_length': 4.686746987951807, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7033816', 'n_tokens_mistral': 719, 'n_tokens_neox': 688, 'n_words': 216}