@travetto/schema 8.0.0-alpha.10 → 8.0.0-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/schema",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Data type registry for runtime validation, reflection and binding.",
|
|
6
6
|
"keywords": [
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"directory": "module/schema"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@travetto/registry": "^8.0.0-alpha.
|
|
31
|
+
"@travetto/registry": "^8.0.0-alpha.11"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@travetto/transformer": "^8.0.0-alpha.
|
|
34
|
+
"@travetto/transformer": "^8.0.0-alpha.7"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
37
37
|
"@travetto/transformer": {
|
|
@@ -74,7 +74,13 @@ class ${uniqueId} extends ${type.mappedClassName} {
|
|
|
74
74
|
description: type.comment
|
|
75
75
|
})),
|
|
76
76
|
],
|
|
77
|
-
id,
|
|
77
|
+
id,
|
|
78
|
+
[],
|
|
79
|
+
type.extendsFrom ? [
|
|
80
|
+
state.factory.createHeritageClause(ts.SyntaxKind.ExtendsKeyword, [
|
|
81
|
+
state.factory.createExpressionWithTypeArguments(state.getOrImport(type.extendsFrom), [])
|
|
82
|
+
])
|
|
83
|
+
] : [],
|
|
78
84
|
Object.entries(type.fieldTypes)
|
|
79
85
|
.map(([key, value]) =>
|
|
80
86
|
this.computeInput(state, state.factory.createPropertyDeclaration(
|
|
@@ -350,10 +356,9 @@ class ${uniqueId} extends ${type.mappedClassName} {
|
|
|
350
356
|
targetType = returnType.typeArguments[0];
|
|
351
357
|
}
|
|
352
358
|
|
|
353
|
-
// TODO: Standardize this using jsdoc
|
|
354
359
|
let innerReturnType: AnyType | undefined;
|
|
355
|
-
if (targetType.key === 'managed' && targetType.
|
|
356
|
-
innerReturnType = state.getApparentTypeOfField(targetType.original!,
|
|
360
|
+
if (targetType.key === 'managed' && targetType.innerTypeProperty) {
|
|
361
|
+
innerReturnType = state.getApparentTypeOfField(targetType.original!, targetType.innerTypeProperty);
|
|
357
362
|
}
|
|
358
363
|
|
|
359
364
|
const finalReturnType = SchemaTransformUtil.ensureType(state, innerReturnType ?? returnType, node);
|