-
Notifications
You must be signed in to change notification settings - Fork 124
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
Fully adapt core package and associated tests to TypeScript #1913
Comments
Larger dependencies like VariableProcessor are deferred.
@MarkBind/active-devs please help to tackle this ticket if you are interested. Just check any unchecked boxes above, and start implementing away. Type safety is a very nice prequisite to have to performing larger scale refactors, and can serve as good documentation in of itself. Amongst many other things. |
3281 students feel free to help tackle this too! I think it isn't very difficult and it would be a great way to learn the codebase and suggest ways in which it can be improved. Process-wise, in order to prevent a conflict in work done, you can either open a |
Could I have a try; I wish to try completing the #2164 , migrate the layout to typescript |
Migration completed excepts for plugins that were decided to not migrate to typescript. |
(Updated as of 21/04/2022)
This is an epic-type issue to track of our TypeScript migration of the
core
package. Feel free to edit this as we go along.Interested migration developers can get started by checking out the Migrating to TypeScript page in our developer's guide.
Dependency graph of remaining
js
files(There are some files not presented that are still under consideration on whether to be adapted to TypeScript or leave as-is)
Click the image to view it all full resolution:
The green files are ones that do not have any static dependencies to another file and are highly recommended to migrate first. However, the graph is not 100% accurate, as there are green files that have dynamic imports (like in Plugin.js) or have constants documented to be typed as other files' classes (like PageConfig.js and SiteConfig.js)
Which one should I adapt first?
As mentioned, it is highly recommended that we go through files that do not have any dependencies, and collectively work through the dependency graph upwards until the root, meaning that we perform the migration in topological order.
You can adapt multiple related files residing in the same folder in one migration. For example, you might adapt Plugin.js and PluginManager.js together.
Note that when you adapt a file, you also have to adapt the associated tests as well. For example, adapt linkProcessor.js together with linkProcessor.test.js.
Files checklist
(There are some files not presented that are still under consideration on whether to be adapted to TypeScript or leave as-is)
package root
src
template
test/unit
html
plugins/default
lib/nunjucks-extensions
utils
The text was updated successfully, but these errors were encountered: