From c4006e302ca77320b63dafaa55b79b02d3b3fca2 Mon Sep 17 00:00:00 2001 From: DasProffi <67233923+DasProffi@users.noreply.github.com> Date: Mon, 24 Nov 2025 12:41:45 +0100 Subject: [PATCH] feat: limit typing to prevent errors --- CHANGELOG.md | 7 ++++++- examples/translations/translations.ts | 7 +++---- package.json | 2 +- src/types.ts | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cadf39..9c3159f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.3.0] - 2025-11-23 +## [0.2.2] - 2025-11-24 + +### Changed +- Updated the values parameter type of TranslationEntries to be more specific as a `Record` rather than a `object` + +## [0.2.1] - 2025-11-23 ### Added - Added error logging and catching diff --git a/examples/translations/translations.ts b/examples/translations/translations.ts index 9c76fce..6975fb3 100644 --- a/examples/translations/translations.ts +++ b/examples/translations/translations.ts @@ -1,9 +1,9 @@ // AUTO-GENERATED. DO NOT EDIT. /* eslint-disable @stylistic/quote-props */ /* eslint-disable no-useless-escape */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -import type { Translation } from '@helpwave/internationalization' -import { TranslationGen } from '@helpwave/internationalization' + +import type { Translation } from 'src/index' +import { TranslationGen } from 'src/index' export const exampleTranslationLocales = ['de-DE', 'en-US', 'fr-FR'] as const @@ -214,4 +214,3 @@ export const exampleTranslation: Translation string) +export type TranslationEntry = string | ((values: Record) => string) export type TranslationEntries = Record