Property … does not exist on type 'IntrinsicAttributes & …'property does not exists on type ''Angular 2 beta.17: Property 'map' does not exist on type 'Observable<Response>'Can't bind to 'ngModel' since it isn't a known property of 'input'TypeScript TS2339 error in React component: Property 'xyz' does not exist on type 'IntrinsicAttributes…'property of type forEach does not exist on type voidAdd onclick listener reactjsProperty 'pictures' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributesTypescript redux connected component type errorTypescript+React+Redux+reactrouter:“property does not exist on type IntrinsicAttributes & IntrinsicClassAttributes” passing props from parent to childUnable to set ref due to error “TS2339: Property 'X' does not exist on type 'Y' ” inside a react component

How to have a sharp product image?

Overlay of two functions leaves gaps

A ​Note ​on ​N!

Why does Mind Blank stop the Feeblemind spell?

Can SQL Server create collisions in system generated constraint names?

Can someone publish a story that happened to you?

As an international instructor, should I openly talk about my accent?

How can I print the prosodic symbols in LaTeX?

Why does nature favour the Laplacian?

Is it idiomatic to construct against `this`

How to denote matrix elements succinctly?

Can I grease a crank spindle/bracket without disassembling the crank set?

How to display Aura JS Errors Lightning Out

What is the philosophical significance of speech acts/implicature?

Is there any official lore on the Far Realm?

Minor Revision with suggestion of an alternative proof by reviewer

How would 10 generations of living underground change the human body?

Do I have an "anti-research" personality?

can anyone help me with this awful query plan?

Was there a shared-world project before "Thieves World"?

Betweenness centrality formula

Implications of cigar-shaped bodies having rings?

How to not starve gigantic beasts

Is Diceware more secure than a long passphrase?



Property … does not exist on type 'IntrinsicAttributes & …'


property does not exists on type ''Angular 2 beta.17: Property 'map' does not exist on type 'Observable<Response>'Can't bind to 'ngModel' since it isn't a known property of 'input'TypeScript TS2339 error in React component: Property 'xyz' does not exist on type 'IntrinsicAttributes…'property of type forEach does not exist on type voidAdd onclick listener reactjsProperty 'pictures' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributesTypescript redux connected component type errorTypescript+React+Redux+reactrouter:“property does not exist on type IntrinsicAttributes & IntrinsicClassAttributes” passing props from parent to childUnable to set ref due to error “TS2339: Property 'X' does not exist on type 'Y' ” inside a react component






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








-1















I changed my .js file to a typescript file .tsx. I have the following function defined within the file:



function MyCard(param1: ObjectDto, toggleFunction: any) 


I am using this function in another .tsx file like this



<MyCard param1=param1Value toggleFunction=myToggleFunction />


But I am getting the following error:




Type ' param1: ObjectDto; toggleFunction: (index: any) => void; ' is
not assignable to type 'IntrinsicAttributes & ObjectDto'. Property
'param1' does not exist on type 'IntrinsicAttributes & ObjectDto'.




This worked fine before changing to the Typescript format.
How can I fix this for Typescript?










