You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typescript generates invalid declaration when you declare a "static" element on a function and the name of this "static" element is exactly the same on the other side of the equality. Hard to explain but a small example below demonstrate the issue.
Note, this issue only happens when you add a function or a class as a "static" element of a function.
TypeScript Version: 3.6.0-dev.20190612
Search Terms:
'X' is referenced directly or indirectly in its own type annotation.
The text was updated successfully, but these errors were encountered:
alexandcote
changed the title
Types declaration on "Static" member of function are invalid
Types declaration on "Static" member of a function are invalid
Jun 12, 2019
alexandcote
changed the title
Types declaration on "Static" member of a function are invalid
Types declaration on "Static" members of a function are invalid
Jun 12, 2019
Uh oh!
There was an error while loading. Please reload this page.
Typescript generates invalid declaration when you declare a "static" element on a function and the name of this "static" element is exactly the same on the other side of the equality. Hard to explain but a small example below demonstrate the issue.
Note, this issue only happens when you add a function or a class as a "static" element of a function.
TypeScript Version: 3.6.0-dev.20190612
Search Terms:
Code
Temporary Solution
Expected behavior:
The expected behaviour is tricky because if you export in the same file
Foo
you have another issue.A solution could be:
Again another issue if
Foo
is a function in the same file.Actual behaviour:
Playground Link:
Go see this repo for more examples.
https://github.com/alexandcote/typescript-example
The text was updated successfully, but these errors were encountered: