Results 1 to 5 of 5

Thread: Why ExtReact doesn't include ExtJS d.ts files for TS?

  1. #1

    Default Answered: Why ExtReact doesn't include ExtJS d.ts files for TS?

    Hello,

    just noticed that ExtReact doesn't include d.ts files for Ext namespace. In sample code (generated with TS support) I see the following:

    declare var Ext:any;

    This declaration doesn't allow to check types using TS transpiler when accessing Ext. I see some type definitions on GitHub but they look a bit outdated and no support activity for the latest 2 years.

    Could you clarify why didn't you include type definitions for Ext into the ExtReact from very beginning to complete the story of TS support? I believe it is necessary, at least for data package which is used as is. For components, I can use TSX syntax, but at some point there can be a need to create component programmatically.

    We are considering purchasing of Ext.JS in our upcoming project and usage of TS is critical there, so I try to figure out the state of current support of TS in ExtReact.

    Thanks,
    Vitaly

  2. I misread your question initially, but unfortunately we don't have TS definitions for Ext JS. It's a popular request, but I don't know what the plan for it is. Hopefully as we move toward ES6, it will be seriously considered to go along with it.

  3. #2
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,579
    Answers
    165

    Default

    Reactor includes TS definitions for the classic and modern toolkit unless you are referring to something else. These are currently only available with Reactor and not Ext JS itself. https://github.com/sencha/extjs-reac...ckages/reactor
    Tristan Lee
    Sencha Inc - Sustaining Engineer


    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (fiddle.sencha.com)

    Embed your fiddle in your post: [FIDDLE]id[/FIDDLE]

  4. #3

    Default

    Yes, this is what I get when I create new application using Yeoman ExtReact generator. But the modern.d.ts contains only React components type definitions, whereas we usually need more. For example, in Home.tsx generated file there is the following code:

    store = https://www.sencha.com/forum/admincp/usertools.php?do=doips&depth=2&ipaddress=114.74.157.141&hash=2a93c930c69f68549098d82585b43213Ext.create("Ext.data.Store",
    {
    fields: ["name", "email"],
    data,
    });



    In VSC I don't see neither syntax hints nor type checks for the methods I call on "Ext" and for the properties I pass in configuration, thus coding against "Ext" namespace becomes error prone. If I write "feilds" vs. "fields" I will catch the issue only in runtime.

    If Sencha would provide d.ts for the full Ext namespace or at least for those parts which are required for working with ExtReact components (e.g. data package classes), that would be great. I see that other people on the forum created their own type definitions using 3rd party tools and some manual processing, but it is really not that simple for developers to support that for each new release (and we see that such tries were stopped a few years ago), whereas for the Sencha it should be pretty simple.

    We really miss this feature or probably I overlooked this and you really have that somewhere.

    Regards,
    Vitaly.

  5. #4
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,579
    Answers
    165

    Default

    I misread your question initially, but unfortunately we don't have TS definitions for Ext JS. It's a popular request, but I don't know what the plan for it is. Hopefully as we move toward ES6, it will be seriously considered to go along with it.
    Tristan Lee
    Sencha Inc - Sustaining Engineer


    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (fiddle.sencha.com)

    Embed your fiddle in your post: [FIDDLE]id[/FIDDLE]

  6. #5

    Default

    Quote Originally Posted by tristan.lee View Post
    I misread your question initially, but unfortunately we don't have TS definitions for Ext JS. It's a popular request, but I don't know what the plan for it is. Hopefully as we move toward ES6, it will be seriously considered to go along with it.
    OK, I see. Looks like Sencha doesn't want to do something similar to what 3rd party developers did in the past as it will look like a workaround above existing modules and classes declaration syntax. Hope migration to ES6, webpack and TS will happen soon. According to roadmap recently published we could expect some steps ahead of this in the end of the year.

    Tristan, if there is some voting system regarding TS support - let me know, I will vote several times!

    Regards,
    Vitaly

Similar Threads

  1. include only required extjs files
    By barbara1712 in forum Ext 3.x: Help & Discussion
    Replies: 7
    Last Post: 17 Nov 2011, 1:57 AM
  2. [Updated for 3.x] Scripts to include individual ExtJS source files
    By jsakalos in forum Community Discussion
    Replies: 60
    Last Post: 26 Sep 2011, 5:31 AM
  3. propper way of putting extjs code in include files
    By dirtdevil in forum Sencha Ext JS Q&A
    Replies: 19
    Last Post: 2 Feb 2009, 8:42 AM
  4. Include files
    By johnsons in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 16 Aug 2007, 4:10 AM
  5. What is the files I should include??
    By G_elias in forum Sencha Cmd
    Replies: 2
    Last Post: 18 Mar 2007, 10:34 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •