Open threeaccents opened 5 years ago
For anyone looking for a workaround:
Create a react-image-editor.d.ts
file with the following content
declare module '@toast-ui/react-image-editor';
Import it to the component using ImageEditor
/// <reference path="./react-image-editor.d.ts" />
import ImageEditor from '@toast-ui/react-image-editor';
@threeaccents I'll add type definition file. Thank you for your report.
@threeaccents I'll add type definition file. Thank you for your report.
Thanks, this would be great :)
Currently, we've had to ts-ignore the imports to make it work:
// @ts-ignore
import ImageEditor from '@toast-ui/react-image-editor';
import 'tui-image-editor/dist/tui-image-editor.css';
If we have a mapped set of options for the props like includeUI
, that would be even better.
@junghwan-park Just wondering, is this issue resolved?
Typescript available yet?
Dooray! 메일 발송 실패 안내
메일 발송 실패 안내
박시우(viewrain@nhn.com) 님께 보낸 메일이 전송되지 못하였습니다.
실패 사유를 확인해보세요.
* 받는 사람 :
박시우(viewrain@nhn.com)
* 발송 시간 :
2020-11-13T21:43:57
* 메일 제목 :
Re: [nhn/toast-ui.react-image-editor] Typescript support (#5)
* 실패 사유 :
받는 사람이 회원님의 메일을 수신차단 하였습니다.
이 메일은 발신전용으로 회신되지 않습니다.
더 궁금하신 사항은
dooray@nhn.com
으로 문의해 주시기 바랍니다.
© Dooray!.
It's works perfect for me.
Create a react-image-editor.d.ts
declare module '@toast-ui/react-image-editor' {
import ImageEditor from 'tui-image-editor';
type Props = ConstructorParameters<typeof ImageEditor>[1];
export default function BaseImageEditor(props: Props): JSX.Element;
}
Dooray! 메일 발송 실패 안내
메일 발송 실패 안내
박시우(viewrain@nhn.com) 님께 보낸 메일이 전송되지 못하였습니다.
실패 사유를 확인해보세요.
* 받는 사람 :
박시우(viewrain@nhn.com)
* 발송 시간 :
2020-11-16T17:52:50
* 메일 제목 :
Re: [nhn/toast-ui.react-image-editor] Typescript support (#5)
* 실패 사유 :
받는 사람이 회원님의 메일을 수신차단 하였습니다.
이 메일은 발신전용으로 회신되지 않습니다.
더 궁금하신 사항은
dooray@nhn.com
으로 문의해 주시기 바랍니다.
© Dooray!.
@nghieptiki thanks! Ill give it another try with your TS declaration
Dooray! 메일 발송 실패 안내
메일 발송 실패 안내
박시우(viewrain@nhn.com) 님께 보낸 메일이 전송되지 못하였습니다.
실패 사유를 확인해보세요.
* 받는 사람 :
박시우(viewrain@nhn.com)
* 발송 시간 :
2020-11-16T18:36:50
* 메일 제목 :
Re: [nhn/toast-ui.react-image-editor] Typescript support (#5)
* 실패 사유 :
받는 사람이 회원님의 메일을 수신차단 하였습니다.
이 메일은 발신전용으로 회신되지 않습니다.
더 궁금하신 사항은
dooray@nhn.com
으로 문의해 주시기 바랍니다.
© Dooray!.
Does typescript support? I introduced the module and reported an error:
import 'tui-image-editor/dist/tui-image-editor.css';
import ImageEditor from '@toast-ui/react-image-editor';
Cannot find module '@toast-ui/react-image-editor' or its corresponding type declarations.ts(2307)
I used the above answer to no avail
Dooray! 메일 발송 실패 안내
메일 발송 실패 안내
@.***) 님께 보낸 메일이 전송되지 못하였습니다.
실패 사유를 확인해보세요.
* 받는 사람 :
@.***)
* 발송 시간 :
2021-06-15T15:46:21
* 메일 제목 :
Re: [nhn/toast-ui.react-image-editor] Typescript support (#5)
* 실패 사유 :
받는 사람이 회원님의 메일을 수신차단 하였습니다.
이 메일은 발신전용으로 회신되지 않습니다.
더 궁금하신 사항은
***@***.***
으로 문의해 주시기 바랍니다.
© Dooray!.
Does typescript support? I introduced the module and reported an error:
import 'tui-image-editor/dist/tui-image-editor.css'; import ImageEditor from '@toast-ui/react-image-editor';
Cannot find module '@toast-ui/react-image-editor' or its corresponding type declarations.ts(2307)
I used the above answer to no avail
The reason for the error is the package version problem, @toast-ui/react-image-editor: 3.14.3 version problem, when I changed to 3.14.2, it ran well
Dooray! 메일 발송 실패 안내
메일 발송 실패 안내
@.***) 님께 보낸 메일이 전송되지 못하였습니다.
실패 사유를 확인해보세요.
* 받는 사람 :
@.***)
* 발송 시간 :
2021-06-15T16:57:22
* 메일 제목 :
Re: [nhn/toast-ui.react-image-editor] Typescript support (#5)
* 실패 사유 :
받는 사람이 회원님의 메일을 수신차단 하였습니다.
이 메일은 발신전용으로 회신되지 않습니다.
더 궁금하신 사항은
***@***.***
으로 문의해 주시기 바랍니다.
© Dooray!.
Version
^1.0.0
Test Environment
Brave, mac OSX 10.14.1
Current Behavior
No types file present in repo. Or in @types repo. Cannot use library in TypeScript project.
Expected Behavior
Be able to use library in TypeScript project.