facebook

Typescript version 2.5.3

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #616013 Reply

    mrsgray
    Participant

    I’m evaluating MyEclipse for a project of ours (As an eclipse user I’m sick of having to use IntelliJ).

    This react project uses typescript version 3.4.5 and react version 16.8.6.
    This project compiles and runs well using maven and/or intellij, but in MyEclipse I get the TypeScript Problem:

    “Property ‘Component’ does not exist on type ‘typeof React'”

    import * as React from 'react';
    import MaterialList from "./MaterialList";
    export interface IAppProps {
    }
    export interface IAppState {
    }
    class App extends React.Component<IAppProps,IAppState> {
        constructor(props) {
            super(props);
        }
    
        render() {
            return (
                <div>
                    Well helloooooow
                    <MaterialList/>
                </div>
            );
        }
    }
    
    export default App;
    

    According to https://stackoverflow.com/questions/55846462/tslint-error-property-component-does-not-exist-on-type-typeof-react
    (which is the only place I found explaining this issue) this has to do with using an old version of typescript.
    The application itself uses 3.4.5 and doesn’t have any problem with that statement, but in the project properties under “TypeScript” I see version 2.5.3 is used. Is there a way to make MyEclipse use a more recent typescript version for the tslint validation?

    #616014 Reply

    mrsgray
    Participant

    To be clear: the MyEclipse tslint validation complains about the “extends React.Component ” on line 7.

    #616023 Reply

    Hi mrsgray,

    You can point CodeMix to use the same version of TypeScript that your project is using by:

    • Opening the command palette (Ctrl+Shift+P / Cmd+Shift+P)
    • Then type and select TypeScript: Select TypeScript Version…
    • Finally choose Use Worskspace Version (It should list the TypeScript version your project is using).

    Please let me know how it goes.

    Cheers,
    Sal

    #616024 Reply

    Brian Fernandes
    Moderator

    Sorry we jumped the gun with our previous response. For the level of TypeScript support you need, we would recommend installing CodeMix in MyEclipse. CodeMix is free with your MyEclipse subscription, and if you have a few minutes, you can get a quick overview of its features in this video: https://youtu.be/Y0mmP-bji-k

    To install CodeMix, visit this page: https://marketplace.eclipse.org/content/codemix-3 and drag and drop the Install button into your MyEclipse install. After finishing the installation and restarting, you can follow Sal’s instructions above.

    #616317 Reply

    mrsgray
    Participant

    Thank you. This is indeed much better.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Typescript version 2.5.3

You must be logged in to post in the forum log in