From 65a9bd4f8fdef969b383f7e69c611cf7d35ec965 Mon Sep 17 00:00:00 2001 From: Philipp Keck Date: Sat, 9 May 2026 18:48:09 +0200 Subject: [PATCH] Add back missing import of Formatter type Fixes https://github.com/nmn/react-timeago/issues/234. https://github.com/nmn/react-timeago/pull/231 had turned the `import type` line into an `export type` line to re-export the types, but missed that [re-exported types "do not become available inside the current module"](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export#re-exporting_aggregating), yet the `Formatter` type is actually used within the same file. --- CHANGELOG.md | 3 +++ package.json | 2 +- src/index.js | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57d4cd9..8e0904d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +#### v8.3.1 +- Add back missing import for `Formatter` type + #### v8.3.0 - Exported Formatter, Unit, and Suffix types which were present in v7 diff --git a/package.json b/package.json index 72d0b44..0d5d5ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-timeago", - "version": "8.3.0", + "version": "8.3.1", "description": "A simple Time-Ago component for ReactJs", "main": "lib/index.js", "types": "es6/index.d.ts", diff --git a/src/index.js b/src/index.js index a83e53d..460b092 100644 --- a/src/index.js +++ b/src/index.js @@ -5,6 +5,7 @@ import { useEffect, useState } from 'react' import dateParser from './dateParser' import defaultFormatter from './defaultFormatter' export type { Formatter, Suffix, Unit } from './types' +import type { Formatter } from './types' export type Props = $ReadOnly<{ /** If the component should update itself over time */