-
Notifications
You must be signed in to change notification settings - Fork 57
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
Migrate Quote Tool from JavaScript to TypeScript #66
base: master
Are you sure you want to change the base?
Conversation
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.
you also need to add a build step to the ci
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.
jsdocs are missed
import { IconAlignLeft, IconAlignCenter, IconQuote } from "@codexteam/icons"; | ||
import { QuoteData, QuoteConfig, TunesMenuConfig } from "./types"; | ||
|
||
export default class Quote { |
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 class should implement BlockTool
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.
its better to rename this file instead of removing, it will be easier to review
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.
types are not declared
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.
irrelevant change
Migrate Quote Tool from JavaScript to TypeScript
Fixes #65
Summary:
This pull request migrates the Quote Tool from JavaScript to TypeScript, enhancing type safety and maintainability. The migration involved converting the main
index.js
file toindex.ts
and creating atypes.ts
file for type definitions. The originalindex.js
andtypes.js
files have been deleted as they are no longer needed.Details:
index.js
toindex.ts
, ensuring all functionalities are type-safe.types.ts
to define interfaces and types used in the project.tsconfig.json
to target ES2017 and include necessary libraries (e.g.,dom
).Object.assign
with TypeScript-compatible syntax.lib
configuration.index.js
andtypes.js
as they are no longer needed.