New utils

This commit is contained in:
Aleksandr Kraiz
2022-11-28 17:50:20 +04:00
parent 54b6425dc6
commit 1a33c41993
5 changed files with 19 additions and 1 deletions

4
src/utils/toUpperCase.ts Normal file
View File

@@ -0,0 +1,4 @@
export default function toUpperCase<T extends string>(str: T): Uppercase<T> {
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
return str.toUpperCase() as Uppercase<T>;
}