-
-
Notifications
You must be signed in to change notification settings - Fork 302
Provide generics for Image class #254
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
base: master
Are you sure you want to change the base?
Changes from 4 commits
ffca8c4
3abdc1e
10336e0
da9b403
66e734b
b4b9290
e45e915
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -38,12 +38,12 @@ import Ui from './ui'; | |||||
| import Uploader from './uploader'; | ||||||
|
|
||||||
| import { IconAddBorder, IconStretch, IconAddBackground, IconPicture } from '@codexteam/icons'; | ||||||
| import { ActionConfig, UploadResponseFormat, ImageToolData, ImageConfig } from './types/types'; | ||||||
| import { ActionConfig, UploadResponseFormat, ImageToolData, ImageConfig, FileObjectData } from './types/types'; | ||||||
|
|
||||||
|
|
||||||
| type ImageToolConstructorOptions = BlockToolConstructorOptions<ImageToolData, ImageConfig> | ||||||
| type ImageToolConstructorOptions< CustomActions = {},AdditionalUploadResponse = {}> = BlockToolConstructorOptions<ImageToolData<CustomActions, AdditionalUploadResponse>, ImageConfig> | ||||||
|
|
||||||
| export default class ImageTool implements BlockTool { | ||||||
| export default class ImageTool<CustomActions = {} ,AdditionalUploadResponse = {}> implements BlockTool { | ||||||
|
||||||
| export default class ImageTool<CustomActions = {} ,AdditionalUploadResponse = {}> implements BlockTool { | |
| export default class ImageTool<CustomActions = {}, AdditionalUploadResponse = {}> implements BlockTool { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to pass ImageToolData<CustomActions, AdditionalUploadResponse> because UI should not depend on AdditionalUploadResponse, it depends on data format instead since it may be used for rendering
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is too long and hard to read. Can we do something with it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.