diff --git a/packages/custom-functions-metadata/src/parseTree.ts b/packages/custom-functions-metadata/src/parseTree.ts index 5ef3c35e7..c09a2cd84 100644 --- a/packages/custom-functions-metadata/src/parseTree.ts +++ b/packages/custom-functions-metadata/src/parseTree.ts @@ -491,12 +491,6 @@ function getOptions( const errorString = `Since ${errorParam} is present, the last function parameter should be of type CustomFunctions.Invocation :`; extra.errors.push(logError(errorString, functionPosition)); } - - if (isStreamingFunction) { - const functionPosition = getPosition(func); - const errorString = `${errorParam} cannot be used with @streaming.`; - extra.errors.push(logError(errorString, functionPosition)); - } } if ( diff --git a/packages/custom-functions-metadata/test/cases/error-requiresaddress-streaming/expected.js.errors.txt b/packages/custom-functions-metadata/test/cases/error-requiresaddress-streaming/expected.js.errors.txt deleted file mode 100644 index dea67836f..000000000 --- a/packages/custom-functions-metadata/test/cases/error-requiresaddress-streaming/expected.js.errors.txt +++ /dev/null @@ -1 +0,0 @@ -@requiresAddress cannot be used with @streaming. (1,1) \ No newline at end of file diff --git a/packages/custom-functions-metadata/test/cases/error-requiresaddress-streaming/expected.ts.errors.txt b/packages/custom-functions-metadata/test/cases/error-requiresaddress-streaming/expected.ts.errors.txt deleted file mode 100644 index dea67836f..000000000 --- a/packages/custom-functions-metadata/test/cases/error-requiresaddress-streaming/expected.ts.errors.txt +++ /dev/null @@ -1 +0,0 @@ -@requiresAddress cannot be used with @streaming. (1,1) \ No newline at end of file diff --git a/packages/custom-functions-metadata/test/cases/error-requiresparameteraddresses-streaming/expected.js.errors.txt b/packages/custom-functions-metadata/test/cases/error-requiresparameteraddresses-streaming/expected.js.errors.txt deleted file mode 100644 index 988da5a38..000000000 --- a/packages/custom-functions-metadata/test/cases/error-requiresparameteraddresses-streaming/expected.js.errors.txt +++ /dev/null @@ -1 +0,0 @@ -@requiresParameterAddresses cannot be used with @streaming. (1,1) \ No newline at end of file diff --git a/packages/custom-functions-metadata/test/cases/error-requiresparameteraddresses-streaming/expected.ts.errors.txt b/packages/custom-functions-metadata/test/cases/error-requiresparameteraddresses-streaming/expected.ts.errors.txt deleted file mode 100644 index 988da5a38..000000000 --- a/packages/custom-functions-metadata/test/cases/error-requiresparameteraddresses-streaming/expected.ts.errors.txt +++ /dev/null @@ -1 +0,0 @@ -@requiresParameterAddresses cannot be used with @streaming. (1,1) \ No newline at end of file diff --git a/packages/custom-functions-metadata/test/cases/requiresaddress-streaming/expected.json b/packages/custom-functions-metadata/test/cases/requiresaddress-streaming/expected.json new file mode 100644 index 000000000..c7ab0f2e5 --- /dev/null +++ b/packages/custom-functions-metadata/test/cases/requiresaddress-streaming/expected.json @@ -0,0 +1,24 @@ +{ + "allowCustomDataForDataTypeAny": true, + "functions": [ + { + "description": "Test the new streaming invocation type", + "id": "CUSTOMFUNCTIONSTREAMINGINVOCATIONTEST", + "name": "CUSTOMFUNCTIONSTREAMINGINVOCATIONTEST", + "options": { + "requiresAddress": true, + "stream": true + }, + "parameters": [ + { + "description": "string", + "name": "x", + "type": "string" + } + ], + "result": { + "type": "string" + } + } + ] +} \ No newline at end of file diff --git a/packages/custom-functions-metadata/test/cases/error-requiresaddress-streaming/functions.js b/packages/custom-functions-metadata/test/cases/requiresaddress-streaming/functions.js similarity index 100% rename from packages/custom-functions-metadata/test/cases/error-requiresaddress-streaming/functions.js rename to packages/custom-functions-metadata/test/cases/requiresaddress-streaming/functions.js diff --git a/packages/custom-functions-metadata/test/cases/error-requiresaddress-streaming/functions.ts b/packages/custom-functions-metadata/test/cases/requiresaddress-streaming/functions.ts similarity index 100% rename from packages/custom-functions-metadata/test/cases/error-requiresaddress-streaming/functions.ts rename to packages/custom-functions-metadata/test/cases/requiresaddress-streaming/functions.ts diff --git a/packages/custom-functions-metadata/test/cases/requiresparameteraddresses-streaming/expected.json b/packages/custom-functions-metadata/test/cases/requiresparameteraddresses-streaming/expected.json new file mode 100644 index 000000000..f32c53316 --- /dev/null +++ b/packages/custom-functions-metadata/test/cases/requiresparameteraddresses-streaming/expected.json @@ -0,0 +1,24 @@ +{ + "allowCustomDataForDataTypeAny": true, + "functions": [ + { + "description": "Test the new streaming invocation type", + "id": "CUSTOMFUNCTIONSTREAMINGINVOCATIONTEST", + "name": "CUSTOMFUNCTIONSTREAMINGINVOCATIONTEST", + "options": { + "stream": true, + "requiresParameterAddresses": true + }, + "parameters": [ + { + "description": "string", + "name": "x", + "type": "string" + } + ], + "result": { + "type": "string" + } + } + ] +} \ No newline at end of file diff --git a/packages/custom-functions-metadata/test/cases/error-requiresparameteraddresses-streaming/functions.js b/packages/custom-functions-metadata/test/cases/requiresparameteraddresses-streaming/functions.js similarity index 100% rename from packages/custom-functions-metadata/test/cases/error-requiresparameteraddresses-streaming/functions.js rename to packages/custom-functions-metadata/test/cases/requiresparameteraddresses-streaming/functions.js diff --git a/packages/custom-functions-metadata/test/cases/error-requiresparameteraddresses-streaming/functions.ts b/packages/custom-functions-metadata/test/cases/requiresparameteraddresses-streaming/functions.ts similarity index 100% rename from packages/custom-functions-metadata/test/cases/error-requiresparameteraddresses-streaming/functions.ts rename to packages/custom-functions-metadata/test/cases/requiresparameteraddresses-streaming/functions.ts