share|improve this question




























    -1















    I changed my .js file to a typescript file .tsx. I have the following function defined within the file:



    function MyCard(param1: ObjectDto, toggleFunction: any) 


    I am using this function in another .tsx file like this



    <MyCard param1=param1Value toggleFunction=myToggleFunction />


    But I am getting the following error:




    Type ' param1: ObjectDto; toggleFunction: (index: any) => void; ' is
    not assignable to type 'IntrinsicAttributes & ObjectDto'. Property
    'param1' does not exist on type 'IntrinsicAttributes & ObjectDto'.




    This worked fine before changing to the Typescript format.
    How can I fix this for Typescript?










    share|improve this question
























      -1












      -1








      -1








      I changed my .js file to a typescript file .tsx. I have the following function defined within the file:



      function MyCard(param1: ObjectDto, toggleFunction: any) 


      I am using this function in another .tsx file like this



      <MyCard param1=param1Value toggleFunction=myToggleFunction />


      But I am getting the following error:




      Type ' param1: ObjectDto; toggleFunction: (index: any) => void; ' is
      not assignable to type 'IntrinsicAttributes & ObjectDto'. Property
      'param1' does not exist on type 'IntrinsicAttributes & ObjectDto'.




      This worked fine before changing to the Typescript format.
      How can I fix this for Typescript?










      share|improve this question














      I changed my .js file to a typescript file .tsx. I have the following function defined within the file:



      function MyCard(param1: ObjectDto, toggleFunction: any) 


      I am using this function in another .tsx file like this



      <MyCard param1=param1Value toggleFunction=myToggleFunction />


      But I am getting the following error:




      Type ' param1: ObjectDto; toggleFunction: (index: any) => void; ' is
      not assignable to type 'IntrinsicAttributes & ObjectDto'. Property
      'param1' does not exist on type 'IntrinsicAttributes & ObjectDto'.




      This worked fine before changing to the Typescript format.
      How can I fix this for Typescript?







      reactjs typescript






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 9 at 9:11









      doormandoorman

      3,06373777




      3,06373777






















          2 Answers
          2






          active

          oldest

          votes


















          1














          Components have only one parameter which is the props object, therefore your function should look something like this:



          function MyCard(props: param1: ObjectDto, toggleFunction: any ) 


          The type system is trying to match the properties with the first parameter of your function, which is of type ObjectDto. That's why you get error




          is not assignable to type 'IntrinsicAttributes & ObjectDto'







          share|improve this answer























          • Hi @Sulthan thanks for your reply This works but I am getting a proxy object instead of the input value. The proxy object for param1 contains [[Handler]]:Object [[IsRevoked]]:false [[Target]]:Object how can I access these properties to get the input value?

            – doorman
            Mar 9 at 9:58











          • Something like param1.target.value?

            – Sulthan
            Mar 9 at 9:59











          • well I can't access target like this. What I didn't mention is that param1 comes from an observable mobx list.

            – doorman
            Mar 9 at 10:01











          • @doorman I feel that's a really different question.

            – Sulthan
            Mar 9 at 10:03











          • yes, it seems I didn't realize this was the problem. This could be the solution mobx.js.org/refguide/tojson.html

            – doorman
            Mar 9 at 10:04


















          1














          Did you make an interface for your component "MyCard"?



          Like this: interface MyCodeParams
          param1: ObjectDto
          toggleFunction: (param: any) => void



          Also, i think toggleFunction: (param?: any) => void is the right type because your function may have parameters so you should type your function like this.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55075740%2fproperty-does-not-exist-on-type-intrinsicattributes%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Components have only one parameter which is the props object, therefore your function should look something like this:



            function MyCard(props: param1: ObjectDto, toggleFunction: any ) 


            The type system is trying to match the properties with the first parameter of your function, which is of type ObjectDto. That's why you get error




            is not assignable to type 'IntrinsicAttributes & ObjectDto'







            share|improve this answer























            • Hi @Sulthan thanks for your reply This works but I am getting a proxy object instead of the input value. The proxy object for param1 contains [[Handler]]:Object [[IsRevoked]]:false [[Target]]:Object how can I access these properties to get the input value?

              – doorman
              Mar 9 at 9:58











            • Something like param1.target.value?

              – Sulthan
              Mar 9 at 9:59











            • well I can't access target like this. What I didn't mention is that param1 comes from an observable mobx list.

              – doorman
              Mar 9 at 10:01











            • @doorman I feel that's a really different question.

              – Sulthan
              Mar 9 at 10:03











            • yes, it seems I didn't realize this was the problem. This could be the solution mobx.js.org/refguide/tojson.html

              – doorman
              Mar 9 at 10:04















            1














            Components have only one parameter which is the props object, therefore your function should look something like this:



            function MyCard(props: param1: ObjectDto, toggleFunction: any ) 


            The type system is trying to match the properties with the first parameter of your function, which is of type ObjectDto. That's why you get error




            is not assignable to type 'IntrinsicAttributes & ObjectDto'







            share|improve this answer























            • Hi @Sulthan thanks for your reply This works but I am getting a proxy object instead of the input value. The proxy object for param1 contains [[Handler]]:Object [[IsRevoked]]:false [[Target]]:Object how can I access these properties to get the input value?

              – doorman
              Mar 9 at 9:58











            • Something like param1.target.value?

              – Sulthan
              Mar 9 at 9:59











            • well I can't access target like this. What I didn't mention is that param1 comes from an observable mobx list.

              – doorman
              Mar 9 at 10:01











            • @doorman I feel that's a really different question.

              – Sulthan
              Mar 9 at 10:03











            • yes, it seems I didn't realize this was the problem. This could be the solution mobx.js.org/refguide/tojson.html

              – doorman
              Mar 9 at 10:04













            1












            1








            1







            Components have only one parameter which is the props object, therefore your function should look something like this:



            function MyCard(props: param1: ObjectDto, toggleFunction: any ) 


            The type system is trying to match the properties with the first parameter of your function, which is of type ObjectDto. That's why you get error




            is not assignable to type 'IntrinsicAttributes & ObjectDto'







            share|improve this answer













            Components have only one parameter which is the props object, therefore your function should look something like this:



            function MyCard(props: param1: ObjectDto, toggleFunction: any ) 


            The type system is trying to match the properties with the first parameter of your function, which is of type ObjectDto. That's why you get error




            is not assignable to type 'IntrinsicAttributes & ObjectDto'








            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 9 at 9:33









            SulthanSulthan

            100k16164207




            100k16164207












            • Hi @Sulthan thanks for your reply This works but I am getting a proxy object instead of the input value. The proxy object for param1 contains [[Handler]]:Object [[IsRevoked]]:false [[Target]]:Object how can I access these properties to get the input value?

              – doorman
              Mar 9 at 9:58











            • Something like param1.target.value?

              – Sulthan
              Mar 9 at 9:59











            • well I can't access target like this. What I didn't mention is that param1 comes from an observable mobx list.

              – doorman
              Mar 9 at 10:01











            • @doorman I feel that's a really different question.

              – Sulthan
              Mar 9 at 10:03











            • yes, it seems I didn't realize this was the problem. This could be the solution mobx.js.org/refguide/tojson.html

              – doorman
              Mar 9 at 10:04

















            • Hi @Sulthan thanks for your reply This works but I am getting a proxy object instead of the input value. The proxy object for param1 contains [[Handler]]:Object [[IsRevoked]]:false [[Target]]:Object how can I access these properties to get the input value?

              – doorman
              Mar 9 at 9:58











            • Something like param1.target.value?

              – Sulthan
              Mar 9 at 9:59











            • well I can't access target like this. What I didn't mention is that param1 comes from an observable mobx list.

              – doorman
              Mar 9 at 10:01











            • @doorman I feel that's a really different question.

              – Sulthan
              Mar 9 at 10:03











            • yes, it seems I didn't realize this was the problem. This could be the solution mobx.js.org/refguide/tojson.html

              – doorman
              Mar 9 at 10:04
















            Hi @Sulthan thanks for your reply This works but I am getting a proxy object instead of the input value. The proxy object for param1 contains [[Handler]]:Object [[IsRevoked]]:false [[Target]]:Object how can I access these properties to get the input value?

            – doorman
            Mar 9 at 9:58





            Hi @Sulthan thanks for your reply This works but I am getting a proxy object instead of the input value. The proxy object for param1 contains [[Handler]]:Object [[IsRevoked]]:false [[Target]]:Object how can I access these properties to get the input value?

            – doorman
            Mar 9 at 9:58













            Something like param1.target.value?

            – Sulthan
            Mar 9 at 9:59





            Something like param1.target.value?

            – Sulthan
            Mar 9 at 9:59













            well I can't access target like this. What I didn't mention is that param1 comes from an observable mobx list.

            – doorman
            Mar 9 at 10:01





            well I can't access target like this. What I didn't mention is that param1 comes from an observable mobx list.

            – doorman
            Mar 9 at 10:01













            @doorman I feel that's a really different question.

            – Sulthan
            Mar 9 at 10:03





            @doorman I feel that's a really different question.

            – Sulthan
            Mar 9 at 10:03













            yes, it seems I didn't realize this was the problem. This could be the solution mobx.js.org/refguide/tojson.html

            – doorman
            Mar 9 at 10:04





            yes, it seems I didn't realize this was the problem. This could be the solution mobx.js.org/refguide/tojson.html

            – doorman
            Mar 9 at 10:04













            1














            Did you make an interface for your component "MyCard"?



            Like this: interface MyCodeParams
            param1: ObjectDto
            toggleFunction: (param: any) => void



            Also, i think toggleFunction: (param?: any) => void is the right type because your function may have parameters so you should type your function like this.






            share|improve this answer



























              1














              Did you make an interface for your component "MyCard"?



              Like this: interface MyCodeParams
              param1: ObjectDto
              toggleFunction: (param: any) => void



              Also, i think toggleFunction: (param?: any) => void is the right type because your function may have parameters so you should type your function like this.






              share|improve this answer

























                1












                1








                1







                Did you make an interface for your component "MyCard"?



                Like this: interface MyCodeParams
                param1: ObjectDto
                toggleFunction: (param: any) => void



                Also, i think toggleFunction: (param?: any) => void is the right type because your function may have parameters so you should type your function like this.






                share|improve this answer













                Did you make an interface for your component "MyCard"?



                Like this: interface MyCodeParams
                param1: ObjectDto
                toggleFunction: (param: any) => void



                Also, i think toggleFunction: (param?: any) => void is the right type because your function may have parameters so you should type your function like this.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 9 at 9:23









                SIn SimSIn Sim

                737




                737



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55075740%2fproperty-does-not-exist-on-type-intrinsicattributes%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

                    Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

                    Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved