TypeScript/tests/baselines/reference/assignmentToFunction.errors.txt
Hai Lin Zhang e44d39d4eb
Updated error message for TS2539 (#39827)
* Updated error message for TS2539

* Switch to multiple error messages

* inline variable

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2021-03-11 15:51:15 -08:00

19 lines
638 B
Plaintext

tests/cases/compiler/assignmentToFunction.ts(2,1): error TS2630: Cannot assign to 'fn' because it is a function.
tests/cases/compiler/assignmentToFunction.ts(8,9): error TS2630: Cannot assign to 'bar' because it is a function.
==== tests/cases/compiler/assignmentToFunction.ts (2 errors) ====
function fn() { }
fn = () => 3;
~~
!!! error TS2630: Cannot assign to 'fn' because it is a function.
module foo {
function xyz() {
function bar() {
}
bar = null;
~~~
!!! error TS2630: Cannot assign to 'bar' because it is a function.
}
}