Skip to content
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

kendo-react-dropdowns doesn't work with react-create-app + typescript. #136

Closed
shadowmint opened this issue Nov 30, 2018 · 3 comments
Closed
Assignees
Labels
Bug Item which indicates that something is not working pkg:Dropdowns
Milestone

Comments

@shadowmint
Copy link

I'm submitting a...

  • Bug report

Current behavior

kendo-react-dropdowns does not work with create-react-app when using typescript.

node_modules/@progress/kendo-react-dropdowns/dist/npm/common/settings.d.ts
Type error: Ambient const enums are not allowed when the '--isolatedModules' flag is provided. TS1209

Expected behavior

Using <DropDownList> should not cause an error.

Minimal reproduction of the problem with instructions

npx create-react-app foo
cd foo

Now follow the guide here to enable typescript:

https://facebook.github.io/create-react-app/docs/adding-typescript

Note the comment at the end of the documentation:

Note: Constant enums and namespaces are not supported.

Now attempt to use kendo-react-dropdowns:

npm install @progress/kendo-react-dropdowns

...

import {DropDownList} from "@progress/kendo-react-dropdowns";

Gives:

node_modules/@progress/kendo-react-dropdowns/dist/npm/common/settings.d.ts
Type error: Ambient const enums are not allowed when the '--isolatedModules' flag is provided.  TS1209

     98 |  * @hidden
     99 |  */
  > 100 | export declare const enum ActiveDescendant {
        |                           ^
    101 |     'PopupList' = 0,
    102 |     'TagsList' = 1
    103 | }

What is the motivation or use case for changing the behavior?

react-create-app is the standard way of create react applications, and have selected the babel typescript integration as the 'blessed' way of using typescript.

Certainly, the typescript standard supports this feature, but DropDownList is a fundamental component; this is a show-stopper for using kendo-react.

Environment

Package versions:

    "@progress/kendo-react-buttons": "^2.4.0",
    "@progress/kendo-react-dateinputs": "^2.4.0",
    "@progress/kendo-react-dropdowns": "^2.4.0",
    "@progress/kendo-react-inputs": "^2.4.0",
    "@progress/kendo-react-intl": "^2.4.0",
    "@progress/kendo-theme-material": "^1.5.1",
    "@progress/kendo-ui": "^2018.3.1129",
    "@types/jest": "^23.3.10",
    "@types/node": "^10.12.10",
    "@types/react": "^16.7.8",
    "@types/react-dom": "^16.0.11",
    "node-sass": "^4.10.0",
    "react": "^16.6.3",
    "react-dom": "^16.6.3",
    "react-scripts": "2.1.1",
    "typescript": "^3.1.6"

Browser:
Since this prevents compile, it affects all browsers.

System:

  • TypeScript version: 3.1.6
  • Node version: v10.13.0
  • Platform: Windows
@vladimirivanoviliev vladimirivanoviliev added Bug Item which indicates that something is not working pkg:Dropdowns labels Nov 30, 2018
@vladimirivanoviliev
Copy link

Thank you for reporting this issue - we will investigate how to improve this behavior in next releases. Until fix is released you can fix the issue as suggestted in the following thread:

TypeScript/issues/20703

@nstoychev nstoychev self-assigned this Nov 30, 2018
@nstoychev
Copy link

@shadowmint - We have published a fix in our dev channel 2.5.0-dev.201812030901. See the following article about obtaining development builds - https://www.telerik.com/kendo-react-ui/components/installation/development-builds/.

@Xizario Xizario added this to the 2.6.0 milestone Jan 8, 2019
@Xizario
Copy link
Contributor

Xizario commented Jan 16, 2019

v2.6.0 is published.

@Xizario Xizario closed this as completed Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Item which indicates that something is not working pkg:Dropdowns
Projects
None yet
Development

No branches or pull requests

4 participants