@faast/ts-common
Advanced tools
Comparing version 0.5.3 to 0.5.4
@@ -17,5 +17,2 @@ import { UnionType, IntersectionType } from 'io-ts'; | ||
} | ||
function stringifyNested(types, delim) { | ||
return types.map((type) => type.name).join(delim); | ||
} | ||
function getContextTypeName(context) { | ||
@@ -28,7 +25,4 @@ if (context.length <= 0) { | ||
if (isCodec(parent, UnionType)) { | ||
return stringifyNested(parent.types, ' | '); | ||
return parent.name; | ||
} | ||
else if (isCodec(parent, IntersectionType)) { | ||
return stringifyNested(parent.types, ' & '); | ||
} | ||
} | ||
@@ -35,0 +29,0 @@ return context[context.length - 1].type.name; |
{ | ||
"name": "@faast/ts-common", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"description": "Common typescript types and utils used by faast", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -23,6 +23,2 @@ import { Context, ValidationError, UnionType, IntersectionType, Type } from 'io-ts' | ||
function stringifyNested(types: any[], delim: string): string { | ||
return types.map((type: Type<any>) => type.name).join(delim) | ||
} | ||
function getContextTypeName(context: Context): string { | ||
@@ -35,5 +31,3 @@ if (context.length <= 0) { | ||
if (isCodec(parent, UnionType)) { | ||
return stringifyNested(parent.types, ' | ') | ||
} else if (isCodec(parent, IntersectionType)) { | ||
return stringifyNested(parent.types, ' & ') | ||
return parent.name | ||
} | ||
@@ -40,0 +34,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
868540
10451