The current tool, built in JavaScript, lacks type safety, making it prone to runtime errors. Using this tool with TypeScript raises error
Could not find a declaration file for module '@editorjs/inline-code'
Cause
This tool was built in JavaScript to be a simplest example of Editor.js Tools API usage.
Solution
To resolve the TypeScript error, the entire codebase of this tool has been migrated from JavaScript to TypeScript. This migration involves several key steps:
Renaming JavaScript files ".js" to TypeScript ".ts".
Update project configuration to support TypeScript.
Refactor the code necessary to align with TypeScript's stricter type rules.
Problem
The current tool, built in JavaScript, lacks type safety, making it prone to runtime errors. Using this tool with TypeScript raises error
Could not find a declaration file for module '@editorjs/inline-code'
Cause
This tool was built in JavaScript to be a simplest example of Editor.js Tools API usage.
Solution
To resolve the TypeScript error, the entire codebase of this tool has been migrated from JavaScript to TypeScript. This migration involves several key steps:
Renaming JavaScript files ".js" to TypeScript ".ts". Update project configuration to support TypeScript. Refactor the code necessary to align with TypeScript's stricter type rules.
closes #42