diff --git a/tests/baselines/reference/contextuallyTypeCommaOperator03.errors.txt b/tests/baselines/reference/contextuallyTypeCommaOperator03.errors.txt new file mode 100644 index 0000000000..715b7cf70e --- /dev/null +++ b/tests/baselines/reference/contextuallyTypeCommaOperator03.errors.txt @@ -0,0 +1,10 @@ +tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator03.ts(4,6): error TS7006: Parameter 'a' implicitly has an 'any' type. + + +==== tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator03.ts (1 errors) ==== + + let x: (a: string) => string; + + x = (a => a, b => b); + ~ +!!! error TS7006: Parameter 'a' implicitly has an 'any' type. \ No newline at end of file diff --git a/tests/baselines/reference/contextuallyTypeCommaOperator03.js b/tests/baselines/reference/contextuallyTypeCommaOperator03.js new file mode 100644 index 0000000000..c4754f28c4 --- /dev/null +++ b/tests/baselines/reference/contextuallyTypeCommaOperator03.js @@ -0,0 +1,9 @@ +//// [contextuallyTypeCommaOperator03.ts] + +let x: (a: string) => string; + +x = (a => a, b => b); + +//// [contextuallyTypeCommaOperator03.js] +var x; +x = (function (a) { return a; }, function (b) { return b; }); diff --git a/tests/baselines/reference/contextuallyTypeLogicalAnd03.errors.txt b/tests/baselines/reference/contextuallyTypeLogicalAnd03.errors.txt new file mode 100644 index 0000000000..1430be0042 --- /dev/null +++ b/tests/baselines/reference/contextuallyTypeLogicalAnd03.errors.txt @@ -0,0 +1,11 @@ +tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd03.ts(5,6): error TS7006: Parameter 'a' implicitly has an 'any' type. + + +==== tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd03.ts (1 errors) ==== + + let x: (a: string) => string; + let y = true; + + x = (a => a) && (b => b); + ~ +!!! error TS7006: Parameter 'a' implicitly has an 'any' type. \ No newline at end of file diff --git a/tests/baselines/reference/contextuallyTypeLogicalAnd03.js b/tests/baselines/reference/contextuallyTypeLogicalAnd03.js new file mode 100644 index 0000000000..cbf1b3a319 --- /dev/null +++ b/tests/baselines/reference/contextuallyTypeLogicalAnd03.js @@ -0,0 +1,11 @@ +//// [contextuallyTypeLogicalAnd03.ts] + +let x: (a: string) => string; +let y = true; + +x = (a => a) && (b => b); + +//// [contextuallyTypeLogicalAnd03.js] +var x; +var y = true; +x = (function (a) { return a; }) && (function (b) { return b; });