Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

as-typed

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

as-typed - npm Package Compare versions

Comparing version 0.0.0-dev.20210203020211 to 0.0.0-dev.20210203020833

27

index.d.ts

@@ -172,3 +172,3 @@ declare namespace AsTypedInternal {

: Tuple extends [infer A, ...infer Rest]
? [ResolveRecursiveInternal<A>, ...AsTypedTupleSchema<Rest>]
? [ResolveRecursive<A>, ...AsTypedTupleSchema<Rest>]
: never;

@@ -181,6 +181,3 @@

? AsTypedTupleSchema<Tuple>
: [
...AsTypedTupleSchema<Tuple>,
...Array<ResolveRecursiveInternal<Additional>>
];
: [...AsTypedTupleSchema<Tuple>, ...Array<ResolveRecursive<Additional>>];

@@ -196,6 +193,6 @@ type ResolveNot<ValueType> =

type ResolveRecursiveInternal<SchemaType> = SchemaType extends {
type ResolveRecursive<SchemaType> = SchemaType extends {
nullable: true;
}
? ResolveRecursiveInternal<Omit<SchemaType, "nullable">> | null
? ResolveRecursive<Omit<SchemaType, "nullable">> | null
: SchemaType extends SchemaDeclaration<"null">

@@ -232,3 +229,3 @@ ? null

}
? ResolveRecursiveInternal<Omit<SchemaType, "type"> & { type: Type }>
? ResolveRecursive<Omit<SchemaType, "type"> & { type: Type }>
: SchemaType extends {

@@ -238,16 +235,14 @@ type: [infer Type, ...infer Rest];

?
| ResolveRecursiveInternal<Omit<SchemaType, "type"> & { type: Type }>
| ResolveRecursiveInternal<Omit<SchemaType, "type"> & { type: Rest }>
| ResolveRecursive<Omit<SchemaType, "type"> & { type: Type }>
| ResolveRecursive<Omit<SchemaType, "type"> & { type: Rest }>
: SchemaType extends OneOf<infer Inner>
? ResolveRecursiveInternal<Inner>
? ResolveRecursive<Inner>
: SchemaType extends AnyOf<infer Inner>
? ResolveRecursiveInternal<Inner>
? ResolveRecursive<Inner>
: SchemaType extends AllOf<infer Inner>
? ResolveRecursiveInternal<UnionToIntersection<Inner>>
? ResolveRecursive<UnionToIntersection<Inner>>
: SchemaType extends IfThenElseSchema<infer If, infer Then, infer Else>
? ResolveRecursiveInternal<(If & Then) | Else>
? ResolveRecursive<(If & Then) | Else>
: SchemaType;
type ResolveRecursive<SchemaType> = ResolveRecursiveInternal<SchemaType>;
type MapPropsToRefs<RootSchema, Props> = {

@@ -254,0 +249,0 @@ [name in keyof Props]: ResolveRefs<RootSchema, Props[name]>;

{
"name": "as-typed",
"version": "0.0.0-dev.20210203020211",
"version": "0.0.0-dev.20210203020833",
"description": "Static TypeScript types from a literal JSONSchema type",

@@ -5,0 +5,0 @@ "types": "index.d.ts",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc