core-types-suretype
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -90,5 +90,5 @@ "use strict"; | ||
{ | ||
title: 'These cyclic types need to be treated as raw ' + | ||
'JSON Schema', | ||
description: 'Cyclic types cannot be deduced from ' + | ||
description: 'These cyclic types need to be treated as raw ' + | ||
'JSON Schema\n\n' + | ||
'Cyclic types cannot be deduced from ' + | ||
'typeof in TypeScript', | ||
@@ -186,4 +186,4 @@ }) | ||
return core_types_ts_1.helpers.wrapAnnotations(exportNode, { | ||
title: `## Validate that a variable is a ${typeName}`, | ||
description: '@returns ValidationResult', | ||
description: `## Validate that a variable is a ${typeName}\n\n` + | ||
'@returns ValidationResult', | ||
}); | ||
@@ -207,4 +207,5 @@ } | ||
return core_types_ts_1.helpers.wrapAnnotations(exportNode, { | ||
title: `## Ensure a variable is a ${typeName}`, | ||
description: [ | ||
`## Ensure a variable is a ${typeName}`, | ||
'', | ||
'This call will throw a ValidationError if the ' + | ||
@@ -232,4 +233,4 @@ `variable isn't a ${typeName}.`, | ||
return core_types_ts_1.helpers.wrapAnnotations(exportNode, { | ||
title: `## Validates that a variable is a ${typeName}`, | ||
description: '@returns boolean', | ||
description: `## Validates that a variable is a ${typeName}\n\n` + | ||
'@returns boolean', | ||
}); | ||
@@ -250,3 +251,3 @@ } | ||
? exportNode | ||
: core_types_ts_1.helpers.wrapAnnotations(exportNode, { title: `The validation schema for a ${typeName}` }); | ||
: core_types_ts_1.helpers.wrapAnnotations(exportNode, { description: `The validation schema for a ${typeName}` }); | ||
} | ||
@@ -261,3 +262,3 @@ function createValidatorSchema(ctx, exportSchema, typeName, validatorSchemaName, schemaObject) { | ||
? exportNode | ||
: core_types_ts_1.helpers.wrapAnnotations(exportNode, { title: `The validation schema for a ${typeName}` }); | ||
: core_types_ts_1.helpers.wrapAnnotations(exportNode, { description: `The validation schema for a ${typeName}` }); | ||
} | ||
@@ -264,0 +265,0 @@ function createValidator(ctx, def, { topLevelName, required = false, includeAnnotations = true, } = {}) { |
{ | ||
"name": "core-types-suretype", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "core-types ⬌ SureType validator conversion", | ||
@@ -42,5 +42,5 @@ "author": "Gustaf Räntilä", | ||
"@types/json-schema": "^7.0.9", | ||
"core-types": "^1.9.1", | ||
"core-types-json-schema": "^1.6.0", | ||
"core-types-ts": "^1.4.1", | ||
"core-types": "^1.10.0", | ||
"core-types-json-schema": "^1.6.1", | ||
"core-types-ts": "^1.5.0", | ||
"json-schema-cycles": "^1.1.0", | ||
@@ -47,0 +47,0 @@ "jsonpos": "^1.1.0", |
59815
1071
Updatedcore-types@^1.10.0
Updatedcore-types-ts@^1.5.0