Comparing version 0.4.0 to 0.4.1
@@ -12,2 +12,3 @@ export * from './equals'; | ||
export * from './map-props-by-key-to-non-optional'; | ||
export * from './map-props-by-key'; | ||
export * from './map-props-by-type'; | ||
@@ -23,2 +24,3 @@ export * from './map-props-by-key-to-optional'; | ||
export * from './pick-non-never'; | ||
export * from './replace-props-by-key'; | ||
export * from './replace-props-by-type'; | ||
@@ -25,0 +27,0 @@ export * from './replace-type'; |
@@ -24,2 +24,3 @@ "use strict"; | ||
__exportStar(require("./map-props-by-key-to-non-optional"), exports); | ||
__exportStar(require("./map-props-by-key"), exports); | ||
__exportStar(require("./map-props-by-type"), exports); | ||
@@ -35,2 +36,3 @@ __exportStar(require("./map-props-by-key-to-optional"), exports); | ||
__exportStar(require("./pick-non-never"), exports); | ||
__exportStar(require("./replace-props-by-key"), exports); | ||
__exportStar(require("./replace-props-by-type"), exports); | ||
@@ -37,0 +39,0 @@ __exportStar(require("./replace-type"), exports); |
import { ReplaceType } from './replace-type'; | ||
import { KeysExtendType } from './keys-extend-type'; | ||
export declare type ReplacePropsByType<T, OldType, NewType> = { | ||
[Key in keyof T]: ReplaceType<T[Key], OldType, NewType>; | ||
[Key in keyof T]: Key extends KeysExtendType<T, OldType> ? ReplaceType<T[Key], OldType, NewType> : T[Key]; | ||
}; |
{ | ||
"name": "hotypes", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Higher order types for TypeScript", | ||
@@ -39,8 +39,8 @@ "keywords": [ | ||
"devDependencies": { | ||
"@commitlint/cli": "^12.1.4", | ||
"@commitlint/config-conventional": "^12.1.4", | ||
"@types/jest": "^26.0.23", | ||
"@typescript-eslint/eslint-plugin": "^4.28.1", | ||
"@typescript-eslint/parser": "^4.28.1", | ||
"eslint": "^7.30.0", | ||
"@commitlint/cli": "^13.1.0", | ||
"@commitlint/config-conventional": "^13.1.0", | ||
"@types/jest": "^26.0.24", | ||
"@typescript-eslint/eslint-plugin": "^4.29.1", | ||
"@typescript-eslint/parser": "^4.29.1", | ||
"eslint": "^7.32.0", | ||
"husky": "^4.3.8", | ||
@@ -51,4 +51,4 @@ "jest": "^27.0.6", | ||
"rimraf": "^3.0.2", | ||
"standard-version": "^9.3.0", | ||
"ts-jest": "^27.0.3", | ||
"standard-version": "^9.3.1", | ||
"ts-jest": "^27.0.4", | ||
"tscpaths": "^0.0.9", | ||
@@ -55,0 +55,0 @@ "tsd": "^0.17.0", |
@@ -8,3 +8,3 @@ # hotypes | ||
This means that if you don't follow the real-world use cases to create higher-order types, | ||
If you don't follow the real-world use cases to create higher-order types, | ||
you will create a lot of useless new macros. | ||
@@ -14,3 +14,3 @@ | ||
This means that higher-order types are difficult, | ||
Higher-order types are difficult, | ||
so we should not further complicate or mystify them. | ||
@@ -48,2 +48,3 @@ | ||
- MapPropsByKeyToOptional | ||
- MapPropsByKey | ||
- MapPropsByType | ||
@@ -58,2 +59,3 @@ - MapPropsExtendType | ||
- PickNonNever | ||
- ReplacePropsByKey | ||
- ReplacePropsByType | ||
@@ -60,0 +62,0 @@ - ReplaceType |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
90
190
62
19301