@smithy/types
Advanced tools
Comparing version 2.11.0 to 2.12.0
import { Command } from "./command"; | ||
import { MiddlewareStack } from "./middleware"; | ||
import { MetadataBearer } from "./response"; | ||
import { Exact } from "./util"; | ||
import { OptionalParameter } from "./util"; | ||
/** | ||
@@ -11,3 +11,3 @@ * @public | ||
*/ | ||
export type CheckOptionalClientConfig<T> = Exact<Partial<T>, T> extends true ? [] | [T] : [T]; | ||
export type CheckOptionalClientConfig<T> = OptionalParameter<T>; | ||
/** | ||
@@ -14,0 +14,0 @@ * @public |
import { Command } from "./command"; | ||
import { MiddlewareStack } from "./middleware"; | ||
import { MetadataBearer } from "./response"; | ||
import { Exact } from "./util"; | ||
import { OptionalParameter } from "./util"; | ||
/** | ||
@@ -11,8 +11,3 @@ * @public | ||
*/ | ||
export type CheckOptionalClientConfig<T> = Exact<Partial<T>, T> extends true ? [ | ||
] | [ | ||
T | ||
] : [ | ||
T | ||
]; | ||
export type CheckOptionalClientConfig<T> = OptionalParameter<T>; | ||
/** | ||
@@ -19,0 +14,0 @@ * @public |
@@ -181,1 +181,13 @@ import { Endpoint } from "./http"; | ||
} | ||
/** | ||
* @public | ||
* | ||
* Indicates the parameter may be omitted if the parameter object T | ||
* is equivalent to a Partial<T>, i.e. all properties optional. | ||
*/ | ||
export type OptionalParameter<T> = Exact<Partial<T>, T> extends true ? [ | ||
] | [ | ||
T | ||
] : [ | ||
T | ||
]; |
@@ -170,1 +170,8 @@ import { Endpoint } from "./http"; | ||
} | ||
/** | ||
* @public | ||
* | ||
* Indicates the parameter may be omitted if the parameter object T | ||
* is equivalent to a Partial<T>, i.e. all properties optional. | ||
*/ | ||
export type OptionalParameter<T> = Exact<Partial<T>, T> extends true ? [] | [T] : [T]; |
{ | ||
"name": "@smithy/types", | ||
"version": "2.11.0", | ||
"version": "2.12.0", | ||
"scripts": { | ||
@@ -27,3 +27,3 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", | ||
"dependencies": { | ||
"tslib": "^2.5.0" | ||
"tslib": "^2.6.2" | ||
}, | ||
@@ -30,0 +30,0 @@ "engines": { |
233221
6425
0
Updatedtslib@^2.6.2