<commit_before>// @flow

import * as React from 'react'
import moment from 'moment-timezone'
import delay from 'delay'

type Props = {
	interval: number, // ms
	timezone?: string,
} & (
	| {
			moment?: true,
			render: ({
				now: moment,
				loading: boolean,
				refresh: () => mixed,
			}) => React.Node,
	  }
	| {
			moment?: false,
			render: ({
				now: Date,
				loading: boolean,
				refresh: () => mixed,
			}) => React.Node,
	  }
)

type State = {
	now: Date,
	loading: boolean,
}

export class Timer extends React.Component<Props, State> {
	_intervalId: ?IntervalID
	_timeoutId: ?TimeoutID

	state = {
		now: new Date(),
		loading: false,
	}
<commit_msg>require the [moment] prop<commit_after>// @flow

import * as React from 'react'
import moment from 'moment-timezone'
import delay from 'delay'

type Props = {
	interval: number, // ms
	timezone?: string,
} & (
	| {
			moment: true,
			render: ({
				now: moment,
				loading: boolean,
				refresh: () => mixed,
			}) => React.Node,
	  }
	| {
			moment: false,
			render: ({
				now: Date,
				loading: boolean,
				refresh: () => mixed,
			}) => React.Node,
	  }
)

type State = {
	now: Date,
	loading: boolean,
}

export class Timer extends React.Component<Props, State> {
	_intervalId: ?IntervalID
	_timeoutId: ?TimeoutID

	state = {
		now: new Date(),
		loading: false,
	}

{'fraction_non_alphanumeric': 0.15201192250372578, 'fraction_numerical': 0.0, 'mean_word_length': 2.9040697674418605, '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': '7282968', 'n_tokens_mistral': 544, 'n_tokens_neox': 471, 'n_words': 131}