datagrok-tools 4.14.38 → 4.14.40
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
|
@@ -351,8 +351,8 @@ class FuncGeneratorPlugin {
|
|
|
351
351
|
let isArray = false;
|
|
352
352
|
if (nodeAnnotation?.type === 'TSUnionType' &&
|
|
353
353
|
nodeAnnotation?.types?.length === 2 &&
|
|
354
|
-
nodeAnnotation?.types?.some((e)=> e?.type === 'TSNullKeyword' || e?.type === 'TSVoidKeyword'))
|
|
355
|
-
nodeAnnotation = nodeAnnotation.types.filter((e)=> e.type !== 'TSNullKeyword' || e?.type === 'TSVoidKeyword')[0];
|
|
354
|
+
nodeAnnotation?.types?.some((e)=> e?.type === 'TSNullKeyword' || e?.type === 'TSVoidKeyword'|| e?.type === 'TSUndefinedKeyword'))
|
|
355
|
+
nodeAnnotation = nodeAnnotation.types.filter((e)=> e.type !== 'TSNullKeyword' || e?.type === 'TSVoidKeyword' || e?.type === 'TSUndefinedKeyword')[0];
|
|
356
356
|
|
|
357
357
|
|
|
358
358
|
if (
|
|
@@ -376,7 +376,7 @@ class FuncGeneratorPlugin {
|
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
resultType = typesToAnnotation[resultType];
|
|
379
|
-
if (isArray && resultType) resultType = `list
|
|
379
|
+
if (isArray && resultType) resultType = `list<${resultType}>`;
|
|
380
380
|
return resultType ?? 'dynamic';
|
|
381
381
|
}
|
|
382
382
|
|
|
@@ -422,6 +422,8 @@ class FuncGeneratorPlugin {
|
|
|
422
422
|
return typeNode.typeName.name;
|
|
423
423
|
else if (typeNode.type === 'TSVoidKeyword')
|
|
424
424
|
return 'void';
|
|
425
|
+
else if (typeNode.type === 'TSUndefinedKeyword ')
|
|
426
|
+
return 'undefined';
|
|
425
427
|
else if (typeNode.type === 'TSNumberKeyword')
|
|
426
428
|
return 'number';
|
|
427
429
|
else if (typeNode.type === 'TSStringKeyword')
|