Skip to content

Adds @types/lodash node_module

Kos Palchyk requested to merge kpalchyk/add-lodash-typings into master

What does this MR do and why?

Adds a node dev dependency: @types/lodash. Which will add type definitions to all lodash imports.

This won't have to change any .js file, it's just a package that should sit in our node_modules to be picked up by our IDEs to lookup types of lodash functions.

We'll just get type hints for lodash functions (as we get for other tools).

Package info:

Package has MIT license.

It is sourced from widely supported and used https://github.com/DefinitelyTyped/DefinitelyTyped initiative.

Screenshots or screen recordings

image

How to set up and validate locally

Run yarn in the root of GitLab project — that will install dependency.

And check types in files that contain lodash, e.g. app/assets/javascripts/content_editor/services/markdown_sourcemap.js

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Kos Palchyk

Merge request reports

Loading