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

Compilation error with webpack 4.30, reactjs 16.8 #190

Closed
RudiX opened this issue Apr 17, 2019 · 1 comment
Closed

Compilation error with webpack 4.30, reactjs 16.8 #190

RudiX opened this issue Apr 17, 2019 · 1 comment

Comments

@RudiX
Copy link

RudiX commented Apr 17, 2019

Version

3.5.2

Development Environment

VS Code, Windows 10 + MaxOSX, ReactJS,
[...]
devDependencies:
"@types/react": "^16.8.13",
"awesome-typescript-loader": "^5.2.1", || "ts-loader": "^5.3.3",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"typescript": "3.2.2",
"webpack": "^4.30.0",
"webpack-cli": "^3.3.0",
"webpack-dev-server": "^3.3.1",
[...]
dependencies:
[...]
"tui-image-editor": "^3.5.2",
[...]

Current Behavior

index.d.ts line 136 - 155 causing error

interface IGraphicObjectProps {
        id?: number;
        type?: string;
        text?: string;
        left?: string | number;
        top?: string | number;
        width?: string | number;
        height?: string | number;
        fill?: string;
        stroke?: string;
        strokeWidth?: string | number;
        fontFamily?: string;
        fontSize?: number;
        fontStyle?: string;
        fontWeight?: string;
        textAlign?: string;
        textDecoration?: string;
        opacity?: number;
        [propName: string]: number | string | boolean;
 }

Error:
TS2411: Property 'id' of type 'number | undefined' is not assignable to string index type 'string | number | boolean'.
TS2411: Property 'type' of type 'string | undefined' is not assignable to string index type 'string | number | boolean'.
[...] For all interface props

Expected Behavior

no compilation error, maybe by chaning the last line to:

        [propName: string]: number | string | boolean | undefined;
@jinwoo-kim-nhn
Copy link
Contributor

수고하셨습니다.

HerlinMatos pushed a commit to EveryMundo/tui.image-editor that referenced this issue Jul 2, 2020
…nhn#198)

* fix: Add IGraphicObjectProps property type 'undefined' (fix: nhn#190)

* fix: Add "ImageEditor.ui.resizeEditor()" type definition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants