diff --git a/README.md b/README.md index 47f9c9a..1db9e5a 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,17 @@ $ npm i -D @oshx/type-helper Please add below in `tsconfig.json` file. ```json +{ + "compilerOptions": { + "typeRoots": [ + "node_modules/@oshx" + ] + } +} +``` + +If your TypeScript doesn't accept that type, then add below. +```json { "compilerOptions": { "typeRoots": [ diff --git a/index.d.ts b/index.d.ts index 0a51dcc..7f31b60 100644 --- a/index.d.ts +++ b/index.d.ts @@ -32,9 +32,9 @@ declare type ObjectValue = T[ObjectKey] */ declare type PropsWithClassName< T extends object = object, - ClassNameType = string | undefined + ClassNameType = string > = { - className: ClassNameType + className?: ClassNameType } & T /** The simple `Any function` declaration. diff --git a/package.json b/package.json index 5f5156e..20c1455 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@oshx/type-helper", - "version": "1.0.5", + "version": "1.0.6", "description": "Types help TypeScript types.", "repository": { "type": "git",