-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Typescript not finding basic javascript methods #639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can confirm the issue, as it affects me as well. Windows 10 WSL (sshcode) -> Ubuntu back end on an Angular/typescript project |
Bumping down the typescript version to 3.3.3333 work around the issue for me. However there still may be an issue with the code-server language files as I have 3.4.3 and 3.3.3333 installed by VSCode. for reference how to workaround this see https://stackoverflow.com/questions/53275853/visual-studio-code-showing-error-cant-find-name-date |
@josephRice Thanks! bumping it down to 3.3.3333 and 3.1.1 worked, just had to also manually switch the version on the vs code bottom toolbar , since 3.4.3 still gets provided by vs code even if a new version is installed in the node module. |
Indeed, at the right bottom you can select the TypeScript version to use. Default the version of Code-Server is being used, which indeed gives this issue. Select 'Use Workspace Version' to use the TypeScript version used by your project. |
In the bottom right corner of the vscode, try to pick different version of the typescript. |
Oh never mind, it was answered :) I guess this issue can be closed? |
code-server
version: 1.939Description
When loading an react application with typescript, code-server throws error on:
Object => cannot find name 'Object'
Function => cannot find name 'Function'
document => cannot find name 'document', even thought dom is included in the lib of tsconfig
bind => bind does not exist on type ( id: string )=>void, is not recognizing that functions have the bind prototype
filter => filter does not exist on type {} event thought the variable is initialize as an array and type as an string[]
For context, the application is a react application created using create-react-app
tsconfig is the one that came prebuild:
This was tested on both Mac OSX 10.13.6 and Ubuntu 18.04 with 2 different react apps.
Note that it still compiles as expected, but the intellisense highlighter is reporting it as an error
One the desktop visual studio code, it will compile and intellisense will not highlight these items
Steps to Reproduce
The text was updated successfully, but these errors were encountered: