<commit_before>import * as React from "react";
import { 
  Button, 
  Classes, 
  EditableText,
  Icon, 
  Intent, 
  Label, 
  Overlay 
} from "@blueprintjs/core";
import styled from "styled-components";

export type EditableTitleOverlayProps = {
  defaultValue: string;
  isOpen: boolean;
  onCancel: () => void;
  onSave: (value) => void;
};

// styled blueprintjs `Icon`
const CloseIcon = styled(Icon)`
  cursor: pointer;
`; 

export class EditableTitleOverlay extends React.Component<EditableTitleOverlayProps> {
  // Needs to track the input value because in order to handle save
  // when the save button is clicked, we needed to know what the value
  // that was last entered is.
  state = {
    value: this.props.defaultValue || ""
  };

  handleChange = (value: string) => this.setState({ value });

  handleClose = () => this.props.onCancel(true);
<commit_msg>adding more typescript logic to js file<commit_after>import * as React from "react";
import { 
  Button, 
  Classes, 
  EditableText,
  Icon, 
  Intent, 
  Label, 
  Overlay 
} from "@blueprintjs/core";
import styled from "styled-components";

export type EditableTitleOverlayProps = {
  defaultValue: string;
  isOpen: boolean;
  onCancel: () => void;
  onSave: (value: string) => void;
};

export type EditableTitleOverlayState = {
  value: string;
};

// styled blueprintjs `Icon`
const CloseIcon = styled(Icon)`
  cursor: pointer;
`; 

export class EditableTitleOverlay extends React.Component<EditableTitleOverlayProps, EditableTitleOverlayState> {
  // Needs to track the input value because in order to handle save
  // when the save button is clicked, we needed to know what the value
  // that was last entered is.
  state = {
    value: this.props.defaultValue || ""
  };

  handleChange = (value: string) => this.setState({ value });

  handleClose = () => this.props.onCancel(true);

{'fraction_non_alphanumeric': 0.11254019292604502, 'fraction_numerical': 0.0, 'mean_word_length': 3.8367875647668392, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '264270', 'n_tokens_mistral': 579, 'n_tokens_neox': 568, 'n_words': 181}