Comparing version 0.0.0-dev.20210203015357 to 0.0.0-dev.20210203020142
@@ -69,3 +69,3 @@ declare namespace AsTypedInternal { | ||
ReqProps extends string[], | ||
AdditionalProps extends SchemaBase | null = null | ||
AdditionalProps extends SchemaBase | boolean = false | ||
> = SchemaDeclaration<"object"> & { | ||
@@ -154,4 +154,6 @@ required?: ReqProps; | ||
AdditionalPropsSchema | ||
> = AdditionalPropsSchema extends null | ||
> = AdditionalPropsSchema extends false | ||
? unknown | ||
: AdditionalPropsSchema extends true | ||
? { [key: string]: unknown } | ||
: { [key: string]: ResolveRecursive<AdditionalPropsSchema> }; | ||
@@ -158,0 +160,0 @@ |
{ | ||
"name": "as-typed", | ||
"version": "0.0.0-dev.20210203015357", | ||
"version": "0.0.0-dev.20210203020142", | ||
"description": "Static TypeScript types from a literal JSONSchema type", | ||
@@ -5,0 +5,0 @@ "types": "index.d.ts", |
@@ -298,1 +298,10 @@ import { AsTyped } from "./index"; | ||
); | ||
assert( | ||
_ as AsTyped<{ | ||
type: "object"; | ||
properties: { b: { type: "boolean" } }; | ||
additionalProperties: true, | ||
}>, | ||
_ as { b?: boolean, [k: string]: unknown } | ||
); |
34930
897