Angular 9 Stop using deprecated functions from utils

Viewed 760

In our app we used to make use of util functions found in node's core (@types/node/util.d.ts). These functions have been deprecated, and I want to know how can we make use of another library, like core-util-is, or even port those to a custom library/file with exported functions within our project - in order to get rid of the esLint errors.

Note: I dont want to disable the deprecated rule in eslint.

The easy part is to port those functions straight into our project, but when using them (for instance isNullOrUndefined(myObject), vsCode will try to import that function from the deprecated function:

import { isNullOrUndefined } from 'utils';

How can I force vsCode (Or typescript, I don't have enough knowledge on this subject to know which is responsible for importing) to skip importing from the deprecated utils and to import from the correct external library/custom file in our project?

import { isNullOrUndefined } from './customUtils';
0 Answers
Related