|
1 | 1 | /* |
2 | | -* Copyright (c) 2015-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved. |
| 2 | +* Copyright (c) 2015-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved. |
3 | 3 | */ |
4 | 4 | 'use strict'; |
5 | 5 |
|
@@ -58,11 +58,8 @@ function castArg(arg, funcName, paramName, argPos, paramTypes) { |
58 | 58 | } else if (arg instanceof Number || arg instanceof Boolean || arg instanceof String) { |
59 | 59 | arg = arg.valueOf(); |
60 | 60 | } else if (arg instanceof types.ServerType) { |
61 | | - // We added new VecVector ServerType which is not a sub-type of Item. This makes it a one-off type |
62 | | - // as paramTypes will not include VecVector in any other type checks. |
63 | | - // And if we get here the arg must be and only be a VecVector (arg._ns === 'vec') or we throw an Error |
64 | 61 | if(arg._ns === 'vec'){ |
65 | | - return arg; |
| 62 | + return arg._args; |
66 | 63 | } |
67 | 64 | throw new Error( |
68 | 65 | `${argLabel(funcName, paramName, argPos)} must have type ${typeLabel(paramTypes)}` |
@@ -404,26 +401,6 @@ function castArg(arg, funcName, paramName, argPos, paramTypes) { |
404 | 401 | }); |
405 | 402 | } |
406 | 403 | return true; |
407 | | - case 'PlanTransitiveClosureOptions': |
408 | | - const planTransitiveClosureOptionsSet = new Set(['minLength', 'min-length', 'maxLength', 'max-length']); |
409 | | - if(Object.getPrototypeOf(arg) === Map.prototype){ |
410 | | - arg.forEach((value, key) => { |
411 | | - if(!planTransitiveClosureOptionsSet.has(key)) { |
412 | | - throw new Error( |
413 | | - `${argLabel(funcName, paramName, argPos)} has invalid key- ${key}` |
414 | | - ); |
415 | | - } |
416 | | - }); |
417 | | - } else if (typeof arg === 'object') { |
418 | | - Object.keys(arg).forEach(key => { |
419 | | - if(!planTransitiveClosureOptionsSet.has(key)) { |
420 | | - throw new Error( |
421 | | - `${argLabel(funcName, paramName, argPos)} has invalid key- ${key}` |
422 | | - ); |
423 | | - } |
424 | | - }); |
425 | | - } |
426 | | - return true; |
427 | 404 | default: |
428 | 405 | return false; |
429 | 406 | } |
|
0 commit comments